mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-10 12:24:50 +00:00
Update reference to Steam
This commit is contained in:
@@ -102,7 +102,7 @@ class FrontpageChartGenerator
|
||||
$this->blRepository->setUser($user);
|
||||
$this->opsRepository->setUser($user);
|
||||
|
||||
$locale = app('steam')->getLocale();
|
||||
$locale = \FireflyIII\Support\Facades\Steam::getLocale();
|
||||
$this->monthAndDayFormat = (string)trans('config.month_and_day_js', [], $locale);
|
||||
}
|
||||
|
||||
|
||||
@@ -102,8 +102,8 @@ class WholePeriodChartGenerator
|
||||
$earnedInfoKey = sprintf('earned-in-%s', $code);
|
||||
$spentAmount = $spent[$key][$currencyId]['sum'] ?? '0';
|
||||
$earnedAmount = $earned[$key][$currencyId]['sum'] ?? '0';
|
||||
$chartData[$spentInfoKey]['entries'][$label] = app('steam')->bcround($spentAmount, $currency['currency_decimal_places']);
|
||||
$chartData[$earnedInfoKey]['entries'][$label] = app('steam')->bcround($earnedAmount, $currency['currency_decimal_places']);
|
||||
$chartData[$spentInfoKey]['entries'][$label] = \FireflyIII\Support\Facades\Steam::bcround($spentAmount, $currency['currency_decimal_places']);
|
||||
$chartData[$earnedInfoKey]['entries'][$label] = \FireflyIII\Support\Facades\Steam::bcround($earnedAmount, $currency['currency_decimal_places']);
|
||||
}
|
||||
$current = Navigation::addPeriod($current, $step);
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ class CurrencyForm
|
||||
|
||||
// make sure value is formatted nicely:
|
||||
if (null !== $value && '' !== $value) {
|
||||
$value = app('steam')->bcround($value, $primaryCurrency->decimal_places);
|
||||
$value = \FireflyIII\Support\Facades\Steam::bcround($value, $primaryCurrency->decimal_places);
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -202,7 +202,7 @@ class CurrencyForm
|
||||
|
||||
// make sure value is formatted nicely:
|
||||
if (null !== $value && '' !== $value) {
|
||||
$value = app('steam')->bcround($value, $primaryCurrency->decimal_places);
|
||||
$value = \FireflyIII\Support\Facades\Steam::bcround($value, $primaryCurrency->decimal_places);
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
@@ -59,7 +59,7 @@ trait ChartGeneration
|
||||
return $cache->get();
|
||||
}
|
||||
Log::debug('Regenerate chart.account.account-balance-chart from scratch.');
|
||||
$locale = app('steam')->getLocale();
|
||||
$locale = \FireflyIII\Support\Facades\Steam::getLocale();
|
||||
|
||||
/** @var GeneratorInterface $generator */
|
||||
$generator = app(GeneratorInterface::class);
|
||||
|
||||
@@ -53,7 +53,7 @@ trait UserNavigation
|
||||
$url = (string)session($identifier);
|
||||
Log::debug(sprintf('The URL is %s', $url));
|
||||
|
||||
return app('steam')->getSafeUrl($url, route('index'));
|
||||
return \FireflyIII\Support\Facades\Steam::getSafeUrl($url, route('index'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -137,7 +137,7 @@ trait UserNavigation
|
||||
|
||||
final protected function rememberPreviousUrl(string $identifier): ?string
|
||||
{
|
||||
$return = app('steam')->getSafePreviousUrl();
|
||||
$return = \FireflyIII\Support\Facades\Steam::getSafePreviousUrl();
|
||||
session()->put($identifier, $return);
|
||||
|
||||
Log::debug(sprintf('rememberPreviousUrl: %s: "%s"', $identifier, $return));
|
||||
|
||||
@@ -404,7 +404,7 @@ class Navigation
|
||||
*/
|
||||
public function listOfPeriods(Carbon $start, Carbon $end): array
|
||||
{
|
||||
$locale = app('steam')->getLocale();
|
||||
$locale = \FireflyIII\Support\Facades\Steam::getLocale();
|
||||
// define period to increment
|
||||
$increment = 'addDay';
|
||||
$format = $this->preferredCarbonFormat($start, $end);
|
||||
@@ -536,7 +536,7 @@ class Navigation
|
||||
*/
|
||||
public function preferredCarbonLocalizedFormat(Carbon $start, Carbon $end): string
|
||||
{
|
||||
$locale = app('steam')->getLocale();
|
||||
$locale = \FireflyIII\Support\Facades\Steam::getLocale();
|
||||
$diff = $start->diffInMonths($end, true);
|
||||
if ($diff >= 1.001 && $diff < 12.001) {
|
||||
return (string)trans('config.month_js', [], $locale);
|
||||
|
||||
@@ -103,7 +103,7 @@ trait RecalculatesAvailableBudgetsTrait
|
||||
return;
|
||||
}
|
||||
Log::debug(sprintf('Concluded new amount for this AB must be %s', $newAmount));
|
||||
$availableBudget->amount = app('steam')->bcround($newAmount, $availableBudget->transactionCurrency->decimal_places);
|
||||
$availableBudget->amount = \FireflyIII\Support\Facades\Steam::bcround($newAmount, $availableBudget->transactionCurrency->decimal_places);
|
||||
$availableBudget->save();
|
||||
}
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ class TransactionSummarizer
|
||||
}
|
||||
}
|
||||
|
||||
// $array[$currencyId]['sum'] = bcadd($array[$currencyId]['sum'], app('steam')->{$method}($amount));
|
||||
// $array[$currencyId]['sum'] = bcadd($array[$currencyId]['sum'], \FireflyIII\Support\Facades\Steam::{$method}($amount));
|
||||
// Log::debug(sprintf('Journal #%d adds amount %s %s', $journal['transaction_journal_id'], $currencyCode, $amount));
|
||||
}
|
||||
Log::debug('End of sumExpenses.', $array);
|
||||
|
||||
@@ -2287,7 +2287,7 @@ class OperatorQuerySearch implements SearchInterface
|
||||
// strip comma's, make dots.
|
||||
Log::debug(sprintf('Original value "%s"', $value));
|
||||
$value = str_replace(',', '.', $value);
|
||||
$amount = app('steam')->positive($value);
|
||||
$amount = \FireflyIII\Support\Facades\Steam::positive($value);
|
||||
Log::debug(sprintf('Set "%s" using collector with value "%s"', $operator, $amount));
|
||||
$this->collector->amountIs($amount);
|
||||
|
||||
@@ -2297,7 +2297,7 @@ class OperatorQuerySearch implements SearchInterface
|
||||
// strip comma's, make dots.
|
||||
Log::debug(sprintf('Original value "%s"', $value));
|
||||
$value = str_replace(',', '.', $value);
|
||||
$amount = app('steam')->positive($value);
|
||||
$amount = \FireflyIII\Support\Facades\Steam::positive($value);
|
||||
Log::debug(sprintf('Set "%s" using collector with value "%s"', $operator, $amount));
|
||||
$this->collector->amountIsNot($amount);
|
||||
|
||||
@@ -2307,7 +2307,7 @@ class OperatorQuerySearch implements SearchInterface
|
||||
// strip comma's, make dots.
|
||||
$value = str_replace(',', '.', $value);
|
||||
|
||||
$amount = app('steam')->positive($value);
|
||||
$amount = \FireflyIII\Support\Facades\Steam::positive($value);
|
||||
Log::debug(sprintf('Set "%s" using collector with value "%s"', $operator, $amount));
|
||||
$this->collector->foreignAmountIs($amount);
|
||||
|
||||
@@ -2317,7 +2317,7 @@ class OperatorQuerySearch implements SearchInterface
|
||||
// strip comma's, make dots.
|
||||
$value = str_replace(',', '.', $value);
|
||||
|
||||
$amount = app('steam')->positive($value);
|
||||
$amount = \FireflyIII\Support\Facades\Steam::positive($value);
|
||||
Log::debug(sprintf('Set "%s" using collector with value "%s"', $operator, $amount));
|
||||
$this->collector->foreignAmountIsNot($amount);
|
||||
|
||||
@@ -2328,7 +2328,7 @@ class OperatorQuerySearch implements SearchInterface
|
||||
// strip comma's, make dots.
|
||||
$value = str_replace(',', '.', $value);
|
||||
|
||||
$amount = app('steam')->positive($value);
|
||||
$amount = \FireflyIII\Support\Facades\Steam::positive($value);
|
||||
Log::debug(sprintf('Set "%s" using collector with value "%s"', $operator, $amount));
|
||||
$this->collector->amountLess($amount);
|
||||
|
||||
@@ -2339,7 +2339,7 @@ class OperatorQuerySearch implements SearchInterface
|
||||
// strip comma's, make dots.
|
||||
$value = str_replace(',', '.', $value);
|
||||
|
||||
$amount = app('steam')->positive($value);
|
||||
$amount = \FireflyIII\Support\Facades\Steam::positive($value);
|
||||
Log::debug(sprintf('Set "%s" using collector with value "%s"', $operator, $amount));
|
||||
$this->collector->foreignAmountLess($amount);
|
||||
|
||||
@@ -2350,7 +2350,7 @@ class OperatorQuerySearch implements SearchInterface
|
||||
Log::debug(sprintf('Now handling operator "%s"', $operator));
|
||||
// strip comma's, make dots.
|
||||
$value = str_replace(',', '.', $value);
|
||||
$amount = app('steam')->positive($value);
|
||||
$amount = \FireflyIII\Support\Facades\Steam::positive($value);
|
||||
Log::debug(sprintf('Set "%s" using collector with value "%s"', $operator, $amount));
|
||||
$this->collector->amountMore($amount);
|
||||
|
||||
@@ -2361,7 +2361,7 @@ class OperatorQuerySearch implements SearchInterface
|
||||
Log::debug(sprintf('Now handling operator "%s"', $operator));
|
||||
// strip comma's, make dots.
|
||||
$value = str_replace(',', '.', $value);
|
||||
$amount = app('steam')->positive($value);
|
||||
$amount = \FireflyIII\Support\Facades\Steam::positive($value);
|
||||
Log::debug(sprintf('Set "%s" using collector with value "%s"', $operator, $amount));
|
||||
$this->collector->foreignAmountMore($amount);
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ class General extends AbstractExtension
|
||||
}
|
||||
|
||||
return implode(', ', $strings);
|
||||
// return app('steam')->balance($account, $date);
|
||||
// return \FireflyIII\Support\Facades\Steam::balance($account, $date);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user