mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Rename references to native amounts
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user