// initialize validation
Validation validation = new Validation();
// invoice
if (this.getOrderid() == null || this.getOrderid().trim().length() <= 0) {
errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.general.requiredField", "Order"));
}
if (this.getDate() == null || this.getDate().trim().length() <= 0) {
errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.general.requiredField", "Date"));
}
boolean itemPresent =false;
int counter = 0;
if (this.itemid != null)
{
ItemLines lines = this.getItemLines();
for (int i=0;i<this.linestatus.length;i++)
{
if (this.linestatus[i] != null &&
this.linestatus[i].equalsIgnoreCase("Deleted"))
{
counter++;
}
}
if (this.itemid.length > 0 && this.linestatus.length != counter)
{
itemPresent = true;
}
}
if (itemPresent == false)
{
errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.general.requierdField", "Items"));
}
if (errors != null)