itemBalance.setInvoiceAmount(invoiceAmount);
iterator = orderItemDetail.getShipDetails().iterator();
int shipQty = 0;
while (iterator.hasNext()) {
ShipDetail shipDetail = (ShipDetail) iterator.next();
ShipHeader header = shipDetail.getShipHeader();
if (header.getShipHeaderId() == null) {
continue;
}
if (header.getShipStatus().equals(Constants.ORDERSTATUS_CANCELLED) || header.getShipStatus().equals(Constants.ORDERSTATUS_VOIDED)) {
continue;
}
if (shipHeader != null) {
if (header.getShipHeaderId().equals(shipHeader.getShipHeaderId())) {
continue;
}
}
shipQty += shipDetail.getItemShipQty().intValue();
}
itemBalance.setShipQty(shipQty);
iterator = orderItemDetail.getCreditDetails().iterator();
int creditQty = 0;