App Versions
{
"erpnext": "15.15.0",
"frappe": "15.16.1",
"hrms": "15.12.0",
"lending": "0.0.1",
"payments": "0.0.1"
}
Route
Form/Salary Slip/new-salary-slip-yrdgautbwn
Traceback
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 110, in application
response = frappe.api.handle(request)
File "apps/frappe/frappe/api/__init__.py", line 49, in handle
data = endpoint(**arguments)
File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 49, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/__init__.py", line 1697, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/handler.py", line 327, in run_doc_method
response = doc.run_method(method)
File "apps/frappe/frappe/model/document.py", line 955, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1315, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1297, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "apps/frappe/frappe/model/document.py", line 952, in fn
return method_object(*args, **kwargs)
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
File "apps/hrms/hrms/payroll/doctype/salary_slip/salary_slip.py", line 324, in get_emp_and_working_day_details
self.pull_sal_struct()
File "apps/hrms/hrms/payroll/doctype/salary_slip/salary_slip.py", line 400, in pull_sal_struct
make_salary_slip(self._salary_structure_doc.name, self)
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
File "apps/hrms/hrms/payroll/doctype/salary_structure/salary_structure.py", line 353, in make_salary_slip
doc = get_mapped_doc(
File "apps/frappe/frappe/model/mapper.py", line 150, in get_mapped_doc
postprocess(source_doc, target_doc)
File "apps/hrms/hrms/payroll/doctype/salary_structure/salary_structure.py", line 351, in postprocess
target.run_method("process_salary_structure", for_preview=for_preview)
File "apps/frappe/frappe/model/document.py", line 955, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1315, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1297, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "apps/frappe/frappe/model/document.py", line 952, in fn
return method_object(*args, **kwargs)
File "apps/hrms/hrms/payroll/doctype/salary_slip/salary_slip.py", line 1874, in process_salary_structure
self.calculate_net_pay()
File "apps/hrms/hrms/payroll/doctype/salary_slip/salary_slip.py", line 781, in calculate_net_pay
set_loan_repayment(self)
File "apps/hrms/hrms/payroll/doctype/salary_slip/salary_slip_loan_utils.py", line 18, in wrapper
return function(*args, **kwargs)
File "apps/hrms/hrms/payroll/doctype/salary_slip/salary_slip_loan_utils.py", line 49, in set_loan_repayment
for payment in doc.get("loans", []):
TypeError: 'NoneType' object is not iterable
Request Data
{
"type": "POST",
"args": {
"docs": "{\"docstatus\":0,\"doctype\":\"Salary Slip\",\"name\":\"new-salary-slip-yrdgautbwn\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"posting_date\":\"2024-03-03\",\"letter_head\":\"Pillavali Estate\",\"status\":\"Draft\",\"company\":\"Pillavali Estate\",\"currency\":\"INR\",\"exchange_rate\":1,\"payroll_frequency\":\"\",\"salary_slip_based_on_timesheet\":0,\"deduct_tax_for_unclaimed_employee_benefits\":0,\"deduct_tax_for_unsubmitted_tax_exemption_proof\":0,\"timesheets\":[],\"earnings\":[],\"deductions\":[],\"leave_details\":[],\"employee_name\":\"Muthuaiaha\",\"department\":\"Operations\",\"designation\":null,\"branch\":null,\"village\":\"Chittoor\",\"employee\":\"HR-EMP-00008\"}",
"method": "get_emp_and_working_day_details"
},
"headers": {},
"error_handlers": {},
"url": "/api/method/run_doc_method",
"request_id": null
}
Response Data
{
"exception": "TypeError: 'NoneType' object is not iterable",
"exc_type": "TypeError",
"_exc_source": "hrms (app)",
"_server_messages": "[\"{\\\"message\\\": \\\"Added tax components from the Salary Component master as the salary structure didn't have any tax component.\\\", \\\"title\\\": \\\"Message\\\", \\\"indicator\\\": \\\"blue\\\", \\\"alert\\\": 1}\"]"
}
GettingTypeError: ‘NoneType’ object is not iterable while creating salary slip