Sunday 8 January 2017

Receipt

Receipt
SELECT ACR.RECEIPT_NUMBER
,ARM.NAME RECEIPT_METHOD
,ACR.RECEIPT_DATE
,ACRH.GL_DATE
,ABB.BANK_NAME
,ABA.BANK_ACCOUNT_NUM
,HP.PARTY_NAME CUSTOMER_NAME
FROM AR_RECEIPT_METHODS ARM
,AR_CASH_RECEIPTS_ALL ACR
,AR_CASH_RECEIPT_HISTORY_ALL ACRH
,AP_BANK_ACCOUNTS ABA
,AP_BANK_BRANCHES ABB
,HZ_PARTIES HP
,HZ_CUST_ACCOUNTS HCA
WHERE ARM.RECEIPT_METHOD_ID=ACR.RECEIPT_METHOD_ID
AND ACR.CASH_RECEIPT_ID=ACRH.CASH_RECEIPT_ID
AND ACR.REMITTANCE_BANK_ACCOUNT_ID=ABA.BANK_ACCOUNT_ID(+)
AND ABA.BANK_ACCOUNT_ID=ABB.BANK_BRANCH_ID(+)
AND ACR.PAY_FROM_CUSTOMER=HCA.CUST_ACCOUNT_ID
AND HCA.PARTY_ID=HP.PARTY_ID
AR INVOICE
select rcta.trx_number invoice_num,
--sales_order_reference,
rct.gl_date,
rctl.inventory_item_id,
rct.amount,
rcta.trx_date invoice_date,
rctl.taxable_amount tax_amount
-- revenue_account_id,
--receivables_account_id,
from ra_customer_trx_lines_all rctl,
ra_cust_trx_line_gl_dist_all rct,
ra_customer_trx_all rcta
where rctcl.customer_trx_line_id=rct.customer_trx_line_id
and rctl.customer_trx_id=rcta.customer_trx_id

and rcta.customer_trx_id=rct.customer_trx_id

No comments :