View Categories

Fixing “There is no stock of this item” error when trying to refund an item.

1 min read

Table of Contents

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)

Copy-paste the scripts – Click the Save button once done

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)

Comment the existing top scripts – Click the Save button once done
After successfully Commenting the lines it should look like in the above image

5. Repeat steps 3 and 4 for event.setline

(Refer to the below Images)

Copy-paste the scripts – Click the Save button once done
This image has an empty alt attribute; its file name is image-40-edited.png
Comment the existing top scripts – Click the Save button once done
After successfully Commenting the lines it should look like in the above image

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

0 Comments

Leave a Reply

Arrow-up