mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-17 20:08:52 +00:00
Rename many references from native to primary.
This commit is contained in:
@@ -84,8 +84,8 @@ abstract class Controller extends BaseController
|
||||
$this->parameters = $this->getParameters();
|
||||
if (auth()->check()) {
|
||||
$language = Steam::getLanguage();
|
||||
$this->convertToNative = Amount::convertToNative();
|
||||
$this->nativeCurrency = Amount::getNativeCurrency();
|
||||
$this->convertToNative = Amount::convertToPrimary();
|
||||
$this->nativeCurrency = Amount::getPrimaryCurrency();
|
||||
app()->setLocale($language);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,8 +69,8 @@ class BillController extends Controller
|
||||
$bills = $request->getBills();
|
||||
$start = $request->getStart();
|
||||
$end = $request->getEnd();
|
||||
$convertToNative = Amount::convertToNative();
|
||||
$default = Amount::getNativeCurrency();
|
||||
$convertToNative = Amount::convertToPrimary();
|
||||
$default = Amount::getPrimaryCurrency();
|
||||
$response = [];
|
||||
|
||||
// get all bills:
|
||||
@@ -132,8 +132,8 @@ class BillController extends Controller
|
||||
$accounts = $request->getAssetAccounts();
|
||||
$start = $request->getStart();
|
||||
$end = $request->getEnd();
|
||||
$convertToNative = Amount::convertToNative();
|
||||
$default = Amount::getNativeCurrency();
|
||||
$convertToNative = Amount::convertToPrimary();
|
||||
$default = Amount::getPrimaryCurrency();
|
||||
$response = [];
|
||||
|
||||
// collect all expenses in this period (regardless of type) by the given bills and accounts.
|
||||
|
||||
@@ -47,8 +47,8 @@ class PeriodController extends Controller
|
||||
$start = $request->getStart();
|
||||
$end = $request->getEnd();
|
||||
$response = [];
|
||||
$convertToNative = Amount::convertToNative();
|
||||
$default = Amount::getNativeCurrency();
|
||||
$convertToNative = Amount::convertToPrimary();
|
||||
$default = Amount::getPrimaryCurrency();
|
||||
|
||||
// collect all expenses in this period (regardless of type)
|
||||
$collector = app(GroupCollectorInterface::class);
|
||||
|
||||
@@ -68,8 +68,8 @@ class TagController extends Controller
|
||||
$start = $request->getStart();
|
||||
$end = $request->getEnd();
|
||||
$response = [];
|
||||
$convertToNative = Amount::convertToNative();
|
||||
$default = Amount::getNativeCurrency();
|
||||
$convertToNative = Amount::convertToPrimary();
|
||||
$default = Amount::getPrimaryCurrency();
|
||||
|
||||
// collect all expenses in this period (regardless of type) by the given bills and accounts.
|
||||
$collector = app(GroupCollectorInterface::class);
|
||||
|
||||
@@ -46,8 +46,8 @@ class PeriodController extends Controller
|
||||
$start = $request->getStart();
|
||||
$end = $request->getEnd();
|
||||
$response = [];
|
||||
$convertToNative = Amount::convertToNative();
|
||||
$default = Amount::getNativeCurrency();
|
||||
$convertToNative = Amount::convertToPrimary();
|
||||
$default = Amount::getPrimaryCurrency();
|
||||
|
||||
// collect all expenses in this period (regardless of type)
|
||||
$collector = app(GroupCollectorInterface::class);
|
||||
|
||||
@@ -68,8 +68,8 @@ class TagController extends Controller
|
||||
$start = $request->getStart();
|
||||
$end = $request->getEnd();
|
||||
$response = [];
|
||||
$convertToNative = Amount::convertToNative();
|
||||
$default = Amount::getNativeCurrency();
|
||||
$convertToNative = Amount::convertToPrimary();
|
||||
$default = Amount::getPrimaryCurrency();
|
||||
|
||||
// collect all expenses in this period (regardless of type) by the given bills and accounts.
|
||||
$collector = app(GroupCollectorInterface::class);
|
||||
|
||||
@@ -46,8 +46,8 @@ class PeriodController extends Controller
|
||||
$start = $request->getStart();
|
||||
$end = $request->getEnd();
|
||||
$response = [];
|
||||
$convertToNative = Amount::convertToNative();
|
||||
$default = Amount::getNativeCurrency();
|
||||
$convertToNative = Amount::convertToPrimary();
|
||||
$default = Amount::getPrimaryCurrency();
|
||||
|
||||
// collect all expenses in this period (regardless of type)
|
||||
$collector = app(GroupCollectorInterface::class);
|
||||
|
||||
@@ -66,8 +66,8 @@ class TagController extends Controller
|
||||
$start = $request->getStart();
|
||||
$end = $request->getEnd();
|
||||
$response = [];
|
||||
$convertToNative = Amount::convertToNative();
|
||||
$default = Amount::getNativeCurrency();
|
||||
$convertToNative = Amount::convertToPrimary();
|
||||
$default = Amount::getPrimaryCurrency();
|
||||
|
||||
|
||||
// collect all expenses in this period (regardless of type) by the given bills and accounts.
|
||||
|
||||
@@ -127,8 +127,8 @@ class BasicController extends Controller
|
||||
{
|
||||
Log::debug('getBalanceInformation');
|
||||
// some config settings
|
||||
$convertToNative = Amount::convertToNative();
|
||||
$default = Amount::getNativeCurrency();
|
||||
$convertToNative = Amount::convertToPrimary();
|
||||
$default = Amount::getPrimaryCurrency();
|
||||
// prep some arrays:
|
||||
$sums = [];
|
||||
$return = [];
|
||||
|
||||
@@ -55,7 +55,7 @@ class AccountController extends Controller
|
||||
$userGroup = $this->validateUserGroup($request);
|
||||
$this->repository = app(AccountRepositoryInterface::class);
|
||||
$this->repository->setUserGroup($userGroup);
|
||||
$this->default = app('amount')->getNativeCurrency();
|
||||
$this->default = app('amount')->getPrimaryCurrency();
|
||||
$this->converter = app(ExchangeRateConverter::class);
|
||||
|
||||
return $next($request);
|
||||
|
||||
@@ -58,7 +58,7 @@ class AccountController extends Controller
|
||||
$this->repository = app(AccountRepositoryInterface::class);
|
||||
$this->repository->setUserGroup($this->validateUserGroup($request));
|
||||
$this->chartData = new ChartData();
|
||||
$this->default = app('amount')->getNativeCurrency();
|
||||
$this->default = app('amount')->getPrimaryCurrency();
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ class BalanceController extends Controller
|
||||
$this->repository->setUserGroup($userGroup);
|
||||
$this->collector->setUserGroup($userGroup);
|
||||
$this->chartData = new ChartData();
|
||||
// $this->default = app('amount')->getNativeCurrency();
|
||||
// $this->default = app('amount')->getPrimaryCurrency();
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
@@ -87,7 +87,7 @@ class BalanceController extends Controller
|
||||
|
||||
// prepare for currency conversion and data collection:
|
||||
/** @var TransactionCurrency $default */
|
||||
$default = app('amount')->getNativeCurrency();
|
||||
$default = app('amount')->getPrimaryCurrency();
|
||||
|
||||
// get journals for entire period:
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ class BudgetController extends Controller
|
||||
$this->repository = app(BudgetRepositoryInterface::class);
|
||||
$this->blRepository = app(BudgetLimitRepositoryInterface::class);
|
||||
$this->opsRepository = app(OperationsRepositoryInterface::class);
|
||||
$this->currency = app('amount')->getNativeCurrency();
|
||||
$this->currency = app('amount')->getPrimaryCurrency();
|
||||
$userGroup = $this->validateUserGroup($request);
|
||||
$this->repository->setUserGroup($userGroup);
|
||||
$this->opsRepository->setUserGroup($userGroup);
|
||||
|
||||
@@ -82,7 +82,7 @@ class CategoryController extends Controller
|
||||
/** @var Carbon $end */
|
||||
$end = $this->parameters->get('end');
|
||||
$accounts = $this->accountRepos->getAccountsByType([AccountTypeEnum::DEBT->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::MORTGAGE->value, AccountTypeEnum::ASSET->value, AccountTypeEnum::DEFAULT->value]);
|
||||
$default = app('amount')->getNativeCurrency();
|
||||
$default = app('amount')->getPrimaryCurrency();
|
||||
$converter = new ExchangeRateConverter();
|
||||
$currencies = [];
|
||||
$return = [];
|
||||
|
||||
@@ -119,7 +119,7 @@ class BasicController extends Controller
|
||||
private function getBalanceInformation(Carbon $start, Carbon $end): array
|
||||
{
|
||||
$object = new SummaryBalanceGrouped();
|
||||
$default = app('amount')->getNativeCurrency();
|
||||
$default = app('amount')->getPrimaryCurrency();
|
||||
|
||||
$object->setDefault($default);
|
||||
|
||||
@@ -234,7 +234,7 @@ class BasicController extends Controller
|
||||
$available = $this->abRepository->getAvailableBudgetWithCurrency($start, $end);
|
||||
$budgets = $this->budgetRepository->getActiveBudgets();
|
||||
$spent = $this->opsRepository->listExpenses($start, $end, null, $budgets);
|
||||
$default = app('amount')->getNativeCurrency();
|
||||
$default = app('amount')->getPrimaryCurrency();
|
||||
$currencies = [];
|
||||
$converter = new ExchangeRateConverter();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user