64 lines
2.3 KiB
HTML
64 lines
2.3 KiB
HTML
{% var letterhead= filters.letter_head || (frappe.get_doc(":Company", filters.company) && frappe.get_doc(":Company", filters.company).default_letter_head) || frappe.defaults.get_default("letter_head"); %}
|
|
{% if(letterhead) { %}
|
|
<div style="margin-bottom: 7px;" class="text-center">
|
|
{%= frappe.boot.letter_heads[letterhead].header %}
|
|
</div>
|
|
{% } %}
|
|
<h2 class="text-center">{%= __("Statement of Account") %}</h2>
|
|
<h4 class="text-center">
|
|
{% if (filters.party_name) { %}
|
|
{%= filters.party_name %}
|
|
{% } else if (filters.party) { %}
|
|
{%= filters.party %}
|
|
{% } else if (filters.account) { %}
|
|
{%= filters.account %}
|
|
{% } %}
|
|
</h4>
|
|
<h5 class="text-center">
|
|
{%= dateutil.str_to_user(filters.from_date) %}
|
|
{%= __("to") %}
|
|
{%= dateutil.str_to_user(filters.to_date) %}
|
|
</h5>
|
|
<hr>
|
|
<table class="table table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 15%">{%= __("Date") %}</th>
|
|
<th style="width: 15%">{%= __("Ref") %}</th>
|
|
<th style="width: 40%">{%= __("Party") %}</th>
|
|
<th style="width: 15%">{%= __("Debit") %}</th>
|
|
<th style="width: 15%">{%= __("Credit") %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for(var i=0, l=data.length; i<l; i++) { %}
|
|
<tr>
|
|
{% if(data[i][__("Posting Date")]) { %}
|
|
<td>{%= dateutil.str_to_user(data[i][__("Posting Date")]) %}</td>
|
|
<td>{%= data[i][__("Voucher Type")] %}
|
|
<br>{%= data[i][__("Voucher No")] %}</td>
|
|
<td>
|
|
{% if(!(filters.party || filters.account)) { %}
|
|
{%= data[i][__("Party")] || data[i][__("Account")] %}
|
|
<br>
|
|
{% } %}
|
|
|
|
{{ __("Against") }}: {%= data[i][__("Against Account")] %}
|
|
<br>{%= __("Remarks") %}: {%= data[i][__("Remarks")] %}</td>
|
|
<td style="text-align: right">{%= format_currency(data[i][__("Debit")]) %}</td>
|
|
<td style="text-align: right">{%= format_currency(data[i][__("Credit")]) %}</td>
|
|
{% } else { %}
|
|
<td></td>
|
|
<td></td>
|
|
<td><b>{%= frappe.format(data[i][__("Account")], {fieldtype: "Link"}) || " " %}</b></td>
|
|
<td style="text-align: right">
|
|
{%= data[i][__("Account")] && format_currency(data[i][__("Debit")]) %}</td>
|
|
<td style="text-align: right">
|
|
{%= data[i][__("Account")] && format_currency(data[i][__("Credit")]) %}</td>
|
|
{% } %}
|
|
</tr>
|
|
{% } %}
|
|
</tbody>
|
|
</table>
|
|
<p class="text-right text-muted">Printed On {%= dateutil.str_to_user(dateutil.get_datetime_as_string()) %}</p>
|