--fixed net amount field during update of contribution amount
[civicrm-core.git] / 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