fix bill seeder

This commit is contained in:
omair saleh
2022-02-22 00:52:05 +08:00
parent 94857d2464
commit 85c9853b15
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -23,7 +23,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($this->when((int) $this->type === TransactionType::BILL, $this->booking->bank)),
'recipient_bank_account' => new BankResource($this->recipientBankAccount),
'issuer_name' => $this->issuerCompany->name,
'amount' => (double) $this->amount,
'original_amount' => (double) $this->original_amount,
@@ -35,7 +35,6 @@ class TransactionResource extends JsonResource
'status' => (int) $this->status,
'details' => TransactionDetailResource::collection($this->transactionDetails),
'documents' => new DocumentResource($this->documents()->first()),
// 'transaction_payment' => new TransactionResource($this->when((int) $this->type === TransactionType::BILL, $this->owner)),
'transaction_bill' => new TransactionResource($this->when((int) $this->type === TransactionType::PAYMENT, $this->transactions()->first())),
'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'),