diff --git a/src/accounting/static/css/style.css b/src/accounting/static/css/style.css index c4a7656..5ea33ff 100644 --- a/src/accounting/static/css/style.css +++ b/src/accounting/static/css/style.css @@ -323,6 +323,17 @@ a.accounting-report-table-row { margin-bottom: 0.3rem; } +/* The order of the journal entries in a same day */ +.accounting-journal-entry-order-item, .accounting-journal-entry-order-item:hover { + color: inherit; + text-decoration: none; +} +.accounting-journal-entry-order-item-currency { + margin-left: 0.5rem; + border-top: thin solid lightgray; + margin-top: 0.2rem; +} + /* The Material Design text field (floating form control in Bootstrap) */ .accounting-material-text-field { position: relative; diff --git a/src/accounting/templates/accounting/journal-entry/include/order-journal-entry.html b/src/accounting/templates/accounting/journal-entry/include/order-journal-entry.html new file mode 100644 index 0000000..8ecfdb3 --- /dev/null +++ b/src/accounting/templates/accounting/journal-entry/include/order-journal-entry.html @@ -0,0 +1,57 @@ +{# +The Mia! Accounting Flask Project +order-journal-entry.html: The journal entry in the journal entry order page + + Copyright (c) 2023 imacat. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +Author: imacat@mail.imacat.idv.tw (imacat) +First written: 2023/3/21 +#} + +
+ {{ journal_entry.date|accounting_format_date }} + {% if journal_entry.is_cash_disbursement %} + {{ A_("Cash Disbursement") }} + {% elif journal_entry.is_cash_receipt %} + {{ A_("Cash Receipt") }} + {% else %} + {{ A_("Transfer") }} + {% endif %} +
+ {% for currency in journal_entry.currencies %} +
+
+ {% if not journal_entry.is_cash_receipt %} + {% for line_item in currency.debit %} +
{{ line_item.description|accounting_default }}
+ {% endfor %} + {% endif %} + {% if not journal_entry.is_cash_disbursement %} + {% for line_item in currency.credit %} +
{{ line_item.description|accounting_default }}
+ {% endfor %} + {% endif %} +
+
+ + {% if currency.code != accounting_default_currency_code() %} + {{ currency.code }} + {% endif %} + {{ currency.debit_total|accounting_format_amount }} + +
+
+ {% endfor %} +
diff --git a/src/accounting/templates/accounting/journal-entry/order.html b/src/accounting/templates/accounting/journal-entry/order.html index b4b08f4..ccf1ff7 100644 --- a/src/accounting/templates/accounting/journal-entry/order.html +++ b/src/accounting/templates/accounting/journal-entry/order.html @@ -47,9 +47,9 @@ First written: 2023/2/26 {% for item in list %}
  • -
    - {{ item }} -
    + {% with journal_entry = item %} + {% include "accounting/journal-entry/include/order-journal-entry.html" %} + {% endwith %}
  • {% endfor %} @@ -72,7 +72,9 @@ First written: 2023/2/26