mirror of
https://gitlab.com/uldvstar/exchange-2.0.git
synced 2026-08-24 15:04:22 +00:00
back
This commit is contained in:
@@ -19,7 +19,7 @@ class TransactionResource extends JsonResource
|
||||
{
|
||||
|
||||
$booking = in_array((int)$this->type, [TransactionType::BILL, TransactionType::REFUND])? $this->owner->owner : $this->owner;
|
||||
// $days = $this->created_at->endOfDay()->addWeekdays($booking->service_id === 3 ? 3 : 1);
|
||||
$days = $this->created_at->endOfDay()->addWeekdays($booking->service_id === 3 ? 3 : 1);
|
||||
|
||||
return [
|
||||
'id' => $this->id,
|
||||
@@ -28,7 +28,7 @@ class TransactionResource extends JsonResource
|
||||
'bill_no' => $this->bill_no,
|
||||
'payment_reference' => $this->payment_reference,
|
||||
'payment_method' => (float) $this->payment_method,
|
||||
// 'recipient_bank_account' => new BankResource($booking->bank),
|
||||
'recipient_bank_account' => new BankResource($booking->bank),
|
||||
'issuer_name' => $this->issuerCompany->name,
|
||||
'amount' => (double) $this->amount,
|
||||
'original_amount' => (double) $this->original_amount,
|
||||
@@ -45,8 +45,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' => $days->gt(Carbon::now()) ? '+' : '-',
|
||||
// 'duration' => $days->diff(Carbon::now())->format('%d'),
|
||||
'value' => $days->gt(Carbon::now()) ? '+' : '-',
|
||||
'duration' => $days->diff(Carbon::now())->format('%d'),
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user