<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: AR Customers and Sites -->
 <REPORTS_ROW>
  <GUID>49A8B1A8038E08ACE0530100007FEB91</GUID><ENABLED>Y</ENABLED>
  <SQL_TEXT>with
&amp;cte_trx_count
&amp;cte_latest_trx
q_contacts as
(select
 hcar.cust_account_role_id,
 hcar.cust_account_id,
 hcar.cust_acct_site_id cust_acct_site_id,
 case when hcar.status=&apos;A&apos; AND hr.status=&apos;A&apos; then &apos;A&apos; else &apos;I&apos; end contact_status_code,
 hprel.primary_phone_contact_pt_id pri_phone_contact_point_id,
 hcp.contact_point_id sec_phone_contact_point_id,
 --
 xxen_util.meaning(hpsub.person_pre_name_adjunct,&apos;CONTACT_TITLE&apos;,222) contact_prefix,
 hpsub.person_first_name contact_first_name,
 hpsub.person_middle_name contact_middle_name,
 hpsub.person_last_name contact_last_name,
 hpsub.person_name_suffix contact_suffix,
 hpsub.person_title contact_title,
 case when hcar.status=&apos;A&apos; AND hr.status=&apos;A&apos; then &apos;A&apos; else &apos;I&apos; end status,
 xxen_util.meaning(case when hcar.status=&apos;A&apos; AND hr.status=&apos;A&apos; then &apos;A&apos; else &apos;I&apos; end,&apos;HZ_CPUI_REGISTRY_STATUS&apos;,222) contact_status,
 hprel.email_address contact_email,
 hprel.url contact_url,
 hprel.primary_phone_country_code contact_phone_country_code,
 hprel.primary_phone_area_code contact_phone_area_code,
 hprel.primary_phone_number contact_phone_number,
 hprel.primary_phone_extension contact_phone_extension,
 xxen_util.meaning(hprel.primary_phone_line_type,&apos;PHONE_LINE_TYPE&apos;,222) contact_phone_type,
 hcp.phone_country_code contact_sec_phone_country_code,
 hcp.phone_area_code contact_sec_area_code,
 hcp.phone_number contact_sec_phone_number,
 hcp.phone_extension contact_sec_phone_extension,
 xxen_util.meaning(hcp.phone_line_type,&apos;PHONE_LINE_TYPE&apos;,222) contact_sec_phone_type,
 xxen_util.meaning(hoc.job_title_code,&apos;RESPONSIBILITY&apos;,222) contact_job_title_code,
 hoc.job_title contact_job_title,
 hoc.contact_number,
 (select territory_short_name from fnd_territories_vl ftv where ftv.territory_code = hl.country) contact_country,
 hl.address1 contact_address_line1,
 hl.address2 contact_address_line2,
 hl.address3 contact_address_line3,
 hl.address4 contact_address_line4,
 hl.city contact_city,
 hl.county contact_county,
 hl.state contact_state,
 hl.postal_code contact_postal_code,
 hl.sales_tax_geocode contact_geography_override,
 hps.mailstop contact_mailstop,
 (select distinct listagg(xxen_util.meaning(hrr.responsibility_type,&apos;SITE_USE_CODE&apos;,222),&apos;, &apos;) within group (order by xxen_util.meaning(hrr.responsibility_type,&apos;SITE_USE_CODE&apos;,222)) from hz_role_responsibility hrr where hrr.cust_account_role_id = hcar.cust_account_role_id) contact_roles
 from
 hz_cust_account_roles hcar,
 hz_relationships hr,
 hz_parties hprel,
 hz_parties hpsub,
 hz_parties hpobj,
 hz_org_contacts hoc,
 hz_cust_accounts hca,
 hz_party_sites hps,
 hz_locations hl,
 (select
  hcp.contact_point_id,
  hcp.owner_table_id party_id,
  hcp.phone_country_code,
  hcp.phone_area_code,
  hcp.phone_number,
  hcp.phone_extension,
  hcp.phone_line_type,
  row_number() over (partition by hcp.owner_table_id order by hcp.last_update_date desc,hcp.contact_point_id desc) row_num
  from
  hz_contact_points hcp
  where
  hcp.owner_table_name=&apos;HZ_PARTIES&apos; and
  hcp.contact_point_type=&apos;PHONE&apos; and
  hcp.status=&apos;A&apos; and
  nvl(hcp.primary_flag,&apos;N&apos;)&lt;&gt;&apos;Y&apos;
 ) hcp
 where
 :show_contacts=&apos;Y&apos; and
 hcar.role_type=&apos;CONTACT&apos; and
 hcar.party_id=hr.party_id and
 hr.party_id=hprel.party_id and
 hr.subject_id=hpsub.party_id and
 hr.object_id=hpobj.party_id and
 hr.relationship_id=hoc.party_relationship_id and
 hcar.cust_account_id=hca.cust_account_id and
 hr.object_id=hca.party_id and
 hprel.party_id=hps.party_id(+) and
 nvl(hps.identifying_address_flag(+),&apos;Y&apos;)=&apos;Y&apos; and
 nvl(hps.status(+),&apos;A&apos;)=&apos;A&apos; and
 hps.location_id=hl.location_id(+) and
 hprel.party_id=hcp.party_id(+) and
 hcp.row_num(+)=1 and
 (hcar.status=&apos;A&apos; and hr.status=&apos;A&apos; or (hcar.status=&apos;I&apos; or hr.status=&apos;I&apos;) and hpsub.status=&apos;A&apos; and hpobj.status=&apos;A&apos; and hr.status&lt;&gt;&apos;M&apos;)
),
q_bank_accounts as
(select
 iepa.party_id                     party_id,
 iepa.cust_account_id              cust_account_id,
 iepa.acct_site_use_id             site_use_id,
 ipiua.instrument_payment_use_id,
 iepa.ext_payer_id,
 ieba.ext_bank_account_id          bank_account_id,
 cbbv.bank_name                    bank_name,
 cbbv.bank_number                  bank_number,
 (select ftv.territory_short_name
  from   fnd_territories_vl ftv
  where  ftv.territory_code=cbbv.bank_home_country
 )                                 bank_country,
 cbbv.bank_branch_name             bank_branch_name,
 cbbv.branch_number                bank_branch_number,
 cbbv.bank_branch_type             bank_branch_type,
 cbbv.eft_swift_code               bank_branch_bic,
 ieba.bank_account_name            bank_acct_name,
 ieba.bank_account_num             bank_acct_num,
 ieba.check_digits                 bank_acct_check_digits,
 ieba.currency_code                bank_acct_currency,
 xxen_util.meaning(ieba.foreign_payment_use_flag,&apos;YES_NO&apos;,0)  bank_acct_allow_foreign,
 ieba.iban                         bank_acct_iban,
 ieba.bank_account_name_alt        bank_acct_name_alt,
 ieba.account_suffix               bank_acct_suffix,
 xxen_util.meaning(ieba.bank_account_type,&apos;BANK_ACCOUNT_TYPE&apos;,260)
                                   bank_acct_type,
 ieba.secondary_account_reference  bank_acct_sec_reference,
 ieba.description                  bank_acct_description,
 ieba.contact_name                 bank_acct_contact,
 ieba.contact_phone                bank_acct_contact_phone,
 ieba.contact_fax                  bank_acct_contact_fax,
 ieba.contact_email                bank_acct_contact_email,
 ipiua.start_date                  bank_acct_assignmt_start_date,
 ipiua.end_date                    bank_acct_assignmt_end_date
 from
 iby_external_payers_all iepa,
 iby_pmt_instr_uses_all ipiua,
 iby_ext_bank_accounts ieba,
 ce_bank_branches_v cbbv
 where
 :show_bank_accts=&apos;Y&apos; and
 iepa.ext_payer_id=ipiua.ext_pmt_party_id and
 ipiua.instrument_id=ieba.ext_bank_account_id and
 ieba.branch_id=cbbv.branch_party_id and
 iepa.payment_function=&apos;CUSTOMER_PAYMENT&apos; and
 ipiua.payment_function=&apos;CUSTOMER_PAYMENT&apos; and
 ipiua.instrument_type=&apos;BANKACCOUNT&apos;
),
q_zx_registrations as
(
 select
 xxen_util.meaning(nvl2(hps.party_site_id,&apos;SITE&apos;,&apos;ACCOUNT&apos;),&apos;HZ_CONS_BILL_LEVEL&apos;,222) assign_level,
 nvl(hps.party_id,hp.party_id) party_id,
 hps.party_site_id,
 zr.*
 from
 zx_registrations zr,
 zx_party_tax_profile zptp,
 hz_parties hp,
 hz_party_sites hps
 where
 :show_tax_registrations=&apos;Y&apos; and
 decode(zptp.party_type_code,&apos;THIRD_PARTY&apos;,zptp.party_id,null)=hp.party_id(+) and
 decode(zptp.party_type_code,&apos;THIRD_PARTY_SITE&apos;,zptp.party_id,null)=hps.party_site_id(+) and
 zptp.party_tax_profile_id=zr.party_tax_profile_id
),
q_fc_assignments as
(
 select
 nvl(hps.party_id,hp.party_id) party_id,
 hps.party_site_id,
 hca.class_category,
 hca.class_code,
 xxen_util.meaning(hca.class_code,hca.class_category,222) class_name,
 hca.start_date_active,
 hca.end_date_active
 from
 hz_code_assignments hca,
 zx_party_tax_profile zptp,
 hz_parties hp,
 hz_party_sites hps,
 zx_fc_types_b zft
 where
 :show_fiscal_classifications=&apos;Y&apos; and
 hca.owner_table_name=&apos;ZX_PARTY_TAX_PROFILE&apos; and
 hca.owner_table_id=zptp.party_tax_profile_id and
 hca.class_category=zft.classification_type_code and
 decode(zptp.party_type_code,&apos;THIRD_PARTY&apos;,zptp.party_id,null)=hp.party_id(+) and
 decode(zptp.party_type_code,&apos;THIRD_PARTY_SITE&apos;,zptp.party_id,null)=hps.party_site_id(+)
)
--
-- Main query starts here
--
select /*+ push_pred(ctct) push_pred(ba) */
x.operating_unit,
x.party_type,
x.party_name,
x.alternate_name,
x.party_number,
x.party_tax_registration_number,
x.taxpayer_id,
x.url,
x.duns_number,
x.sic_code,
x.category,
x.account_number,
x.account_description,
x.reference,
x.site_reference,
x.site_use_reference,
x.account_type,
x.classification,
x.sales_channel,
x.primary_salesrep,
x.site_primary_salesrep,
x.order_type,
x.site_order_type,
x.price_list,
x.site_price_list,
x.location,
x.site_name,
x.site_number,
x.site_name address_description,
x.country,
x.address,
x.address1,
x.address2,
x.address3,
x.address4,
x.city,
x.county,
x.state,
x.province,
x.postal_code,
x.addressee,
x.site_phone_numbers,
x.site_emails,
x.site_urls,
x.identifying_address_flag,
x.edi_location,
x.site_use,
x.site_usage,
x.bill_location,
x.site_tax_registration_number,
x.primary_flag,
x.ship_partial,
&amp;column_trx_count
&amp;column_latest_trx
x.demand_class,
x.ship_sets,
x.party_status,
x.party_site_status,
x.account_status,
x.site_status,
x.site_use_status,
x.warehouse,
x.site_warehouse,
x.free_on_board,
x.site_free_on_board,
x.freight_term,
x.site_freight_term,
x.ship_method,
x.site_ship_method,
-- Accounts
x.receivables_account,
x.revenue_account,
x.tax_account,
x.freight_account,
x.clearing_account,
x.unbilled_rec_account,
x.unearned_rec_account,
x.receivables_account_desc,
x.revenue_account_desc,
x.tax_account_desc,
x.freight_account_desc,
x.clearing_account_desc,
x.unbilled_rec_account_desc,
x.unearned_rec_account_desc,
-- dff
&amp;dff_columns2
-- regional dffs
&amp;jg_dff_columns
-- Profile Class
x.profile_level,
x.profile_class,
x.site_profile_class,
x.credit_classification,
x.site_credit_classification,
x.credit_check,
x.site_credit_check,
x.credit_hold,
x.site_credit_hold,
x.account_profile_payment_term,
x.site_profile_payment_term,
x.site_use_payment_term,
x.send_statement,
x.site_send_statement,
x.statement_cycle,
x.site_statement_cycle,
x.send_credit_balance,
x.site_send_credit_balance,
x.send_dunning_letters,
x.site_send_dunning_letters,
x.dunning_letter,
x.site_dunning_letter,
x.collector_name,
x.site_collector_name,
x.credit_class_code,
x.site_credit_class_code,
-- profile amounts
hcpa.currency_code prof_amt_currency,
hcpa.overall_credit_limit credit_limit,
hcpa.trx_credit_limit order_credit_limit,
hcpa.auto_rec_min_receipt_amount min_receipt_amount,
hcpa.min_statement_amount,
hcpa.min_dunning_amount,
hcpa.min_dunning_invoice_amount,
-- tax profile
xxen_util.meaning(zptp1.process_for_applicability_flag,&apos;YES_NO&apos;,0) allow_tax_applicability,
xxen_util.meaning(zptp1.allow_offset_tax_flag,&apos;YES_NO&apos;,0) allow_offset_taxes,
xxen_util.meaning(zptp1.self_assess_flag,&apos;YES_NO&apos;,0) self_assessment,
xxen_util.meaning(nvl(zptp1.rounding_level_code,decode(x.tax_header_level_flag,&apos;Y&apos;,&apos;HEADER&apos;,&apos;N&apos;,&apos;LINE&apos;,null)),&apos;ZX_ROUNDING_LEVEL&apos;,0) tax_rounding_level,
xxen_util.meaning(nvl(zptp1.rounding_rule_code,x.tax_rounding_rule),&apos;ZX_ROUNDING_RULE&apos;,0) tax_rounding_rule,
xxen_util.meaning(zptp1.inclusive_tax_flag,&apos;YES_NO&apos;,0) inclusive_tax,
(select territory_short_name from fnd_territories_vl ftv where ftv.territory_code = zptp1.country_code) tax_reporting_country,
zptp1.registration_type_code tax_reporting_reg_type,
zptp1.rep_registration_number tax_reporting_reg_number,
xxen_util.meaning(zptp2.process_for_applicability_flag,&apos;YES_NO&apos;,0) site_allow_tax_applicability,
xxen_util.meaning(zptp2.allow_offset_tax_flag,&apos;YES_NO&apos;,0) site_allow_offset_taxes,
xxen_util.meaning(zptp2.self_assess_flag,&apos;YES_NO&apos;,0) site_self_assessment,
xxen_util.meaning(nvl(zptp2.rounding_level_code,decode(x.site_tax_header_level_flag,&apos;Y&apos;,&apos;HEADER&apos;,&apos;N&apos;,&apos;LINE&apos;,null)),&apos;ZX_ROUNDING_LEVEL&apos;,0) site_tax_rounding_level,
xxen_util.meaning(nvl(zptp2.rounding_rule_code,x.site_tax_rounding_rule),&apos;ZX_ROUNDING_RULE&apos;,0) site_tax_rounding_rule,
xxen_util.meaning(zptp1.inclusive_tax_flag,&apos;YES_NO&apos;,0) site_inclusive_tax,
(select territory_short_name from fnd_territories_vl ftv where ftv.territory_code = zptp2.country_code) site_tax_reporting_country,
zptp2.registration_type_code site_tax_reporting_reg_type,
zptp2.rep_registration_number site_tax_reporting_reg_number,
(select
 zocv.meaning
 from
 zx_output_classifications_v zocv
 where
 zocv.lookup_code = nvl(zptp2.tax_classification_code,x.site_tax_code) and
 zocv.org_id in (x.org_id,-99) and
 rownum &lt;= 1
) site_tax_classification,
&amp;show_fiscal_classification
-- Tax Registrations
zr.assign_level tax_reg_assign_level,
zr.tax_regime_code tax_reg_regime_code,
zr.tax tax_reg_tax,
zr.tax_jurisdiction_code tax_reg_jurisdiction_code,
zr.rep_party_tax_name tax_reg_company_reporting_name,
zr.registration_type_code tax_reg_type,
zr.registration_number tax_reg_number,
zr.registration_status_code tax_reg_status,
xxen_util.meaning(zr.default_registration_flag,&apos;YES_NO&apos;,0) tax_reg_default_flag,
(select hl2.location_Code || &apos;:&apos; || &apos; &apos; || hl2.address_Line_1 || &apos; &apos; || hl2.town_or_city || &apos; &apos; || hl2.region_1 from hr_locations hl2 where hl2.location_id = zr.legal_location_id) tax_reg_legal_address,
zr.registration_reason_code tax_reg_reason,
zr.registration_source_code tax_reg_source,
(select hp2.party_name from zx_party_tax_profile zptp, hz_parties hp2 where zptp.party_id = hp2.party_id and zptp.party_type_code =&apos;TAX_AUTHORITY&apos; and zptp.party_tax_profile_id = zr.tax_authority_id) tax_reg_issuing_authority,
zr.effective_from tax_reg_effective_from,
zr.effective_to tax_reg_effective_to,
xxen_util.meaning(zr.rounding_rule_code,&apos;ZX_ROUNDING_RULE&apos;,0) tax_reg_rounding_rule,
xxen_util.meaning(zr.inclusive_tax_flag,&apos;YES_NO&apos;,0) tax_reg_tax_inclusive,
xxen_util.meaning(zr.self_assess_flag,&apos;YES_NO&apos;,0) tax_reg_self_assessment,
-- Receipt Methods
nvl2(rcrm.receipt_method_id,xxen_util.meaning(nvl2(rcrm.site_use_id,&apos;SITE&apos;,&apos;ACCOUNT&apos;),&apos;HZ_CONS_BILL_LEVEL&apos;,222),null) receipt_method_assign_level,
arm.name receipt_method,
xxen_util.meaning(rcrm.primary_flag,&apos;YES_NO&apos;,0) receipt_method_primary_flag,
rcrm.start_date receipt_method_start,
rcrm.end_date receipt_method_end,
-- Bank Accounts
nvl2(ba.instrument_payment_use_id,xxen_util.meaning(nvl2(ba.site_use_id,&apos;SITE&apos;,&apos;ACCOUNT&apos;),&apos;HZ_CONS_BILL_LEVEL&apos;,222),null) bank_account_assign_level,
ba.bank_name,
ba.bank_number,
ba.bank_country,
ba.bank_branch_name,
ba.bank_branch_number,
ba.bank_branch_type,
ba.bank_branch_bic,
ba.bank_acct_name,
ba.bank_acct_num,
ba.bank_acct_check_digits,
ba.bank_acct_currency,
ba.bank_acct_iban,
ba.bank_acct_name_alt,
ba.bank_acct_suffix,
ba.bank_acct_type,
ba.bank_acct_sec_reference,
ba.bank_acct_description,
ba.bank_acct_contact,
ba.bank_acct_contact_phone,
ba.bank_acct_contact_fax,
ba.bank_acct_contact_email,
ba.bank_acct_assignmt_start_date,
ba.bank_acct_assignmt_end_date,
-- Debit Authorizations
ida.alternate_name debit_auth_alternate_name,
ida.priority debit_auth_priority,
xxen_util.meaning(ida.debit_auth_flag,&apos;YES_NO&apos;,0) debit_auth_payer_granted,
ida.authorization_reference_number debit_auth_unique_reference_id,
ida.creditor_le_name debit_auth_payee,
ida.creditor_identifier debit_auth_payee_identifier,
xxen_util.meaning(ida.payment_type_code,&apos;IBY_DEBIT_AUTH_TRXN_TYPE&apos;,0) debit_auth_type,
xxen_util.meaning(ida.debit_auth_frequency,&apos;IBY_DEBIT_AUTH_TRXN_TYPE&apos;,0) debit_auth_frequency,
nvl2(ida.debit_authorization_id,xxen_util.meaning(case when nvl(ida.debit_auth_end,sysdate+1) &gt; sysdate and nvl(ida.auth_cancel_date,sysdate+1) &gt; sysdate then &apos;A&apos; else &apos;I&apos; end,&apos;HZ_CPUI_REGISTRY_STATUS&apos;,222),null) debit_auth_status,
ida.debit_auth_method debit_auth_method,
ida.debit_auth_reference debit_auth_reference,
xxen_util.meaning(ida.pre_notification_required_flag,&apos;YES_NO&apos;,0) debit_auth_pre_notif_req,
ida.auth_sign_date debit_auth_signing_date,
ida.debit_auth_begin debit_auth_begin_date,
ida.debit_auth_end debit_auth_end_date,
ida.debit_auth_fnl_colltn_date debit_auth_final_collect_date,
ida.auth_cancel_date debit_auth_cancel_date,
ida.amendment_reason_code debit_auth_amendment_code,
xxen_util.meaning(ida.amendment_reason_code,&apos;IBY_DEBIT_AUTH_AMEND_REASON&apos;,0) debit_auth_amendment_reason,
ida.authorization_revision_number debit_auth_version,
ida.direct_debit_count debit_auth_trx_count,
-- Contacts
nvl2(ctct.cust_account_role_id,xxen_util.meaning(nvl2(ctct.cust_acct_site_id,&apos;SITE&apos;,&apos;ACCOUNT&apos;),&apos;HZ_CONS_BILL_LEVEL&apos;,222),null) contact_assign_level,
ctct.contact_prefix,
ctct.contact_first_name,
ctct.contact_middle_name,
ctct.contact_last_name,
ctct.contact_suffix,
ctct.contact_title,
ctct.contact_status,
ctct.contact_email,
ctct.contact_url,
ctct.contact_phone_country_code,
ctct.contact_phone_area_code,
ctct.contact_phone_number,
ctct.contact_phone_extension,
ctct.contact_phone_type,
ctct.contact_sec_phone_country_code,
ctct.contact_sec_area_code,
ctct.contact_sec_phone_number,
ctct.contact_sec_phone_extension,
ctct.contact_sec_phone_type,
ctct.contact_job_title_code,
ctct.contact_job_title,
ctct.contact_number,
ctct.contact_country,
ctct.contact_address_line1,
ctct.contact_address_line2,
ctct.contact_address_line3,
ctct.contact_address_line4,
ctct.contact_city,
ctct.contact_county,
ctct.contact_state,
ctct.contact_postal_code,
ctct.contact_geography_override,
ctct.contact_mailstop,
ctct.contact_roles,
&amp;il_reg_columns
-- audit
x.created_by,
x.creation_date,
x.last_updated_by,
x.last_update_date,
x.account_created_by,
x.account_creation_date,
x.account_last_updated_by,
x.account_last_update_date,
x.site_created_by,
x.site_creation_date,
x.site_last_updated_by,
x.site_last_update_date,
x.profile_created_by,
x.profile_creation_date,
x.profile_last_updated_by,
x.profile_last_update_date,
x.site_profile_created_by,
x.site_profile_creation_date,
x.site_profile_last_updated_by,
x.site_profile_last_update_date,
xxen_util.user_name(hcpa.created_by) profile_amt_created_by,
xxen_util.client_time(hcpa.creation_date) profile_amt_creation_date,
xxen_util.user_name(hcpa.last_updated_by) profile_amt_last_updated_by,
xxen_util.client_time(hcpa.last_update_date) profile_amt_last_update_date,
x.org_id,
x.cust_account_profile_id,
x.site_cust_account_profile_id,
x.cust_account_id,
x.site_use_id
from
(
select
hou.name operating_unit,
initcap(hp.party_type) party_type,
hp.party_name,
hp.known_as alternate_name,
hp.party_number,
hp.url,
hp.duns_number_c duns_number,
decode(hp.party_type,&apos;ORGANIZATION&apos;,hp.sic_code) sic_code,
(select xxen_util.meaning(hcas.class_code,&apos;CUSTOMER_CATEGORY&apos;,222) from hz_code_assignments hcas where hcas.owner_table_name=&apos;HZ_PARTIES&apos; and hcas.class_category=&apos;CUSTOMER_CATEGORY&apos; and hcas.primary_flag=&apos;Y&apos; and hcas.owner_table_id = hp.party_id and rownum &lt;= 1) category,
hca.account_number,
hca.account_name account_description,
hca.orig_system_reference reference,
hcasa.orig_system_reference site_reference,
hcsua.orig_system_reference site_use_reference,
decode(hca.customer_type,&apos;R&apos;,&apos;External&apos;,&apos;I&apos;,&apos;Internal&apos;) account_type,
xxen_util.meaning(hca.customer_class_code,&apos;CUSTOMER CLASS&apos;,222) classification,
xxen_util.meaning(hca.sales_channel_code,&apos;SALES_CHANNEL&apos;,660) sales_channel,
(select
 nvl(jrret.resource_name,jrs.name)
 from
 jtf_rs_salesreps jrs,
 jtf_rs_resource_extns_tl jrret
 where
 jrs.resource_id=jrret.resource_id and
 hca.primary_salesrep_id=jrs.salesrep_id and
 hcsua.org_id=jrs.org_id and
 jrret.language=userenv(&apos;lang&apos;) and
 jrret.category in (&apos;EMPLOYEE&apos;,&apos;OTHER&apos;,&apos;PARTY&apos;,&apos;PARTNER&apos;,&apos;SUPPLIER_CONTACT&apos;) and
 rownum &lt;= 1
) primary_salesrep,
(select
 nvl(jrret.resource_name,jrs.name)
 from
 jtf_rs_salesreps jrs,
 jtf_rs_resource_extns_tl jrret
 where
 jrs.resource_id=jrret.resource_id and
 hcsua.primary_salesrep_id=jrs.salesrep_id and
 hcsua.org_id=jrs.org_id and
 jrret.language=userenv(&apos;lang&apos;) and
 jrret.category in (&apos;EMPLOYEE&apos;,&apos;OTHER&apos;,&apos;PARTY&apos;,&apos;PARTNER&apos;,&apos;SUPPLIER_CONTACT&apos;)
) site_primary_salesrep,
(select ottt.name from oe_transaction_types_tl ottt where hca.order_type_id=ottt.transaction_type_id and ottt.language = userenv(&apos;lang&apos;)) order_type,
(select ottt.name from oe_transaction_types_tl ottt where hcsua.order_type_id=ottt.transaction_type_id and ottt.language = userenv(&apos;lang&apos;)) site_order_type,
(select qlht.name from qp_list_headers_tl qlht where hca.price_list_id=qlht.list_header_id and qlht.language=userenv(&apos;lang&apos;)) price_list,
(select qlht.name from qp_list_headers_tl qlht where hcsua.price_list_id=qlht.list_header_id and qlht.language=userenv(&apos;lang&apos;)) site_price_list,
hcsua.location,
hps.party_site_name site_name,
hps.party_site_number site_number,
ftt.territory_short_name country,
hz_format_pub.format_address (hps.location_id,null,null,&apos; , &apos;) address,
hl.address1,
hl.address2,
hl.address3,
hl.address4,
hl.city,
hl.county,
hl.state,
hl.province,
hl.postal_code,
hps.addressee,
hcps.site_phone_numbers,
hcps.site_emails,
hcps.site_urls,
xxen_util.yes(hps.identifying_address_flag) identifying_address_flag,
hcasa.ece_tp_location_code edi_location,
xxen_util.meaning(hcsua.site_use_code,&apos;SITE_USE_CODE&apos;,222) site_use,
(select listagg(xxen_util.meaning(hcsua2.site_use_code,&apos;SITE_USE_CODE&apos;,222),&apos;, &apos;) within group (order by xxen_util.meaning(hcsua2.site_use_code,&apos;SITE_USE_CODE&apos;,222)) from hz_cust_site_uses_all hcsua2 where hcsua2.cust_acct_site_id=hcasa.cust_acct_site_id and hcsua2.status=&apos;A&apos;) site_usage,
(select hcsua2.location from hz_cust_site_uses_all hcsua2 where hcsua2.site_use_id=hcsua.bill_to_site_use_id) bill_location,
xxen_util.meaning(hcsua.primary_flag,&apos;YES_NO&apos;,0) primary_flag,
xxen_util.meaning(hcsua.ship_partial,&apos;YES_NO&apos;,0) ship_partial,
hp.jgzz_fiscal_code taxpayer_id,
hp.tax_reference party_tax_registration_number,
hcsua.tax_reference site_tax_registration_number,
hca.tax_code tax_code,
hcsua.tax_code site_tax_code,
hca.tax_header_level_flag,
hca.tax_rounding_rule,
hcsua.tax_header_level_flag site_tax_header_level_flag,
hcsua.tax_rounding_rule site_tax_rounding_rule,
xxen_util.meaning(hcsua.demand_class_code,&apos;DEMAND_CLASS&apos;,3) demand_class,
xxen_util.meaning(hcsua.ship_sets_include_lines_flag,&apos;YES_NO&apos;,0) ship_sets,
decode(hp.status,&apos;A&apos;,&apos;Active&apos;,&apos;I&apos;,&apos;Inactive&apos;,&apos;D&apos;,&apos;Deleted&apos;) party_status,
decode(hps.status,&apos;A&apos;,&apos;Active&apos;,&apos;I&apos;,&apos;Inactive&apos;,&apos;D&apos;,&apos;Deleted&apos;) party_site_status,
decode(hca.status,&apos;A&apos;,&apos;Active&apos;,&apos;I&apos;,&apos;Inactive&apos;,&apos;D&apos;,&apos;Deleted&apos;) account_status,
decode(hcasa.status,&apos;A&apos;,&apos;Active&apos;,&apos;I&apos;,&apos;Inactive&apos;,&apos;D&apos;,&apos;Deleted&apos;) site_status,
decode(hcsua.status,&apos;A&apos;,&apos;Active&apos;,&apos;I&apos;,&apos;Inactive&apos;,&apos;D&apos;,&apos;Deleted&apos;) site_use_status,
haouv1.name warehouse,
haouv2.name site_warehouse,
xxen_util.meaning(hca.fob_point,&apos;FOB&apos;,222) free_on_board,
xxen_util.meaning(hcsua.fob_point,&apos;FOB&apos;,222) site_free_on_board,
xxen_util.meaning(hca.freight_term,&apos;FREIGHT_TERMS&apos;,660) freight_term,
xxen_util.meaning(hcsua.freight_term,&apos;FREIGHT_TERMS&apos;,660) site_freight_term,
xxen_util.meaning(hca.ship_via,&apos;SHIP_METHOD&apos;,3) ship_method,
xxen_util.meaning(hcsua.ship_via,&apos;SHIP_METHOD&apos;,3) site_ship_method,
-- Accounts
case when hcsua.site_use_code = &apos;BILL_TO&apos; and hcsua.gl_id_rec is not null then xxen_util.concatenated_segments(hcsua.gl_id_rec) end receivables_account,
case when hcsua.site_use_code = &apos;BILL_TO&apos; and hcsua.gl_id_rev is not null then xxen_util.concatenated_segments(hcsua.gl_id_rev) end revenue_account,
case when hcsua.site_use_code = &apos;BILL_TO&apos; and hcsua.gl_id_tax is not null then xxen_util.concatenated_segments(hcsua.gl_id_tax) end tax_account,
case when hcsua.site_use_code = &apos;BILL_TO&apos; and hcsua.gl_id_freight is not null then xxen_util.concatenated_segments(hcsua.gl_id_freight) end freight_account,
case when hcsua.site_use_code = &apos;BILL_TO&apos; and hcsua.gl_id_clearing is not null then xxen_util.concatenated_segments(hcsua.gl_id_clearing) end clearing_account,
case when hcsua.site_use_code = &apos;BILL_TO&apos; and hcsua.gl_id_unbilled is not null then xxen_util.concatenated_segments(hcsua.gl_id_unbilled) end unbilled_rec_account,
case when hcsua.site_use_code = &apos;BILL_TO&apos; and hcsua.gl_id_unearned is not null then xxen_util.concatenated_segments(hcsua.gl_id_unearned) end unearned_rec_account,
case when hcsua.site_use_code = &apos;BILL_TO&apos; and hcsua.gl_id_rec is not null then xxen_util.segments_description(hcsua.gl_id_rec,gsob.chart_of_accounts_id,101,&apos;GL#&apos;) end receivables_account_desc,
case when hcsua.site_use_code = &apos;BILL_TO&apos; and hcsua.gl_id_rev is not null then xxen_util.segments_description(hcsua.gl_id_rev,gsob.chart_of_accounts_id,101,&apos;GL#&apos;) end revenue_account_desc,
case when hcsua.site_use_code = &apos;BILL_TO&apos; and hcsua.gl_id_tax is not null then xxen_util.segments_description(hcsua.gl_id_tax,gsob.chart_of_accounts_id,101,&apos;GL#&apos;) end tax_account_desc,
case when hcsua.site_use_code = &apos;BILL_TO&apos; and hcsua.gl_id_freight is not null then xxen_util.segments_description(hcsua.gl_id_freight,gsob.chart_of_accounts_id,101,&apos;GL#&apos;) end freight_account_desc,
case when hcsua.site_use_code = &apos;BILL_TO&apos; and hcsua.gl_id_clearing is not null then xxen_util.segments_description(hcsua.gl_id_clearing,gsob.chart_of_accounts_id,101,&apos;GL#&apos;) end clearing_account_desc,
case when hcsua.site_use_code = &apos;BILL_TO&apos; and hcsua.gl_id_unbilled is not null then xxen_util.segments_description(hcsua.gl_id_unbilled,gsob.chart_of_accounts_id,101,&apos;GL#&apos;) end unbilled_rec_account_desc,
case when hcsua.site_use_code = &apos;BILL_TO&apos; and hcsua.gl_id_unearned is not null then xxen_util.segments_description(hcsua.gl_id_unearned,gsob.chart_of_accounts_id,101,&apos;GL#&apos;) end unearned_rec_account_desc,
-- dff
&amp;dff_columns
-- Profile Class
xxen_util.meaning(nvl2(hcp2.cust_account_profile_id,&apos;SITE&apos;,nvl2(hcp1.cust_account_profile_id,&apos;ACCOUNT&apos;,null)),&apos;HZ_CONS_BILL_LEVEL&apos;,222) profile_level,
hcpc1.name profile_class,
hcpc2.name site_profile_class,
xxen_util.meaning(hcpc1.credit_classification,&apos;AR_CMGT_CREDIT_CLASSIFICATION&apos;,222) credit_classification,
xxen_util.meaning(hcpc2.credit_classification,&apos;AR_CMGT_CREDIT_CLASSIFICATION&apos;,222) site_credit_classification,
xxen_util.meaning(hcp1.credit_checking,&apos;YES_NO&apos;,0) credit_check,
xxen_util.meaning(hcp2.credit_checking,&apos;YES_NO&apos;,0) site_credit_check,
xxen_util.meaning(hcp1.credit_hold,&apos;YES_NO&apos;,0) credit_hold,
xxen_util.meaning(hcp2.credit_hold,&apos;YES_NO&apos;,0) site_credit_hold,
(select rtv.name from ra_terms_vl rtv where hcp1.standard_terms=rtv.term_id) account_profile_payment_term,
(select rtv.name from ra_terms_vl rtv where hcp2.standard_terms=rtv.term_id) site_profile_payment_term,
(select rtv.name from ra_terms_vl rtv where hcsua.payment_term_id=rtv.term_id) site_use_payment_term,
xxen_util.meaning(hcp1.send_statements,&apos;YES_NO&apos;,0) send_statement,
xxen_util.meaning(hcp2.send_statements,&apos;YES_NO&apos;,0) site_send_statement,
(select ascl.name from ar_statement_cycles ascl where hcp1.statement_cycle_id=ascl.statement_cycle_id) statement_cycle,
(select ascl.name from ar_statement_cycles ascl where hcp2.statement_cycle_id=ascl.statement_cycle_id) site_statement_cycle,
xxen_util.meaning(hcp1.credit_balance_statements,&apos;YES_NO&apos;,0) send_credit_balance,
xxen_util.meaning(hcp2.credit_balance_statements,&apos;YES_NO&apos;,0) site_send_credit_balance,
xxen_util.meaning(hcp1.dunning_letters,&apos;YES_NO&apos;,0) send_dunning_letters,
xxen_util.meaning(hcp2.dunning_letters,&apos;YES_NO&apos;,0) site_send_dunning_letters,
(select adls.name from ar_dunning_letter_sets adls where hcp1.dunning_letter_set_id=adls.dunning_letter_set_id) dunning_letter,
(select adls.name from ar_dunning_letter_sets adls where hcp2.dunning_letter_set_id=adls.dunning_letter_set_id) site_dunning_letter,
(select ac.name from ar_collectors ac where hcp1.collector_id=ac.collector_id) collector_name,
(select ac.name from ar_collectors ac where hcp2.collector_id=ac.collector_id) site_collector_name,
hcp1.credit_classification credit_class_code,
hcp2.credit_classification site_credit_class_code,
-- audit
xxen_util.user_name(hp.created_by) created_by,
xxen_util.client_time(hp.creation_date) creation_date,
xxen_util.user_name(hp.last_updated_by) last_updated_by,
xxen_util.client_time(hp.last_update_date) last_update_date,
xxen_util.user_name(hca.created_by) account_created_by,
xxen_util.client_time(hca.creation_date) account_creation_date,
xxen_util.user_name(hca.last_updated_by) account_last_updated_by,
xxen_util.client_time(hca.last_update_date) account_last_update_date,
xxen_util.user_name(hcasa.created_by) site_created_by,
xxen_util.client_time(hcasa.creation_date) site_creation_date,
xxen_util.user_name(hcasa.last_updated_by) site_last_updated_by,
xxen_util.client_time(hcasa.last_update_date) site_last_update_date,
xxen_util.user_name(hcp1.created_by) profile_created_by,
xxen_util.client_time(hcp1.creation_date) profile_creation_date,
xxen_util.user_name(hcp1.last_updated_by) profile_last_updated_by,
xxen_util.client_time(hcp1.last_update_date) profile_last_update_date,
xxen_util.user_name(hcp2.created_by) site_profile_created_by,
xxen_util.client_time(hcp2.creation_date) site_profile_creation_date,
xxen_util.user_name(hcp2.last_updated_by) site_profile_last_updated_by,
xxen_util.client_time(hcp2.last_update_date) site_profile_last_update_date,
nvl(hcsua.org_id,hcasa.org_id) org_id,
hcp1.cust_account_profile_id,
hcp2.cust_account_profile_id site_cust_account_profile_id,
nvl(hcp2.cust_account_profile_id,hcp1.cust_account_profile_id) prof_amt_profile_id,
hp.party_id,
hca.cust_account_id,
hcsua.site_use_id,
hou.set_of_books_id,
hcasa.cust_acct_site_id,
hps.party_site_id,
-- for the regional dffs
hp.global_attribute_category hp_global_att_cat,
hps.global_attribute_category hps_global_att_cat,
hca.global_attribute_category hca_global_att_cat,
hcasa.global_attribute_category hcasa_global_att_cat,
hcsua.global_attribute_category hcsua_global_att_cat,
hp.rowid hp_rowid,
hps.rowid hps_rowid,
hca.rowid hca_rowid,
hcasa.rowid hcasa_rowid,
hcsua.rowid hcsua_rowid
from
hr_operating_units hou,
gl_sets_of_books gsob,
hz_parties hp,
hz_cust_accounts hca,
(select hcasa.* from hz_cust_acct_sites_all hcasa where :detail_level in (&apos;Site&apos;,&apos;Site Use&apos;)) hcasa,
hz_party_sites hps,
hz_locations hl,
fnd_territories_tl ftt,
(select hcsua.* from hz_cust_site_uses_all hcsua where :detail_level=&apos;Site Use&apos;) hcsua,
(select hcp.* from hz_customer_profiles hcp where hcp.site_use_id is null) hcp1,
(select hcp.* from hz_customer_profiles hcp where hcp.site_use_id is not null and :detail_level=&apos;Site Use&apos;) hcp2,
hz_cust_profile_classes hcpc1,
hz_cust_profile_classes hcpc2,
hr_all_organization_units_vl haouv1,
hr_all_organization_units_vl haouv2,
(select 
hcp.owner_table_id party_site_id,
listagg(
decode(hcp.contact_point_type, &apos;PHONE&apos;,
nvl2(hcp.phone_country_code,&apos;+&apos;||hcp.phone_country_code||&apos; &apos;,null)||
nvl2(hcp.phone_area_code,&apos;(&apos;||hcp.phone_area_code||&apos;)&apos;,null)||
hcp.phone_number||&apos; &apos;||
&apos;(&apos;||xxen_util.meaning(hcp.phone_line_type,&apos;PHONE_LINE_TYPE&apos;,222)||&apos;)&apos;
,null)
,&apos;, &apos;) within group (order by hcp.primary_flag desc, hcp.creation_date desc) 
 as site_phone_numbers,
listagg(
decode(hcp.contact_point_type, &apos;EMAIL&apos;,
hcp.email_address
,null)
,&apos;, &apos;) within group (order by hcp.primary_flag desc, hcp.creation_date desc)
 as site_emails,
listagg(
decode(hcp.contact_point_type, &apos;WEB&apos;,
hcp.url
,null)
,&apos;, &apos;) within group (order by hcp.primary_flag desc, hcp.creation_date desc)
 as site_urls
from
  hz_contact_points hcp
where 
hcp.owner_table_name = &apos;HZ_PARTY_SITES&apos; and
:detail_level in (&apos;Site&apos;,&apos;Site Use&apos;)
group by hcp.owner_table_id
) hcps
where
1=1 and
(hcasa.org_id is null or hcasa.org_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)) and
hp.party_id=hca.party_id and
hca.cust_account_id=hcasa.cust_account_id(+) and
hcasa.org_id=hou.organization_id(+) and
to_number(hou.set_of_books_id)=gsob.set_of_books_id(+) and
hcasa.party_site_id=hps.party_site_id(+) and
hps.location_id=hl.location_id(+) and
hl.country=ftt.territory_code(+) and
ftt.language(+)=userenv(&apos;lang&apos;) and
hcasa.cust_acct_site_id=hcsua.cust_acct_site_id(+) and
hca.cust_account_id=hcp1.cust_account_id(+) and
nvl(hcp1.site_use_id(+),0)=0 and
hcsua.site_use_id=hcp2.site_use_id(+) and
hcp1.profile_class_id=hcpc1.profile_class_id(+) and
hcp2.profile_class_id=hcpc2.profile_class_id(+) and
hca.warehouse_id=haouv1.organization_id(+) and
hcsua.warehouse_id=haouv2.organization_id(+) and
hps.party_site_id=nvl(hcps.party_site_id(+),hps.party_site_id)
) x,
&amp;from_trx_count
&amp;from_latest_trx
hz_cust_profile_amts hcpa,
zx_party_tax_profile zptp1,
zx_party_tax_profile zptp2,
q_zx_registrations zr,
ra_cust_receipt_methods rcrm,
ar_receipt_methods arm,
q_bank_accounts ba,
iby_debit_authorizations ida,
q_contacts ctct,
q_fc_assignments fca
&amp;il_from
where
&amp;join_trx_count
&amp;join_latest_trx
x.party_id=zptp1.party_id(+) and
zptp1.party_type_code(+)=&apos;THIRD_PARTY&apos; and
x.party_site_id=zptp2.party_id(+) and
zptp2.party_type_code(+)=&apos;THIRD_PARTY_SITE&apos; and
nvl2(:show_tax_registrations,x.party_id,null)=zr.party_id(+) and
nvl(x.party_site_id,-99)=nvl(zr.party_site_id(+),nvl(x.party_site_id,-99)) and
(:show_tax_registrations=&apos;Y&apos; or zr.party_tax_profile_id is null or trunc(sysdate) between nvl(zr.effective_from,trunc(sysdate)) and nvl(zr.effective_to,trunc(sysdate))) and
--
nvl2(:show_fiscal_classifications,x.party_id,null)=fca.party_id(+) and
nvl(x.party_site_id,-99)=nvl(fca.party_site_id(+),nvl(x.party_site_id,-99)) and
--
nvl2(:show_profile_amts,x.prof_amt_profile_id,null)=hcpa.cust_account_profile_id(+) and
--
nvl2(:show_receipt_methods,x.cust_account_id,0)=rcrm.customer_id(+) and
nvl(x.site_use_id,-99)=nvl(rcrm.site_use_id(+),nvl(x.site_use_id,-99)) and
rcrm.receipt_method_id=arm.receipt_method_id(+) and
(:show_receipt_methods=&apos;Y&apos; or rcrm.receipt_method_id is null or trunc(sysdate) between nvl(rcrm.start_date,trunc(sysdate)) and nvl(rcrm.end_date,trunc(sysdate))) and
--
nvl2(:show_bank_accts,x.cust_account_id,null)=ba.cust_account_id(+) and
nvl(x.site_use_id,-99)=nvl(ba.site_use_id(+),nvl(x.site_use_id,-99)) and
(:show_bank_accts=&apos;Y&apos; or ba.instrument_payment_use_id is null or trunc(sysdate) between nvl(ba.bank_acct_assignmt_start_date,trunc(sysdate)) and nvl(ba.bank_acct_assignmt_end_date,trunc(sysdate))) and
nvl2(:show_debit_auth,ba.party_id,null)=ida.debtor_party_id(+) and
nvl2(:show_debit_auth,ba.bank_account_id,null)=ida.external_bank_account_id(+) and
(:show_debit_auth=&apos;Y&apos; or ida.debit_authorization_id is null or nvl(ida.debit_auth_end,sysdate+1)&gt;sysdate and nvl(ida.auth_cancel_date,sysdate+1)&gt;sysdate) and
--
nvl2(:show_contacts,x.cust_account_id,0)=ctct.cust_account_id(+) and
nvl(x.cust_acct_site_id,-99)=nvl(ctct.cust_acct_site_id(+),nvl(x.cust_acct_site_id,-99)) and
(:show_contacts=&apos;Y&apos; or ctct.cust_account_role_id is null or ctct.status=&apos;A&apos;) and
2=2
&amp;il_where
order by
x.party_name,
x.party_number,
x.account_number,
x.operating_unit,
x.country,
x.address,
x.site_use,
nvl2(zr.party_site_id,2,1),
nvl2(rcrm.site_use_id,2,1),
nvl2(ba.site_use_id,2,1),
ba.bank_name,
ba.bank_number,
ba.bank_branch_name,
ba.bank_branch_number,
ba.bank_acct_name,
ba.bank_acct_num,
ida.priority,
nvl2(ctct.cust_acct_site_id,2,1),
ctct.contact_last_name,
ctct.contact_first_name,
ctct.contact_prefix,
nvl2(zr.party_site_id,2,1)</SQL_TEXT>
  <VERSION_COMMENTS>Split the payment terms into Account Profile Payment Term, Site Profile Payment Term and Site Use Payment Term. Payment Term and Site Payment Term each merged the customer profile term with the site use Order Management term through an nvl fallback, so the same column reported a different field depending on whether a site level profile existed. The obsolete account level Order Management payment term is no longer reported.</VERSION_COMMENTS>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>AR</LANGUAGE>
    <REPORT_NAME>AR Customers and Sites</REPORT_NAME>
    <DESCRIPTION>Profile report of customer master data including address, sites, site uses, payment terms, Salesperson, price list and other profile information.</DESCRIPTION>
    <REQUIRED_PARAMETERS_MESSAGE>وحدة التشغيل إلزامية لمستويات استخدام الموقع والموقع</REQUIRED_PARAMETERS_MESSAGE>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>D</LANGUAGE>
    <REPORT_NAME>AR Customers and Sites</REPORT_NAME>
    <DESCRIPTION>Customer master data including address, profile information, sites and site uses</DESCRIPTION>
    <REQUIRED_PARAMETERS_MESSAGE>Bedieneinheit ist obligatorisch für die Ebenen Site und Site Use</REQUIRED_PARAMETERS_MESSAGE>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>E</LANGUAGE>
    <REPORT_NAME>AR Customers and Sites</REPORT_NAME>
    <DESCRIPTION>Profile report of customer master data including address, sites, site uses, payment terms, Salesperson, price list and other profile information.</DESCRIPTION>
    <REQUIRED_PARAMETERS_MESSAGE>La Unidad Operativa es obligatoria para los niveles de Sitio y Uso del Sitio</REQUIRED_PARAMETERS_MESSAGE>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>F</LANGUAGE>
    <REPORT_NAME>AR Customers and Sites</REPORT_NAME>
    <DESCRIPTION>Profile report of customer master data including address, sites, site uses, payment terms, Salesperson, price list and other profile information.</DESCRIPTION>
    <REQUIRED_PARAMETERS_MESSAGE>L&apos;unité opérationnelle est obligatoire pour les niveaux de site et d&apos;utilisation du site</REQUIRED_PARAMETERS_MESSAGE>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>I</LANGUAGE>
    <REPORT_NAME>AR Customers and Sites</REPORT_NAME>
    <DESCRIPTION>Profile report of customer master data including address, sites, site uses, payment terms, Salesperson, price list and other profile information.</DESCRIPTION>
    <REQUIRED_PARAMETERS_MESSAGE>L&apos;unità operativa è obbligatoria per i livelli Site e Site Use</REQUIRED_PARAMETERS_MESSAGE>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>JA</LANGUAGE>
    <REPORT_NAME>AR Customers and Sites</REPORT_NAME>
    <DESCRIPTION>Profile report of customer master data including address, sites, site uses, payment terms, Salesperson, price list and other profile information.</DESCRIPTION>
    <REQUIRED_PARAMETERS_MESSAGE>サイトおよびサイトユースレベルでは操作ユニットが必須</REQUIRED_PARAMETERS_MESSAGE>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>KO</LANGUAGE>
    <REPORT_NAME>AR Customers and Sites</REPORT_NAME>
    <DESCRIPTION>Profile report of customer master data including address, sites, site uses, payment terms, Salesperson, price list and other profile information.</DESCRIPTION>
    <REQUIRED_PARAMETERS_MESSAGE>운영 단위는 사이트 및 사이트 사용 수준에 필수입니다.</REQUIRED_PARAMETERS_MESSAGE>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>PTB</LANGUAGE>
    <REPORT_NAME>AR Customers and Sites</REPORT_NAME>
    <DESCRIPTION>Profile report of customer master data including address, sites, site uses, payment terms, Salesperson, price list and other profile information.</DESCRIPTION>
    <REQUIRED_PARAMETERS_MESSAGE>A Unidade Operacional é obrigatória para os níveis de Site e Site Use</REQUIRED_PARAMETERS_MESSAGE>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>RU</LANGUAGE>
    <REPORT_NAME>AR Customers and Sites</REPORT_NAME>
    <DESCRIPTION>Profile report of customer master data including address, sites, site uses, payment terms, Salesperson, price list and other profile information.</DESCRIPTION>
    <REQUIRED_PARAMETERS_MESSAGE>Эксплуатационный блок является обязательным для уровней &quot;Сайт&quot; и &quot;Сайт-пользователь&quot;.</REQUIRED_PARAMETERS_MESSAGE>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>S</LANGUAGE>
    <REPORT_NAME>AR Customers and Sites</REPORT_NAME>
    <DESCRIPTION>Profile report of customer master data including address, sites, site uses, payment terms, Salesperson, price list and other profile information.</DESCRIPTION>
    <REQUIRED_PARAMETERS_MESSAGE>Operationsenhet är obligatorisk för webbplats- och webbplatsanvändningsnivåer</REQUIRED_PARAMETERS_MESSAGE>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>TR</LANGUAGE>
    <REPORT_NAME>AR Customers and Sites</REPORT_NAME>
    <DESCRIPTION>Profile report of customer master data including address, sites, site uses, payment terms, Salesperson, price list and other profile information.</DESCRIPTION>
    <REQUIRED_PARAMETERS_MESSAGE>Site ve Site Kullanım seviyeleri için İşletim Birimi zorunludur</REQUIRED_PARAMETERS_MESSAGE>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>AR Customers and Sites</REPORT_NAME>
    <DESCRIPTION>Master data report of customer master data including address, sites, site uses, payment terms, Salesperson, price list and other profile information.

Payment terms are reported from each of their own sources: Account Profile Payment Term and Site Profile Payment Term from the customer profile at account and site level, and Site Use Payment Term from the site use Order Management terms.

When India Localization is installed, the following GST columns are also included: GST Registration No, GST PAN No.</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>ZHS</LANGUAGE>
    <REPORT_NAME>AR Customers and Sites</REPORT_NAME>
    <DESCRIPTION>Profile report of customer master data including address, sites, site uses, payment terms, Salesperson, price list and other profile information.</DESCRIPTION>
    <REQUIRED_PARAMETERS_MESSAGE>场地和场地使用级别必须有操作单位。</REQUIRED_PARAMETERS_MESSAGE>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>Enginatics</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>R12 only</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
   <ANCHORS_ROW>
    <ANCHOR>&amp;column_latest_trx</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;column_trx_count</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;cte_latest_trx</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;cte_trx_count</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;dff_columns</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;dff_columns2</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;from_latest_trx</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;from_trx_count</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;il_from</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;il_reg_columns</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;il_where</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;jg_dff_columns</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;join_latest_trx</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;join_trx_count</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;show_fiscal_classification</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>1=1</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>2=2</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:detail_level</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:show_bank_accts</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:show_contacts</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:show_debit_auth</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:show_fiscal_classifications</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:show_profile_amts</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:show_receipt_methods</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:show_tax_registrations</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_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.sec_registration_type_code,&apos;PAN&apos;,jprl.secondary_registration_number)) sec_pan_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.customer_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_site_id) il_reg_site
,(select coalesce(hca.party_id,jpr.party_id) 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.sec_registration_type_code,&apos;PAN&apos;,jprl.secondary_registration_number)) sec_pan_hdr
from jai_party_regs_v jpr, jai_party_reg_lines_v jprl, hz_cust_accounts hca
where jpr.party_reg_id=jprl.party_reg_id and jpr.party_type_code=&apos;THIRD_PARTY&apos; and jpr.customer_flag=&apos;Y&apos;
and jpr.party_id=hca.cust_account_id(+)
and jprl.effective_from&lt;=sysdate and (jprl.effective_to is null or jprl.effective_to&gt;=sysdate)
group by coalesce(hca.party_id,jpr.party_id)) il_reg_hdr</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_reg_columns</ANCHOR>
    <SQL_TEXT>nvl(il_reg_site.gstin,il_reg_hdr.gstin_hdr) &quot;GST Registration No&quot;,
nvl(il_reg_site.pan_site,coalesce(il_reg_site.sec_pan_site,il_reg_hdr.pan_hdr,il_reg_hdr.sec_pan_hdr)) &quot;GST PAN 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>4</SORT_ORDER>
    <ANCHOR>&amp;il_where</ANCHOR>
    <SQL_TEXT>
and nvl(x.cust_acct_site_id,-99)=il_reg_site.party_site_id(+) and x.party_id=il_reg_hdr.party_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>5</SORT_ORDER>
    <DISPLAY_SEQUENCE>-10</DISPLAY_SEQUENCE>
    <ANCHOR>&amp;jg_dff_columns</ANCHOR>
    <SQL_TEXT>select
y.text
from
(
select distinct
x.dff_seq,
x.title,
x.global_flag,
x.form_left_prompt,
case x.global_flag
when 1
then x.attr_text ||&apos; &quot;&apos;||substrb(x.prefix || x.form_left_prompt,1,xxen_report.max_column_length)||&apos;&quot;,&apos;
else &apos;decode(&apos;||x.context_column_name ||&apos;,&apos;||
     listagg(&apos;&apos;&apos;&apos;||x.descriptive_flex_context_code||&apos;&apos;&apos;,&apos;||x.attr_text,&apos;,&apos;)
     within group (order by x.global_flag,x.prefix,x.form_left_prompt)
     over (partition by x.application_id,x.application_table_name,x.title,x.global_flag,x.prefix,x.form_left_prompt) ||
     &apos;,null) &quot;&apos;||substrb(x.prefix || x.form_left_prompt,1,xxen_report.max_column_length)||&apos;&quot;,&apos;
end text
from
(
select
fdfv.application_id,
fdfv.application_table_name,
fdfv.title,
decode(fdfv.application_table_name,&apos;HZ_CUST_ACCT_SITES_ALL&apos;,4,&apos;HZ_CUST_ACCOUNTS&apos;,2,&apos;HZ_PARTIES&apos;,1,&apos;HZ_PARTY_SITES&apos;,3,&apos;HZ_CUST_SITE_USES_ALL&apos;,5) dff_seq,
decode(fdfv.application_table_name,&apos;HZ_CUST_ACCT_SITES_ALL&apos;,&apos;JG Site: &apos;,&apos;HZ_CUST_ACCOUNTS&apos;,&apos;JG Account: &apos;,&apos;HZ_PARTIES&apos;,&apos;JG Party: &apos;,&apos;HZ_PARTY_SITES&apos;,&apos;JG Address: &apos;,&apos;HZ_CUST_SITE_USES_ALL&apos;,&apos;JG Site Use: &apos;) prefix,
decode(fdfv.application_table_name,&apos;HZ_CUST_ACCT_SITES_ALL&apos;,&apos;x.hcasa_global_att_cat&apos;,&apos;HZ_CUST_ACCOUNTS&apos;,&apos;x.hca_global_att_cat&apos;,&apos;HZ_PARTIES&apos;,&apos;x.hp_global_att_cat&apos;,&apos;HZ_PARTY_SITES&apos;,&apos;x.hps_global_att_cat&apos;,&apos;HZ_CUST_SITE_USES_ALL&apos;,&apos;x.hcsua_global_att_cat&apos;) context_column_name,
decode(fdfc.descriptive_flex_context_code,&apos;Global Data Elements&apos;,1,2) global_flag,
fdfcuv.form_left_prompt,
fdfcuv.descriptive_flex_context_code,
fdfcuv.application_column_name,
fdfcuv.column_seq_num,
case when ffvs.validation_type in (&apos;D&apos;,&apos;I&apos;,&apos;X&apos;,&apos;Y&apos;,&apos;F&apos;)
then
&apos;(select
   case when instr(x.val,&apos;&apos;: &apos;&apos;,1,1) &gt; 0
   then substr(x.val,1,instr(x.val,&apos;&apos;: &apos;&apos;,1,1)-1)
   else x.val
   end
  from
  (select
   xxen_util.display_flexfield_value
   (p_application_id =&gt; &apos; || fdfv.application_id || &apos;
   ,p_descriptive_flexfield_name =&gt; &apos;&apos;&apos; || fdfv.descriptive_flexfield_name || &apos;&apos;&apos;
   ,p_context_code =&gt; &apos;&apos;&apos; || fdfcuv.descriptive_flex_context_code || &apos;&apos;&apos;
   ,p_column_name =&gt; &apos;&apos;&apos; || fdfcuv.application_column_name || &apos;&apos;&apos;
   ,p_rowid =&gt; &apos; || decode(fdfv.application_table_name,&apos;HZ_CUST_ACCT_SITES_ALL&apos;,&apos;x.hcasa_rowid&apos;,&apos;HZ_CUST_ACCOUNTS&apos;,&apos;x.hca_rowid&apos;,&apos;HZ_PARTIES&apos;,&apos;x.hp_rowid&apos;,&apos;HZ_PARTY_SITES&apos;,&apos;x.hps_rowid&apos;,&apos;HZ_CUST_SITE_USES_ALL&apos;,&apos;x.hcsua_rowid&apos;) || &apos;
   ) val
   from
   dual
  ) x
 )&apos;
else
&apos;xxen_util.display_flexfield_value
(p_application_id =&gt; &apos; || fdfv.application_id || &apos;
,p_descriptive_flexfield_name =&gt; &apos;&apos;&apos; || fdfv.descriptive_flexfield_name || &apos;&apos;&apos;
,p_context_code =&gt; &apos;&apos;&apos; || fdfcuv.descriptive_flex_context_code || &apos;&apos;&apos;
,p_column_name =&gt; &apos;&apos;&apos; || fdfcuv.application_column_name || &apos;&apos;&apos;
,p_rowid =&gt; &apos; || decode(fdfv.application_table_name,&apos;HZ_CUST_ACCT_SITES_ALL&apos;,&apos;x.hcasa_rowid&apos;,&apos;HZ_CUST_ACCOUNTS&apos;,&apos;x.hca_rowid&apos;,&apos;HZ_PARTIES&apos;,&apos;x.hp_rowid&apos;,&apos;HZ_PARTY_SITES&apos;,&apos;x.hps_rowid&apos;,&apos;HZ_CUST_SITE_USES_ALL&apos;,&apos;x.hcsua_rowid&apos;) || &apos;
)&apos;
end attr_text
from
fnd_descriptive_flexs_vl    fdfv,
fnd_descr_flex_contexts     fdfc,
fnd_descr_flex_col_usage_vl fdfcuv,
fnd_flex_value_sets         ffvs
where
fdfc.application_id=fdfv.application_id and
fdfc.descriptive_flexfield_name=fdfv.descriptive_flexfield_name and
fdfcuv.application_id=fdfc.application_id and
fdfcuv.descriptive_flexfield_name=fdfc.descriptive_flexfield_name and
fdfcuv.descriptive_flex_context_code=fdfc.descriptive_flex_context_code and
ffvs.flex_value_set_id(+)= fdfcuv.flex_value_set_id and
fdfv.application_id=7003 and
fdfv.application_table_name in
(&apos;HZ_CUST_ACCT_SITES_ALL&apos;
,&apos;HZ_CUST_ACCOUNTS&apos;
,&apos;HZ_PARTIES&apos;
,&apos;HZ_PARTY_SITES&apos;
,&apos;HZ_CUST_SITE_USES_ALL&apos;
) and
fdfcuv.application_column_name like &apos;GLOBAL_ATTRIBUTE%&apos; and
fdfc.enabled_flag=&apos;Y&apos; and
fdfcuv.enabled_flag=&apos;Y&apos; and
fdfcuv.display_flag=&apos;Y&apos;
) x
order by
x.dff_seq,
x.global_flag,
x.form_left_prompt
) y</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>Yes</LOV_NAME>
    <LOV_GUID>8E2FF36EDEA679D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select &apos;Y&apos; id, xxen_util.meaning(&apos;Y&apos;,&apos;YES_NO&apos;,0) value, null description from dual</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show Regional DFF Attributes</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>6</SORT_ORDER>
    <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>hou.name=:operating_unit</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV custom</PARAMETER_TYPE_DSP>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
hou.name value,
null description
from
hr_operating_units hou
where
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) and
:$flex$.level in (&apos;Site&apos;,&apos;Site Use&apos;)
order by
hou.name</LOV_QUERY_DSP>
    <DEFAULT_VALUE>coalesce(xxen_util.default_operating_unit,xxen_util.previous_parameter_value(:parameter_id))</DEFAULT_VALUE>
    <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>7</SORT_ORDER>
    <DISPLAY_SEQUENCE>20</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>upper(hp.party_name) like upper(:customer_name)</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>AR Customer Name</LOV_NAME>
    <LOV_GUID>8E2FF36EDE8679D2E0530100007F1FF2</LOV_GUID>
    <FILTER_BEFORE_DISPLAY_DSP>Y</FILTER_BEFORE_DISPLAY_DSP>
    <LOV_QUERY_DSP>select
