Skip to content

Latest commit

 

History

History
331 lines (247 loc) · 9.49 KB

File metadata and controls

331 lines (247 loc) · 9.49 KB

Alaska Payroll System Implementation Guide

Overview

This guide covers the implementation of Alaska-specific sick leave requirements, vacation accrual tracking, and IRS Form 941 quarterly reporting for your payroll system.

Changes Summary

1. Alaska Sick Leave Compliance (AS 23.10.500)

  • Accrual Rate: 1 hour of sick leave per 30 hours worked
  • Annual Caps:
    • 56 hours/year for employers with 15+ employees
    • 40 hours/year for employers with <15 employees
  • Paystub Display: Shows accrued, used, and year-to-date totals

2. Vacation Accrual System

  • Fixed annual hours: Configurable per employee (default 80 hours = 10 days)
  • Accrual Method: Pro-rated throughout the year (annual / 26 pay periods)
  • Paystub Display: Shows accrued, used, and year-to-date totals

3. IRS Form 941 Quarterly Reporting

  • Automated calculation of federal tax liabilities
  • Quarterly summary for IRS filing
  • Breakdown of FICA, Medicare, and federal income tax

Installation Steps

Step 1: Backup Your Database

CRITICAL: Before making any changes, backup your database!

# Using MySQL command line
mysqldump -u your_username -p payroll > payroll_backup_$(date +%Y%m%d).sql

# Or use phpMyAdmin to export the database

Step 2: Run the Database Migration

Execute the SQL migration file to update your database schema:

  1. Option A - MySQL Command Line:

    mysql -u your_username -p payroll < update_alaska_sick_leave.sql
  2. Option B - phpMyAdmin:

    • Open phpMyAdmin
    • Select the payroll database
    • Click "SQL" tab
    • Copy and paste the contents of update_alaska_sick_leave.sql
    • Click "Go" to execute
  3. Option C - Using the included connection:

    • Open your browser
    • Navigate to: http://your-domain/test.php (if available)
    • Or create a temporary file to run the migration

Step 3: Verify Database Changes

Check that the following columns were added successfully:

Employee Table:

SELECT
  sick_hours_balance,
  sick_hours_ytd_used,
  sick_hours_ytd_accrued,
  vacation_hours_annual,
  vacation_hours_balance,
  vacation_hours_ytd_used
FROM employee LIMIT 1;

History Table:

SELECT
  sick_hours_used,
  vacation_hours_used,
  sick_hours_accrued,
  vacation_hours_accrued,
  regular_hours,
  overtime_hours
FROM history LIMIT 1;

Company Settings Table:

SELECT
  employee_count_threshold,
  sick_leave_cap_large,
  sick_leave_cap_small,
  current_employee_count
FROM company_settings LIMIT 1;

Step 4: Configure Company Settings

  1. Login as admin
  2. Navigate to Company Setup page
  3. Scroll to Alaska Sick Leave Requirements section
  4. Configure:
    • Current Employee Count: Enter your actual number of employees
    • Employee Count Threshold: Leave at 15 (Alaska law requirement)
    • Sick Leave Cap (Large): Leave at 56 hours
    • Sick Leave Cap (Small): Leave at 40 hours
  5. Click Save Company Settings

Step 5: Configure Employee Vacation Hours

For each employee, you can set their annual vacation hours:

  1. Go to Edit Employee for each employee
  2. Look for the Vacation Hours Annual field (should default to 80 hours = 10 days)
  3. Adjust as needed based on your company policy
  4. Save changes

Using the New Features

Recording Payroll

When recording staff payments via pay.php:

  1. Enter Regular Hours Worked (e.g., 80 for bi-weekly)
  2. Enter Overtime Hours if applicable
  3. Enter Sick Hours Used (not days anymore - now hours!)
  4. Enter Vacation Hours Used (new field)
  5. System automatically calculates:
    • Sick leave accrued (1 hour per 30 hours worked)
    • Vacation accrued (annual / 26 pay periods)
    • Applies the appropriate sick leave cap
    • Updates year-to-date totals

Viewing Paystubs

Paystubs now include a Leave Balances section showing:

Sick Leave:

  • Current Period: Accrued | Used
  • Year-to-Date: Accrued | Used
  • Current Balance: XX.XX hours

Vacation:

  • Current Period: Accrued | Used
  • Year-to-Date: Accrued | Used
  • Current Balance: XX.XX hours

Generating IRS Form 941

To generate quarterly tax reports:

  1. Navigate to IRS Form 941 from the dashboard
  2. Select the Year and Quarter
  3. Click Load Quarter
  4. Review the calculated values:
    • Total wages for the quarter
    • Federal income tax withheld
    • Social Security taxes (employee + employer)
    • Medicare taxes (employee + employer)
    • Additional Medicare tax (if applicable)
  5. Use the Print button to print or save as PDF
  6. File electronically at www.irs.gov/efile

