Auto commit for release 'branch-v6.2' on 2024-12-27

This commit is contained in:
github-actions
2024-12-27 07:29:17 +01:00
parent 36457455ca
commit 32e5efec7c
50 changed files with 319 additions and 314 deletions

View File

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