Merge branch 'dillon/66.2-exchange-debug' into 'master'

Comments on code

See merge request CIEFWorldwideSdnBhd/exchange-2.0!173
This commit is contained in:
Dillon Ngo
2024-08-12 02:50:34 +00:00
3 changed files with 6 additions and 0 deletions
@@ -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 [
@@ -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) {
@@ -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 [