hp.party_name value,
hca.account_number||&apos; (&apos;||initcap(hp.party_type)||&apos;)&apos;  description
from
hz_parties hp,
hz_cust_accounts hca
where
hp.party_id=hca.party_id and
hca.cust_account_id in (
select
hcasa.cust_account_id
from
hr_all_organization_units_vl haouv,
hz_cust_acct_sites_all hcasa
where
xxen_util.contains(:$flex$.operating_unit,haouv.name)=&apos;Y&apos; and
haouv.organization_id=hcasa.org_id
union all
select
hca2.cust_account_id
from
hz_cust_accounts hca2
where
:$flex$.operating_unit is null
)
order by
hp.party_name</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Nom du client</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Customer Name</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>8</SORT_ORDER>
    <DISPLAY_SEQUENCE>30</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>upper(hp.party_name) not like upper(:customer_name_not_like)</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>AR Customer Name</LOV_NAME>
    <LOV_GUID>8E2FF36EDE8679D2E0530100007F1FF2</LOV_GUID>
    <FILTER_BEFORE_DISPLAY_DSP>Y</FILTER_BEFORE_DISPLAY_DSP>
    <LOV_QUERY_DSP>select
hp.party_name value,
hca.account_number||&apos; (&apos;||initcap(hp.party_type)||&apos;)&apos;  description
from
hz_parties hp,
hz_cust_accounts hca
where
hp.party_id=hca.party_id and
hca.cust_account_id in (
select
hcasa.cust_account_id
from
hr_all_organization_units_vl haouv,
hz_cust_acct_sites_all hcasa
where
xxen_util.contains(:$flex$.operating_unit,haouv.name)=&apos;Y&apos; and
haouv.organization_id=hcasa.org_id
union all
select
hca2.cust_account_id
from
hz_cust_accounts hca2
where
:$flex$.operating_unit is null
)
order by
hp.party_name</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Nom du client pas comme</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Customer Name not like</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>9</SORT_ORDER>
    <DISPLAY_SEQUENCE>40</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>hca.account_number=:account_number</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>AR Account Number</LOV_NAME>
    <LOV_GUID>8E2FF36EDE7F79D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <FILTER_BEFORE_DISPLAY_DSP>Y</FILTER_BEFORE_DISPLAY_DSP>
    <LOV_QUERY_DSP>select
