From 9a7ec75033adddee47d5dd91e7e3460249484784 Mon Sep 17 00:00:00 2001 From: edmondlang Date: Wed, 25 Aug 2021 15:48:30 +0800 Subject: [PATCH 1/3] create payment refund ui --- .../elements/PaymentHistoryComponent.vue | 132 +++++++++++++++++- 1 file changed, 129 insertions(+), 3 deletions(-) diff --git a/resources/assets/vue/components/bookings/elements/PaymentHistoryComponent.vue b/resources/assets/vue/components/bookings/elements/PaymentHistoryComponent.vue index 6e9ea19f..3abccf8b 100644 --- a/resources/assets/vue/components/bookings/elements/PaymentHistoryComponent.vue +++ b/resources/assets/vue/components/bookings/elements/PaymentHistoryComponent.vue @@ -2,7 +2,7 @@
-
+
Status
@@ -42,7 +42,7 @@
-
+
@@ -116,6 +116,106 @@
+
+
+ +
+
+
+
+
+
+
+
+
Refund Type:
+
+
+
+ {{refundMethod.name}} +
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
Fully Refund
+
+
+
+
+
+
+
+
+
Partially Refund
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + +
+
+
+
+
{{''}}
+
+
+
+
+
+
+ + + + +
+
+
+
+
{{''}}
+
+
+
+
+
+
+
+ + +
+
+
+
+
+ +
+
+ +
+
@@ -127,7 +227,13 @@ export default { data(){ return { - expanded: false + expandPaymentDetails: false, + expandRefund: false, + refundMethod: { + name: 'Fully Refund', + status: false + }, + amount: (Math.round(1000 * 100) / 100).toFixed(2), } }, computed: { @@ -135,6 +241,26 @@ return this.item.type === 1 ? this.item : this.item.customer_booking; } }, + methods: { + requestRefund(){ + this.expandRefund = !this.expandRefund; + this.expandPaymentDetails = !this.expandPaymentDetails; + }, + clickExpand(){ + if (this.expandPaymentDetails == false && this.expandRefund == false) { + this.expandPaymentDetails = !this.expandPaymentDetails; + } else { + this.expandRefund = false; + this.expandPaymentDetails = false; + } + }, + updateRefundType(refund){ + this.refundMethod = { + name: refund.name, + status: !this.refundMethod.status + } + }, + }, mixins: [componentHandler] } From 5d168b79379efc9adc1c748fd9d23cc3f2575525 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Mon, 6 Sep 2021 17:22:51 +0800 Subject: [PATCH 2/3] debug invoice --- .../Processors/CreateInvoiceTransactionProcessor.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Classes/Modules/Transactions/Processors/CreateInvoiceTransactionProcessor.php b/app/Classes/Modules/Transactions/Processors/CreateInvoiceTransactionProcessor.php index ff76d197..3a01bc8e 100644 --- a/app/Classes/Modules/Transactions/Processors/CreateInvoiceTransactionProcessor.php +++ b/app/Classes/Modules/Transactions/Processors/CreateInvoiceTransactionProcessor.php @@ -170,6 +170,7 @@ class CreateInvoiceTransactionProcessor $invoice_transaction = $this->createsTransaction->execute($po_order_transaction->booking, $transaction_object); $supplier = $this->fetchesCompany->execute(['id' => $transaction->receiver]); + dd($this->fetchesCompany->execute(['id' => $transaction->receiver])); $purchase_order_pdf = LaravelMpdf::loadView('pages.pdfs.purchase_order', ['invoice_transaction' => $invoice_transaction, 'po_order_transaction' => $po_order_transaction, 'supplier' => $supplier]); $document_object = new DocumentObject( From d27c3da27642c3a4ce8fe640c126dd04dc36e55b Mon Sep 17 00:00:00 2001 From: omair saleh Date: Mon, 6 Sep 2021 17:23:56 +0800 Subject: [PATCH 3/3] debug invoice --- .../Processors/CreateInvoiceTransactionProcessor.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/Classes/Modules/Transactions/Processors/CreateInvoiceTransactionProcessor.php b/app/Classes/Modules/Transactions/Processors/CreateInvoiceTransactionProcessor.php index 3a01bc8e..ff76d197 100644 --- a/app/Classes/Modules/Transactions/Processors/CreateInvoiceTransactionProcessor.php +++ b/app/Classes/Modules/Transactions/Processors/CreateInvoiceTransactionProcessor.php @@ -170,7 +170,6 @@ class CreateInvoiceTransactionProcessor $invoice_transaction = $this->createsTransaction->execute($po_order_transaction->booking, $transaction_object); $supplier = $this->fetchesCompany->execute(['id' => $transaction->receiver]); - dd($this->fetchesCompany->execute(['id' => $transaction->receiver])); $purchase_order_pdf = LaravelMpdf::loadView('pages.pdfs.purchase_order', ['invoice_transaction' => $invoice_transaction, 'po_order_transaction' => $po_order_transaction, 'supplier' => $supplier]); $document_object = new DocumentObject(