This commit is contained in:
seb
2026-10-12 03:10:35 +02:00
parent 15a17574c3
commit a2e446af47
17 changed files with 647 additions and 335 deletions

View File

@@ -179,11 +179,19 @@ export async function executeCompanyImport({
// MARK: - Phase 7: Orders / Receipts
// #region Phase 7: Orders / Receipts
const allArtIdToSku = new Map();
for (const a of artRecords) {
const kArt = cleanValue(a.id ?? a.kArtikel);
const sku = cleanValue(a.sku ?? a.cArtNr);
if (kArt && sku) allArtIdToSku.set(kArt, sku);
}
const ordersResult = await importOrders({
store,
googleAuthId,
manRecords,
itemRecords,
jtlArtIdToSku: allArtIdToSku,
progressTracker,
});
// #endregion
@@ -213,6 +221,8 @@ export async function executeCompanyImport({
ordersTotal: totalReceiptsCount,
ordersImported: ordersResult.ordersImported,
ordersSkipped: ordersResult.ordersSkipped,
paymentsImported: ordersResult.paymentsImported,
shippingsImported: ordersResult.shippingsImported,
},
};
}