hr_lite 0.69.0 → 0.69.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/app/models/hr_lite/leave_request.rb +5 -3
- data/lib/hr_lite/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b1baf60c535e3b5cdc3eac6c3cea7b16ef017d9a5bc544035c5baa84091aa665
|
|
4
|
+
data.tar.gz: 9061aa56cb55d265c5e998379103d346f3b170cf86b13b57d9bd0aef391b78d6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 05cbcd508ef90ef56166997654d61fcd0bcdd093c5b6eed42d2d5343adaba94bf697a0e4b2520884516d0d6aeaee8ac2b6317a76b8a53b08921bf01ad06925da
|
|
7
|
+
data.tar.gz: f04403add05a6a730e96e18ca7b554049979fe52bb32d1ba7e49ca526bb34f09855b19336665d8806307708514c66ca538349aeb0bb75c3ab5948c0d86dfbcc9
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.69.1] - 2026-11-10
|
|
11
|
+
|
|
12
|
+
HR (and admins) can record leave on any working day. No migrations.
|
|
13
|
+
|
|
14
|
+
- **"Record leave" no longer refuses a checked-in day.** HR recording full-day leave for someone who checked in got "Attendance is marked in this period" and nothing was saved. It now saves and is approved as usual; the day shows and pays as leave, which already outranks a punch.
|
|
15
|
+
- **…nor caps it at penalty-held days.** Leave HR records is no longer limited to the balance left after penalty holds ("you can apply for at most N days"); anything past the balance is loss of pay, as before. Comp-off still needs its credit, because it has no loss of pay.
|
|
16
|
+
- Unchanged: an employee applying for themselves still meets both checks, and nobody can record leave on days that are all weekly offs or holidays, or over leave already recorded.
|
|
17
|
+
|
|
10
18
|
## [0.69.0] - 2026-11-09
|
|
11
19
|
|
|
12
20
|
HR and leadership make or remove a holiday from the company calendar. No migrations.
|
|
@@ -392,10 +392,11 @@ module HrLite
|
|
|
392
392
|
end
|
|
393
393
|
|
|
394
394
|
# A full-day leave over a day that already has a check-in makes no
|
|
395
|
-
# sense; a half-day alongside a punch is legitimate (worked half)
|
|
395
|
+
# sense; a half-day alongside a punch is legitimate (worked half), and
|
|
396
|
+
# HR may record leave over a checked-in day (leave outranks the punch).
|
|
396
397
|
def no_punch_conflict
|
|
397
398
|
return unless start_date && end_date
|
|
398
|
-
return if half_day
|
|
399
|
+
return if half_day || recorded_by_hr?
|
|
399
400
|
|
|
400
401
|
punched = AttendanceRecord.where(user_id: user_id, date: start_date..end_date)
|
|
401
402
|
.where.not(check_in_at: nil)
|
|
@@ -418,7 +419,8 @@ module HrLite
|
|
|
418
419
|
# balance with days held for penalties. Any other excess becomes loss of pay at approval.
|
|
419
420
|
def sufficient_balance
|
|
420
421
|
return unless start_date && end_date && leave_type
|
|
421
|
-
|
|
422
|
+
# HR records any day; past the balance it is loss of pay. Comp-off has no loss of pay.
|
|
423
|
+
return if leave_type.unlimited? || errors.any? || (recorded_by_hr? && !leave_type.comp_off)
|
|
422
424
|
|
|
423
425
|
held = balance.penalty_days
|
|
424
426
|
return unless leave_type.comp_off || held.positive?
|
data/lib/hr_lite/version.rb
CHANGED