![](https://www.saleculator.com/wp-content/uploads/2021/12/image-32.png)
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)
![](https://www.saleculator.com/wp-content/uploads/2021/12/image-33-edited.png)
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)
![](https://www.saleculator.com/wp-content/uploads/2021/12/image-42-edited.png)
![](https://www.saleculator.com/wp-content/uploads/2021/12/image-43-edited.png)
5. Repeat steps 3 and 4 for event.setline
(Refer to the below Images)
![](https://www.saleculator.com/wp-content/uploads/2021/12/image-34-edited-1.png)
![This image has an empty alt attribute; its file name is image-40-edited.png](https://www.saleculator.com/wp-content/uploads/2021/12/image-40-edited.png)
![](https://www.saleculator.com/wp-content/uploads/2021/12/image-41-edited.png)
6. Save and Restart the system. This should fix the error while performing an item refund.