Rename bills to subscriptions

This commit is contained in:
James Cole
2024-12-26 13:41:57 +01:00
parent 286a29ca3e
commit 291e73da4b
26 changed files with 161 additions and 154 deletions

View File

@@ -164,7 +164,7 @@ class BillController extends Controller
$currencyId = $bill->transaction_currency_id;
$amountMin = $bill->amount_min;
$amountMax = $bill->amount_max;
if($this->convertToNative) {
if($this->convertToNative && $currencyId !== $this->defaultCurrency->id) {
$amountMin = $bill->native_amount_min;
$amountMax = $bill->native_amount_max;
}
@@ -178,7 +178,7 @@ class BillController extends Controller
$chartData[2]['entries'][$date] = '0';
}
$amount = bcmul($journal['amount'], '-1');
if($this->convertToNative) {
if($this->convertToNative && $currencyId !== $journal['currency_id']) {
$amount = bcmul($journal['native_amount'], '-1');
}
if($this->convertToNative && $currencyId === $journal['foreign_currency_id']) {