Frontend
Voucher
Pay Voucher

Pay Voucher

Navigation

Voucher → Pay Voucher


URL

/voucher/pay-voucher


Description

The Pay Voucher Module manages employee reimbursement vouchers from creation to final account verification.
It follows a structured approval workflow involving Pay Voucher → Process → Branch → Billing → Accounts.


Purpose

  • Create reimbursement vouchers for employees
  • Assign reimbursement heads
  • Manage voucher records (Edit / Delete)

Voucher Entry Form

FieldDescription
Employee CodeSelect employee
Employee NameAuto-filled
UnitSelect or create unit
DesignationAuto-filled
MonthVoucher month
YearVoucher year

Reimbursement Head Section

If no reimbursement head is mapped:

No Reimbursement Head Found

Table Columns

ColumnDescription
S.NoSerial number
Head NameReimbursement head
Pay AmountAmount payable
PF GrossPF applicable amount
PFPF deduction
EPFEPF deduction
ESI GrossESI applicable amount
ESIESI deduction
ESI EMREmployer ESI
Other DeductionAdditional deduction

Actions

ButtonFunction
SaveSave voucher
ResetClear form

Voucher Records for Employee

Displayed after saving or selecting employee.

Table Columns

ColumnDescription
S.NoSerial number
MonthVoucher month
YearVoucher year
Employee CodeEmployee code
Employee NameEmployee name
Head NameReimbursement head
Net AmountNet payable
ActionsEdit / Delete

API Endpoints

The Pay Voucher Master module interacts with the following API endpoints:

Base URL

export const PAYVOUCHER_URL = '/api/voucherMaster'

Endpoints

EndpointMethodDescriptionParameters/Body
${PAYVOUCHER_URL}POSTCreate a new voucherBody: data
${PAYVOUCHER_URL}GETGet all vouchers with paginationQuery: page, limit
${PAYVOUCHER_URL}/:voucherIdGETGet voucher by IDPath: voucherId
${PAYVOUCHER_URL}/:voucherIdPATCHUpdate an existing voucherPath: voucherId, Body: body
${PAYVOUCHER_URL}/delete/:voucherIdPATCHDelete a voucher (soft delete)Path: voucherId
${PAYVOUCHER_URL}/importPOSTImport vouchers from ExcelBody: data (file)
${PAYVOUCHER_URL}/exportPOSTExport vouchers to ExcelBody: data (export criteria), Returns: Excel file (blob)
${PAYVOUCHER_URL}/searchPOSTSearch vouchers with filtersBody: data (search criteria)
${PAYVOUCHER_URL}/processPOSTProcess vouchersBody: data (process criteria)
${PAYVOUCHER_URL}/bulk-deletePOSTBulk delete vouchersBody: data (array of voucher IDs)
${PAYVOUCHER_URL}/import/from-exported-sheetPOSTImport vouchers from exported sheetBody: data (file)

RTK Query Hooks

The following hooks are available for frontend integration:

  • useCreateVoucherMutation
  • useGetAllVouchersQuery
  • useGetVoucherByIdQuery
  • useUpdateVoucherMutation
  • useDeleteVoucherMutation
  • useImportVouchersFromExcelMutation
  • useExportVouchersToExcelMutation
  • useSearchVouchersMutation
  • useProcessVouchersMutation
  • useBulkVoucherDeleteMutation
  • useImportVouchersFromExportedSheetMutation

Field Definitions, Usage, and Calculation Logic

The Pay Voucher module manages non-salary reimbursements and specialized payments. It features a technical calculation engine that integrates statutory deductions (PF/ESI) directly into the voucher lifecycle.

1. Field Definitions

Field NameTechnical NameCategoryDescription
Pay AmountpayAmountFinancialThe gross reimbursement amount entered by the user.
PF Detailpf / pfGrossStatutoryEmployee PF contribution and the portion of pay attracting PF.
ESI Detailesi / esiGrossStatutoryEmployee ESI contribution and the portion of pay attracting ESI.
Total Ded.totalDeductionsFinancialSum of PF, ESI, and other manual deductions.
Net PaynetPayFinancialFinal payable amount after all deductions are applied.
VerifiedvoucherVerifiedWorkflowInitial processing/verification flag.
Branch OKvoucherBranchVerifiedWorkflowBranch-level approval status.
Accounts OKvoucherAccountsVerifiedWorkflowFinal finance clearance status.

2. Field Usage & Business Rules

A. Voucher Creation Scope

  • The Pay Voucher page is dedicated to the initial creation and entry of reimbursement data.
  • Workflow Note: Once a voucher is saved, it must be verified and approved through the following dedicated modules in sequence:
    • Voucher Process: Initial verification.
    • Voucher Branch: Branch-level approval.
    • Voucher Billing: Billing/Cost center check.
    • Voucher Accounts: Final financial clearance.

B. Employee Status Restriction

  • The system includes a Pre-Save Guard that prevents voucher creation for employees marked with a "Left" status (leftStatus: 'Y'). This prevents accidental payments to exited staff.

C. Auto-Recalculation

  • The recalculateHead flag is set to true by default. This ensures that any change to the payAmount automatically triggers a refresh of the statutory (PF/ESI) calculations using the latest unit configuration during the entry stage.

3. Calculation Logic

A. The "Mock Attendance" System

To satisfy the requirements of the core statutory engine, the system generates a Mock Attendance record for every voucher:

  • Virtual Cycle: Fixed as a 30-day period.
  • Purpose: Allows the PF/ESI utilities to calculate contribution percentages based on the employee's master settings even outside the regular monthly salary process.

B. Financial Formulas

  • Deduction Total: totalDeductions = round(pf + esi + otherDeductions).
  • Net Calculation: netPay = round(payAmount - totalDeductions).
  • Rounding: All financial results are passed through the roundAmount utility to ensure zero decimal discrepancies for bank transfers.

C. Voucher-Specific Statutory Rules

  • The system uses calculatePFForVoucher and calculateESIForVoucher.
  • Unlike regular salary heads, these utilities typically calculate contributions on the Full Gross of the voucher without applying the standard monthly capping limits (unless specifically configured in the unit master).

End of Documentation