Core Financial Module
Invoice Management
Invoice Management controls all commercial documents in your inventory business: Sale Invoices, Purchase Invoices, and Quotations. This module also handles payment tracking, due collection, print/email sharing, and invoice-level reporting summary.
Part A: Non-Technical User Guide
1. What This Module Does
View all invoices in one table with type-based filtering.
Manage Sale, Purchase, and Quotation documents separately or together.
Track paid, unpaid, and partially paid invoices.
Collect due payments from invoice action panel.
Print invoice copy (with or without customer details).
Send invoice or quotation by email directly.
Export invoice data to CSV, copy table data, and print full list.
2. Invoice Menu Meaning
Menu Meaning
Sale Invoices Invoices generated from Stock Out/POS sales. Affects customer due and stock deduction history.
Purchase Invoices Invoices generated from Stock In/purchase entries. Affects supplier payable and stock increase history.
Quotations Price proposals for customers. Usually no final stock deduction until converted/confirmed into sale.
3. Screen Sections Explained
Search box: Find invoice by invoice number quickly.
Advanced filters: Type, status, salesman, invoice date range, last payment date range.
Top actions: Export CSV, Print list, Copy, bulk delete, quick Stock In and Stock Out shortcuts.
Invoice table: Invoice No, Date, Type, Bill To, Qty, Discount, Total, Paid, Due, Last Payment, Status.
Row actions: Email, Add Payment, View/Print, Delete.
Summary rows: Page totals + Sales total + Purchase total + Grand total with payment breakdown.
4. Daily Operating Flow
Create Sale/Purchase from operational screens.
Open Invoice page and verify document generated correctly.
Check payment status and due amount.
If due exists, use payment action to collect installment/full payment.
Share invoice via print or email.
Use filters and export for accounting reconciliation.
5. Payment Status Meaning
Paid: Invoice due is zero.
Unpaid: No payment collected yet.
Due/Partially Paid: Some amount paid, remaining due exists.
6. Common User Actions
Add payment: Click card icon on unpaid/partial invoice.
Email invoice: Click email icon, enter recipient email, send.
View invoice: Use eye/scan button to open printable copy.
Delete invoice: Use delete icon (only if enabled and permitted).
Part B: Technical Reference (CodeCanyon Developer/Integrators)
1. Frontend File Map
frontend-source/src/pages/invoice/Invoices.jsx - shared invoice list UI + filters + actions + totals.
frontend-source/src/pages/invoice/SaleInvoices.jsx - wrapper with forced type sale.
frontend-source/src/pages/invoice/PurchaseInvoices.jsx - wrapper with forced type purchase.
frontend-source/src/pages/invoice/QuotationInvoices.jsx - wrapper with forced type quotation.
frontend-source/src/pages/sales/Pos.jsx and related sales components - source for sale invoice creation.
frontend-source/src/pages/purchase/PurchaseCreate.jsx - source for purchase invoice creation.
2. Backend File Map
app/Http/Controllers/Api/InvoiceController.php - Invoice endpoints entry point.
app/Services/Api/InvoiceService.php - list/store/payments/returns/delete/download/email business logic.
routes/api.php - all invoice/sales routes.
3. Key API Endpoints
Method Endpoint Purpose
GET /api/v1/salesInvoice list (type filter driven from UI)
GET /api/v1/sales/draftsDraft sale invoices
POST /api/v1/sale/storeCreate sale/purchase/quotation/draft invoice payload
ANY /api/v1/sale/update/{id}Update invoice
DELETE /api/v1/sale/delete/{id}Delete one invoice
DELETE /api/v1/sale/bulk/deleteBulk invoice delete
POST /api/v1/invoices/{schedule_id}/payPay invoice installment/due
POST /api/v1/invoices/{id}/send-emailSend invoice or quotation by email
POST /api/v1/invoice-items/returnSales return item flow
4. Request/Validation Highlights
type supports: sale, purchase, return, draft, quotation.
items[] required with qty and product/bundle references.
payments[] validates enabled payment methods from POS settings.
For card method, extra card metadata validation is enforced.
Date and monetary fields are validated before transaction logic.
5. Core Business Logic Notes
Invoice list summary includes totals by type (sales/purchases/grand) and payment-method breakdown.
Draft list access is role-sensitive (invoice.sale.draft.finalize.any right).
Delete flow performs stock and invoice-history rollback logic and soft deletion strategy.
Email flow renders invoice PDF and sends via dynamic mail service.
Quotation email can use quotation-specific email template when configured.
6. Permission and Feature Dependency
Frontend checks module actions by invoice.view, invoice.edit, and delete capability.
Invoice delete availability is controlled by feature preference ftr_allow_invoice_delete.
Sales return, stock out, stock in actions are permission-gated from related modules.
7. Export/Print/Email Behavior
CSV export uses selected rows if user selected any; otherwise visible rows.
Print List fetches full filtered dataset using perPage=all.
Single invoice print supports with-customer-info and without-customer-info views.
Email sending generates PDF attachment and supports invoice/quotation subject mapping.
8. Troubleshooting Matrix
Issue Likely Cause Fix
Cannot see delete button Feature disabled or no permission Enable ftr_allow_invoice_delete and grant rights.
Payment button missing Invoice already fully paid or no edit right Check payment status and role rights.
Email send failed Mail config/template issues Verify SMTP/dynamic mail settings and active template.
Wrong totals in export Filter mismatch before export Apply filters, reload data, then export.
Draft not visible User cannot view others' drafts Grant draft finalize any right or open own drafts only.
© 2026 Stoqio. All rights reserved. | Documentation by OrFactor