View source | Discuss this page | Page history | Printable version   
Main Page
Upload file
What links here
Recent changes

PDF Books
Add page
Show collection (0 pages)
Collections help


POS - Enter product price all times

Code snippet

Name: POS - Enter product price all times
Version: POS/2.20 & 2.30
Author: Mikel Irurita

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.

  1. Login as Administrator and go to Maintenance-->Resources and select Ticket.Buttons resource.
  2. Add a new line:
    <event key="ticket.addline" code="event.addline"/>
  3. Create new resource event.addline with this content:
 import javax.swing.JOptionPane;
 value = javax.swing.JOptionPane.showInputDialog("Price", "");
 try {
  Double newPrice = new Double(value);
 } catch (NumberFormatException e) {
  JOptionPane.showMessageDialog(null, "Not valid number: " + value, "Error", JOptionPane.PLAIN_MESSAGE);

4. Save changes and restart the application.

Retrieved from ""

This page has been accessed 6,019 times. This page was last modified on 10 November 2009, at 10:43. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.