From 8d6fbdd29042bbd60a56ba8f85b5ffe76f515a6e Mon Sep 17 00:00:00 2001 From: omair saleh Date: Mon, 28 Jun 2021 12:55:11 +0800 Subject: [PATCH] floor purchase order total to 2 decimals --- .../ControllersLogic/CreatePurchaseOrderTransactionLogic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Classes/Modules/Transactions/ControllersLogic/CreatePurchaseOrderTransactionLogic.php b/app/Classes/Modules/Transactions/ControllersLogic/CreatePurchaseOrderTransactionLogic.php index 826443ab..580066d7 100644 --- a/app/Classes/Modules/Transactions/ControllersLogic/CreatePurchaseOrderTransactionLogic.php +++ b/app/Classes/Modules/Transactions/ControllersLogic/CreatePurchaseOrderTransactionLogic.php @@ -104,7 +104,7 @@ class CreatePurchaseOrderTransactionLogic extends AbstractControllerLogic !$transaction ? $transaction = $this->createsTransaction->execute($booking, $object) : $transaction = $this->updatesTransaction->execute($transaction, $object); - $this->updatesTransactionStatus->execute($transaction, floor((float) $total) === (float)number_format((float)$booking->fix_amount, 2, '.', '') ? ApprovalStatus::PENDING_VERIFICATION : ApprovalStatus::PENDING_SUBMISSION); + $this->updatesTransactionStatus->execute($transaction, (floor((float) $total * 100) / 100) === (float)number_format((float)$booking->fix_amount, 2, '.', '') ? ApprovalStatus::PENDING_VERIFICATION : ApprovalStatus::PENDING_SUBMISSION); $this->deletesTransactionDetails->execute($transaction);