Collection<BackOrderItem> backOrderItems = backOrderStock.findBackOrderItems();
if (backOrderItems != null) {
logger.debug("AdminController.getBackOrders() - BackOrders found!");
Iterator<BackOrderItem> i = backOrderItems.iterator();
while (i.hasNext()) {
BackOrderItem backOrderItem = (BackOrderItem) i.next();
long backOrderID = backOrderItem.getBackOrderID();
String inventoryID = backOrderItem.getInventory().getInventoryId();
// Get the inventory quantity and name for the back order item information.
Inventory item = catalog.getItemInventory(inventoryID);
int quantity = item.getQuantity();
backOrderItem.setInventoryQuantity(quantity);
String name = item.getName();
// catalog.remove();
backOrderItem.setName(name);
// Don't include backorders that have been completed.
if (!(backOrderItem.getStatus().equals(Util.STATUS_ADDEDSTOCK))) {
String invID = backOrderItem.getInventory().getInventoryId();
String supplierOrderID = backOrderItem.getSupplierOrderID();
String status = backOrderItem.getStatus();
String lowDate = new Long(backOrderItem.getLowDate()).toString();
String orderDate = new Long(backOrderItem.getOrderDate()).toString();
logger.debug("AdminController.getBackOrders() - backOrderID = " + backOrderID);
logger.debug("AdminController.getBackOrders() - supplierOrderID = " + supplierOrderID);
logger.debug("AdminController.getBackOrders() - invID = " + invID);
logger.debug("AdminController.getBackOrders() - name = " + name);
logger.debug("AdminController.getBackOrders() - quantity = " + quantity);