diff --git a/src/services/OrderService.ts b/src/services/OrderService.ts index 1a9dc7d0..74fda0da 100644 --- a/src/services/OrderService.ts +++ b/src/services/OrderService.ts @@ -376,6 +376,9 @@ const fetchShipmentPackages = async (shipmentIds: Array, isTrackingRequi if(!isTrackingRequired) { trackingCodeFilters = { "trackingCode_op": "empty", + "trackingCode_grp": "1", + "fetchShipmentPackages_op": "SHRSCS_VOIDED", + "fetchShipmentPackages_grp": "2" } } diff --git a/src/store/modules/order/actions.ts b/src/store/modules/order/actions.ts index 81aabb53..41848f93 100644 --- a/src/store/modules/order/actions.ts +++ b/src/store/modules/order/actions.ts @@ -214,7 +214,7 @@ const actions: ActionTree = { }, []); // If there is any shipment package with missing tracking code, retry shipping label - const missingLabelImage = this.state.util.productStoreShipmentMethCount > 0 ? currentShipmentPackages.some((shipmentPackage:any) => shipmentPackage.trackingCode === null) : false; + const missingLabelImage = this.state.util.productStoreShipmentMethCount > 0 ? currentShipmentPackages.some((shipmentPackage:any) => shipmentPackage.trackingCode === null || shipmentPackage.trackingCode === '') : false; return { ...order, diff --git a/src/store/modules/orderLookup/actions.ts b/src/store/modules/orderLookup/actions.ts index d8d53632..9744d6be 100644 --- a/src/store/modules/orderLookup/actions.ts +++ b/src/store/modules/orderLookup/actions.ts @@ -341,7 +341,7 @@ const actions: ActionTree = { return orderSegmentInfo }, {}) : [] - let orderShipmentPackages = [] + let orderShipmentPackages = [] as any const shipmentIds = Object.values(orderRouteSegmentInfo).flatMap((routes: any) => routes.map((route: any) => route.shipmentId)); try { @@ -359,6 +359,15 @@ const actions: ActionTree = { return shipment; }, {}); + Object.values(orderRouteSegmentInfo).map((segments: any) => { + segments.map((segment: any) => { + const currentPackage = orderShipmentPackages.find((shipmentPackage: any) => shipmentPackage.shipmentId === segment.shipmentId) + if(currentPackage && currentPackage.carrierServiceStatusId === "SHRSCS_VOIDED") { + segment.trackingIdNumber = "" + } + }) + }) + order["shipmentPackages"] = shipmentPackages; const carrierPartyIds = [] as any;