mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
PHPStorm can order methods by alphabet, who knew.
This commit is contained in:
@@ -81,18 +81,18 @@ class BillRepository implements BillRepositoryInterface
|
||||
$currencyId = $bill->transaction_currency_id;
|
||||
|
||||
$return[$currencyId] ??= [
|
||||
'currency_id' => (string)$currency->id,
|
||||
'currency_name' => $currency->name,
|
||||
'currency_symbol' => $currency->symbol,
|
||||
'currency_code' => $currency->code,
|
||||
'currency_decimal_places' => $currency->decimal_places,
|
||||
'native_currency_id' => (string)$default->id,
|
||||
'native_currency_name' => $default->name,
|
||||
'native_currency_symbol' => $default->symbol,
|
||||
'native_currency_code' => $default->code,
|
||||
'native_currency_decimal_places' => $default->decimal_places,
|
||||
'sum' => '0',
|
||||
'native_sum' => '0',
|
||||
'currency_id' => (string)$currency->id,
|
||||
'currency_name' => $currency->name,
|
||||
'currency_symbol' => $currency->symbol,
|
||||
'currency_code' => $currency->code,
|
||||
'currency_decimal_places' => $currency->decimal_places,
|
||||
'native_currency_id' => (string)$default->id,
|
||||
'native_currency_name' => $default->name,
|
||||
'native_currency_symbol' => $default->symbol,
|
||||
'native_currency_code' => $default->code,
|
||||
'native_currency_decimal_places' => $default->decimal_places,
|
||||
'sum' => '0',
|
||||
'native_sum' => '0',
|
||||
];
|
||||
|
||||
/** @var TransactionJournal $transactionJournal */
|
||||
@@ -154,18 +154,18 @@ class BillRepository implements BillRepositoryInterface
|
||||
$average = bcdiv(bcadd($bill->amount_max, $bill->amount_min), '2');
|
||||
$nativeAverage = $converter->convert($currency, $default, $start, $average);
|
||||
$return[$currencyId] ??= [
|
||||
'currency_id' => (string)$currency->id,
|
||||
'currency_name' => $currency->name,
|
||||
'currency_symbol' => $currency->symbol,
|
||||
'currency_code' => $currency->code,
|
||||
'currency_decimal_places' => $currency->decimal_places,
|
||||
'native_currency_id' => (string)$default->id,
|
||||
'native_currency_name' => $default->name,
|
||||
'native_currency_symbol' => $default->symbol,
|
||||
'native_currency_code' => $default->code,
|
||||
'native_currency_decimal_places' => $default->decimal_places,
|
||||
'sum' => '0',
|
||||
'native_sum' => '0',
|
||||
'currency_id' => (string)$currency->id,
|
||||
'currency_name' => $currency->name,
|
||||
'currency_symbol' => $currency->symbol,
|
||||
'currency_code' => $currency->code,
|
||||
'currency_decimal_places' => $currency->decimal_places,
|
||||
'native_currency_id' => (string)$default->id,
|
||||
'native_currency_name' => $default->name,
|
||||
'native_currency_symbol' => $default->symbol,
|
||||
'native_currency_code' => $default->code,
|
||||
'native_currency_decimal_places' => $default->decimal_places,
|
||||
'sum' => '0',
|
||||
'native_sum' => '0',
|
||||
];
|
||||
$return[$currencyId]['sum'] = bcadd($return[$currencyId]['sum'], bcmul($average, (string)$total));
|
||||
$return[$currencyId]['native_sum'] = bcadd($return[$currencyId]['native_sum'], bcmul($nativeAverage, (string)$total));
|
||||
|
Reference in New Issue
Block a user