@veloceapps/sdk 12.0.0-1 → 12.0.0-11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -362,6 +362,10 @@ const generateTransactionItemFromPCM = (option, salesTransactionId, parentTi) =>
|
|
362
362
|
productName: option.name,
|
363
363
|
productCode: option.productCode,
|
364
364
|
productRelatedComponentId: option.productRelatedComponent?.id,
|
365
|
+
constraintEngineNodeStatus: {
|
366
|
+
attributes: [],
|
367
|
+
cfgStatus: 'User',
|
368
|
+
},
|
365
369
|
stiAttributes: [],
|
366
370
|
attributes: {
|
367
371
|
ParentReference: salesTransactionId,
|
@@ -421,11 +425,15 @@ const updateQuantity = (ti, qty, pcm, parentQty = 1) => {
|
|
421
425
|
else if (parentPrevQty !== parentNewQty) {
|
422
426
|
nextQty = calcNewQty(item, parentPrevQty, parentNewQty, pcm, qty, false);
|
423
427
|
}
|
424
|
-
|
428
|
+
const sti = {
|
425
429
|
...item,
|
426
430
|
qty: nextQty,
|
427
431
|
children: item.children.map(child => updateItem(child, item.qty, nextQty, false)),
|
428
432
|
};
|
433
|
+
if (nextQty !== item.qty) {
|
434
|
+
sti.constraintEngineNodeStatus = { ...sti.constraintEngineNodeStatus, cfgStatus: 'User' };
|
435
|
+
}
|
436
|
+
return sti;
|
429
437
|
};
|
430
438
|
return updateItem(ti, parentQty, parentQty, false);
|
431
439
|
};
|