Rename references to native amounts

This commit is contained in:
James Cole
2025-07-31 20:55:30 +02:00
parent da36d84b79
commit ea6addafe6
16 changed files with 60 additions and 61 deletions

View File

@@ -34,10 +34,10 @@ class AutoBudgetObserver
public function created(AutoBudget $autoBudget): void
{
Log::debug('Observe "created" of an auto budget.');
$this->updateNativeAmount($autoBudget);
$this->updatePrimaryCurrencyAmount($autoBudget);
}
private function updateNativeAmount(AutoBudget $autoBudget): void
private function updatePrimaryCurrencyAmount(AutoBudget $autoBudget): void
{
if (!Amount::convertToPrimary($autoBudget->budget->user)) {
return;
@@ -51,12 +51,12 @@ class AutoBudgetObserver
$autoBudget->native_amount = $converter->convert($autoBudget->transactionCurrency, $userCurrency, today(), $autoBudget->amount);
}
$autoBudget->saveQuietly();
Log::debug('Auto budget native amount is updated.');
Log::debug('Auto budget primary currency amount is updated.');
}
public function updated(AutoBudget $autoBudget): void
{
Log::debug('Observe "updated" of an auto budget.');
$this->updateNativeAmount($autoBudget);
$this->updatePrimaryCurrencyAmount($autoBudget);
}
}