svn commit: r597972 - /ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r597972 - /ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java

lektran
Author: lektran
Date: Sun Nov 25 02:56:03 2007
New Revision: 597972

URL: http://svn.apache.org/viewvc?rev=597972&view=rev
Log:
Fixes for numerous bugs relating to processing multiple POS payments, resolves OFBIZ-1426.  Also a few fixes for manual cc payments

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=597972&r1=597971&r2=597972&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 Sun Nov 25 02:56:03 2007
@@ -43,7 +43,7 @@
             Debug.log("Processing [Cash] Amount : " + amount, module);
 
             // add the payment
-            trans.addPayment("CASH", amount, "N/A", null);
+            trans.addPayment("CASH", amount, null, null);
         } catch (GeneralException e) {
             // errors handled
         }
@@ -59,6 +59,7 @@
         // check for no/external payment processing
         int paymentCheck = trans.checkPaymentMethodType("PERSONAL_CHECK");
         if (paymentCheck == PosTransaction.NO_PAYMENT) {
+            trans.clearPayment("PERSONAL_CHECK");
             processNoPayment(pos, "PERSONAL_CHECK");
             return;
         } else if (paymentCheck == PosTransaction.EXTERNAL_PAYMENT) {
@@ -148,6 +149,7 @@
                         msrInfoStr = input.value();
                     }
                 }
+                input.clearFunction("MSRINFO");
                 input.setFunction("MSRINFO", msrInfoStr);
                 String[] msrInfoArr = msrInfoStr.split("\\|");
                 int allInfo = msrInfoArr.length;
@@ -172,6 +174,8 @@
                         if (pmId != null) {
                             trans.addPayment(pmId, amount);
                         }
+                        input.clearFunction("MSRINFO");
+                        input.clearFunction("CREDIT");
                         pos.refresh();
                         break;
                     case 1: // card number only found
@@ -195,7 +199,7 @@
             Debug.log("Processing [" + paymentMethodTypeId + "] Amount : " + amount, module);
 
             // add the payment
-            trans.addPayment(paymentMethodTypeId, amount, "N/A", null);
+            trans.addPayment(paymentMethodTypeId, amount, null, null);
         } catch (GeneralException e) {
             // errors handled
         }