From a845722f7db32cfa7789bf9d7e41026d92fb8a10 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Mon, 28 Jun 2021 13:06:38 +0800 Subject: [PATCH] floor purchase order total to 2 decimals --- .../ControllersLogic/CreatePurchaseOrderTransactionLogic.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Classes/Modules/Transactions/ControllersLogic/CreatePurchaseOrderTransactionLogic.php b/app/Classes/Modules/Transactions/ControllersLogic/CreatePurchaseOrderTransactionLogic.php index 3a2d6891..df340abf 100644 --- a/app/Classes/Modules/Transactions/ControllersLogic/CreatePurchaseOrderTransactionLogic.php +++ b/app/Classes/Modules/Transactions/ControllersLogic/CreatePurchaseOrderTransactionLogic.php @@ -104,6 +104,8 @@ class CreatePurchaseOrderTransactionLogic extends AbstractControllerLogic !$transaction ? $transaction = $this->createsTransaction->execute($booking, $object) : $transaction = $this->updatesTransaction->execute($transaction, $object); + dd(number_format(floor((float) $total * 100) / 100 , 2, '.', '') .' = '.number_format((float)$booking->fix_amount, 2, '.', '')); + dd(number_format(floor((float) $total * 100) / 100 , 2, '.', '') === number_format((float)$booking->fix_amount, 2, '.', '')); $this->updatesTransactionStatus->execute($transaction, number_format(floor((float) $total * 100) / 100 , 2, '.', '') === number_format((float)$booking->fix_amount, 2, '.', '') ? ApprovalStatus::PENDING_VERIFICATION : ApprovalStatus::PENDING_SUBMISSION); $this->deletesTransactionDetails->execute($transaction);