i
This commit is contained in:
@@ -345,9 +345,13 @@ export async function executeCompanyImport({
|
|||||||
|
|
||||||
// Update barcode if provided
|
// Update barcode if provided
|
||||||
if (barcode) {
|
if (barcode) {
|
||||||
const currentEans = existingArticle.eans || [];
|
try {
|
||||||
if (!currentEans.includes(barcode)) {
|
const currentEans = existingArticle.eans || [];
|
||||||
await store.article.setEansBySku(googleAuthId, sku, [...currentEans, barcode]);
|
if (!currentEans.includes(barcode)) {
|
||||||
|
await store.article.setEansBySku(googleAuthId, sku, [...currentEans, barcode]);
|
||||||
|
}
|
||||||
|
} catch (eanErr) {
|
||||||
|
console.warn(`[Import] Could not set EAN for ${sku}:`, eanErr.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -374,7 +378,11 @@ export async function executeCompanyImport({
|
|||||||
|
|
||||||
// Set barcode if present
|
// Set barcode if present
|
||||||
if (barcode) {
|
if (barcode) {
|
||||||
await store.article.setEansBySku(googleAuthId, sku, [barcode]);
|
try {
|
||||||
|
await store.article.setEansBySku(googleAuthId, sku, [barcode]);
|
||||||
|
} catch (eanErr) {
|
||||||
|
console.warn(`[Import] Could not set EAN for ${sku}:`, eanErr.message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
articlesImported++;
|
articlesImported++;
|
||||||
|
|||||||
Reference in New Issue
Block a user