hca.account_number value,
hp.party_name||&apos; (&apos;||initcap(hp.party_type)||&apos;)&apos; description
from
hz_parties hp,
hz_cust_accounts hca
where
hp.party_id=hca.party_id and
hca.cust_account_id in (
select
hcasa.cust_account_id
from
hr_all_organization_units_vl haouv,
hz_cust_acct_sites_all hcasa
where
xxen_util.contains(:$flex$.operating_unit,haouv.name)=&apos;Y&apos; and
haouv.organization_id=hcasa.org_id
union all
select
hca2.cust_account_id
from
hz_cust_accounts hca2
where
:$flex$.operating_unit is null
)
order by
hp.party_name</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Numéro de compte</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Account Number</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>10</SORT_ORDER>
    <DISPLAY_SEQUENCE>50</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>hl.country in (select ftt.territory_code from fnd_territories_tl ftt where ftt.territory_short_name=:country and ftt.language=userenv(&apos;lang&apos;))</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>Country</LOV_NAME>
    <LOV_GUID>8E2FF36EDE8379D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
ftv.territory_short_name value,
ftv.territory_code||&apos;: &apos;||ftv.description description
from
fnd_territories_vl ftv
order by
ftv.territory_short_name</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Pays</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Country</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>11</SORT_ORDER>
    <DISPLAY_SEQUENCE>60</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>hps.identifying_address_flag=&apos;Y&apos;</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>Yes</LOV_NAME>
    <LOV_GUID>8E2FF36EDEA679D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select &apos;Y&apos; id, xxen_util.meaning(&apos;Y&apos;,&apos;YES_NO&apos;,0) value, null description from dual</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Afficher uniquement les adresses d&apos;identification</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show identifying Addresses only</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>12</SORT_ORDER>
    <DISPLAY_SEQUENCE>70</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>hp.status=&apos;A&apos; and