Important Notes

Sick Leave Accrual Details

How it works:

  • Employee works 80 hours → Accrues 80/30 = 2.67 hours of sick leave
  • Employee works 40 hours → Accrues 40/30 = 1.33 hours of sick leave
  • System automatically enforces annual caps (56 or 40 hours depending on company size)
  • Year-to-date counters reset automatically on January 1st

Cap Enforcement:

  • If an employee has already accrued 56 hours (large employer) in a calendar year, they will not accrue more
  • The system checks this automatically during payroll processing

Vacation Accrual Details

How it works:

  • Employee is granted 80 hours annual vacation
  • Accrues 80 / 26 = 3.08 hours per bi-weekly pay period
  • On January 1st, their balance is reset to the full annual amount
  • Used vacation is tracked year-to-date

Customization:

  • Each employee can have a different annual vacation amount
  • Set this in the employee edit page under "Vacation Hours Annual"

Year-End Reset

The system automatically resets on January 1st:

  • Sick leave YTD used → 0
  • Sick leave YTD accrued → 0
  • Vacation YTD used → 0
  • Vacation YTD accrued → 0
  • Vacation balance → Resets to annual amount

Sick leave balance carries over (Alaska law requires this)


Troubleshooting

Issue: "Database column not found" error

Solution: The migration didn't run properly. Try:

  1. Check the MySQL error log
  2. Run each ALTER TABLE statement individually
  3. Verify you have ALTER privileges on the database

Issue: Sick leave not accruing

Solution:

  1. Check that company_settings has values for current_employee_count and caps
  2. Verify the employee has hours recorded in regular_hours field
  3. Check that the employee hasn't hit their annual cap

Issue: Paystub not showing leave balances

Solution:

  1. The history record needs the new columns (sick_hours_accrued, vacation_hours_accrued, etc.)
  2. Process a new payroll to see the updated paystub format
  3. Old paystubs will show 0.00 for new fields (this is expected)

Issue: IRS Form 941 shows $0.00

Solution:

  1. Make sure you selected the correct year and quarter
  2. Verify there are payment records in the history table for that quarter
  3. Check that the payment dates fall within the quarter date range

File Changes Summary

New Files Created:

  1. update_alaska_sick_leave.sql - Database migration script
  2. irs_form_941.php - IRS Form 941 quarterly report generator
  3. IMPLEMENTATION_GUIDE.md - This file

Files Modified:

  1. paystaff.php - Updated payroll processing logic
  2. pay.php - Added vacation hours field, updated labels
  3. paystub.php - Added leave balances section
  4. company_setup.php - Added Alaska sick leave configuration

Compliance Checklist

Alaska Sick Leave Law (AS 23.10.500):

  • ✅ Accrues 1 hour per 30 hours worked
  • ✅ Caps at 56 hours for 15+ employees
  • ✅ Caps at 40 hours for <15 employees
  • ✅ Displays on paystub (accrued, used, YTD)

Vacation Tracking:

  • ✅ Configurable annual hours per employee
  • ✅ Accrues proportionally throughout year
  • ✅ Displays on paystub (accrued, used, YTD)

IRS Quarterly Reporting:

  • ✅ Form 941 calculations
  • ✅ Federal income tax withholding
  • ✅ FICA and Medicare calculations
  • ✅ Quarterly summary by month

Support and Questions

If you encounter issues or have questions:

  1. Review this implementation guide
  2. Check the troubleshooting section
  3. Verify database migration completed successfully
  4. Test with a single employee first before rolling out company-wide

Testing Recommendations

Before going live:

  1. Create a test employee with known hours
  2. Process a test payroll and verify:
    • Sick leave accrues correctly (hours worked / 30)
    • Vacation accrues correctly (annual / 26)
    • Caps are enforced
    • Paystub shows all information
  3. Generate an IRS Form 941 for a past quarter to verify calculations
  4. Compare with your previous manual calculations

Alaska Sick Leave Law Reference

Alaska Statutes 23.10.500 - Earned Sick Leave

Key provisions:

  • Employees accrue 1 hour of sick leave for every 30 hours worked
  • Accrual begins at the start of employment or January 1, 2019 (whichever is later)
  • Employers may cap annual accrual at:
    • 56 hours for employers with 15 or more employees
    • 40 hours for employers with fewer than 15 employees
  • Sick leave must be shown on paystubs
  • Unused sick leave carries over to the following year (subject to caps)

For full text: https://www.akleg.gov/basis/statutes.asp#23.10.500


Next Steps

After successful implementation:

  1. ✅ Train admin staff on new payroll entry process
  2. ✅ Notify employees about paystub changes
  3. ✅ Set up quarterly reminders for IRS Form 941 filing
  4. ✅ Review and adjust vacation policies as needed
  5. ✅ Monitor sick leave accruals to ensure compliance

Document Version: 1.0 Last Updated: December 8, 2025 Implementation Date: _______________