<ROOT>
 <APPS_INITIALIZE_DATA>
  <USER_NAME>ENGINATICS</USER_NAME>
  <RESPONSIBILITY_KEY>SYSTEM_ADMINISTRATOR</RESPONSIBILITY_KEY>
  <APPLICATION_SHORT_NAME>SYSADMIN</APPLICATION_SHORT_NAME>
 </APPS_INITIALIZE_DATA>
<REPORTS>
<!-- loader xml for Enginatics Blitz Report: AP Intercompany Invoice Details -->
 <REPORTS_ROW>
  <GUID>BA0148F9C1CACD7DE0530100007F27FA</GUID><ENABLED>Y</ENABLED>
  <SQL_TEXT>select
x.*
from
(
select
      gl.name                                    ledger
    , hou.name                                   operating_unit
    , aia.source                                 invoice_source
    , aps.vendor_name
    , aps.segment1                               vendor_num
    , assa.vendor_site_code
    , aia.invoice_num
    , xxen_util.meaning(aia.invoice_type_lookup_code,&apos;INVOICE TYPE&apos;,200)
                                                 invoice_type
    , aia.invoice_date
    , xxen_util.ap_invoice_status(aia.invoice_id,aia.invoice_amount,aia.payment_status_flag,aia.invoice_type_lookup_code,aia.validation_request_id)
                                                 invoice_status
    , xxen_util.client_time(aia.creation_date)   invoice_creation_date
    , aida.accounting_date                       accounting_date
    , aida.period_name                           period
    , aia.invoice_amount                         invoice_amount
    , aia.total_tax_amount                       invoice_tax_amount
    , aia.amount_paid                            invoice_paid_amount
    , aia.invoice_currency_code
    , aia.exchange_rate
    , aia.exchange_rate_type
    , aia.exchange_date
    , nvl(aia.base_amount,aia.invoice_amount)    invoice_acctd_amount
    , aia.cancelled_date                         invoice_cancelled_date
    , aia.cancelled_amount                       invoice_cancelled_amount
    , aila.line_number
    , msik.product
    , msik.product_description
    , aila.description                           invoice_line_description
    , aila.quantity_invoiced
    , nvl( ( select mufm.uom_code
             from  mtl_units_of_measure mufm
             where mufm.unit_of_measure = aila.unit_meas_lookup_code
             and   rownum=1
            )
         ,  aila.unit_meas_lookup_code
         )                                       unit_meas_lookup_code
    , aila.unit_price
    , aila.amount                                line_amount
    , aida.distribution_line_number
    , gcck.concatenated_segments                 distribution_account
    , aida.amount                                distribution_amount
    , aida.base_amount                           distribution_acctd_amount
    , aia.invoice_id
    , aia.reference_1                            customer_trx_id
    , aila.reference_1                           customer_trx_line_id
&amp;il_tax_columns_inner_amt
&amp;il_tax_columns_inner_rate
&amp;il_tax_columns_inner_tp
    from
      ap_invoices_all              aia
    , ap_invoice_lines_all         aila
    , ap_invoice_distributions_all aida
    , ap_suppliers                 aps
    , ap_supplier_sites_all        assa
    , hr_operating_units           hou
    , gl_ledgers                   gl
    , gl_code_combinations_kfv     gcck
    , ( select msik.inventory_item_id
             , msik.concatenated_segments product
             , msik.description           product_description
        from   mtl_system_items_b_kfv       msik
        where  msik.organization_id =
               (select mp.master_organization_id
                from   mtl_parameters mp
                where  rownum=1
               )
       )                           msik
&amp;il_from
    where
        aia.invoice_id                   = aila.invoice_id
    and aila.invoice_id                  = aida.invoice_id (+)
    and aila.line_number                 = aida.invoice_line_number (+)
    and aia.vendor_id                    = aps.vendor_id
    and aia.vendor_site_id               = assa.vendor_site_id
    and aia.set_of_books_id              = gl.ledger_id
    and aia.org_id                       = hou.organization_id
    and aila.inventory_item_id           = msik.inventory_item_id (+)
    and aida.dist_code_combination_id    = gcck.code_combination_id (+)
    and aia.source                       = &apos;Intercompany&apos;
    and aila.line_type_lookup_code       = &apos;ITEM&apos;
    and nvl(aila.discarded_flag,&apos;N&apos;)     = &apos;N&apos;
    and 1=1
&amp;il_where
) x
    order by
      x.ledger
    , x.operating_unit
    , x.vendor_name
    , x.vendor_site_code
    , x.invoice_date
    , x.invoice_num
    , x.line_number
    , x.distribution_line_number</SQL_TEXT>
  <VERSION_COMMENTS>Added India GST columns, displayed only when India Localization is installed.</VERSION_COMMENTS>
  <XDO_APPLICATION_SHORT_NAME>SQLAP</XDO_APPLICATION_SHORT_NAME>
  <REQUIRED_PARAMETERS>(:Ledger is not null or :Operating_Unit is not null)</REQUIRED_PARAMETERS>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>AR</LANGUAGE>
    <REPORT_NAME>AP Intercompany Invoice Details</REPORT_NAME>
    <DESCRIPTION>تفاصيل فاتورة AP Intercompany
