From 3bdc1177cc5b6f3b4b345304cb549fcbfe7c2b84 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Tue, 25 May 2021 10:58:53 +0800 Subject: [PATCH] purchase order value must match booking total up to 2 decimal --- .../ControllersLogic/CreatePurchaseOrderTransactionLogic.php | 2 +- .../components/bookings/forms/PurchaseOrderFormComponent.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Classes/Modules/Transactions/ControllersLogic/CreatePurchaseOrderTransactionLogic.php b/app/Classes/Modules/Transactions/ControllersLogic/CreatePurchaseOrderTransactionLogic.php index e91ddc15..25154301 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, $total === $booking->fix_amount ? ApprovalStatus::PENDING_VERIFICATION : ApprovalStatus::PENDING_SUBMISSION); + $this->updatesTransactionStatus->execute($transaction, (float)number_format((float)$total , 2, '.', '') === (float)number_format((float)$booking->fix_amount, 2, '.', '') ? ApprovalStatus::PENDING_VERIFICATION : ApprovalStatus::PENDING_SUBMISSION); $this->deletesTransactionDetails->execute($transaction); diff --git a/resources/assets/vue/components/bookings/forms/PurchaseOrderFormComponent.vue b/resources/assets/vue/components/bookings/forms/PurchaseOrderFormComponent.vue index 135275d8..435c2305 100644 --- a/resources/assets/vue/components/bookings/forms/PurchaseOrderFormComponent.vue +++ b/resources/assets/vue/components/bookings/forms/PurchaseOrderFormComponent.vue @@ -130,7 +130,7 @@
- +