Author: jleroux
Date: Mon Dec 31 09:10:18 2018
New Revision: 1850024
URL:
http://svn.apache.org/viewvc?rev=1850024&view=revLog:
"Applied fix from trunk for revision: 1850023 "
------------------------------------------------------------------------
r1850023 | jleroux | 2018-12-31 10:09:33 +0100 (lun. 31 déc. 2018) | 12 lignes
Improved: Product Promo Worker description patch
(OFBIZ-3907)
Completes initial work from Sascha Rodekamp
Returns promoName then promoText if promoName absent then and
"No promotion name nor text" if either are present.
We lose the information in promoText but at least it's correctly rendered in
invoices PDF and accounting component.
Thanks: Scott for report
------------------------------------------------------------------------
Modified:
ofbiz/ofbiz-framework/branches/release18.12/ (props changed)
ofbiz/ofbiz-framework/branches/release18.12/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
Propchange: ofbiz/ofbiz-framework/branches/release18.12/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Dec 31 09:10:18 2018
@@ -10,4 +10,4 @@
/ofbiz/branches/json-integration-refactoring:1634077-1635900
/ofbiz/branches/multitenant20100310:921280-927264
/ofbiz/branches/release13.07:1547657
-/ofbiz/ofbiz-framework/trunk:1850015
+/ofbiz/ofbiz-framework/trunk:1850015,1850023
Modified: ofbiz/ofbiz-framework/branches/release18.12/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/product/ProductPromoWorker.java?rev=1850024&r1=1850023&r2=1850024&view=diff==============================================================================
--- ofbiz/ofbiz-framework/branches/release18.12/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/product/ProductPromoWorker.java (original)
+++ ofbiz/ofbiz-framework/branches/release18.12/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/product/ProductPromoWorker.java Mon Dec 31 09:10:18 2018
@@ -1249,10 +1249,13 @@ public final class ProductPromoWorker {
GenericValue prodPromo;
try {
prodPromo = EntityQuery.use(delegator).from("ProductPromo").where("productPromoId", prodPromoId).cache().queryOne();
+ if (UtilValidate.isNotEmpty(prodPromo.get("promoName"))) {
+ return (String) prodPromo.get("promoName");
+ }
if (UtilValidate.isNotEmpty(prodPromo.get("promoText"))) {
return (String) prodPromo.get("promoText");
}
- return (String) prodPromo.get("promoName");
+ return "No promotion name nor text";
} catch (GenericEntityException e) {
Debug.logWarning("Error getting ProductPromo for Id " + prodPromoId, module);