</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>D</LANGUAGE>
    <REPORT_NAME>AP Intercompany Invoice Details</REPORT_NAME>
    <DESCRIPTION>AP Intercompany-Rechnungsdetails
</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>E</LANGUAGE>
    <REPORT_NAME>AP Intercompany Invoice Details</REPORT_NAME>
    <DESCRIPTION>Detalles de la factura interempresarial AP
</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>F</LANGUAGE>
    <REPORT_NAME>AP Intercompany Invoice Details</REPORT_NAME>
    <DESCRIPTION>Détails de la facture interentreprises AP
</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>I</LANGUAGE>
    <REPORT_NAME>AP Intercompany Invoice Details</REPORT_NAME>
    <DESCRIPTION>Dettagli fattura intercompany AP
</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>JA</LANGUAGE>
    <REPORT_NAME>AP Intercompany Invoice Details</REPORT_NAME>
    <DESCRIPTION>AP社間請求書の詳細
</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>KO</LANGUAGE>
    <REPORT_NAME>AP Intercompany Invoice Details</REPORT_NAME>
    <DESCRIPTION>AP 내부 거래 송장 세부 정보
</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>PTB</LANGUAGE>
    <REPORT_NAME>AP Intercompany Invoice Details</REPORT_NAME>
    <DESCRIPTION>Detalhes da Nota Fiscal Intercompanhia AP
</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>RU</LANGUAGE>
    <REPORT_NAME>AP Intercompany Invoice Details</REPORT_NAME>
    <DESCRIPTION>AP Детали счета компании
</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>S</LANGUAGE>
    <REPORT_NAME>AP Intercompany Invoice Details</REPORT_NAME>
    <DESCRIPTION>AP Intercompany fakturauppgifter
</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>TR</LANGUAGE>
    <REPORT_NAME>AP Intercompany Invoice Details</REPORT_NAME>
    <DESCRIPTION>AP Şirketler Arası Fatura Detayları
</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>AP Intercompany Invoice Details</REPORT_NAME>
    <DESCRIPTION>AP Intercompany Invoice Details


When India Localization is installed, the following GST columns are also included: CGST Amount, SGST Amount, IGST Amount, Custom Amount, Unclassified Tax Amount, Taxable Value, HSN SAC Code, CGST Rate, SGST Rate, IGST Rate, GST Supplier Registration No, GST Registration No, GST PAN No, GST TAN No.</DESCRIPTION>
    <REQUIRED_PARAMETERS_MESSAGE>You must select a Ledger and/or Operating Unit</REQUIRED_PARAMETERS_MESSAGE>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>ZHS</LANGUAGE>
    <REPORT_NAME>AP Intercompany Invoice Details</REPORT_NAME>
    <DESCRIPTION>AP公司间发票详情
</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>Enginatics</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
   <ANCHORS_ROW>
    <ANCHOR>&amp;il_from</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;il_tax_columns_inner_amt</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;il_tax_columns_inner_rate</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;il_tax_columns_inner_tp</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;il_where</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>1=1</ANCHOR>
   </ANCHORS_ROW>
  </ANCHORS>
  <PARAMETERS>
   <PARAMETERS_ROW>
    <SORT_ORDER>1</SORT_ORDER>
    <DISPLAY_SEQUENCE>-20</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>:India_Localization=:India_Localization</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Char</PARAMETER_TYPE_DSP>
    <MATCHING_VALUE>Y</MATCHING_VALUE>
    <DEFAULT_VALUE>xxen_util.jai_installed</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>India Localization</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>2</SORT_ORDER>
    <ANCHOR>&amp;il_from</ANCHOR>
    <SQL_TEXT>,(select jpr.party_id, jpr.party_site_id,
coalesce(max(case when jprl.regime_id in (select jr.regime_id from jai_regimes jr where jr.regime_type=&apos;T&apos;) and jprl.registration_type_code in (&apos;GST&apos;,&apos;GSTIN&apos;) then nvl(jprl.registration_number,jprl.secondary_registration_number) end),max(case when regexp_like(nvl(jprl.registration_number,jprl.secondary_registration_number),&apos;^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z][0-9A-Z]Z[0-9A-Z]$&apos;) and jprl.regime_id in (select jr.regime_id from jai_regimes jr where jr.regime_type=&apos;T&apos;) then nvl(jprl.registration_number,jprl.secondary_registration_number) end)) gstin,
max(decode(jprl.registration_type_code,&apos;PAN&apos;,jprl.registration_number)) pan_site,
max(decode(jprl.registration_type_code,&apos;TAN&apos;,jprl.registration_number)) tan_site,
max(decode(jprl.sec_registration_type_code,&apos;PAN&apos;,jprl.secondary_registration_number)) sec_pan_site,
max(decode(jprl.sec_registration_type_code,&apos;TAN&apos;,jprl.secondary_registration_number)) sec_tan_site
from jai_party_regs_v jpr, jai_party_reg_lines_v jprl
where jpr.party_reg_id=jprl.party_reg_id and jpr.party_type_code=&apos;THIRD_PARTY_SITE&apos; and jpr.supplier_flag=&apos;Y&apos;
and jprl.effective_from&lt;=sysdate and (jprl.effective_to is null or jprl.effective_to&gt;=sysdate)
group by jpr.party_id, jpr.party_site_id) il_reg_site
,(select jpr.party_id,
coalesce(max(case when jprl.regime_id in (select jr.regime_id from jai_regimes jr where jr.regime_type=&apos;T&apos;) and jprl.registration_type_code in (&apos;GST&apos;,&apos;GSTIN&apos;) then nvl(jprl.registration_number,jprl.secondary_registration_number) end),max(case when regexp_like(nvl(jprl.registration_number,jprl.secondary_registration_number),&apos;^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z][0-9A-Z]Z[0-9A-Z]$&apos;) and jprl.regime_id in (select jr.regime_id from jai_regimes jr where jr.regime_type=&apos;T&apos;) then nvl(jprl.registration_number,jprl.secondary_registration_number) end)) gstin_hdr,
max(decode(jprl.registration_type_code,&apos;PAN&apos;,jprl.registration_number)) pan_hdr,
max(decode(jprl.registration_type_code,&apos;TAN&apos;,jprl.registration_number)) tan_hdr,
max(decode(jprl.sec_registration_type_code,&apos;PAN&apos;,jprl.secondary_registration_number)) sec_pan_hdr,
max(decode(jprl.sec_registration_type_code,&apos;TAN&apos;,jprl.secondary_registration_number)) sec_tan_hdr
from jai_party_regs_v jpr, jai_party_reg_lines_v jprl
where jpr.party_reg_id=jprl.party_reg_id and jpr.party_type_code=&apos;THIRD_PARTY&apos; and jpr.supplier_flag=&apos;Y&apos;
and jprl.effective_from&lt;=sysdate and (jprl.effective_to is null or jprl.effective_to&gt;=sysdate)
group by jpr.party_id) il_reg_hdr
,(select
jtlv.trx_id,
sum(decode(jrav.reporting_code,&apos;CGST&apos;,jtlv.rounded_tax_amt_trx_curr)) cgst_amount,
sum(decode(jrav.reporting_code,&apos;SGST&apos;,jtlv.rounded_tax_amt_trx_curr)) sgst_amount,
sum(decode(jrav.reporting_code,&apos;IGST&apos;,jtlv.rounded_tax_amt_trx_curr)) igst_amount,
sum(decode(jrav.reporting_code,&apos;CESS&apos;,jtlv.rounded_tax_amt_trx_curr)) cess_amount,
max(decode(jrav.reporting_code,&apos;CGST&apos;,jtlv.tax_rate_code)) cgst_tax_rate,
max(decode(jrav.reporting_code,&apos;SGST&apos;,jtlv.tax_rate_code)) sgst_tax_rate,
max(decode(jrav.reporting_code,&apos;IGST&apos;,jtlv.tax_rate_code)) igst_tax_rate,
max(decode(jrav.reporting_code,&apos;CESS&apos;,jtlv.tax_rate_code)) cess_tax_rate,
sum(decode(jrav.reporting_code,&apos;CGST&apos;,jtlv.rec_tax_amt_trx_curr)) cgst_rec_amount,
sum(decode(jrav.reporting_code,&apos;CGST&apos;,jtlv.nrec_tax_amt_trx_curr)) cgst_nrec_amount,
sum(decode(jrav.reporting_code,&apos;SGST&apos;,jtlv.rec_tax_amt_trx_curr)) sgst_rec_amount,
sum(decode(jrav.reporting_code,&apos;SGST&apos;,jtlv.nrec_tax_amt_trx_curr)) sgst_nrec_amount,
sum(decode(jrav.reporting_code,&apos;IGST&apos;,jtlv.rec_tax_amt_trx_curr)) igst_rec_amount,
sum(decode(jrav.reporting_code,&apos;IGST&apos;,jtlv.nrec_tax_amt_trx_curr)) igst_nrec_amount,
max(jtlv.self_assessed_flag) reverse_charge_flag,
sum(decode(jrav.reporting_code,&apos;CUSTOM&apos;,jtlv.rounded_tax_amt_trx_curr)) custom_amount,
sum(decode(jrav.reporting_code,null,jtlv.rounded_tax_amt_trx_curr)) unclassified_amount,
sum(decode(jrav.reporting_code,&apos;CGST&apos;,jtlv.rounded_taxable_amt_trx_curr,&apos;IGST&apos;,jtlv.rounded_taxable_amt_trx_curr)) taxable_value,
max(jrc.reporting_code) hsn_sac_code
from
jai_tax_lines_v jtlv,
jai_reporting_associations_v jrav,
jai_tax_det_factors jtdf,
jai_reporting_codes jrc
where
jrav.entity_id(+)=jtlv.tax_type_id and
jrav.entity_code(+)=&apos;TAX_TYPE&apos; and
jrav.reporting_type_code(+)=&apos;TAX_TYPES_CLASSIFICATION&apos; and
jtlv.det_factor_id=jtdf.det_factor_id(+) and
jtdf.application_id(+)=200 and
nvl(jtdf.hsn_code_id,jtdf.sac_code_id)=jrc.reporting_code_id(+) and
jtlv.application_id=200
group by jtlv.trx_id
) il_tax</SQL_TEXT>
    <MATCHING_VALUE>Y</MATCHING_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>India Localization</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>3</SORT_ORDER>
    <ANCHOR>&amp;il_tax_columns_inner_amt</ANCHOR>
    <SQL_TEXT>,il_tax.cgst_amount &quot;CGST Amount&quot;,
il_tax.sgst_amount &quot;SGST Amount&quot;,
il_tax.igst_amount &quot;IGST Amount&quot;,
il_tax.custom_amount,
il_tax.unclassified_amount &quot;Unclassified Tax Amount&quot;,
il_tax.taxable_value,
il_tax.hsn_sac_code &quot;HSN SAC Code&quot;</SQL_TEXT>
    <MATCHING_VALUE>Y</MATCHING_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>India Localization</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>4</SORT_ORDER>
    <ANCHOR>&amp;il_tax_columns_inner_rate</ANCHOR>
    <SQL_TEXT>,il_tax.cgst_tax_rate &quot;CGST Rate&quot;,
il_tax.sgst_tax_rate &quot;SGST Rate&quot;,
il_tax.igst_tax_rate &quot;IGST Rate&quot;</SQL_TEXT>
    <MATCHING_VALUE>Y</MATCHING_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>India Localization</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>5</SORT_ORDER>
    <ANCHOR>&amp;il_tax_columns_inner_tp</ANCHOR>
    <SQL_TEXT>,nvl(il_reg_site.gstin,il_reg_hdr.gstin_hdr) &quot;GST Supplier Registration No&quot;,
nvl(il_reg_site.gstin,il_reg_hdr.gstin_hdr) &quot;GST Registration No&quot;,
nvl(il_reg_site.pan_site,nvl(il_reg_site.sec_pan_site,nvl(il_reg_hdr.pan_hdr,il_reg_hdr.sec_pan_hdr))) &quot;GST PAN No&quot;,
nvl(il_reg_site.tan_site,nvl(il_reg_site.sec_tan_site,nvl(il_reg_hdr.tan_hdr,il_reg_hdr.sec_tan_hdr))) &quot;GST TAN No&quot;</SQL_TEXT>
    <MATCHING_VALUE>Y</MATCHING_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>India Localization</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>6</SORT_ORDER>
    <ANCHOR>&amp;il_where</ANCHOR>
    <SQL_TEXT>
