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.

Planning
Work Entries
Shifts
Scheduling
Flexible

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

RoleAccessMain functions
Planning ManagerPlanning ManagerCreate and publish planning slots
HR OfficerHR OfficerConfigure work entry source, view work entries
Payroll ManagerPayroll ManagerValidate work entries before payroll

Important terminology

FieldsTrường dữ liệuDescription
PlanningKế hoạchWork entry source from planning schedule
Planning ShiftLập kế hoạch ca làmplanning.slot model
Planning SlotKhung giờ kế hoạchOne shift in planning
PublishedĐã xuất bảnPlanning slot state
Allocated HoursGiờ 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

SlotAllocated HoursResult
15/04 08:00 - 15/04 17:008 hoursWork Entry: 15/04, Duration = 8 hours
15/04 08:00 - 17/04 17:0024 hoursWork 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