<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>
<LOVS>
<!-- loader xml for Enginatics Blitz Report lov: AP Supplier -->
 <LOVS_ROW>
  <GUID>B9847D20A0E4742FE0538931640A6379</GUID>
  <LOV_NAME>AP Supplier</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <FILTER_BEFORE_DISPLAY>Y</FILTER_BEFORE_DISPLAY>
  <LOV_QUERY>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>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
   </LOV_TRANSLATIONS_ROW>
  </LOV_TRANSLATIONS>
 </LOVS_ROW>
<!-- loader xml for Enginatics Blitz Report lov: GL Ledger / Set -->
 <LOVS_ROW>
  <GUID>8E2FF36EDE9279D2E0530100007F1FF2</GUID>
  <LOV_NAME>GL Ledger / Set</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <LOV_QUERY>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$.chart_of_accounts is null or xxen_util.contains(:$flex$.chart_of_accounts,fifsv.id_flex_structure_name)=&apos;Y&apos;) and
(:$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
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;NONE&apos;,1,&apos;PRIMARY&apos;,2,&apos;SECONDARY&apos;,3,&apos;ALC&apos;,4),
gl.name</LOV_QUERY>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>AR</LANGUAGE>
    <DESCRIPTION>جميع دفاتر الأستاذ ومجموعات دفتر الأستاذ</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>D</LANGUAGE>
    <DESCRIPTION>Alle Ledger und Ledger-Sets</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>E</LANGUAGE>
    <DESCRIPTION>Todos los libros de contabilidad y conjuntos de libros de contabilidad</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>F</LANGUAGE>
    <DESCRIPTION>Tous les grands livres et ensembles de grands livres</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>I</LANGUAGE>
    <DESCRIPTION>Tutti i registri e i set di registri</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>JA</LANGUAGE>
    <DESCRIPTION>すべての元帳と元帳セット</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>KO</LANGUAGE>
    <DESCRIPTION>모든 원장 및 원장 세트</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>PTB</LANGUAGE>
    <DESCRIPTION>Todos os livros contábeis e conjuntos de livros contábeis</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>RU</LANGUAGE>
    <DESCRIPTION>Все бухгалтерские книги и комплекты бухгалтерских книг</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>S</LANGUAGE>
    <DESCRIPTION>Alla reskontrar och reskontrasatser</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>TR</LANGUAGE>
    <DESCRIPTION>Tüm defterler ve defter setleri</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <DESCRIPTION>All ledgers and ledger sets</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>ZHS</LANGUAGE>
    <DESCRIPTION>所有分类账和分类账组</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
  </LOV_TRANSLATIONS>
 </LOVS_ROW>
<!-- loader xml for Enginatics Blitz Report lov: HR Organization Name -->
 <LOVS_ROW>
  <GUID>8E2FF36EDE9979D2E0530100007F1FF2</GUID>
  <LOV_NAME>HR Organization Name</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <LOV_QUERY>select
haouv.name value,
haouv0.name||&apos;: &apos;||
(select distinct
listagg(flvv.meaning,&apos;, &apos;) within group (order by flvv.meaning) over (partition by hoi.organization_id) classification
from
hr_organization_information hoi,
fnd_lookup_values_vl flvv
where
haouv.organization_id=hoi.organization_id and
hoi.org_information_context=&apos;CLASS&apos; and
hoi.org_information2=&apos;Y&apos; and
hoi.org_information1=flvv.lookup_code(+) and
flvv.lookup_type(+)=&apos;ORG_CLASS&apos; and
flvv.view_application_id(+)=3 and
flvv.security_group_id(+)=0
) description
from
hr_all_organization_units_vl haouv0,
hr_all_organization_units_vl haouv
where
haouv0.organization_id=haouv.business_group_id
order by
haouv.name</LOV_QUERY>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
   </LOV_TRANSLATIONS_ROW>
  </LOV_TRANSLATIONS>
 </LOVS_ROW>
