Complete step-by-step user guide and system administration manual.
Welcome to the official user guide for PEYTS (Production Expense & Yield Tracking System). PEYTS is built on a lightweight, secure PHP MVC (Model-View-Controller) architecture using OOP design patterns.
Unlike standard software, PEYTS uses a **financial ledger** approach. Every batch workers produce and every expense paid for them acts as a double-entry transaction. This ensures that every Ugandan Shilling (UGX) earned, spent, or paid out can be audited.
The authentication system manages secure sessions and dynamically filters view panels based on user role assignments.
| System Role | Access Coverage |
|---|---|
| Owner | Full authorization: Reports, user logs, password resets, worker profile status toggles, deletion checks, and recovery bypasses. |
| Admin | Operational oversight: Registers workers, logs production batches, issues stock, approves payouts, views payroll reports. |
| Storekeeper | Inventory-focused: Exclusive stock-in/out registers. Cannot view wages, profit margins, or settle payroll cash lists. |
| Operator | Roster entry: Permitted only to enter daily production sheets. Cannot edit existing ledger balances or delete runs. |
If a user forgets their credentials, they can click "Forgot your password?" on the login page.
inactive via Settings. Inactive accounts are blocked from logging in. If already logged in, their active session is terminated instantly on their next click.
The dashboard aggregates real-time indicators for operational health.
The right sidebar displays a live feed of the latest 8 logs recorded in the system. This provides a clear log of who did what and when, ensuring transparency.
Manages the workforce directory and runs the Worker Intelligence Ledger.
When creating a worker, the system assigns a unique code (e.g. WRK-0001). If a worker is deactivated:
Each worker profile features a chronological ledger statement:
Tracks raw ingredients and inventory value. PEYTS utilizes the industry standard Weighted Average Cost (WAC) methodology.
When stock is purchased at different prices, the system dynamically recalculates unit valuation:
New WAC = (Current Stock Quantity × Current WAC) + (Incoming Quantity × Incoming Cost) ÷ (Current Stock + Incoming Stock)
The Product Types Catalog manages final products (e.g. Clay Bricks, Hollow Blocks, Cement Bags) and their corresponding units of measurement. These product classes are mapped directly into production entries to log yield.
The Production Entry Sheet records raw material consumption and workforce yield.
Tracks and logs wage payouts to settle outstanding worker balances.
The Reports dashboard displays operational performance metrics.
A detailed list showing total quantities of raw materials used, their average unit cost, and the exact material cost component per finished item unit.
The Payroll Report handles wage payouts and overall financial standings.
A centralized summary table shows all workers, their cumulative earnings, actual payments made, and their current **Ledger Balance**.
Settings allows the Owner to configure application parameters.
Organizes worker allowances, advances, and penalties. Deactivating a category hides it from future forms while keeping historical records intact.
PEYTS includes built-in safeguards to ensure data integrity.
To prevent conflicts when two users perform actions simultaneously, the database locks row updates (`FOR UPDATE`). In case of a temporary conflict, the system retries the request up to 3 times automatically with a random delay before returning an error.
The system checks that production records match: good_units + damaged_units == quantity_produced, values like wage cost are valid, and inventory counts do not fall below zero.
If a system disruption or manual database edit causes balances to get out of sync, administrators can run the following command on the server:
php reconcile.php --repair