UnicentaPOS Help Wiki

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:[]

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

2) Create the event.total Resource[]

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. ===