[Fix] Employee Details in Salary Slip preview
This commit is contained in:
parent
2160638f36
commit
842ad55235
@ -33,8 +33,13 @@ class SalaryStructure(Document):
|
|||||||
def make_salary_slip(source_name, target_doc = None, employee = None, as_print = False, print_format = None):
|
def make_salary_slip(source_name, target_doc = None, employee = None, as_print = False, print_format = None):
|
||||||
def postprocess(source, target):
|
def postprocess(source, target):
|
||||||
if employee:
|
if employee:
|
||||||
|
employee_details = frappe.db.get_value("Employee", employee,
|
||||||
|
["employee_name", "branch", "designation", "department"], as_dict=1)
|
||||||
target.employee = employee
|
target.employee = employee
|
||||||
target.employee_name = frappe.get_value("Employee",employee, "employee_name")
|
target.employee_name = employee_details.employee_name
|
||||||
|
target.branch = employee_details.branch
|
||||||
|
target.designation = employee_details.designation
|
||||||
|
target.department = employee_details.department
|
||||||
target.run_method('process_salary_structure')
|
target.run_method('process_salary_structure')
|
||||||
|
|
||||||
doc = get_mapped_doc("Salary Structure", source_name, {
|
doc = get_mapped_doc("Salary Structure", source_name, {
|
||||||
|
Loading…
Reference in New Issue
Block a user