2014-12-01 11:31:44 +00:00
|
|
|
<div style="margin-bottom: 7px;" class="text-center">
|
2016-09-02 05:55:28 +00:00
|
|
|
{%= frappe.boot.letter_heads[frappe.get_doc(":Company", filters.company).default_letter_head || frappe.defaults.get_default("letter_head")] %}
|
2014-12-01 11:31:44 +00:00
|
|
|
</div>
|
|
|
|
<h2 class="text-center">{%= __(report.report_name) %}</h2>
|
2016-03-15 10:40:04 +00:00
|
|
|
<h4 class="text-center">{%= filters.customer || filters.supplier %} </h4>
|
2014-12-01 11:31:44 +00:00
|
|
|
<h5 class="text-center">
|
|
|
|
{%= filters.ageing_based_on %}
|
|
|
|
{%= __("Until") %}
|
|
|
|
{%= dateutil.str_to_user(filters.report_date) %}
|
|
|
|
</h5>
|
|
|
|
<hr>
|
|
|
|
<table class="table table-bordered">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
{% if(__(report.report_name) == "Accounts Receivable" || __(report.report_name) == "Accounts Payable") { %}
|
|
|
|
<th style="width: 15%">{%= __("Date") %}</th>
|
|
|
|
<th style="width: 15%">{%= __("Ref") %}</th>
|
|
|
|
<th style="width: 40%">{%= __("Party") %}</th>
|
|
|
|
<th style="width: 15%">{%= __("Invoiced Amount") %}</th>
|
|
|
|
<th style="width: 15%">{%= __("Paid Amount") %}</th>
|
|
|
|
<th style="width: 15%">{%= __("Outstanding Amount") %}</th>
|
|
|
|
{% } else { %}
|
|
|
|
<th style="width: 40%">{%= __("Party") %}</th>
|
|
|
|
<th style="width: 15%">{%= __("Total Invoiced Amount") %}</th>
|
|
|
|
<th style="width: 15%">{%= __("Total Paid Amount") %}</th>
|
|
|
|
<th style="width: 15%">{%= __("Total Outstanding Amount") %}</th>
|
|
|
|
{% } %}
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for(var i=0, l=data.length; i<l; i++) { %}
|
|
|
|
<tr>
|
|
|
|
{% if(__(report.report_name) == "Accounts Receivable" || __(report.report_name) == "Accounts Payable") { %}
|
2016-03-17 09:42:05 +00:00
|
|
|
{% if(data[i][__("Customer")] || data[i][__("Supplier")]) { %}
|
2014-12-01 11:31:44 +00:00
|
|
|
<td>{%= dateutil.str_to_user(data[i][__("Posting Date")]) %}</td>
|
|
|
|
<td>{%= data[i][__("Voucher Type")] %}
|
|
|
|
<br>{%= data[i][__("Voucher No")] %}</td>
|
2016-03-15 10:40:04 +00:00
|
|
|
<td>{%= data[i][__("Customer Name")] || data[i][__("Customer")] || data[i][__("Supplier Name")] || data[i][__("Supplier")] %}
|
2014-12-01 11:31:44 +00:00
|
|
|
<br>{%= __("Remarks") %}: {%= data[i][__("Remarks")] %}</td>
|
2016-04-11 06:03:14 +00:00
|
|
|
<td style="text-align: right">
|
|
|
|
{%= format_currency(data[i][__("Invoiced Amount")], data[i]["currency"]) %}</td>
|
|
|
|
<td style="text-align: right">
|
|
|
|
{%= format_currency(data[i][__("Paid Amount")], data[i]["currency"]) %}</td>
|
|
|
|
<td style="text-align: right">
|
|
|
|
{%= format_currency(data[i][__("Outstanding Amount")], data[i]["currency"]) %}</td>
|
2014-12-01 11:31:44 +00:00
|
|
|
{% } else { %}
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
2016-03-17 09:42:05 +00:00
|
|
|
<td><b>{%= __("Total") %}</b></td>
|
2014-12-01 11:31:44 +00:00
|
|
|
<td style="text-align: right">
|
2016-03-17 09:42:05 +00:00
|
|
|
{%= format_currency(data[i][__("Invoiced Amount")]) %}</td>
|
2014-12-01 11:31:44 +00:00
|
|
|
<td style="text-align: right">
|
2016-03-17 09:42:05 +00:00
|
|
|
{%= format_currency(data[i][__("Paid Amount")]) %}</td>
|
2014-12-01 11:31:44 +00:00
|
|
|
<td style="text-align: right">
|
2016-03-17 09:42:05 +00:00
|
|
|
{%= format_currency(data[i][__("Outstanding Amount")]) %}</td>
|
2014-12-01 11:31:44 +00:00
|
|
|
{% } %}
|
|
|
|
{% } else { %}
|
|
|
|
{% if(data[i][__("Customer")] || data[i][__("Supplier")]|| " ") { %}
|
2016-03-17 09:42:05 +00:00
|
|
|
{% if((data[i][__("Customer")] || data[i][__("Supplier")]) != __("'Total'")) { %}
|
|
|
|
<td>{%= data[i][__("Customer")] || data[i][__("Supplier")] %}
|
2014-12-01 11:31:44 +00:00
|
|
|
<br>{%= __("Remarks") %}: {%= data[i][__("Remarks")] %}</td>
|
2016-03-17 09:42:05 +00:00
|
|
|
{% } else { %}
|
|
|
|
<td><b>{%= __("Total") %}</b></td>
|
|
|
|
{% } %}
|
2014-12-01 11:31:44 +00:00
|
|
|
<td style="text-align: right">{%= format_currency(data[i][__("Total Invoiced Amt")]) %}</td>
|
|
|
|
<td style="text-align: right">{%= format_currency(data[i][__("Total Paid Amt")]) %}</td>
|
|
|
|
<td style="text-align: right">{%= format_currency(data[i][__("Total Outstanding Amt")]) %}</td>
|
|
|
|
{% } %}
|
|
|
|
{% } %}
|
|
|
|
</tr>
|
|
|
|
{% } %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<p class="text-right text-muted">Printed On {%= dateutil.str_to_user(dateutil.get_datetime_as_string()) %}</p>
|