diff --git a/app/Http/Controllers/BillController.php b/app/Http/Controllers/BillController.php index 2c12d48479..a11e77bfae 100644 --- a/app/Http/Controllers/BillController.php +++ b/app/Http/Controllers/BillController.php @@ -212,6 +212,8 @@ class BillController extends Controller $bills = $unfiltered->map( function (Bill $bill) use ($transformer, $defaultCurrency) { $return = $transformer->transform($bill); + $nextExpectedMatch = new Carbon($return['next_expected_match']); + $return['next_expected_match_diff'] = $nextExpectedMatch->isToday() ? trans('firefly.today') : $nextExpectedMatch->diffForHumans(today(), Carbon::DIFF_RELATIVE_TO_NOW); $currency = $bill->transactionCurrency ?? $defaultCurrency; $return['currency_id'] = $currency->id; $return['currency_name'] = $currency->name; diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index 3a69b9b949..6526b7396b 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -890,7 +890,8 @@ return [ 'bill_store_error' => 'An unexpected error occurred while storing your new bill. Please check the log files', 'list_inactive_rule' => 'inactive rule', 'bill_edit_rules' => 'Firefly III will attempt to edit the rule related to this bill as well. If you\'ve edited this rule yourself however, Firefly III won\'t change anything.|Firefly III will attempt to edit the :count rules related to this bill as well. If you\'ve edited these rules yourself however, Firefly III won\'t change anything.', - + 'bill_expected_date' => 'Expected :date', + // accounts: 'inactive_account_link' => 'You have :count inactive (archived) account, which you can view on this separate page.|You have :count inactive (archived) accounts, which you can view on this separate page.', 'all_accounts_inactive' => 'These are your inactive accounts.', diff --git a/resources/views/v1/list/bills.twig b/resources/views/v1/list/bills.twig index 0a22e8de67..14dfa1e712 100644 --- a/resources/views/v1/list/bills.twig +++ b/resources/views/v1/list/bills.twig @@ -75,11 +75,10 @@ #} {% if entry.paid_dates|length == 0 and entry.pay_dates|length > 0 and entry.active %} - {{ trans('firefly.not_or_not_yet') }} + {{ trans('firefly.bill_expected_date', {date: entry.next_expected_match_diff }) }} {% for date in entry.pay_dates %} - {#{{ formatDate(entry.next_expected_match, monthAndDayFormat) }}
#} {{ formatDate(date, monthAndDayFormat) }}
{% endfor %}