Rename "native" to "primary".

This commit is contained in:
James Cole
2025-08-01 06:12:36 +02:00
parent ea6addafe6
commit 084ce02c21
51 changed files with 296 additions and 296 deletions

View File

@@ -77,7 +77,7 @@ class CreateController extends Controller
$periods[$current] = (string) trans('firefly.repeat_freq_'.$current);
}
$subTitle = (string) trans('firefly.create_new_bill');
$defaultCurrency = $this->defaultCurrency;
$defaultCurrency = $this->primaryCurrency;
// put previous url in session if not redirect from store (not "create another").
if (true !== session('bills.create.fromStore')) {

View File

@@ -88,7 +88,7 @@ class EditController extends Controller
$bill->amount_min = app('steam')->bcround($bill->amount_min, $bill->transactionCurrency->decimal_places);
$bill->amount_max = app('steam')->bcround($bill->amount_max, $bill->transactionCurrency->decimal_places);
$rules = $this->repository->getRulesForBill($bill);
$defaultCurrency = $this->defaultCurrency;
$defaultCurrency = $this->primaryCurrency;
// code to handle active-checkboxes
$hasOldInput = null !== $request->old('_token');

View File

@@ -91,8 +91,8 @@ class IndexController extends Controller
$admin = auth()->user();
$enrichment = new SubscriptionEnrichment();
$enrichment->setUser($admin);
$enrichment->setConvertToNative($this->convertToNative);
$enrichment->setNative($this->defaultCurrency);
$enrichment->setConvertToPrimary($this->convertToPrimary);
$enrichment->setPrimary($this->primaryCurrency);
$enrichment->setStart($tempStart);
$enrichment->setEnd($end);
$collection = $enrichment->enrich($collection);
@@ -100,8 +100,8 @@ class IndexController extends Controller
$parameters->set('start', $tempStart);
$parameters->set('end', $end);
$parameters->set('convertToNative', $this->convertToNative);
$parameters->set('defaultCurrency', $this->defaultCurrency);
$parameters->set('convertToPrimary', $this->convertToPrimary);
$parameters->set('defaultCurrency', $this->primaryCurrency);
/** @var BillTransformer $transformer */
$transformer = app(BillTransformer::class);
@@ -130,7 +130,7 @@ class IndexController extends Controller
'bills' => [],
];
$currency = $bill->transactionCurrency ?? $this->defaultCurrency;
$currency = $bill->transactionCurrency ?? $this->primaryCurrency;
$array['currency_id'] = $currency->id;
$array['currency_name'] = $currency->name;
$array['currency_symbol'] = $currency->symbol;

View File

@@ -149,8 +149,8 @@ class ShowController extends Controller
$admin = auth()->user();
$enrichment = new SubscriptionEnrichment();
$enrichment->setUser($admin);
$enrichment->setConvertToNative($this->convertToNative);
$enrichment->setNative($this->defaultCurrency);
$enrichment->setConvertToPrimary($this->convertToPrimary);
$enrichment->setPrimary($this->primaryCurrency);
$enrichment->setStart($start);
$enrichment->setEnd($end);
$bill = $enrichment->enrichSingle($bill);