- {{ $t("Download") }}
+ {{ $t("Export") }}
{{ $t('Packed Orders') }}
- {{ $t("Download orders that are packed and haven't been shipped yet. Use the downloaded file to send the packed order details to a carrier where shipping labels and tracking codes will be generated.") }}
+ {{ $t("Export orders that are packed and haven't been shipped yet. Use the exported file to send the packed order details to a carrier where shipping labels and tracking codes will be generated.") }}
- {{ $t('Download') }}
+ {{ $t('Export') }}
diff --git a/src/views/InProgress.vue b/src/views/InProgress.vue
index e53fd7a8..23afb1e8 100644
--- a/src/views/InProgress.vue
+++ b/src/views/InProgress.vue
@@ -539,12 +539,20 @@ export default defineComponent({
}
} else {
const productName = outOfStockItem.productName
-
- // TODO: ordersCount is not correct as current we are identifying orders count by only checking items visible on UI and not other orders
- const ordersCount = this.inProgressOrders.list.map((order: any) => order.items.filter((item: any) => item.productSku === outOfStockItem.productSku))?.filter((item: any) => item.length).length
-
- // displaying product count decrement by 1 as we are displaying one product sku directly.
- message = this.$t(", and other products are identified as unfulfillable. other orders containing these products will be unassigned from this store and sent to be rebrokered.", {productName, products: itemsToReject.length - 1, space: '
', orders: ordersCount})
+ const itemsToRejectNotInStock = itemsToReject.filter((item: any) => item.rejectReason === 'NOT_IN_STOCK');
+
+ // TODO: ordersCount is not correct as current we are identifying orders count by only checking items visible on UI and not other orders
+ const ordersCount = this.inProgressOrders.list.map((inProgressOrder: any) => inProgressOrder.items.filter((item: any) => itemsToRejectNotInStock.some((outOfStockItem: any) => outOfStockItem.productSku === item.productSku) && item.orderId !== order.orderId))?.filter((item: any) => item.length).length;
+
+ if (itemsToReject.length === 1 && ordersCount) {
+ message = this.$t("is identified as unfulfillable. other containing this product will be unassigned from this store and sent to be rebrokered.", { productName, space: '
', orders: ordersCount, orderText: ordersCount > 1 ? 'orders' : 'order' })
+ } else if (itemsToReject.length === 1 && !ordersCount) {
+ message = this.$t("is identified as unfulfillable. This order item will be unassigned from this store and sent to be rebrokered.", { productName, space: '
' })
+ } else if (itemsToReject.length > 1 && ordersCount) {
+ message = this.$t(", and other products are identified as unfulfillable. other containing these products will be unassigned from this store and sent to be rebrokered.", { productName, products: itemsToReject.length - 1, space: '
', orders: ordersCount, orderText: ordersCount > 1 ? 'orders' : 'order' })
+ } else {
+ message = this.$t(", and other products are identified as unfulfillable. These order items will be unassigned from this store and sent to be rebrokered.", { productName, products: itemsToReject.length - 1, space: '
' })
+ }
}
const alert = await alertController
.create({