mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-25 15:34:02 +00:00
Merge branch 'dillon/90-e-invoice-e-1' into vapor/staging
This commit is contained in:
@@ -269,6 +269,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);
|
||||
|
||||
@@ -280,7 +281,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;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
Reference in New Issue
Block a user