fix(fakeedi updates): corrected an issue where multi orders would not update if 1 release was used
This commit is contained in:
@@ -109,8 +109,12 @@ export const standardOrders = async (data: any, user: any) => {
|
||||
filterOrders.forEach((oo: any) => {
|
||||
const isMatch = openOrders.some(
|
||||
(o: any) =>
|
||||
// check the header
|
||||
String(o.CustomerOrderNumber).trim() ===
|
||||
String(oo.CustomerOrderNumber).trim()
|
||||
String(oo.CustomerOrderNumber).trim() &&
|
||||
// and check the customer release is not in here.
|
||||
String(o.CustomerRealeaseNumber).trim() ===
|
||||
String(oo.CustomerRealeaseNumber).trim()
|
||||
);
|
||||
if (!isMatch) {
|
||||
console.log(`ok to update: ${oo.CustomerOrderNumber}`);
|
||||
|
||||
Reference in New Issue
Block a user