diff --git a/app/Classes/General/Eloquent/Filters/PaymentMethodNotIn.php b/app/Classes/General/Eloquent/Filters/PaymentMethodNotIn.php new file mode 100644 index 00000000..239bb8df --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/PaymentMethodNotIn.php @@ -0,0 +1,20 @@ +whereNotIn('payment_method', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingPaymentLogic.php b/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingPaymentLogic.php index 38080fff..87e6866f 100644 --- a/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingPaymentLogic.php +++ b/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingPaymentLogic.php @@ -121,7 +121,7 @@ class CreateBookingPaymentLogic extends AbstractControllerLogic /** @var Wallet $wallet */ $wallet = $booking->company->wallets()->first(); - if($wallet->amount < $amount){ + if($wallet->amount < round($amount, 2)){ throw new MalformedRequestException('Insufficient wallet balance. Please Top up your wallet.'); } diff --git a/app/Http/Resources/TransactionResource.php b/app/Http/Resources/TransactionResource.php index efcdb99c..6676fc0b 100644 --- a/app/Http/Resources/TransactionResource.php +++ b/app/Http/Resources/TransactionResource.php @@ -17,7 +17,7 @@ class TransactionResource extends JsonResource public function toArray($request) { $booking = (int)$this->type === TransactionType::BILL ? $this->owner->owner : $this->booking; - $days = Carbon::parse($this->created_at)->addDays($booking->service_id === 1 ? 1 : 2); + $days = Carbon::parse($this->created_at->format('d-m-Y'))->addDays($booking->service_id === 1 ? 2 : 3); return [ 'id' => $this->id, diff --git a/resources/assets/vue/components/bookings/elements/BookingComponent.vue b/resources/assets/vue/components/bookings/elements/BookingComponent.vue index c0563a15..9ff3fe9c 100644 --- a/resources/assets/vue/components/bookings/elements/BookingComponent.vue +++ b/resources/assets/vue/components/bookings/elements/BookingComponent.vue @@ -42,7 +42,7 @@
Payable Amount
{{this.item.amount}} {{this.item.fixed_currency.short_code}}
-
+
status
{{item.status === 3 ? 'Complete' : 'In Progress'}} diff --git a/resources/assets/vue/components/bookings/elements/UrgentTransactionComponent.vue b/resources/assets/vue/components/bookings/elements/UrgentTransactionComponent.vue index 37de4dcc..acf9cbf9 100644 --- a/resources/assets/vue/components/bookings/elements/UrgentTransactionComponent.vue +++ b/resources/assets/vue/components/bookings/elements/UrgentTransactionComponent.vue @@ -4,7 +4,7 @@

{{item.documents ? item.documents.created_at : item.updated_at}}

-

1688.com

+

1688.com,

{{item.interval.value}} {{item.interval.duration}} days

{{item.booking.marking}}

diff --git a/resources/assets/vue/components/bookings/forms/BookingPaymentQuotationComponent.vue b/resources/assets/vue/components/bookings/forms/BookingPaymentQuotationComponent.vue index d43eb47b..ca515606 100644 --- a/resources/assets/vue/components/bookings/forms/BookingPaymentQuotationComponent.vue +++ b/resources/assets/vue/components/bookings/forms/BookingPaymentQuotationComponent.vue @@ -529,7 +529,7 @@ computed: { walletOutstanding(){ let walletBalance = this.data.company.wallet ? this.data.company.wallet.amount : 0; - return walletBalance - this.calculation.total; + return (walletBalance - this.calculation.total).toFixed(2); } }, methods: { diff --git a/resources/assets/vue/components/bookings/sections/SupplierPendingOrdersSectionComponent.vue b/resources/assets/vue/components/bookings/sections/SupplierPendingOrdersSectionComponent.vue index 8d1b279e..897ab360 100644 --- a/resources/assets/vue/components/bookings/sections/SupplierPendingOrdersSectionComponent.vue +++ b/resources/assets/vue/components/bookings/sections/SupplierPendingOrdersSectionComponent.vue @@ -114,7 +114,7 @@
- + diff --git a/resources/assets/vue/components/bookings/sections/UrgentListSectionComponent.vue b/resources/assets/vue/components/bookings/sections/UrgentListSectionComponent.vue index eb3aff4d..887af3f4 100644 --- a/resources/assets/vue/components/bookings/sections/UrgentListSectionComponent.vue +++ b/resources/assets/vue/components/bookings/sections/UrgentListSectionComponent.vue @@ -47,7 +47,7 @@ }, methods: { fetchList(Page = 1){ - this.submit(route('api.transaction.list') + '?page='+ Page +'&filters=' + JSON.stringify({status: 2, type: 1, per_page: 50, order_by: { + this.submit(route('api.transaction.list') + '?page='+ Page +'&filters=' + JSON.stringify({status: 2, type: 1, owner_type: 'App\\Models\\Booking', per_page: 50, order_by: { column: 'created_at', DESC: true }}), 'get', 'urgentListSection', false, true) diff --git a/resources/assets/vue/components/wallets/elements/WalletComponent.vue b/resources/assets/vue/components/wallets/elements/WalletComponent.vue index 486f821d..44e744d2 100644 --- a/resources/assets/vue/components/wallets/elements/WalletComponent.vue +++ b/resources/assets/vue/components/wallets/elements/WalletComponent.vue @@ -10,7 +10,7 @@
-
Congratulation! You've earned and achievement
+
Congratulation! You've earned an achievement
diff --git a/resources/assets/vue/components/wallets/forms/WalletTopUpFormComponent.vue b/resources/assets/vue/components/wallets/forms/WalletTopUpFormComponent.vue index 23f56c46..7e2cfd47 100644 --- a/resources/assets/vue/components/wallets/forms/WalletTopUpFormComponent.vue +++ b/resources/assets/vue/components/wallets/forms/WalletTopUpFormComponent.vue @@ -119,7 +119,7 @@ parameters: { amount: { required, - minValue: minValue(this.minValue), + minValue: 0, }, reference: { required: requiredIf(function () { return this.parameters.transaction_type !== 0 }) diff --git a/resources/views/pages/payments.blade.php b/resources/views/pages/payments.blade.php index 00e480c3..14517e6e 100644 --- a/resources/views/pages/payments.blade.php +++ b/resources/views/pages/payments.blade.php @@ -11,7 +11,7 @@
- +