mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 09:52:20 +00:00
Because nextExpectedMatch() must return a date (and cannot return null) the list of bills will show "unknown" when the bill is next expected in 1900.
This commit is contained in:
@@ -399,7 +399,8 @@ class BillRepository implements BillRepositoryInterface
|
|||||||
public function nextExpectedMatch(Bill $bill): Carbon
|
public function nextExpectedMatch(Bill $bill): Carbon
|
||||||
{
|
{
|
||||||
|
|
||||||
$finalDate = Carbon::now()->subDays(2);
|
$finalDate = Carbon::now();
|
||||||
|
$finalDate->year = 1900;
|
||||||
if ($bill->active == 0) {
|
if ($bill->active == 0) {
|
||||||
return $finalDate;
|
return $finalDate;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,14 +45,14 @@
|
|||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if entry.nextExpectedMatch.isFuture %}
|
{% if entry.nextExpectedMatch.year == 1900 %}
|
||||||
<td class="hidden-sm hidden-xs" data-value="{{ entry.nextExpectedMatch.format('U') }}">
|
|
||||||
{{ entry.nextExpectedMatch.formatLocalized(monthAndDayFormat) }}
|
|
||||||
</td>
|
|
||||||
{% else %}
|
|
||||||
<td class="hidden-sm hidden-xs" data-value="0">
|
<td class="hidden-sm hidden-xs" data-value="0">
|
||||||
<em>{{ 'unknown'|_ }}</em>
|
<em>{{ 'unknown'|_ }}</em>
|
||||||
</td>
|
</td>
|
||||||
|
{% else %}
|
||||||
|
<td class="hidden-sm hidden-xs" data-value="{{ entry.nextExpectedMatch.format('U') }}">
|
||||||
|
{{ entry.nextExpectedMatch.formatLocalized(monthAndDayFormat) }}
|
||||||
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<td class="hidden-sm hidden-xs" data-value="{{ entry.active }}">
|
<td class="hidden-sm hidden-xs" data-value="{{ entry.active }}">
|
||||||
|
|||||||
Reference in New Issue
Block a user