def make_employee_salary_slip(self, user): employee = frappe.db.get_value("Employee", {"user_id": user}) salary_structure = frappe.db.get_value("Salary Structure", {"employee": employee}) if not salary_structure: salary_structure = make_salary_structure(employee) salary_structure.from_date = today() salary_structure.insert() salary_structure = salary_structure.name salary_slip = frappe.db.get_value("Salary Slip", {"employee": employee}) if not salary_slip: salary_slip = make_salary_slip(salary_structure) salary_slip.insert() salary_slip.submit() salary_slip = salary_slip.name salary_slip = frappe.db.get_value("Weekly Salary Slip", {"employee": employee}) if not salary_slip: salary_slip = make_salary_slip(salary_structure) salary_slip.insert() salary_slip.submit() salary_slip = salary_slip.name return salary_slip
def make_employee_salary_slip(self, user): employee = frappe.db.get_value("Employee", {"user_id": user}) salary_structure = frappe.db.get_value("Salary Structure", {"employee": employee}) if not salary_structure: salary_structure = make_salary_structure(employee) salary_structure.from_date = today() salary_structure.insert() salary_structure = salary_structure.name salary_slip = frappe.db.get_value("Salary Slip", {"employee": employee}) if not salary_slip: salary_slip = make_salary_slip(salary_structure) salary_slip.insert() salary_slip.submit() salary_slip = salary_slip.name return salary_slip