POS - Enter product price all times
Code snippetName: POS - Enter product price all times
|
This code snippet is intented to implement a way to enter the price manually when selecting any product.
This code has been copied from this forum thread.
- Login as Administrator and go to Maintenance-->Resources and select Ticket.Buttons resource.
- Add a new line:
<event key="ticket.addline" code="event.addline"/>
- Create new resource event.addline with this content:
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.