From 4f6887ef20f960bd2aa9197f4e698aa09eb1a373 Mon Sep 17 00:00:00 2001 From: Dillon Date: Wed, 2 Aug 2023 22:55:12 +0800 Subject: [PATCH] Debug and fixing a decimal problem at Invoice in CRM --- .../PerfexCRM/Processors/CreatePerfexCRMInvoiceProcessor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Classes/Modules/PerfexCRM/Processors/CreatePerfexCRMInvoiceProcessor.php b/app/Classes/Modules/PerfexCRM/Processors/CreatePerfexCRMInvoiceProcessor.php index 2b64aa75..2bd95920 100644 --- a/app/Classes/Modules/PerfexCRM/Processors/CreatePerfexCRMInvoiceProcessor.php +++ b/app/Classes/Modules/PerfexCRM/Processors/CreatePerfexCRMInvoiceProcessor.php @@ -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){