Query to retrieve the balance amount of the transaction
-- INV BALANCE
SELECT acctd_amount_due_remaining
INTO l_inv_bal_amt
FROM ar_payment_schedules
Where customer_trx_id = l_inv_trx_id ;
-- CREDIT MEMO BALANCE
SELECT acctd_amount_due_remaining
INTO l_cm_bal_amt
FROM ar_payment_schedules
Where customer_trx_id = l_cm_trx_id ;
-- Amount applied should be the least of inv balance and cm balance
SELECT LEAST(l_inv_bal_amt, abs(l_cm_bal_amt))
INTO l_amount_applied
FROM DUAL;
Query to retrieve the customer_id of the transaction
SELECT customer_id
INTO l_customer_id
FROM ar_payment_schedules
WHERE customer_trx_id = l_inv_trx_id ;
supreme clothing
ReplyDeletejordan 6
converse outlet store
supreme hoodie
curry 7 shoes
yeezy shoes
kd 11
kyrie 5
lebron 17 shoes
golden goose sneakers