CREATE OR REPLACE function getcusbal(p1 in number,p2 in varchar2,p_date in date)
return number as
v_cus_bal number;
begin
SELECT NVL(SUM(NVL(amount_due_
remaining,0)),0)
INTO v_cus_bal
FROM ar_payment_schedules
WHERE customer_id = p1
AND invoice_currency_code = P2
AND gl_date <= p_date
AND NVL(receipt_confirmed_flag,'Y' )='Y';
return v_cus_bal;
end;
/
return number as
v_cus_bal number;
begin
SELECT NVL(SUM(NVL(amount_due_
INTO v_cus_bal
FROM ar_payment_schedules
WHERE customer_id = p1
AND invoice_currency_code = P2
AND gl_date <= p_date
AND NVL(receipt_confirmed_flag,'Y'
return v_cus_bal;
end;
/
No comments:
Post a Comment