fix(fakeedi updates): corrected an issue where multi orders would not update if 1 release was used

This commit is contained in:
2025-04-30 12:14:26 -05:00
parent 156cd845e0
commit 7ed1c32ae9
5 changed files with 24 additions and 7 deletions

View File

@@ -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}`);