FANDOM


THIS MY EDITED VERSION OF ANOTHER SCRIPT POSTED HERE Edit

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

This code snippet is intented to implement a way to enter the price manually when selecting any product.

1.Login as Administrator and go to Maintenance-->Resources and select Ticket.Buttons resource. Edit

2.Add a new line: Edit

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

3.Create new resource event.addline with this content:Edit

 import javax.swing.JOptionPane;
 
 value = javax.swing.JOptionPane.showInputDialog("Price", "");
 
 try {
  Double newPrice = new Double(value);
  line.setPrice(newPrice);
 
 } catch (NumberFormatException e) {
  JOptionPane.showMessageDialog(null, "Not valid number: " + value, "Error", JOptionPane.PLAIN_MESSAGE);
 
 }

4. Save changes and restart the application. Edit

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.