Author: jleroux
Date: Wed Oct 21 09:23:43 2009
New Revision: 827936
URL:
http://svn.apache.org/viewvc?rev=827936&view=revLog:
Payment error cases were not handled right
Modified:
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java
Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java?rev=827936&r1=827935&r2=827936&view=diff==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java Wed Oct 21 09:23:43 2009
@@ -350,17 +350,17 @@
}
public static synchronized void processSale(PosScreen pos) {
- pos.setWaitCursor();
PosTransaction trans = PosTransaction.getCurrentTx(pos.getSession());
- PosScreen.currentScreen.getOutput().print(UtilProperties.getMessage(PosTransaction.resource,"PosProcessing",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/notenoughfunds");
+ trans.clearPayment("CASH");
} else {
// manual locks (not secured; will be unlocked on clear)
+ pos.setWaitCursor();
+ PosScreen.currentScreen.getOutput().print(UtilProperties.getMessage(PosTransaction.resource,"PosProcessing",Locale.getDefault()));
pos.getInput().setLock(true);
pos.getButtons().setLock(true);
pos.refresh(false);