V16 - Category Sidebar, Customer Ledger, Credit / Pay Later

WHAT IS NEW
- Sidebar: Categories, Credit Customers, Customer Ledger, Receive Payment.
- Admin > Customers > Add Customer: choose Credit / Pay Later (internal type normal).
- Admin > Customers > Edit: switch Wallet vs Credit / Pay Later with balance safeguards.
- Credit Customers page: outstanding amounts, total purchases, payments, order count, actions.
- Bot: approved Credit / Pay Later users can order at zero wallet balance. Each order increases total_purchases and current_due; customer_ledger gets a purchase row.
- Admin > Receive Payment: records a PRIVATE payment (cash, bank, WhatsApp, etc.) and reduces current_due, increases total_payments, and writes customer_ledger/payment receipt. Payment cannot exceed due. This is NOT NayaPay wallet top-up; top-up continues unchanged.
- Removed destructive V12 migration that changed manually approved normal/credit users to wallets.
- Payment and customer edit forms now have anti-CSRF tokens; customer balance updates are transactional.

VERY IMPORTANT
1. BACK UP both your current website files AND live MySQL database before upload.
2. This update uses the EXISTING tables; no ALTER/DROP/CREATE SQL is necessary if your previous recovered schema was imported successfully.
3. Upload/overwrite the website PHP files from this ZIP into your existing public_html/bot.shoaibsubscription.pk document root, preserving your current live config credentials. Do not delete existing uploads or current database.
4. If database was re-created EMPTY, import previous bot_database_recovery.sql before starting the bot; that is a separate step.
5. Previously deleted customers/ledger are not recoverable from PHP code. Check your host's DB backup if historical due and orders matter.
6. If old V12 upgrade already converted a formerly credit customer to wallet, you must identify and manually switch that account to Credit / Pay Later under Edit Customer; do not automatically convert everybody.
7. Never count a private payment as a NayaPay wallet top-up also. Avoid duplicate payment entries; use payment reference ID and verify receipt externally.
8. Test with a zero-wallet credit buyer, then record a partial private payment and check customer ledger BEFORE production use.
9. This package includes the user's existing source config / integration files; do not share it publicly. Rotate exposed credentials after backup recovery.

ADMIN LINKS
/adminpanel/categories.php
/adminpanel/credit_customers.php
/adminpanel/customer_ledger.php
/adminpanel/payment_add.php
/adminpanel/customer_add.php

DATABASE
No new tables necessary for v16 (uses existing customers, customer_ledger, orders, order_items, payments, wallet_transactions).
Current due = credit purchases - private payments. Wallet top-ups remain separate.