hca.status=&apos;A&apos; and
nvl(hcasa.status,&apos;A&apos;)=&apos;A&apos; and
nvl(hcsua.status,&apos;A&apos;)=&apos;A&apos;</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>Yes</LOV_NAME>
    <LOV_GUID>8E2FF36EDEA679D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select &apos;Y&apos; id, xxen_util.meaning(&apos;Y&apos;,&apos;YES_NO&apos;,0) value, null description from dual</LOV_QUERY_DSP>
    <DEFAULT_VALUE>Y</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Afficher uniquement les actifs</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show active only</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>13</SORT_ORDER>
    <DISPLAY_SEQUENCE>80</DISPLAY_SEQUENCE>
    <ANCHOR>:show_profile_amts</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>Yes</LOV_NAME>
    <LOV_GUID>8E2FF36EDEA679D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select &apos;Y&apos; id, xxen_util.meaning(&apos;Y&apos;,&apos;YES_NO&apos;,0) value, null description from dual</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show Profile Amounts</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>14</SORT_ORDER>
    <DISPLAY_SEQUENCE>90</DISPLAY_SEQUENCE>
    <ANCHOR>2=2</ANCHOR>
    <SQL_TEXT>(hcpa.cust_account_profile_id is null or hcpa.currency_code=:profile_amt_currency)</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>FND Currency</LOV_NAME>
    <LOV_GUID>8E2FF36EDE9079D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
