mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-21 00:50:07 +00:00
Fix for #682
This commit is contained in:
@@ -40,45 +40,33 @@
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
{#
|
|
||||||
Terms:
|
|
||||||
paidDates: journals linked to the bill between $start and $end.
|
|
||||||
payDates: dates in this period ($start and $end) system thinks bill should be paid.
|
|
||||||
Possible situations:
|
|
||||||
|
|
||||||
1:
|
|
||||||
paidDates = 0 (bill not paid in period)
|
|
||||||
payDates = 0 (bill not expected to be paid in this period)
|
|
||||||
bill is active.
|
|
||||||
|
|
||||||
2:
|
|
||||||
paidDates = 0 (bill not paid in period)
|
|
||||||
payDates = 0 (bill IS expected to be paid in this period)
|
|
||||||
bill is active
|
|
||||||
|
|
||||||
3:
|
|
||||||
paidDates >= payDates (bill is paid as many times or more than the amount of times expected).
|
|
||||||
|
|
||||||
4:
|
|
||||||
bill is not active
|
|
||||||
#}
|
|
||||||
<!--
|
<!--
|
||||||
Some debug data:
|
Some debug data:
|
||||||
entry.paidDates.count(): {{ entry.paidDates.count() }}
|
entry.paidDates.count(): {{ entry.paidDates.count() }}
|
||||||
entry.paidDates set:
|
entry.paidDates set:
|
||||||
entry.payDates.count(): {{ entry.payDates.count() }}
|
entry.payDates.count(): {{ entry.payDates.count() }}
|
||||||
active: {% if entry.active %}true{% else %}false{% endif %}
|
active: {% if entry.active %}true{% else %}false{% endif %}
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
{#
|
||||||
|
paidDates = 0 (bill not paid in period)
|
||||||
|
payDates = 0 (bill not expected to be paid in this period)
|
||||||
|
bill is active.
|
||||||
|
#}
|
||||||
{% if entry.paidDates.count() == 0 and entry.payDates.count() == 0 and entry.active %}
|
{% if entry.paidDates.count() == 0 and entry.payDates.count() == 0 and entry.active %}
|
||||||
<td class="text-muted" data-value="0001-00-00 00-00-00">
|
<td class="text-muted" data-value="0001-00-00 00-00-00">
|
||||||
{{ 'not_expected_period'|_ }}
|
{{ 'not_expected_period'|_ }}
|
||||||
</td>
|
</td>
|
||||||
<td class=" hidden-sm hidden-xs" data-value="{{ entry.nextExpectedMatch.format('Y-m-d H-i-s') }}">
|
<td class="hidden-sm hidden-xs" data-value="{{ entry.nextExpectedMatch.format('Y-m-d H-i-s') }}">
|
||||||
{{ entry.nextExpectedMatch.formatLocalized(monthAndDayFormat) }}
|
{{ entry.nextExpectedMatch.formatLocalized(monthAndDayFormat) }}
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{#
|
||||||
|
paidDates = 0 (bill not paid in period)
|
||||||
|
payDates > 0 (bill IS expected to be paid in this period)
|
||||||
|
bill is active
|
||||||
|
#}
|
||||||
{% if entry.paidDates.count() == 0 and entry.payDates.count() > 0 and entry.active %}
|
{% if entry.paidDates.count() == 0 and entry.payDates.count() > 0 and entry.active %}
|
||||||
<td class="text-danger" data-value="0002-00-00 00-00-00">
|
<td class="text-danger" data-value="0002-00-00 00-00-00">
|
||||||
{{ 'not_or_not_yet'|_ }}
|
{{ 'not_or_not_yet'|_ }}
|
||||||
@@ -87,7 +75,12 @@
|
|||||||
{{ entry.nextExpectedMatch.formatLocalized(monthAndDayFormat) }}
|
{{ entry.nextExpectedMatch.formatLocalized(monthAndDayFormat) }}
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if entry.paidDates.count() >= entry.payDates.count() and entry.payDates.count() > 0 and entry.active %}
|
|
||||||
|
{#
|
||||||
|
paidDates >= 0 (bill is paid X times).
|
||||||
|
Don't care about payDates.
|
||||||
|
#}
|
||||||
|
{% if entry.paidDates.count() > 0 and entry.active %}
|
||||||
<td class="text-success" data-value="{{ entry.paidDates.first.format('Y-m-d H-i-s') }}">
|
<td class="text-success" data-value="{{ entry.paidDates.first.format('Y-m-d H-i-s') }}">
|
||||||
{% for date in entry.paidDates %}
|
{% for date in entry.paidDates %}
|
||||||
{{ date.formatLocalized(monthAndDayFormat) }}<br/>
|
{{ date.formatLocalized(monthAndDayFormat) }}<br/>
|
||||||
@@ -97,6 +90,7 @@
|
|||||||
{{ entry.nextExpectedMatch.formatLocalized(monthAndDayFormat) }}
|
{{ entry.nextExpectedMatch.formatLocalized(monthAndDayFormat) }}
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{# bill is not active #}
|
||||||
{% if not entry.active %}
|
{% if not entry.active %}
|
||||||
<td class="text-muted" data-value="0000-00-00 00-00-00">
|
<td class="text-muted" data-value="0000-00-00 00-00-00">
|
||||||
~
|
~
|
||||||
|
|||||||
Reference in New Issue
Block a user