GICA User Guide
This guide covers the current CSV-native MVP: role-based pages, in-browser editing, and FIFO period close.
      Table of Contents
      Catalog (Customers)
      Sales Clerk
      DB Admin
      Admin (Period Close)
      Passwords & Sessions
      Troubleshooting
      Privacy
    
    Catalog (Customers)
- Open index.html.
 - Use Catalog CSV to load a starting/catalog file (e.g., department_inventory_starting.csv).
 - Search by name/SKU/code; filter by stock; sort by name or price; toggle Card/Table view.
 - Export the current view via Export View CSV.
 
Sales Clerk
Update running inventories for the current month: sales, purchases, returns, losses.
- Open sales_clerk.html, enter the Clerk password.
 - Choose a running CSV (e.g., department_inventory_sales.csv) and click Load (or auto-load on file select).
 - Edit cells inline. For sales, set Quantity, Transaction Date, and Price. For purchases/returns/losses, set Unit Cost.
 - Click Download CSV to save your changes locally.
 
DB Admin
Maintain catalog/starting fields: Name, Price, Bottle Deposit, Quantity, SKU, Product Code, Transaction Date.
- Open dba.html, enter the DB Admin password.
 - Load the starting/catalog CSV, edit inline, and Download to save.
 
Admin (Period Close)
- Open admin_integrated.html, enter the Admin password.
 - In Period Inventory (FIFO), load: Starting, Purchases, Returns, Sales, Losses CSVs.
 - Select the Month (uses Transaction Date for filtering).
 - Click Compute Ending (Preview) to see ending quantities/values, Sales Revenue, COGS, and Gross Profit.
 - Click Close Period to download:
          
- ending CSV (audited)
 - new starting CSV (from ending)
 - archives of each running CSV with -YYYY-MM, plus resets of those running files
 
 
Returns default missing cost to the current FIFO top. Losses hit COGS using FIFO cost.
Passwords & Sessions
- Role passwords live in localStorage. Change them after login in each page’s Settings panel.
 - Session gates live in sessionStorage. Use Logout to clear them.
 
Troubleshooting
- CSV won’t load: Ensure it has a header row and is a valid .csv. Try another editor-saved CSV.
 - Mismatched math: Check the Transaction Date month filter and that sales prices/costs are populated.
 - Missing costs: Use Admin’s seed/fill flow (when prompted) or update Unit Cost in purchases/returns.
 
Privacy
All data remains in your browser during use. Files are read from and written to your machine as downloads. See Privacy for details.