diff --git a/app/Http/Resources/ListTransactionJobResource.php b/app/Http/Resources/ListTransactionJobResource.php index b8908ee6..1547c09e 100644 --- a/app/Http/Resources/ListTransactionJobResource.php +++ b/app/Http/Resources/ListTransactionJobResource.php @@ -18,6 +18,7 @@ class ListTransactionJobResource extends JsonResource { $booking = null; //cief todo: 66 $bank = null; + //Check if Transaction of type PAYMENT has an override for recipient bank - starts if(in_array((int)$this->type, [TransactionType::BILL, TransactionType::REFUND])){ $booking = $this->owner->owner; $bank = $this->owner->bank ?? $booking->bank; @@ -26,6 +27,7 @@ class ListTransactionJobResource extends JsonResource $booking = $this->owner; $bank = $this->bank ?? $booking->bank; } + //Check if Transaction of type PAYMENT has an override for recipient bank - ends $days = $this->created_at->endOfDay()->addWeekdays($booking->service_id === 3 ? 3 : 1); return [ diff --git a/app/Http/Resources/PaymentTransactionResource.php b/app/Http/Resources/PaymentTransactionResource.php index d0549c38..01da84b2 100644 --- a/app/Http/Resources/PaymentTransactionResource.php +++ b/app/Http/Resources/PaymentTransactionResource.php @@ -20,6 +20,7 @@ class PaymentTransactionResource extends JsonResource { $booking = null; //cief todo: 66 $bank = null; + //Check if Transaction of type PAYMENT has an override for recipient bank - starts if(in_array((int)$this->type, [TransactionType::BILL, TransactionType::REFUND])){ $booking = $this->owner->owner; $bank = $this->owner->bank ?? $booking->bank; @@ -28,6 +29,7 @@ class PaymentTransactionResource extends JsonResource $booking = $this->owner; $bank = $this->bank ?? $booking->bank; } + //Check if Transaction of type PAYMENT has an override for recipient bank - ends $booking_marking = ''; switch ($this->owner_type) { diff --git a/app/Http/Resources/TransactionResource.php b/app/Http/Resources/TransactionResource.php index 595ce443..e14c32c0 100644 --- a/app/Http/Resources/TransactionResource.php +++ b/app/Http/Resources/TransactionResource.php @@ -21,6 +21,7 @@ class TransactionResource extends JsonResource { $booking = null; //cief todo: 66 $bank = null; + //Check if Transaction of type PAYMENT has an override for recipient bank - starts if(in_array((int)$this->type, [TransactionType::BILL, TransactionType::REFUND, TransactionType::SUPPLIER_REFUND])){ $booking = $this->owner->owner; $bank = $this->owner->bank ?? $booking->bank; @@ -29,6 +30,7 @@ class TransactionResource extends JsonResource $booking = $this->owner; $bank = $this->bank ?? $booking->bank; } + //Check if Transaction of type PAYMENT has an override for recipient bank - ends $days = $this->created_at->endOfDay()->addWeekdays($booking->service_id === 3 ? 3 : 1); return [