From 1865523bd9b1468ad67cad19465259bf1477f524 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Tue, 1 Mar 2022 21:29:16 +0800 Subject: [PATCH 1/2] update day limit and supplier name for currency roders --- app/Http/Resources/TransactionResource.php | 5 +++-- .../components/bookings/elements/PaymentProofComponent.vue | 6 ++++++ .../bookings/elements/SupplierPendingOrderComponent.vue | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/Http/Resources/TransactionResource.php b/app/Http/Resources/TransactionResource.php index 69e0a264..31488082 100644 --- a/app/Http/Resources/TransactionResource.php +++ b/app/Http/Resources/TransactionResource.php @@ -17,6 +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 : 3); return [ 'id' => $this->id, @@ -41,8 +42,8 @@ class TransactionResource extends JsonResource 'expires_on' => Carbon::parse($this->expires_on)->format('d-m-Y h:i:s A'), 'updated_at' => Carbon::parse($this->updated_at)->format('d-m-Y h:i:s A'), 'interval' => [ - 'value' => (Carbon::parse($this->created_at)->addDays(3)->gt(Carbon::now()) ) ? '+' : '-' , - 'duration' => Carbon::parse($this->created_at)->addDays(3)->diff(Carbon::now())->format('%d'), + 'value' => $days->gt(Carbon::now()) ? '+' : '-', + 'duration' => $days->diff(Carbon::now())->format('%d'), ] ]; } diff --git a/resources/assets/vue/components/bookings/elements/PaymentProofComponent.vue b/resources/assets/vue/components/bookings/elements/PaymentProofComponent.vue index 97480ac0..59484c81 100644 --- a/resources/assets/vue/components/bookings/elements/PaymentProofComponent.vue +++ b/resources/assets/vue/components/bookings/elements/PaymentProofComponent.vue @@ -28,6 +28,12 @@ {{item.booking.company.reference}} +
+
Supplier
+
+ {{item.issuer_name}} +
+
diff --git a/resources/assets/vue/components/bookings/elements/SupplierPendingOrderComponent.vue b/resources/assets/vue/components/bookings/elements/SupplierPendingOrderComponent.vue index 9e2e1415..80eb3932 100644 --- a/resources/assets/vue/components/bookings/elements/SupplierPendingOrderComponent.vue +++ b/resources/assets/vue/components/bookings/elements/SupplierPendingOrderComponent.vue @@ -19,7 +19,7 @@ {{item.payment_method === 5 || item.payment_method === 4 ? item.updated_at : item.documents.created_at}}
-
+
timer
{{item.interval.value}} From 1aeacf731b3fbb75ddb1219a75baad5b48ca3cb1 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Tue, 1 Mar 2022 21:30:20 +0800 Subject: [PATCH 2/2] update day limit and supplier name for currency roders --- app/Http/Resources/TransactionResource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Resources/TransactionResource.php b/app/Http/Resources/TransactionResource.php index 31488082..efcdb99c 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 : 3); + $days = Carbon::parse($this->created_at)->addDays($booking->service_id === 1 ? 1 : 2); return [ 'id' => $this->id,