fix(hr): Delete salary slip when cancel payroll entry (#15757)
This commit is contained in:
parent
63ec78aa5d
commit
c856794519
@ -20,6 +20,10 @@ class PayrollEntry(Document):
|
|||||||
if self.validate_employee_attendance():
|
if self.validate_employee_attendance():
|
||||||
frappe.throw(_("Cannot Submit, Employees left to mark attendance"))
|
frappe.throw(_("Cannot Submit, Employees left to mark attendance"))
|
||||||
|
|
||||||
|
def on_cancel(self):
|
||||||
|
frappe.delete_doc("Salary Slip", frappe.db.sql_list("""select name from `tabSalary Slip`
|
||||||
|
where payroll_entry=%s """, (self.name)))
|
||||||
|
|
||||||
def get_emp_list(self):
|
def get_emp_list(self):
|
||||||
"""
|
"""
|
||||||
Returns list of active employees based on selected criteria
|
Returns list of active employees based on selected criteria
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user