Monthly Salary Register: Month is now optional
This commit is contained in:
parent
68b0d54b4b
commit
f3ded044e0
@ -7,7 +7,7 @@ wn.query_reports["Monthly Salary Register"] = {
|
||||
"fieldname":"month",
|
||||
"label": wn._("Month"),
|
||||
"fieldtype": "Select",
|
||||
"options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
|
||||
"options": "\nJan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
|
||||
"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
|
||||
"Dec"][wn.datetime.str_to_obj(wn.datetime.get_today()).getMonth()],
|
||||
},
|
||||
|
@ -59,8 +59,8 @@ def get_columns(salary_slips):
|
||||
|
||||
def get_salary_slips(filters):
|
||||
conditions, filters = get_conditions(filters)
|
||||
salary_slips = webnotes.conn.sql("""select * from `tabSalary Slip` where docstatus = 1 %s""" %
|
||||
conditions, filters, as_dict=1)
|
||||
salary_slips = webnotes.conn.sql("""select * from `tabSalary Slip` where docstatus = 1 %s
|
||||
order by employee, month""" % conditions, filters, as_dict=1)
|
||||
|
||||
if not salary_slips:
|
||||
msgprint(_("No salary slip found for month: ") + cstr(filters.get("month")) +
|
||||
|
Loading…
x
Reference in New Issue
Block a user