mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Rename bills to subscriptions
This commit is contained in:
		| @@ -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']) { | ||||
|   | ||||
| @@ -268,7 +268,7 @@ class BillRepository implements BillRepositoryInterface | ||||
|                 'currency_decimal_places' => $currency->decimal_places, | ||||
|             ]; | ||||
|             $result[$currencyId]['sum'] = bcadd($result[$currencyId]['sum'], $transaction->amount); | ||||
|             $result[$currencyId]['native_sum'] = bcadd($result[$currencyId]['native_sum'], $transaction->native_amount); | ||||
|             $result[$currencyId]['native_sum'] = bcadd($result[$currencyId]['native_sum'], $transaction->native_amount ?? '0'); | ||||
|             if ($journal->foreign_currency_id === Amount::getDefaultCurrency()->id) { | ||||
|                 $result[$currencyId]['native_sum'] = bcadd($result[$currencyId]['native_sum'], $transaction->amount); | ||||
|             } | ||||
| @@ -394,7 +394,7 @@ class BillRepository implements BillRepositoryInterface | ||||
|                 'currency_decimal_places' => $currency->decimal_places, | ||||
|             ]; | ||||
|             $result[$currencyId]['sum']        = bcadd($result[$currencyId]['sum'], $transaction->amount); | ||||
|             $result[$currencyId]['native_sum'] = bcadd($result[$currencyId]['native_sum'], $transaction->native_amount); | ||||
|             $result[$currencyId]['native_sum'] = bcadd($result[$currencyId]['native_sum'], $transaction->native_amount ?? '0'); | ||||
|             if ($journal->foreign_currency_id === Amount::getDefaultCurrency()->id) { | ||||
|                 $result[$currencyId]['native_sum'] = bcadd($result[$currencyId]['native_sum'], $transaction->amount); | ||||
|             } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user