From 53c9eebfb9a509ca01e3dd2892fc69c2d963b4da Mon Sep 17 00:00:00 2001 From: omair saleh Date: Fri, 2 Jul 2021 22:05:13 +0800 Subject: [PATCH] fix 3rd decimal bug with purchase orders --- .../components/bookings/forms/PurchaseOrderFormComponent.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/assets/vue/components/bookings/forms/PurchaseOrderFormComponent.vue b/resources/assets/vue/components/bookings/forms/PurchaseOrderFormComponent.vue index d24c299f..7c59df9b 100644 --- a/resources/assets/vue/components/bookings/forms/PurchaseOrderFormComponent.vue +++ b/resources/assets/vue/components/bookings/forms/PurchaseOrderFormComponent.vue @@ -211,7 +211,7 @@ this.submit(route('api.transaction.po.create', this.data.id), 'post', this.section, true, true); }, successHandler(){ - if(this.poTotal === this.data.amount){ + if((Math.round((this.poTotal + Number.EPSILON) * 100) / 100).toFixed(2) === (Math.round((this.data.amount + Number.EPSILON) * 100) / 100).toFixed(2)){ this.submitted = true; } this.updateList()