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

@@ -38,10 +38,10 @@ class BillObserver
public function created(Bill $bill): void
{
// Log::debug('Observe "created" of a bill.');
$this->updateNativeAmount($bill);
$this->updatePrimaryCurrencyAmount($bill);
}
private function updateNativeAmount(Bill $bill): void
private function updatePrimaryCurrencyAmount(Bill $bill): void
{
if (!Amount::convertToPrimary($bill->user)) {
return;
@@ -57,7 +57,7 @@ class BillObserver
$bill->native_amount_max = $converter->convert($bill->transactionCurrency, $userCurrency, today(), $bill->amount_max);
}
$bill->saveQuietly();
Log::debug('Bill native amounts are updated.');
Log::debug('Bill primary currency amounts are updated.');
}
public function deleting(Bill $bill): void
@@ -76,6 +76,6 @@ class BillObserver
public function updated(Bill $bill): void
{
// Log::debug('Observe "updated" of a bill.');
$this->updateNativeAmount($bill);
$this->updatePrimaryCurrencyAmount($bill);
}
}