Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Payroll): multiline condition & formula eval failing on salary slip creation from payroll entry #2147

Merged
merged 2 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hrms/payroll/doctype/salary_slip/salary_slip.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def get_emp_and_working_day_details(self):
struct = self.check_sal_struct()

if struct:
self._salary_structure_doc = frappe.get_cached_doc("Salary Structure", struct)
self.set_salary_structure_doc()
self.salary_slip_based_on_timesheet = (
self._salary_structure_doc.salary_slip_based_on_timesheet or 0
)
Expand Down
3 changes: 2 additions & 1 deletion hrms/payroll/doctype/salary_slip/test_salary_slip.py
Original file line number Diff line number Diff line change
Expand Up @@ -1884,7 +1884,8 @@ def make_earning_salary_component(
"salary_component": "Special Allowance",
"abbr": "SA",
"condition": "H < 10000",
"formula": "BS*.5",
# intentional to test multiline formula
"formula": "BS\n*.5",
"type": "Earning",
"amount_based_on_formula": 1,
"depends_on_payment_days": 0,
Expand Down
Loading