{
InitialContext ic = CVUtility.getInitialContext();
ItemLocalHome home = (ItemLocalHome)ic.lookup("local/Item");
ItemLocal itemLocal = home.create();
itemLocal.setDataSource(this.dataSource);
ItemVO item = itemLocal.getItem(userId,id);
int taxClassId = item.getTaxClassId();
int taxJurisdictionId = 0;
if (orderVO.getShipToAddIdValue()!=0)
{
ContactHelperLocalHome home1 = ( ContactHelperLocalHome )ic.lookup("local/ContactHelper");
ContactHelperLocal contactHelperLocal = home1.create();
contactHelperLocal.setDataSource(this.dataSource);
AddressVO addVO = contactHelperLocal.getAddress(orderVO.getShipToAddIdValue());
taxJurisdictionId = 0;
if (taxJurisdictionId !=0)
{
taxRate = getTax(taxClassId, taxJurisdictionId);
}//if (taxJurisdictionId !=0)
}//if InvoiceVO.shipToId!=null
((FloatMember)ie.get("UnitTaxrate")).setMemberValue(taxRate);
}catch (Exception e)
{
((FloatMember)ie.get("UnitTaxrate")).setMemberValue(0.0f);
System.out.println("[Exception][AccountHelperEJB.calculateOrderItems] Exception Thrown: "+e);
}
}//while
}//if counter!=0
if (newItemID != null && !newItemID.equals("") )
{
st = new StringTokenizer(newItemID, ",");
while (st.hasMoreTokens())
{
try
{
float taxRate = 0.0f;
token = (String)st.nextToken();
int intToken = Integer.parseInt(token);
InitialContext ic = CVUtility.getInitialContext();
ItemLocalHome home = (ItemLocalHome)ic.lookup("local/Item");
ItemLocal itemLocal = home.create();
itemLocal.setDataSource(this.dataSource);
ItemVO item = itemLocal.getItem(userId,intToken);
//Get the Required Fields from the Item VO
String name = item.getItemName();
String sku = item.getSku();
float price = (float)item.getPrice();
int id = item.getItemId();
int taxClassId = item.getTaxClassId();
int taxJurisdictionId = 0;
if (orderVO.getShipToAddIdValue()!=0)
{
try
{