================================================================================
 INVENTORYPLUS - WEIGHING SCALE PLUGIN (USER & CONFIGURATION MANUAL)
================================================================================

1. OVERVIEW
--------------------------------------------------------------------------------
The InventoryPlus Weighing Scale Plugin seamlessly connects electronic weighing
scales (such as CAS, Mettler Toledo, Essae, DIGI, Avery Berkel, Phoenix, Datalogic, 
and all standard digital retail scales) directly to your InventoryPlus POS billing system.

★ KEY BENEFITS FOR BUSINESSES:
  ✔ 100% Billing Accuracy: Eliminates manual weight typing errors and checkout fraud.
  ✔ High-Speed Checkout: Instant transfer of weight into sales billing in milliseconds.
  ✔ 1-Click Auto-Detect Wizard: No technical serial setup needed; auto-scans and connects.
  ✔ On-Screen Floating Live HUD: Moveable weight widget shows live weight, stability, and price.
  ✔ PLU Item Resolution: Scale keypad numbers automatically find the product, rate, and total.
  ✔ Container Tare Presets: 1-click deduction for sweet boxes, plastic containers, and glass jars.
  ✔ Anti-Fraud Protection: Automatically blocks negative weights, overloads, and zero weight.
  ✔ Dual Display Mirror: Synchronizes live weight and prices to the customer pole display.
  ✔ Stable Weight Audio Chime: Plays a gentle confirmation beep when weight stabilizes.
  ✔ 10-Day Audit Trail: Keeps an automatic record of weighing events for store audit safety.


2. INSTALLATION (HOW TO INSTALL THE PLUGIN)
--------------------------------------------------------------------------------
The Weighing Scale plugin package contains:
  - WeighingScale.dll         (Plugin binary file)
  - configweighingscale.json  (Plugin configuration file)
  - Readme.txt                (This user guide)

Installation Steps:
Step 1: Exit / Close InventoryPlus if it is currently running.
Step 2: Copy "WeighingScale.dll" and "configweighingscale.json" into the InventoryPlus "Plugin" folder:
        Typically located at:
        C:\Program Files (x86)\InventoryPlus\Plugin\
        (or <InventoryPlus Installation Folder>\Plugin\)
Step 3: Launch InventoryPlus.
Step 4: The plugin will start automatically, and you will see the Weighing Scale 
        icon (⚖) appear in your Windows System Tray (next to the clock).


3. FIRST-TIME SETUP (1-CLICK AUTO-DETECT SCALE)
--------------------------------------------------------------------------------
Setting up your weighing scale is fast and fully automatic:

Step 1: Connect your weighing scale cable to your computer (USB or COM port).
Step 2: Turn on the weighing scale.
Step 3: Right-click the Weighing Scale icon (⚖) in the Windows Taskbar (near the clock)
        and choose "⚙ Configuration & Diagnostics...".
Step 4: Click the blue "🔍 Auto-Detect Now" button.
Step 5: InventoryPlus will scan your computer, detect the scale model, verify sample weight, 
        and configure the connection automatically!
Step 6: Click "Save Configuration". You are now ready to start billing!


4. CORE FEATURES & HOW TO USE
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
FEATURE 1: 📥 AUTOMATIC WEIGHT TRANSFER TO SALES BILLING
--------------------------------------------------------------------------------
- Purpose: Instantly transfer the weighed weight into your sales billing screen.
- How to use:
    1. Place the item (e.g. Apples) on the scale platter.
    2. Wait for the scale reading to become stable (🟢 STABLE badge turns green).
    3. Press the Global Hotkey (Default: [F11]) or click "Add to Bill" on the Floating HUD.
    4. The net weight is typed directly into your invoice line followed by an automatic [ENTER].

--------------------------------------------------------------------------------
FEATURE 2: 📌 ON-SCREEN FLOATING LIVE-WEIGHT WIDGET (HUD)
--------------------------------------------------------------------------------
- Purpose: A compact, draggable window that floats on top of your billing screen.
- What it displays:
    - Large digital live weight (e.g., 1.450 kg).
    - Status Badge: 🟢 STABLE, 🟡 IN MOTION, ⚪ ZERO, ⚠️ NEGATIVE, ⚠️ OVERLOAD.
    - Resolved Item Name, Rate per kg, and Calculated Line Total.
    - Quick Tare Buttons: 1-click deductions for standard packaging.
    - Quick Action Buttons: "0️⃣ Zero", "⊞ Tare", and "📥 Add to Bill (Enter)".
- How to open: Right-click the system tray icon → "📌 Toggle Floating Live-Weight HUD".

--------------------------------------------------------------------------------
FEATURE 3: 🍎 KEYPAD PLU NUMBER ITEM RESOLUTION
--------------------------------------------------------------------------------
- Purpose: Type the item code on the scale keypad, and InventoryPlus automatically 
  identifies the product name and calculates price.
- How to use:
    1. Place item on scale.
    2. Enter product code on scale keypad (e.g. 101 for Fresh Apples).
    3. The Floating HUD and Customer Pole Display immediately display:
       "🍎 Fresh Apples  •  @ ₹100.00/kg  •  Total: ₹145.00"
    4. When the weight is stable, it automatically adds the product to your bill!

