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:
- Select Pay Group
- Enter Annual CTC
- Choose calculation type per component
- Adjust percentages / fixed values
- Optionally enable one-time earnings
- Enter Bonus (if enabled)
- Review computed values
- 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
- Apply Bonus (if enabled)
- Compute Adjusted CTC
- Calculate Basic
- Calculate % based components
- Calculate Flat components
- Compute Fixed Allowance
- Validate totals
- Compute Final CTC
Cost to Company Formula
Final CTC:
Cost to Company = Fixed CTC + One-Time Earnings
First-Time Setup Guide
For new organization:
- Create Pay Groups
- Create Salary Components
- Assign Components to Pay Group
- Enable Payroll
- 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.