[Fix] Sales payment summary report (#12151)
This commit is contained in:
parent
443691aaf8
commit
75789b65c2
@ -7,12 +7,14 @@ frappe.query_reports["Sales Payment Summary"] = {
|
||||
"label": __("From Date"),
|
||||
"fieldtype": "Date",
|
||||
"default": frappe.datetime.get_today(),
|
||||
"reqd": 1,
|
||||
"width": "80"
|
||||
},
|
||||
{
|
||||
"fieldname":"to_date",
|
||||
"label": __("To Date"),
|
||||
"fieldtype": "Date",
|
||||
"reqd": 1,
|
||||
"default": frappe.datetime.get_today()
|
||||
},
|
||||
{
|
||||
|
@ -37,11 +37,11 @@ def get_sales_payment_data(filters, columns):
|
||||
|
||||
def get_conditions(filters):
|
||||
conditions = ""
|
||||
if filters.get("company"): conditions += " a.company=%(company)s"
|
||||
if filters.get("from_date"): conditions += "a.posting_date >= %(from_date)s"
|
||||
if filters.get("to_date"): conditions += " and a.posting_date <= %(to_date)s"
|
||||
if filters.get("company"): conditions += " and a.company=%(company)s"
|
||||
if filters.get("customer"): conditions += " and a.customer = %(customer)s"
|
||||
if filters.get("owner"): conditions += " and a.owner = %(owner)s"
|
||||
if filters.get("from_date"): conditions += " and a.posting_date >= %(from_date)s"
|
||||
if filters.get("to_date"): conditions += " and a.posting_date <= %(to_date)s"
|
||||
if filters.get("is_pos"): conditions += " and a.is_pos = %(is_pos)s"
|
||||
return conditions
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user