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`.
This commit is contained in:
Suriya
2026-07-23 16:24:58 +05:30
parent 92165b986c
commit 02b5258000
3 changed files with 3 additions and 3 deletions

View File

@@ -143,7 +143,7 @@ export default function ImportProductModal({
catalogueid: product.id,
categoryid: validCategory,
subcategoryid: 0,
quantity: 1,
quantity: 0,
stocktype: "in",
status: "Draft",
retailprice: 0,