fix: add patch for setting default value of report field
This commit is contained in:
parent
b3d565c91f
commit
555c126eb9
@ -326,7 +326,8 @@
|
|||||||
"fieldname": "report",
|
"fieldname": "report",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"label": "Report",
|
"label": "Report",
|
||||||
"options": "General Ledger\nAccounts Receivable"
|
"options": "General Ledger\nAccounts Receivable",
|
||||||
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "Today",
|
"default": "Today",
|
||||||
@ -372,7 +373,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2023-06-19 18:37:10.040570",
|
"modified": "2023-06-23 10:13:15.051950",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Process Statement Of Accounts",
|
"name": "Process Statement Of Accounts",
|
||||||
|
@ -160,7 +160,7 @@ def get_html(doc, filters, entry, col, res, ageing):
|
|||||||
template_path = (
|
template_path = (
|
||||||
"erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.html"
|
"erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.html"
|
||||||
if doc.report == "General Ledger"
|
if doc.report == "General Ledger"
|
||||||
else "erpnext/accounts/report/accounts_receivable/accounts_receivable.html"
|
else "erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts_accounts_receivable.html"
|
||||||
)
|
)
|
||||||
|
|
||||||
if doc.letter_head:
|
if doc.letter_head:
|
||||||
|
@ -0,0 +1,348 @@
|
|||||||
|
<style>
|
||||||
|
.print-format {
|
||||||
|
padding: 4mm;
|
||||||
|
font-size: 8.0pt !important;
|
||||||
|
}
|
||||||
|
.print-format td {
|
||||||
|
vertical-align:middle !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<h2 class="text-center" style="margin-top:0">{{ _(report.report_name) }}</h2>
|
||||||
|
<h4 class="text-center">
|
||||||
|
{% if (filters.customer_name) %}
|
||||||
|
{{ filters.customer_name }}
|
||||||
|
{% else %}
|
||||||
|
{{ filters.customer ~ filters.supplier }}
|
||||||
|
{% endif %}
|
||||||
|
</h4>
|
||||||
|
<h6 class="text-center">
|
||||||
|
{% if (filters.tax_id) %}
|
||||||
|
{{ _("Tax Id: ") }}{{ filters.tax_id }}
|
||||||
|
{% endif %}
|
||||||
|
</h6>
|
||||||
|
<h5 class="text-center">
|
||||||
|
{{ _(filters.ageing_based_on) }}
|
||||||
|
{{ _("Until") }}
|
||||||
|
{{ frappe.format(filters.report_date, 'Date') }}
|
||||||
|
</h5>
|
||||||
|
|
||||||
|
<div class="clearfix">
|
||||||
|
<div class="pull-left">
|
||||||
|
{% if(filters.payment_terms) %}
|
||||||
|
<strong>{{ _("Payment Terms") }}:</strong> {{ filters.payment_terms }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="pull-right">
|
||||||
|
{% if(filters.credit_limit) %}
|
||||||
|
<strong>{{ _("Credit Limit") }}:</strong> {{ frappe.utils.fmt_money(filters.credit_limit) }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if(filters.show_future_payments) %}
|
||||||
|
{% set balance_row = data.slice(-1).pop() %}
|
||||||
|
{% for i in report.columns %}
|
||||||
|
{% if i.fieldname == 'age' %}
|
||||||
|
{% set elem = i %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% set start = report.columns.findIndex(elem) %}
|
||||||
|
{% set range1 = report.columns[start].label %}
|
||||||
|
{% set range2 = report.columns[start+1].label %}
|
||||||
|
{% set range3 = report.columns[start+2].label %}
|
||||||
|
{% set range4 = report.columns[start+3].label %}
|
||||||
|
{% set range5 = report.columns[start+4].label %}
|
||||||
|
{% set range6 = report.columns[start+5].label %}
|
||||||
|
|
||||||
|
{% if(balance_row) %}
|
||||||
|
<table class="table table-bordered table-condensed">
|
||||||
|
<caption class="text-right">(Amount in {{ data[0]["currency"] ~ "" }})</caption>
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 30mm;">
|
||||||
|
<col style="width: 18mm;">
|
||||||
|
<col style="width: 18mm;">
|
||||||
|
<col style="width: 18mm;">
|
||||||
|
<col style="width: 18mm;">
|
||||||
|
<col style="width: 18mm;">
|
||||||
|
<col style="width: 18mm;">
|
||||||
|
<col style="width: 18mm;">
|
||||||
|
</colgroup>
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{{ _(" ") }}</th>
|
||||||
|
<th>{{ _(range1) }}</th>
|
||||||
|
<th>{{ _(range2) }}</th>
|
||||||
|
<th>{{ _(range3) }}</th>
|
||||||
|
<th>{{ _(range4) }}</th>
|
||||||
|
<th>{{ _(range5) }}</th>
|
||||||
|
<th>{{ _(range6) }}</th>
|
||||||
|
<th>{{ _("Total") }}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>{{ _("Total Outstanding") }}</td>
|
||||||
|
<td class="text-right">
|
||||||
|
{{ format_number(balance_row["age"], null, 2) }}
|
||||||
|
</td>
|
||||||
|
<td class="text-right">
|
||||||
|
{{ frappe.utils.fmt_money(balance_row["range1"], data[data.length-1]["currency"]) }}
|
||||||
|
</td>
|
||||||
|
<td class="text-right">
|
||||||
|
{{ frappe.utils.fmt_money(balance_row["range2"], data[data.length-1]["currency"]) }}
|
||||||
|
</td>
|
||||||
|
<td class="text-right">
|
||||||
|
{{ frappe.utils.fmt_money(balance_row["range3"], data[data.length-1]["currency"]) }}
|
||||||
|
</td>
|
||||||
|
<td class="text-right">
|
||||||
|
{{ frappe.utils.fmt_money(balance_row["range4"], data[data.length-1]["currency"]) }}
|
||||||
|
</td>
|
||||||
|
<td class="text-right">
|
||||||
|
{{ frappe.utils.fmt_money(balance_row["range5"], data[data.length-1]["currency"]) }}
|
||||||
|
</td>
|
||||||
|
<td class="text-right">
|
||||||
|
{{ frappe.utils.fmt_money(flt(balance_row["outstanding"]), data[data.length-1]["currency"]) }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<td>{{ _("Future Payments") }}</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="text-right">
|
||||||
|
{{ frappe.utils.fmt_money(flt(balance_row[("future_amount")]), data[data.length-1]["currency"]) }}
|
||||||
|
</td>
|
||||||
|
<tr class="cvs-footer">
|
||||||
|
<th class="text-left">{{ _("Cheques Required") }}</th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th class="text-right">
|
||||||
|
{{ frappe.utils.fmt_money(flt(balance_row["outstanding"] - balance_row[("future_amount")]), data[data.length-1]["currency"]) }}</th>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
{% if(report.report_name == "Accounts Receivable" or report.report_name == "Accounts Payable") %}
|
||||||
|
<th style="width: 10%">{{ _("Date") }}</th>
|
||||||
|
<th style="width: 4%">{{ _("Age (Days)") }}</th>
|
||||||
|
|
||||||
|
{% if(report.report_name == "Accounts Receivable" and filters.show_sales_person) %}
|
||||||
|
<th style="width: 14%">{{ _("Reference") }}</th>
|
||||||
|
<th style="width: 10%">{{ _("Sales Person") }}</th>
|
||||||
|
{% else %}
|
||||||
|
<th style="width: 24%">{{ _("Reference") }}</th>
|
||||||
|
{% endif %}
|
||||||
|
{% if not(filters.show_future_payments) %}
|
||||||
|
<th style="width: 20%">
|
||||||
|
{% if (filters.customer or filters.supplier or filters.customer_name) %}
|
||||||
|
{{ _("Remarks") }}
|
||||||
|
{% else %}
|
||||||
|
{{ _("Party") }}
|
||||||
|
{% endif %}
|
||||||
|
</th>
|
||||||
|
{% endif %}
|
||||||
|
<th style="width: 10%; text-align: right">{{ _("Invoiced Amount") }}</th>
|
||||||
|
{% if not(filters.show_future_payments) %}
|
||||||
|
<th style="width: 10%; text-align: right">{{ _("Paid Amount") }}</th>
|
||||||
|
<th style="width: 10%; text-align: right">
|
||||||
|
{% if report.report_name == "Accounts Receivable" %}
|
||||||
|
{{ _('Credit Note') }}
|
||||||
|
{% else %}
|
||||||
|
{{ _('Debit Note') }}
|
||||||
|
{% endif %}
|
||||||
|
</th>
|
||||||
|
{% endif %}
|
||||||
|
<th style="width: 10%; text-align: right">{{ _("Outstanding Amount") }}</th>
|
||||||
|
{% if(filters.show_future_payments) %}
|
||||||
|
{% if(report.report_name == "Accounts Receivable") %}
|
||||||
|
<th style="width: 12%">{{ _("Customer LPO No.") }}</th>
|
||||||
|
{% endif %}
|
||||||
|
<th style="width: 10%">{{ _("Future Payment Ref") }}</th>
|
||||||
|
<th style="width: 10%">{{ _("Future Payment Amount") }}</th>
|
||||||
|
<th style="width: 10%">{{ _("Remaining Balance") }}</th>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<th style="width: 40%">
|
||||||
|
{% if (filters.customer or filters.supplier or filters.customer_name) %}
|
||||||
|
{{ _("Remarks")}}
|
||||||
|
{% else %}
|
||||||
|
{{ _("Party") }}
|
||||||
|
{% endif %}
|
||||||
|
</th>
|
||||||
|
<th style="width: 15%">{{ _("Total Invoiced Amount") }}</th>
|
||||||
|
<th style="width: 15%">{{ _("Total Paid Amount") }}</th>
|
||||||
|
<th style="width: 15%">
|
||||||
|
{% if report.report_name == "Accounts Receivable Summary" %}
|
||||||
|
{{ _('Credit Note Amount') }}
|
||||||
|
{% else %}
|
||||||
|
{{ _('Debit Note Amount') }}
|
||||||
|
{% endif %}
|
||||||
|
</th>
|
||||||
|
<th style="width: 15%">{{ _("Total Outstanding Amount") }}</th>
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for i in range(data|length) %}
|
||||||
|
<tr>
|
||||||
|
{% if(report.report_name == "Accounts Receivable" or report.report_name == "Accounts Payable") %}
|
||||||
|
{% if(data[i]["party"]) %}
|
||||||
|
<td>{{ (data[i]["posting_date"]) }}</td>
|
||||||
|
<td style="text-align: right">{{ data[i]["age"] }}</td>
|
||||||
|
<td>
|
||||||
|
{% if not(filters.show_future_payments) %}
|
||||||
|
{{ data[i]["voucher_type"] }}
|
||||||
|
<br>
|
||||||
|
{% endif %}
|
||||||
|
{{ data[i]["voucher_no"] }}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
{% if(report.report_name == "Accounts Receivable" and filters.show_sales_person) %}
|
||||||
|
<td>{{ data[i]["sales_person"] }}</td>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if not (filters.show_future_payments) %}
|
||||||
|
<td>
|
||||||
|
{% if(not(filters.customer or filters.supplier or filters.customer_name)) %}
|
||||||
|
{{ data[i]["party"] }}
|
||||||
|
{% if(data[i]["customer_name"] and data[i]["customer_name"] != data[i]["party"]) %}
|
||||||
|
<br> {{ data[i]["customer_name"] }}
|
||||||
|
{% elif(data[i]["supplier_name"] != data[i]["party"]) %}
|
||||||
|
<br> {{ data[i]["supplier_name"] }}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
<div>
|
||||||
|
{% if data[i]["remarks"] %}
|
||||||
|
{{ _("Remarks") }}:
|
||||||
|
{{ data[i]["remarks"] }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<td style="text-align: right">
|
||||||
|
{{ frappe.utils.fmt_money(data[i]["invoiced"], currency=data[i]["currency"]) }}</td>
|
||||||
|
|
||||||
|
{% if not(filters.show_future_payments) %}
|
||||||
|
<td style="text-align: right">
|
||||||
|
{{ frappe.utils.fmt_money(data[i]["paid"], currency=data[i]["currency"]) }}</td>
|
||||||
|
<td style="text-align: right">
|
||||||
|
{{ frappe.utils.fmt_money(data[i]["credit_note"], currency=data[i]["currency"]) }}</td>
|
||||||
|
{% endif %}
|
||||||
|
<td style="text-align: right">
|
||||||
|
{{ frappe.utils.fmt_money(data[i]["outstanding"], currency=data[i]["currency"]) }}</td>
|
||||||
|
|
||||||
|
{% if(filters.show_future_payments) %}
|
||||||
|
{% if(report.report_name == "Accounts Receivable") %}
|
||||||
|
<td style="text-align: right">
|
||||||
|
{{ data[i]["po_no"] }}</td>
|
||||||
|
{% endif %}
|
||||||
|
<td style="text-align: right">{{ data[i]["future_ref"] }}</td>
|
||||||
|
<td style="text-align: right">{{ frappe.utils.fmt_money(data[i]["future_amount"], currency=data[i]["currency"]) }}</td>
|
||||||
|
<td style="text-align: right">{{ frappe.utils.fmt_money(data[i]["remaining_balance"], currency=data[i]["currency"]) }}</td>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<td></td>
|
||||||
|
{% if not(filters.show_future_payments) %}
|
||||||
|
<td></td>
|
||||||
|
{% endif %}
|
||||||
|
{% if(report.report_name == "Accounts Receivable" and filters.show_sales_person) %}
|
||||||
|
<td></td>
|
||||||
|
{% endif %}
|
||||||
|
<td></td>
|
||||||
|
<td style="text-align: right"><b>{{ _("Total") }}</b></td>
|
||||||
|
<td style="text-align: right">
|
||||||
|
{{ frappe.utils.fmt_money(data[i]["invoiced"], data[i]["currency"]) }}</td>
|
||||||
|
|
||||||
|
{% if not(filters.show_future_payments) %}
|
||||||
|
<td style="text-align: right">
|
||||||
|
{{ frappe.utils.fmt_money(data[i]["paid"], currency=data[i]["currency"]) }}</td>
|
||||||
|
<td style="text-align: right">{{ frappe.utils.fmt_money(data[i]["credit_note"], currency=data[i]["currency"]) }} </td>
|
||||||
|
{% endif %}
|
||||||
|
<td style="text-align: right">
|
||||||
|
{{ frappe.utils.fmt_money(data[i]["outstanding"], currency=data[i]["currency"]) }}</td>
|
||||||
|
|
||||||
|
{% if(filters.show_future_payments) %}
|
||||||
|
{% if(report.report_name == "Accounts Receivable") %}
|
||||||
|
<td style="text-align: right">
|
||||||
|
{{ data[i]["po_no"] }}</td>
|
||||||
|
{% endif %}
|
||||||
|
<td style="text-align: right">{{ data[i]["future_ref"] }}</td>
|
||||||
|
<td style="text-align: right">{{ frappe.utils.fmt_money(data[i]["future_amount"], currency=data[i]["currency"]) }}</td>
|
||||||
|
<td style="text-align: right">{{ frappe.utils.fmt_money(data[i]["remaining_balance"], currency=data[i]["currency"]) }}</td>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
{% if(data[i]["party"] or " ") %}
|
||||||
|
{% if not(data[i]["is_total_row"]) %}
|
||||||
|
<td>
|
||||||
|
{% if(not(filters.customer | filters.supplier)) %}
|
||||||
|
{{ data[i]["party"] }}
|
||||||
|
{% if(data[i]["customer_name"] and data[i]["customer_name"] != data[i]["party"]) %}
|
||||||
|
<br> {{ data[i]["customer_name"] }}
|
||||||
|
{% elif(data[i]["supplier_name"] != data[i]["party"]) %}
|
||||||
|
<br> {{ data[i]["supplier_name"] }}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
<br>{{ _("Remarks") }}:
|
||||||
|
{{ data[i]["remarks"] }}
|
||||||
|
</td>
|
||||||
|
{% else %}
|
||||||
|
<td><b>{{ _("Total") }}</b></td>
|
||||||
|
{% endif %}
|
||||||
|
<td style="text-align: right">{{ frappe.utils.fmt_money(data[i]["invoiced"], currency=data[i]["currency"]) }}</td>
|
||||||
|
<td style="text-align: right">{{ frappe.utils.fmt_money(data[i]["paid"], currency=data[i]["currency"]) }}</td>
|
||||||
|
<td style="text-align: right">{{ frappe.utils.fmt_money(data[i]["credit_note"], currency=data[i]["currency"]) }}</td>
|
||||||
|
<td style="text-align: right">{{ frappe.utils.fmt_money(data[i]["outstanding"], currency=data[i]["currency"]) }}</td>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td style="text-align: right"><b>{{ frappe.utils.fmt_money(data|sum(attribute="invoiced"), currency=data[0]["currency"]) }}</b></td>
|
||||||
|
<td style="text-align: right"><b>{{ frappe.utils.fmt_money(data|sum(attribute="paid"), currency=data[0]["currency"]) }}</b></td>
|
||||||
|
<td style="text-align: right"><b>{{ frappe.utils.fmt_money(data|sum(attribute="credit_note"), currency=data[0]["currency"]) }}</b></td>
|
||||||
|
<td style="text-align: right"><b>{{ frappe.utils.fmt_money(data|sum(attribute="outstanding"), currency=data[0]["currency"]) }}</b></td>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
{% if ageing %}
|
||||||
|
<h4 class="text-center">{{ _("Ageing Report based on ") }} {{ ageing.ageing_based_on }}
|
||||||
|
{{ _("up to " ) }} {{ frappe.format(filters.report_date, 'Date')}}
|
||||||
|
</h4>
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 25%">30 Days</th>
|
||||||
|
<th style="width: 25%">60 Days</th>
|
||||||
|
<th style="width: 25%">90 Days</th>
|
||||||
|
<th style="width: 25%">120 Days</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>{{ frappe.utils.fmt_money(ageing.range1, currency=data[0]["currency"]) }}</td>
|
||||||
|
<td>{{ frappe.utils.fmt_money(ageing.range2, currency=data[0]["currency"]) }}</td>
|
||||||
|
<td>{{ frappe.utils.fmt_money(ageing.range3, currency=data[0]["currency"]) }}</td>
|
||||||
|
<td>{{ frappe.utils.fmt_money(ageing.range4, currency=data[0]["currency"]) }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% endif %}
|
||||||
|
<p class="text-right text-muted">{{ _("Printed On ") }}{{ frappe.utils.now() }}</p>
|
@ -8,56 +8,51 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<h2 class="text-center" style="margin-top:0">{{ _(report.report_name) }}</h2>
|
<h2 class="text-center" style="margin-top:0">{%= __(report.report_name) %}</h2>
|
||||||
<h4 class="text-center">
|
<h4 class="text-center">
|
||||||
{% if (filters.customer_name) %}
|
{% if (filters.customer_name) { %}
|
||||||
{{ filters.customer_name }}
|
{%= filters.customer_name %}
|
||||||
{% else %}
|
{% } else { %}
|
||||||
{{ filters.customer ~ filters.supplier }}
|
{%= filters.customer || filters.supplier %}
|
||||||
{% endif %}
|
{% } %}
|
||||||
</h4>
|
</h4>
|
||||||
<h6 class="text-center">
|
<h6 class="text-center">
|
||||||
{% if (filters.tax_id) %}
|
{% if (filters.tax_id) { %}
|
||||||
{{ _("Tax Id: ") }}{{ filters.tax_id }}
|
{%= __("Tax Id: ")%} {%= filters.tax_id %}
|
||||||
{% endif %}
|
{% } %}
|
||||||
</h6>
|
</h6>
|
||||||
<h5 class="text-center">
|
<h5 class="text-center">
|
||||||
{{ _(filters.ageing_based_on) }}
|
{%= __(filters.ageing_based_on) %}
|
||||||
{{ _("Until") }}
|
{%= __("Until") %}
|
||||||
{{ frappe.format(filters.report_date, 'Date') }}
|
{%= frappe.datetime.str_to_user(filters.report_date) %}
|
||||||
</h5>
|
</h5>
|
||||||
|
|
||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
{% if(filters.payment_terms) %}
|
{% if(filters.payment_terms) { %}
|
||||||
<strong>{{ _("Payment Terms") }}:</strong> {{ filters.payment_terms }}
|
<strong>{%= __("Payment Terms") %}:</strong> {%= filters.payment_terms %}
|
||||||
{% endif %}
|
{% } %}
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
{% if(filters.credit_limit) %}
|
{% if(filters.credit_limit) { %}
|
||||||
<strong>{{ _("Credit Limit") }}:</strong> {{ frappe.utils.fmt_money(filters.credit_limit) }}
|
<strong>{%= __("Credit Limit") %}:</strong> {%= format_currency(filters.credit_limit) %}
|
||||||
{% endif %}
|
{% } %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if(filters.show_future_payments) %}
|
{% if(filters.show_future_payments) { %}
|
||||||
{% set balance_row = data.slice(-1).pop() %}
|
{% var balance_row = data.slice(-1).pop();
|
||||||
{% for i in report.columns %}
|
var start = report.columns.findIndex((elem) => (elem.fieldname == 'age'));
|
||||||
{% if i.fieldname == 'age' %}
|
var range1 = report.columns[start].label;
|
||||||
{% set elem = i %}
|
var range2 = report.columns[start+1].label;
|
||||||
{% endif %}
|
var range3 = report.columns[start+2].label;
|
||||||
{% endfor %}
|
var range4 = report.columns[start+3].label;
|
||||||
{% set start = report.columns.findIndex(elem) %}
|
var range5 = report.columns[start+4].label;
|
||||||
{% set range1 = report.columns[start].label %}
|
var range6 = report.columns[start+5].label;
|
||||||
{% set range2 = report.columns[start+1].label %}
|
%}
|
||||||
{% set range3 = report.columns[start+2].label %}
|
{% if(balance_row) { %}
|
||||||
{% set range4 = report.columns[start+3].label %}
|
|
||||||
{% set range5 = report.columns[start+4].label %}
|
|
||||||
{% set range6 = report.columns[start+5].label %}
|
|
||||||
|
|
||||||
{% if(balance_row) %}
|
|
||||||
<table class="table table-bordered table-condensed">
|
<table class="table table-bordered table-condensed">
|
||||||
<caption class="text-right">(Amount in {{ data[0]["currency"] ~ "" }})</caption>
|
<caption class="text-right">(Amount in {%= data[0]["currency"] || "" %})</caption>
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col style="width: 30mm;">
|
<col style="width: 30mm;">
|
||||||
<col style="width: 18mm;">
|
<col style="width: 18mm;">
|
||||||
@ -71,42 +66,42 @@
|
|||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{ _(" ") }}</th>
|
<th>{%= __(" ") %}</th>
|
||||||
<th>{{ _(range1) }}</th>
|
<th>{%= __(range1) %}</th>
|
||||||
<th>{{ _(range2) }}</th>
|
<th>{%= __(range2) %}</th>
|
||||||
<th>{{ _(range3) }}</th>
|
<th>{%= __(range3) %}</th>
|
||||||
<th>{{ _(range4) }}</th>
|
<th>{%= __(range4) %}</th>
|
||||||
<th>{{ _(range5) }}</th>
|
<th>{%= __(range5) %}</th>
|
||||||
<th>{{ _(range6) }}</th>
|
<th>{%= __(range6) %}</th>
|
||||||
<th>{{ _("Total") }}</th>
|
<th>{%= __("Total") %}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ _("Total Outstanding") }}</td>
|
<td>{%= __("Total Outstanding") %}</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{{ format_number(balance_row["age"], null, 2) }}
|
{%= format_number(balance_row["age"], null, 2) %}
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{{ frappe.utils.fmt_money(balance_row["range1"], data[data.length-1]["currency"]) }}
|
{%= format_currency(balance_row["range1"], data[data.length-1]["currency"]) %}
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{{ frappe.utils.fmt_money(balance_row["range2"], data[data.length-1]["currency"]) }}
|
{%= format_currency(balance_row["range2"], data[data.length-1]["currency"]) %}
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{{ frappe.utils.fmt_money(balance_row["range3"], data[data.length-1]["currency"]) }}
|
{%= format_currency(balance_row["range3"], data[data.length-1]["currency"]) %}
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{{ frappe.utils.fmt_money(balance_row["range4"], data[data.length-1]["currency"]) }}
|
{%= format_currency(balance_row["range4"], data[data.length-1]["currency"]) %}
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{{ frappe.utils.fmt_money(balance_row["range5"], data[data.length-1]["currency"]) }}
|
{%= format_currency(balance_row["range5"], data[data.length-1]["currency"]) %}
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{{ frappe.utils.fmt_money(flt(balance_row["outstanding"]), data[data.length-1]["currency"]) }}
|
{%= format_currency(flt(balance_row["outstanding"]), data[data.length-1]["currency"]) %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<td>{{ _("Future Payments") }}</td>
|
<td>{%= __("Future Payments") %}</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
@ -114,10 +109,10 @@
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{{ frappe.utils.fmt_money(flt(balance_row[("future_amount")]), data[data.length-1]["currency"]) }}
|
{%= format_currency(flt(balance_row[("future_amount")]), data[data.length-1]["currency"]) %}
|
||||||
</td>
|
</td>
|
||||||
<tr class="cvs-footer">
|
<tr class="cvs-footer">
|
||||||
<th class="text-left">{{ _("Cheques Required") }}</th>
|
<th class="text-left">{%= __("Cheques Required") %}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
@ -125,224 +120,168 @@
|
|||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th class="text-right">
|
<th class="text-right">
|
||||||
{{ frappe.utils.fmt_money(flt(balance_row["outstanding"] - balance_row[("future_amount")]), data[data.length-1]["currency"]) }}</th>
|
{%= format_currency(flt(balance_row["outstanding"] - balance_row[("future_amount")]), data[data.length-1]["currency"]) %}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
{% endif %}
|
{% } %}
|
||||||
{% endif %}
|
{% } %}
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
{% if(report.report_name == "Accounts Receivable" or report.report_name == "Accounts Payable") %}
|
{% if(report.report_name === "Accounts Receivable" || report.report_name === "Accounts Payable") { %}
|
||||||
<th style="width: 10%">{{ _("Date") }}</th>
|
<th style="width: 10%">{%= __("Date") %}</th>
|
||||||
<th style="width: 4%">{{ _("Age (Days)") }}</th>
|
<th style="width: 4%">{%= __("Age (Days)") %}</th>
|
||||||
|
|
||||||
{% if(report.report_name == "Accounts Receivable" and filters.show_sales_person) %}
|
{% if(report.report_name === "Accounts Receivable" && filters.show_sales_person) { %}
|
||||||
<th style="width: 14%">{{ _("Reference") }}</th>
|
<th style="width: 14%">{%= __("Reference") %}</th>
|
||||||
<th style="width: 10%">{{ _("Sales Person") }}</th>
|
<th style="width: 10%">{%= __("Sales Person") %}</th>
|
||||||
{% else %}
|
{% } else { %}
|
||||||
<th style="width: 24%">{{ _("Reference") }}</th>
|
<th style="width: 24%">{%= __("Reference") %}</th>
|
||||||
{% endif %}
|
{% } %}
|
||||||
{% if not(filters.show_future_payments) %}
|
{% if(!filters.show_future_payments) { %}
|
||||||
<th style="width: 20%">
|
<th style="width: 20%">{%= (filters.customer || filters.supplier) ? __("Remarks"): __("Party") %}</th>
|
||||||
{% if (filters.customer or filters.supplier or filters.customer_name) %}
|
{% } %}
|
||||||
{{ _("Remarks") }}
|
<th style="width: 10%; text-align: right">{%= __("Invoiced Amount") %}</th>
|
||||||
{% else %}
|
{% if(!filters.show_future_payments) { %}
|
||||||
{{ _("Party") }}
|
<th style="width: 10%; text-align: right">{%= __("Paid Amount") %}</th>
|
||||||
{% endif %}
|
<th style="width: 10%; text-align: right">{%= report.report_name === "Accounts Receivable" ? __('Credit Note') : __('Debit Note') %}</th>
|
||||||
</th>
|
{% } %}
|
||||||
{% endif %}
|
<th style="width: 10%; text-align: right">{%= __("Outstanding Amount") %}</th>
|
||||||
<th style="width: 10%; text-align: right">{{ _("Invoiced Amount") }}</th>
|
{% if(filters.show_future_payments) { %}
|
||||||
{% if not(filters.show_future_payments) %}
|
{% if(report.report_name === "Accounts Receivable") { %}
|
||||||
<th style="width: 10%; text-align: right">{{ _("Paid Amount") }}</th>
|
<th style="width: 12%">{%= __("Customer LPO No.") %}</th>
|
||||||
<th style="width: 10%; text-align: right">
|
{% } %}
|
||||||
{% if report.report_name == "Accounts Receivable" %}
|
<th style="width: 10%">{%= __("Future Payment Ref") %}</th>
|
||||||
{{ _('Credit Note') }}
|
<th style="width: 10%">{%= __("Future Payment Amount") %}</th>
|
||||||
{% else %}
|
<th style="width: 10%">{%= __("Remaining Balance") %}</th>
|
||||||
{{ _('Debit Note') }}
|
{% } %}
|
||||||
{% endif %}
|
{% } else { %}
|
||||||
</th>
|
<th style="width: 40%">{%= (filters.customer || filters.supplier) ? __("Remarks"): __("Party") %}</th>
|
||||||
{% endif %}
|
<th style="width: 15%">{%= __("Total Invoiced Amount") %}</th>
|
||||||
<th style="width: 10%; text-align: right">{{ _("Outstanding Amount") }}</th>
|
<th style="width: 15%">{%= __("Total Paid Amount") %}</th>
|
||||||
{% if(filters.show_future_payments) %}
|
<th style="width: 15%">{%= report.report_name === "Accounts Receivable Summary" ? __('Credit Note Amount') : __('Debit Note Amount') %}</th>
|
||||||
{% if(report.report_name == "Accounts Receivable") %}
|
<th style="width: 15%">{%= __("Total Outstanding Amount") %}</th>
|
||||||
<th style="width: 12%">{{ _("Customer LPO No.") }}</th>
|
{% } %}
|
||||||
{% endif %}
|
|
||||||
<th style="width: 10%">{{ _("Future Payment Ref") }}</th>
|
|
||||||
<th style="width: 10%">{{ _("Future Payment Amount") }}</th>
|
|
||||||
<th style="width: 10%">{{ _("Remaining Balance") }}</th>
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
<th style="width: 40%">
|
|
||||||
{% if (filters.customer or filters.supplier or filters.customer_name) %}
|
|
||||||
{{ _("Remarks")}}
|
|
||||||
{% else %}
|
|
||||||
{{ _("Party") }}
|
|
||||||
{% endif %}
|
|
||||||
</th>
|
|
||||||
<th style="width: 15%">{{ _("Total Invoiced Amount") }}</th>
|
|
||||||
<th style="width: 15%">{{ _("Total Paid Amount") }}</th>
|
|
||||||
<th style="width: 15%">
|
|
||||||
{% if report.report_name == "Accounts Receivable Summary" %}
|
|
||||||
{{ _('Credit Note Amount') }}
|
|
||||||
{% else %}
|
|
||||||
{{ _('Debit Note Amount') }}
|
|
||||||
{% endif %}
|
|
||||||
</th>
|
|
||||||
<th style="width: 15%">{{ _("Total Outstanding Amount") }}</th>
|
|
||||||
{% endif %}
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for i in range(data|length) %}
|
{% for(var i=0, l=data.length; i<l; i++) { %}
|
||||||
<tr>
|
<tr>
|
||||||
{% if(report.report_name == "Accounts Receivable" or report.report_name == "Accounts Payable") %}
|
{% if(report.report_name === "Accounts Receivable" || report.report_name === "Accounts Payable") { %}
|
||||||
{% if(data[i]["party"]) %}
|
{% if(data[i]["party"]) { %}
|
||||||
<td>{{ (data[i]["posting_date"]) }}</td>
|
<td>{%= frappe.datetime.str_to_user(data[i]["posting_date"]) %}</td>
|
||||||
<td style="text-align: right">{{ data[i]["age"] }}</td>
|
<td style="text-align: right">{%= data[i]["age"] %}</td>
|
||||||
<td>
|
<td>
|
||||||
{% if not(filters.show_future_payments) %}
|
{% if(!filters.show_future_payments) { %}
|
||||||
{{ data[i]["voucher_type"] }}
|
{%= data[i]["voucher_type"] %}
|
||||||
<br>
|
<br>
|
||||||
{% endif %}
|
{% } %}
|
||||||
{{ data[i]["voucher_no"] }}
|
{%= data[i]["voucher_no"] %}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
{% if(report.report_name == "Accounts Receivable" and filters.show_sales_person) %}
|
{% if(report.report_name === "Accounts Receivable" && filters.show_sales_person) { %}
|
||||||
<td>{{ data[i]["sales_person"] }}</td>
|
<td>{%= data[i]["sales_person"] %}</td>
|
||||||
{% endif %}
|
{% } %}
|
||||||
|
|
||||||
{% if not (filters.show_future_payments) %}
|
{% if(!filters.show_future_payments) { %}
|
||||||
<td>
|
<td>
|
||||||
{% if(not(filters.customer or filters.supplier or filters.customer_name)) %}
|
{% if(!(filters.customer || filters.supplier)) { %}
|
||||||
{{ data[i]["party"] }}
|
{%= data[i]["party"] %}
|
||||||
{% if(data[i]["customer_name"] and data[i]["customer_name"] != data[i]["party"]) %}
|
{% if(data[i]["customer_name"] && data[i]["customer_name"] != data[i]["party"]) { %}
|
||||||
<br> {{ data[i]["customer_name"] }}
|
<br> {%= data[i]["customer_name"] %}
|
||||||
{% elif(data[i]["supplier_name"] != data[i]["party"]) %}
|
{% } else if(data[i]["supplier_name"] != data[i]["party"]) { %}
|
||||||
<br> {{ data[i]["supplier_name"] }}
|
<br> {%= data[i]["supplier_name"] %}
|
||||||
{% endif %}
|
{% } %}
|
||||||
{% endif %}
|
{% } %}
|
||||||
<div>
|
<div>
|
||||||
{% if data[i]["remarks"] %}
|
{% if data[i]["remarks"] %}
|
||||||
{{ _("Remarks") }}:
|
{%= __("Remarks") %}:
|
||||||
{{ data[i]["remarks"] }}
|
{%= data[i]["remarks"] %}
|
||||||
{% endif %}
|
{% } %}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% } %}
|
||||||
|
|
||||||
<td style="text-align: right">
|
<td style="text-align: right">
|
||||||
{{ frappe.utils.fmt_money(data[i]["invoiced"], currency=data[i]["currency"]) }}</td>
|
{%= format_currency(data[i]["invoiced"], data[i]["currency"]) %}</td>
|
||||||
|
|
||||||
{% if not(filters.show_future_payments) %}
|
{% if(!filters.show_future_payments) { %}
|
||||||
<td style="text-align: right">
|
<td style="text-align: right">
|
||||||
{{ frappe.utils.fmt_money(data[i]["paid"], currency=data[i]["currency"]) }}</td>
|
{%= format_currency(data[i]["paid"], data[i]["currency"]) %}</td>
|
||||||
<td style="text-align: right">
|
<td style="text-align: right">
|
||||||
{{ frappe.utils.fmt_money(data[i]["credit_note"], currency=data[i]["currency"]) }}</td>
|
{%= format_currency(data[i]["credit_note"], data[i]["currency"]) %}</td>
|
||||||
{% endif %}
|
{% } %}
|
||||||
<td style="text-align: right">
|
<td style="text-align: right">
|
||||||
{{ frappe.utils.fmt_money(data[i]["outstanding"], currency=data[i]["currency"]) }}</td>
|
{%= format_currency(data[i]["outstanding"], data[i]["currency"]) %}</td>
|
||||||
|
|
||||||
{% if(filters.show_future_payments) %}
|
{% if(filters.show_future_payments) { %}
|
||||||
{% if(report.report_name == "Accounts Receivable") %}
|
{% if(report.report_name === "Accounts Receivable") { %}
|
||||||
<td style="text-align: right">
|
<td style="text-align: right">
|
||||||
{{ data[i]["po_no"] }}</td>
|
{%= data[i]["po_no"] %}</td>
|
||||||
{% endif %}
|
{% } %}
|
||||||
<td style="text-align: right">{{ data[i]["future_ref"] }}</td>
|
<td style="text-align: right">{%= data[i]["future_ref"] %}</td>
|
||||||
<td style="text-align: right">{{ frappe.utils.fmt_money(data[i]["future_amount"], currency=data[i]["currency"]) }}</td>
|
<td style="text-align: right">{%= format_currency(data[i]["future_amount"], data[i]["currency"]) %}</td>
|
||||||
<td style="text-align: right">{{ frappe.utils.fmt_money(data[i]["remaining_balance"], currency=data[i]["currency"]) }}</td>
|
<td style="text-align: right">{%= format_currency(data[i]["remaining_balance"], data[i]["currency"]) %}</td>
|
||||||
{% endif %}
|
{% } %}
|
||||||
{% else %}
|
{% } else { %}
|
||||||
<td></td>
|
<td></td>
|
||||||
{% if not(filters.show_future_payments) %}
|
{% if(!filters.show_future_payments) { %}
|
||||||
<td></td>
|
<td></td>
|
||||||
{% endif %}
|
{% } %}
|
||||||
{% if(report.report_name == "Accounts Receivable" and filters.show_sales_person) %}
|
{% if(report.report_name === "Accounts Receivable" && filters.show_sales_person) { %}
|
||||||
<td></td>
|
<td></td>
|
||||||
{% endif %}
|
{% } %}
|
||||||
<td></td>
|
<td></td>
|
||||||
<td style="text-align: right"><b>{{ _("Total") }}</b></td>
|
<td style="text-align: right"><b>{%= __("Total") %}</b></td>
|
||||||
<td style="text-align: right">
|
<td style="text-align: right">
|
||||||
{{ frappe.utils.fmt_money(data[i]["invoiced"], data[i]["currency"]) }}</td>
|
{%= format_currency(data[i]["invoiced"], data[i]["currency"] ) %}</td>
|
||||||
|
|
||||||
{% if not(filters.show_future_payments) %}
|
{% if(!filters.show_future_payments) { %}
|
||||||
<td style="text-align: right">
|
<td style="text-align: right">
|
||||||
{{ frappe.utils.fmt_money(data[i]["paid"], currency=data[i]["currency"]) }}</td>
|
{%= format_currency(data[i]["paid"], data[i]["currency"]) %}</td>
|
||||||
<td style="text-align: right">{{ frappe.utils.fmt_money(data[i]["credit_note"], currency=data[i]["currency"]) }} </td>
|
<td style="text-align: right">{%= format_currency(data[i]["credit_note"], data[i]["currency"]) %} </td>
|
||||||
{% endif %}
|
{% } %}
|
||||||
<td style="text-align: right">
|
<td style="text-align: right">
|
||||||
{{ frappe.utils.fmt_money(data[i]["outstanding"], currency=data[i]["currency"]) }}</td>
|
{%= format_currency(data[i]["outstanding"], data[i]["currency"]) %}</td>
|
||||||
|
|
||||||
{% if(filters.show_future_payments) %}
|
{% if(filters.show_future_payments) { %}
|
||||||
{% if(report.report_name == "Accounts Receivable") %}
|
{% if(report.report_name === "Accounts Receivable") { %}
|
||||||
<td style="text-align: right">
|
<td style="text-align: right">
|
||||||
{{ data[i]["po_no"] }}</td>
|
{%= data[i]["po_no"] %}</td>
|
||||||
{% endif %}
|
{% } %}
|
||||||
<td style="text-align: right">{{ data[i]["future_ref"] }}</td>
|
<td style="text-align: right">{%= data[i]["future_ref"] %}</td>
|
||||||
<td style="text-align: right">{{ frappe.utils.fmt_money(data[i]["future_amount"], currency=data[i]["currency"]) }}</td>
|
<td style="text-align: right">{%= format_currency(data[i]["future_amount"], data[i]["currency"]) %}</td>
|
||||||
<td style="text-align: right">{{ frappe.utils.fmt_money(data[i]["remaining_balance"], currency=data[i]["currency"]) }}</td>
|
<td style="text-align: right">{%= format_currency(data[i]["remaining_balance"], data[i]["currency"]) %}</td>
|
||||||
{% endif %}
|
{% } %}
|
||||||
{% endif %}
|
{% } %}
|
||||||
{% else %}
|
{% } else { %}
|
||||||
{% if(data[i]["party"] or " ") %}
|
{% if(data[i]["party"]|| " ") { %}
|
||||||
{% if not(data[i]["is_total_row"]) %}
|
{% if(!data[i]["is_total_row"]) { %}
|
||||||
<td>
|
<td>
|
||||||
{% if(not(filters.customer | filters.supplier)) %}
|
{% if(!(filters.customer || filters.supplier)) { %}
|
||||||
{{ data[i]["party"] }}
|
{%= data[i]["party"] %}
|
||||||
{% if(data[i]["customer_name"] and data[i]["customer_name"] != data[i]["party"]) %}
|
{% if(data[i]["customer_name"] && data[i]["customer_name"] != data[i]["party"]) { %}
|
||||||
<br> {{ data[i]["customer_name"] }}
|
<br> {%= data[i]["customer_name"] %}
|
||||||
{% elif(data[i]["supplier_name"] != data[i]["party"]) %}
|
{% } else if(data[i]["supplier_name"] != data[i]["party"]) { %}
|
||||||
<br> {{ data[i]["supplier_name"] }}
|
<br> {%= data[i]["supplier_name"] %}
|
||||||
{% endif %}
|
{% } %}
|
||||||
{% endif %}
|
{% } %}
|
||||||
<br>{{ _("Remarks") }}:
|
<br>{%= __("Remarks") %}:
|
||||||
{{ data[i]["remarks"] }}
|
{%= data[i]["remarks"] %}
|
||||||
</td>
|
</td>
|
||||||
{% else %}
|
{% } else { %}
|
||||||
<td><b>{{ _("Total") }}</b></td>
|
<td><b>{%= __("Total") %}</b></td>
|
||||||
{% endif %}
|
{% } %}
|
||||||
<td style="text-align: right">{{ frappe.utils.fmt_money(data[i]["invoiced"], currency=data[i]["currency"]) }}</td>
|
<td style="text-align: right">{%= format_currency(data[i]["invoiced"], data[i]["currency"]) %}</td>
|
||||||
<td style="text-align: right">{{ frappe.utils.fmt_money(data[i]["paid"], currency=data[i]["currency"]) }}</td>
|
<td style="text-align: right">{%= format_currency(data[i]["paid"], data[i]["currency"]) %}</td>
|
||||||
<td style="text-align: right">{{ frappe.utils.fmt_money(data[i]["credit_note"], currency=data[i]["currency"]) }}</td>
|
<td style="text-align: right">{%= format_currency(data[i]["credit_note"], data[i]["currency"]) %}</td>
|
||||||
<td style="text-align: right">{{ frappe.utils.fmt_money(data[i]["outstanding"], currency=data[i]["currency"]) }}</td>
|
<td style="text-align: right">{%= format_currency(data[i]["outstanding"], data[i]["currency"]) %}</td>
|
||||||
{% endif %}
|
{% } %}
|
||||||
{% endif %}
|
{% } %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% } %}
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
<td style="text-align: right"><b>{{ frappe.utils.fmt_money(data|sum(attribute="invoiced"), currency=data[0]["currency"]) }}</b></td>
|
|
||||||
<td style="text-align: right"><b>{{ frappe.utils.fmt_money(data|sum(attribute="paid"), currency=data[0]["currency"]) }}</b></td>
|
|
||||||
<td style="text-align: right"><b>{{ frappe.utils.fmt_money(data|sum(attribute="credit_note"), currency=data[0]["currency"]) }}</b></td>
|
|
||||||
<td style="text-align: right"><b>{{ frappe.utils.fmt_money(data|sum(attribute="outstanding"), currency=data[0]["currency"]) }}</b></td>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<p class="text-right text-muted">{{ __("Printed On ") }}{%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}</p>
|
||||||
{% if ageing %}
|
|
||||||
<h4 class="text-center">{{ _("Ageing Report based on ") }} {{ ageing.ageing_based_on }}
|
|
||||||
{{ _("up to " ) }} {{ frappe.format(filters.report_date, 'Date')}}
|
|
||||||
</h4>
|
|
||||||
<table class="table table-bordered">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th style="width: 25%">30 Days</th>
|
|
||||||
<th style="width: 25%">60 Days</th>
|
|
||||||
<th style="width: 25%">90 Days</th>
|
|
||||||
<th style="width: 25%">120 Days</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>{{ frappe.utils.fmt_money(ageing.range1, currency=data[0]["currency"]) }}</td>
|
|
||||||
<td>{{ frappe.utils.fmt_money(ageing.range2, currency=data[0]["currency"]) }}</td>
|
|
||||||
<td>{{ frappe.utils.fmt_money(ageing.range3, currency=data[0]["currency"]) }}</td>
|
|
||||||
<td>{{ frappe.utils.fmt_money(ageing.range4, currency=data[0]["currency"]) }}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{% endif %}
|
|
||||||
<p class="text-right text-muted">{{ _("Printed On ") }}{{ frappe.utils.now() }}</p>
|
|
@ -339,3 +339,4 @@ execute:frappe.delete_doc('DocType', 'Cash Flow Mapper', ignore_missing=True)
|
|||||||
execute:frappe.delete_doc('DocType', 'Cash Flow Mapping Template', ignore_missing=True)
|
execute:frappe.delete_doc('DocType', 'Cash Flow Mapping Template', ignore_missing=True)
|
||||||
execute:frappe.delete_doc('DocType', 'Cash Flow Mapping Accounts', ignore_missing=True)
|
execute:frappe.delete_doc('DocType', 'Cash Flow Mapping Accounts', ignore_missing=True)
|
||||||
erpnext.patches.v14_0.cleanup_workspaces
|
erpnext.patches.v14_0.cleanup_workspaces
|
||||||
|
erpnext.patches.v14_0.set_report_in_process_SOA
|
||||||
|
10
erpnext/patches/v14_0/set_report_in_process_SOA.py
Normal file
10
erpnext/patches/v14_0/set_report_in_process_SOA.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
|
# License: MIT. See LICENSE
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
process_soa = frappe.qb.DocType("Process Statement of Accounts")
|
||||||
|
q = frappe.qb.update(process_soa).set(process_soa.report, "General Ledger")
|
||||||
|
q.run()
|
Loading…
Reference in New Issue
Block a user