Api endpoint added money format.

This commit is contained in:
Cüneyt Şentürk
2021-06-22 17:44:38 +03:00
parent e22c6f5e1f
commit f1e5ec5229
9 changed files with 12 additions and 0 deletions

View File

@ -29,6 +29,7 @@ class Transfer extends TransformerAbstract
'to_account' => $income_transaction->account->name,
'to_account_id' => $income_transaction->account->id,
'amount' => $expense_transaction->amount,
'amount_format' => money($expense_transaction->amount, $expense_transaction->currency_code, true)->format(),
'currency_code' => $expense_transaction->currency_code,
'paid_at' => $expense_transaction->paid_at ? $expense_transaction->paid_at->toIso8601String() : '',
'created_by' => $model->created_by,