mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-18 12:39:18 +00:00
Monthly Salary Register: Month is now optional
This commit is contained in:
@@ -7,7 +7,7 @@ wn.query_reports["Monthly Salary Register"] = {
|
|||||||
"fieldname":"month",
|
"fieldname":"month",
|
||||||
"label": wn._("Month"),
|
"label": wn._("Month"),
|
||||||
"fieldtype": "Select",
|
"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",
|
"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
|
||||||
"Dec"][wn.datetime.str_to_obj(wn.datetime.get_today()).getMonth()],
|
"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):
|
def get_salary_slips(filters):
|
||||||
conditions, filters = get_conditions(filters)
|
conditions, filters = get_conditions(filters)
|
||||||
salary_slips = webnotes.conn.sql("""select * from `tabSalary Slip` where docstatus = 1 %s""" %
|
salary_slips = webnotes.conn.sql("""select * from `tabSalary Slip` where docstatus = 1 %s
|
||||||
conditions, filters, as_dict=1)
|
order by employee, month""" % conditions, filters, as_dict=1)
|
||||||
|
|
||||||
if not salary_slips:
|
if not salary_slips:
|
||||||
msgprint(_("No salary slip found for month: ") + cstr(filters.get("month")) +
|
msgprint(_("No salary slip found for month: ") + cstr(filters.get("month")) +
|
||||||
|
|||||||
Reference in New Issue
Block a user