fcv.currency_code value,
fcv.description
from
fnd_currencies_vl fcv
where
fcv.enabled_flag=&apos;Y&apos;
order by
fcv.currency_code</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Profile Amount Currency</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>15</SORT_ORDER>
    <DISPLAY_SEQUENCE>100</DISPLAY_SEQUENCE>
    <ANCHOR>:show_receipt_methods</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV custom</PARAMETER_TYPE_DSP>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
x.id,
x.value,
x.description
from
(
select &apos;A&apos; id, xxen_util.meaning(&apos;A&apos;,&apos;HZ_CPUI_REGISTRY_STATUS&apos;,222) value, null description from dual union
select &apos;Y&apos; id, xxen_util.meaning(&apos;Y&apos;,&apos;YES_NO&apos;,0) value, null description from dual
) x
order by
x.value</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show Receipt Methods</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>16</SORT_ORDER>
    <DISPLAY_SEQUENCE>110</DISPLAY_SEQUENCE>
    <ANCHOR>:show_bank_accts</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV custom</PARAMETER_TYPE_DSP>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
x.id,
x.value,
x.description
from
(
select &apos;A&apos; id, xxen_util.meaning(&apos;A&apos;,&apos;HZ_CPUI_REGISTRY_STATUS&apos;,222) value, null description from dual union
select &apos;Y&apos; id, xxen_util.meaning(&apos;Y&apos;,&apos;YES_NO&apos;,0) value, null description from dual
) x
order by
x.value</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show Bank Accounts</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>17</SORT_ORDER>
    <DISPLAY_SEQUENCE>120</DISPLAY_SEQUENCE>
    <ANCHOR>:show_debit_auth</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV custom</PARAMETER_TYPE_DSP>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
