Work Entries from Planning
Automatically create work entries from flexible planning schedules
The Work Entries - Planning module integrates the Planning application with the Work Entry system, allowing automatic work entry creation from published planning slots, replacing static work schedules with flexible planning schedules.
This module accurately allocates working hours according to actual employee plans, calculates salary based on planning instead of fixed work schedules, and locks planning slots when work entries are validated.
Purpose
Key points
• Automatically create work entries from published planning slots
• Replace static work schedules with flexible planning schedules
• Accurately allocate working hours according to actual employee plans
• Calculate salary based on planning instead of fixed work schedules
User roles
Roles and access
| Role | Access | Main functions |
|---|---|---|
| Planning Manager | Planning Manager | Create and publish planning slots |
| HR Officer | HR Officer | Configure work entry source, view work entries |
| Payroll Manager | Payroll Manager | Validate work entries before payroll |
Important terminology
| Fields | Trường dữ liệu | Description |
|---|---|---|
| Planning | Kế hoạch | Work entry source from planning schedule |
| Planning Shift | Lập kế hoạch ca làm | planning.slot model |
| Planning Slot | Khung giờ kế hoạch | One shift in planning |
| Published | Đã xuất bản | Planning slot state |
| Allocated Hours | Giờ phân bổ | Working hours in planning slot |
When to use
Use Planning as work entry source when employee work schedule is not fixed, changes weekly/monthly, company uses Planning app to schedule shifts, and needs to calculate salary based on actual planning instead of template work schedule.
Configure Planning source
Steps
1. Go to Employees → Employees
2. Select employee to configure
3. Go to Work Information tab
4. Set Work Entry Source: Planning
5. Save employee
Automatic process
Planning Manager creates planning slots for employees, publishes planning slots (state = Published), system automatically finds employees with Work Entry Source = Planning, finds active contract, archives old work entries in slot time period, creates new work entries from planning slots, and evenly allocates working hours across days.
Work entry creation example
Planning Slot: Employee Nguyen Van A, time 15/04/2026 08:00 - 17/04/2026 17:00 (3 days), Allocated Hours: 24 hours, State: Published.
Work Entries created: Day 15/04: 8 hours (24/3), Day 16/04: 8 hours (24/3), Day 17/04: 8 hours (24/3).
Key points
• Each work entry has planning_slot_id link to original planning slot
• Duration: 8 hours
• Work_entry_type_id: Work type (Attendance)
Hour allocation
System allocates working hours by rule: Planning slot 1 day → Hours = Allocated Hours, Planning slot multiple days → Hours = Allocated Hours / Number of days.
Allocation examples
| Slot | Allocated Hours | Result |
|---|---|---|
| 15/04 08:00 - 15/04 17:00 | 8 hours | Work Entry: 15/04, Duration = 8 hours |
| 15/04 08:00 - 17/04 17:00 | 24 hours | Work Entries: 15/04 (8h), 16/04 (8h), 17/04 (8h) |
Managing Planning Slots and Work Entries
View work entries from planning slot: Planning → Planning → Select slot → Click Work Entries Smart Button, or Payroll → Work Entries → Filter by Planning Slot.
Edit planning slot
Key points
• No validated work entry: Can edit Start Datetime, End Datetime, Allocated Hours, Resource. System automatically archives old work entries and creates new ones.
• Has validated work entry: Cannot edit. Error message: "You cannot modify this shift record, as it is linked to validated work entries."
• Solution: Cancel validate work entries (if payroll not run) → Edit planning slot → Validate again
Delete planning slot
Key points
• No validated work entry: Can delete. System automatically archives linked work entries.
• Has validated work entry: Cannot delete. Solution: Cancel validate work entries → Delete planning slot.
Regenerate Work Entries
Need to regenerate work entries when planning slots are edited after work entries created, errors in work entry creation process, or need to resync work entries with planning slots.
Key points
• System removes planning_slot_id link from old work entries
• Archives old work entries (active=False)
• Creates new work entries from published planning slots
• Allocates hours by rule
Steps
1. Go to Payroll → Work Entries → Regenerate Work Entries
2. Select Employees, Date From, Date To
3. Click Regenerate
Practical tips
Key points
• Publish planning slots at right time: Before payroll deadline, not too early to avoid multiple edits
• Manage planning slots: Use Gantt view for overview, filter by employee
• Handle changes: Check if work entries validated before editing planning slot
• Check work entries: Compare total hours with planning slots, handle conflicts
• Pre-payroll process: Check planning slots fully published → Check work entries created → Handle conflicts → Validate → Run payroll