Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.6.3, 4.6.8, 4.7
-
Fix Version/s: 4.7
-
Component/s: CiviContribute
-
Labels:
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
To reproduce on the 4.6 demo:
Choose any contact and submit a credit card contribution, for example enter 10.00. choose the deductible financial type "Donation". Choose the Authorize.Net processor.
Enter a dummy credit card 4111111111111111, CVV=123, and a future date.
Save the contribution. The non-deductible amount will be set to the full amount of the contribution.
Solution:
I tracked the issue down to this commit for CRM-15555
https://github.com/civicrm/civicrm-core/commit/c1cc3e0c300da02610a1bafa51a81d089ed24e42#diff-0573f78042d230ffc1d5e61c1749ae77
One option is to add back in the three lines:
if (!$contributionType->find(TRUE))
{ CRM_Core_Error::fatal('Could not find a system table'); }Another option might be to refactor the non-deductible check piece that starts with this comment to apply to both credit-card and non-credit card contributions.
// CRM-11956
// if non_deductible_amount exists i.e. Additional Details field set was opened [and staff typed something] -
// if non_deductible_amount does NOT exist - then calculate it depending on:
// $ContributionType->is_deductible and whether there is a product (premium).