and aia.vendor_site_id=il_reg_site.party_site_id(+) and aia.vendor_id=il_reg_hdr.party_id(+) and aia.invoice_id=il_tax.trx_id(+)</SQL_TEXT>
    <MATCHING_VALUE>Y</MATCHING_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>India Localization</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>7</SORT_ORDER>
    <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>gl.name=:ledger and
hou.organization_id in (select mgoat.organization_id from mo_glob_org_access_tmp mgoat union select fnd_global.org_id from dual where fnd_release.major_version=11)</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>GL Ledger</LOV_NAME>
    <LOV_GUID>8E2FF36EDEB879D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
gl.name value,
fifsv.id_flex_structure_name||&apos;: &apos;||decode(gl.ledger_category_code,&apos;NONE&apos;,xxen_util.meaning(gl.object_type_code,&apos;LEDGERS&apos;,101),xxen_util.meaning(gl.ledger_category_code,&apos;GL_ASF_LEDGER_CATEGORY&apos;,101))||&apos;: &apos;||gl.description description
from
gl_ledgers gl,
fnd_id_flex_structures_vl fifsv
where
(:$flex$.ledger_category is null or gl.ledger_category_code=xxen_util.lookup_code(:$flex$.ledger_category,&apos;GL_ASF_LEDGER_CATEGORY&apos;,101,&apos;Y&apos;)) and
(:$flex$.chart_of_accounts is null or xxen_util.contains(:$flex$.chart_of_accounts,fifsv.id_flex_structure_name)=&apos;Y&apos;) and
gl.ledger_id in (select nvl(glsnav.ledger_id,gasna.ledger_id) from gl_access_set_norm_assign gasna, gl_ledger_set_norm_assign_v glsnav where gasna.access_set_id=fnd_profile.value(&apos;GL_ACCESS_SET_ID&apos;) and gasna.ledger_id=glsnav.ledger_set_id(+)) and
gl.chart_of_accounts_id=fifsv.id_flex_num and
fifsv.id_flex_code=&apos;GL#&apos; and
fifsv.application_id=101
order by
fifsv.id_flex_structure_name,
decode(gl.ledger_category_code,&apos;PRIMARY&apos;,1,&apos;SECONDARY&apos;,2,&apos;ALC&apos;,3,&apos;NONE&apos;,4),
gl.name</LOV_QUERY_DSP>
    <DEFAULT_VALUE>coalesce(xxen_util.previous_parameter_value(:parameter_id),xxen_util.default_ledger)</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Grand livre</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Ledger</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>8</SORT_ORDER>
    <DISPLAY_SEQUENCE>20</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>hou.name=:operating_unit</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>HR Operating Unit</LOV_NAME>
    <LOV_GUID>8E2FF36EDEB979D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
hou.name value,
null description
from
hr_operating_units hou
where
sysdate between hou.date_from and nvl(hou.date_to,sysdate) and
(:$flex$.ledger is null or hou.set_of_books_id in (select gl.ledger_id from gl_ledgers gl where xxen_util.contains(:$flex$.ledger,gl.name)=&apos;Y&apos;)) and
hou.organization_id in (select mgoat.organization_id from mo_glob_org_access_tmp mgoat union select fnd_global.org_id from dual where fnd_release.major_version=11)
order by
hou.name</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Unité d&apos;exploitation</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Operating Unit</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>9</SORT_ORDER>
    <DISPLAY_SEQUENCE>30</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>aps.vendor_name=:supplier_name</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>AP Supplier</LOV_NAME>
    <LOV_GUID>B9847D20A0E4742FE0538931640A6379</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <FILTER_BEFORE_DISPLAY_DSP>Y</FILTER_BEFORE_DISPLAY_DSP>
    <LOV_QUERY_DSP>select
