From e77e82bac2132fa528c3c7e8698a1ef4d5cbf39b Mon Sep 17 00:00:00 2001 From: edmondlang Date: Sun, 31 Jul 2022 15:58:20 +0800 Subject: [PATCH] move bill plz to shipping --- .../CreatePaymentTransactionLogic.php | 2 +- .../forms/PaymentFormComponent.vue | 91 ++++++++++++++++--- 2 files changed, 80 insertions(+), 13 deletions(-) diff --git a/app/Classes/Modules/Transactions/ControllersLogic/CreatePaymentTransactionLogic.php b/app/Classes/Modules/Transactions/ControllersLogic/CreatePaymentTransactionLogic.php index 04de4090..ff7c89ee 100644 --- a/app/Classes/Modules/Transactions/ControllersLogic/CreatePaymentTransactionLogic.php +++ b/app/Classes/Modules/Transactions/ControllersLogic/CreatePaymentTransactionLogic.php @@ -83,7 +83,7 @@ class CreatePaymentTransactionLogic extends AbstractControllerLogic $payment_method = PaymentMethodType::PAYMENT_GATEWAY; $billPlzBill = $this->createsBillplzBill->execute( $company_module->name, - $company_module->employees()->first()->email, + $company_module->employees()->first()->email ?? '', 'This payment is for the invoice number . ' . $invoice_transaction->bill_no, $amount, $billNumber, diff --git a/resources/assets/vue/components/paymentsBilling/forms/PaymentFormComponent.vue b/resources/assets/vue/components/paymentsBilling/forms/PaymentFormComponent.vue index 72d56a03..a1848de5 100644 --- a/resources/assets/vue/components/paymentsBilling/forms/PaymentFormComponent.vue +++ b/resources/assets/vue/components/paymentsBilling/forms/PaymentFormComponent.vue @@ -3,16 +3,67 @@
-

Outstanding: MYR {{ data.outstanding.toFixed(2) }}

- - - - - - -
+

Make Payment

+
- +
+
+
+
+ {{error}} +
+
+
+
+ + + + +
+
+
+
+
MYR
+
+
+
+
+
+
+
+
+
+
+
+ logo +
+

Online Banking

+
+
+
+
+
+
+
+ +
+

Manual Transfer

+
+
+
+
+
+
+
+
+
+
+
Cancel
+
+
+
Cancel
+
+
@@ -29,8 +80,15 @@ return { parameters : { amount: this.data.outstanding.toFixed(2), - transaction_id: this.data.id - } + transaction_id: this.data.id, + payment_method: '', + }, + paymentMethod: { + name: '', + id: '', + status: false + }, + error: '', } }, validations: { @@ -40,8 +98,17 @@ }, methods:{ submitForm(){ + this.parameters.payment_method = this.paymentMethod.id === 'payment_gateway' ? 5 : ''; this.submit(this.route('api.transaction.payment.create'), 'post', this.section, true, true); - } + }, + updatePaymentType(payment){ + this.paymentMethod = { + name: payment.name, + id: payment.id, + status: false, + } + this.error = ''; + }, }, mixins: [formHandler] }