svn commit: r834033 - /ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java

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

svn commit: r834033 - /ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java

jleroux@apache.org
Author: jleroux
Date: Mon Nov  9 12:34:23 2009
New Revision: 834033

URL: http://svn.apache.org/viewvc?rev=834033&view=rev
Log:
Safer : set partyId only if all is OK

Modified:
    ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java

Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java?rev=834033&r1=834032&r2=834033&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java Mon Nov  9 12:34:23 2009
@@ -139,7 +139,6 @@
         m_nameEdit.requestFocusInWindow();
         m_dialog.showDialog(this);
         if (!cancelled) {
-            m_trans.setPartyId(m_partyId);
             GenericValue  person = null;
             try {
                 person = m_trans.getSession().getDelegator().findByPrimaryKey("Person", UtilMisc.toMap("partyId", m_partyId));
@@ -153,6 +152,7 @@
                     if (UtilValidate.isEmpty(result)) {
                         m_pos.getPromoStatusBar().displayClient(person.getString("lastName"));
                         m_pos.getPromoStatusBar().addPromoCode(cardId);
+                        m_trans.setPartyId(m_partyId);
                     } else {
                         m_pos.showDialog("dialog/error/exception", result);
                     }