Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Expand charts with currency code.
James Cole36b0167eac9a
diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.phpindex 4f7f0b07a2..ea508d1cba 100644--- a/app/Http/Controllers/Chart/AccountController.php+++ b/app/Http/Controllers/Chart/AccountController.php@@ -154,6 +154,7 @@ class AccountController extends Controller'label' => (string) trans('firefly.spent'),'type' => 'bar','currency_symbol' => $currency->symbol,+ 'currency_code' => $currency->code,'entries' => $this->expandNames($tempData),];$chartData[$currencyId] = $dataSet;@@ -209,6 +210,7 @@ class AccountController extends Controller'budget_id' => $budgetId,'currency_name' => $journal['currency_name'],'currency_symbol' => $journal['currency_symbol'],+ 'currency_code' => $journal['currency_code'],];}$result[$key]['total'] = bcadd($journal['amount'], $result[$key]['total']);@@ -220,7 +222,7 @@ class AccountController extends Controller$budgetId = $row['budget_id'];$name = $names[$budgetId];$label = (string) trans('firefly.name_in_currency', ['name' => $name, 'currency' => $row['currency_name']]);- $chartData[$label] = ['amount' => $row['total'], 'currency_symbol' => $row['currency_symbol']];+ $chartData[$label] = ['amount' => $row['total'], 'currency_symbol' => $row['currency_symbol'], 'currency_code' => $row['currency_code']];}$data = $this->generator->multiCurrencyPieChart($chartData);@@ -281,6 +283,7 @@ class AccountController extends Controller'category_id' => (int) $journal['category_id'],'currency_name' => $journal['currency_name'],'currency_symbol' => $journal['currency_symbol'],+ 'currency_code' => $journal['currency_code'],];}$result[$key]['total'] = bcadd($journal['amount'], $result[$key]['total']);@@ -291,7 +294,7 @@ class AccountController extends Controller$categoryId = $row['category_id'];$name = $names[$categoryId] ?? '(unknown)';$label = (string) trans('firefly.name_in_currency', ['name' => $name, 'currency' => $row['currency_name']]);- $chartData[$label] = ['amount' => $row['total'], 'currency_symbol' => $row['currency_symbol']];+ $chartData[$label] = ['amount' => $row['total'], 'currency_symbol' => $row['currency_symbol'], 'currency_code' => $row['currency_code']];}$data = $this->generator->multiCurrencyPieChart($chartData);@@ -379,6 +382,7 @@ class AccountController extends Controller'category_id' => $journal['category_id'],'currency_name' => $journal['currency_name'],'currency_symbol' => $journal['currency_symbol'],+ 'currency_code' => $journal['currency_code'],];}$result[$key]['total'] = bcadd($journal['amount'], $result[$key]['total']);@@ -389,7 +393,7 @@ class AccountController extends Controller$categoryId = $row['category_id'];$name = $names[$categoryId] ?? '(unknown)';$label = (string) trans('firefly.name_in_currency', ['name' => $name, 'currency' => $row['currency_name']]);- $chartData[$label] = ['amount' => $row['total'], 'currency_symbol' => $row['currency_symbol']];+ $chartData[$label] = ['amount' => $row['total'], 'currency_symbol' => $row['currency_symbol'], 'currency_code' => $row['currency_code']];}$data = $this->generator->multiCurrencyPieChart($chartData);$cache->store($data);@@ -543,6 +547,7 @@ class AccountController extends Controller'label' => (string) trans('firefly.earned'),'type' => 'bar','currency_symbol' => $currency->symbol,+ 'currency_code' => $currency->code,'entries' => $this->expandNames($tempData),];$chartData[$currencyId] = $dataSet;@@ -576,6 +581,7 @@ class AccountController extends Controller$result = ['label' => sprintf('%s (%s)', $account->name, $currency->symbol),'currency_symbol' => $currency->symbol,+ 'currency_code' => $currency->code,'entries' => [],];$entries = [];diff --git a/app/Http/Controllers/Chart/BillController.php b/app/Http/Controllers/Chart/BillController.phpindex 1e7182b3f9..760e4b1b69 100644--- a/app/Http/Controllers/Chart/BillController.php+++ b/app/Http/Controllers/Chart/BillController.php@@ -81,12 +81,12 @@ class BillController extends Controllerforeach ($paid as $currencyId => $amount) {$currencies[$currencyId] = $currencies[$currencyId] ?? $currencyRepository->findNull($currencyId);$label = (string) trans('firefly.paid_in_currency', ['currency' => $currencies[$currencyId]->name]);- $chartData[$label] = ['amount' => $amount, 'currency_symbol' => $currencies[$currencyId]->symbol];+ $chartData[$label] = ['amount' => $amount, 'currency_symbol' => $currencies[$currencyId]->symbol, 'currency_code' => $currencies[$currencyId]->code];}foreach ($unpaid as $currencyId => $amount) {$currencies[$currencyId] = $currencies[$currencyId] ?? $currencyRepository->findNull($currencyId);$label = (string) trans('firefly.unpaid_in_currency', ['currency' => $currencies[$currencyId]->name]);- $chartData[$label] = ['amount' => $amount, 'currency_symbol' => $currencies[$currencyId]->symbol];+ $chartData[$label] = ['amount' => $amount, 'currency_symbol' => $currencies[$currencyId]->symbol, 'currency_code' => $currencies[$currencyId]->code];}$data = $this->generator->multiCurrencyPieChart($chartData);@@ -126,9 +126,9 @@ class BillController extends Controller);$chartData = [- ['type' => 'line', 'label' => (string) trans('firefly.min-amount'), 'currency_symbol' => $bill->transactionCurrency->symbol, 'entries' => []],- ['type' => 'line', 'label' => (string) trans('firefly.max-amount'), 'currency_symbol' => $bill->transactionCurrency->symbol, 'entries' => []],- ['type' => 'bar', 'label' => (string) trans('firefly.journal-amount'), 'currency_symbol' => $bill->transactionCurrency->symbol, 'entries' => []],+ ['type' => 'line', 'label' => (string) trans('firefly.min-amount'), 'currency_symbol' => $bill->transactionCurrency->symbol, 'currency_code' => $bill->transactionCurrency->code, 'entries' => []],+ ['type' => 'line', 'label' => (string) trans('firefly.max-amount'), 'currency_symbol' => $bill->transactionCurrency->symbol, 'currency_code' => $bill->transactionCurrency->code, 'entries' => []],+ ['type' => 'bar', 'label' => (string) trans('firefly.journal-amount'), 'currency_symbol' => $bill->transactionCurrency->symbol, 'currency_code' => $bill->transactionCurrency->code, 'entries' => []],];foreach ($journals as $journal) {diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.phpindex 7eb7540949..12a898f5a5 100644--- a/app/Http/Controllers/Chart/BudgetController.php+++ b/app/Http/Controllers/Chart/BudgetController.php@@ -137,6 +137,7 @@ class BudgetController extends Controller'label' => count($currencies) > 1 ? sprintf('%s (%s)', $budget->name, $currency['currency_name']) : $budget->name,'type' => 'bar','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],'entries' => $defaultEntries,];foreach ($currency['spent'] as $label => $spent) {@@ -193,6 +194,7 @@ class BudgetController extends Controller$data = $this->generator->singleSet((string)trans('firefly.left'), $entries);// add currency symbol from budget limit:$data['datasets'][0]['currency_symbol'] = $budgetLimit->transactionCurrency->symbol;+ $data['datasets'][0]['currency_code'] = $budgetLimit->transactionCurrency->code;$cache->store($data);return response()->json($data);@@ -241,6 +243,7 @@ class BudgetController extends Controller$result[$key] = $result[$key] ?? ['amount' => '0','currency_symbol' => $journal['currency_symbol'],+ 'currency_code' => $journal['currency_code'],'currency_name' => $journal['currency_name'],];$result[$key]['amount'] = bcadd($journal['amount'], $result[$key]['amount']);@@ -255,6 +258,7 @@ class BudgetController extends Controller= ['amount' => $info['amount'],'currency_symbol' => $info['currency_symbol'],+ 'currency_code' => $info['currency_code'],];}@@ -305,6 +309,8 @@ class BudgetController extends Controller$result[$key] = $result[$key] ?? ['amount' => '0','currency_symbol' => $journal['currency_symbol'],+ 'currency_code' => $journal['currency_code'],+ 'currency_symbol' => $journal['currency_symbol'],'currency_name' => $journal['currency_name'],];$result[$key]['amount'] = bcadd($journal['amount'], $result[$key]['amount']);@@ -318,6 +324,7 @@ class BudgetController extends Controller$chartData[$title] = ['amount' => $info['amount'],'currency_symbol' => $info['currency_symbol'],+ 'currency_code' => $info['currency_code'],];}$data = $this->generator->multiCurrencyPieChart($chartData);@@ -369,6 +376,7 @@ class BudgetController extends Controller$result[$key] = $result[$key] ?? ['amount' => '0','currency_symbol' => $journal['currency_symbol'],+ 'currency_code' => $journal['currency_code'],'currency_name' => $journal['currency_name'],];$result[$key]['amount'] = bcadd($journal['amount'], $result[$key]['amount']);@@ -383,6 +391,7 @@ class BudgetController extends Controller$chartData[$title] = ['amount' => $info['amount'],'currency_symbol' => $info['currency_symbol'],+ 'currency_code' => $info['currency_code'],];}@@ -501,15 +510,17 @@ class BudgetController extends Controller$preferredRange = app('navigation')->preferredRangeFormat($start, $end);$chartData = [[- 'label' => (string)trans('firefly.box_spent_in_currency', ['currency' => $currency->name]),+ 'label' => (string) trans('firefly.box_spent_in_currency', ['currency' => $currency->name]),'type' => 'bar','entries' => [],'currency_symbol' => $currency->symbol,+ 'currency_code' => $currency->code,],[- 'label' => (string)trans('firefly.box_budgeted_in_currency', ['currency' => $currency->name]),+ 'label' => (string) trans('firefly.box_budgeted_in_currency', ['currency' => $currency->name]),'type' => 'bar','currency_symbol' => $currency->symbol,+ 'currency_code' => $currency->code,'entries' => [],],];diff --git a/app/Http/Controllers/Chart/BudgetReportController.php b/app/Http/Controllers/Chart/BudgetReportController.phpindex 5d16a52981..0ab328e656 100644--- a/app/Http/Controllers/Chart/BudgetReportController.php+++ b/app/Http/Controllers/Chart/BudgetReportController.php@@ -88,6 +88,7 @@ class BudgetReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];foreach ($budget['transaction_journals'] as $journal) {$amount = app('steam')->positive($journal['amount']);@@ -124,6 +125,7 @@ class BudgetReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);@@ -160,6 +162,7 @@ class BudgetReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);@@ -201,6 +204,7 @@ class BudgetReportController extends Controller),'type' => 'bar','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],'currency_id' => $currency['currency_id'],'entries' => $this->makeEntries($start, $end),];@@ -243,6 +247,7 @@ class BudgetReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);diff --git a/app/Http/Controllers/Chart/CategoryReportController.php b/app/Http/Controllers/Chart/CategoryReportController.phpindex 2752d6c994..28d155a5fe 100644--- a/app/Http/Controllers/Chart/CategoryReportController.php+++ b/app/Http/Controllers/Chart/CategoryReportController.php@@ -87,6 +87,7 @@ class CategoryReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);@@ -120,6 +121,7 @@ class CategoryReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];foreach ($category['transaction_journals'] as $journal) {$amount = app('steam')->positive($journal['amount']);@@ -156,6 +158,7 @@ class CategoryReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];foreach ($category['transaction_journals'] as $journal) {$amount = app('steam')->positive($journal['amount']);@@ -192,6 +195,7 @@ class CategoryReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);@@ -227,6 +231,7 @@ class CategoryReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);@@ -267,6 +272,7 @@ class CategoryReportController extends Controller),'type' => 'bar','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],'currency_id' => $currency['currency_id'],'entries' => $this->makeEntries($start, $end),];@@ -293,6 +299,7 @@ class CategoryReportController extends Controller),'type' => 'bar','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],'currency_id' => $currency['currency_id'],'entries' => $this->makeEntries($start, $end),];@@ -335,6 +342,7 @@ class CategoryReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);@@ -370,6 +378,7 @@ class CategoryReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);diff --git a/app/Http/Controllers/Chart/DoubleReportController.php b/app/Http/Controllers/Chart/DoubleReportController.phpindex 287a2ff551..87c62cea35 100644--- a/app/Http/Controllers/Chart/DoubleReportController.php+++ b/app/Http/Controllers/Chart/DoubleReportController.php@@ -89,6 +89,7 @@ class DoubleReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);@@ -123,6 +124,7 @@ class DoubleReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);@@ -157,6 +159,7 @@ class DoubleReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);@@ -201,6 +204,7 @@ class DoubleReportController extends Controller),'type' => 'bar','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],'currency_id' => $currency['currency_id'],'entries' => $this->makeEntries($start, $end),];@@ -226,6 +230,7 @@ class DoubleReportController extends Controller),'type' => 'bar','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],'currency_id' => $currency['currency_id'],'entries' => $this->makeEntries($start, $end),];@@ -273,6 +278,7 @@ class DoubleReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);@@ -290,6 +296,7 @@ class DoubleReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);@@ -331,6 +338,7 @@ class DoubleReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);@@ -348,6 +356,7 @@ class DoubleReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.phpindex e9a9c4d1e8..c6332d14b2 100644--- a/app/Http/Controllers/Chart/ReportController.php+++ b/app/Http/Controllers/Chart/ReportController.php@@ -117,6 +117,7 @@ class ReportController extends Controller'label' => 'Net worth in ' . $netWorthItem['currency']->name,'type' => 'line','currency_symbol' => $netWorthItem['currency']->symbol,+ 'currency_code' => $netWorthItem['currency']->code,'entries' => [],];}@@ -217,6 +218,7 @@ class ReportController extends Controller'backgroundColor' => 'rgba(0, 141, 76, 0.5)', // green'currency_id' => $currency['currency_id'],'currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],'entries' => [],];$expense = [@@ -225,6 +227,7 @@ class ReportController extends Controller'backgroundColor' => 'rgba(219, 68, 55, 0.5)', // red'currency_id' => $currency['currency_id'],'currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],'entries' => [],];diff --git a/app/Http/Controllers/Chart/TagReportController.php b/app/Http/Controllers/Chart/TagReportController.phpindex ff8a8b1732..a187e74b55 100644--- a/app/Http/Controllers/Chart/TagReportController.php+++ b/app/Http/Controllers/Chart/TagReportController.php@@ -87,6 +87,7 @@ class TagReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);@@ -122,6 +123,7 @@ class TagReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);@@ -157,6 +159,7 @@ class TagReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);@@ -193,6 +196,7 @@ class TagReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);@@ -228,6 +232,7 @@ class TagReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);@@ -270,6 +275,7 @@ class TagReportController extends Controller),'type' => 'bar','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],'currency_id' => $currency['currency_id'],'entries' => $this->makeEntries($start, $end),];@@ -296,6 +302,7 @@ class TagReportController extends Controller),'type' => 'bar','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],'currency_id' => $currency['currency_id'],'entries' => $this->makeEntries($start, $end),];@@ -338,6 +345,7 @@ class TagReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);@@ -373,6 +381,7 @@ class TagReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];$amount = app('steam')->positive($journal['amount']);$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);@@ -406,6 +415,7 @@ class TagReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];foreach ($tag['transaction_journals'] as $journal) {$amount = app('steam')->positive($journal['amount']);@@ -440,6 +450,7 @@ class TagReportController extends Controller$result[$title] = $result[$title] ?? ['amount' => '0','currency_symbol' => $currency['currency_symbol'],+ 'currency_code' => $currency['currency_code'],];foreach ($tag['transaction_journals'] as $journal) {$amount = app('steam')->positive($journal['amount']);diff --git a/app/Http/Controllers/Chart/TransactionController.php b/app/Http/Controllers/Chart/TransactionController.phpindex 8516fb60ce..2f8061e919 100644--- a/app/Http/Controllers/Chart/TransactionController.php+++ b/app/Http/Controllers/Chart/TransactionController.php@@ -87,6 +87,7 @@ class TransactionController extends Controller$data[$title] = $data[$title] ?? ['amount' => '0','currency_symbol' => $journal['currency_symbol'],+ 'currency_code' => $journal['currency_code'],];$data[$title]['amount'] = bcadd($data[$title]['amount'], $journal['amount']);}@@ -145,6 +146,7 @@ class TransactionController extends Controller$data[$title] = $data[$title] ?? ['amount' => '0','currency_symbol' => $journal['currency_symbol'],+ 'currency_code' => $journal['currency_code'],];$data[$title]['amount'] = bcadd($data[$title]['amount'], $journal['amount']);@@ -204,6 +206,7 @@ class TransactionController extends Controller$data[$title] = $data[$title] ?? ['amount' => '0','currency_symbol' => $journal['currency_symbol'],+ 'currency_code' => $journal['currency_code'],];$data[$title]['amount'] = bcadd($data[$title]['amount'], $journal['amount']);}@@ -262,6 +265,7 @@ class TransactionController extends Controller$data[$title] = $data[$title] ?? ['amount' => '0','currency_symbol' => $journal['currency_symbol'],+ 'currency_code' => $journal['currency_code'],];$data[$title]['amount'] = bcadd($data[$title]['amount'], $journal['amount']);