</LOVS>
<REPORTS>
<!-- loader xml for Enginatics Blitz Report: RK: AP Invoices and Lines -->
 <REPORTS_ROW>
  <GUID>A978F7F5FBDC3D35E053B46B63584C8F</GUID>
  <SQL_TEXT>select
decode(xxen_util.meaning(aia.invoice_type_lookup_code,&apos;INVOICE TYPE&apos;,200),&apos;Standard&apos;,1,&apos;Credit Memo&apos;,3) &quot;DocumentType&quot;,
null &quot;SequencialNumberVK&quot;,
null &quot;SequencialNumberAK&quot;,
aia.invoice_date &quot;TransactionDate&quot;,
aia.invoice_num &quot;InvoiceNumber&quot;,
aia.invoice_num &quot;SupplierInvoiceNumber&quot;,
null &quot;LastInvoiceNumber&quot;,
null &quot;DocumentIndicator&quot;,
null &quot;OwnReference&quot;,
null &quot;ReferenceInvoiceNumber&quot;,
null &quot;ReferenceInvoiceDate&quot;,
null &quot;ReferenceTaxableBasis&quot;,
null &quot;ReferenceVAT&quot;,
null &quot;AutoFatturaNumber&quot;,
aia.invoice_date &quot;InvoiceDate&quot;,
aia.invoice_currency_code &quot;Currency&quot;,
aia.payment_currency_code &quot;Currency2&quot;,
null &quot;Currency3&quot;,
null &quot;DocumentCurrency&quot;,
null &quot;ExchangeRateDate&quot;,
null &quot;Discount&quot;,
null &quot;DateOfSupply&quot;,
null &quot;VATCode&quot;,
null &quot;VATCodeScheme&quot;,
null &quot;VATCodeDescription&quot;,
null &quot;CreditNoteOriginalDocument&quot;,
null &quot;CreditNoteReason&quot;,
null &quot;CreditNotePeriod&quot;,
null &quot;VATDate&quot;,
null &quot;InvoiceReceiptDate&quot;,
null &quot;IncomingPostingDate&quot;,
null &quot;OutsourcingPartyType&quot;,
null &quot;OutsourcingPartyName&quot;,
null &quot;OutsourcingPartyAddress&quot;,
null &quot;OutsourcingPartyVRN&quot;,
asu.segment1 &quot;SupplierID&quot;,
asu.vendor_name &quot;SupplierName&quot;,
asu.first_name &quot;SupplierPrivatePersonFirstName&quot;,
asu.last_name &quot;SupplierPrivatePersonLastName&quot;,
assa.address_line1 &quot;SupplierStreet&quot;,
assa.address_line2 &quot;SupplierHouseNumber&quot;,
assa.zip &quot;SupplierZip&quot;,
assa.city &quot;SupplierCity&quot;,
assa.country &quot;SupplierCountry&quot;,
assa.area_code||assa.phone &quot;SupplierTelephone&quot;,
assa.fax_area_code||assa.fax &quot;SupplierFax&quot;,
asu.vat_registration_num &quot;SupplierVATNumberUsed&quot;,
null &quot;SupplierCountryVATNumberUsed&quot;,
assa.vat_code &quot;SupplierVatNumberType&quot;,
null &quot;SupplierDeductionType&quot;,
null &quot;SupplierSpecialType&quot;,
null &quot;SupplierFiscalNumber&quot;,
null &quot;SupplierFiscalNumberIssuedBy&quot;,
null supplierfiscalrepresentativena,
null supplierfiscalrepresentativep1,
null supplierfiscalrepresentativep2,
null supplierfiscalrepresentativest,
null supplierfiscalrepresentativeho,
null supplierfiscalrepresentativezi,
null supplierfiscalrepresentativeci,
null supplierfiscalrepresentativeco,
null supplierfiscalrepresentativete,
null supplierfiscalrepresentativefa,
null supplierfiscalrepresentativeem,
null supplierfiscalrepresentativeva,
null supplierfiscalrepresentativeta,
assa.address_line1 supplierfixedestablishmentstre,
assa.address_line2 supplierfixedestablishmenthous,
assa.zip &quot;SupplierFixedEstablishmentZip&quot;,
assa.city &quot;SupplierFixedEstablishmentCity&quot;,
assa.country supplierfixedestablishmentcoun,
assa.phone supplierfixedestablishmenttele,
assa.fax &quot;SupplierFixedEstablishmentFax&quot;,
assa.email_address supplierfixedestablishmentemai,
null supplieridentifierpassportnumb,
null &quot;SupplierIdentifierIdCardNumber&quot;,
null supplieridentifierresidencycer,
null &quot;CustomerID&quot;,
null &quot;CustomerName&quot;, 
null &quot;CustomerPrivatePersonFirstName&quot;,
null &quot;CustomerPrivatePersonLastName&quot;,
null &quot;CustomerStreet&quot;,
null &quot;CustomerHouseNumber&quot;,
null &quot;CustomerZip&quot;,
null &quot;CustomerCity&quot;,
null &quot;CustomerCountry&quot;,
null &quot;CustomerTelephone&quot;,
null &quot;CustomerFax&quot;,
null &quot;CustomerVATNumberUsed&quot;,
null &quot;CustomerCountryVATNumberUsed&quot;,
null &quot;CustomerVatNumberType&quot;,
null &quot;CustomerDeductionType&quot;,
null &quot;CustomerSpecialType&quot;,
null &quot;CustomerFiscalNumber&quot;,
null &quot;CustomerFiscalNumberIssuedBy&quot;,
null customerfiscalrepresentativena,
null customerfiscalrepresentativep1,
null customerfiscalrepresentativep2,
null customerfiscalrepresentativest,
null customerfiscalrepresentativeho,
null customerfiscalrepresentativezi,
null customerfiscalrepresentativeci,
null customerfiscalrepresentativeco,
null customerfiscalrepresentativete,
null customerfiscalrepresentativefa,
null customerfiscalrepresentativeem,
null customerfiscalrepresentativeva,
null customerfiscalrepresentativeta,
null customerfixedestablishmentstre,
null customerfixedestablishmenthous,
null &quot;CustomerFixedEstablishmentZip&quot;,
null &quot;CustomerFixedEstablishmentCity&quot;,
null customerfixedestablishmentcoun,
null customerfixedestablishmenttele,
null &quot;CustomerFixedEstablishmentFax&quot;,
null customerfixedestablishmentemai,
null customeridentifierpassportnumb,
null &quot;CustomerIdentifierIdCardNumber&quot;,
null customeridentifierresidencycer,
aia.description &quot;Description&quot;,
null &quot;ExemptionReason&quot;,
null &quot;ItemClassification&quot;,
nvl(aia.invoice_amount,aia.base_amount) &quot;TaxableBasis&quot;,
aia.tax_amount &quot;ValueVAT&quot;,
null &quot;SalesVATDueReverseCharge&quot;,
aia.invoice_amount+aia.tax_amount &quot;TotalValueLine&quot;,
null &quot;AmountVATDeducted&quot;,
null &quot;AmountVATReverseCharged&quot;,
null &quot;TaxableBasisCurrency2&quot;,
null &quot;ValueVATCurrency2&quot;,
null salesvatduereversechargecurre2,
null &quot;TotalValueLineCurrency2&quot;,
null &quot;AmountVATDeductedCurrency2&quot;,
null amountvatreversechargedcurren2,
null &quot;TaxableBasisCurrency3&quot;,
null &quot;ValueVATCurrency3&quot;,
null salesvatduereversechargecurre3,
null &quot;TotalValueLineCurrency3&quot;,
null &quot;AmountVATDeductedCurrency3&quot;,
null amountvatreversechargedcurren3,
null &quot;OutOfVAT&quot;,
aila.quantity_invoiced &quot;Quantity&quot;,
aila.unit_meas_lookup_code &quot;Unit&quot;,
aila.inventory_item_id &quot;ItemIdentifier&quot;,
assa.country &quot;CountryDispatch&quot;,
assa.country &quot;CountryArrival&quot;,
null &quot;ShipToCity&quot;,
null &quot;ShipToZIP&quot;,
null &quot;ShipToStreet&quot;,
null &quot;ShipToStreetNumber&quot;,
null &quot;ShipFromCity&quot;,
null &quot;ShipFromZIP&quot;,
null &quot;ShipFromStreet&quot;,
null &quot;ShipFromStreetNumber&quot;,
null &quot;CountryOperation&quot;,
null &quot;Installation&quot;,
null &quot;Transporter&quot;,
null &quot;CountryEUImportation&quot;,
null &quot;EUImporter&quot;,
null &quot;DeliveryConditions&quot;,
null &quot;PlaceOfDelivery&quot;,
null &quot;Triangulation&quot;,
null &quot;AdditionalDocumentReference&quot;,
null &quot;ReportingType&quot;,
null &quot;TransactionType&quot;,
null &quot;AdditionalTransactionType&quot;,
null &quot;IntrastatCode&quot;,
null &quot;AdditionalIntrastatCode&quot;,
null &quot;ExtrastatCode&quot;,
null &quot;AdditionalDescription&quot;,
null &quot;Quantity1&quot;,
null &quot;Unit1&quot;,
null &quot;Quantity2&quot;,
null &quot;Unit2&quot;,
aia.invoice_amount+aia.tax_amount &quot;CommercialValue&quot;,
null &quot;StatisticalValue&quot;,
null &quot;CommercialValueCurrency2&quot;,
null &quot;StatisticalValueCurrency2&quot;,
null &quot;CommercialValueCurrency3&quot;,
null &quot;StatisticalValueCurrency3&quot;,
null &quot;ModeOfTransport&quot;,
null &quot;ItemType&quot;,
null &quot;RegionDispatch&quot;,
null &quot;HarbourDispatch&quot;,
null &quot;RegionArrival&quot;,
null &quot;HarbourArrival&quot;,
null &quot;CountryOrigin&quot;,
null &quot;ServiceCode&quot;,
null &quot;NationalityTransportVehicle&quot;,
null &quot;AccountNumber&quot;,
null &quot;CashRegisterNumber&quot;,
null &quot;AccountNumberTaxableBasis&quot;,
null &quot;AccountNumberVAT&quot;,
null &quot;AccountNumberDeductibleVAT&quot;,
null &quot;AccountNumberNonDeductibleVAT&quot;,
null &quot;AccountNumberReversedVAT&quot;,
null &quot;RefundNatureOfItem&quot;,
null &quot;RefundDescription&quot;,
null &quot;RefundDescriptionLanguage&quot;,
null &quot;ImportDocumentNumber&quot;,
null &quot;ImportReferenceInformation&quot;,
null &quot;ScannedDocumentFileName&quot;,
null &quot;ScannedDocumentFileDescription&quot;,
null &quot;ClearingDate&quot;,
null &quot;ClearingDocumentNumber&quot;,
null &quot;ClearingDocumentAmount&quot;,
null &quot;ClearingDocumentCurrency&quot;,
null clearingdocumentaccountinforma,
null &quot;ClearingDocumentPayementMethod&quot;,
null &quot;NationalityTransportMeans&quot;,
null &quot;CountryCustomsDeclaration&quot;,
null &quot;InternalModeOfTransport&quot;,
null &quot;EUCountryDispatch&quot;,
null &quot;EUCountryArrival&quot;,
null &quot;Container&quot;,
null &quot;EORINRPSI&quot;,
null &quot;EORINRPSIAgent&quot;,
null &quot;CustomsProcedureCode&quot;,
null &quot;PreferentialTreatment&quot;,
null &quot;StatisticalProcedure&quot;
/*----
decode(xxen_util.meaning(aia.invoice_type_lookup_code,&apos;INVOICE TYPE&apos;,200),&apos;Standard&apos;,1,&apos;Credit Memo&apos;,3) &quot;DocumentType&quot;,
asu.vendor_name supplier,
aia.invoice_num,
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,
aia.invoice_date,
apsa.due_date,
ceil(sysdate-apsa.due_date) days_due,
apsa.gross_amount,
asu.segment1 supplier_number,
asu.num_1099 taxpayer_id,
asu.vat_registration_num tax_registration_number,
asu.end_date_active inactive_on,
asu.customer_num,
xxen_util.meaning(asu.one_time_flag,&apos;YES_NO&apos;,0) one_time,
asu.credit_status_lookup_code,
asu.credit_limit,
asu.withholding_status_lookup_code,
asu.withholding_start_date,
asu.vat_code,
assa.vendor_site_id,
assa.vendor_site_code,
assa.vendor_site_code supplier_site,
assa.vendor_site_code_alt,
assa.address_line1,
assa.address_line2,
assa.address_line3,
assa.address_line4,
assa.city,
assa.state,
assa.zip,
assa.county,
assa.province,
assa.country,
assa.area_code,
assa.phone,
assa.fax_area_code,
assa.fax,
assa.supplier_notif_method,
assa.email_address,
assa.remittance_email,
aia.gl_date invoice_gl_date,
aia.source invoice_source,
xxen_util.meaning(aia.invoice_type_lookup_code,&apos;INVOICE TYPE&apos;,200) invoice_type,
aia.description invoice_description,
aia.invoice_currency_code,
aia.payment_currency_code,
aia.payment_cross_rate,
decode(aia.invoice_currency_code,gl.currency_code,aia.invoice_amount,aia.base_amount) invoice_amount_base_currency,
aia.amount_paid invoice_amount_paid,
nvl(apsa.amount_remaining,0)/nvl(aia.payment_cross_rate,1)*nvl(aia.exchange_rate,1) amount_remaining,
apsa.discount_date,
apsa.future_pay_due_date,
apsa.gross_amount,
apsa.hold_flag,
nvl(xxen_util.meaning(apsa.payment_method_code,&apos;PAYMENT METHOD&apos;,200),apsa.payment_method_code) payment_method,
xxen_util.meaning(aia.payment_status_flag,&apos;INVOICE PAYMENT STATUS&apos;,200) invoice_payment_status,
xxen_util.meaning(apsa.payment_status_flag,&apos;INVOICE PAYMENT STATUS&apos;,200) schedule_payment_status,
apsa.second_discount_date,
apsa.third_discount_date,
apsa.discount_amount_available,
apsa.second_disc_amt_available,
apsa.third_disc_amt_available,
apsa.discount_amount_remaining,
apsa.inv_curr_gross_amount,
nvl(aia.amount_paid,0)/decode(nvl(aia.payment_cross_rate,1),0,1,aia.payment_cross_rate)*aia.exchange_rate amount_paid_base,
nvl(aia.amount_applicable_to_discount,0)*aia.exchange_rate amt_applicable_to_disc_base,
nvl(aia.discount_amount_taken,0)/decode(nvl(aia.payment_cross_rate,1),0,1,aia.payment_cross_rate)*aia.exchange_rate discount_amount_taken_base,
nvl(aia.approved_amount,0)*aia.exchange_rate manual_approval_amount_base,
nvl(aia.payment_amount_total,0)*aia.exchange_rate payment_amount_total_base,
nvl(aia.tax_amount,0)*aia.exchange_rate tax_amount_base,
aia.discount_amount_taken,
aia.amount_applicable_to_discount,
aia.tax_amount,
aia.pay_curr_invoice_amount,
aia.payment_cross_rate_date,
at.name invoice_terms,
aia.terms_date,
aia.pay_group_lookup_code invoice_pay_group,
aia.accts_pay_code_combination_id,
xxen_util.concatenated_segments(aia.accts_pay_code_combination_id) account,
xxen_util.segments_description(aia.accts_pay_code_combination_id) account_descripton,
aia.base_amount invoice_base_amount,
aia.approved_amount,
xxen_util.meaning(aia.exclusive_payment_flag,&apos;YES_NO&apos;,0) invoice_exclusive_payment,
aia.cancelled_date invoice_cancelled_date,
aia.cancelled_amount invoice_cancelled_amount,
xxen_util.user_name(aia.cancelled_by) invoice_cancelled_by,
aia.temp_cancelled_amount invoice_temp_cancelled_amount,
aia.auto_tax_calc_flag,
aia.invoice_amount,
aia.amount_paid,
--   decode (aia.po_number,&apos;unmatched&apos;,null,&apos;any multiple&apos;,null,aia.po_number ) po_number,
gl.currency_code,
apsa.payment_num,
case when ceil(sysdate-apsa.due_date)=0 then nvl(apsa.amount_remaining,0)/nvl(aia.payment_cross_rate,1)*nvl(aia.exchange_rate,1) end current_bucket,
aila.line_number,
aila.line_type_lookup_code line_type,
replace(aila.description,&apos;~&apos;,&apos;-&apos;) line_description,
aila.amount line_amount,
aila.tax_classification_code,
aila.product_fisc_classification,
aila.user_defined_fisc_class,
aila.base_amount line_base_amount,
arpa.recurring_pay_num,
arpa.rec_pay_period_type,
arpa.num_of_periods,
arpa.description recurring_pmt_description,
aia.invoice_id*/
from
gl_ledgers gl,
hr_all_organization_units_vl haouv,
hr_all_organization_units_vl haouv1,
hr_all_organization_units_vl haouv2,
hr_all_organization_units_vl haouv3,
ap_invoices_all aia,
ap_payment_schedules_all apsa,
ap_suppliers asu,
ap_supplier_sites_all assa,
(select aila.* from ap_invoice_lines_all aila where &apos;Y&apos;=&apos;Y&apos;) aila,
(select aida.* from ap_invoice_distributions_all aida where &apos;&apos;=&apos;Y&apos;) aida,
ap_recurring_payments_all arpa,
ap_terms at,
pa_projects_all ppa,
pa_tasks pt
where
aia.payment_status_flag in (&apos;N&apos;,&apos;P&apos;) and
aia.cancelled_date is null and
1=1 and
aia.set_of_books_id=gl.ledger_id and
aia.org_id=haouv.organization_id(+) and
aia.expenditure_organization_id=haouv1.organization_id(+) and
aila.expenditure_organization_id=haouv2.organization_id(+) and
aida.expenditure_organization_id=haouv3.organization_id(+) and
aia.invoice_id=apsa.invoice_id and
nvl(apsa.amount_remaining,0)*nvl(aia.exchange_rate,1)!=0 and
aia.vendor_id=asu.vendor_id and
aia.vendor_site_id=assa.vendor_site_id and
aia.invoice_id=aila.invoice_id(+) and
aila.invoice_id=aida.invoice_id(+)and
aila.line_number=aida.invoice_line_number(+) and
aida.project_id=ppa.project_id(+)and
aida.task_id=pt.task_id(+)and
aia.recurring_payment_id=arpa.recurring_payment_id(+) and
aia.terms_id=at.term_id(+) and
aia.invoice_type_lookup_code in (&apos;STANDARD&apos;,&apos;CREDIT&apos;)</SQL_TEXT>
  <ENABLED>Y</ENABLED>
  <XDO_APPLICATION_SHORT_NAME>SQLAP</XDO_APPLICATION_SHORT_NAME>
  <COPIED_FROM_GUID>55DEB4D48B1D727FE0530100007F0ADE</COPIED_FROM_GUID>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>RK: AP Invoices and Lines</REPORT_NAME>
    <DESCRIPTION>Application: Payables
