Skip to main content

Salary Details

The Salary Details module allows HR/Admin users to:

  • Configure employee salary structure
  • Define CTC (Cost to Company)
  • Manage salary components
  • Add deductions
  • Include one-time earnings (bonus)
  • Generate salary structure PDF
  • View salary breakdown (monthly & annual)

This module is part of the Payroll system.

Prerequisites​

Before using Salary Details:

1️⃣ Payroll Must Be Enabled​

Payroll middleware:

middleware: ["auth", "is-payroll-enabled"]

If payroll is disabled:

  • Salary configuration will not be accessible.

2️⃣ Required Setup​

The following must exist:

  • Pay Groups
  • Salary Components
  • Earnings Components
  • Deduction Components (optional)

Without pay groups, salary cannot be configured.

Salary Details Overview​

Employee → Salary Details

Displays:

  • Annual CTC
  • Monthly CTC
  • Earnings Breakdown
  • Fixed Allowance
  • Bonus (if included)
  • Other Deductions
  • PDF print option

Salary Structure Breakdown​

Salary is divided into:

1️⃣ Annual CTC​

Total yearly compensation.

2️⃣ Monthly CTC​

Annual CTC ÷ 12

Salary Components​

Components are grouped into:

Earnings​

Includes:

  • Basic
  • HRA
  • Special Allowance
  • Other earnings
  • Fixed Allowance
  • Bonus (optional)

One-Time Earnings​

If enabled:

  • Bonus added separately
  • Fixed CTC adjusted as:
Fixed CTC = Annual CTC - Bonus

Fixed Allowance​

Automatically calculated as:

Fixed Allowance = Adjusted CTC - Sum of all other earnings

If Fixed Allowance becomes negative:

  • System blocks save.
  • Shows error: "Fixed allowance cannot be negative"

Calculation Types​

Each salary component supports:

1️⃣ Percentage​

  • Basic → % of CTC
  • Others → % of Basic

Example:

  • Basic = 40% of CTC
  • HRA = 50% of Basic

2️⃣ Flat Amount​

User enters fixed monthly amount.

System calculates:

Annual = Monthly × 12

Salary Configuration Flow​

When clicking Add Salary:

  1. Select Pay Group
  2. Enter Annual CTC
  3. Choose calculation type per component
  4. Adjust percentages / fixed values
  5. Optionally enable one-time earnings
  6. Enter Bonus (if enabled)
  7. Review computed values
  8. Click Save

Automatic Calculations​

System automatically computes:

  • Annual amounts
  • Monthly amounts
  • Fixed allowance
  • Adjusted CTC
  • Cost to Company summary

Salary PDF​

If salary exists:

User can click:

🖨 Print Icon

This:

  • Generates salary structure PDF
  • Opens preview modal
  • Allows download

Adding Deductions​

From Salary Details screen:

Click:

Add → Deductions

Opens deduction modal.

Deduction Types​

Each deduction may be:

  • Fixed amount
  • Percentage of Basic

Supports:

  • End condition (target amount)
  • Tracking deducted amount till date

Example:

₹ 5,000 of ₹ 50,000 deducted

Edit Deduction​

Admin/HR can:

  • Edit deduction
  • Update amount
  • Modify percentage
  • Update end condition

Delete Deduction​

Allowed when:

  • User is Admin/HR
  • Deduction exists

Confirmation required before deletion.

Salary Components Logic​

Components are grouped by:

sub_type

Examples:

  • BASIC
  • HRA
  • FIXED_ALLOWANCE
  • BONUS

System ensures:

  • Only one component per sub_type active
  • Correct dependency order
  • Percentage recalculation on changes

Salary Calculation Order​

  1. Apply Bonus (if enabled)
  2. Compute Adjusted CTC
  3. Calculate Basic
  4. Calculate % based components
  5. Calculate Flat components
  6. Compute Fixed Allowance
  7. Validate totals
  8. Compute Final CTC

Cost to Company Formula​

Final CTC:

Cost to Company = Fixed CTC + One-Time Earnings

First-Time Setup Guide​

For new organization:

  1. Create Pay Groups
  2. Create Salary Components
  3. Assign Components to Pay Group
  4. Enable Payroll
  5. Configure Employee Salary

Example Calculation

If:

  • Annual CTC = ₹12,00,000
  • Bonus = ₹1,00,000
  • Basic = 40%
  • HRA = 50% of Basic

Then:

Adjusted CTC = ₹11,00,000
Basic = ₹4,40,000
HRA = ₹2,20,000
Remaining = Fixed Allowance

Best Practices​

  • Keep Basic between 35–50%
  • Avoid negative fixed allowance
  • Clearly define pay group logic
  • Review deduction end conditions
  • Regularly audit salary structures

Summary​

Salary Details module provides:

  • Structured payroll configuration
  • Dynamic component calculation
  • Flexible pay group support
  • Deduction management
  • Bonus inclusion
  • PDF export
  • Role-based control

It ensures accurate and controlled salary management across the organization.