new Double(Double.parseDouble(hm.get("AmountPaid").toString()));
}
try
{
IntMember intInvID =
new IntMember("InvoiceID", invID, 10, null, 'T', true, 10);
IntMember intOrderID = null;
if (hm.get("OrderID") != null)
{
int oID = Integer.parseInt(hm.get("OrderID").toString());
intOrderID = new IntMember("Order", oID, 10, null, 'T', true, 10);
}
StringMember strCustID = null;
if (hm.get("CustomerID") != null)
{
strCustID =
new StringMember("CustomerID", (String) hm.get("CustomerID"), 10,
null, 'T', true);
}
else
{
strCustID =
new StringMember("CustomerID", null, 10, null, 'T', true);
}
DateMember date = null;
if (hm.get("InvoiceDate") != null)
{
date =
new DateMember("InvoiceDate", (Date) hm.get("InvoiceDate"), 10,
null, 'T', false, 10, "EST");
}
else
{
date =
new DateMember("InvoiceDate", null, 10, null, 'T', false, 10,
"EST");
}
DoubleMember dblAmount =
new DoubleMember("Total", amount, 10, null, 'T', false, 10);
StringMember strPaid = null;
double amt = 0;
if (amount != null)
{
amt = amount.doubleValue();
}
double amtPaid = 0;
if (amountPaid != null)
{
amtPaid = amountPaid.doubleValue();
}
int result = 0;
if ((amount != null) && (amountPaid != null))
{
result = amount.compareTo(amountPaid);
}
if (result == 0)
{
strPaid = new StringMember("Paid", "Yes", 10, null, 'T', false);
}
else if ((result > 0) && (amtPaid > 0))
{
strPaid = new StringMember("Paid", "Partial", 10, null, 'T', false);
}
else
{
strPaid = new StringMember("Paid", "No", 10, null, 'T', false);
}
StringMember strCreator = null;
if (hm.get("Creator") != null)
{
strCreator =
new StringMember("Creator", (String) hm.get("Creator"), 10, null,
'T', true);
}
else
{
strCreator = new StringMember("Creator", null, 10, null, 'T', true);
}
int creatorID = 0;
if (hm.get("CreatorID") != null)
{
creatorID = ((Long) hm.get("CreatorID")).intValue();
}
int custID = 0;
if (hm.get("CustID") != null)
{
custID = ((Long) hm.get("CustID")).intValue();
}
InvoiceListElement invListElement = new InvoiceListElement(invID);
invListElement.put("InvoiceID", intInvID);
invListElement.put("Order", intOrderID);
invListElement.put("CustomerID", strCustID);
invListElement.put("CustID",
new IntMember("CustID", custID, 10, null, 'T', true, 10));
invListElement.put("InvoiceDate", date);
invListElement.put("Total", dblAmount);
invListElement.put("Paid", strPaid);
invListElement.put("Creator", strCreator);
invListElement.put("CreatorID",
new IntMember("CreatorID", creatorID, 10, null, 'T', true, 10));
StringBuffer stringbuffer = new StringBuffer("00000000000");
stringbuffer.setLength(11);
String s3 = (new Integer(i)).toString();