Show opening balance on Account Transactions with commodities report even when nil

This commit is contained in:
RunasSudo 2020-03-30 19:26:14 +11:00
parent 1022faf86d
commit f789817371
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -50,6 +50,16 @@
<td>{% if amount.currency.price %}<span title="{{ amount.tostr(False) }}">{{ '{' + amount.currency.price|bc + '}' }}</span>{% endif %}</td> <td>{% if amount.currency.price %}<span title="{{ amount.tostr(False) }}">{{ '{' + amount.currency.price|bc + '}' }}</span>{% endif %}</td>
<td>{% if amount >= 0 %}Dr{% else %}Cr{% endif %}</td> <td>{% if amount >= 0 %}Dr{% else %}Cr{% endif %}</td>
</tr> </tr>
{% else %}
<tr class="total">
<td><a href="{{ prevlink }}">{{ pstart.strftime('%Y-%m-%d') }}</a></td>
<td><a href="{{ prevlink }}">Opening Balance</a></td>
<td></td>
<td></td>
<td style="text-align: right;"><a href="{{ prevlink }}">0.00</a></td>
<td></td>
<td>Dr</td>
</tr>
{% endfor %} {% endfor %}
{% set ns.balance = opening_balance %} {% set ns.balance = opening_balance %}