u
This commit is contained in:
@@ -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,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user