v8.x.x Allow Doctypes with space in name to be filtered in General Ledger (#11264)

* Set transaction type in pricing rule only if unavailable

* Use scrub instead for party_type with space
This commit is contained in:
Brown-Harry Boma
2017-10-25 07:28:45 +01:00
committed by Nabin Hait
parent 757c2f692b
commit a829b3cc82

View File

@@ -83,7 +83,7 @@ frappe.query_reports["General Ledger"] = {
return;
}
var fieldname = party_type.toLowerCase() + "_name";
var fieldname = frappe.model.scrub(party_type)+"_name";
frappe.db.get_value(party_type, party, fieldname, function(value) {
frappe.query_report_filters_by_name.party_name.set_value(value[fieldname]);
});