calcPage(form, list, pageNo);
Vector<OrderDisplayForm> vector = new Vector<OrderDisplayForm>();
int startRecord = (pageNo - 1) * Constants.MYACCOUNT_LISTING_PAGE_SIZE;
int endRecord = startRecord + Constants.MYACCOUNT_LISTING_PAGE_SIZE;
for (int i = startRecord; i < list.size() && i < endRecord; i++) {
OrderHeader orderHeader = (OrderHeader) list.get(i);
OrderDisplayForm orderDisplay = new OrderDisplayForm();
orderDisplay.setOrderHeaderId(Format.getLong(orderHeader.getOrderHeaderId()));
orderDisplay.setOrderNum(orderHeader.getOrderNum());
orderDisplay.setCustFirstName(orderHeader.getCustomer().getCustAddress().getCustFirstName());
orderDisplay.setCustLastName(orderHeader.getCustomer().getCustAddress().getCustLastName());
orderDisplay.setCustEmail(orderHeader.getCustEmail());
orderDisplay.setCustCityName("");
orderDisplay.setCustStateCode("");
orderDisplay.setCustCountryCode("");
orderDisplay.setPriceTotal("");
orderDisplay.setShippingTotal(Format.getFloatObj(orderHeader.getShippingTotal()));
orderDisplay.setTaxTotal("");
orderDisplay.setOrderTotal(contentBean.getFormatter().formatCurrency(orderHeader.getOrderTotal()));
String orderStatus = Languages.getLangTranValue(contentBean.getContentSessionKey().getLangId(), "content.text.order.status." + orderHeader.getOrderStatus());
orderDisplay.setOrderStatus(orderStatus);
orderDisplay.setOrderDatetime(Format.getDate(orderHeader.getOrderDate()));
PaymentTran payment = orderHeader.getPaymentTran();
if (payment != null) {
orderDisplay.setPaymentReference1(payment.getPaymentReference1());
}
for (ShipHeader shipHeader : orderHeader.getShipHeaders()) {
orderDisplay.setShipDatetime(Format.getDate(shipHeader.getShipDate()));
}
vector.add(orderDisplay);
}
form.setOrders(vector);