[Fix] make_for field removed
This commit is contained in:
parent
0e4119b2de
commit
a62dcce46a
@ -9,8 +9,7 @@ frappe.ui.form.on("Salary Slip", {
|
|||||||
frm.fields_dict["timesheets"].grid.get_field("time_sheet").get_query = function(){
|
frm.fields_dict["timesheets"].grid.get_field("time_sheet").get_query = function(){
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
employee: frm.doc.employee,
|
employee: frm.doc.employee
|
||||||
make_for: 'Salary Slip'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,12 +80,11 @@ class SalarySlip(TransactionBase):
|
|||||||
self.end_date = m['month_end_date']
|
self.end_date = m['month_end_date']
|
||||||
|
|
||||||
def check_sal_struct(self, joining_date, relieving_date):
|
def check_sal_struct(self, joining_date, relieving_date):
|
||||||
timesheet = 1 if self.salary_slip_based_on_timesheet else 0
|
|
||||||
struct = frappe.db.sql("""select name from `tabSalary Structure`
|
struct = frappe.db.sql("""select name from `tabSalary Structure`
|
||||||
where employee=%s and is_active = 'Yes'
|
where employee=%s and is_active = 'Yes'
|
||||||
and (from_date <= %s or from_date <= %s)
|
and (from_date <= %s or from_date <= %s)
|
||||||
and (to_date is null or to_date >= %s or to_date >= %s) and salary_slip_based_on_timesheet=%s""",
|
and (to_date is null or to_date >= %s or to_date >= %s)""",
|
||||||
(self.employee, self.start_date, joining_date, self.end_date, relieving_date, timesheet))
|
(self.employee, self.start_date, joining_date, self.end_date, relieving_date))
|
||||||
|
|
||||||
if not struct:
|
if not struct:
|
||||||
self.salary_structure = None
|
self.salary_structure = None
|
||||||
|
Loading…
Reference in New Issue
Block a user