--------------------------------------------------------------------------------
FEATURE 4: 🧰 CONTAINER TARE PRESETS (PACKAGING DEDUCTIONS)
--------------------------------------------------------------------------------
- Purpose: Automatically deduct the weight of empty boxes, plastic bags, or containers.
- How to use:
    1. Right-click the scale tray icon → "🧰 Manage Container Tare Presets...".
    2. Add your standard containers (e.g. "Sweet Box 500g" = 25g, "Sweet Box 1kg" = 50g).
    3. Click "Save Presets".
    4. During billing, click the container button on your Floating HUD or select it 
       from the tray menu. The box weight is instantly deducted from the net weight!

--------------------------------------------------------------------------------
FEATURE 5: 🛡️ ANTI-FRAUD & METROLOGY PROTECTION
--------------------------------------------------------------------------------
- Prevents staff or customers from pressing the platter downward or lifting during billing.
- Blocks negative weights (e.g. -0.200 kg) and prevents inserting 0.000 kg lines into bills.
- Blocks weight transfers when the scale reading is actively vibrating or fluctuating.

--------------------------------------------------------------------------------
FEATURE 6: 🧪 VIRTUAL SCALE SIMULATOR (TESTING WITHOUT HARDWARE)
--------------------------------------------------------------------------------
- Purpose: Test billing workflows and train cashiers without needing a physical scale.
- How to use:
    1. Open "Configuration & Diagnostics" → click the "🧪 Virtual Simulator" tab.
    2. Check "Enable Virtual Scale Simulation Mode".
    3. Adjust the weight slider, toggle between Stable / Motion, and enter test PLU codes.
    4. Click "🚀 Push Simulated Reading" to test billing on screen!

--------------------------------------------------------------------------------
FEATURE 7: 📺 DUAL-DISPLAY SYNCHRONIZATION WITH CUSTOMER DISPLAYS
--------------------------------------------------------------------------------
- Purpose: Instantly mirrors live scale weights, unit rates, and totals across all 
  connected customer displays:
    1. Standard 20x2 VFD / LCD Pole Displays.
    2. 3-Window 7-Segment LED Scale Towers (Weight • Unit Price • Total).
    3. Secondary Graphic Color LCD Displays (7", 10.1", 15" Dual-Screen POS).


5. SYSTEM TRAY STATUS & SHORTCUTS
--------------------------------------------------------------------------------
Right-click the Weighing Scale icon (⚖) in the Windows Taskbar (near the clock):

- ⚖ Status Header: Shows real-time scale connection and current live weight.
- ⚙ Configuration & Diagnostics...: Opens the full configuration and auto-detect wizard.
- 🧰 Manage Container Tare Presets...: Opens the packaging tare library.
- 🧪 Open Virtual Scale Simulator...: Opens the interactive training simulator.
- 📌 Toggle Floating Live-Weight HUD: Shows or hides the on-screen weight widget.
- 0️⃣ Zero Scale: Sends a hardware zero command to calibrate scale tare.
- ⊞ Tare Scale: Sends a hardware tare command to deduct the platter weight.
- 📋 Copy Current Weight: Copies the weight text to your Windows clipboard.
- 🔄 Reconnect COM Port: Reconnects the scale if the cable was unplugged.


6. CONFIGURATION OPTIONS (CONFIG.JSON)
--------------------------------------------------------------------------------
All settings can be adjusted easily inside the Settings window or via "config.json":

- PortName: Serial port name (e.g. "COM1", "COM3").
- BaudRate: Data speed (Default: 9600).
- Protocol: Scale model brand (GenericAscii, CAS, Toledo, EssaeDigi, Avery, Magellan).
- Hotkey: Keyboard shortcut to grab weight into bill (Default: "F11").
- AutoPressEnter: Automatically moves cursor to next billing line (true/false).
- AutoAddOnStablePLU: Automatically inserts line when PLU item weight is stable (true/false).
- ShowFloatingWidget: Keeps the Floating HUD visible on screen (true/false).
- MirrorToPoleDisplay: Synchronizes live weight to the customer pole display (true/false).
- EnableAudioChime: Plays a sound confirmation on stable weight (true/false).
- EnableAntiFraud: Blocks negative and zero weight transfers (true/false).


7. TROUBLESHOOTING & FAQS
--------------------------------------------------------------------------------
Q1: The scale tray icon shows "Scale: 🔴 Disconnected".
A1: - Ensure the scale is powered ON and the data cable is securely plugged into the computer.
    - Open "Configuration & Diagnostics" and click "🔍 Auto-Detect Now".

Q2: The weight reading does not transfer when pressing F11.
A2: - Check that your cursor is focused on the item barcode/quantity field in billing.
    - Check that the weight reading is stable (🟢 STABLE badge). If the weight is fluctuating 
      or zero, anti-fraud protection will block insertion until the platter is stable.

Q3: The scale numbers on the computer screen look garbled.
A3: - Open "Configuration & Diagnostics" → check the "Scale Protocol Profile".
    - Run "🔍 Auto-Detect Now" to automatically match your scale manufacturer protocol.

Q4: Where are the daily weighing audit logs stored?
A4: Audit logs are stored in the "Logs\Audit\" folder under the plugin directory and are 
    automatically kept for 10 days for store record protection.

================================================================================