dl.setSqlQuery("select * from `invoiceitems` where status != 'Deleted' and InvoiceID = "+this.invoiceVO.getInvoiceId()+";");
Collection col = dl.executeQuery();
if (col != null)
{
ItemLines itemLines= new ItemLines();
Iterator it = col.iterator();
int count = 1;
while (it.hasNext())
{
HashMap hm =(HashMap)it.next();
int lineID = ((Number)hm.get("InvoiceLineID")).intValue();
int itemID = ((Number)hm.get("ItemID")).intValue();
int quantity = ((Number)hm.get("Quantity")).intValue();
float price = ((Number)hm.get("Price")).floatValue();
String sku = (String) hm.get("SKU");
String description = (String) hm.get("Description");
float taxTotal = ((Number)hm.get("taxAmount")).floatValue();
String status = (String) hm.get("status");
float priceExtended = quantity * price;
IntMember LineId = new IntMember("LineId",lineID,'D',"",'T',false,20);
IntMember ItemId = new IntMember("ItemId",itemID,'D',"",'T',false,20);
IntMember Quantity = new IntMember("Quantity",quantity,'D',"",'T',false,20);
FloatMember PriceEach = new FloatMember("Price",new Float(price),'D',"",'T',false,20);
StringMember SKU = new StringMember("SKU",sku,'D',"",'T',false);
StringMember Description = new StringMember("Description",description,'D',"",'T',false);
FloatMember PriceExtended = new FloatMember("PriceExtended",new Float(priceExtended),'D',"",'T',false,20);
FloatMember TaxAmount = new FloatMember("TaxAmount",new Float(taxTotal),'D',"",'T',false,20);
ItemElement ie = new ItemElement(11);
ie.put ("LineId",LineId);
ie.put ("ItemId",ItemId);
ie.put ("Quantity",Quantity);
ie.put ("Price",PriceEach);
ie.put ("SKU",SKU);
ie.put ("Description",Description);
ie.put ("PriceExtended",PriceExtended);
ie.put ("TaxAmount",TaxAmount);
ie.setLineStatus(status);
itemLines.put(""+count,ie);
count ++;
}
this.invoiceVO.setItemLines(itemLines);
}// end of if
}