}
}
+ /**
+ * Test recording of amount with comma separator.
+ */
+ public function testCommaSeparatorAmount() {
+ $contactId = $this->individualCreate();
+
+ $params = array(
+ 'contact_id' => $contactId,
+ 'currency' => 'USD',
+ 'financial_type_id' => 1,
+ 'contribution_status_id' => 8,
+ 'payment_instrument_id' => 1,
+ 'receive_date' => '20080522000000',
+ 'receipt_date' => '20080522000000',
+ 'total_amount' => '20000.00',
+ 'partial_payment_total' => '20,000.00',
+ 'partial_amount_pay' => '8,000.00',
+ );
+
+ $contribution = CRM_Contribute_BAO_Contribution::create($params);
+ $lastFinancialTrxnId = CRM_Core_BAO_FinancialTrxn::getFinancialTrxnId($contribution->id, 'DESC');
+ $financialTrxn = $this->callAPISuccessGetSingle(
+ 'FinancialTrxn',
+ array(
+ 'id' => $lastFinancialTrxnId['financialTrxnId'],
+ 'return' => array('total_amount'),
+ )
+ );
+ $this->assertEquals($financialTrxn['total_amount'], 8000, 'Invalid Tax amount.');
+ }
+
}