How to write code to reverse Gift Aid claim

How to use the API to reverse a Gift Aid Claim

UK version of RE has GiftAid claims.  When a posted gift with a claim needs to be adjusted, the front-end will create a new gift and reverse the Nominal Ledger entry for the old gift.  How is this accomplished with the API?
We are currently evaluating this issue and will update this article when we have more information.

Steps to Duplicate

With The Raiser's Edge UK, add a gift to a constituent record
Click Tax tab and specify a percentage
Click Miscellaneous tab and set gift to Posted
Note the gift ID and use it in the following VBA sub:
Public Sub testAdjust()

Dim oGift As CGift
Set oGift = New CGift

With oGift
.Init REApplication.SessionContext
.Load 3966 'Adjust for your GiftID

'Dim oAdjustment As IBBAdjustment
'Dim oAdjustmentServer As CAdjustmentServer
'Set oAdjustmentServer = New CAdjustmentServer

' With oAdjustmentServer
' .Init REApplication.SessionContext, oGift
' Set oAdjustment = .AddAdjustment()
'
' With oAdjustment
' 'let the user set fields on the adjustment
' .Fields(ADJUSTMENT_fld_Post_Date) = "06/13/2017"
' End With
'
' 'Validate and save the adjustment
' .Validate
' .Save
' End With


Dim oGift2 As IBBGift2
Set oGift2 = oGift

With oGift2
.AdjustTaxClaim False, True
End With

.Validate
.Save
.Closedown
End With

Set oGift = Nothing
'Set oAdjustmentServer = Nothing

End Sub

 

Was this article helpful?