FANDOM


THIS MY EDITED VERSION OF ANOTHER SCRIPT POSTED HERE

It is available under the Creative Commons Share and Share Alike Licence

This script will not allow a user to complete a sale until a customer has been selected.

1) Add the following event to the Ticket.Buttons resource: Edit

<event key="ticket.total" code="event.total"/>

2) Create the event.total Resource Edit

Create a text resource called event.total and add the following to it:

if (ticket.getCustomer()== null){
javax.swing.JOptionPane.showMessageDialog(null, "You must select a customer", "Customer Warning", JOptionPane.WARNING_MESSAGE);
return "Cancel";
}else{
return null;
}

=== That should be it.
You can obviously change anything you wish to suite your setup.
Let me know if something is not working or something can be bone better. ===

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.