Monday, September 30, 2024
1 change
Resolved issues and error corrections
This fix corrects a typo in the Swiss payroll insurance threshold calculation that was causing payslip generation to fail. The fallback value was incorrectly formatted as a tuple instead of a decimal number, which broke the payroll processing. This resolves errors when generating payslips for Swiss employees.
Original PR description
Steps to reproduce: - Intall Payroll and Switzerland localization > Switch to CH company - Employees > New > Work Information tab > Set any Canton - Create a contract for that employee > Set it to 'Running' state - Payroll > Work Entries > Work Entries > Remove filters - Navigate to next month > Regenerate Work Entries - Generate Payslips > Error is raised This error is raised because the fallback value in _get_ac_threshold is 0, 0 instead of being a float (same as the otherwise returned line.amount). This was most likely just a typo using the wrong decimal separator which turned th fallback into a tuple, breaking on the following operations. opw-4204580