Show party name in General Ledger print report (#8760)

This commit is contained in:
Faris Ansari 2017-05-11 11:38:30 +05:30 committed by Nabin Hait
parent 464f108586
commit 734d7795f8
2 changed files with 28 additions and 1 deletions

View File

@ -5,7 +5,15 @@
</div>
{% } %}
<h2 class="text-center">{%= __("Statement of Account") %}</h2>
<h4 class="text-center">{%= (filters.party || filters.account) && ((filters.party || filters.account) + ", ") || "" %} {%= filters.company %}</h4>
<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") %}

View File

@ -74,8 +74,27 @@ frappe.query_reports["General Ledger"] = {
frappe.throw(__("Please select Party Type first"));
}
return party_type;
},
change: function() {
var party_type = frappe.query_report_filters_by_name.party_type.get_value();
var party = frappe.query_report_filters_by_name.party.get_value();
if(!party_type || !party) {
frappe.query_report_filters_by_name.party_name.set_value("");
return;
}
var fieldname = party_type.toLowerCase() + "_name";
frappe.db.get_value(party_type, party, fieldname, function(value) {
frappe.query_report_filters_by_name.party_name.set_value(value[fieldname]);
});
}
},
{
"fieldname":"party_name",
"label": __("Party Name"),
"fieldtype": "Data",
"hidden": 1
},
{
"fieldname":"group_by_voucher",
"label": __("Group by Voucher"),