diff --git a/drcr/templates/statements/statement_line_edit_transaction.html b/drcr/templates/statements/statement_line_edit_transaction.html index f2d83ba..7f016ca 100644 --- a/drcr/templates/statements/statement_line_edit_transaction.html +++ b/drcr/templates/statements/statement_line_edit_transaction.html @@ -60,7 +60,7 @@ {# FIXME: Customise date, etc. #} {{ statement_line.dt.strftime('%Y-%m-%d') }} - + @@ -68,24 +68,27 @@ {# Source line #} - {{ 'Dr' if statement_line.quantity >= 0 else 'Cr' }} {{ statement_line.source_account }} {##} + +
+
{{ 'Dr' if statement_line.quantity >= 0 else 'Cr' }}
+ +
+ {% if statement_line.quantity >= 0 %}{{ statement_line.amount().format() }}{% else %}{% endif %} {% if statement_line.quantity < 0 %}{{ (statement_line.amount()|abs).format() }}{% else %}{% endif %} {# Charge lines #} - {% if transaction == None %} + {% if transaction == None or transaction.postings|length == 2 %} - {{ 'Cr' if statement_line.quantity >= 0 else 'Dr' }} - {% if statement_line.quantity < 0 %}{{ (statement_line.amount()|abs).format() }}{% else %}{% endif %} - {% if statement_line.quantity >= 0 %}{{ statement_line.amount().format() }}{% else %}{% endif %} - - {% elif transaction.postings|length == 2 %} - - - - {{ 'Cr' if statement_line.quantity >= 0 else 'Dr' }} + +
+
{{ 'Cr' if statement_line.quantity >= 0 else 'Dr' }}
+ + +
+ {% if statement_line.quantity < 0 %}{{ (statement_line.amount()|abs).format() }}{% else %}{% endif %} {% if statement_line.quantity >= 0 %}{{ statement_line.amount().format() }}{% else %}{% endif %} @@ -94,9 +97,29 @@ - {{ 'Cr' if statement_line.quantity >= 0 else 'Dr' }} - {% if statement_line.quantity < 0 %}{{ posting.commodity }}{% else %}{% endif %} - {% if statement_line.quantity >= 0 %}{{ posting.commodity }}{% else %}{% endif %} + +
+
{{ 'Cr' if statement_line.quantity >= 0 else 'Dr' }}
+ + +
+ + {% if statement_line.quantity < 0 %} + +
+
{{ posting.commodity }}
+ +
+ + {% else %}{% endif %} + {% if statement_line.quantity >= 0 %} + +
+
{{ posting.commodity }}
+ +
+ + {% else %}{% endif %} {% endfor %} {% endif %} @@ -113,7 +136,7 @@ {% block scripts %}