//  Saleculator - Billing System.
//  event.addline


//Check for zero priced item
Double price = line.getSalePrice();
if(price==0.0)
{
    Double newPrice = sales.readNumber("Enter Price:");
    line.setSalePrice(newPrice);
    //sales.savePrice(newPrice, line.getProductID());
}

//Check for open item
if(line.getProductName() == "" || line.getProductName().startsWith("Open Item")) 
{
    //String itemname = sales.readText("Enter Item Name:");
    //line.setProperty("product.name", itemname);
    line.setProperty("product.name", "Item "+(index+2));
}

//Set default KOT
if (line.getProperty("kotnum") == null){
line.setProperty("kotnum", "KOT1");
}
if (line.getProperty("sendstatus") == null){
line.setProperty("sendstatus", "No");
}

