$dTParams['total'] = CRM_Core_DAO::singleValueQuery('SELECT FOUND_ROWS()');
$result = array();
while ($cs->fetch()) {
- $result[$cs->id]['amount'] = $cs->amount;
+ $result[$cs->id]['amount'] = CRM_Utils_Money::format($cs->amount, $cs->currency);
$result[$cs->id]['currency'] = $cs->currency;
$result[$cs->id]['contributor_id'] = $cs->contributor_id;
$result[$cs->id]['contribution_id'] = $cs->contribution_id;
$this->assertEquals(3, $amountSortedList['recordsTotal']);
rsort($amounts);
foreach ($amounts as $key => $amount) {
+ $amount = CRM_Utils_Money::format($amount, 'USD');
$this->assertEquals($amount, $amountSortedList['data'][$key]['amount']);
}
$softCreditList = CRM_Contribute_Page_AJAX::getSoftContributionRows();
$this->assertEquals(1, $softCreditList['recordsTotal']);
$this->assertEquals('Gift', $softCreditList['data'][0]['sct_label']);
- $this->assertEquals('100.00', $softCreditList['data'][0]['amount']);
+ $this->assertEquals('$ 100.00', $softCreditList['data'][0]['amount']);
$this->assertEquals('Member Dues', $softCreditList['data'][0]['financial_type']);
}