UFN_INSTALLMENT_GETWRITEOFFINSTALLMENTS
Returns all installments that can be written off for a given pledge.
Return
Return Type |
---|
table |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@REVENUEID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_INSTALLMENT_GETWRITEOFFINSTALLMENTS(@REVENUEID uniqueidentifier)
returns table
as
return (
select
INSTALLMENT.ID,
DATE,
INSTALLMENT.AMOUNT,
BALANCE = coalesce(dbo.UFN_INSTALLMENT_GETINSTALLMENTBALANCE(ID),0),
WRITEOFFAMOUNT = cast(0.0 as money),
SEQUENCE
from
dbo.INSTALLMENT
where
REVENUEID = @REVENUEID
and dbo.UFN_INSTALLMENT_GETINSTALLMENTBALANCE(ID) > 0
)