Audit Trail
Audit Trail Module - User Guide
π‘οΈ Business Impact
The Audit Trail module is your system’s “Black Box” recorder. Implementing this module ensures 100% data accountability, helping you identify unauthorized changes instantly and providing ironclad evidence for statutory audits (ISO, Tax, SOX). It turns “I didn’t do it” into “Let’s check the trail.”
β‘ Quick Start: 2-Minute Setup
For administrators who need to activate or check the trail:
- Enable: In System Parameters, ensure the parameter
AuditTrailis set to “Yes” (the Company Details page also displays the current activation status). - Action: Perform any master or transaction edit/deletion (e.g., Modify a Party, Voucher, Bill, or Invoice).
- Note: When prompted, enter a mandatory justification in the “Reason to Modify” / “Audit Trail Notes” field.
- View: Navigate to System Tools > Audit Trail (
/audittrailindex) to inspect the timestamped logs, drill down into granular changes, or export reports to Excel.
πΊοΈ Process Flow: Logging to Forensic Analysis
graph TD
Trigger["User Modifies or Deletes Record"] --> Check{"Is Audit Trail Enabled in System Parameters?"}
Check -- Yes --> Prompt["Mandatory 'Reason to Modify' Prompt"]
Prompt --> Save["Record Saved + Audit Trail Entry Logged"]
Check -- No --> SimpleSave["Record Saved (Standard Save Without Audit Log)"]
Save --> Index["View Audit Trail Index (/audittrailindex)"]
Index --> Details["Drill-Down: Field-Level Changes (/audittraildetails/{id})"]
Index --> Export["Export Forensic Report to Excel (/audittrailxloption)"]
style Save fill:#d4edda,stroke:#28a745,stroke-width:2px
style Details fill:#cce5ff,stroke:#004085,stroke-width:1pxβ Prerequisites Checklist
Before you can effectively use the Audit Trail module, ensure:
- System Parameter: The parameter
AuditTrailhas its condition set to “Yes” in System Parameters. (If set to “No”, the index screen displays an advisory notice to contact your System Administrator, and Excel export is deactivated). - User Role Permissions: Assigned roles have
AuditTrailDetailspermission (for index and drill-down views) andAuditTrailReportpermission (for Excel report generation). - Active Financial Year: For Excel exports, document dates fall within the active fiscal year date range.
1. Introduction π
The Audit Trail module is a specialized forensic tool designed to maintain a transparent history of every significant action within the ERP. It captures the “Who, What, When, and Why” of every data change.
In the overall business flow:
- It runs in the background of transactions and masters (Sales Invoices, Bills, Journal Vouchers, Accounts, Debit/Credit Notes, Party Masters).
- It acts as a mandatory checkpoint requiring user justification during modifications and deletions.
- It serves as the primary source of truth for Internal and External Compliance Audits.
Typically, this module is used by Compliance Officers, Internal Auditors, Finance Heads, and System Administrators to ensure complete transparency and data integrity.
2. Getting Started with Audit Trail π
Accessing the Module
Navigate to System Tools > Audit Trail (/audittrailindex) from the main navigation menu.
The Index Page
The Index Page provides a searchable, filterable overview of all captured events:
- Audit Trail No.: A unique reference number for every log entry. Click this number to open the full drill-down view.
- Doc Type: The functional module or document involved (e.g., Accounts, Bill, Debit Credit, Invoice, Party Master, Voucher).
- Year/Doc No: Links the entry to the document’s fiscal year and serial number (formatted as
YYYY-YY/XXXXXX). Entries affecting mass records appear as"Bulk Operation". - Operation: Distinct color-coded status chips indicating the nature of the event:
Re-Create(Green Chip): Document re-creation or initial insertion.Modify Main/Modify Line(Amber Chip): Edits to header data or item line rows.Delete Main/Delete Line(Red Chip): Permanent removal of headers or line entries.
- Performed By: User avatar showing the operator’s first initial alongside their login username.
- Performed Date: Exact timestamp (
dd-MMM-yy HH:mm) paired with a relative time indicator (e.g., “just now”, “15 mins ago”, “2 hours ago”, “3 days ago”).
AuditTrail parameter is inactive (N), the bottom of the grid displays:To enable this feature, please contact the System Administrator. and the Export To Excel button remains hidden.3. Drill-Down: Field-Level Audit Details π
Clicking any Audit Trail No. opens the Audit Trail Details page (/audittraildetails/{id}), structured into three dedicated cards:
A. General Information
Displays top-level document tracking metadata alongside the colored operation badge:
- Audit Trail No: System sequence identifier.
- Doc Type: Source transaction type.
- Year/Doc No: Fiscal year and voucher number.
B. Execution Details
Captures operator accountability:
- Performed By: User avatar and username of the operator who executed the change.
- Performed Date: Exact date and time stamp (
dd-MMM-yy HH:mm). - Notes: The mandatory explanation submitted by the user when saving the modification or deletion.
C. Field-Level Changes
Features multi-expansion accordion panels organized by document level:
Main Level Changes: Changes affecting the master/header record.Line Level Changes 1,Line Level Changes 2, etc.: Granular changes affecting individual line-item rows.
Each panel contains a detailed comparison table:
| Column | Description | Visual Appearance |
|---|---|---|
| Field | User-friendly name of the attribute | Bold text (DisplayName) |
| Old Value | Value before the change | Muted secondary color |
| New Value | Value after the change | Bold green text |
| Source | Originator of the update | Displays "User" or "System" |
4. Export to Excel (/audittrailxloption) π
For external audits or offline forensic reviews, authorized users can download an audit report:
- Click the green Export To Excel button on the Audit Trail index.
- Select the From Date and To Date:
- Use the built-in “Today” quick-action button in each date picker for immediate selection.
- Date Boundary Lock: Dates are automatically restricted to the active financial year (
fyStarttofyEnd) and cannot be selected into the future (dt > DateTime.Now).
- Click Print to generate the spreadsheet.
- The system produces a formatted file named
Audit_Trail_Report.xlsx:- Company name, report title, generation date, and selected date range in the header.
- Columns include:
Trail No,Document Type,Document Level,Year,Ref No/Code,Operation(INSERT / UPDATE / DELETE),Field Name,Old Value,New Value,User,Date & Time, andNotes. - Frozen header row, autowidened columns, and text-wrapping enabled on change values and notes for clean printing.
5. Validations and Business Rules β οΈ
| Validation / Condition | Trigger Point | System Rule & Feedback |
|---|---|---|
| Mandatory Audit Notes | Modifying or deleting any existing record while Audit Trail is active. | Cannot save if left blank. Shows validation error: "Audit Trail Notes must be filled". |
| Invalid Date Range | Exporting Audit Trail where To Date < From Date. | Blocks generation and displays: "Invalid Date Range". |
| Fiscal Year Boundaries | Selecting dates outside active fiscal year or in the future. | Date picker disables invalid dates (dt < fyStart || dt > fyEnd || dt > DateTime.Now). |
| Inactive System Parameter | Accessing index while parameter AuditTrail is set to "N". | Disables Excel export button and displays: “To enable this feature, please contact the System Administrator.” |
| Access Control (Views) | Accessing index or details without AuditTrailDetails role. | System redirects immediately to /accessdenied/1. |
| Access Control (Report) | Accessing Excel options without AuditTrailReport role. | System redirects immediately to /accessdenied/1. |
| Session Integrity | Accessing pages with mismatched browser session. | Redirects immediately to /invaliduser/5. |
6. Pre-Settings and Configurations βοΈ
- System Parameters:
- Navigate to System Tools > Utilities > System Parameters.
- Locate the parameter with Short Name
AuditTrail. - Set Sys Condition to
Yesto enforce logging and mandatory reason prompts across the ERP.
- Company Master / Details:
- Review Company Details (
/companymstdetails) to verify that Enable Audit Trail Feature reflects “Yes”.
- Review Company Details (
- User Group & Role Management:
- Under User Group Management, allocate
AuditTrailDetailsto auditors, department heads, and managers who need to inspect logs. - Allocate
AuditTrailReportto users authorized to export audit files.
- Under User Group Management, allocate
7. Best Practices & Operational Tips π‘
- Meaningful Justifications: Encourage staff to provide precise reasons (e.g., “Rate revised as per Vendor Email ref #482 dated 14-Oct”) rather than vague words like “Updated” or “Corrected”.
- Regular Deletion Audits: Periodically filter the index for the red Delete Main and Delete Line chips to investigate unexpected record purges and safeguard against accidental data loss.
- Cross-User Verification: When reviewing discrepancies in financial vouchers, inspect the Performed By user on line modifications to see if someone other than the original creator revised values.
- Archival Compliance: Generate and save quarterly Excel exports to your internal document repository as permanent audit trail evidence for statutory and ISO compliance.
8. Critical Observations π
- Immutable Logs: Once recorded, audit trail entries cannot be modified, deleted, or cleared by any user, including System Administrators.
- Selective Property Tracking: The forensic engine tracks only specific business-critical fields defined in the system metadata, eliminating noise from system maintenance timestamps and display flags.