Skip to content
Snippets Groups Projects
Commit 32ecba8e authored by eileen's avatar eileen
Browse files

Fix for non-allocation of payment to fully reversed checkboxes option

This addresses an issue partially identified in financial#98 whereby
civicrm_entity_financial_trxn records for the civicrm_financial_item table are not created when
refunding against line items with a quantity of zero  - ie where there were selected checkboxes & they
were reversed.

The reason this check was there relates to former logic - now we have a calculated allocation
we don't need this check.

I want to do a test but need to do a bit of work to get it set up & I think this should hit 5.20
as it relates to an issue identified by Kevin in reviewing patches merged to that version
parent bdde6b87
Branches
Tags
No related merge requests found
......@@ -102,7 +102,7 @@ class CRM_Financial_BAO_Payment {
list($ftIds, $taxItems) = CRM_Contribute_BAO_Contribution::getLastFinancialItemIds($params['contribution_id']);
foreach ($lineItems as $key => $value) {
if ($value['qty'] == 0 || $value['allocation'] === (float) 0) {
if ($value['allocation'] === (float) 0) {
continue;
}
$eftParams = [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment