mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-18 07:38:29 +00:00
More PHP8.4 updates
This commit is contained in:
@@ -250,7 +250,7 @@ class AccountController extends Controller
|
||||
'currency_code' => $journal['currency_code'],
|
||||
];
|
||||
}
|
||||
$result[$key]['total'] = bcadd($journal['amount'], $result[$key]['total']);
|
||||
$result[$key]['total'] = bcadd((string) $journal['amount'], $result[$key]['total']);
|
||||
}
|
||||
|
||||
$names = $this->getBudgetNames($budgetIds);
|
||||
@@ -312,7 +312,7 @@ class AccountController extends Controller
|
||||
'currency_code' => $journal['currency_code'],
|
||||
];
|
||||
}
|
||||
$result[$key]['total'] = bcadd($journal['amount'], $result[$key]['total']);
|
||||
$result[$key]['total'] = bcadd((string) $journal['amount'], $result[$key]['total']);
|
||||
}
|
||||
$names = $this->getCategoryNames(array_keys($result));
|
||||
|
||||
@@ -401,7 +401,7 @@ class AccountController extends Controller
|
||||
'currency_code' => $journal['currency_code'],
|
||||
];
|
||||
}
|
||||
$result[$key]['total'] = bcadd($journal['amount'], $result[$key]['total']);
|
||||
$result[$key]['total'] = bcadd((string) $journal['amount'], $result[$key]['total']);
|
||||
}
|
||||
|
||||
$names = $this->getCategoryNames(array_keys($result));
|
||||
|
||||
@@ -177,12 +177,12 @@ class BillController extends Controller
|
||||
if (!array_key_exists($date, $chartData[2]['entries'])) {
|
||||
$chartData[2]['entries'][$date] = '0';
|
||||
}
|
||||
$amount = bcmul($journal['amount'], '-1');
|
||||
$amount = bcmul((string) $journal['amount'], '-1');
|
||||
if ($this->convertToNative && $currencyId !== $journal['currency_id']) {
|
||||
$amount = bcmul($journal['native_amount'] ?? '0', '-1');
|
||||
}
|
||||
if ($this->convertToNative && $currencyId === $journal['foreign_currency_id']) {
|
||||
$amount = bcmul($journal['foreign_amount'], '-1');
|
||||
$amount = bcmul((string) $journal['foreign_amount'], '-1');
|
||||
}
|
||||
|
||||
$chartData[2]['entries'][$date] = bcadd($chartData[2]['entries'][$date], $amount); // amount of journal
|
||||
|
||||
@@ -110,7 +110,7 @@ class BudgetController extends Controller
|
||||
/** @var Carbon $loopEnd */
|
||||
$loopEnd = app('navigation')->endOfPeriod($loopStart, $step);
|
||||
$spent = $this->opsRepository->sumExpenses($loopStart, $loopEnd, null, $collection); // this method already converts to native.
|
||||
$label = trim(app('navigation')->periodShow($loopStart, $step));
|
||||
$label = trim((string) app('navigation')->periodShow($loopStart, $step));
|
||||
|
||||
foreach ($spent as $row) {
|
||||
$currencyId = $row['currency_id'];
|
||||
@@ -133,7 +133,7 @@ class BudgetController extends Controller
|
||||
'entries' => $defaultEntries,
|
||||
];
|
||||
foreach ($currency['spent'] as $label => $spent) {
|
||||
$chartData[$currencyId]['entries'][$label] = bcmul($spent, '-1');
|
||||
$chartData[$currencyId]['entries'][$label] = bcmul((string) $spent, '-1');
|
||||
}
|
||||
}
|
||||
$data = $this->generator->multiSet(array_values($chartData));
|
||||
@@ -180,7 +180,7 @@ class BudgetController extends Controller
|
||||
$current = clone $start;
|
||||
$expenses = $this->opsRepository->sumExpenses($current, $current, null, $budgetCollection, $budgetLimit->transactionCurrency, $this->convertToNative);
|
||||
$spent = $expenses[$currency->id]['sum'] ?? '0';
|
||||
$amount = bcadd($amount, $spent);
|
||||
$amount = bcadd((string) $amount, $spent);
|
||||
$format = $start->isoFormat((string) trans('config.month_and_day_js', [], $locale));
|
||||
$entries[$format] = $amount;
|
||||
|
||||
@@ -257,7 +257,7 @@ class BudgetController extends Controller
|
||||
'currency_code' => $code,
|
||||
'currency_name' => $name,
|
||||
];
|
||||
$result[$key]['amount'] = bcadd($amount, $result[$key]['amount']);
|
||||
$result[$key]['amount'] = bcadd((string) $amount, $result[$key]['amount']);
|
||||
}
|
||||
|
||||
$names = $this->getAccountNames(array_keys($result));
|
||||
@@ -341,7 +341,7 @@ class BudgetController extends Controller
|
||||
'currency_code' => $code,
|
||||
'currency_name' => $name,
|
||||
];
|
||||
$result[$key]['amount'] = bcadd($amount, $result[$key]['amount']);
|
||||
$result[$key]['amount'] = bcadd((string) $amount, $result[$key]['amount']);
|
||||
}
|
||||
|
||||
$names = $this->getCategoryNames(array_keys($result));
|
||||
@@ -424,7 +424,7 @@ class BudgetController extends Controller
|
||||
'currency_code' => $code,
|
||||
'currency_name' => $name,
|
||||
];
|
||||
$result[$key]['amount'] = bcadd($amount, $result[$key]['amount']);
|
||||
$result[$key]['amount'] = bcadd((string) $amount, $result[$key]['amount']);
|
||||
}
|
||||
|
||||
$names = $this->getAccountNames(array_keys($result));
|
||||
|
||||
@@ -85,7 +85,7 @@ class BudgetReportController extends Controller
|
||||
];
|
||||
foreach ($budget['transaction_journals'] as $journal) {
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -115,7 +115,7 @@ class BudgetReportController extends Controller
|
||||
];
|
||||
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -145,7 +145,7 @@ class BudgetReportController extends Controller
|
||||
];
|
||||
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -186,7 +186,7 @@ class BudgetReportController extends Controller
|
||||
$key = $journal['date']->isoFormat($format);
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$chartData[$spentKey]['entries'][$key] ??= '0';
|
||||
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
|
||||
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -233,7 +233,7 @@ class BudgetReportController extends Controller
|
||||
];
|
||||
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ class CategoryController extends Controller
|
||||
$date = $journal['date']->isoFormat($format);
|
||||
$chartData[$outKey]['entries'][$date] ??= '0';
|
||||
|
||||
$chartData[$outKey]['entries'][$date] = bcadd($amount, $chartData[$outKey]['entries'][$date]);
|
||||
$chartData[$outKey]['entries'][$date] = bcadd((string) $amount, $chartData[$outKey]['entries'][$date]);
|
||||
}
|
||||
|
||||
$inSet = $income[$currencyId]['categories'][$categoryId] ?? ['transaction_journals' => []];
|
||||
@@ -223,7 +223,7 @@ class CategoryController extends Controller
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$date = $journal['date']->isoFormat($format);
|
||||
$chartData[$inKey]['entries'][$date] ??= '0';
|
||||
$chartData[$inKey]['entries'][$date] = bcadd($amount, $chartData[$inKey]['entries'][$date]);
|
||||
$chartData[$inKey]['entries'][$date] = bcadd((string) $amount, $chartData[$inKey]['entries'][$date]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ class CategoryReportController extends Controller
|
||||
'currency_code' => $currency['currency_code'],
|
||||
];
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -110,7 +110,7 @@ class CategoryReportController extends Controller
|
||||
];
|
||||
foreach ($category['transaction_journals'] as $journal) {
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -138,7 +138,7 @@ class CategoryReportController extends Controller
|
||||
];
|
||||
foreach ($category['transaction_journals'] as $journal) {
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -166,7 +166,7 @@ class CategoryReportController extends Controller
|
||||
'currency_code' => $currency['currency_code'],
|
||||
];
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -194,7 +194,7 @@ class CategoryReportController extends Controller
|
||||
'currency_code' => $currency['currency_code'],
|
||||
];
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -233,7 +233,7 @@ class CategoryReportController extends Controller
|
||||
$key = $journal['date']->isoFormat($format);
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$chartData[$spentKey]['entries'][$key] ??= '0';
|
||||
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
|
||||
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -260,7 +260,7 @@ class CategoryReportController extends Controller
|
||||
$key = $journal['date']->isoFormat($format);
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$chartData[$spentKey]['entries'][$key] ??= '0';
|
||||
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
|
||||
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -308,7 +308,7 @@ class CategoryReportController extends Controller
|
||||
'currency_code' => $currency['currency_code'],
|
||||
];
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -336,7 +336,7 @@ class CategoryReportController extends Controller
|
||||
'currency_code' => $currency['currency_code'],
|
||||
];
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ class DoubleReportController extends Controller
|
||||
'currency_code' => $currency['currency_code'],
|
||||
];
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ class DoubleReportController extends Controller
|
||||
'currency_code' => $currency['currency_code'],
|
||||
];
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ class DoubleReportController extends Controller
|
||||
'currency_code' => $currency['currency_code'],
|
||||
];
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ class DoubleReportController extends Controller
|
||||
$key = $journal['date']->isoFormat($format);
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$chartData[$spentKey]['entries'][$key] ??= '0';
|
||||
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
|
||||
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], (string) $amount);
|
||||
}
|
||||
}
|
||||
// loop income.
|
||||
@@ -204,7 +204,7 @@ class DoubleReportController extends Controller
|
||||
$key = $journal['date']->isoFormat($format);
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$chartData[$earnedKey]['entries'][$key] ??= '0';
|
||||
$chartData[$earnedKey]['entries'][$key] = bcadd($chartData[$earnedKey]['entries'][$key], $amount);
|
||||
$chartData[$earnedKey]['entries'][$key] = bcadd($chartData[$earnedKey]['entries'][$key], (string) $amount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ class DoubleReportController extends Controller
|
||||
'currency_code' => $currency['currency_code'],
|
||||
];
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
|
||||
// loop each tag:
|
||||
@@ -294,7 +294,7 @@ class DoubleReportController extends Controller
|
||||
'currency_code' => $currency['currency_code'],
|
||||
];
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -328,7 +328,7 @@ class DoubleReportController extends Controller
|
||||
'currency_code' => $currency['currency_code'],
|
||||
];
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
|
||||
// loop each tag:
|
||||
@@ -347,7 +347,7 @@ class DoubleReportController extends Controller
|
||||
'currency_code' => $currency['currency_code'],
|
||||
];
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,9 +90,7 @@ class PiggyBankController extends Controller
|
||||
$chartData = [];
|
||||
while ($oldest <= $today) {
|
||||
$filtered = $set->filter(
|
||||
static function (PiggyBankEvent $event) use ($oldest) {
|
||||
return $event->date->lte($oldest);
|
||||
}
|
||||
static fn(PiggyBankEvent $event) => $event->date->lte($oldest)
|
||||
);
|
||||
$currentSum = $filtered->sum('amount');
|
||||
$label = $oldest->isoFormat((string) trans('config.month_and_day_js', [], $locale));
|
||||
@@ -100,9 +98,7 @@ class PiggyBankController extends Controller
|
||||
$oldest = app('navigation')->addPeriod($oldest, $step, 0);
|
||||
}
|
||||
$finalFiltered = $set->filter(
|
||||
static function (PiggyBankEvent $event) use ($today) {
|
||||
return $event->date->lte($today);
|
||||
}
|
||||
static fn(PiggyBankEvent $event) => $event->date->lte($today)
|
||||
);
|
||||
$finalSum = $finalFiltered->sum('amount');
|
||||
$finalLabel = $today->isoFormat((string) trans('config.month_and_day_js', [], $locale));
|
||||
|
||||
@@ -207,7 +207,7 @@ class ReportController extends Controller
|
||||
&& in_array($journal['destination_account_id'], $ids, true))) {
|
||||
$key = 'earned';
|
||||
}
|
||||
$data[$currencyId][$period][$key] = bcadd($data[$currencyId][$period][$key], $amount);
|
||||
$data[$currencyId][$period][$key] = bcadd((string) $data[$currencyId][$period][$key], (string) $amount);
|
||||
}
|
||||
|
||||
// loop this data, make chart bars for each currency:
|
||||
|
||||
@@ -83,7 +83,7 @@ class TagReportController extends Controller
|
||||
'currency_code' => $currency['currency_code'],
|
||||
];
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -111,7 +111,7 @@ class TagReportController extends Controller
|
||||
'currency_code' => $currency['currency_code'],
|
||||
];
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -139,7 +139,7 @@ class TagReportController extends Controller
|
||||
'currency_code' => $currency['currency_code'],
|
||||
];
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -167,7 +167,7 @@ class TagReportController extends Controller
|
||||
'currency_code' => $currency['currency_code'],
|
||||
];
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -195,7 +195,7 @@ class TagReportController extends Controller
|
||||
'currency_code' => $currency['currency_code'],
|
||||
];
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -237,7 +237,7 @@ class TagReportController extends Controller
|
||||
$key = $journal['date']->isoFormat($format);
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$chartData[$spentKey]['entries'][$key] ??= '0';
|
||||
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
|
||||
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -264,7 +264,7 @@ class TagReportController extends Controller
|
||||
$key = $journal['date']->isoFormat($format);
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$chartData[$spentKey]['entries'][$key] ??= '0';
|
||||
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
|
||||
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -312,7 +312,7 @@ class TagReportController extends Controller
|
||||
'currency_code' => $currency['currency_code'],
|
||||
];
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -340,7 +340,7 @@ class TagReportController extends Controller
|
||||
'currency_code' => $currency['currency_code'],
|
||||
];
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -367,7 +367,7 @@ class TagReportController extends Controller
|
||||
];
|
||||
foreach ($tag['transaction_journals'] as $journal) {
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -393,7 +393,7 @@ class TagReportController extends Controller
|
||||
];
|
||||
foreach ($tag['transaction_journals'] as $journal) {
|
||||
$amount = app('steam')->positive($journal['amount']);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], $amount);
|
||||
$result[$title]['amount'] = bcadd($result[$title]['amount'], (string) $amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ class TransactionController extends Controller
|
||||
'currency_symbol' => $journal['currency_symbol'],
|
||||
'currency_code' => $journal['currency_code'],
|
||||
];
|
||||
$data[$title]['amount'] = bcadd($data[$title]['amount'], $journal['amount']);
|
||||
$data[$title]['amount'] = bcadd($data[$title]['amount'], (string) $journal['amount']);
|
||||
}
|
||||
$chart = $this->generator->multiCurrencyPieChart($data);
|
||||
$cache->store($chart);
|
||||
@@ -131,7 +131,7 @@ class TransactionController extends Controller
|
||||
'currency_symbol' => $journal['currency_symbol'],
|
||||
'currency_code' => $journal['currency_code'],
|
||||
];
|
||||
$data[$title]['amount'] = bcadd($data[$title]['amount'], $journal['amount']);
|
||||
$data[$title]['amount'] = bcadd($data[$title]['amount'], (string) $journal['amount']);
|
||||
}
|
||||
$chart = $this->generator->multiCurrencyPieChart($data);
|
||||
$cache->store($chart);
|
||||
@@ -181,7 +181,7 @@ class TransactionController extends Controller
|
||||
'currency_symbol' => $journal['currency_symbol'],
|
||||
'currency_code' => $journal['currency_code'],
|
||||
];
|
||||
$data[$title]['amount'] = bcadd($data[$title]['amount'], $journal['amount']);
|
||||
$data[$title]['amount'] = bcadd($data[$title]['amount'], (string) $journal['amount']);
|
||||
}
|
||||
$chart = $this->generator->multiCurrencyPieChart($data);
|
||||
$cache->store($chart);
|
||||
@@ -231,7 +231,7 @@ class TransactionController extends Controller
|
||||
'currency_symbol' => $journal['currency_symbol'],
|
||||
'currency_code' => $journal['currency_code'],
|
||||
];
|
||||
$data[$title]['amount'] = bcadd($data[$title]['amount'], $journal['amount']);
|
||||
$data[$title]['amount'] = bcadd($data[$title]['amount'], (string) $journal['amount']);
|
||||
}
|
||||
$chart = $this->generator->multiCurrencyPieChart($data);
|
||||
$cache->store($chart);
|
||||
|
||||
Reference in New Issue
Block a user