fix: Print Auditing print format

This commit is contained in:
Anurag Mishra 2019-04-05 12:35:46 +05:30
parent 0d3986c9f6
commit b62cfffdea
4 changed files with 59 additions and 64 deletions

View File

@ -30,10 +30,29 @@
<th>Party</th> <th>Party</th>
<th>Amount</th> <th>Amount</th>
</tr> </tr>
<tr>
<td class="top-bottom" colspan="5"><strong>Debit</strong></td>
</tr>
{% for entries in doc.gl_entries %}
{% if entries.credit == 0.0 %}
<tr>
<td class="right top-bottom">{{ entries.account }}</td>
<td class="right left top-bottom">{{ entries.party_type }}</td>
<td class="right left top-bottom">{{ entries.party }}</td>
<td class="left top-bottom">{{ entries.debit }}</td>
</tr>
<tr>
<td class="top-bottom"colspan="4"><strong> Narration </strong><br>{{ entries.remarks }}</td>
</tr>
{% endif %}
{% endfor %}
<tr>
<td class="right" colspan="3" ><strong>Total (debit) </strong></td>
<td class="left" >{{ doc.gl_entries | sum(attribute='debit') }}</td>
</tr>
<tr> <tr>
<td class="top-bottom" colspan="5"><strong>Credit</strong></td> <td class="top-bottom" colspan="5"><strong>Credit</strong></td>
</tr> </tr>
{% set total_credit = 0 -%}
{% for entries in doc.gl_entries %} {% for entries in doc.gl_entries %}
{% if entries.debit == 0.0 %} {% if entries.debit == 0.0 %}
<tr> <tr>
@ -41,42 +60,16 @@
<td class="right left top-bottom">{{ entries.party_type }}</td> <td class="right left top-bottom">{{ entries.party_type }}</td>
<td class="right left top-bottom">{{ entries.party }}</td> <td class="right left top-bottom">{{ entries.party }}</td>
<td class="left top-bottom">{{ entries.credit }}</td> <td class="left top-bottom">{{ entries.credit }}</td>
{% set total_credit = total_credit + entries.credit -%}
</tr> </tr>
<tr> <tr>
<td class="top-bottom" colspan="4"><strong> Narration </strong><br>{{ entries.remarks }}</td> <td class="top-bottom" colspan="4"><strong> Narration </strong><br>{{ entries.remarks }}</td>
</tr> </tr>
{% endif %}
{% endfor %}
<tr> <tr>
<td class="right" colspan="3"><strong>Total (credit) </strong></td> <td class="right" colspan="3"><strong>Total (credit) </strong></td>
<td class="left" >{{total_credit}}</td> <td class="left" >{{ doc.gl_entries | sum(attribute='credit') }}</td>
</tr> </tr>
{% endif %}
{% endfor %}
<tr>
<td class="top-bottom" colspan="4"> </td>
</tr>
<tr>
<td class="top-bottom" colspan="5"><strong>Debit</strong></td>
</tr>
{% set total_debit = 0 -%}
{% for entries in doc.gl_entries %}
{% if entries.credit == 0.0 %}
<tr>
<td class="right top-bottom">{{ entries.account }}</td>
<td class="right left top-bottom">{{ entries.party_type }}</td>
<td class="right left top-bottom">{{ entries.party }}</td>
{% set total_debit = total_debit + entries.debit -%}
<td class="left top-bottom">{{ entries.debit }}</td>
</tr>
<tr>
<td class="top-bottom"colspan="4"><strong> Narration </strong><br>{{ entries.remarks }}</td>
</tr>
<tr>
<td class="right" colspan="3" ><strong>Total (debit) </strong></td>
<td class="left" >{{total_debit}}</td>
</tr>
{% endif %}
{% endfor %}
</table> </table>
<div> <div>
</div> </div>

View File

