diff --git a/app/Http/Resources/TransactionResource.php b/app/Http/Resources/TransactionResource.php index f8620f05..595ce443 100644 --- a/app/Http/Resources/TransactionResource.php +++ b/app/Http/Resources/TransactionResource.php @@ -23,11 +23,11 @@ class TransactionResource extends JsonResource $bank = null; if(in_array((int)$this->type, [TransactionType::BILL, TransactionType::REFUND, TransactionType::SUPPLIER_REFUND])){ $booking = $this->owner->owner; - $bank = $this->owner->bank; + $bank = $this->owner->bank ?? $booking->bank; } else{ $booking = $this->owner; - $bank = $this->bank; + $bank = $this->bank ?? $booking->bank; } $days = $this->created_at->endOfDay()->addWeekdays($booking->service_id === 3 ? 3 : 1); diff --git a/resources/assets/vue/components/bookings/elements/PaymentHistoryComponent.vue b/resources/assets/vue/components/bookings/elements/PaymentHistoryComponent.vue index cbbb60c4..3e026cbb 100644 --- a/resources/assets/vue/components/bookings/elements/PaymentHistoryComponent.vue +++ b/resources/assets/vue/components/bookings/elements/PaymentHistoryComponent.vue @@ -33,6 +33,12 @@
| Client Booking Date | '; + // echo 'Payment Type | '; + // echo 'Marking | '; + // echo 'Customer Payment Currency | '; + // echo 'Customer Payment Amount | '; + // echo 'Reference No. | '; + // echo 'Booking Amount Currency | '; + // echo 'CNY | '; + // echo 'Service | '; + // echo 'Days | '; + // echo 'Cust Supplier Acc Type | '; + // echo 'Cust Supplier Acc Name | '; + // echo '||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| '.$payment->updated_at->format('d-M-y').' | '; - echo ''.$booking->marking.' | '; echo ''.\App\Classes\ValueObjects\Constants\PaymentMethodType::PAYMENT_METHODS_ID[$payment->payment_method].' | '; + echo ''.$booking->marking.' | '; echo ''.$payment->currency->short_code.' | '; echo ''.number_format(bcsub($payment->amount, $refunds, 7), 5, '.', '').' | '; echo ''.$booking->company->reference.' | '; - echo ''; echo ' | '.$payment->original_currency->short_code.' | '; echo ''.number_format(bcsub($payment->original_amount, $original_refunds, 7), 5, '.', '').' | '; - echo ''; echo ' | '.$booking->service->name.' | '; echo ''.$payment->updated_at->diffForHumans().' | '; echo ''.$bankType.' | ';