x.id,
x.value,
x.description
from
(
select &apos;A&apos; id, xxen_util.meaning(&apos;A&apos;,&apos;HZ_CPUI_REGISTRY_STATUS&apos;,222) value, null description from dual union
select &apos;Y&apos; id, xxen_util.meaning(&apos;Y&apos;,&apos;YES_NO&apos;,0) value, null description from dual
) x
where 
:$flex$.Show_Bank_Accounts is not null
order by
x.value</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show Debit Authorities</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>18</SORT_ORDER>
    <DISPLAY_SEQUENCE>130</DISPLAY_SEQUENCE>
    <ANCHOR>:show_contacts</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV custom</PARAMETER_TYPE_DSP>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
x.id,
x.value,
x.description
from
(
select &apos;A&apos; id, xxen_util.meaning(&apos;A&apos;,&apos;HZ_CPUI_REGISTRY_STATUS&apos;,222) value, null description from dual union
select &apos;Y&apos; id, xxen_util.meaning(&apos;Y&apos;,&apos;YES_NO&apos;,0) value, null description from dual
) x
order by
x.value</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show Contacts</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>19</SORT_ORDER>
    <DISPLAY_SEQUENCE>140</DISPLAY_SEQUENCE>
    <ANCHOR>:show_tax_registrations</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV custom</PARAMETER_TYPE_DSP>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
