CRM-18438: fix currency for payment info
authoryashodha <yashodha.chaku@webaccessglobal.com>
Wed, 20 Apr 2016 10:26:48 +0000 (15:56 +0530)
committeryashodha <yashodha.chaku@webaccessglobal.com>
Wed, 20 Apr 2016 10:26:48 +0000 (15:56 +0530)
----------------------------------------
* CRM-18438: Default currency shown in contribution selector
  https://issues.civicrm.org/jira/browse/CRM-18438

CRM/Contribute/BAO/Contribution.php
templates/CRM/Contribute/Form/AdditionalPayment.tpl

index c39c61d865ae193fe5b115bdc0f2e58b907878b5..f65c46d05021eb4d6c9e1cfe3f10e70e97cda8a6 100644 (file)
@@ -3991,7 +3991,7 @@ WHERE eft.financial_trxn_id IN ({$trxnId}, {$baseTrxnId['financialTrxnId']})
         SELECT GROUP_CONCAT(fa.`name`) as financial_account,
           ft.total_amount,
           ft.payment_instrument_id,
-          ft.trxn_date, ft.trxn_id, ft.status_id, ft.check_number
+          ft.trxn_date, ft.trxn_id, ft.status_id, ft.check_number, con.currency
 
         FROM civicrm_contribution con
           LEFT JOIN civicrm_entity_financial_trxn eft ON (eft.entity_id = con.id AND eft.entity_table = 'civicrm_contribution')
@@ -4024,6 +4024,7 @@ WHERE eft.financial_trxn_id IN ({$trxnId}, {$baseTrxnId['financialTrxnId']})
           'receive_date' => $resultDAO->trxn_date,
           'trxn_id' => $resultDAO->trxn_id,
           'status' => $statuses[$resultDAO->status_id],
+          'currency' => $resultDAO->currency,
         );
         if ($paidByName == 'Check') {
           $val['check_number'] = $resultDAO->check_number;
index dac87b1e676f8e475a50622cadbcc3eb0772a52a..3dcb068a05a1796e29b7e661cef51448a0b92937 100644 (file)
@@ -36,7 +36,7 @@
      </tr>
      {foreach from=$rows item=row}
      <tr>
-       <td>{$row.total_amount|crmMoney}</td>
+       <td>{$row.total_amount|crmMoney:$row.currency}</td>
        <td>{$row.financial_type}</td>
        <td>{$row.payment_instrument}{if $row.check_number} (#{$row.check_number}){/if}</td>
        <td>{$row.receive_date|crmDate}</td>