@ -3,14 +3,12 @@
.table-bordered td.top-bottom {border-top: none !important;border-bottom: none !important;} .table-bordered td.top-bottom {border-top: none !important;border-bottom: none !important;}
.table-bordered td.right{border-right: none !important;} .table-bordered td.right{border-right: none !important;}
.table-bordered td.left{border-left: none !important;} .table-bordered td.left{border-left: none !important;}
</style> </style>
<div class="page-break"> <div class="page-break">
{%- if not doc.get("print_heading") and not doc.get("select_print_heading") {%- if not doc.get("print_heading") and not doc.get("select_print_heading")
and doc.set("select_print_heading", _("Journal Entry")) -%}{%- endif -%} and doc.set("select_print_heading", _("Journal Entry")) -%}{%- endif -%}
{{ add_header(0, 1, doc, letter_head, no_letterhead, print_settings) }} {{ add_header(0, 1, doc, letter_head, no_letterhead, print_settings) }}
<div class="row margin-bottom"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<table> <table>
<tr><td><strong>Voucher No: </strong></td><td>{{ doc.name }}</td></tr> <tr><td><strong>Voucher No: </strong></td><td>{{ doc.name }}</td></tr>
@ -22,7 +20,7 @@
</table> </table>
</div> </div>
</div> </div>
<div class="margin-top"> <div>
<table class="table table-bordered table-condensed"> <table class="table table-bordered table-condensed">
<tr> <tr>
<th>Account</th> <th>Account</th>
@ -30,10 +28,26 @@
<th>Party</th> <th>Party</th>
<th>Amount</th> <th>Amount</th>
</tr> </tr>
<tr>
<td class="top-bottom" colspan="5"><strong>Debit</strong></td>
</tr>
{% for entries in doc.gl_entries %}
{% if entries.credit == 0.0 %}
<tr>
<td class="right top-bottom">{{ entries.account }}</td>
<td class="right left top-bottom">{{ entries.party_type }}</td>
<td class="right left top-bottom">{{ entries.party }}</td>
<td class="left top-bottom">{{ entries.debit }}</td>
</tr>
{% endif %}
{% endfor %}
<tr>
<td class="right" colspan="3" ><strong>Total (debit) </strong></td>
<td class="left" >{{ doc.gl_entries | sum(attribute='debit') }}</td>
</tr>
<tr> <tr>
<td class="top-bottom" colspan="5"><strong>Credit</strong></td> <td class="top-bottom" colspan="5"><strong>Credit</strong></td>
</tr> </tr>
{% set total_credit = 0 -%}
{% for entries in doc.gl_entries %} {% for entries in doc.gl_entries %}
{% if entries.debit == 0.0 %} {% if entries.debit == 0.0 %}
<tr> <tr>
@ -41,36 +55,16 @@
<td class="right left top-bottom">{{ entries.party_type }}</td> <td class="right left top-bottom">{{ entries.party_type }}</td>
<td class="right left top-bottom">{{ entries.party }}</td> <td class="right left top-bottom">{{ entries.party }}</td>
<td class="left top-bottom">{{ entries.credit }}</td> <td class="left top-bottom">{{ entries.credit }}</td>
{% set total_credit = total_credit + entries.credit -%}
</tr>
<tr>
<td class="right" colspan="3"><strong>Total (credit) </strong></td>
<td class="left" >{{total_credit}}</td>
</tr> </tr>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
<tr> <tr>
<td class="top-bottom" colspan="4"> </td> <td class="right" colspan="3"><strong>Total (credit) </strong></td>
<td class="left" >{{ doc.gl_entries | sum(attribute='credit') }}</td>
</tr> </tr>
<tr> <tr>
<td class="top-bottom" colspan="5"><strong>Debit</strong></td> <td class="top-bottom" colspan="5"><b>Narration: </b>{{ doc.gl_entries[0].remarks }}</td>
</tr> </tr>
{% set total_debit = 0 -%}
{% for entries in doc.gl_entries %}
{% if entries.credit == 0.0 %}
<tr>
<td class="right top-bottom">{{ entries.account }}</td>
<td class="right left top-bottom">{{ entries.party_type }}</td>
<td class="right left top-bottom">{{ entries.party }}</td>
{% set total_debit = total_debit + entries.debit -%}
<td class="left top-bottom">{{ entries.debit }}</td>
</tr>
<tr>
<td class="right" colspan="3" ><strong>Total (debit) </strong></td>
<td class="left" >{{total_debit}}</td>
</tr>
{% endif %}
{% endfor %}
</table> </table>
<div> <div>
</div> </div>

View File

