Project

General

Profile

Edit Copy Actions

Support #10999

open

Support #10821: Gaps in Order Flow from E-commerce & Admin panel side

No check on expiration date or customer delivery distance.

Added by Yalavarthi Thriveni about 17 hours ago. Updated about 14 hours ago.

Status:
New
Priority:
Normal
Target version:
-
Start date:
09/22/2026
Due date:
% Done:

0%

Estimated time:

Description

Order Placement & Initial Warehouse Map
Partial / Defective: Only checks StockBatch.sort({ receivedAt: 1 }). No check on expiration date or customer delivery distance.

Inventory must be reserved across regional fulfillment centers (US West/East, India North/South) based on customer proximity and postal routing. Allocation within each warehouse must strictly follow FEFO (First-Expired, First-Out), excluding batches where expirationDate <= now + buffer. If stock is distributed across hubs, the allocation engine must produce optimal fulfillment splits

consumeStockBatchService sorts strictly by receivedAt: 1 (FIFO). It completely ignores expirationDate, violating FEFO requirements for perishable nursery goods.
Expired batches are not filtered out (expirationDate: { $gt: new Date() } is missing), allowing expired lots to be allocated to customer orders.
consumeStockBatchService does not take locationId or warehouseId as a query parameter; it queries global batches indiscriminately, breaking regional warehouse containment.
No proximity routing algorithm exists to compute nearest warehouse by customer ZIP code (US) or PIN code (India).


Add

Subtasks


Add

Related issues

Edit Copy Actions

Also available in: Atom PDF