Commit Graph

6 Commits

Author SHA1 Message Date
Suriya
02b5258000 Fix product import defaulting to 1 in stock, allowing orders with zero real inventory
Quick-import buttons hardcoded quantity:1, which the backend writes straight
to the stock ledger as an "in" entry — letting one order go through for a
product that was never actually stocked. Default to 0 instead, and fix a
fallback path that was silently coercing an explicit 0 back to 1 via `|| 1`.
2026-07-23 16:25:34 +05:30
92165b986c inventory page 2026-07-23 16:05:38 +05:30
407574d62a dispatch testing 2026-07-20 18:54:09 +05:30
Suriya
186546f1fe Make subcategory optional, source category picker from real tenant data
Matches the backend: subcategory is no longer a required field in the
import modal (defaults to none/0 instead of blocking submission), and
the Category dropdown now comes from GET gettenantcategories (what
this tenant's own products actually use) instead of the global
categories list, which was missing categoryid 2 despite it being the
category tenant 1135 actually needs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-16 18:19:41 +05:30
Suriya
32291cddbe Fix Global Catalogue browsing and import
Removes InventoryView's broken duplicate Global Catalogue tab, which
misused createproductlocation with catalogue ids that never match real
product ids (imports silently failed to land) and showed fabricated
Math.random() pricing/ratings. "Import Product" now routes to the
already-correct CatalogueBrowser instead.

Also fixes catalogueApi's product_count field mismatch (brand chip
counts were always blank), a pagination bug that capped the catalogue
at 100 of ~237 products with no way to see the rest, and replaces
ImportProductModal's free-text category id input with a real dropdown
scoped to the tenant's own categories, filtering subcategories to match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-16 17:31:29 +05:30
11baf732b7 import product catalogue 2026-07-16 17:05:06 +05:30