Merge branch 'dillon/90-e-invoice-e-1' into vapor/development

This commit is contained in:
Dillon Ngo
2025-09-13 14:05:06 +08:00
@@ -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);