Source: Invoice Aging Report  and Invoice Detail Report
Check for Avalara</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>Draft</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
   <ANCHORS_ROW>
    <ANCHOR>1=1</ANCHOR>
   </ANCHORS_ROW>
  </ANCHORS>
  <PARAMETERS>
   <PARAMETERS_ROW>
    <SORT_ORDER>1</SORT_ORDER>
    <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>asu.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>US</LANGUAGE>
      <PARAMETER_NAME>Supplier</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>2</SORT_ORDER>
    <DISPLAY_SEQUENCE>30</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>US</LANGUAGE>
      <PARAMETER_NAME>Inv. Date From</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>3</SORT_ORDER>
    <DISPLAY_SEQUENCE>40</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>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Inv. Date To</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>4</SORT_ORDER>
    <DISPLAY_SEQUENCE>50</DISPLAY_SEQUENCE>
    <ANCHOR>&amp;enable_aida</ANCHOR>
    <SQL_TEXT>Y</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV custom</PARAMETER_TYPE_DSP>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select &apos;Headers&apos; value, &apos;Show Invoice Headers only&apos; description from dual union all
select &apos;Lines&apos; value, &apos;Show Invoice Headers Lines only&apos; description from dual union all
select &apos;Lines and Distributions&apos; value, &apos;Show Invoice Headers Lines and Distributions&apos; description from dual</LOV_QUERY_DSP>
    <MATCHING_VALUE>Lines and Distributions</MATCHING_VALUE>
    <DEFAULT_VALUE>Lines</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Display Level</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>5</SORT_ORDER>
    <ANCHOR>&amp;enable_aila</ANCHOR>
    <SQL_TEXT>Y</SQL_TEXT>
    <MATCHING_VALUE>Lines%</MATCHING_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Display Level</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>6</SORT_ORDER>
    <ANCHOR>&amp;invoice_detail_columns</ANCHOR>
    <SQL_TEXT>aila.line_number,
