Wednesday, 11 December 2024

Query to find receipt number from invoice

 SELECT
    acr.receipt_number,
    acr.receipt_date,
    acr.amount,
    rct.customer_trx_id,
    rct.trx_number,
    rct.trx_date,
    acr.last_update_date,
    rct.last_update_date,
    acr.receipt_method_id
FROM
    ar_receivable_applications_all  ara,
    ar_cash_receipts_all            acr,
    ra_customer_trx_all             rct
WHERE
        1 = 1
    --    ara.status = 'APP'
    AND ara.cash_receipt_id = acr.cash_receipt_id
    AND ara.applied_customer_trx_id = rct.customer_trx_id
    AND rct.org_id = 1111
    AND rct.trx_number IN ( '111111' )
ORDER BY
    rct.last_update_date DESC;

No comments:

Post a Comment