x.id,
x.value,
x.description
from
(
select &apos;A&apos; id, xxen_util.meaning(&apos;A&apos;,&apos;HZ_CPUI_REGISTRY_STATUS&apos;,222) value, null description from dual union
select &apos;Y&apos; id, xxen_util.meaning(&apos;Y&apos;,&apos;YES_NO&apos;,0) value, null description from dual
) x
order by
x.value</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show Tax Registrations</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>20</SORT_ORDER>
    <DISPLAY_SEQUENCE>150</DISPLAY_SEQUENCE>
    <ANCHOR>:show_fiscal_classifications</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>Yes</LOV_NAME>
    <LOV_GUID>8E2FF36EDEA679D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select &apos;Y&apos; id, xxen_util.meaning(&apos;Y&apos;,&apos;YES_NO&apos;,0) value, null description from dual</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show Fiscal Classifications</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>21</SORT_ORDER>
    <ANCHOR>&amp;show_fiscal_classification</ANCHOR>
    <SQL_TEXT>-- Fiscal Classifications 
fca.class_category fiscal_class_type_code,
fca.class_code fiscal_class_code,
fca.class_name fiscal_class_name,
fca.start_date_active fiscal_class_effective_from,
fca.end_date_active fiscal_class_effective_to,</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show Fiscal Classifications</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>22</SORT_ORDER>
    <DISPLAY_SEQUENCE>160</DISPLAY_SEQUENCE>
    <ANCHOR>&amp;column_trx_count</ANCHOR>
    <SQL_TEXT>nvl(tc.trx_cnt,0) trx_count,
nvl(tc.ship_only_trx_cnt,0) ship_to_only_trx_count,</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Number</PARAMETER_TYPE_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Afficher le nombre de trx dans les x jours</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show trx count within x days</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>23</SORT_ORDER>
    <ANCHOR>&amp;cte_trx_count</ANCHOR>
    <SQL_TEXT>q_trx_count as (
select
y.cust_key,
case when grouping(y.grain_key)=1 then decode(:detail_level,&apos;Site Use&apos;,&apos;A&apos;,&apos;-&apos;) else y.grain_key end join_key,
count(distinct case when y.role&lt;3 then y.trx_id end) trx_cnt,
count(distinct case when y.role=3 then y.trx_id end) ship_only_trx_cnt
from
(
select
f.role,
f.cust_key,
f.trx_id,
case when :detail_level=&apos;Site&apos; then &apos;S&apos;||hcsua0.cust_acct_site_id when :detail_level=&apos;Site Use&apos; then &apos;U&apos;||f.site_key else &apos;A&apos; end grain_key
from
(
select
rowgen.column_value role,
decode(rowgen.column_value,3,rcta.ship_to_customer_id,rcta.bill_to_customer_id) cust_key,
decode(rowgen.column_value,1,rcta.bill_to_site_use_id,rcta.ship_to_site_use_id) site_key,
rcta.customer_trx_id trx_id
from
ra_customer_trx_all rcta,
table(xxen_util.rowgen(3)) rowgen
where
rcta.trx_date&gt;=sysdate-:trx_count_days and
(rowgen.column_value&lt;3 or rcta.ship_to_customer_id&lt;&gt;rcta.bill_to_customer_id)
) f,
hz_cust_site_uses_all hcsua0
where
f.site_key is not null and
case when :detail_level=&apos;Site&apos; then f.site_key end=hcsua0.site_use_id(+)
) y
group by y.cust_key,grouping sets ((y.grain_key),())
),</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show trx count within x days</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>24</SORT_ORDER>
    <ANCHOR>&amp;from_trx_count</ANCHOR>
    <SQL_TEXT>q_trx_count tc,</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show trx count within x days</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>25</SORT_ORDER>
    <ANCHOR>&amp;join_trx_count</ANCHOR>
    <SQL_TEXT>x.cust_account_id=tc.cust_key(+) and
case when :detail_level=&apos;Site&apos; then nvl2(x.cust_acct_site_id,&apos;S&apos;||x.cust_acct_site_id,&apos;-x&apos;) when :detail_level=&apos;Site Use&apos; then nvl2(x.site_use_id,&apos;U&apos;||x.site_use_id,&apos;A&apos;) else &apos;A&apos; end=tc.join_key(+) and</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show trx count within x days</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>26</SORT_ORDER>
    <DISPLAY_SEQUENCE>170</DISPLAY_SEQUENCE>
    <ANCHOR>&amp;column_latest_trx</ANCHOR>
    <SQL_TEXT>case when :detail_level=&apos;Site&apos; then coalesce(ts.ship_bill_max_date,ts.ship_max_date) else coalesce(ts.bill_max_date,ts.ship_max_date) end latest_trx_date,
coalesce(xxen_util.client_time(ps.cust_max_date),xxen_util.client_time(ps.ship_max_date)) pay_sched_last_update_date,</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>Yes</LOV_NAME>
    <LOV_GUID>8E2FF36EDEA679D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select &apos;Y&apos; id, xxen_util.meaning(&apos;Y&apos;,&apos;YES_NO&apos;,0) value, null description from dual</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show Latest Trx Date</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>27</SORT_ORDER>
    <ANCHOR>&amp;cte_latest_trx</ANCHOR>
    <SQL_TEXT>q_trx_stats as (
select
y.cust_key,
case when grouping(y.grain_key)=1 then decode(:detail_level,&apos;Site Use&apos;,&apos;A&apos;,&apos;-&apos;) else y.grain_key end join_key,
max(case when y.role=1 then y.trx_date end) bill_max_date,
max(case when y.role=2 then y.trx_date end) ship_max_date,
max(case when y.role=3 then y.trx_date end) ship_bill_max_date
from
(
select
f.role,
f.cust_key,
f.trx_date,
case when :detail_level=&apos;Site&apos; then &apos;S&apos;||hcsua0.cust_acct_site_id when :detail_level=&apos;Site Use&apos; then &apos;U&apos;||f.site_key else &apos;A&apos; end grain_key
from
(
select
rowgen.column_value role,
decode(rowgen.column_value,1,rcta.bill_to_customer_id,rcta.ship_to_customer_id) cust_key,
decode(rowgen.column_value,2,rcta.ship_to_site_use_id,rcta.bill_to_site_use_id) site_key,
rcta.trx_date
from
ra_customer_trx_all rcta,
table(xxen_util.rowgen(3)) rowgen
where
(rowgen.column_value=2 or rowgen.column_value=1 and :detail_level&lt;&gt;&apos;Site&apos; or rowgen.column_value=3 and :detail_level=&apos;Site&apos;)
) f,
hz_cust_site_uses_all hcsua0
where
f.site_key is not null and
case when :detail_level=&apos;Site&apos; then f.site_key end=hcsua0.site_use_id(+)
) y
group by y.cust_key,grouping sets ((y.grain_key),())
),
q_pay_stats as (
select
y.cust_key,
case when grouping(y.grain_key)=1 then decode(:detail_level,&apos;Site Use&apos;,&apos;A&apos;,&apos;-&apos;) else y.grain_key end join_key,
max(case when y.role=1 then y.upd_date end) cust_max_date,
max(case when y.role=2 then y.upd_date end) ship_max_date
from
(
select
f.role,
f.cust_key,
f.upd_date,
case when :detail_level=&apos;Site&apos; then &apos;S&apos;||hcsua0.cust_acct_site_id when :detail_level=&apos;Site Use&apos; then &apos;U&apos;||f.site_key else &apos;A&apos; end grain_key
from
(
select
rowgen.column_value role,
decode(rowgen.column_value,1,apsa.customer_id,rcta.ship_to_customer_id) cust_key,
decode(rowgen.column_value,1,apsa.customer_site_use_id,rcta.ship_to_site_use_id) site_key,
apsa.last_update_date upd_date
from
ar_payment_schedules_all apsa,
ra_customer_trx_all rcta,
table(xxen_util.rowgen(2)) rowgen
where
apsa.customer_trx_id=rcta.customer_trx_id(+)
) f,
hz_cust_site_uses_all hcsua0
where
f.site_key is not null and
case when :detail_level=&apos;Site&apos; then f.site_key end=hcsua0.site_use_id(+)
) y
group by y.cust_key,grouping sets ((y.grain_key),())
),</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show Latest Trx Date</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>28</SORT_ORDER>
    <ANCHOR>&amp;from_latest_trx</ANCHOR>
    <SQL_TEXT>q_trx_stats ts,
