fix(sync): allow kit components with price=0 to import
Price=0 is a valid state for kit components in crm_politici_pret_art, inserted automatically by the price sync system. Previously, the kit validation treated pret=0 the same as missing, blocking orders from importing even when all SKU mappings were correctly configured. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -466,7 +466,7 @@ def validate_kit_component_prices(mapped_codmat_data: dict, id_pol: int,
|
||||
WHERE id_pol = :pol AND id_articol = :id_art
|
||||
""", {"pol": pol, "id_art": comp["id_articol"]})
|
||||
row = cur.fetchone()
|
||||
if not row or (row[0] is not None and row[0] == 0):
|
||||
if not row:
|
||||
sku_missing.append(comp["codmat"])
|
||||
if sku_missing:
|
||||
missing[sku] = sku_missing
|
||||
|
||||
Reference in New Issue
Block a user