applied new features of money package
This commit is contained in:
@@ -22,9 +22,9 @@ class Account extends JsonResource
|
||||
'number' => $this->number,
|
||||
'currency_code' => $this->currency_code,
|
||||
'opening_balance' => $this->opening_balance,
|
||||
'opening_balance_formatted' => money($this->opening_balance, $this->currency_code, true)->format(),
|
||||
'opening_balance_formatted' => money($this->opening_balance, $this->currency_code)->format(),
|
||||
'current_balance' => $this->balance,
|
||||
'current_balance_formatted' => money($this->balance, $this->currency_code, true)->format(),
|
||||
'current_balance_formatted' => money($this->balance, $this->currency_code)->format(),
|
||||
'bank_name' => $this->bank_name,
|
||||
'bank_phone' => $this->bank_phone,
|
||||
'bank_address' => $this->bank_address,
|
||||
|
||||
@@ -22,7 +22,7 @@ class Reconciliation extends JsonResource
|
||||
'started_at' => $this->started_at->toIso8601String(),
|
||||
'ended_at' => $this->ended_at->toIso8601String(),
|
||||
'closing_balance' => $this->closing_balance,
|
||||
'closing_balance_formatted' => money($this->closing_balance, default_currency(), true)->format(),
|
||||
'closing_balance_formatted' => money($this->closing_balance)->format(),
|
||||
'reconciled' => $this->reconciled,
|
||||
'created_from' => $this->created_from,
|
||||
'created_by' => $this->created_by,
|
||||
|
||||
@@ -25,7 +25,7 @@ class Transaction extends JsonResource
|
||||
'account_id' => $this->account_id,
|
||||
'paid_at' => $this->paid_at->toIso8601String(),
|
||||
'amount' => $this->amount,
|
||||
'amount_formatted' => money($this->amount, $this->currency_code, true)->format(),
|
||||
'amount_formatted' => money($this->amount, $this->currency_code)->format(),
|
||||
'currency_code' => $this->currency_code,
|
||||
'currency_rate' => $this->currency_rate,
|
||||
'document_id' => $this->document_id,
|
||||
|
||||
@@ -25,7 +25,7 @@ class Transfer extends JsonResource
|
||||
'to_account' => $income_transaction->account->name,
|
||||
'to_account_id' => $income_transaction->account->id,
|
||||
'amount' => $expense_transaction->amount,
|
||||
'amount_formatted' => money($expense_transaction->amount, $expense_transaction->currency_code, true)->format(),
|
||||
'amount_formatted' => money($expense_transaction->amount, $expense_transaction->currency_code)->format(),
|
||||
'currency_code' => $expense_transaction->currency_code,
|
||||
'paid_at' => $expense_transaction->paid_at ? $expense_transaction->paid_at->toIso8601String() : '',
|
||||
'created_from' => $this->created_from,
|
||||
|
||||
Reference in New Issue
Block a user