From b62cfffdea95fde81fa0cc83d18758db3f376176 Mon Sep 17 00:00:00 2001 From: Anurag Mishra Date: Fri, 5 Apr 2019 12:35:46 +0530 Subject: [PATCH] fix: Print Auditing print format --- .../bank_and_cash_payment_voucher.html | 53 ++++++++----------- .../journal_auditing_voucher.html | 50 ++++++++--------- .../purchase_auditing_voucher.html | 12 +++-- .../sales_auditing_voucher.html | 8 +-- 4 files changed, 59 insertions(+), 64 deletions(-) diff --git a/erpnext/accounts/print_format/bank_and_cash_payment_voucher/bank_and_cash_payment_voucher.html b/erpnext/accounts/print_format/bank_and_cash_payment_voucher/bank_and_cash_payment_voucher.html index 2eadb2a92a..06f77b0f1d 100644 --- a/erpnext/accounts/print_format/bank_and_cash_payment_voucher/bank_and_cash_payment_voucher.html +++ b/erpnext/accounts/print_format/bank_and_cash_payment_voucher/bank_and_cash_payment_voucher.html @@ -30,10 +30,29 @@ Party Amount + + Debit + + {% for entries in doc.gl_entries %} + {% if entries.credit == 0.0 %} + + {{ entries.account }} + {{ entries.party_type }} + {{ entries.party }} + {{ entries.debit }} + + + Narration
{{ entries.remarks }} + + {% endif %} + {% endfor %} + + Total (debit) + {{ doc.gl_entries | sum(attribute='debit') }} + Credit - {% set total_credit = 0 -%} {% for entries in doc.gl_entries %} {% if entries.debit == 0.0 %} @@ -41,42 +60,16 @@ {{ entries.party_type }} {{ entries.party }} {{ entries.credit }} - {% set total_credit = total_credit + entries.credit -%} Narration
{{ entries.remarks }} + {% endif %} + {% endfor %} Total (credit) - {{total_credit}} + {{ doc.gl_entries | sum(attribute='credit') }} - {% endif %} - {% endfor %} - - - - - Debit - - {% set total_debit = 0 -%} - {% for entries in doc.gl_entries %} - {% if entries.credit == 0.0 %} - - {{ entries.account }} - {{ entries.party_type }} - {{ entries.party }} - {% set total_debit = total_debit + entries.debit -%} - {{ entries.debit }} - - - Narration
{{ entries.remarks }} - - - Total (debit) - {{total_debit}} - - {% endif %} - {% endfor %}
\ No newline at end of file diff --git a/erpnext/accounts/print_format/journal_auditing_voucher/journal_auditing_voucher.html b/erpnext/accounts/print_format/journal_auditing_voucher/journal_auditing_voucher.html index 4565559084..566d444ae7 100644 --- a/erpnext/accounts/print_format/journal_auditing_voucher/journal_auditing_voucher.html +++ b/erpnext/accounts/print_format/journal_auditing_voucher/journal_auditing_voucher.html @@ -3,14 +3,12 @@ .table-bordered td.top-bottom {border-top: none !important;border-bottom: none !important;} .table-bordered td.right{border-right: none !important;} .table-bordered td.left{border-left: none !important;} - -
{%- if not doc.get("print_heading") and not doc.get("select_print_heading") and doc.set("select_print_heading", _("Journal Entry")) -%}{%- endif -%} {{ add_header(0, 1, doc, letter_head, no_letterhead, print_settings) }} -
+
@@ -22,7 +20,7 @@
Voucher No: {{ doc.name }}
-
+
@@ -30,10 +28,26 @@ + + + + {% for entries in doc.gl_entries %} + {% if entries.credit == 0.0 %} + + + + + + + {% endif %} + {% endfor %} + + + + - {% set total_credit = 0 -%} {% for entries in doc.gl_entries %} {% if entries.debit == 0.0 %} @@ -41,36 +55,16 @@ - {% set total_credit = total_credit + entries.credit -%} - - - - {% endif %} {% endfor %} - + + - + - {% set total_debit = 0 -%} - {% for entries in doc.gl_entries %} - {% if entries.credit == 0.0 %} - - - - - {% set total_debit = total_debit + entries.debit -%} - - - - - - - {% endif %} - {% endfor %}
AccountParty Amount
Debit
{{ entries.account }}{{ entries.party_type }}{{ entries.party }}{{ entries.debit }}
Total (debit) {{ doc.gl_entries | sum(attribute='debit') }}
Credit
{{ entries.party_type }} {{ entries.party }} {{ entries.credit }}
Total (credit) {{total_credit}}
Total (credit) {{ doc.gl_entries | sum(attribute='credit') }}
DebitNarration: {{ doc.gl_entries[0].remarks }}
{{ entries.account }}{{ entries.party_type }}{{ entries.party }}{{ entries.debit }}
Total (debit) {{total_debit}}
\ No newline at end of file diff --git a/erpnext/accounts/print_format/purchase_auditing_voucher/purchase_auditing_voucher.html b/erpnext/accounts/print_format/purchase_auditing_voucher/purchase_auditing_voucher.html index 35852e1e1c..342ce22b3a 100644 --- a/erpnext/accounts/print_format/purchase_auditing_voucher/purchase_auditing_voucher.html +++ b/erpnext/accounts/print_format/purchase_auditing_voucher/purchase_auditing_voucher.html @@ -60,10 +60,16 @@ {% for tax in doc.taxes %} - + {% if tax.tax_amount_after_discount_amount!= 0 %} + + {% endfor %} + {% if doc.taxes_and_charges_added!= 0 %} + {% endif %} + {% if doc.taxes_and_charges_deducted!= 0 %} + {% endif %}
Tax and Charges: {{doc.taxes_and_charges}}
{{ tax.account_head }}: {{ tax.tax_amount_after_discount_amount }}
{{ tax.account_head }}: {{ tax.tax_amount_after_discount_amount }}
Taxes and Charges Added: {{ doc.taxes_and_charges_added }}
Taxes and Charges Deducted: {{ doc.taxes_and_charges_deducted }}
Total Taxes and Charges: {{ doc.total_taxes_and_charges }}
Net Payable: {{ doc.grand_total }}
@@ -76,8 +82,8 @@ Account Party Type Party - Credit Amount Debit Amount + Credit Amount {% for entries in doc.gl_entries %} @@ -85,8 +91,8 @@ {{ entries.account }} {{ entries.party_type }} {{ entries.party }} - {{ entries.credit }} {{ entries.debit }} + {{ entries.credit }} {% endfor %} diff --git a/erpnext/accounts/print_format/sales_auditing_voucher/sales_auditing_voucher.html b/erpnext/accounts/print_format/sales_auditing_voucher/sales_auditing_voucher.html index 04de83de70..4dc4b8a4a9 100644 --- a/erpnext/accounts/print_format/sales_auditing_voucher/sales_auditing_voucher.html +++ b/erpnext/accounts/print_format/sales_auditing_voucher/sales_auditing_voucher.html @@ -56,7 +56,9 @@ {% for tax in doc.taxes %} - + {% if tax.tax_amount_after_discount_amount!= 0 %} + + {% endif %} {% endfor %} @@ -70,8 +72,8 @@ - + {% for entries in doc.gl_entries %} @@ -79,8 +81,8 @@ - + {% endfor %}
Tax and Charges: {{doc.taxes_and_charges}}
{{ tax.account_head }}: {{ tax.tax_amount_after_discount_amount }}
{{ tax.account_head }}: {{ tax.tax_amount_after_discount_amount }}
Total Taxes and Charges: {{ doc.total_taxes_and_charges }}
Net Payable: {{ doc.grand_total }}
Account Party Type PartyCredit Amount Debit AmountCredit Amount
{{ entries.account }} {{ entries.party_type }} {{ entries.party }}{{ entries.credit }} {{ entries.debit }}{{ entries.credit }}