Skip to main content

Work Shifts, Time Tracking & Automated Payroll Calculation

The HR & Payroll module on POS enables business owners to standardize workplace attendance, automate work hour tracking, and accurately calculate compensation for both Monthly Fixed and Hourly employees, combined with order commissions and KPI bonuses.


I. Work Shifts Configuration (Work Shifts)​

  • Path: Staff ➔ Work Shifts (or navigate to /work-shifts).
┌────────────────────────────────────────────────────────────────────────┐
│ WORK SHIFT CONFIGURATION │
├────────────────────────────────────────────────────────────────────────┤
│ Shift Name: Standard Office Shift (08:00 AM - 05:30 PM) │
│ Working Hours: [ 08:00 ] to [ 17:30 ] │
│ Break Time: [ 12:00 ] to [ 13:30 ] (90-minute break) │
│ Standard Minutes: 480 minutes (= 1.0 standard shift unit) │
│ Allowed Late Time: 15 minutes (Marked late after 08:15 AM) │
│ Allowed Early Leave: 10 minutes (Marked early departure before 17:20) │
│ Color Code: [ #1677FF (Blue) ] │
│ Status: [x] Active │
└────────────────────────────────────────────────────────────────────────┘

Key Parameters:​

  1. Time Window & Breaks: Defines valid check-in/out windows and automatically deducts midday break time from total work hours.
  2. Standard Minutes (StandardMinutes): Converts actual work duration into shift day units (e.g., 480 mins = 1.0 unit, 240 mins = 0.5 unit).
  3. Lateness / Early Departure Tolerance (AllowedLateMinutes / AllowedEarlyMinutes): Grace period thresholds before tagging with LATE.
  4. Default Shift Assignment: In the staff branch profile, assign a Default Work Shift (DefaultWorkShiftId) as the benchmark for daily auditing.

II. Monthly Attendance Tracking Matrix​

  • Path: Staff ➔ Attendance (or navigate to /attendance).

The attendance interface is structured as a Monthly Grid View, visually displaying all days from the 1st to the 31st:

┌────┬─────────┬──────────────┬─────────┬──────┬──────┬──────┬─────┬──────────────┬──────┬──────┬─────────┐
│No. │Staff ID │Full Name │Group │01 M │02 Tu │03 W │ ... │Total │Late │Absent│Action │
├────┼─────────┼──────────────┼─────────┼──────┼──────┼──────┼─────┼──────────────┼──────┼──────┼─────────┤
│ 1 │ EMP001 │ John Smith │ Sales │ 8.0 │ 8.0 │ P │ ... │ 24.00 shifts │ 1 │ 0 │ ✏️ 👁️ │
│ 2 │ EMP002 │ Jane Doe │ Parttime│ 4.5 │ 5.0 │ - │ ... │ 115.50 hours │ 0 │ 0 │ ✏️ 👁️ │
└────┴─────────┴──────────────┴─────────┴──────┴──────┴──────┴─────┴──────────────┴──────┴──────┴─────────┘

1. Cell Display Indicators:​

  • Work Hours: Displays actual hours worked during the day (e.g., 8.0, 4.5).
  • Status Codes:
    • P: Paid Leave (Approved leave with pay).
    • KP: Unpaid Leave (Leave without pay).
    • -: Day Off / Absent / No recorded data.
  • Status Colors:
    • 🟢 Green (PRESENT): Full attendance, on time.
    • 🟡 Yellow (LATE): Late arrival exceeding grace period.
    • 🟠 Orange (MISSING_CHECKOUT): Checked in but missing check-out timestamp.
    • 🔴 Red (ABSENT): Unexcused absence.
    • ⚪ Gray (HOLIDAY): Public holiday / Weekend.

2. Details via Smart Popover (Hover over a date cell):​

Hovering over any date cell displays a popover with:

  • 📅 Date & Day of the week with status badge.
  • 🟢 Check-in: Actual arrival time (e.g., 08:05).
  • 🔴 Check-out: Actual departure time (e.g., 17:32).
  • ⏱️ Hours Worked: Net work duration (breaks excluded).
  • 📋 Shift Units: Converted shift credit (for salaried employees).
  • 📝 Notes: Manual adjustments or leave explanations.

3. Inline Row Editing:​

Managers can click the Edit ✏️ button at the end of each row:

  • Hourly Staff: Enter hours directly (0 - 24 hours, in 0.25h increments).
  • Salaried Staff: Select standard shift values (Full 1.0, Half 0.5, Paid Leave, Unpaid Leave, Absent, Holiday).

III. Automated Payroll Calculation (Payroll Calculation)​

  • Path: Staff ➔ Payroll (or navigate to /payroll).

The system supports two flexible wage calculation models based on employee profile settings:

1. Comparison of Wage Models:​

CriteriaHourly Wage (Hourly)Fixed Monthly Salary (Fixed)
Applicable RolesPart-time workers, seasonal staff, flexible shift agents.Full-time office staff, executives, permanent managers.
Core FormulaHourlySalary = WorkHours * HourlyRateBaseSalaryByWorkDays = BaseSalary * (% / 100) * (WorkDays / StandardWorkDays)
Impact of Standard Month DaysNone (Paid strictly for actual hours worked).Yes (Divided across standard work days, e.g., 24 or 26 days).
Payroll Column HeadersHourly Rate (HourlyRate) & Total Hours (WorkHours).Base Salary (BaseSalary) & Days Worked (WorkDays).

2. Net Earnings Calculation Formulas:​

  1. Attendance Earnings:
    AttendanceSalary = HourlySalary (or BaseSalaryByWorkDays) + (Daily Allowance * Days Worked)
  2. Order Closing Bonus:
    SuccessfulOrderBonus = Number of Successful Orders * Bonus Rate per Order
  3. KPI Revenue Commission:
    KpiBonus = Net Delivered Sales * (Commission Rate % / 100)
  4. Gross Salary:
    GrossSalary = AttendanceSalary + Order Bonus + KPI Commission + Other Bonuses - Penalties
  5. Net Payable:
    NetPayable = Max(0, GrossSalary - Salary Advances)

IV. End-of-Month Payroll Closing Workflow​

  1. Step 1: Finalize Attendance Records: Review missing check-outs (MISSING_CHECKOUT) or pending leave requests in the Attendance Matrix.
  2. Step 2: Initialize Monthly Payroll: Navigate to Payroll ➔ Select Month/Year ➔ Click Calculate Payroll.
  3. Step 3: Make Adjustments: Input ad-hoc bonuses, penalties, or advance deductions for individual staff members.
  4. Step 4: Approve Payroll: Click Approve Payroll to lock financial records for the cycle.
  5. Step 5: Export & Disburse: Click Export to Excel to pass bank disbursement files to the accounting department.