@ -60,10 +60,16 @@
<table> <table>
<tr><td><strong>Tax and Charges: </strong></td><td>{{doc.taxes_and_charges}}</td></tr> <tr><td><strong>Tax and Charges: </strong></td><td>{{doc.taxes_and_charges}}</td></tr>
{% for tax in doc.taxes %} {% for tax in doc.taxes %}
<tr><td><strong>{{ tax.account_head }}: </strong></td><td>{{ tax.tax_amount_after_discount_amount }}</td></tr> {% if tax.tax_amount_after_discount_amount!= 0 %}
<tr><td><strong>{{ tax.account_head }}: </strong></td><td>{{ tax.tax_amount_after_discount_amount }}</td></tr>
{% endfor %} {% endfor %}
{% if doc.taxes_and_charges_added!= 0 %}
<tr><td><strong> Taxes and Charges Added: </strong></td><td>{{ doc.taxes_and_charges_added }}</td></tr> <tr><td><strong> Taxes and Charges Added: </strong></td><td>{{ doc.taxes_and_charges_added }}</td></tr>
{% endif %}
{% if doc.taxes_and_charges_deducted!= 0 %}
<tr><td><strong> Taxes and Charges Deducted: </strong></td><td>{{ doc.taxes_and_charges_deducted }}</td></tr> <tr><td><strong> Taxes and Charges Deducted: </strong></td><td>{{ doc.taxes_and_charges_deducted }}</td></tr>
{% endif %}
<tr><td><strong> Total Taxes and Charges: </strong></td><td>{{ doc.total_taxes_and_charges }}</td></tr> <tr><td><strong> Total Taxes and Charges: </strong></td><td>{{ doc.total_taxes_and_charges }}</td></tr>
<tr><td><strong> Net Payable: </strong></td><td>{{ doc.grand_total }}</td></tr> <tr><td><strong> Net Payable: </strong></td><td>{{ doc.grand_total }}</td></tr>
</table> </table>
@ -76,8 +82,8 @@
<th>Account</th> <th>Account</th>
<th>Party Type</th> <th>Party Type</th>
<th>Party</th> <th>Party</th>
<th>Credit Amount</th>
<th>Debit Amount</th> <th>Debit Amount</th>
<th>Credit Amount</th>
</tr> </tr>
{% for entries in doc.gl_entries %} {% for entries in doc.gl_entries %}
<tr> <tr>
@ -85,8 +91,8 @@
<td>{{ entries.account }}</td> <td>{{ entries.account }}</td>
<td>{{ entries.party_type }}</td> <td>{{ entries.party_type }}</td>
<td>{{ entries.party }}</td> <td>{{ entries.party }}</td>
<td>{{ entries.credit }}</td>
<td>{{ entries.debit }}</td> <td>{{ entries.debit }}</td>
<td>{{ entries.credit }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
<tr> <tr>

View File

@ -56,7 +56,9 @@
<table> <table>
<tr><td><strong>Tax and Charges: </strong></td><td>{{doc.taxes_and_charges}}</td></tr> <tr><td><strong>Tax and Charges: </strong></td><td>{{doc.taxes_and_charges}}</td></tr>
{% for tax in doc.taxes %} {% for tax in doc.taxes %}
<tr><td><strong>{{ tax.account_head }}: </strong></td><td>{{ tax.tax_amount_after_discount_amount }}</td></tr> {% if tax.tax_amount_after_discount_amount!= 0 %}
<tr><td><strong>{{ tax.account_head }}: </strong></td><td>{{ tax.tax_amount_after_discount_amount }}</td></tr>
{% endif %}
{% endfor %} {% endfor %}
<tr><td><strong> Total Taxes and Charges: </strong></td><td>{{ doc.total_taxes_and_charges }}</td></tr> <tr><td><strong> Total Taxes and Charges: </strong></td><td>{{ doc.total_taxes_and_charges }}</td></tr>
<tr><td><strong> Net Payable: </strong></td><td>{{ doc.grand_total }}</td></tr> <tr><td><strong> Net Payable: </strong></td><td>{{ doc.grand_total }}</td></tr>
@ -70,8 +72,8 @@
<th>Account</th> <th>Account</th>
<th>Party Type</th> <th>Party Type</th>
<th>Party</th> <th>Party</th>
<th>Credit Amount</th>
<th>Debit Amount</th> <th>Debit Amount</th>
<th>Credit Amount</th>
</tr> </tr>
{% for entries in doc.gl_entries %} {% for entries in doc.gl_entries %}
<tr> <tr>
@ -79,8 +81,8 @@
<td>{{ entries.account }}</td> <td>{{ entries.account }}</td>
<td>{{ entries.party_type }}</td> <td>{{ entries.party_type }}</td>
<td>{{ entries.party }}</td> <td>{{ entries.party }}</td>
<td>{{ entries.credit }}</td>
<td>{{ entries.debit }}</td> <td>{{ entries.debit }}</td>
<td>{{ entries.credit }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
<tr> <tr>