Skip to main content

Payroll

Introduction

The Payroll module is the operational core of Damsy ERP for workforce administration. It covers organizational masters, employee lifecycle, attendance integration, monthly salary processing, statutory filings, and management information reports. Most companies treat Payroll as the system of record for employees, units, and compensation.

Purpose

Payroll exists to let HR and finance teams:

  • Maintain company, branch, client, and unit structure
  • Manage employee records, increments, leave balances, and PF/ESI identifiers
  • Run site-wise salary calculation and payment workflows
  • Produce statutory returns and internal MIS through Crystal Reports
  • Close employment through full-and-final settlement

When to Use

Use Payroll when you need to:

  • Configure or update organizational masters before transactional work
  • Process monthly salary for deployed staff at client units
  • Generate PF, ESI, professional tax, or income tax outputs
  • Reconcile attendance before payment
  • Handle arrear, bonus, or bank upload payment batches
Prerequisite data

Payroll assumes masters (units, designations, banks) and often approved attendance from the Attendance module are in place before salary process runs.

Overview / Architecture

Payroll is an MVC Area (Areas/Payroll) with a modern sidebar layout. The dashboard aggregates KPIs through PayRollDashBoard_DAL, which calls stored procedures scoped by Session["CompID"] and the default payroll period (StartMonth / StartYear).

Entry URL: /Payroll/PayrollDashboard/Index
PageID: Payroll
Styles: payroll-modern.css, payroll-dashboard.css, sidebar-unified.css

Controllers

Feature groups are implemented as separate MVC controllers under Areas/Payroll/Controllers/.

Dashboard

ControllerPrimary responsibility
PayrollDashboardModule home, KPI tiles, quick navigation

Masters

ControllerPrimary responsibility
CompanyConfigurationCompany-level payroll settings
BranchBranch master
ClientClient master
ClientSegmentMasterClient segmentation
UnitUnit / site master
UnitParameterUnit-level parameters
DepartmentDepartment master
DesignationDesignation master
BankBank master
StateMasterState reference data
HolidayMasterHoliday calendar
MinimumWageMasterMinimum wage tables
IncomeTaxSlabIncome tax slabs
ESIChallanGroup / ESIZoneMasterESI configuration
PFChallanGroupPF challan grouping
RecruitmentFee / RecruitmentFeeMasterRecruitment fee setup

Employee

ControllerPrimary responsibility
EmployeeEmployee master CRUD
SearchEmployee search
EmployeeIncrementIncrement processing
HRManagementHR operations
SiteJoinLeaveProcessSite join / leave
LeaveBalanceEntryLeave balance maintenance
PFESIUANEntryPF/ESI UAN entry
PFSettlementDetailPF settlement
FullandFinalSettlementFull and final
AWLLetterAWL letter documents

Process

ControllerPrimary responsibility
AttendancePayroll-side attendance views
SalaryVerificationPre-process verification
SalaryProcessPaymentStatusProcess and payment status
ArrearBonusProcessArrear and bonus runs
CreateCashPaid / CreateCashPaidBankUploadCash / bank payment
ExcelUploadFormBulk Excel uploads
UnitRateRevisionUnit rate revisions
ITaxComputationIncome tax computation
ProfessionalTaxProfessional tax processing

Reports

ControllerPrimary responsibility
PayRollMisReportInternal payroll MIS (Crystal)
PayRollStatutoryReportStatutory reports (Crystal)

Views / Layout

AssetLocation / role
Module layoutAreas/Payroll/Views/Shared/_LayoutPayroll.cshtml
Dashboard viewsAreas/Payroll/Views/PayrollDashboard/
Shared shell_SidebarBrand, _SidebarMenuSearch (root Shared)
Report viewers.aspx pages under Payroll Area linking .rpt files

Pages render inside the flat topbar + sidebar shell used by other modern modules.

DAL

Payroll data access lives under DAL/Payroll/ and related employee namespaces. Representative classes:

DAL classTypical use
PayRollDashBoard_DALDashboard KPIs and summary lists
Employee_DAL / EmployeeSearch_DALEmployee CRUD and search
Process_DALSalary process operations
EmployeeAttendance_DALAttendance integration
CreateCashPaid_DAL / CreateBankTransfer_DALPayment disbursement
ITaxComputation_DALTax computation
BranchMaster_DAL, Client_DAL, UnitMaster_DALMasters

Each DAL method builds SqlParameter[] arrays and invokes stored procedures through BaseHelper using MyConnectionString.

Business Objects

Primary namespace: BO.Payroll

BO typeRole
PayRollDashBoard_BODashboard metrics
Employee_BO (via Employee domain)Employee payload
UnitMaster_BO, Client_BO, BranchMaster_BOOrganizational masters
EmployeeAttendance_BOAttendance rows
SalaryPaymentStatus_BOPayment status tracking
CreateCashPaid_BOPayment batch data

Controllers populate BO instances with CompID from session before calling DAL methods.

Typical Workflow

Monthly payroll from attendance through payment:

Data Flow

  1. User selects company at login → Session["CompID"] set.
  2. Dashboard loads via PayrollDashboardControllerPayRollDashBoard_DAL → read SPs filtered by company and period.
  3. Process screens post form data into BO objects → write SPs (InsertUpdate*, process SPs).
  4. Reports read processed salary tables → Crystal viewer renders PDF/print output.

All writes are company-scoped; cross-company leakage is prevented at the SP layer when parameters include CompID.

Reports

Report groupDeliveryNotes
PayRollMisReportCrystal .aspx viewersInternal analytics, unit-wise sheets
PayRollStatutoryReportCrystal .aspx viewersPF, ESI, PT, tax statutory outputs
Excel exportsClosedXML (select screens)Bulk downloads where implemented

Crystal runtime 13.0.2000.0 must be installed on the application server.

Permissions

GateRequirement
Module flagdtVerifyUser.Payroll == true
SessionValid CompID on every action
Menu permissionsGetDataUserPermissions for individual screens
VerificationSalary payment may require Verification approval
if (string.IsNullOrEmpty(Convert.ToString(Session["CompID"])))
return RedirectToAction("UserLogin", "Login", new { Area = "" });

Common Issues

SymptomLikely cause
Empty dashboard tilesMissing SP data or wrong payroll period in session
Salary process failsUnapproved attendance or open verification batch
Crystal report errorCR runtime missing or .rpt not published
Employee not in listUnit permission or inactive employee flag

Important Notes

Shared employee master

Root EmployeeMController opens from Payroll with Session["Module"] set. Registration uses the same controller with MID=Registration.

Period defaults

StartMonth and StartYear from login drive default filters. Confirm the period before running process screens.

Common Mistakes

MistakeConsequence
Running salary process before attendance approvalIncorrect payable days
Skipping verification when enabledPayment blocked or non-compliant
Editing masters mid-processOrphaned rate or unit references
Assuming menu visibility equals module flagUser may deep-link without menu rows

Next Steps

  1. Confirm organizational masters for the target company.
  2. Validate attendance approval for the payroll month.
  3. Walk through verification (if enabled) before payment.
  4. Run statutory MIS on a test unit before company-wide close.