CSR-999 | Remove items after priced to avoid error
Duplicate partNumbers with different prices were causing the first entry to assign the price to all duplicates
This commit is contained in:
parent
a3365bc299
commit
6fde96f7b0
1 changed files with 2 additions and 1 deletions
|
|
@ -1588,9 +1588,10 @@ function convertGlassPieceNamingFromApi(glassArray) {
|
|||
|
||||
function addPricesToLineItems(lineItems, pricingLineItems) {
|
||||
lineItems.forEach((lineItem) => {
|
||||
let pricedLineItem = pricingLineItems.find(
|
||||
let lineItemIndex = pricingLineItems.findIndex(
|
||||
(pricingLineItem) => pricingLineItem.partNumber === lineItem.partNumber
|
||||
);
|
||||
let pricedLineItem = pricingLineItems.splice(lineItemIndex, 1)[0];
|
||||
lineItem.laborAmount = pricedLineItem.laborAmount;
|
||||
lineItem.sellingPrice = pricedLineItem.sellingPrice;
|
||||
lineItem.kitPrice = pricedLineItem.kitPrice;
|
||||
|
|
|
|||
Loading…
Reference in a new issue