mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-25 15:34:02 +00:00
fix and update the functionality and the ui for accounting automation
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class BankStatementTransactionResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'account_number' => $this->statement->account->number,
|
||||
'account_type' => $this->statement->account->type,
|
||||
'account_name' => $this->statement->account->name,
|
||||
'account_statement_id' => $this->statement->id,
|
||||
'account_statement_date_from' => $this->statement->date_from,
|
||||
'account_statement_date_to' => $this->statement->date_to,
|
||||
'posting_date' => $this->posting_date->format('d-m-Y g:i A'),
|
||||
'amount' => $this->amount,
|
||||
'transaction_description_1' => $this->transaction_description,
|
||||
'transaction_description_2' => $this->transaction_description_2,
|
||||
'transaction_description_3' => $this->transaction_description_3,
|
||||
'transaction_description_4' => $this->transaction_description_4,
|
||||
'transaction_description_5' => $this->transaction_description_5,
|
||||
'owners' => BankStatementTransactionOwnerResource::collection($this->owners)
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user