# 🧾 Smart Universal Invoice System
> ⚡ One system. Multiple industries. Unlimited possibilities.
A powerful, flexible, and modern invoice management system designed for **any type of business** — from retail and services to automotive, electronics, and beyond.
---
## 🚀 Features
### 📄 Dynamic Invoice Generation
* Generate invoices from JSON data
* Clean, professional, print-ready layout
* Unique invoice ID system
* Auto date & time tracking
---
### 🧩 Flexible Item System
* Product / Service name
* Quantity
* Unit price
* Extra costs (installation, labor, etc.)
* Dynamic total per item
---
### 💰 Smart Financial System
* Automatic subtotal calculation
* VAT / Tax support (default 5%)
* Grand total calculation
* Multi-currency ready
---
### 🎨 Themes & Customization
* ✅ 8 Built-in color themes
* 🌙 Dark mode + ☀️ Light mode
* 🔄 Real-time theme switching
* 💾 Saved in browser (localStorage)
---
### 🌍 Multi-Language Support
* ✅ Supports 19 languages
* 🔄 Dynamic switching
* ↔️ RTL & LTR support
* 🌐 Auto layout direction
---
### 📊 Cost Analysis (Internal Use)
* Hidden seller-only section
* Profit simulation (+5K / +10K / +15K)
* Full cost breakdown
---
### 🔒 Security
* Session-based authentication
* Safe file handling
* XSS protection (`htmlspecialchars`)
---
## 🛠️ Technologies
* **Backend:** PHP
* **Frontend:** HTML, CSS, JavaScript
* **API:** Python (Translation API)
* **Storage:** JSON
---
## 📂 Project Structure
```
/Screenshot
/Static
/ALL_Invoice
'DXB M 24536.json'
/css
Main.css
/IMG
icon.svg
/Parts
/translated
en.json
config.php
Default.json
logo_1775338194.png
'DXB V 69918.json'
settings.json
Add_Invoice.php
Edit_Settings.php
Login.php
requirements.txt
Edit_Invoice.php
index.php
Logout.php
Edit_Parts.php
Invoice.php
Receipt.php
web.py
```
---
## ⚙️ Installation
### 1. Clone project
```
git clone https://github.com/LaithALhaware/Smart-Universal-Invoice-System.git
cd your-repo
```
### 2. Install Python requirements
```
pip install -r requirements.txt
```
### 3. Run system
```
python web.py
```
### 4. Open in browser
```
http://localhost:8080
```
---
## 📸 Screenshots
### 🧾 Invoice View
### 📊 Cost Analysis & Summary
### 🧩 Items & Details
### 🎨 UI & Themes
### 🌍 Multi-Language Support
<img src="https://raw.githubusercontent.com/LaithALhaware/Smart-Universal-Invoice-System/main/Screenshot/Screenshot%20from%202026-04-06%2006-48-31.png" alt="Invoice 1" style="width:100%;" />
<img src="https://raw.githubusercontent.com/LaithALhaware/Smart-Universal-Invoice-System/main/Screenshot/Screenshot%20from%202026-04-06%2006-49-03.png" alt="Invoice 2" style="width:100%;" />
<img src="https://raw.githubusercontent.com/LaithALhaware/Smart-Universal-Invoice-System/main/Screenshot/Screenshot%20from%202026-04-06%2006-49-14.png" alt="Invoice 3" style="width:100%;" />
<img src="https://raw.githubusercontent.com/LaithALhaware/Smart-Universal-Invoice-System/main/Screenshot/Screenshot%20from%202026-04-06%2006-50-24.png" alt="Items 1" style="width:100%;" />
<img src="https://raw.githubusercontent.com/LaithALhaware/Smart-Universal-Invoice-System/main/Screenshot/Screenshot%20from%202026-04-06%2006-51-04.png" alt="Items 2" style="width:100%;" />
<img src="https://raw.githubusercontent.com/LaithALhaware/Smart-Universal-Invoice-System/main/Screenshot/Screenshot%20from%202026-04-06%2006-55-51.png" alt="Theme 1" style="width:100%;" />
<img src="https://raw.githubusercontent.com/LaithALhaware/Smart-Universal-Invoice-System/main/Screenshot/Screenshot%20from%202026-04-06%2006-56-45.png" alt="Theme 2" style="width:100%;" />
<img src="https://raw.githubusercontent.com/LaithALhaware/Smart-Universal-Invoice-System/main/Screenshot/Screenshot%20from%202026-04-06%2006-56-56.png" alt="Theme 3" style="width:100%;" />
<img src="https://raw.githubusercontent.com/LaithALhaware/Smart-Universal-Invoice-System/main/Screenshot/Screenshot%20from%202026-04-06%2006-57-03.png" alt="Lang 1" style="width:100%;" />
<img src="https://raw.githubusercontent.com/LaithALhaware/Smart-Universal-Invoice-System/main/Screenshot/Screenshot%20from%202026-04-06%2006-57-15.png" alt="Lang 2" style="width:100%;" />
<img src="https://raw.githubusercontent.com/LaithALhaware/Smart-Universal-Invoice-System/main/Screenshot/Screenshot%20from%202026-04-06%2006-57-22.png" alt="Lang 3" style="width:100%;" />
<img src="https://raw.githubusercontent.com/LaithALhaware/Smart-Universal-Invoice-System/main/Screenshot/Screenshot%20from%202026-04-06%2006-57-35.png" alt="Cost 1" style="width:100%;" />
<img src="https://raw.githubusercontent.com/LaithALhaware/Smart-Universal-Invoice-System/main/Screenshot/Screenshot%20from%202026-04-06%2006-57-48.png" alt="Cost 2" style="width:100%;" />
<img src="https://raw.githubusercontent.com/LaithALhaware/Smart-Universal-Invoice-System/main/Screenshot/Screenshot%20from%202026-04-06%2007-00-31.png" alt="Cost 3" style="width:100%;" />
---
## 💡 How It Works
* Invoice data stored in JSON
* Loaded dynamically via URL
* Calculations handled automatically
* Translation handled via Python API
---
## 🔮 Future Improvements
* Database (MySQL)
* PDF export
* Email sending
* Admin dashboard
* SaaS version
---
## 📝 License
This project is licensed under the **License**. See the [LICENSE.txt](LICENSE.txt) ⚖️ file for details.
---
## ❤️ Support This Project
If you find this project useful, consider supporting its development:
💰 Via PayPal: [[PayPal Link](https://www.paypal.com/ncp/payment/KC9EETJDVZQHG)]
Your support helps keep this project alive! 🚀🔥
Rendering README…