aila.line_type_lookup_code line_type,
replace(aila.description,&apos;~&apos;,&apos;-&apos;) line_description,
aila.amount line_amount,
aila.base_amount line_base_amount,</SQL_TEXT>
    <MATCHING_VALUE>Lines</MATCHING_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Display Level</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>7</SORT_ORDER>
    <ANCHOR>&amp;invoice_detail_columns</ANCHOR>
    <SQL_TEXT>aila.line_number,
aila.line_type_lookup_code line_type,
replace(aila.description,&apos;~&apos;,&apos;-&apos;) line_description,
aila.amount line_amount,
aila.base_amount line_base_amount,
aida.distribution_line_number,
aida.parent_reversal_id,
aida.dist_match_type,
aida.accounting_date dist_accounting_date,
aida.assets_addition_flag dist_assets_addition,
aida.distribution_line_number dist_line_number,
aida.dist_code_combination_id,
xxen_util.concatenated_segments(aida.dist_code_combination_id) expense_account,
aida.line_type_lookup_code dist_line_type,
aida.period_name,
aida.creation_date dist_creation_date,
aida.last_update_date dist_last_update_date,
aida.amount dist_amount,
nvl(aida.amount,aida.base_amount) original_amount,
aida.base_invoice_price_variance dist_base_inv_price_variance,
replace(aida.description,&apos;~&apos;,&apos;-&apos;) dist_description,
aida.invoice_price_variance dist_invoice_price_variance,
aida.match_status_flag dist_match_status,
aida.po_distribution_id,
aida.quantity_invoiced,
aida.unit_price,
aida.price_var_code_combination_id,
xxen_util.concatenated_segments(aida.price_var_code_combination_id) price_variance_account,
aida.expenditure_item_date pa_expenditure_item_date,
aida.expenditure_type pa_expenditure_type,
aida.expenditure_organization_id,
coalesce(haouv1.name,haouv3.name,haouv2.name) expenditure_organization,
aida.pa_addition_flag,
aida.project_accounting_context,
ppa.project_id,
pt.task_id,
ppa.segment1 project_number,
ppa.name project_name,
ppa.description project_description,
ppa.project_type,
ppa.project_status_code,
ppa.start_date project_start_date,
ppa.completion_date project_completion_date,
pt.task_number,
pt.task_name,
pt.description task_description,
pt.service_type_code,
pt.start_date task_start_date,
pt.completion_date task_completion_date,</SQL_TEXT>
    <MATCHING_VALUE>Lines and Distributions</MATCHING_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Display Level</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>8</SORT_ORDER>
    <DISPLAY_SEQUENCE>70</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>ceil(sysdate-apsa.due_date)&gt;:days_due</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Number</PARAMETER_TYPE_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Days Due</PARAMETER_NAME>
      <DESCRIPTION>Days Due (Greater than)</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>9</SORT_ORDER>
    <DISPLAY_SEQUENCE>80</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>gcc.segment2=:gl_account_segment</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Char</PARAMETER_TYPE_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Gl Account</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>10</SORT_ORDER>
    <DISPLAY_SEQUENCE>82</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>aia.payment_status_flag=xxen_util.lookup_code(:payment_status,&apos;INVOICE PAYMENT STATUS&apos;,200)</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV custom</PARAMETER_TYPE_DSP>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
