--fixed net amount field during update of contribution amount
authorPradeep Nayak <pradpnayak@gmail.com>
Fri, 21 Aug 2015 05:28:03 +0000 (10:58 +0530)
committerPradeep Nayak <pradpnayak@gmail.com>
Fri, 21 Aug 2015 05:28:03 +0000 (10:58 +0530)
CRM/Contribute/BAO/Contribution.php

index fe349413786c6ea7b1fecd7ed399bd434facec64..ffb02e8458bd00c19d4fc64278e14754ca7775ad 100644 (file)
@@ -3138,7 +3138,7 @@ WHERE  contribution_id = %1 ";
       return;
     }
     if ($context == 'changedAmount' || $context == 'changeFinancialType') {
-      $itemAmount = $params['trxnParams']['total_amount'] = $params['total_amount'] - $params['prevContribution']->total_amount;
+      $itemAmount = $params['trxnParams']['total_amount'] = $params['trxnParams']['net_amount'] = $params['total_amount'] - $params['prevContribution']->total_amount;
     }
     if ($context == 'changedStatus') {
       //get all the statuses