InvoPOS

A complete, modern invoice management system built with PHP. Manage clients, suppliers, products, invoices, purchases, and more with a professional POS interface and detailed reporting.

Overview

InvoPOS is a full-featured invoicing and business management system designed for small to medium businesses. It provides a clean, modern interface for managing the complete lifecycle of invoices, purchase orders, clients, suppliers, and product inventory.

The system includes a real-time Point of Sale (POS) terminal, role-based access control, comprehensive reporting with charts, and a professional invoice/purchase order printer.

Features

Client Management

Full CRUD for clients with contact info, addresses, tax numbers, and status tracking.

Supplier Management

Manage suppliers with company details, addresses, and联系 information.

Item / Product Management

Products with SKU, barcode, pricing, cost price, stock tracking, categories, and tax rates.

Invoice Creation

Dynamic line items, auto-calculation of taxes and discounts, notes, terms, and print-ready output.

Purchase Orders

Create POs to suppliers, track received status, auto-update stock on receive.

Point of Sale (POS)

Touch-friendly grid, instant cart, cash/card checkout, real-time stock updates.

User Management

Role-based access (Admin, Manager, Staff, Accountant) with granular permissions.

Reports & Analytics

Sales, purchases, profit/loss, top products, client rankings, and printable reports.

Payment Tracking

Record payments against invoices/purchases, multiple payment methods, balance tracking.

Business Settings

Company info, currency, tax rates, invoice prefixes, date formats, and terms.

Tech Stack

Backend
PHP 7.4+ MySQL 5.7+ PDO
Frontend
Bootstrap 5.3 Bootstrap Icons Chart.js 4
Fonts & Design
Google Inter Font Custom CSS Design System
Architecture
Custom MVC Pattern Session Auth

Installation

Requirements
  • PHP 7.4 or higher (PHP 8.x recommended)
  • MySQL 5.7+ or MariaDB 10.3+
  • Apache with mod_rewrite (recommended) or PHP built-in server
Step-by-Step Setup
1
Clone or Download
# Clone the repository
git clone <repo-url> invoicemaker

# Or download and extract to your server directory
2
Start the Server
cd invoicemaker
php -S localhost:8000
3
Open the Installer
Navigate to: http://localhost:8000/install/
4
Enter Database Credentials

Enter your MySQL host, username, password, and database name. The installer will:

  • Create the database (if it doesn't exist)
  • Create all 13 tables
  • Insert default roles, admin user, and settings
5
Login & Go
# Default credentials
Email: admin@example.com
Password: admin123
Optional: Load Test Data

To populate the system with sample data (8 clients, 4 suppliers, 12 products, 12 invoices, 8 purchases):

# In phpMyAdmin, select invoice_system database, then Import tab
# Choose: database/seed.sql

# Or via CLI:
mysql -u root invoice_system < database/seed.sql

Database Schema

The system uses 13 tables with proper foreign key relationships and cascade deletes.

TablePurposeKey Relationships
rolesUser roles with JSON permissions-
usersSystem usersroles.id
business_settingsKey-value config store-
clientsCustomer records-
suppliersSupplier records-
itemsProducts with stock-
invoicesSales invoicesclients, users
invoice_itemsLine items for invoicesinvoices, items
purchasesPurchase orderssuppliers, users
purchase_itemsLine items for purchasespurchases, items
paymentsPayment recordsinvoices, purchases
expense_categoriesExpense categories-
expensesExpense trackingexpense_categories, users
activity_logAudit trailusers

Project Structure

invoicemaker/ ├── assets/ │ └── css/style.css (Design system + all styles) ├── auth/ │ ├── login.php (Login page) │ └── logout.php (Session destroy) ├── config/ │ ├── app.php (Helpers, settings, auth) │ └── database.php (PDO connection class) ├── database/ │ ├── schema.sql (Table definitions + seed) │ └── seed.sql (Test data: clients, invoices, etc.) ├── dashboard/ │ └── index.php (Dashboard with charts) ├── includes/ │ ├── header.php (Sidebar + top navbar) │ └── footer.php (Scripts + closing tags) ├── clients/ (CRUD: index, add, edit, delete) ├── suppliers/ (CRUD: index, add, edit, delete) ├── items/ (CRUD: index, add, edit, delete) ├── invoices/ │ ├── index.php (List with status filters) │ ├── create.php (Dynamic line item builder) │ ├── view.php (Detail + payments) │ ├── print.php (Print-ready invoice) │ └── delete.php ├── purchases/ (Same pattern as invoices) ├── pos/ │ └── index.php (POS terminal UI) ├── api/ │ └── pos_sale.php (POS AJAX endpoint) ├── reports/ │ ├── index.php (Charts + data tables) │ └── print_report.php (Printable report) ├── users/ (Modal-based CRUD) ├── settings/ │ └── index.php (Business configuration) ├── install/ │ └── index.php (Web-based installer) ├── index.php (Root redirect) ├── .htaccess (Apache rewrite rules) └── README.md

Module Guide

Invoices
  • Create: Select client, add line items from product catalog, auto-calculate tax/discounts
  • Statuses: Draft → Sent → Paid (or Partial, Overdue, Cancelled)
  • Payments: Record partial/full payments with method (cash, card, bank transfer, check)
  • Print: Generate professional print-ready invoice with your business branding
  • Stock: Automatically decrements inventory on invoice creation
Purchases
  • Create: Link to supplier, add items at cost price
  • Statuses: Draft → Ordered → Received (or Partial, Cancelled)
  • Stock: Automatically increments inventory when marked as received
  • Payments: Track payments to suppliers
Point of Sale
  • Grid: Visual product grid with search by name/SKU
  • Cart: Add/remove items, adjust quantity, see real-time totals
  • Checkout: One-click cash or card payment
  • Client: Optional - assign sale to a client
Reports
  • Date Range: Filter by any start/end date
  • Sales Summary: Total sales, invoices count, outstanding balance
  • Profit/Loss: Revenue minus purchases
  • Top Lists: Best clients, suppliers, and products
  • Charts: Bar chart (sales vs purchases), doughnut (invoice status)
  • Print: Generate a professional printable report

Roles & Permissions

RoleClientsSuppliersItemsInvoicesPurchasesPOSReportsUsersSettings
Admin
Manager
Staff
Accountant

Configuration

Edit config/database.php to change database credentials:

define('DB_HOST', 'localhost');
define('DB_NAME', 'invoice_system');
define('DB_USER', 'root');
define('DB_PASS', '');

All other settings (business name, currency, tax rates, invoice templates) are configurable via the Settings page in the UI.

Default Login

Admin Account

Email: admin@example.com

Password: admin123


InvoPOS v1.0.0

Built with PHP, MySQL, Bootstrap 5, Chart.js