A PHP-based work order management system with dynamic calculations and receipt generation.
v2/
├── registration.php # Main form for work order entry
├── receipt.php # Receipt generation and display
├── process.php # Order confirmation display
├── data.php # Database operations
└── README.md # This file
- Main entry point for work order creation
- Features:
- Work order information input
- Customer billing details
- Job details section
- Dynamic item addition with calculations
- Automatic tax calculations (12% fixed rate)
- Real-time total calculations
- JavaScript Functions:
calculateTotal()
: Calculates individual item totalscalculateAllTotals()
: Updates subtotal, tax, and final totalsetupCalculations()
: Sets up event listeners for calculationsaddItem()
: Adds new item rows dynamically
- Generates printable receipt from form data
- Features:
- Company header
- Work order details
- Customer information
- Item listing with totals
- Tax calculations display
- Signature section
- Print functionality
- Security:
- Input sanitization
- Default value handling
- Error checking for missing data
- Confirmation page after form submission
- Features:
- Success notification
- Order summary display
- Styled confirmation layout
- Print option
- Option to submit new order
- Styling:
- Bootstrap-based layout
- Custom CSS for professional appearance
- Responsive design
- Handles database operations
- Features:
- MySQL database connection
- Data sanitization
- Multiple table insertions:
- Work order information
- Billing details
- Job details
- Order items
- Tables:
- workorderinfo
- billto
- jobdetails
- workorderitems
- XAMPP or similar PHP environment
- MySQL database
- Web browser with JavaScript enabled
CREATE DATABASE IF NOT EXISTS cpesfd;
USE cpesfd;
CREATE TABLE workorderinfo (
id INT AUTO_INCREMENT PRIMARY KEY,
work_order_id VARCHAR(50),
date DATE,
requested_by VARCHAR(100),
customer_id VARCHAR(50),
department VARCHAR(100)
);
-- Additional table creation statements...
- Start XAMPP (Apache and MySQL)
- Place files in htdocs directory
- Access via:
http://localhost/v2/registration.php
- Fill out work order form
- Submit to generate receipt
- Data is stored in database
- All input is sanitized
- Form validation implemented
- SQL injection prevention
- XSS protection