AR Incomplete Transactions

Description
Categories: Enginatics
Repository: Github
Detail incomplete transaction report

When India Localization is installed, the following GST columns are also included: GST Registration No, GST PAN No, CGST Amount, SGST Amount, IGST Amount, CESS Amount, Custom Amount, Unclassified Tax Amount, Taxable Value, HSN SAC Code, HSN Length Warning, CGST Rate, SGST Rate, IGST Rate, CESS Rate, CGST Recoverable, CGST Non-Recoverable, SGST Recoverabl ... 
Detail incomplete transaction report

When India Localization is installed, the following GST columns are also included: GST Registration No, GST PAN No, CGST Amount, SGST Amount, IGST Amount, CESS Amount, Custom Amount, Unclassified Tax Amount, Taxable Value, HSN SAC Code, HSN Length Warning, CGST Rate, SGST Rate, IGST Rate, CESS Rate, CGST Recoverable, CGST Non-Recoverable, SGST Recoverable, SGST Non-Recoverable, IGST Recoverable, IGST Non-Recoverable, Reverse Charge Flag, Place of Supply, Ship From State.
   more
select
haouv.name operating_unit,
rcta.trx_number trx_number,
rcta.trx_date,
xxen_util.meaning(rctta.type,'INV/CM/ADJ',222) class,
rctta.name type,
rcta.ct_reference reference,
(
select
nvl2(acia0.cons_billing_number,acia0.cons_billing_number||' - ',null)||rcta0.trx_number credited_invoice
from
ra_customer_trx_all rcta0,
ar_cons_inv_trx_all acita0,
ar_cons_inv_all acia0
where
rcta.previous_customer_trx_id=rcta0.customer_trx_id and
rcta0.customer_trx_id=acita0.customer_trx_id(+) and
acita0.cons_inv_id=acia0.cons_inv_id(+)
) credited_invoice,
hca.account_number,
hp.party_name,
hcsua.location bill_to_location,
hz_format_pub.format_address (hps.location_id,null,null,' , ') bill_to_address,
hp.jgzz_fiscal_code taxpayer_id,
rcta.invoice_currency_code currency,
(select sum(rctla.extended_amount) from ra_customer_trx_lines_all rctla where rcta.customer_trx_id=rctla.customer_trx_id and rctla.line_type in ('LINE','CB','CHARGES')) amount,
decode(rcta.status_trx,'CL','Closed','Open') state,
rcta.status_trx status,
rtv.name payment_term,
decode(rcta.invoicing_rule_id,-3,'Arrears',-2,'Advance') invoicing_rule,
rcta.term_due_date,
rcta.ship_date_actual ship_date,
xxen_util.meaning(rcta.printing_option,'INVOICE_PRINT_OPTIONS',222) print_option,
rcta.printing_original_date first_printed_date,
rcta.customer_reference,
rcta.comments,
jrret.resource_name sales_rep,
nvl(rcta.interface_header_context,rbsa.name) category,
xxen_util.user_name(rcta.created_by) created_by,
xxen_util.client_time(rcta.creation_date) creation_date,
xxen_util.user_name(rcta.last_updated_by) last_updated_by,
xxen_util.client_time(rcta.last_update_date) last_update_date,
arm.name receipt_method
&il_reg_columns
&il_columns_amt
&il_columns_rate
&il_columns_rec
&il_columns_tp
&payment_method_column
from
hr_all_organization_units_vl haouv,
ra_customer_trx_all rcta,
oe_sys_parameters_all ospa,
ra_batch_sources_all rbsa,
ra_cust_trx_types_all rctta,
ra_terms_vl rtv,
hz_cust_accounts hca,
hz_parties hp,
hz_cust_site_uses_all hcsua,
hz_cust_acct_sites_all hcasa,
hz_party_sites hps,
jtf_rs_salesreps jrs,
jtf_rs_resource_extns_tl jrret,
ar_receipt_methods arm
&payment_method_table
&il_from
where
1=1 and
rcta.complete_flag='N' and
rcta.org_id=haouv.organization_id(+) and
rcta.org_id=ospa.org_id(+) and
ospa.parameter_code(+)='MASTER_ORGANIZATION_ID' and
rcta.term_id=rtv.term_id(+) and
rcta.cust_trx_type_id=rctta.cust_trx_type_id(+) and
rcta.org_id=rctta.org_id(+) and
nvl2(rcta.interface_header_context,null,rcta.batch_source_id)=rbsa.batch_source_id(+) and
nvl2(rcta.interface_header_context,null,rcta.org_id)=rbsa.org_id(+) and
rcta.bill_to_customer_id=hca.cust_account_id(+) and
hca.party_id=hp.party_id(+) and
rcta.bill_to_site_use_id=hcsua.site_use_id(+) and
hcsua.cust_acct_site_id=hcasa.cust_acct_site_id(+) and
hcasa.party_site_id=hps.party_site_id(+) and
case when rcta.primary_salesrep_id>0 then rcta.primary_salesrep_id end=jrs.salesrep_id(+) and
case when rcta.primary_salesrep_id>0 then rcta.org_id end=jrs.org_id(+) and
jrs.resource_id=jrret.resource_id(+) and
jrret.language(+)=userenv('lang') and
rcta.receipt_method_id=arm.receipt_method_id(+)
&payment_method_join
&il_where
order by
haouv.name,
rcta.trx_date desc,
rcta.trx_number desc
Parameter NameSQL textValidation
Operating Unit
haouv.name=:operating_unit
LOV
Transaction Class
rctta.type=xxen_util.lookup_code(:transaction_class,'INV/CM/ADJ',222)
LOV
Transaction Type
rctta.name=:trx_type
LOV
Category
rcta.interface_header_context=:category
LOV
Created By
rcta.created_by=xxen_util.user_id(:created_by)
LOV
Period
rcta.trx_date>=(select
gps.start_date
from
gl_period_statuses gps
where
gps.period_name=:period_name and
gps.set_of_books_id=(select hou.set_of_books_id from hr_operating_units hou where hou.organization_id=fnd_global.org_id) and
gps.application_id=222) and
rcta.trx_date<(select
gps.end_date+1
from
gl_period_statuses gps
where
gps.period_name=:period_name and
gps.set_of_books_id=(select hou.set_of_books_id from hr_operating_units hou where hou.organization_id=fnd_global.org_id) and
gps.application_id=222)
LOV
Inv. Date From
rcta.trx_date>=:trx_date_from
Date
Inv. Date To
rcta.trx_date<:trx_date_to+1
Date
Customer Name
upper(hp.party_name) like upper(:customer_name)
LOV
Account Number
hca.account_number=:account_number
LOV
Transaction Number
rcta.trx_number=:trx_number
Char