INCENTIVE SCREENS FIX  (30-Sep-2026)
====================================

WHAT WAS WRONG
  The 24 indentor incentive screens (ERD 12 + TVL 12) are shown through the
  portal "wrapper", which moves only the grid into the portal card.
    1. The Tax Invoice No / Tax Invoice Date boxes sit below the grid in the
       legacy form, so they stayed hidden. The indentor never saw them.
    2. Confirm was blocked outright: the legacy page checks for a ticked
       checkbox inside its own page, but the wrapper had moved the
       checkboxes out. The check failed, the save was cancelled, and the
       portal showed "Saving your confirmation..." forever. NOTHING SAVED.
  Accounts and Branch incentive screens (95) are not affected.

WHAT THIS DOES
  - The 24 indentor screens open as the ORIGINAL legacy page inside the
    portal: invoice boxes, date picker, validation and CONFIRM exactly as
    before. (Listed in app/config/wrapper_exclusions.php.)
  - Safety net for every other confirm screen: if a legacy page ever
    refuses a confirm, the portal stops "Saving..." and shows the reason.

INSTALL
  1. portal_backup "before_incentive_fix"
  2. WinSCP: upload incentive_fix.zip to /home/ubuntu/
  3. cd /home/ubuntu && unzip -o incentive_fix.zip && cd incentive_fix
  4. sudo php apply_incentive_fix.php --check     (must say CHECK OK)
  5. sudo php apply_incentive_fix.php             (must say DONE)
  6. Test: log in as an indentor, open an incentive screen, press Ctrl+F5.
     The Tax Invoice boxes must show; confirm one row with an invoice no.

  It backs up both files first and restores them itself if anything fails.
  The undo command is printed at the end.

THEN CHECK THE DATA
  Run INCENTIVE_CHECK.sql (read-only) in the ERD and the TVL database.
