Repository navigation
Replies: 3 comments 1 reply
|
For a monthly wage, Horilla's paid-days value is not calculated from the employee's 5-day shift alone. In the current payroll code,
March 1-31, 2026 has 22 Monday-Friday days. If Horilla shows 25, the likely configuration issue is that Saturdays are still being counted as working days, and only Sundays plus one holiday/company leave are being excluded. Check the Company Leaves/Holidays setup for that company and make sure both Saturday and Sunday are configured as non-working days if the payroll period should be Mon-Fri only. |
|
Dear Horilla
Thank you for your response.
Next, I’m trying to set a cutoff period from the previous month to the
current month. For example, payroll calculations would cover the period
from March 21 to April 20. However, the number of days and the salary
displayed don’t match. Can Horilla support this cutoff period for payroll?
Regards
Rhgmanik
Pada Rab, 22 Apr 2026 pukul 13.48 T ***@***.***> menulis:
… For a monthly wage, Horilla's paid-days value is not calculated from the
employee's 5-day shift alone.
In the current payroll code, monthly_computation() gets
working_days_on_period from get_working_days() and then subtracts unpaid
leaves:
paid_days = working_days_on_period - unpaid_leaves
get_working_days() builds the date range and subtracts configured company
leaves and holidays. It does not inspect the employee shift pattern there.
March 1-31, 2026 has 22 Monday-Friday days. If Horilla shows 25, the
likely configuration issue is that Saturdays are still being counted as
working days, and only Sundays plus one holiday/company leave are being
excluded. Check the Company Leaves/Holidays setup for that company and make
sure both Saturday and Sunday are configured as non-working days if the
payroll period should be Mon-Fri only.
—
Reply to this email directly, view it on GitHub
<#1094?email_source=notifications&email_token=BTLF7CDBYXK3GMOD7TDMVA34XBTL7A5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNRWGY2TQMBQUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVRTG633UMVZF6Y3MNFRWW#discussioncomment-16665800>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BTLF7CCPEJWTUMDO57RMKST4XBTL7AVCNFSM6AAAAACYBZTM4CVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMNRWGU4DAMA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
Dear Horilla Team,
Thank you for your explanation.
It would be very helpful if Horilla could calculate the cutoff date as
mentioned above, as many companies have a cutoff date on the 20th of each
month, so salary calculations are based on the date range I mentioned in
the previous example.
I hope the Horilla development team will consider developing this feature.
Pada Kam, 23 Apr 2026 pukul 04.04 T ***@***.***> menulis:
… Horilla can accept that date range in the payslip flow, but the current
monthly-wage calculation has a cross-month caveat that may explain the
mismatch.
The form and view pass the exact start_date / end_date into
payroll_calculation(), so a period such as March 21-April 20 is not
rejected just because it crosses a calendar month. For a monthly wage,
though, monthly_computation() calls months_between_range() and prorates
each calendar-month segment separately. In that example, March 21-31 is
calculated using March's working-day denominator, and April 1-20 is
calculated using April's working-day denominator. That means the salary
will not necessarily match a simple fixed 30-day or 31-day cutoff formula.
For the displayed paid-days value, I see a likely issue in the current
source. months_between_range() returns one entry per month in the period,
but monthly_computation() currently sets:
paid_days = month_data[0]["working_days_on_period"] - unpaid_leaves
For March 21-April 20, that uses only the first month segment's working
days before subtracting unpaid leave, while basic_pay was calculated
across both the March and April segments. For a cross-month cutoff, the
paid-days calculation should be based on the total across all month
segments, for example:
paid_days = sum(data["working_days_on_period"] for data in month_data) - unpaid_leaves
So the cutoff dates are accepted, but if your period crosses months, I
would treat the paid-days mismatch as a code issue. Also check Company
Leaves/Holidays for both months, because get_working_days() subtracts
those dates when building each segment.
—
Reply to this email directly, view it on GitHub
<#1094?email_source=notifications&email_token=BTLF7CBXHWZGPP7RNNQSY3D4XEXUTA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNRWG42TINBTUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVRTG633UMVZF6Y3MNFRWW#discussioncomment-16675443>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BTLF7CGYZRQB57YDCU26EQL4XEXUTAVCNFSM6AAAAACYBZTM4CVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMNRXGU2DIMY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Uh oh!
There was an error while loading. Please reload this page.
How are workdays calculated?

I'm trying to create a payslip for a 1-month period with a regular 5-day shift (Monday - Friday) in March 2026 (March 1-31, 2026). The total workdays should be 22, but the Horilla payslip displays 25 paid days. What's the correct way to determine paid days?
All reactions