mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-22 14:04:01 +00:00
Merge branch 'dillon/90-e-invoice-e-1' into vapor/development
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user