Invoice System using PHP/OOP Free Source Code



This is a PHP project that I'd developed called Invoice System. This is a simple OOP PHP project that can help some companies to manage their invoices. The system handles invoices for both selling products and services. This system can help other programmers especially those who are new to PHP language to learn some techniques and understand how to build an Invoice System in the said programming language.

About the Invoice System

The Invoice System was developed using PHP/OOP, MySQL Database, HTML5, CSS, Javascript (jQuery and Ajax), and Bootstrap. The system stores the list of categories, products, services, and invoices. The invoices that will be store or generated in this system has 2 types which are the product invoice and service invoice. The system automatically generates a random invoice code but also editable and has a validation to check the code availability. After the invoice is saved, then a new window will pop up that contains the printable generated invoice. The dashboard displays the summary of the list stored inside the database. When listing the items of products or services in creating an invoice, the system has error trapping features to prevent human errors to result in system errors.


  • Secure Login
  • Home Page/Dashboard
  • Manage Category
  • Manage Product
  • Manage Service
  • Create Invoice
  • Update Invoice
  • Print Invoice
  • Delete Invoice
  • Autogenerates Invoice Code
  • Validates Invoice Code
  • Error Trapping

System Snapshots


Dashboard/Home Page


Manage Invoice Page


Invoice Print View

The source code is free to download on this website. Feel free to download and modify the source code the way you desire. This project was developed only for educational purposes only.

How to Run


  • Download and Install any local web server such as XAMPP/WAMP.
  • Download the provided source code zip file. (download button is located below)


  1. Open your XAMPP/WAMP's Control Panel and start the Apache and MySQL.
  2. Extract the downloaded source code zip file.
  3. If you are using XAMPP, copy the extracted source code folder and paste it into the XAMPP's "htdocs" directory. And If you are using WAMP, paste it into the "www" directory.
  4. Browse the PHPMyAdmin in a browser. i.e. http://localhost/phpmyadmin
  5. Create a new database naming invoice_db.
  6. Import the provided SQL file. The file is known as invoice_db.sql located inside the database folder.
  7. Browse the Invoice System in a browser. i.e. http://localhost/simple_invoice

Access Information:

Username: admin
Password: admin123


That's it! I hope this Invoice System in PHP/OOP and MySQL Database that I have created will help you with what you are looking for and you'll find something useful for your future projects.

Explore more on this website for more Free Source Codes and Tutorials.

Enjoy :)

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.


1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.


Submitted byVedastus Paul (not verified)on Thu, 05/05/2022 - 21:39

Thank you for your code. This system has a problem once you want to print more than one invoice frequently can't do this operation. What is wrong?
Submitted byAkello Sylvia (not verified)on Thu, 05/26/2022 - 15:32

Warning: Constants may only evaluate to scalar values in C:\wamp\www\simple_invoice\initialize.php on line 5 Fatal error: Call to undefined function session_status() in C:\wamp\www\simple_invoice\admin\inc\sess_auth.php on line 2 How can I fix thius?
Submitted byAnonymous (not verified)on Mon, 02/27/2023 - 02:01

i got this error Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error. More information about this error may be available in the server error log. Apache/2.4.54 (Win64) PHP/7.4.33 mod_fcgid/2.3.10-dev Server at localhost Port 80
Submitted byCalvin Schaefer (not verified)on Mon, 01/29/2024 - 15:08

How can we create new users?

Add new comment