Author: jleroux
Date: Mon Nov 9 16:44:23 2009
New Revision: 834140
URL:
http://svn.apache.org/viewvc?rev=834140&view=revLog:
This is needed in POS at least for promotions which have a party in condition (or a promo code related). Anyway it's needed...
Modified:
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java
Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java?rev=834140&r1=834139&r2=834140&view=diff==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java Mon Nov 9 16:44:23 2009
@@ -175,6 +175,12 @@
public void setPartyId(String partyId) {
this.partyId = partyId;
+ this.cart.setPlacingCustomerPartyId(partyId);
+ try {
+ this.cart.setUserLogin(session.getUserLogin(), session.getDispatcher());
+ } catch (CartItemModifyException e) {
+ Debug.logError(e, module);
+ }
}
public int getDrawerNumber() {
@@ -255,7 +261,7 @@
ShoppingCartItem item = cart.findCartItem(index);
Map<String, Object> itemInfo = FastMap.newInstance();
itemInfo.put("productId", item.getProductId());
- itemInfo.put("description", item.getDescription());
+ itemInfo.put("description", item.getName());
itemInfo.put("quantity", UtilFormatOut.formatQuantity(item.getQuantity()));
itemInfo.put("subtotal", UtilFormatOut.formatPrice(item.getItemSubTotal()));
itemInfo.put("isTaxable", item.taxApplies() ? "T" : " ");
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=834140&r1=834139&r2=834140&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 16:44:23 2009
@@ -148,12 +148,14 @@
if (UtilValidate.isNotEmpty(person)) {
String cardId = person.getString("cardId");
if (UtilValidate.isNotEmpty(cardId)) {
+ String partyId = m_trans.getPartyId();
+ m_trans.setPartyId(m_partyId);
String result = m_trans.addProductPromoCode(cardId);
if (UtilValidate.isEmpty(result)) {
m_pos.getPromoStatusBar().displayClient(person.getString("lastName"));
m_pos.getPromoStatusBar().addPromoCode(cardId);
- m_trans.setPartyId(m_partyId);
} else {
+ m_trans.setPartyId(partyId);
m_pos.showDialog("dialog/error/exception", result);
}
}