Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ayduns
ukgiftaid
Commits
92c49df4
Commit
92c49df4
authored
Aug 10, 2020
by
Rich
Browse files
Fix issue #9
parent
93abe1d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
CRM/Civigiftaid/SetContributionGiftAidEligibility.php
View file @
92c49df4
...
...
@@ -104,10 +104,18 @@ class CRM_Civigiftaid_SetContributionGiftAidEligibility {
// Assume not eligible until proven eligible.
$eligibility
=
0
;
// We need to look through line items to determine if any of them are eligible.
foreach
(
$contribution
[
'line_items'
]
as
$lineItem
)
{
if
(
self
::
financialTypeIsEligible
(
$lineItem
[
'financial_type_id'
]))
{
if
(
empty
(
$contribution
[
'line_items'
]))
{
// Issue #9: Sometimes line_itmes are not returned!
if
(
self
::
financialTypeIsEligible
(
$contribution
[
'financial_type_id'
]))
{
$eligibility
=
1
;
break
;
}
}
else
{
foreach
(
$contribution
[
'line_items'
]
as
$lineItem
)
{
if
(
self
::
financialTypeIsEligible
(
$lineItem
[
'financial_type_id'
]))
{
$eligibility
=
1
;
break
;
}
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment