
This document will guide you on how to fix the “There is no stock of this item” error when performing an item refund.
Procedure:
1. Administration Menu > Maintenance > Resources
2. Under Resources click on event.addline from the list on the left side.
3. Copy-paste the below script right after the top few scripts lines. (i.e., After lines 5 – 9)
if(ticket.ticketType==0 && (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"; }
(Refer to the below Images)

4. Now comment (De-activate) the script lines from 5 to 9. To comment the lines select the lines you want to comment and click the “Toggle Comments” button from the list of buttons available on the top. (Refer to the below Images)


5. Repeat steps 3 and 4 for event.setline
(Refer to the below Images)



6. Save and Restart the system. This should fix the error while performing an item refund.