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

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

Search

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);
  line.setPrice(newPrice);
 
 } catch (NumberFormatException e) {
  JOptionPane.showMessageDialog(null, "Not valid number: " + value, "Error", JOptionPane.PLAIN_MESSAGE);
 
 }

4. Save changes and restart the application.

Retrieved from "http://wiki.openbravo.com/wiki/POS_-_Enter_product_price_all_times"

This page has been accessed 6,067 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.