Payslip Entry

Payslip Entry

Create an individual employee payslip. This is where formulas are evaluated and all salary components are calculated.

How to Create

  1. Select the Employee
  2. Set the Pay Period (month/year)
  3. The system loads the salary components from the employee's salary structure
  4. Formulas are evaluated automatically for each component (see below)
  5. Review earnings and deductions
  6. Adjust any variable elements (overtime, bonuses) if needed
  7. Click Process Payslip

How Formula Evaluation Works

When a payslip is generated, the system:

  1. Determines the employee's Basic Salary
  2. Loads attendance data (working days, days worked, overtime hours, absences)
  3. Sets up the formula context with all built-in variables:
VariableSource
BASICEmployee's base salary for the period
GROSSBasic + cumulative earnings (updated after each component)
DAYS_WORKEDFrom attendance records
WORKING_DAYSCalendar working days minus holidays/weekends
OVERTIME_HOURSFrom attendance records
UNPAID_LEAVE_DAYSAbsent days from attendance
HOURLY_RATEBASIC / WORKING_DAYS / 8
  1. For each salary component (in display order):
  2. * If Amount Type = Fixed: uses the defined amount directly
  3. * If Amount Type = % of Basic: calculates amount x BASIC / 100
  4. * If Amount Type = % of Gross: calculates amount x current GROSS / 100
  5. * If Amount Type = Formula: evaluates the formula expression
  6. * If Amount Type = Attendance Based: prorates amount by days worked / working days
  7. * After each earning, GROSS is recalculated (cascading)
  8. After all salary components: adds automatic deductions (attendance deduction, income tax, statutory deductions, loan repayment)
  9. Calculates Net Salary = Total Earnings - Total Deductions

Formula Audit Trail

The exact formula text used for each payslip line is recorded in the payslip details. This provides a complete audit trail showing which formula was evaluated for each component, even if the formula is later changed.

Payslip Components

  • Earnings - Basic salary, allowances, overtime, bonuses
  • Deductions - Tax, insurance, loans, pension, attendance deductions
  • Net Pay - Total earnings minus total deductions

See Also