Debug and fixing a decimal problem at Invoice in CRM

This commit is contained in:
Dillon
2023-08-02 22:55:12 +08:00
parent b235304ad8
commit 4f6887ef20
@@ -152,7 +152,7 @@ class CreatePerfexCRMInvoiceProcessor
'Refer to booking: '.$booking->marking,
"",
1.00,
number_format($transaction->amount, 2,'.','') * 1,
$transaction->amount,
1,
""
);
@@ -199,7 +199,7 @@ class CreatePerfexCRMInvoiceProcessor
//When this transaction is of TransactionType::PAYMENT, the amount is actually in the currecy user choose to pay (RM)
//So there is no need to convert it
if ($transaction->type == TransactionType::PAYMENT){
$total = $transaction->amount;
$total = number_format($transaction->amount, 2,'.','') * 1;
}
else{
if($booking->first()->fix_currency_id !== 1){