From a4fce59de4ccf0fb2b85671a72301343c2262b91 Mon Sep 17 00:00:00 2001 From: Neeraj Sharma Date: Mon, 11 May 2020 14:30:57 +0530 Subject: [PATCH] complete solve bugs of invoice --- src/pages/Account/editInvoice.vue | 10 +++ src/pages/Account/invoice.vue | 3 - src/pages/Account/paymentTemplate.vue | 124 +--------------------------------- 3 files changed, 13 insertions(+), 124 deletions(-) diff --git a/src/pages/Account/editInvoice.vue b/src/pages/Account/editInvoice.vue index 2b95441..814e538 100644 --- a/src/pages/Account/editInvoice.vue +++ b/src/pages/Account/editInvoice.vue @@ -362,6 +362,16 @@ export default { if (editInvoiceData.paymentStatus == "NOT_PAID") { delete editInvoiceData.paymentMethod; } + if (this.feeType.subTotal == this.feeType.paidAmount) { + editInvoiceData.paymentStatus = "FULLY_PAID"; + // console.log("FULLY_PAID"); + } + if (editInvoiceData.totalPaidAmount) { + if (this.feeType.subTotal != this.feeType.paidAmount) { + editInvoiceData.paymentStatus = "PARTIALLY_PAID"; + // console.log("PARTIALLY_PAID"); + } + } http() .put("/updateInvoice", editInvoiceData) .then(response => { diff --git a/src/pages/Account/invoice.vue b/src/pages/Account/invoice.vue index d9ce2e1..355704f 100644 --- a/src/pages/Account/invoice.vue +++ b/src/pages/Account/invoice.vue @@ -1158,10 +1158,7 @@ export default { if (this.feeTypeData[i].discount) { feeType.discount = Number(feeType.discount) + Number(this.feeTypeData[i].discount); - // console.log("feeType.discount", feeType.discount); this.feeType.discount = feeType.discount; - console.log("feeType.discount", this.feeType.discount); - feeType.subParticularTotal = this.feeTypeData[i].amount - (this.feeTypeData[i].amount * this.feeTypeData[i].discount) / 100; diff --git a/src/pages/Account/paymentTemplate.vue b/src/pages/Account/paymentTemplate.vue index 02c4546..2eb2743 100644 --- a/src/pages/Account/paymentTemplate.vue +++ b/src/pages/Account/paymentTemplate.vue @@ -20,6 +20,7 @@

Profile

+ @@ -71,6 +72,7 @@ + @@ -80,82 +82,6 @@ - @@ -189,42 +115,6 @@ - @@ -257,15 +147,7 @@ > - -
# {{ feeType.subTotal }} - - +