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 - Remove 0 byte Old Tickets

Code snippet

Name: POS - Remove 0 byte Old Tickets
Version: POS/2.20 & 2.30
Author: James Bolongan

This functionality/code is created based on this thread.

View saveCurrentTicket method in the JTicketsBagShared class.

Update the saveCurrentTicket function with this new code.


   private void saveCurrentTicket() {
       // save current ticket, if exists,
       if (m_sCurrentTicket != null) {
           try {
               dlReceipts.insertSharedTicket(m_sCurrentTicket, m_panelticket.getActiveTicket()); 
               TicketInfo l = dlReceipts.getSharedTicket(m_sCurrentTicket);
               if(l.getLinesCount() == 0)  {
           } catch (BasicException e) {
               new MessageInf(e).show(this);

This saveCurrentTicket function is now included a functionality that will not saved a ticket if the sales is empty or a 0-byte ticket.

Retrieved from ""

This page has been accessed 3,990 times. This page was last modified on 19 November 2009, at 04:03. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.