UFN_CREDIT_ISDEPOSITED
Returns whether the credit is reconciled or not
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@CREDITID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_CREDIT_ISDEPOSITED
(
@CREDITID uniqueidentifier
)
returns bit
as begin
return
(select
case
when
(select
sum(case
when RECONCILIATION.STATUSCODE = 3 then
1
else
0
end)
from CREDITPAYMENT
inner join RECONCILIATION on RECONCILIATION.ID = CREDITPAYMENT.RECONCILIATIONID
where CREDITID = @CREDITID)
> 0 then
1
else
0
end)
end