SELECT rcta.trx_number,
rcta.trx_date,
hp.party_name,
rctla.tax_classification_code vat_code,
rctla.tax_recoverable vat_amount,
rctla.extended_amount line_amount,
rctta.name trx_type_name
FROM RA_CUSTOMER_TRX_ALL RCTA,
HZ_PARTIES HP,
HZ_CUST_ACCOUNTS_ALL HCAA,
RA_CUSTOMER_TRX_LINES_ALL RCTLA,
RA_CUST_TRX_TYPES_ALL RCTTA
WHERE rcta.trx_date BETWEEN :p_from_trx_date AND :p_to_trx_date
AND rctla.line_type = 'LINE'
AND rcta.complete_flag = 'Y'
AND rctla.tax_classification_code LIKE 'VAT%'
AND hp.party_id = hcaa.party_id
AND hcaa.cust_account_id = rcta.bill_to_customer_id
AND rcta.customer_trx_id = rctla.customer_trx_id
AND rcta.cust_trx_type_id = rctta.cust_trx_type_id
AND rcta.org_id = rctta.org_id
ORDER BY rcta.trx_date,
hp.party_name
rcta.trx_date,
hp.party_name,
rctla.tax_classification_code vat_code,
rctla.tax_recoverable vat_amount,
rctla.extended_amount line_amount,
rctta.name trx_type_name
FROM RA_CUSTOMER_TRX_ALL RCTA,
HZ_PARTIES HP,
HZ_CUST_ACCOUNTS_ALL HCAA,
RA_CUSTOMER_TRX_LINES_ALL RCTLA,
RA_CUST_TRX_TYPES_ALL RCTTA
WHERE rcta.trx_date BETWEEN :p_from_trx_date AND :p_to_trx_date
AND rctla.line_type = 'LINE'
AND rcta.complete_flag = 'Y'
AND rctla.tax_classification_code LIKE 'VAT%'
AND hp.party_id = hcaa.party_id
AND hcaa.cust_account_id = rcta.bill_to_customer_id
AND rcta.customer_trx_id = rctla.customer_trx_id
AND rcta.cust_trx_type_id = rctta.cust_trx_type_id
AND rcta.org_id = rctta.org_id
ORDER BY rcta.trx_date,
hp.party_name
No comments:
Post a Comment