flv.meaning value,
flv.description
from
fnd_lookup_values flv
where
flv.lookup_type(+)=&apos;INVOICE PAYMENT STATUS&apos; and
flv.view_application_id(+)=200 and
flv.language(+)=userenv(&apos;lang&apos;) and
flv.security_group_id(+)=0
order by
flv.lookup_code</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Payment Status</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>11</SORT_ORDER>
    <DISPLAY_SEQUENCE>85</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>aia.payment_status_flag in (&apos;N&apos;,&apos;P&apos;)</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>Y</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Open only</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>12</SORT_ORDER>
    <DISPLAY_SEQUENCE>90</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>Y</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Exclude Cancelled</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>13</SORT_ORDER>
    <DISPLAY_SEQUENCE>180</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>haouv.name=:org_name</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>HR Organization Name</LOV_NAME>
    <LOV_GUID>8E2FF36EDE9979D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
haouv.name value,
haouv0.name||&apos;: &apos;||
(select distinct
listagg(flvv.meaning,&apos;, &apos;) within group (order by flvv.meaning) over (partition by hoi.organization_id) classification
from
hr_organization_information hoi,
fnd_lookup_values_vl flvv
where
haouv.organization_id=hoi.organization_id and
hoi.org_information_context=&apos;CLASS&apos; and
hoi.org_information2=&apos;Y&apos; and
hoi.org_information1=flvv.lookup_code(+) and
flvv.lookup_type(+)=&apos;ORG_CLASS&apos; and
flvv.view_application_id(+)=3 and
flvv.security_group_id(+)=0
) description
from
hr_all_organization_units_vl haouv0,
hr_all_organization_units_vl haouv
where
haouv0.organization_id=haouv.business_group_id
order by
haouv.name</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Organization</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>14</SORT_ORDER>
    <DISPLAY_SEQUENCE>200</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>gl.name=:ledger</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>GL Ledger / Set</LOV_NAME>
    <LOV_GUID>8E2FF36EDE9279D2E0530100007F1FF2</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$.chart_of_accounts is null or xxen_util.contains(:$flex$.chart_of_accounts,fifsv.id_flex_structure_name)=&apos;Y&apos;) and
(:$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
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;NONE&apos;,1,&apos;PRIMARY&apos;,2,&apos;SECONDARY&apos;,3,&apos;ALC&apos;,4),
gl.name</LOV_QUERY_DSP>
    <DEFAULT_VALUE>select
gl.name
from
ar_system_parameters asp,
gl_ledgers gl
where
asp.set_of_books_id=gl.ledger_id</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Ledger</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
  </PARAMETERS>
  <PARAMETER_DEPENDENCIES>
  </PARAMETER_DEPENDENCIES>
  <TEMPLATES>
  </TEMPLATES>
  <DEFAULT_TEMPLATES>
  </DEFAULT_TEMPLATES>
  <UPLOAD_COLUMNS>
  </UPLOAD_COLUMNS>
  <UPLOAD_PARAMETERS>
  </UPLOAD_PARAMETERS>
  <UPLOAD_SQLS>
  </UPLOAD_SQLS>
  <UPLOAD_DEPENDENCIES>
  </UPLOAD_DEPENDENCIES>
 </REPORTS_ROW>
</REPORTS>
</ROOT>
