Normally this error occurs because of some error in the scripts updated in “event.setline” under “Resources”
Follow the below steps
- Administration Menu > Maintenance > Resources
- Under resources click “event.setline” from the left side list
- Copy paste the below script on the scripts page under “event.setline” (If already a similar script is present, check if its mentioned <=0 at the end of the second line, if yes remove the = from the equation to make it <0)
if(sales.getStock(line.getProductID())==0 || sales.getStock(line.getProductID())-line.getMultiply()<0) { javax.swing.JOptionPane.showMessageDialog(null, "There is no stock of this item."); return "Cancel"; }
4. Save the script by clicking the save button on top right
5. Restart the system