Payment terms filter in AR report
This commit is contained in:
parent
471bc618b5
commit
6b89644ca7
@ -23,10 +23,10 @@ frappe.query_reports["Accounts Receivable"] = {
|
|||||||
"options": "Customer Group"
|
"options": "Customer Group"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"credit_days_based_on",
|
"fieldname":"payment_terms_template",
|
||||||
"label": __("Credit Days Based On"),
|
"label": __("Payment Terms Template"),
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Link",
|
||||||
"options": "\nFixed Days\nLast Day of the Next Month"
|
"options": "Payment Terms Template"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldtype": "Break",
|
"fieldtype": "Break",
|
||||||
|
@ -283,9 +283,9 @@ class ReceivablePayableReport(object):
|
|||||||
where exists(select name from `tabCustomer Group` where lft >= {0} and rgt <= {1}
|
where exists(select name from `tabCustomer Group` where lft >= {0} and rgt <= {1}
|
||||||
and name=tabCustomer.customer_group))""".format(lft, rgt))
|
and name=tabCustomer.customer_group))""".format(lft, rgt))
|
||||||
|
|
||||||
if self.filters.get("credit_days_based_on"):
|
if self.filters.get("payment_terms_template"):
|
||||||
conditions.append("party in (select name from tabCustomer where credit_days_based_on=%s)")
|
conditions.append("party in (select name from tabCustomer where payment_terms=%s)")
|
||||||
values.append(self.filters.get("credit_days_based_on"))
|
values.append(self.filters.get("payment_terms_template"))
|
||||||
|
|
||||||
return " and ".join(conditions), values
|
return " and ".join(conditions), values
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user