q_pay_stats ps,</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show Latest Trx Date</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>29</SORT_ORDER>
    <ANCHOR>&amp;join_latest_trx</ANCHOR>
    <SQL_TEXT>x.cust_account_id=ts.cust_key(+) and
case when :detail_level=&apos;Site&apos; then nvl2(x.cust_acct_site_id,&apos;S&apos;||x.cust_acct_site_id,&apos;-x&apos;) when :detail_level=&apos;Site Use&apos; then nvl2(x.site_use_id,&apos;U&apos;||x.site_use_id,&apos;A&apos;) else &apos;A&apos; end=ts.join_key(+) and
x.cust_account_id=ps.cust_key(+) and
case when :detail_level=&apos;Site&apos; then nvl2(x.cust_acct_site_id,&apos;S&apos;||x.cust_acct_site_id,&apos;-x&apos;) when :detail_level=&apos;Site Use&apos; then nvl2(x.site_use_id,&apos;U&apos;||x.site_use_id,&apos;A&apos;) else &apos;A&apos; end=ps.join_key(+) and</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show Latest Trx Date</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>30</SORT_ORDER>
    <DISPLAY_SEQUENCE>180</DISPLAY_SEQUENCE>
    <ANCHOR>:detail_level</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV custom</PARAMETER_TYPE_DSP>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select &apos;Customer&apos; value, &apos;Customer information only&apos; description from dual union all
select &apos;Site&apos; value, &apos;Customer plus address information&apos; description from dual union all
select &apos;Site Use&apos; value, &apos;Customer, address and site use information&apos; description from dual</LOV_QUERY_DSP>
    <DEFAULT_VALUE>Site Use</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Niveau</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Level</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>31</SORT_ORDER>
    <DISPLAY_SEQUENCE>190</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>hcsua.site_use_code=:p_site_use_code</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV custom</PARAMETER_TYPE_DSP>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
flvv.lookup_code id,
flvv.meaning value,
flvv.description
from
fnd_lookup_values_vl flvv
where
flvv.lookup_type=&apos;SITE_USE_CODE&apos; and
flvv.view_application_id=222 and
flvv.enabled_flag=&apos;Y&apos; and
:$flex$.level=&apos;Site Use&apos;
order by
flvv.meaning</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Site Use</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>32</SORT_ORDER>
    <DISPLAY_SEQUENCE>200</DISPLAY_SEQUENCE>
    <ANCHOR>&amp;dff_columns</ANCHOR>
    <SQL_TEXT>select
&apos;hp.attribute_category party_context,&apos; || chr(10) ||
xxen_util.dff_columns(p_table_name=&gt;&apos;hz_parties&apos;,p_column_name_prefix=&gt;&apos;Party: &apos;,p_display_mode=&gt;:dff_display)||
&apos;hca.attribute_category account_context,&apos; || chr(10) ||
xxen_util.dff_columns(p_table_name=&gt;&apos;hz_cust_accounts&apos;,p_column_name_prefix=&gt;&apos;Account: &apos;,p_display_mode=&gt;:dff_display)||
case when :detail_level in (&apos;Site&apos;,&apos;Site Use&apos;) then &apos;hps.attribute_category address_context,&apos; || chr(10) end ||
case when :detail_level in (&apos;Site&apos;,&apos;Site Use&apos;) then xxen_util.dff_columns(p_table_name=&gt;&apos;hz_party_sites&apos;,p_column_name_prefix=&gt;&apos;Address: &apos;,p_display_mode=&gt;:dff_display) end||
case when :detail_level in (&apos;Site&apos;,&apos;Site Use&apos;) then &apos;hcasa.attribute_category site_context,&apos; || chr(10) end ||
case when :detail_level in (&apos;Site&apos;,&apos;Site Use&apos;) then xxen_util.dff_columns(p_table_name=&gt;&apos;hz_cust_acct_sites_all&apos;,p_column_name_prefix=&gt;&apos;Site: &apos;,p_display_mode=&gt;:dff_display) end||
case when :detail_level = &apos;Site Use&apos; then &apos;hcsua.attribute_category site_use_context,&apos; || chr(10) end ||
case when :detail_level=&apos;Site Use&apos; then xxen_util.dff_columns(p_table_name=&gt;&apos;hz_cust_site_uses_all&apos;,p_column_name_prefix=&gt;&apos;Site Use: &apos;,p_display_mode=&gt;:dff_display) end
from
dual</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>Blitz Report DFF Display</LOV_NAME>
    <LOV_GUID>53B31EFFC6B85470E0630100007F501D</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select &apos;V&apos; id, &apos;Value&apos; value, &apos;Value only&apos; description from dual union all
select &apos;C&apos; id, &apos;Value: Description&apos; value, &apos;Concatenated value and description&apos; description from dual union all
select &apos;S&apos; id, &apos;Value, Description&apos; value, &apos;Value and description in separate columns&apos; description from dual</LOV_QUERY_DSP>
    <DEFAULT_VALUE>fnd_profile.value(&apos;XXEN_REPORT_DFF_DISPLAY&apos;)</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>DFF Display</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>33</SORT_ORDER>
    <ANCHOR>&amp;dff_columns2</ANCHOR>
    <SQL_TEXT>select
&apos;x.party_context,&apos; || chr(10) ||
xxen_util.dff_columns(p_table_name=&gt;&apos;hz_parties&apos;,p_column_name_prefix=&gt;&apos;Party: &apos;,p_prefix=&gt;&apos;x.&apos;,p_display_mode=&gt;:dff_display)||
&apos;x.account_context,&apos; || chr(10) ||
xxen_util.dff_columns(p_table_name=&gt;&apos;hz_cust_accounts&apos;,p_column_name_prefix=&gt;&apos;Account: &apos;,p_prefix=&gt;&apos;x.&apos;,p_display_mode=&gt;:dff_display)||
case when :detail_level in (&apos;Site&apos;,&apos;Site Use&apos;) then &apos;x.address_context,&apos; || chr(10) end ||
case when :detail_level in (&apos;Site&apos;,&apos;Site Use&apos;) then xxen_util.dff_columns(p_table_name=&gt;&apos;hz_party_sites&apos;,p_column_name_prefix=&gt;&apos;Address: &apos;,p_prefix=&gt;&apos;x.&apos;,p_display_mode=&gt;:dff_display) end||
case when :detail_level in (&apos;Site&apos;,&apos;Site Use&apos;) then &apos;x.site_context,&apos; || chr(10) end ||
case when :detail_level in (&apos;Site&apos;,&apos;Site Use&apos;) then xxen_util.dff_columns(p_table_name=&gt;&apos;hz_cust_acct_sites_all&apos;,p_column_name_prefix=&gt;&apos;Site: &apos;,p_prefix=&gt;&apos;x.&apos;,p_display_mode=&gt;:dff_display) end||
case when :detail_level = &apos;Site Use&apos; then &apos;x.site_use_context,&apos; || chr(10) end ||
case when :detail_level=&apos;Site Use&apos; then xxen_util.dff_columns(p_table_name=&gt;&apos;hz_cust_site_uses_all&apos;,p_column_name_prefix=&gt;&apos;Site Use: &apos;,p_prefix=&gt;&apos;x.&apos;,p_display_mode=&gt;:dff_display) end
from
dual
</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>DFF Display</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>34</SORT_ORDER>
    <DISPLAY_SEQUENCE>210</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>((hp.creation_date&gt;=:creation_date_from and hp.creation_date&lt;:creation_date_to+1) or 
(hca.creation_date&gt;=:creation_date_from and hca.creation_date&lt;:creation_date_to+1) or 
(nvl(hcasa.creation_date,:creation_date_from-1)&gt;=:creation_date_from and nvl(hcasa.creation_date,:creation_date_to+1)&lt;:creation_date_to+1) or (nvl(hcp1.creation_date,:creation_date_from-1)&gt;=:creation_date_from and nvl(hcp1.creation_date,:creation_date_to+1)&lt;:creation_date_to+1) or (nvl(hcp2.creation_date,:creation_date_from-1)&gt;=:creation_date_from and nvl(hcp2.creation_date,:creation_date_to+1)&lt;:creation_date_to+1))</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Creation Date From</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>35</SORT_ORDER>
    <DISPLAY_SEQUENCE>220</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>((hp.creation_date&gt;=:creation_date_from and hp.creation_date&lt;:creation_date_to+1) or 
(hca.creation_date&gt;=:creation_date_from and hca.creation_date&lt;:creation_date_to+1) or 
(nvl(hcasa.creation_date,:creation_date_from-1)&gt;=:creation_date_from and nvl(hcasa.creation_date,:creation_date_to+1)&lt;:creation_date_to+1) or (nvl(hcp1.creation_date,:creation_date_from-1)&gt;=:creation_date_from and nvl(hcp1.creation_date,:creation_date_to+1)&lt;:creation_date_to+1) or (nvl(hcp2.creation_date,:creation_date_from-1)&gt;=:creation_date_from and nvl(hcp2.creation_date,:creation_date_to+1)&lt;:creation_date_to+1))</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>last_day(:$flex$.creation_date_from)</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Creation Date To</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>36</SORT_ORDER>
    <DISPLAY_SEQUENCE>230</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>((hp.last_update_date&gt;=:last_update_date_from and hp.last_update_date&lt;:last_update_date_to+1) or
(hca.last_update_date&gt;=:last_update_date_from and hca.last_update_date&lt;:last_update_date_to+1) or
(nvl(hcasa.last_update_date,:last_update_date_from-1)&gt;=:last_update_date_from and nvl(hcasa.last_update_date,:last_update_date_to+1)&lt;:last_update_date_to+1) or
(nvl(hcp1.last_update_date,:last_update_date_from-1)&gt;=:last_update_date_from and nvl(hcp1.last_update_date,:last_update_date_to+1)&lt;:last_update_date_to+1) or
(nvl(hcp2.last_update_date,:last_update_date_from-1)&gt;=:last_update_date_from and nvl(hcp2.last_update_date,:last_update_date_to+1)&lt;:last_update_date_to+1))</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Last Update Date From</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>37</SORT_ORDER>
    <DISPLAY_SEQUENCE>240</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>((hp.last_update_date&gt;=:last_update_date_from and hp.last_update_date&lt;:last_update_date_to+1) or
(hca.last_update_date&gt;=:last_update_date_from and hca.last_update_date&lt;:last_update_date_to+1) or
(nvl(hcasa.last_update_date,:last_update_date_from-1)&gt;=:last_update_date_from and nvl(hcasa.last_update_date,:last_update_date_to+1)&lt;:last_update_date_to+1) or
(nvl(hcp1.last_update_date,:last_update_date_from-1)&gt;=:last_update_date_from and nvl(hcp1.last_update_date,:last_update_date_to+1)&lt;:last_update_date_to+1) or
(nvl(hcp2.last_update_date,:last_update_date_from-1)&gt;=:last_update_date_from and nvl(hcp2.last_update_date,:last_update_date_to+1)&lt;:last_update_date_to+1))</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>last_day(:$flex$.last_update_date_from)</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Last Update Date To</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>
