svn commit: r834173 - /ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java

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

svn commit: r834173 - /ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java

jleroux@apache.org
Author: jleroux
Date: Mon Nov  9 18:45:34 2009
New Revision: 834173

URL: http://svn.apache.org/viewvc?rev=834173&view=rev
Log:
Sometimes product description is not available, and internal name is not localisable (AFAIK), product name helps then...

Modified:
    ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.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=834173&r1=834172&r2=834173&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 18:45:34 2009
@@ -261,7 +261,10 @@
         ShoppingCartItem item = cart.findCartItem(index);
         Map<String, Object> itemInfo = FastMap.newInstance();
         itemInfo.put("productId", item.getProductId());
-        itemInfo.put("description", item.getName());
+        String description = item.getDescription();
+        if (UtilValidate.isEmpty(description)) {
+            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" : " ");