diff --git a/resources/assets/vue/components/bookings/forms/PurchaseOrderFormComponent.vue b/resources/assets/vue/components/bookings/forms/PurchaseOrderFormComponent.vue index c499e6b3..fb592190 100644 --- a/resources/assets/vue/components/bookings/forms/PurchaseOrderFormComponent.vue +++ b/resources/assets/vue/components/bookings/forms/PurchaseOrderFormComponent.vue @@ -281,6 +281,7 @@ }, allowPOEditing() { //Condition 1 + const noAmount = Math.round((this.data.amount + Number.EPSILON) * 100) / 100 === 0; const noPaymentsMade = Math.round((this.data.paid_amount + Number.EPSILON) * 100) / 100 === 0; const noPaymentPendingVerifications = this.data.payment_history.every(payment => payment.status !== 1); @@ -292,7 +293,7 @@ //Condition 3 const adminBeforeApproval = this.$store.getters.isAdmin && !(this.data.purchase_order.status === 2); - return (noPaymentsMade && noPaymentPendingVerifications) || (paymentsMade && outstandingAmount && allPaymentApproved) || adminBeforeApproval; + return (!noAmount && noPaymentsMade && noPaymentPendingVerifications) || (paymentsMade && outstandingAmount && allPaymentApproved) || adminBeforeApproval; }, totalFormattedPoTotal() { return (Math.round((this.poTotal + Number.EPSILON) * 1000) / 1000).toFixed(3);