SHYNAZ V10 - PAID RECEPTION INVOICES
Brand: SHYNAZ Beauty Lounge. Owner: Jitesh.

INSTALL
1. Back up the existing website and database together.
2. Extract this ZIP into the EXISTING website folder and overwrite supplied files.
   Keep your live config.php, uploads and storage contents. Do not delete the folder.
3. Sign in as Supreme Admin and click APPLY V10 UPDATE.
   Database additions are automatic. DO NOT manually import SQL or reinstall.
4. Refresh with Ctrl+F5 and reopen an installed app if necessary.
5. If you use the offline desk, prepare the device again after this update.
The update preserves existing records, accounts, passwords, invoice numbers,
loyalty balances, student certificates, salaries and uploaded files.
Earlier unpaid/partial records are NOT falsely marked paid by the upgrade.

1. NORMAL SALON VISIT - DEFAULT PAID IN FULL
Admin -> Invoices & payments -> Create invoice.
- Select salon, client phone/email, services, quantities and artist/team.
- Set discount and GST if applicable.
- Leave Invoice type as PAID VISIT - FULL AMOUNT RECEIVED.
- Select Cash, UPI / QR code, Bank transfer or another available payment mode.
- Add a transaction reference/payment proof if needed and create the invoice.
- Creating the invoice records its FULL calculated total as received. The normal
  amount field follows the total automatically; there is no ordinary credit option.
- A genuine payment row is saved with the selected mode, date, reference and proof.
- The invoice/PDF/list shows PAID, the total received and zero balance.
- Normal paid visits are recorded as completed, so eligible service payments earn
  loyalty points once. Creating a paid invoice confirms that payment was received.
A zero-value loyalty reward is settled with points rather than fictitious cash.

2. BRIDAL / OTHER ADVANCE BOOKING
- Choose ADVANCE BOOKING - FUTURE APPOINTMENT.
- Set a FUTURE appointment date/time, using India Standard Time.
- Enter the amount actually received (above zero, up to the total).
- Choose Advance, Part payment or Full/final payment as appropriate.
- Save. Only that received amount is recorded; the genuine remaining balance stays.
- On the visit, record the remaining payment against the SAME invoice.
- Then use MARK SERVICES COMPLETED. Advance visits must be fully settled before
  completion and cannot be completed before their scheduled visit date.
- Eligible loyalty points are awarded after completion, not for an unperformed
  booking deposit. A fully prepaid future booking still awaits service completion.
No normal unpaid/credit service invoice is created by leaving received amount at 0.
Future appointments must use Advance booking, even if prepaid in full.

3. ARTIST & CERTIFICATES
- Invoice header is now ARTIST in the screen preview, print and downloaded PDF.
- Artist/team selection remains linked to the service and staff work records.
- New SALON SERVICE CERTIFICATES are disabled. Invoice forms have no service
  certificate button, service-catalogue certificate setting or automatic issuance.
- Direct attempts to issue a new service certificate are rejected server-side.
- STUDENT COURSE CERTIFICATES remain available in the academy after course
  completion and actual fee clearance. Existing issued certificate records remain.
- Previous archived PDF copies remain historical copies; current invoice views
  and new PDF versions use the updated Artist wording and actual payment status.

4. COPY CLIENT USERNAME & PASSWORD FROM INVOICE ROWS
The first invoice automatically creates or links the client's account, preserving
the same canonical client ID for repeat visits.

INVOICE LIST
- Admin -> Invoices & payments -> find the client's row.
- Click COPY LOGIN + PASSWORD to copy the initial temporary credentials.
- Paste the prepared text into WhatsApp, email or another private message.
- Text includes the client name/ID, account ID, login URL, phone/email username and
  temporary password. The invoice PDF does NOT contain passwords.
- The initial temporary login stays available in the invoice row even after the
  first invoice screen has been viewed, until the client changes their password.
- If clipboard access is unavailable, a selectable text box appears for manual copy.

AFTER THE CLIENT CHOOSES A PRIVATE PASSWORD
- The recoverable temporary copy is removed. Their private password remains hashed.
- COPY LOGIN copies account/login details without revealing that private password.
- To issue a replacement: expand ISSUE NEW TEMPORARY LOGIN in the invoice row,
  verify the client's identity, confirm and generate. You return to the invoice
  list and can copy the new temporary username/password message there.
- Old passwords/sessions stop working. Client chooses a different private password
  after sign-in. Do not reset a client just to inspect their current private password.

ACCESS / STORAGE
- Only authorised reception/admin users with invoice access can use the copy route.
- Staff are limited to invoices in their assigned salon. Clients/visitors cannot use
  the admin credential-copy endpoint, even for a client's own invoice.
- Temporary passwords are encrypted at rest with the installation key. They are
  fetched only after an authorised copy request, not embedded in the invoice list.
- Password change, verified phone reset, email reset and admin password replacement
  remove the earlier recoverable temporary copy.
- Keep the existing config.php/app_key; changing the key prevents decryption of
  SMTP, WhatsApp and temporary-login records.

5. LOYALTY / IDENTITIES / HISTORY
The V9 rules remain: one point per INR 5 paid for completed salon services after
discounts and excluding GST, carrying fractions across visits, with no expiry.
Admin-assigned service rewards redeem points for INR 0 service lines.
Existing opening baselines prevent historical spending being credited twice;
new eligible balance payments on older completed invoices still earn points.
Client IDs, account IDs, staff/student IDs and earlier certificate numbers remain.
Historical import keeps original dates/references and a separate SBL-OLD number.
Phone/email matching reuses the same client account across salon visits.
Registered-phone WhatsApp OTP reset still needs its configured sender and approved
recovery authentication template. Existing SMTP/WhatsApp settings are retained.

6. OFFLINE DESK
Re-prepare the device from Admin -> Offline desk while online to load V10 context.
- A new PAID VISIT DRAFT collects payment mode/date/reference and requires explicit
  confirmation that the full total was received for completed services.
- The official invoice/payment is saved only after authenticated server validation
  and sync. Repeated sync does not duplicate the invoice, receipt or points.
- Older unconfirmed estimates stay in the queue for review rather than silently
  becoming paid receipts. Review them online, or re-prepare and edit the saved draft
  with the correct actual payment confirmation before sync.
- Advance bookings use the online reception form. Offline expense drafts remain.
- Unsynced local drafts can still be exported for backup; do not clear browser
  storage before they are safely synchronised/reviewed.

OTHER RECORDS
Student admissions/learning/quizzes/course templates, HR salary/proofs, attendance,
leave/NOCs, expenses, inventory transfers, reports, gallery/articles and reviews
remain. This package does not import any new historical client file automatically.

VALIDATION
Development tests cover full-payment calculation, discounts/GST, advance booking,
remaining payments, disabled service certificates, retained course certificates,
client credential copy/regeneration/access, private-password removal, duplicate
submissions/offline sync and previous V9 compatibility. Paid and advance A4 PDFs
were rendered and visually inspected. Live MySQL hosting, physical printers,
real device clipboard permissions and actual message delivery were not exercised.
No external client emails/WhatsApp messages were sent during development tests.
