mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Remove the use of deprecated methods.
This commit is contained in:
@@ -109,19 +109,22 @@ class ReportController extends Controller
|
||||
|
||||
while ($current < $end) {
|
||||
// get balances by date, grouped by currency.
|
||||
$result = $helper->getNetWorthByCurrency($filtered, $current);
|
||||
$result = $helper->byAccounts($filtered, $current);
|
||||
|
||||
// loop result, add to array.
|
||||
/** @var array $netWorthItem */
|
||||
foreach ($result as $netWorthItem) {
|
||||
$currencyId = $netWorthItem['currency']->id;
|
||||
foreach ($result as $key => $netWorthItem) {
|
||||
if('native' === $key) {
|
||||
continue;
|
||||
}
|
||||
$currencyId = $netWorthItem['currency_id'];
|
||||
$label = $current->isoFormat((string)trans('config.month_and_day_js', [], $locale));
|
||||
if (!array_key_exists($currencyId, $chartData)) {
|
||||
$chartData[$currencyId] = [
|
||||
'label' => 'Net worth in ' . $netWorthItem['currency']->name,
|
||||
'label' => 'Net worth in ' . $netWorthItem['currency_name'],
|
||||
'type' => 'line',
|
||||
'currency_symbol' => $netWorthItem['currency']->symbol,
|
||||
'currency_code' => $netWorthItem['currency']->code,
|
||||
'currency_symbol' => $netWorthItem['currency_symbol'],
|
||||
'currency_code' => $netWorthItem['currency_code'],
|
||||
'entries' => [],
|
||||
];
|
||||
}
|
||||
|
@@ -268,12 +268,13 @@ class BoxController extends Controller
|
||||
}
|
||||
);
|
||||
|
||||
$netWorthSet = $netWorthHelper->getNetWorthByCurrency($filtered, $date);
|
||||
$netWorthSet = $netWorthHelper->byAccounts($filtered, $date);
|
||||
$return = [];
|
||||
foreach ($netWorthSet as $data) {
|
||||
/** @var TransactionCurrency $currency */
|
||||
$currency = $data['currency'];
|
||||
$return[$currency->id] = app('amount')->formatAnything($currency, $data['balance'], false);
|
||||
foreach ($netWorthSet as $key => $data) {
|
||||
if('native' === $key) {
|
||||
continue;
|
||||
}
|
||||
$return[$data['currency_id']] = app('amount')->formatFlat($data['currency_symbol'], $data['currency_decimal_places'], $data['balance'], false);
|
||||
}
|
||||
$return = [
|
||||
'net_worths' => array_values($return),
|
||||
|
@@ -158,7 +158,7 @@ class InstallController extends Controller
|
||||
}
|
||||
// clear cache as well.
|
||||
Cache::clear();
|
||||
Preferences::mark();
|
||||
app('preferences')->mark();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@@ -54,23 +54,23 @@ class InterestingMessage
|
||||
}
|
||||
|
||||
if ($this->groupMessage($request)) {
|
||||
Preferences::mark();
|
||||
app('preferences')->mark();
|
||||
$this->handleGroupMessage($request);
|
||||
}
|
||||
if ($this->accountMessage($request)) {
|
||||
Preferences::mark();
|
||||
app('preferences')->mark();
|
||||
$this->handleAccountMessage($request);
|
||||
}
|
||||
if ($this->billMessage($request)) {
|
||||
Preferences::mark();
|
||||
app('preferences')->mark();
|
||||
$this->handleBillMessage($request);
|
||||
}
|
||||
if ($this->webhookMessage($request)) {
|
||||
Preferences::mark();
|
||||
app('preferences')->mark();
|
||||
$this->handleWebhookMessage($request);
|
||||
}
|
||||
if ($this->currencyMessage($request)) {
|
||||
Preferences::mark();
|
||||
app('preferences')->mark();
|
||||
$this->handleCurrencyMessage($request);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user