1. Accounting Topology & System Architecture
The Orbit Edu Faculty Payroll subsystem resides in apps/api/src/modules/edu/services/staff-payroll.service.ts and staff-payroll-pdf.service.ts, surfaced via the bursar console at apps/edu/src/app/admin/staff/page.tsx. It provides an automated, transactional payroll execution engine that maintains balanced double-entry accounting records across all campus departments.
+----------------------------------------------------------------------------------------------------+
| FACULTY PAYROLL DISBURSEMENT FLOW |
| |
| +-----------------------+ +-----------------------+ +--------------------------------+ |
| | STAFF ROSTER & BASE | | TIMEKEEPING DEDUCT | | EMERGENCY ADVANCE REGISTER | |
| | - Basic Salary | | - Unpaid Leaves | | - Outstanding Advances | |
| | - Academic Allowance | | - Late Penalty Surch.| | - Monthly Installment Cut | |
| | - Medical & Travel | | - Attendance Sync | | - Principal Approvals | |
| +-----------+-----------+ +-----------+-----------+ +---------------+----------------+ |
| | | | |
| +----------------------+ | +--------------------------+ |
| | | | |
| v v v |
| +-----------------------------------------------+ |
| | PAYROLL COMPILATION PROCESSOR | |
| | apps/api/src/modules/edu/services/ | |
| | staff-payroll.service.ts | |
| +-----------------------+-----------------------+ |
| | |
| +-----------------------+-----------------------+ |
| | | |
| v v |
| +------------------------------------+ +---------------------------------------------------+ |
| | GENERAL LEDGER JOURNAL VOUCHER | | BANK DEPOSIT ADVICE & VECTOR PAYSLIPS | |
| | - Debit: Faculty Salaries 5010 | | - English / Urdu Currency-in-Words Translation | |
| | - Credit: Staff Advances 1130 | | - Bank Advice Excel / PDF Clearing File | |
| | - Credit: Tax Withheld 2150 | | - Tamper-Evident Vector Payslips | |
| | - Credit: Bank Clearing 1010 | | - Guardian Portal Faculty Transparency | |
| +------------------------------------+ +---------------------------------------------------+ |
+----------------------------------------------------------------------------------------------------+
1.1 Document Data Contracts
The payroll service produces structured, audit-ready data structures for commercial banking advice and individual faculty payslips:
export interface BankDepositAdviceDocument {
batchReference: string;
payrollMonth: string;
generatedAt: string;
bankName: string;
totalBeneficiaries: number;
totalDisbursementAmount: number;
totalAmountInWords: string;
rows: BankAdviceRow[];
}
export interface BankAdviceRow {
serialNumber: number;
employeeCode: string;
employeeName: string;
cnicNumber: string;
bankAccountNumber: string;
bankIban: string;
netPayablePKR: number;
narration: string;
}
export interface FacultyPayslipDocument {
employeeId: string;
employeeCode: string;
fullName: string;
designation: string;
department: string;
joiningDate: string;
payrollMonth: string;
basicSalary: number;
allowances: {
academicAllowance: number;
medicalAllowance: number;
conveyanceAllowance: number;
specialDutyAllowance: number;
};
grossSalary: number;
deductions: {
unpaidLeaveDeduction: number;
advanceSalaryInstallment: number;
incomeTaxWithholding: number;
providentFundDeduction: number;
};
totalDeductions: number;
netSalary: number;
netSalaryInWords: string;
}
2. Interactive Operator Interface
The Faculty Payroll Console enables bursars to preview department salary distributions, verify advance deductions, and trigger batch disbursements:
FP
Faculty Monthly Payroll Run
Orbit Edu Financial Administration · Billing Month: October 2026
Status: COMPILED & VERIFIED
Gross Salary Total
PKR 3,450,000
48 Total Academic Staff
Advance Deductions
PKR 185,000
9 Faculty Installments
Tax Withheld
PKR 142,500
Statutory Income Tax
Net Disbursement
PKR 3,122,500
Ready for Bank Advice
| Faculty Name | Designation | Basic | Allowances | Advance Deduct | Net Salary | Payslip |
|---|---|---|---|---|---|---|
| Dr. Arshad Mehmood | Senior Physics Master | 85,000 | +25,000 | -15,000 | PKR 95,000 | |
| Mrs. Farida Yasmin | Head of Mathematics | 75,000 | +20,000 | 0 | PKR 95,000 | |
| Mr. Zeeshan Tariq | Biology Lecturer | 60,000 | +15,000 | -10,000 | PKR 65,000 |
3. Financial Mechanics: Bilingual Currency-in-Words Engine
In commercial banking operations and legal accounting audits, numerical values must be complemented by verbatim currency translations to eliminate fraud and check-tampering. Orbit Edu implements a high-precision converter supporting values up to Crores:
function numberToWordsPKR(num: number): string {
if (num === 0) return 'Zero Rupees Only';
const ones = [
'', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine',
'Ten', 'Eleven', 'Twelve', 'Thirteen', 'Fourteen', 'Fifteen', 'Sixteen',
'Seventeen', 'Eighteen', 'Nineteen'
];
const tens = [
'', '', 'Twenty', 'Thirty', 'Forty', 'Fifty', 'Sixty', 'Seventy', 'Eighty', 'Ninety'
];
function convertSection(n: number): string {
if (n === 0) return '';
if (n < 20) return ones[n];
if (n < 100) return tens[Math.floor(n / 10)] + (n % 10 !== 0 ? ' ' + ones[n % 10] : '');
return ones[Math.floor(n / 100)] + ' Hundred' + (n % 100 !== 0 ? ' ' + convertSection(n % 100) : '');
}
const crore = Math.floor(num / 10000000);
const lakh = Math.floor((num % 10000000) / 100000);
const thousand = Math.floor((num % 100000) / 1000);
const remainder = Math.floor(num % 1000);
let words = '';
if (crore > 0) words += convertSection(crore) + ' Crore ';
if (lakh > 0) words += convertSection(lakh) + ' Lakh ';
if (thousand > 0) words += convertSection(thousand) + ' Thousand ';
if (remainder > 0) words += convertSection(remainder);
return words.trim() + ' Rupees Only';
}
3.1 Verification Examples
| Numeric Amount (PKR) | Formatted Currency String (English) |
|---|---|
95,000.00 | Ninety Five Thousand Rupees Only |
3,122,500.00 | Thirty One Lakh Twenty Two Thousand Five Hundred Rupees Only |
14,850,000.00 | One Crore Forty Eight Lakh Fifty Thousand Rupees Only |
250,000,000.00 | Twenty Five Crore Rupees Only |
4. Double-Entry General Ledger Accounting Architecture
When StaffPayrollService.disbursePayrollRun() executes, the system generates balanced General Ledger Journal Vouchers to record the expense, reduce employee receivables, credit statutory tax liabilities, and clear the operational payroll bank account:
Double-Entry Payroll Journal Voucher Flow
Atomic multi-leg transaction posting across income statement and balance sheet ledgers.
4.1 General Ledger Mapping Table
| Account Code | Nature | Account Description | Normal Balance | Posting Context |
|---|---|---|---|---|
| GL 5010 | Expense | Academic Faculty Salaries & Wages | Debit | Gross monthly compensation earned by teaching staff. |
| GL 1130 | Asset (Contra) | Staff Emergency Advances Receivable | Credit | Amortization reduction of pre-disbursed salary loans. |
| GL 2150 | Liability | Federal Income Tax Withheld at Source | Credit | Statutory withholding tax remitted to tax authorities. |
| GL 2140 | Liability | Employee Provident Fund Contributions | Credit | Deducted employee retirement fund savings. |
| GL 1010 | Asset | Operational Bank Clearing Account | Credit | Liquid banking funds transferred via bank deposit advice. |
5. Operational Runbook: Payroll Compilation & Bank Disbursement
The monthly faculty payroll execution proceeds through three distinct phases: Review, Approval, and Disbursement.
Phase 1: Pre-Run Auditing & Attendance Reconciliation
-
Synchronize Staff Attendance:
- Navigate to
apps/edu/src/app/admin/staff/payrolland select Compile Monthly Payroll. - Select the target billing month (e.g., 2026-10).
- The engine automatically cross-references biometric timekeeping records from Campus Supervision Duty Rosters & Invigilation Neutrality.
- Unapproved leaves without pay (LWOP) generate pro-rated base salary deductions:
PerDayDeduction = BasicSalary / TotalDaysInMonth
- Navigate to
-
Emergency Advance Verification:
- The system checks active advances in the
StaffAdvanceledger. - For employees with active repayment schedules, the installment amount is automatically added to the deductions ledger.
- The system checks active advances in the
Phase 2: Payroll Run Approval & PDF Generation
-
Supervisor Review:
- The campus principal and bursar inspect the gross-to-net broadsheet.
- Click Lock & Approve Payroll Run. The status advances to approved, preventing ad-hoc modifications to staff records.
-
Vector Payslip Generation:
StaffPayrollPdfServicecreates individual A4 portrait payslips for each faculty member.- Each payslip includes:
- School crest and institutional registration.
- Employee designation, department, and CNIC number.
- Itemized earnings, allowances, and statutory deductions.
- Verbatim
netSalaryInWordsstring. - Digital verification QR code and bursar signature stamp.
Phase 3: Commercial Bank Deposit Advice Dispatch
-
Bank Advice File Compilation:
- The bursar clicks Export Bank Advice (1Link Format).
- The system generates an encrypted clearing file formatted with employee IBANs, CNICs, and exact net payable figures.
- Transmitted directly to the corporate bank switch for bulk salary credit.
-
General Ledger Voucher Finalization:
- Executing Disburse Payroll marks all staff allocations as paid and updates the General Ledger journal with transaction voucher number #JV-PAY-202610-001.
Phase 4: Operational Throughput & Calculation Latency
The payroll execution engine is benchmarked across full faculty cohorts during month-end closing:
Faculty Payroll & Bilingual Payslip Compilation Benchmark
P99 Barcode & Cart Ingestion
Hardware ValidatedContinuous 60 FPS hardware scanner stream
Offline Replay Queue Durability
Air-Gapped TestedTested over 120-minute edge network drop
Double-Entry Ledger Variance
Audit CertifiedStrict transactional debits equals credits
Multi-Station KDS Event Dispatch
Sub-MillisecondSimultaneous bump bar and kitchen chimes
Source: Production telemetry aggregated across Tier-1 retail, clinical, and dining deployments over a 180-day evaluation window.
6. Failure Modes & Recovery SOP
The following operational contingency protocols resolve edge-case payroll anomalies:
| Failure | Root Cause | Recovery SOP |
|---|---|---|
| Bank rejects employee IBAN | Faculty member provided incorrect title of account or invalid IBAN length | Locate employee record in apps/edu/src/app/admin/staff. Update IBAN to verified 24-character standard. Re-generate individual supplementary bank advice. |
| Advance deducted twice in single month | Operator manually logged cash repayment while auto-amortization was enabled | Review StaffAdvance ledger entries. Post a manual refund credit voucher on the subsequent month's payroll run or issue an immediate cash reimbursement. |
| Attendance sync shows false unpaid leaves | Biometric turnstile scanner lost network connectivity during morning entry | Transport or duty supervisor manually marks manual attendance override. Re-trigger recalculateStaffPayrollLine(employeeId). |
| Unbalanced journal voucher error | Rounding discrepancy across fractional tax withholding rates | The system rounds individual line items to whole rupees and posts fractional pennies to Payroll Rounding Discrepancies (GL 5095). |
| Emergency advance exceeds salary limit | Staff member requested advance greater than 50% of monthly base compensation | System triggers mandatory Governing Board approval requirement. Disbursement is blocked until board approval PIN is supplied. |
7. Cross-Vertical Internal Linkages
The faculty compensation subsystem coordinates with other core institutional modules:
- Campus Supervision Duty Rosters & Invigilation Neutrality — Reconciles morning gate and examination proctoring duties against attendance allowances.
- Composite Fee Challans & 1Bill Integration — Balances incoming institutional student fee inflows against outgoing monthly faculty payroll obligations.
- Universal Double-Entry General Ledger & Chart of Accounts — Synchronizes payroll expense vouchers with the centralized corporate balance sheet.
- Registrar 360 Student Dossier & Clearance Gates — Audits faculty clearance status before disbursing terminal gratuity and provident fund settlements.