}
if (!products.containsKey(productId)) {
products.put(productId, new TreeMap());
}
TreeMap productMap = (TreeMap)products.get(productId);
if (!productMap.containsKey(estimatedShipDate)) {
productMap.put(estimatedShipDate, UtilMisc.toMap("remainingQty", BigDecimal.ZERO, "reservations", FastList.newInstance()));
}
Map dateMap = (Map)productMap.get(estimatedShipDate);
BigDecimal remainingQty = (BigDecimal)dateMap.get("remainingQty");
//List reservations = (List)dateMap.get("reservations");