Skip to content

Instantly share code, notes, and snippets.

@abhiyerra
Created January 7, 2009 07:55
Show Gist options
  • Save abhiyerra/44211 to your computer and use it in GitHub Desktop.
Save abhiyerra/44211 to your computer and use it in GitHub Desktop.
import com.openbravo.pos.payment.PaymentInfo;
import javax.swing.JOptionPane;
boolean isCash = false;
String change = "";
PaymentInfo p = ticket.payments.getFirst();
if ("cash".equals(p.getName())) {
isCash = true;
change = p.printChange();
}
if(isCash) {
JOptionPane.showMessageDialog(null, "Return " + change, "Change", JOptionPane.PLAIN_MESSAGE);
}
<!-- This should go in your Ticket.Buttons resource file. -->
<event key="ticket.close" code="event.close"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment