mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-23 14:26:58 +00:00
Fix #2543
This commit is contained in:
@@ -434,17 +434,22 @@ class BillController extends Controller
|
|||||||
if (false === $bill['active']) {
|
if (false === $bill['active']) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (0 === count($bill['pay_dates'])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
/** @var TransactionCurrency $currency */
|
/** @var TransactionCurrency $currency */
|
||||||
$currencyId = $bill['currency_id'];
|
$currencyId = $bill['currency_id'];
|
||||||
$sums[$currencyId] = $sums[$currencyId] ?? [
|
$sums[$currencyId] = $sums[$currencyId] ?? [
|
||||||
'currency_id' => $currencyId,
|
'currency_id' => $currencyId,
|
||||||
'currency_code' => $bill['currency_code'],
|
'currency_code' => $bill['currency_code'],
|
||||||
'currency_name' => $bill['currency_name'],
|
'currency_name' => $bill['currency_name'],
|
||||||
'currency_symbol' => $bill['currency_symbol'],
|
'currency_symbol' => $bill['currency_symbol'],
|
||||||
'currency_decimal_places' => $bill['currency_decimal_places'],
|
'currency_decimal_places' => $bill['currency_decimal_places'],
|
||||||
'avg' => '0',
|
'avg' => '0',
|
||||||
];
|
];
|
||||||
$avg = bcdiv(bcadd((string)$bill['amount_min'], (string)$bill['amount_max']), '2');
|
|
||||||
|
$avg = bcdiv(bcadd((string)$bill['amount_min'], (string)$bill['amount_max']), '2');
|
||||||
|
$avg = bcmul($avg, (string)count($bill['pay_dates']));
|
||||||
$sums[$currencyId]['avg'] = bcadd($sums[$currencyId]['avg'], $avg);
|
$sums[$currencyId]['avg'] = bcadd($sums[$currencyId]['avg'], $avg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -190,19 +190,20 @@ return [
|
|||||||
'reset_button' => 'Reset',
|
'reset_button' => 'Reset',
|
||||||
'want_to_login' => 'I want to login',
|
'want_to_login' => 'I want to login',
|
||||||
'login_page_title' => 'Login to Firefly III',
|
'login_page_title' => 'Login to Firefly III',
|
||||||
'register_page_title' => 'Register at Firefly III',
|
'register_page_title' => 'Register at Firefly III',
|
||||||
'forgot_pw_page_title' => 'Forgot your password for Firefly III',
|
'forgot_pw_page_title' => 'Forgot your password for Firefly III',
|
||||||
'reset_pw_page_title' => 'Reset your password for Firefly III',
|
'reset_pw_page_title' => 'Reset your password for Firefly III',
|
||||||
'cannot_reset_demo_user' => 'You cannot reset the password of the demo user.',
|
'cannot_reset_demo_user' => 'You cannot reset the password of the demo user.',
|
||||||
'button_register' => 'Register',
|
'button_register' => 'Register',
|
||||||
'authorization' => 'Authorization',
|
'authorization' => 'Authorization',
|
||||||
'active_bills_only' => 'active bills only',
|
'active_bills_only' => 'active bills only',
|
||||||
'average_per_bill' => 'average per bill',
|
'active_exp_bills_only' => 'active and expected bills only',
|
||||||
'expected_total' => 'expected total',
|
'average_per_bill' => 'average per bill',
|
||||||
|
'expected_total' => 'expected total',
|
||||||
// API access
|
// API access
|
||||||
'authorization_request' => 'Firefly III v:version Authorization Request',
|
'authorization_request' => 'Firefly III v:version Authorization Request',
|
||||||
'authorization_request_intro' => '<strong>:client</strong> is requesting permission to access your financial administration. Would you like to authorize <strong>:client</strong> to access these records?',
|
'authorization_request_intro' => '<strong>:client</strong> is requesting permission to access your financial administration. Would you like to authorize <strong>:client</strong> to access these records?',
|
||||||
'scopes_will_be_able' => 'This application will be able to:',
|
'scopes_will_be_able' => 'This application will be able to:',
|
||||||
'button_authorize' => 'Authorize',
|
'button_authorize' => 'Authorize',
|
||||||
'none_in_select_list' => '(none)',
|
'none_in_select_list' => '(none)',
|
||||||
'name_in_currency' => ':name in :currency',
|
'name_in_currency' => ':name in :currency',
|
||||||
|
@@ -119,7 +119,7 @@
|
|||||||
{% for sum in sums %}
|
{% for sum in sums %}
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align:right;" colspan="3">
|
<td style="text-align:right;" colspan="3">
|
||||||
{{ 'sum'|_ }} ({{ sum.currency_name }}) ({{ 'active_bills_only'|_ }})<br />
|
{{ 'sum'|_ }} ({{ sum.currency_name }}) ({{ 'active_exp_bills_only'|_ }})<br />
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align:right;" colspan="1">
|
<td style="text-align:right;" colspan="1">
|
||||||
<span style="margin-right:5px;">
|
<span style="margin-right:5px;">
|
||||||
|
Reference in New Issue
Block a user