UFN_GIFTAIDREVENUESPLIT_SHOWTOTALSASPOTENTIAL
Determines if the Gift Aid tax claim and gross amount totals should be displayed as potential values.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN |
Definition
Copy
CREATE function dbo.UFN_GIFTAIDREVENUESPLIT_SHOWTOTALSASPOTENTIAL
(
@ID uniqueidentifier
)
returns bit
with execute as caller
as begin
if exists(select ID
from dbo.REVENUESPLITGIFTAID
where ID in (select ID from dbo.REVENUESPLIT where REVENUEID = @ID)
and (RULES_STATUS & ATTRIBUTES_STATUS) = 1 and DECLINESGIFTAID = 0 and dbo.UFN_GIFTAIDREVENUESPLIT_GETTAXCLAIMELIGIBILITYSTATUS(ID) = 0 and TAXCLAIMNUMBER = '')
return 1;
return 0;
end