From 738a13c15fcf492ccd9e39eb61ce96135f3ec8f5 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Thu, 16 Jun 2016 01:05:04 +0530 Subject: [PATCH] --CRM-16189, don't add entries for line qty is 0 --- CRM/Contribute/BAO/Contribution.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index d521607cf1..933eca034d 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -4841,6 +4841,9 @@ LIMIT 1;"; 'financial_trxn_id' => $ftId, ); foreach ($lineItems as $key => $value) { + if ($value['qty'] == 0) { + continue; + } $paid = $value['line_total'] * ($trxnAmount / $contribution->total_amount); // Record Entity Financial Trxn $params['amount'] = round($paid, 2); -- 2.25.1