mht_brerp10
.adempiere
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
cof_getcheckallocateamt(numeric, numeric)
Parameters
Name
Type
Mode
invoice_id
numeric
IN
invoicepayschedule_id
numeric
IN
Definition
DECLARE check_amt INTEGER; BEGIN BEGIN SELECT sum(Amount) INTO check_amt FROM cof_c_checkallocate ca LEFT JOIN cof_c_controlcheck cc ON cc.cof_c_controlcheck_id = ca.cof_c_controlcheck_id WHERE ca.c_invoice_id = invoice_id AND COALESCE(ca.c_invoicepayschedule_id, 0::numeric) = COALESCE(invoicepayschedule_id,0) AND (cc.c_payment_id IS NULL) ; EXCEPTION WHEN NO_DATA_FOUND THEN check_amt := 0; END; RETURN check_amt; END;