public static synchronized void processSale(PosScreen pos) {
PosTransaction trans = PosTransaction.getCurrentTx(pos.getSession());
Locale defaultLocale = Locale.getDefault();
if (trans.isEmpty()) {
PosScreen newPos = pos.showPage("pospanel");
newPos.showDialog("dialog/error/noitems");
} else if (trans.getTotalDue().compareTo(BigDecimal.ZERO) > 0) {
pos.showDialog("dialog/error/exception", UtilProperties.getMessage("Xuilabels", "NOT_ENOUGH_FUNDS", defaultLocale));
trans.clearPayment("CASH");
} else {
// manual locks (not secured; will be unlocked on clear)