Added the "debit" and "credit" properties to, and removed the "is_debit" property from the JournalRow row, to reduce the amount of logic in the template of the journal.

This commit is contained in:
2023-03-06 02:32:02 +08:00
parent dd05478bf3
commit 5d4effa360
2 changed files with 13 additions and 13 deletions

View File

@ -109,8 +109,8 @@ First written: 2023/3/4
<td>{{ item.currency.name }}</td>
<td>{{ item.account.title|title }}</td>
<td>{{ item.summary|accounting_default }}</td>
<td class="accounting-amount">{{ "" if not item.is_debit else item.amount|accounting_format_amount }}</td>
<td class="accounting-amount">{{ "" if item.is_debit else item.amount|accounting_format_amount }}</td>
<td class="accounting-amount">{{ item.debit|accounting_format_amount|accounting_default }}</td>
<td class="accounting-amount">{{ item.credit|accounting_format_amount|accounting_default }}</td>
</tr>
{% endfor %}
</tbody>