Frontend
Voucher
Voucher Process

Voucher Process

Navigation Path

Voucher → Voucher Process


Voucher Process Page

URL

/voucher/voucher-process


Page Description

  • Displays voucher records for employees
  • Separates voucher records into multiple workflow statuses
  • Enables voucher processing, deletion, and workflow status tracking
  • Supports bulk operations on selected vouchers

1. Voucher Search Section

Search Fields

Field NameTypeDescription
EmployeeSearch / SelectFilter by employee (supports multiple selection)
ClientSearch / SelectFilter by client (supports multiple selection)
UnitSelect / CreateFilter by unit (supports multiple selection)
MonthDropdownSelect voucher month
YearDropdownSelect voucher year
TypeDropdownSelect voucher type (e.g., Travelling Allowance, Bonus Allowance)

2. Voucher Status Workflow Tabs

Status Tabs

The voucher process page displays different status tabs with counts:

Tab NumberStatusDescription
1UnprocessedVouchers not yet processed (count: 2)
2ProcessedVouchers that have been processed (count: 0)
3StoppedVouchers that have been stopped (count: 0)
4BranchVouchers sent to branch (count: 0)
5BillingVouchers sent for billing (count: 0)
6AccountVouchers sent to accounts (count: 0)
7Account VerifiedVouchers verified by accounts (count: 0)
8LockedVouchers finalized and locked (count: 0)

3. Voucher Records Table

Table Columns

Column NameDescription
S.NoSerial number with checkbox for selection
Employee CodeUnique employee identifier
Employee NameName of the employee
Head NameVoucher head/type (e.g., Travelling Allowance, Bonus Allowance)
ActionsAction icons (Delete, Settings)

Table Features

  • Bulk Selection: Checkbox in header to select all records
  • Individual Selection: Checkbox for each record
  • Search by Code: Filter functionality for Employee Code column
  • Column Filters: Filter icons available for each column
  • Pagination: Navigate through multiple pages of records

4. Action Buttons

Primary Actions

ActionButton ColorBehavior
ViewPurpleFetches and displays voucher records based on filters
ResetGrayClears all search filters and selections
Process SelectedGrayProcesses selected voucher records
Delete VoucherRedDeletes selected voucher records

Individual Row Actions

IconColorAction
DeleteOrange/RedDelete individual voucher record
SettingsOrangeEdit/Configure voucher settings

5. Export Functionality

  • Export Button: Located at top-right corner
  • Function: Export voucher records to file format
  • Icon: Download/Upload icon

6. Workflow Process

Step-by-Step Voucher Processing

  1. Create/View Vouchers

    • Use search filters to find specific vouchers
    • Click "View" to display matching records
  2. Unprocessed Status

    • New vouchers appear in "Unprocessed" tab
    • Select vouchers using checkboxes
  3. Process Vouchers

    • Click "Process Selected" button
    • Vouchers move from "Unprocessed" to "Processed" status
  4. Status Progression

    • Processed → Stopped (optional)
    • Processed → Branch → Billing → Account → Account Verified → Locked
  5. Delete Vouchers

    • Select voucher(s) using checkboxes
    • Click "Delete Voucher" button to remove records

7. User Interface Elements

Top Bar

  • User profile icon with "Admin" and "superAdmin" labels
  • Theme toggle (Dark/Light mode)
  • Search icon
  • Notifications bell icon

Search Section

  • Collapsible search panel
  • Multiple filter fields with clear/reset options
  • View and Reset buttons for search operations

Table Section

  • Responsive data table
  • Horizontal and vertical scrolling
  • Status-based tab navigation
  • Bulk action controls

8. Validation Rules

FieldValidation
EmployeeAt least one employee must be selected
MonthValid month must be selected
YearValid year must be selected
Selection for ProcessAt least one voucher must be selected
Selection for DeleteAt least one voucher must be selected

9. Success/Error Messages

ScenarioMessage TypeMessage
No records foundError"No records found matching the criteria." (shown in red banner)
Vouchers processedSuccessVouchers successfully processed
Vouchers deletedSuccessVouchers successfully deleted
No selectionWarningPlease select at least one voucher

10. Example Voucher Types

Common voucher head names include:

  • Travelling Allowance
  • Bonus Allowance
  • Medical Allowance
  • Conveyance Allowance
  • Special Allowance
  • Other custom allowance types

11. Best Practices

  1. Filter Before Processing

    • Always use filters to narrow down vouchers
    • Verify the correct month and year before processing
  2. Bulk Operations

    • Use "Select All" checkbox for bulk processing
    • Review selected items before confirming actions
  3. Status Tracking

    • Monitor voucher counts in each status tab
    • Ensure vouchers progress through proper workflow stages
  4. Data Verification

    • Verify employee and voucher details before processing
    • Use "View" to preview before taking actions

Field Definitions, Usage, and Calculation Logic

1. Technical Field Definitions

Field NameTechnical KeyData TypeDescription
Voucher IDvoucherIdObjectIdReference to the original record in the VoucherMaster collection.
Is Voucher FlagisVoucherBooleanCritical Identifier: Set to true to distinguish this record from regular salary data.
Processed StatusprocessedBooleanIndicates the voucher has been successfully converted into a salary-linked record.
Verification LevelvoucherVerifiedBooleanInitial verification flag (First stage).

2. Voucher-to-Salary Transformation Logic

When a voucher is "Processed," the system performs a complex data migration from the Voucher Entry stage to the Payroll Approval stage:

A. Collection Migration

  • Source: VoucherMaster (Entry data).
  • Destination: SalaryAutoProcess (Collection used for both regular salary and vouchers).
  • Identifier: Post-migration, the record is tagged with isVoucher: true to ensure it is handled by the Voucher Branch/Billing/Account modules instead of standard payroll reports.

B. The "Mock Attendance" Injection

Since the payroll engine requires attendance data to calculate statutory components (PF/ESI), the process stage injects a virtual 30-day "Mock Attendance" cycle.

  • Fixed Days: 30 (Month Days) / 30 (Attendance Days).
  • Purpose: This bypasses the need for manual attendance while enabling the system to trigger the pfCalculations.js and esiCalculations.js utilities.

3. Calculation Logic & Business Rules

A. Statutory Calculations (PF/ESI)

Unlike standard payroll, which has salary ceilings and monthly limits, Vouchers calculate PF/ESI on the full gross amount by default.

  • Formula: PF = Voucher Amount * (Unit PF %)
  • Formula: ESI = Voucher Amount * (Unit ESI %)
  • Restrictions: Standard PF/ESI caps (e.g., ₹15,000 or ₹21,000) are typically bypassed to ensure full reimbursement of expenses including statutory offsets.

B. Salary Head Mapping

The system maps the voucher's headId to the salaryHeads array within the new salary record.

  • If the voucher payAmount is modified, the system automatically refreshes the rate and amount for the corresponding head in the salary table.

C. Post-Process Lock

Once a voucher is successfully processed:

  • The original VoucherMaster record is updated with stopVoucher: true.
  • Future edits to the voucher must happen on the Processed record in this module, not the original entry page.

End of Documentation