diff --git a/app/Classes/General/Eloquent/Filters/TransactionServiceId.php b/app/Classes/General/Eloquent/Filters/TransactionServiceId.php new file mode 100644 index 00000000..fa0cdba5 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/TransactionServiceId.php @@ -0,0 +1,23 @@ +where('owner_type', Booking::class)->whereHas('booking', function ($query) use($value) { + $query->where('service_id', $value); + }); + } + +} \ No newline at end of file diff --git a/resources/assets/vue/components/bookings/forms/BookingPaymentQuotationComponent.vue b/resources/assets/vue/components/bookings/forms/BookingPaymentQuotationComponent.vue index 908ce43b..4c859f8e 100644 --- a/resources/assets/vue/components/bookings/forms/BookingPaymentQuotationComponent.vue +++ b/resources/assets/vue/components/bookings/forms/BookingPaymentQuotationComponent.vue @@ -455,15 +455,15 @@
change the payment method?
Credit
@@ -82,6 +82,10 @@ amount: { type: String, default: '0.00' + }, + creditable: { + type: Boolean, + default: false } }, data(){ @@ -89,7 +93,7 @@ isLoading: false, transactionType: 0, parameters: { - company_id: this.data, + company_id: this.data.id, amount: '0.00', } } @@ -118,7 +122,7 @@ submitForm() { this.isLoading = true; - if (this.transactionType !== 0) { + if (this.transactionType !== 0 && this.creditable) { this.submit(this.route('api.wallet.'+(this.transactionType === 2 ? 'debit': 'credit')), 'post', '', true, true); return; }