feat: use 'Stock conditionné' for Shopify stock on carrelage tabs
Priorité à Stock conditionné (boîtes) sur Stock (en pièce) si renseigné. Colonne exclue des métachamps spécifiques. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ const COMMON_HEADERS = new Set([
|
||||
'Description courte', 'Description longue',
|
||||
'Date de début de promo', 'Date de fin de promo',
|
||||
'État de la TVA', 'Classe de TVA', 'En stock ?',
|
||||
'Stock (en pièce)', 'Vendre individuellement ?',
|
||||
'Stock (en pièce)', 'Stock conditionné', 'Vendre individuellement ?',
|
||||
'Prix marché', 'Prix remisé', 'Code ecopart', 'Ecopart montant',
|
||||
'Famille', 'Sous famille',
|
||||
"Classe d'expédition (en retrait, livraison)",
|
||||
@@ -39,6 +39,7 @@ export function parseTabRows(tab: string, headers: string[], rows: string[][], d
|
||||
nom: findColIndex(headers, 'Nom'),
|
||||
publie: findColIndex(headers, 'Publié'),
|
||||
stock: findColIndex(headers, 'Stock (en pièce)'),
|
||||
stockConditionne: findColIndex(headers, 'Stock conditionné'),
|
||||
prixMarche: findColIndex(headers, 'Prix marché'),
|
||||
prixRemise: findColIndex(headers, 'Prix remisé'),
|
||||
poids: findColIndex(headers, 'Poids (kg) fonction unité'),
|
||||
@@ -65,7 +66,7 @@ export function parseTabRows(tab: string, headers: string[], rows: string[][], d
|
||||
title: get(row, idx.nom),
|
||||
priceMarket: get(row, idx.prixMarche).replace(',', '.'),
|
||||
priceActual: get(row, idx.prixRemise).replace(',', '.'),
|
||||
stock: parseInt(get(row, idx.stock) || '0', 10) || 0,
|
||||
stock: parseInt(get(row, idx.stockConditionne) || get(row, idx.stock) || '0', 10) || 0,
|
||||
weightKg: parseFloat(get(row, idx.poids).replace(',', '.') || '0') || 0,
|
||||
vendor: get(row, idx.marque),
|
||||
famille: get(row, idx.famille),
|
||||
|
||||
Reference in New Issue
Block a user