aps.vendor_name value,
aps.segment1 description
from
ap_suppliers aps
where
(:$flex$.operating_unit is null or aps.vendor_id in (select assa.vendor_id from hr_all_organization_units_vl haouv, ap_supplier_sites_all assa where xxen_util.contains(:$flex$.operating_unit,haouv.name)=&apos;Y&apos; and haouv.organization_id=assa.org_id)) and
(:$flex$.organization_code is null or aps.vendor_id in (select assa.vendor_id from org_organization_definitions ood, ap_supplier_sites_all assa where xxen_util.contains(:$flex$.organization_code,ood.organization_code)=&apos;Y&apos; and ood.operating_unit=assa.org_id))
order by
aps.vendor_name,
aps.vendor_id</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Fournisseur</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Supplier</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>10</SORT_ORDER>
    <DISPLAY_SEQUENCE>40</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>aia.invoice_num=:invoice_number</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>AP Invoice Number</LOV_NAME>
    <LOV_GUID>8E2FF36EDF3079D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <FILTER_BEFORE_DISPLAY_DSP>Y</FILTER_BEFORE_DISPLAY_DSP>
    <LOV_QUERY_DSP>select
aia.invoice_num value,
aps.vendor_name||&apos; (&apos;||aia.invoice_date||&apos;)&apos; description
from
ap_invoices_all aia,
ap_suppliers aps
where
(:$flex$.operating_unit is null or aia.org_id in (select haouv.organization_id from hr_all_organization_units_vl haouv where xxen_util.contains(:$flex$.operating_unit,haouv.name)=&apos;Y&apos;)) and
(:$flex$.ledger is null or aia.set_of_books_id in (select gl.ledger_id from gl_ledgers gl where xxen_util.contains(:$flex$.ledger,gl.name)=&apos;Y&apos;)) and
aia.vendor_id=aps.vendor_id
order by
aia.invoice_date desc</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Numéro de facture</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Invoice Number</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>11</SORT_ORDER>
    <DISPLAY_SEQUENCE>50</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>aia.invoice_type_lookup_code=xxen_util.lookup_code(:invoice_type,&apos;INVOICE TYPE&apos;,200)</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>AP Invoice Type</LOV_NAME>
    <LOV_GUID>B20C1D394FC36EDDE0530100007F5621</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
flvv.meaning value,
flvv.description
from
fnd_lookup_values_vl flvv
where
flvv.lookup_type(+)=&apos;INVOICE TYPE&apos; and
flvv.view_application_id(+)=200 and
flvv.security_group_id(+)=0
order by
flvv.meaning</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Type de facture</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Invoice Type</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>12</SORT_ORDER>
    <DISPLAY_SEQUENCE>60</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>aia.invoice_date&gt;=:invoice_date_from</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Date de facturation de</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Invoice Date From</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>13</SORT_ORDER>
    <DISPLAY_SEQUENCE>70</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>aia.invoice_date&lt;:invoice_date_to+1</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>last_day(:$flex$.Invoice_Date_From)</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Date de facturation au</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Invoice Date To</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>14</SORT_ORDER>
    <DISPLAY_SEQUENCE>80</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>aida.accounting_date&gt;=:acc_date_from</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Date comptable du</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Accounting Date From</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>15</SORT_ORDER>
    <DISPLAY_SEQUENCE>90</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>aida.accounting_date&lt;:acc_date_to+1</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>last_day(:$flex$.Accounting_Date_From)</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Date de comptabilisation au</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Accounting Date To</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>16</SORT_ORDER>
    <DISPLAY_SEQUENCE>100</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>aia.cancelled_date is null</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>Yes_No</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
lookup_code id,
meaning value,
null description
from
fnd_lookups
where fnd_lookups.lookup_type=&apos;YES_NO&apos;
order by value,description</LOV_QUERY_DSP>
    <MATCHING_VALUE>Y</MATCHING_VALUE>
    <DEFAULT_VALUE>select &apos;Y&apos; from dual where :$flex$.invoice_number is null</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Exclure Annulé</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Exclude Cancelled</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
  </PARAMETERS>
  <TEMPLATES>
  </TEMPLATES>
  <DEFAULT_TEMPLATES>
  </DEFAULT_TEMPLATES>
  <UPLOAD_COLUMNS>
  </UPLOAD_COLUMNS>
  <UPLOAD_PARAMETERS>
  </UPLOAD_PARAMETERS>
  <UPLOAD_SQLS>
  </UPLOAD_SQLS>
 </REPORTS_ROW>
</REPORTS>
</ROOT>
