Business Intelligence Module
Report Management
Report Management provides operational, financial, and audit reporting for inventory decisions. It combines stock, sales, purchase, due, return, profit, transfer, accounting, and audit data in filterable report screens.
Part A: Non-Technical User Guide
1. Report Menu Coverage
Report What It Gives You
Stock Summary High-level current stock value and quantity view.
Daily / Monthly Sales Sales trend by day or month with invoice count and totals.
Daily / Monthly Purchase Purchase trend by day or month with quantity and totals.
Supplier Report Supplier-wise purchase volume, paid/due, and invoice patterns.
Stock By Category Category-wise in-stock quantity, purchase value, selling value.
Sale By Category Category-wise sales contribution and quantity sold.
Due Payments Pending customer/supplier dues by filter and period.
Product Ledger Product-level movement history and transaction trace.
Timesheet & Cash Handover Shift/cash handover report by cashier and date.
Product Return Verification Validate returned item records with invoice and user trace.
Profit Margin Report Profit analytics by category/product and cost basis.
Stock Transfer Report Warehouse transfer totals and itemized transfer history.
Sell Return Log Historical sales return activities and return approvals.
Expire Product Report Expired/expiring stock with days-left visibility.
Accounting Report Cash in/out ledger, method breakdown, aging, balances.
Audit Logs System activity trace for accountability and security review.
2. How To Use Reports Effectively
Select report by business question (stock, sales, due, profit, audit).
Apply filters: date range, warehouse, category, user/cashier, status.
Validate totals with summary cards/rows.
Export/copy/print for meetings and accounting handover.
Use weekly trend comparison to detect anomalies early.
3. Recommended Weekly Report Routine
Start with Stock Summary + Stock By Category.
Review Daily/Monthly Sales vs Purchase trend gap.
Check Due Payments and collect risk invoices.
Review Profit Margin (category and product mode).
Check Expire Product and Sell Return Log for leakage control.
Finalize with Accounting Report and Audit Logs.
Part B: Technical Reference (CodeCanyon Ready)
1. Frontend Report Pages
frontend-source/src/pages/reports/StockSummaryReport.jsx
frontend-source/src/pages/reports/DailyMonthlySales.jsx
frontend-source/src/pages/reports/DailyMonthlyPurchase.jsx
frontend-source/src/pages/reports/SupplierReport.jsx
frontend-source/src/pages/reports/CategorywiseStock.jsx
frontend-source/src/pages/reports/CategorywiseSales.jsx
frontend-source/src/pages/reports/payments-reports/DueInvoiceReport.jsx
frontend-source/src/pages/reports/products/ProductLadger.jsx
frontend-source/src/pages/reports/shifting/TimesheetReport.jsx
frontend-source/src/pages/reports/ProductReturnVerification.jsx
frontend-source/src/pages/reports/ProfitMarginReport.jsx
frontend-source/src/pages/reports/StockTransferReport.jsx
frontend-source/src/pages/reports/SellReturnLog.jsx
frontend-source/src/pages/reports/ExpireProductReport.jsx
frontend-source/src/pages/reports/AccountingReport.jsx
2. Backend Controllers and Services
app/Http/Controllers/Api/ReportController.php + app/Services/Api/ReportControllerService.php
app/Http/Controllers/Api/StockTransferController.php + app/Services/Api/StockTransferService.php (transfer report)
app/Http/Controllers/Api/AuditLogController.php + AuditLogService
3. Report API Endpoints Map
Endpoint Use
GET /api/v1/daily/monthly/sale/reportDaily/monthly sales aggregate
GET /api/v1/daily/monthly/purchase/reportDaily/monthly purchase aggregate
GET /api/v1/supplier/purchase/reportSupplier purchase analytics
GET /api/v1/categorywise/stock/reportCategory stock analytics
GET /api/v1/categorywise/sale/reportCategory sales analytics
GET /api/v1/due/paymentsDue payments report
GET /api/v1/product-ledgerProduct ledger report
GET /api/v1/timesheet/reportTimesheet/cash handover report
POST /api/v1/verify-product-returnReturn verification data
GET /api/v1/profit/margin/reportProfit margin by category/product
GET /api/v1/report/stock-transferWarehouse stock transfer report
GET /api/v1/reports/sales-returns/logsSell return logs
GET /api/v1/expire/product/reportExpiry tracking report
GET /api/v1/accounting/reportAdvanced accounting report
GET /api/v1/audit-logsAudit trail list
4. Data and Aggregation Design Notes
Sales and Purchase trend reports aggregate from invoices table grouped by day/month.
Category stock uses inventory_items + product-category relations and optional child-category traversal.
Supplier report groups purchase invoices by supplier with paid/due/status breakdown.
Profit margin report supports groupBy=category|product and fallback purchase-cost resolution logic.
Accounting report builds ledger from transactions joined with invoice/customer/supplier/warehouse.
Expire product report classifies rows into expired, expiring, valid by days-left.
5. Common Filters Across Reports
date_from, date_to
warehouse / warehouse_id
category (+ include child categories)
search
page, perPage, sortField, sortOrder
6. Feature/Permission Dependencies
Sell Return reports depend on sell-return feature enablement.
Timesheet report depends on shift/cash-handover feature and cashier data.
Stock transfer report depends on warehouse transfer feature.
Audit logs require appropriate backend access rights.
7. Technical Caveats for Integrators
Some APIs normalize legacy parameter names (example: warehouse to warehouse_id).
Accounting report uses payment-type inference expressions and schedule-payment table detection.
Large period reports should use pagination and controlled export to avoid browser memory spikes.
Profit calculations rely on available inventory cost data; if missing, fallback logic applies.
8. Troubleshooting Matrix
Issue Likely Cause Resolution
Report shows empty rows Date/warehouse/category filter too restrictive Reset filters and rerun with broader range.
Profit seems inaccurate Missing/zero purchase cost on some lines Audit inventory item purchase_price and rerun.
Sell return report unavailable Feature flag disabled Enable sell return feature preference.
Accounting totals mismatch Mixed payment methods or schedule-state edge cases Cross-check transaction-level ledger rows.
Audit logs not visible Permission or tenant scope issue Check user rights and company scope.
© 2026 Stoqio. All rights reserved. | Documentation by OrFactor