diff --git a/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingWithStorageComponent.vue b/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingWithStorageComponent.vue
index 0b06985a..c6a3bcc7 100644
--- a/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingWithStorageComponent.vue
+++ b/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingWithStorageComponent.vue
@@ -15,7 +15,7 @@
Invoice Date
-
{{ invoiceDate }}
+
{{ invoiceDate(item) }}
-
@@ -509,34 +509,6 @@
}
return false;
},
- invoiceDate() {
- if (this.isEinvoiceApplicable) {
- for (let i = 0; i < this.items.length; i++) {
- const history = this.items[i].payment_history;
- if (history && history.length > 0) {
- for (let j = 0; j < history.length; j++) {
- let dateStr = history[j].created_at;
- const [day, month, year] = dateStr.split("-").map(Number);
- const lastDay = new Date(year, month, 0).getDate();
- return `${lastDay}-${String(month).padStart(2, "0")}-${year}`;
- }
- }
- }
- }
- else{
- for (let i = 0; i < this.items.length; i++) {
- const history = this.items[i].payment_history;
- if (history && history.length > 0) {
- for (let j = 0; j < history.length; j++) {
- return history[j].created_at;;
- }
- }
- return this.items[i].created_at;
- }
- }
-
- return null;
- },
},
methods: {
getLatestComment(item) {
@@ -587,7 +559,35 @@
paymentOutdated(){
this.showPaymentProceedModal = false;
this.showPaymentOutdatedModal = true;
- }
+ },
+ invoiceDate(item) {
+ if (this.isEinvoiceApplicable) {
+ for (let i = 0; i < this.items.length; i++) {
+ const history = this.items[i].payment_history;
+ if (history && history.length > 0) {
+ for (let j = 0; j < history.length; j++) {
+ let dateStr = history[j].created_at;
+ const [day, month, year] = dateStr.split("-").map(Number);
+ const lastDay = new Date(year, month, 0).getDate();
+ return `${lastDay}-${String(month).padStart(2, "0")}-${year}`;
+ }
+ }
+ }
+ }
+ else{
+ for (let i = 0; i < this.items.length; i++) {
+ const history = this.items[i].payment_history;
+ if (history && history.length > 0) {
+ for (let j = 0; j < history.length; j++) {
+ return history[j].created_at;;
+ }
+ }
+ return this.items[i].created_at;
+ }
+ }
+
+ return item.created_at;
+ },
}
}