MART POS WEB UPDATE PACKAGE
===========================

Included:
- settings/index.php : Backup SQL download and SQL upload/restore (settings.manage permission)
- repairs/index.php : Customer/repair intake, allocate repair number; existing customer lookup by mobile.
- repairs/billing.php : Add stock parts/custom parts, quantities/rates, labor, discount, total, paid, balance; stock consumption and customer ledger balance.
- repairs/list.php : Searchable by records list (latest 300 shown) and open existing bill.
- repairs/schema_update.sql / database_update_existing.sql : ALTER-safe additions (CREATE TABLE IF NOT EXISTS) for existing database.
- mart_pos_fresh.sql / database_fresh.sql : Fresh DB schema with only company/store/roles/permissions/users/warehouse core seed data retained; operational transaction data insert statements omitted.

INSTALL / HOSTING
1. Take a backup of your current database first.
2. Upload/extract the mart-pos folder to the website document root (keep folders as provided).
3. Edit includes/db.php with hosting DB host, database name, username and password.
4. For EXISTING database: import database_update_existing.sql (or repairs/schema_update.sql) using phpMyAdmin. This does not drop existing tables or records.
5. For FRESH database: create a new empty database, import mart_pos_fresh.sql, then configure includes/db.php. Core account/role data is retained from the source dump; all business transactions/products/customers/purchases/sales data inserts are omitted.
6. Login and use Dashboard > Repairing or Dashboard > Settings & Backup.

IMPORTANT
- SQL restore overwrites/restores data according to the uploaded SQL statements. Always download backup before restore.
- Stock items in repair billing are deducted from inventory_stock; the saved balance is posted to customer_ledger as ADJUSTMENT_IN referencing REPAIR.
- PHP syntax lint has been run on added/modified PHP files. I have not been able to test runtime behavior against your live hosting database, PHP configuration, and actual schema/permissions. Please test in a staging database before production.
