Skip to content

'Null' address created in Gift Aid Declaration preventing GA claims #94

@clarkac1

Description

@clarkac1

When a person makes a donation using this extension their address is stored as location type of 'Billing Address' - which is location_type of '5' in our Civi system. However the code that is looking for the address for the Gift Aid Declaration is looking for a hard coded location type of '1' - see line 476 of civigiftaid.php - so doesn't find an address if the contact doesn't have that type of address (which they don't have if they are a new contact). So the Gift Aid Declaration ends up with 'Null' in the address & postcode which prevents a claim.
The fix is is to remove the line at 476 and replace line 490 with the following. This will then find the primary address of the contact for the Gift Aid Declaration. This fix has been implemented and has fixed the problem.
'is_primary' => 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions