POS - PHP + MySQL (cPanel)
==========================
1. cPanel > MySQL Databases: create a database, create a user, add the user to the database (ALL PRIVILEGES).
2. cPanel > File Manager: upload this ZIP into public_html (or a sub-folder such as public_html/pos) and Extract.
3. Open https://yourdomain/pos/install/ and fill in the form. Then delete the "install" folder.
4. POS screen (the till): https://yourdomain/pos/        Back office: https://yourdomain/pos/admin.php  (sign in with the Owner PIN)
5. Move your old data: export each Google Sheet tab as CSV (Products, Categories, Stock, Sales, Invoices, Adjustments,
   Customers, Payments, Suppliers, Credit Notes, Cash Log, Cash Close, Settings) and upload them in Admin > Import / Backup.
   The Dashboard/Reports tabs are calculated, not data - skip them. Compare the new Dashboard with your old one to check.
Use HTTPS (cPanel AutoSSL) - the camera barcode scanner only works on HTTPS.
Optional cron jobs (cPanel > Cron Jobs):  php /home/ACCOUNT/public_html/pos/cron.php backup   (nightly)
                                          php /home/ACCOUNT/public_html/pos/cron.php lowstock (mornings)
extras/scanner.html is the old stand-alone scanner page; not needed, the scanner now runs inside the POS page.
Keep inc/config.php private: its secret protects the staff PINs. Back up the database from cPanel too.

UPDATING an existing install: upload the new files over the old ones (keep inc/config.php). The database upgrades itself on first use.
Roles: Owner (Super Admin), Admin, Cashier. Menu rights are set in Back office > Access levels. Shop name, logo, favicon and colour theme: Back office > Settings.
Reports (Menu > Reports): PDF opens a print window - choose "Save as PDF".

WHAT'S NEW (synced with the latest Code.gs / Index.html)
- BACK OFFICE (admin.php) now holds everything that is not needed at the till:
    Dashboard, Sales (all / cash / credit, search by invoice, customer, phone, NIC, bank; open an invoice, print it),
    Credit sales (who owes what, open credit invoices with due dates, receive a payment, WhatsApp reminder),
    Customers (add / edit / delete, NIC, birthday, address, invoices and payments of each customer),
    Reminders (credit bills due + customer birthdays, WhatsApp buttons), Suppliers (with what you bought from each),
    Products, Categories, Stock history, Cash (day closings, cash in / out), Reports, Staff, Access levels, Settings (shop, logo, icon, colour theme), Import / Backup.
- The POS Menu: Reminders, Held sales, Cash In/Out, Stock in, Refund, Close the day, Labels, Stock count, Low stock WhatsApp, Dashboard, Admin, Settings and Back office. Dashboard and Back office open admin.php and are controlled by the new "Back office" row in Access levels.
  The Lock button is gone from the Menu (the lock icon at the top of the screen and the automatic idle lock still work).
- New sale screen: fixed / percentage discount switch, new customer layout (name, phone, NIC, birthday, bank, cheque / card no., due date, address),
  portrait / landscape layout that fits phones and tablets without scrolling, Reminders with 7 / 14 / 30 day views, sales history tabs.
- A sale on Credit needs customer name, phone, NIC and due date (DD/MM/YYYY).
- No database change is needed: upload the files over the old ones (keep inc/config.php). New file: inc/admin_pages.php.
