}
else
{
product.setQtyAvail(temp-qtySold);
productDAO.updateProduct(product);
StockAlertSettings stockAlertLimit;
String stockAlertString="";
try{
stockAlertLimit = stockAlertSettingsDAO.getSettings();
}catch (NullPointerException e) {
StockAlertSettings settings= new StockAlertSettings();
settings.setVariable("min_qty");
settings.setValue("10");
stockAlertLimit = stockAlertSettingsDAO.getSettings();
}
if(product.getQtyAvail()< Float.parseFloat(stockAlertLimit.getValue()))
stockAlertString="stockAlert="+temp;
billId= Long.parseLong(request.getSession().getAttribute("billId").toString());