svn commit: r1661312 - in /ofbiz/branches/release13.07/applications/product: config/ src/org/ofbiz/product/image/ src/org/ofbiz/product/product/ src/org/ofbiz/shipment/shipment/ webapp/catalog/WEB-INF

2015-02-21 Thread ashish
Author: ashish
Date: Sat Feb 21 09:43:55 2015
New Revision: 1661312

URL: http://svn.apache.org/r1661312
Log:
Applied bug fix from trunk r1661307.
===
Applied patch from jira issue - OFBIZ-6088 - There should not need to setup 
SystemProperty data on each tenant for specifying path to store tenant images.
Thanks Arun for creating the issue and thanks for providing the patch for the 
same.
===

Modified:
ofbiz/branches/release13.07/applications/product/config/catalog.properties

ofbiz/branches/release13.07/applications/product/src/org/ofbiz/product/image/ScaleImage.java

ofbiz/branches/release13.07/applications/product/src/org/ofbiz/product/product/ProductServices.java

ofbiz/branches/release13.07/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java

ofbiz/branches/release13.07/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java

ofbiz/branches/release13.07/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategory.groovy

ofbiz/branches/release13.07/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContent.groovy

ofbiz/branches/release13.07/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageUpload.groovy

ofbiz/branches/release13.07/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy

ofbiz/branches/release13.07/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContent.groovy

ofbiz/branches/release13.07/applications/product/webapp/facility/shipment/PackOrder.ftl

Modified: 
ofbiz/branches/release13.07/applications/product/config/catalog.properties
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/product/config/catalog.properties?rev=1661312r1=1661311r2=1661312view=diff
==
--- ofbiz/branches/release13.07/applications/product/config/catalog.properties 
(original)
+++ ofbiz/branches/release13.07/applications/product/config/catalog.properties 
Sat Feb 21 09:43:55 2015
@@ -21,10 +21,10 @@
 
 
 # -- Image upload path on the server
-image.server.path=${sys:getProperty('ofbiz.home')}/framework/images/webapp/images
+image.server.path=${sys:getProperty('ofbiz.home')}/framework/images/webapp/images/${tenantId}
 
 # -- The prefix to put on auto-generated image urls (can be relative or 
absolute, whatever you want)
-image.url.prefix=/images
+image.url.prefix=/images/${tenantId}
 image.filename.format=${location}/${id}/${type}
 
image.filename.additionalviewsize.format=${location}/${id}/${viewtype}/${sizetype}
 

Modified: 
ofbiz/branches/release13.07/applications/product/src/org/ofbiz/product/image/ScaleImage.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/product/src/org/ofbiz/product/image/ScaleImage.java?rev=1661312r1=1661311r2=1661312view=diff
==
--- 
ofbiz/branches/release13.07/applications/product/src/org/ofbiz/product/image/ScaleImage.java
 (original)
+++ 
ofbiz/branches/release13.07/applications/product/src/org/ofbiz/product/image/ScaleImage.java
 Sat Feb 21 09:43:55 2015
@@ -106,8 +106,13 @@ public class ScaleImage {
 index = filenameToUse.lastIndexOf(.);
 String imgExtension = filenameToUse.substring(index + 1);
 // paths
-String imageServerPath = 
FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue(catalog,
 image.server.path, (Delegator)context.get(delegator)), context);
-String imageUrlPrefix = 
EntityUtilProperties.getPropertyValue(catalog, image.url.prefix, 
(Delegator)context.get(delegator));
+MapString, ObjectimageContext = FastMap.newInstance();
+imageContext.putAll(context);
+
imageContext.put(tenantId,((Delegator)context.get(delegator)).getDelegatorTenantId());
+String imageServerPath = 
FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue(catalog,
 image.server.path, (Delegator)context.get(delegator)), imageContext);
+String imageUrlPrefix = 
FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue(catalog,
 image.url.prefix, (Delegator)context.get(delegator)), imageContext);
+imageServerPath = imageServerPath.endsWith(/) ? 
imageServerPath.substring(0, imageServerPath.length()-1) : imageServerPath;
+imageUrlPrefix = imageUrlPrefix.endsWith(/) ? 
imageUrlPrefix.substring(0, imageUrlPrefix.length()-1) : imageUrlPrefix;
 
 FlexibleStringExpander filenameExpander;
 String fileLocation = null;
@@ -282,9 +287,15 @@ public class ScaleImage {
 String imgName = filenameToUse.substring(0, index - 1);
 String imgExtension = filenameToUse.substring(index + 1);

svn commit: r1661324 - /ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItems.ftl

2015-02-21 Thread mridulpathak
Author: mridulpathak
Date: Sat Feb 21 11:33:38 2015
New Revision: 1661324

URL: http://svn.apache.org/r1661324
Log:
[OFBIZ-6013, OFBIZ-6090] Return Selected Item(s) button broken for manually 
created returns. Applying patch from OFBIZ-6090. Thanks to Christian Carlow for 
reporting the initial issue and providing the initial patch. Thanks to Amardeep 
for providing the updated patch.

Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItems.ftl

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItems.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItems.ftl?rev=1661324r1=1661323r2=1661324view=diff
==
--- ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItems.ftl 
(original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItems.ftl Sat 
Feb 21 11:33:38 2015
@@ -387,6 +387,7 @@ under the License.
 /#if
 !-- if no requestParameters.orderId??, then show list of items --
 #elseif returnHeader?has_content
+#assign selectAllFormName = returnItems/
 form name=returnItems method=post 
action=@ofbizUrlcreateReturnItems/@ofbizUrl
   input type=hidden name=returnId value=${returnId} /
   input type=hidden name=_useRowSubmit value=Y /




svn commit: r1661298 - in /ofbiz/branches/release12.04: ./ specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml

2015-02-21 Thread jleroux
Author: jleroux
Date: Sat Feb 21 08:21:09 2015
New Revision: 1661298

URL: http://svn.apache.org/r1661298
Log:
Applied fix from trunk for revision: 1661287 

r1661287 | ashish | 2015-02-21 07:28:27 +0100 (sam., 21 févr. 2015) | 2 lines

Applied patch from jira issue - OFBIZ-5419 - Ordering a License product 
sometimes (most often) gives a blank page.
Thanks Jacques for creating the issue and thanks Arun for providing the fix.



Modified:
ofbiz/branches/release12.04/   (props changed)

ofbiz/branches/release12.04/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml

Propchange: ofbiz/branches/release12.04/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Feb 21 08:21:09 2015
@@ -3,4 +3,4 @@
 /ofbiz/branches/jackrabbit20100709:962442-1231517
 /ofbiz/branches/jquery:952958-1044489
 /ofbiz/branches/multitenant20100310:921280-927264
-/ofbiz/trunk:1332097,1333439,1333885,1334201,1334336,1334483,1335047,1335343,1335347,1335351,1335946,1336921,1337046,1337057-1337059,1337202,1337502,1337524,1337644,1337789,1337800,1338065,1338101,1338224,1338570,1338591,1338700,1338831,1338845,1338974,1339081,1339122,1340273,1340352,1340357,1340400,1340405,1340415,1340657,1340661,1340774,1340821,1340826,1340943,1341314,1341399,1342852,1342875,1342893,1342980,1343088,1345473,1345484,1345532,1345547,1345553,1347559,1347762,1351778,1351999,1353135,1353681,1355660,1355801,1355859,1355975,1358735,1359500,1359599-1359600,1360689,1361056,1361073,1361476,1361662,1361931,1361944,1361958,1364046,1364052,1364216,1364218,130,1366960,1369555,1369561,1377253,1377382,1377386,1377388,1379334,1379340,1379345,1381146,1384251,1384894,1387878,1387884,1388832,1389802,1392773,1393948,1394995,1395104,1395460,1395953,1396105,1399539,1399761,1400388,1400393,1400421,1402766,1403370,1406727,1407634,1408408,1413307,1421662,1422207,1423117,1425155,1425662,
 
1426231,1426734,1426787,1430332,1430336,1431191,1432392,1432833,1435528,1435701,1438498,1444356,1446575,1446876,1447107,1451183,1451879,1452382,1458429,1459220,1459222,1460116,1460276,1461551,1462948,1463989,1465351,1470151,1470483,1471283-1471284,1471687,1471739,1476296,1480407,1481287,1484279,1485432,1487130,1487854,1488000,1488127,1488188,1489461,1492112,1492673,1493352,1493393,1493658,1493683,1494202,1494682,1497376,1497822,1497839,1499732,1500760,1500772,1502121,1502944,1502946,1504864,1506269,1506499,1506504,1506828,1509164,1510042,1512376,1512573,1517629,1517702,1517780,1517947,1518336,1518950,1519245,1524361,1524676,1524704,1524769,1524950,1525523,1526387,1526463,1527254,1528144,1528146,1528149,1528298,1529412,1529418,1531848,1532342,1532366,1535961,1536656,1537023,1537179,1537996,1538096,1539147,1539156,1543744,1543766,1543781,154,1547548,1548143,1550255,1550515,1551744,1552290,1552500,1552901,1552908,1554290,1554536,1554681,1554685,1554706,1554764,1554787,1555142,15574
 
09-1557410,1557440,1557447,1557457,1557462,1557593,1558373,1559814,1560048,1560056,1560176,1560203,1560205,1560699,1561286,1561290,1561305,1561311,1561327,1561467,1562767,1563238,1563683,1563958,1564111,1564113,1564463,1564473,1564493,1566096,1566273,1569078,1569743,1571219,1573161,1573498,1573639,1574019,1575508,1576259,1576331,1576378,1576506,1576511,1576757,1576839,1577268,1579155,1579161,1579309,1580455,1581386,1581997,1582762,1583040,1583427-1583428,1583551,1583674,1583681,1583689,1583696,1584873,1585033,1585574,1585958-1585959,1586987,1587841,1587843,1588733,1589602,1589606,1589612,1589625,1589669,1592530,1592588,1592745,1592977,1593902,1593908,1593952,1597464,1598544,1598913,1603732,1603739,1604357,1604363,1604522,1604554,1605348,1605354,1605707,1607457,1608355,1608491,1608495,1608698,1609047,1609065,1609076,1609087,1609167,1609184,1609389,1609394,1609406,1609418,1609885,1610355,1610385,1610425,1610685,1610918,1610925,1611321,1612190,1612205,1613121,1614019,1614025,1614355,16
 
14366,1614556,1615296-1615297,1616684,1616940,1617229,1618354,1618411,1618570,1619098,1622050,1622672,1623370,1627230,1627776,1628096,1629391,1631203,1632733,1632745,1632764,1632797,1632801,1632803,1633100,1636493,1639835,1639840-1639841,1639846,1639863,1639867,1639873,1639884,1639887,1639892,1640288,1640515,1640717,1641066,1641131,1641165,1641548,1641804,1642409,1642423,1643341,1644904,1646204,1646977,1646984,1647266,1647338,1647559,1648668,1649393,1650583,1650642,1650678,1650882,1650887,1650938,1651593,1652361,1652604,1652611,1652617,1652627,1652725,1652731,1652739,1653456,1654175,1654273,1656983,1660444

svn commit: r1661316 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java

2015-02-21 Thread ashish
Author: ashish
Date: Sat Feb 21 10:17:06 2015
New Revision: 1661316

URL: http://svn.apache.org/r1661316
Log:
Applied patch from jira issue - OFBIZ-5570 - appendOrderItem Service Not 
Applying Order Item Attributes.
Thanks Darrell Donati for creating the issue and thanks Divesh for providing 
the patch. Thanks Pierre for your active participation in the discussion.

Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java

Modified: 
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1661316r1=1661315r2=1661316view=diff
==
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java 
(original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java 
Sat Feb 21 10:17:06 2015
@@ -3553,6 +3553,8 @@ public class OrderServices {
 String orderItemTypeId = (String) context.get(orderItemTypeId);
 String changeComments = (String) context.get(changeComments);
 Boolean calcTax = (Boolean) context.get(calcTax);
+MapString, String itemAttributesMap = 
UtilGenerics.checkMap(context.get(itemAttributesMap));
+
 if (calcTax == null) {
 calcTax = Boolean.TRUE;
 }
@@ -3593,9 +3595,9 @@ public class OrderServices {
 
 // add in the new product
 try {
+ShoppingCartItem item = null;
 if (PURCHASE_ORDER.equals(cart.getOrderType())) {
 GenericValue supplierProduct = 
cart.getSupplierProduct(productId, quantity, dispatcher);
-ShoppingCartItem item = null;
 if (supplierProduct != null) {
 item = ShoppingCartItem.makePurchaseOrderItem(null, 
productId, null, quantity, null, null, prodCatalogId, null, orderItemTypeId, 
null, dispatcher, cart, supplierProduct, itemDesiredDeliveryDate, 
itemDesiredDeliveryDate, null);
 cart.addItem(0, item);
@@ -3613,7 +3615,7 @@ public class OrderServices {
 cart.clearItemShipInfo(item);
 cart.setItemShipGroupQty(item, item.getQuantity(), 
shipGroupIdx);
 } else {
-ShoppingCartItem item = ShoppingCartItem.makeItem(null, 
productId, null, quantity, null, null, null, null, null, null, null, null, 
prodCatalogId, null, null, null, dispatcher, cart, null, null, null, 
Boolean.FALSE, Boolean.FALSE);
+item = ShoppingCartItem.makeItem(null, productId, null, 
quantity, null, null, null, null, null, null, null, null, prodCatalogId, null, 
null, null, dispatcher, cart, null, null, null, Boolean.FALSE, Boolean.FALSE);
 if (basePrice != null  overridePrice != null) {
 item.setBasePrice(basePrice);
 // special hack to make sure we re-calc the promos after a 
price change
@@ -3631,6 +3633,23 @@ public class OrderServices {
 cart.clearItemShipInfo(item);
 cart.setItemShipGroupQty(item, item.getQuantity(), 
shipGroupIdx);
 }
+// set the order item attributes
+if (itemAttributesMap != null) {
+// go through the item attributes map once to get a list of 
key names
+SetString attributeNames =FastSet.newInstance();
+SetString keys  = itemAttributesMap.keySet();
+for (String key : keys) {
+attributeNames.add(key);
+}
+String attrValue = null;
+for (String attrName : attributeNames) {
+attrValue = itemAttributesMap.get(attrName);
+if (UtilValidate.isNotEmpty(attrName)) {
+item.setOrderItemAttribute(attrName, attrValue);
+Debug.logInfo(Set item attribute Name:  + attrName + 
 , Value: + attrValue, module);
+}
+}
+}
 } catch (CartItemModifyException e) {
 Debug.logError(e, module);
 return ServiceUtil.returnError(e.getMessage());




svn commit: r1661304 - in /ofbiz/branches/release14.12: ./ applications/humanres/data/helpdata/HELP_HR_main.xml

2015-02-21 Thread sharan
Author: sharan
Date: Sat Feb 21 09:16:00 2015
New Revision: 1661304

URL: http://svn.apache.org/r1661304
Log:
Applied fix from trunk for revision: 1661303 
===

Fix incorrect Docbook Syntax OFBIZ-6082

Modified:
ofbiz/branches/release14.12/   (props changed)

ofbiz/branches/release14.12/applications/humanres/data/helpdata/HELP_HR_main.xml

Propchange: ofbiz/branches/release14.12/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Feb 21 09:16:00 2015
@@ -8,4 +8,4 @@
 /ofbiz/branches/json-integration-refactoring:1634077-1635900
 /ofbiz/branches/multitenant20100310:921280-927264
 /ofbiz/branches/release13.07:1547657
-/ofbiz/trunk:1649393,1649742,1650240,1650583,1650642,1650678,1650882,1650887,1650938,1651593,1652361,1652706,1652725,1652731,1652739,1653248,1653456,1654175,1654273,1654509,1655046,1655668,1655979,1656185,1656198,1656445,1656983,1657323,1657506-1657507,1657514,1657714,1657790,1657848,1658364,1658662,1658882,1659224,1660031,1660053,1660389,1660444,1660579
+/ofbiz/trunk:1649393,1649742,1650240,1650583,1650642,1650678,1650882,1650887,1650938,1651593,1652361,1652706,1652725,1652731,1652739,1653248,1653456,1654175,1654273,1654509,1655046,1655668,1655979,1656185,1656198,1656445,1656983,1657323,1657506-1657507,1657514,1657714,1657790,1657848,1658364,1658662,1658882,1659224,1660031,1660053,1660389,1660444,1660579,1661303

Modified: 
ofbiz/branches/release14.12/applications/humanres/data/helpdata/HELP_HR_main.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/humanres/data/helpdata/HELP_HR_main.xml?rev=1661304r1=1661303r2=1661304view=diff
==
--- 
ofbiz/branches/release14.12/applications/humanres/data/helpdata/HELP_HR_main.xml
 (original)
+++ 
ofbiz/branches/release14.12/applications/humanres/data/helpdata/HELP_HR_main.xml
 Sat Feb 21 09:16:00 2015
@@ -34,6 +34,7 @@ under the License.
 
   paraThe number of organizational levels can be as many as required./para
   
+  section
  title Nodes In the Company Tree/title
 
 paraThere are three node types in the tree, each identified by a
@@ -41,7 +42,9 @@ under the License.
 level in the organization. The Company and departments under the
 Company can have sub departments or positions. Under positions are
 the people who fulfill the position./para
+  /section
   
+  section
 titleUsage/title
 
 itemizedlist
@@ -67,5 +70,6 @@ under the License.
 position/para
   /listitem
 /itemizedlist
+  /section
   
 /section




svn commit: r1661313 - in /ofbiz/branches/release12.04/applications/product: config/ src/org/ofbiz/product/image/ src/org/ofbiz/product/product/ webapp/catalog/WEB-INF/actions/category/ webapp/catalog

2015-02-21 Thread ashish
Author: ashish
Date: Sat Feb 21 09:47:33 2015
New Revision: 1661313

URL: http://svn.apache.org/r1661313
Log:
Applied bug fix from trunk r1661307.
===
Applied patch from jira issue - OFBIZ-6088 - There should not need to setup 
SystemProperty data on each tenant for specifying path to store tenant images.
Thanks Arun for creating the issue and thanks for providing the patch for the 
same.
===

Modified:
ofbiz/branches/release12.04/applications/product/config/catalog.properties

ofbiz/branches/release12.04/applications/product/src/org/ofbiz/product/image/ScaleImage.java

ofbiz/branches/release12.04/applications/product/src/org/ofbiz/product/product/ProductServices.java

ofbiz/branches/release12.04/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java

ofbiz/branches/release12.04/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategory.groovy

ofbiz/branches/release12.04/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContent.groovy

ofbiz/branches/release12.04/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageUpload.groovy

ofbiz/branches/release12.04/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy

ofbiz/branches/release12.04/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContent.groovy

Modified: 
ofbiz/branches/release12.04/applications/product/config/catalog.properties
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/product/config/catalog.properties?rev=1661313r1=1661312r2=1661313view=diff
==
--- ofbiz/branches/release12.04/applications/product/config/catalog.properties 
(original)
+++ ofbiz/branches/release12.04/applications/product/config/catalog.properties 
Sat Feb 21 09:47:33 2015
@@ -21,10 +21,10 @@
 
 
 # -- Image upload path on the server
-image.server.path=${sys:getProperty('ofbiz.home')}/framework/images/webapp/images
+image.server.path=${sys:getProperty('ofbiz.home')}/framework/images/webapp/images/${tenantId}
 
 # -- The prefix to put on auto-generated image urls (can be relative or 
absolute, whatever you want)
-image.url.prefix=/images
+image.url.prefix=/images/${tenantId}
 image.filename.format=${location}/${id}/${type}
 
image.filename.additionalviewsize.format=${location}/${id}/${viewtype}/${sizetype}
 

Modified: 
ofbiz/branches/release12.04/applications/product/src/org/ofbiz/product/image/ScaleImage.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/product/src/org/ofbiz/product/image/ScaleImage.java?rev=1661313r1=1661312r2=1661313view=diff
==
--- 
ofbiz/branches/release12.04/applications/product/src/org/ofbiz/product/image/ScaleImage.java
 (original)
+++ 
ofbiz/branches/release12.04/applications/product/src/org/ofbiz/product/image/ScaleImage.java
 Sat Feb 21 09:47:33 2015
@@ -110,8 +110,13 @@ public class ScaleImage {
 index = filenameToUse.lastIndexOf(.);
 String imgExtension = filenameToUse.substring(index + 1);
 // paths
-String imageServerPath = 
FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue(catalog,
 image.server.path, (Delegator)context.get(delegator)), context);
-String imageUrlPrefix = 
EntityUtilProperties.getPropertyValue(catalog, image.url.prefix, 
(Delegator)context.get(delegator));
+MapString, ObjectimageContext = FastMap.newInstance();
+imageContext.putAll(context);
+
imageContext.put(tenantId,((Delegator)context.get(delegator)).getDelegatorTenantId());
+String imageServerPath = 
FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue(catalog,
 image.server.path, (Delegator)context.get(delegator)), imageContext);
+String imageUrlPrefix = 
FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue(catalog,
 image.url.prefix, (Delegator)context.get(delegator)), imageContext);
+imageServerPath = imageServerPath.endsWith(/) ? 
imageServerPath.substring(0, imageServerPath.length()-1) : imageServerPath;
+imageUrlPrefix = imageUrlPrefix.endsWith(/) ? 
imageUrlPrefix.substring(0, imageUrlPrefix.length()-1) : imageUrlPrefix;
 
 FlexibleStringExpander filenameExpander;
 String fileLocation = null;
@@ -286,9 +291,15 @@ public class ScaleImage {
 String imgName = filenameToUse.substring(0, index - 1);
 String imgExtension = filenameToUse.substring(index + 1);
 // paths
-String mainFilenameFormat = UtilProperties.getPropertyValue(catalog, 
image.filename.format);
-String imageServerPath = 

svn commit: r1661326 - /ofbiz/branches/release13.07/applications/order/webapp/ordermgr/return/returnItems.ftl

2015-02-21 Thread mridulpathak
Author: mridulpathak
Date: Sat Feb 21 11:37:31 2015
New Revision: 1661326

URL: http://svn.apache.org/r1661326
Log:
[OFBIZ-6013, OFBIZ-6090] Return Selected Item(s) button broken for manually 
created returns. Applying patch from OFBIZ-6090. Thanks to Christian Carlow for 
reporting the initial issue and providing the initial patch. Thanks to Amardeep 
for providing the updated patch. Applying changes from trunk r1661324.

Modified:

ofbiz/branches/release13.07/applications/order/webapp/ordermgr/return/returnItems.ftl

Modified: 
ofbiz/branches/release13.07/applications/order/webapp/ordermgr/return/returnItems.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/order/webapp/ordermgr/return/returnItems.ftl?rev=1661326r1=1661325r2=1661326view=diff
==
--- 
ofbiz/branches/release13.07/applications/order/webapp/ordermgr/return/returnItems.ftl
 (original)
+++ 
ofbiz/branches/release13.07/applications/order/webapp/ordermgr/return/returnItems.ftl
 Sat Feb 21 11:37:31 2015
@@ -387,6 +387,7 @@ under the License.
 /#if
 !-- if no requestParameters.orderId exists, then show list of items --
 #elseif returnHeader?has_content
+#assign selectAllFormName = returnItems/
 form name=returnItems method=post 
action=@ofbizUrlcreateReturnItems/@ofbizUrl
   input type=hidden name=returnId value=${returnId} /
   input type=hidden name=_useRowSubmit value=Y /




svn commit: r1661303 - /ofbiz/trunk/applications/humanres/data/helpdata/HELP_HR_main.xml

2015-02-21 Thread sharan
Author: sharan
Date: Sat Feb 21 09:10:15 2015
New Revision: 1661303

URL: http://svn.apache.org/r1661303
Log:
Fix incorrect Docbook Syntax OFBIZ-6082

Modified:
ofbiz/trunk/applications/humanres/data/helpdata/HELP_HR_main.xml

Modified: ofbiz/trunk/applications/humanres/data/helpdata/HELP_HR_main.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/data/helpdata/HELP_HR_main.xml?rev=1661303r1=1661302r2=1661303view=diff
==
--- ofbiz/trunk/applications/humanres/data/helpdata/HELP_HR_main.xml (original)
+++ ofbiz/trunk/applications/humanres/data/helpdata/HELP_HR_main.xml Sat Feb 21 
09:10:15 2015
@@ -34,6 +34,7 @@ under the License.
 
   paraThe number of organizational levels can be as many as required./para
   
+  section
  title Nodes In the Company Tree/title
 
 paraThere are three node types in the tree, each identified by a
@@ -41,7 +42,9 @@ under the License.
 level in the organization. The Company and departments under the
 Company can have sub departments or positions. Under positions are
 the people who fulfill the position./para
+  /section
   
+  section
 titleUsage/title
 
 itemizedlist
@@ -67,5 +70,6 @@ under the License.
 position/para
   /listitem
 /itemizedlist
+  /section
   
 /section




svn commit: r1661317 - /ofbiz/branches/release14.12/applications/order/src/org/ofbiz/order/order/OrderServices.java

2015-02-21 Thread ashish
Author: ashish
Date: Sat Feb 21 10:19:40 2015
New Revision: 1661317

URL: http://svn.apache.org/r1661317
Log:
Applied bug fix from trunk r1661316.
=
Applied patch from jira issue - OFBIZ-5570 - appendOrderItem Service Not 
Applying Order Item Attributes.
Thanks Darrell Donati for creating the issue and thanks Divesh for providing 
the patch. Thanks Pierre for your active participation in the discussion.
=

Modified:

ofbiz/branches/release14.12/applications/order/src/org/ofbiz/order/order/OrderServices.java

Modified: 
ofbiz/branches/release14.12/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1661317r1=1661316r2=1661317view=diff
==
--- 
ofbiz/branches/release14.12/applications/order/src/org/ofbiz/order/order/OrderServices.java
 (original)
+++ 
ofbiz/branches/release14.12/applications/order/src/org/ofbiz/order/order/OrderServices.java
 Sat Feb 21 10:19:40 2015
@@ -3553,6 +3553,8 @@ public class OrderServices {
 String orderItemTypeId = (String) context.get(orderItemTypeId);
 String changeComments = (String) context.get(changeComments);
 Boolean calcTax = (Boolean) context.get(calcTax);
+MapString, String itemAttributesMap = 
UtilGenerics.checkMap(context.get(itemAttributesMap));
+
 if (calcTax == null) {
 calcTax = Boolean.TRUE;
 }
@@ -3593,9 +3595,9 @@ public class OrderServices {
 
 // add in the new product
 try {
+ShoppingCartItem item = null;
 if (PURCHASE_ORDER.equals(cart.getOrderType())) {
 GenericValue supplierProduct = 
cart.getSupplierProduct(productId, quantity, dispatcher);
-ShoppingCartItem item = null;
 if (supplierProduct != null) {
 item = ShoppingCartItem.makePurchaseOrderItem(null, 
productId, null, quantity, null, null, prodCatalogId, null, orderItemTypeId, 
null, dispatcher, cart, supplierProduct, itemDesiredDeliveryDate, 
itemDesiredDeliveryDate, null);
 cart.addItem(0, item);
@@ -3613,7 +3615,7 @@ public class OrderServices {
 cart.clearItemShipInfo(item);
 cart.setItemShipGroupQty(item, item.getQuantity(), 
shipGroupIdx);
 } else {
-ShoppingCartItem item = ShoppingCartItem.makeItem(null, 
productId, null, quantity, null, null, null, null, null, null, null, null, 
prodCatalogId, null, null, null, dispatcher, cart, null, null, null, 
Boolean.FALSE, Boolean.FALSE);
+item = ShoppingCartItem.makeItem(null, productId, null, 
quantity, null, null, null, null, null, null, null, null, prodCatalogId, null, 
null, null, dispatcher, cart, null, null, null, Boolean.FALSE, Boolean.FALSE);
 if (basePrice != null  overridePrice != null) {
 item.setBasePrice(basePrice);
 // special hack to make sure we re-calc the promos after a 
price change
@@ -3631,6 +3633,23 @@ public class OrderServices {
 cart.clearItemShipInfo(item);
 cart.setItemShipGroupQty(item, item.getQuantity(), 
shipGroupIdx);
 }
+// set the order item attributes
+if (itemAttributesMap != null) {
+// go through the item attributes map once to get a list of 
key names
+SetString attributeNames =FastSet.newInstance();
+SetString keys  = itemAttributesMap.keySet();
+for (String key : keys) {
+attributeNames.add(key);
+}
+String attrValue = null;
+for (String attrName : attributeNames) {
+attrValue = itemAttributesMap.get(attrName);
+if (UtilValidate.isNotEmpty(attrName)) {
+item.setOrderItemAttribute(attrName, attrValue);
+Debug.logInfo(Set item attribute Name:  + attrName + 
 , Value: + attrValue, module);
+}
+}
+}
 } catch (CartItemModifyException e) {
 Debug.logError(e, module);
 return ServiceUtil.returnError(e.getMessage());




svn commit: r1661307 - in /ofbiz/trunk/applications/product: config/ src/org/ofbiz/product/image/ src/org/ofbiz/product/product/ webapp/catalog/WEB-INF/actions/category/ webapp/catalog/WEB-INF/actions

2015-02-21 Thread ashish
Author: ashish
Date: Sat Feb 21 09:27:11 2015
New Revision: 1661307

URL: http://svn.apache.org/r1661307
Log:
Applied patch from jira issue - OFBIZ-6088 - There should not need to setup 
SystemProperty data on each tenant for specifying path to store tenant images.
Thanks Arun for creating the issue and thanks for providing the patch for the 
same.

Modified:
ofbiz/trunk/applications/product/config/catalog.properties
ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java

ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java

ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java

ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategory.groovy

ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContent.groovy

ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageUpload.groovy

ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy

ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContent.groovy

Modified: ofbiz/trunk/applications/product/config/catalog.properties
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/catalog.properties?rev=1661307r1=1661306r2=1661307view=diff
==
--- ofbiz/trunk/applications/product/config/catalog.properties (original)
+++ ofbiz/trunk/applications/product/config/catalog.properties Sat Feb 21 
09:27:11 2015
@@ -21,10 +21,10 @@
 
 
 # -- Image upload path on the server
-image.server.path=${sys:getProperty('ofbiz.home')}/framework/images/webapp/images
+image.server.path=${sys:getProperty('ofbiz.home')}/framework/images/webapp/images/${tenantId}
 
 # -- The prefix to put on auto-generated image urls (can be relative or 
absolute, whatever you want)
-image.url.prefix=/images
+image.url.prefix=/images/${tenantId}
 image.filename.format=${location}/${id}/${type}
 
image.filename.additionalviewsize.format=${location}/${id}/${viewtype}/${sizetype}
 

Modified: 
ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java?rev=1661307r1=1661306r2=1661307view=diff
==
--- 
ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java 
(original)
+++ 
ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java 
Sat Feb 21 09:27:11 2015
@@ -106,9 +106,14 @@ public class ScaleImage {
 index = filenameToUse.lastIndexOf(.);
 String imgExtension = filenameToUse.substring(index + 1);
 // paths
-String imageServerPath = 
FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue(catalog,
 image.server.path, (Delegator)context.get(delegator)), context);
-String imageUrlPrefix = 
EntityUtilProperties.getPropertyValue(catalog, image.url.prefix, 
(Delegator)context.get(delegator));
 
+MapString, ObjectimageContext = FastMap.newInstance();
+imageContext.putAll(context);
+
imageContext.put(tenantId,((Delegator)context.get(delegator)).getDelegatorTenantId());
+String imageServerPath = 
FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue(catalog,
 image.server.path, (Delegator)context.get(delegator)), imageContext);
+String imageUrlPrefix = 
FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue(catalog,
 image.url.prefix, (Delegator)context.get(delegator)), imageContext);
+imageServerPath = imageServerPath.endsWith(/) ? 
imageServerPath.substring(0, imageServerPath.length()-1) : imageServerPath;
+imageUrlPrefix = imageUrlPrefix.endsWith(/) ? 
imageUrlPrefix.substring(0, imageUrlPrefix.length()-1) : imageUrlPrefix;
 FlexibleStringExpander filenameExpander;
 String fileLocation = null;
 String type = null;
@@ -282,10 +287,15 @@ public class ScaleImage {
 String imgName = filenameToUse.substring(0, index - 1);
 String imgExtension = filenameToUse.substring(index + 1);
 // paths
+MapString, ObjectimageContext = FastMap.newInstance();
+imageContext.putAll(context);
+
imageContext.put(tenantId,((Delegator)context.get(delegator)).getDelegatorTenantId());
 String mainFilenameFormat = 
EntityUtilProperties.getPropertyValue(catalog, image.filename.format, 
(Delegator) context.get(delegator));
-String imageServerPath = 
FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue(catalog,
 image.server.path, (Delegator)context.get(delegator)), context);
-String imageUrlPrefix = 

svn commit: r1661310 - in /ofbiz/branches/release14.12/applications/product: config/ src/org/ofbiz/product/image/ src/org/ofbiz/product/product/ webapp/catalog/WEB-INF/actions/category/ webapp/catalog

2015-02-21 Thread ashish
Author: ashish
Date: Sat Feb 21 09:38:51 2015
New Revision: 1661310

URL: http://svn.apache.org/r1661310
Log:
Applied bug fix from trunk r1661307.
===
Applied patch from jira issue - OFBIZ-6088 - There should not need to setup 
SystemProperty data on each tenant for specifying path to store tenant images.
Thanks Arun for creating the issue and thanks for providing the patch for the 
same.
===

Modified:
ofbiz/branches/release14.12/applications/product/config/catalog.properties

ofbiz/branches/release14.12/applications/product/src/org/ofbiz/product/image/ScaleImage.java

ofbiz/branches/release14.12/applications/product/src/org/ofbiz/product/product/ProductServices.java

ofbiz/branches/release14.12/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java

ofbiz/branches/release14.12/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategory.groovy

ofbiz/branches/release14.12/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContent.groovy

ofbiz/branches/release14.12/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageUpload.groovy

ofbiz/branches/release14.12/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy

ofbiz/branches/release14.12/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContent.groovy

Modified: 
ofbiz/branches/release14.12/applications/product/config/catalog.properties
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/product/config/catalog.properties?rev=1661310r1=1661309r2=1661310view=diff
==
--- ofbiz/branches/release14.12/applications/product/config/catalog.properties 
(original)
+++ ofbiz/branches/release14.12/applications/product/config/catalog.properties 
Sat Feb 21 09:38:51 2015
@@ -21,10 +21,10 @@
 
 
 # -- Image upload path on the server
-image.server.path=${sys:getProperty('ofbiz.home')}/framework/images/webapp/images
+image.server.path=${sys:getProperty('ofbiz.home')}/framework/images/webapp/images/${tenantId}
 
 # -- The prefix to put on auto-generated image urls (can be relative or 
absolute, whatever you want)
-image.url.prefix=/images
+image.url.prefix=/images/${tenantId}
 image.filename.format=${location}/${id}/${type}
 
image.filename.additionalviewsize.format=${location}/${id}/${viewtype}/${sizetype}
 

Modified: 
ofbiz/branches/release14.12/applications/product/src/org/ofbiz/product/image/ScaleImage.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/product/src/org/ofbiz/product/image/ScaleImage.java?rev=1661310r1=1661309r2=1661310view=diff
==
--- 
ofbiz/branches/release14.12/applications/product/src/org/ofbiz/product/image/ScaleImage.java
 (original)
+++ 
ofbiz/branches/release14.12/applications/product/src/org/ofbiz/product/image/ScaleImage.java
 Sat Feb 21 09:38:51 2015
@@ -106,9 +106,14 @@ public class ScaleImage {
 index = filenameToUse.lastIndexOf(.);
 String imgExtension = filenameToUse.substring(index + 1);
 // paths
-String imageServerPath = 
FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue(catalog,
 image.server.path, (Delegator)context.get(delegator)), context);
-String imageUrlPrefix = 
EntityUtilProperties.getPropertyValue(catalog, image.url.prefix, 
(Delegator)context.get(delegator));
 
+MapString, ObjectimageContext = FastMap.newInstance();
+imageContext.putAll(context);
+
imageContext.put(tenantId,((Delegator)context.get(delegator)).getDelegatorTenantId());
+String imageServerPath = 
FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue(catalog,
 image.server.path, (Delegator)context.get(delegator)), imageContext);
+String imageUrlPrefix = 
FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue(catalog,
 image.url.prefix, (Delegator)context.get(delegator)), imageContext);
+imageServerPath = imageServerPath.endsWith(/) ? 
imageServerPath.substring(0, imageServerPath.length()-1) : imageServerPath;
+imageUrlPrefix = imageUrlPrefix.endsWith(/) ? 
imageUrlPrefix.substring(0, imageUrlPrefix.length()-1) : imageUrlPrefix;
 FlexibleStringExpander filenameExpander;
 String fileLocation = null;
 String type = null;
@@ -282,10 +287,15 @@ public class ScaleImage {
 String imgName = filenameToUse.substring(0, index - 1);
 String imgExtension = filenameToUse.substring(index + 1);
 // paths
+MapString, ObjectimageContext = FastMap.newInstance();
+imageContext.putAll(context);
+

svn commit: r1661318 - /ofbiz/branches/release13.07/applications/order/src/org/ofbiz/order/order/OrderServices.java

2015-02-21 Thread ashish
Author: ashish
Date: Sat Feb 21 10:21:34 2015
New Revision: 1661318

URL: http://svn.apache.org/r1661318
Log:
Applied bug fix from trunk r1661316.
=
Applied patch from jira issue - OFBIZ-5570 - appendOrderItem Service Not 
Applying Order Item Attributes.
Thanks Darrell Donati for creating the issue and thanks Divesh for providing 
the patch. Thanks Pierre for your active participation in the discussion.
=

Modified:

ofbiz/branches/release13.07/applications/order/src/org/ofbiz/order/order/OrderServices.java

Modified: 
ofbiz/branches/release13.07/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1661318r1=1661317r2=1661318view=diff
==
--- 
ofbiz/branches/release13.07/applications/order/src/org/ofbiz/order/order/OrderServices.java
 (original)
+++ 
ofbiz/branches/release13.07/applications/order/src/org/ofbiz/order/order/OrderServices.java
 Sat Feb 21 10:21:34 2015
@@ -3506,6 +3506,8 @@ public class OrderServices {
 String orderItemTypeId = (String) context.get(orderItemTypeId);
 String changeComments = (String) context.get(changeComments);
 Boolean calcTax = (Boolean) context.get(calcTax);
+MapString, String itemAttributesMap = 
UtilGenerics.checkMap(context.get(itemAttributesMap));
+
 if (calcTax == null) {
 calcTax = Boolean.TRUE;
 }
@@ -3544,9 +3546,9 @@ public class OrderServices {
 
 // add in the new product
 try {
+ShoppingCartItem item = null;
 if (PURCHASE_ORDER.equals(cart.getOrderType())) {
 GenericValue supplierProduct = 
cart.getSupplierProduct(productId, quantity, dispatcher);
-ShoppingCartItem item = null;
 if (supplierProduct != null) {
 item = ShoppingCartItem.makePurchaseOrderItem(null, 
productId, null, quantity, null, null, prodCatalogId, null, orderItemTypeId, 
null, dispatcher, cart, supplierProduct, itemDesiredDeliveryDate, 
itemDesiredDeliveryDate, null);
 cart.addItem(0, item);
@@ -3564,7 +3566,7 @@ public class OrderServices {
 cart.clearItemShipInfo(item);
 cart.setItemShipGroupQty(item, item.getQuantity(), 
shipGroupIdx);
 } else {
-ShoppingCartItem item = ShoppingCartItem.makeItem(null, 
productId, null, quantity, null, null, null, null, null, null, null, null, 
prodCatalogId, null, null, null, dispatcher, cart, null, null, null, 
Boolean.FALSE, Boolean.FALSE);
+item = ShoppingCartItem.makeItem(null, productId, null, 
quantity, null, null, null, null, null, null, null, null, prodCatalogId, null, 
null, null, dispatcher, cart, null, null, null, Boolean.FALSE, Boolean.FALSE);
 if (basePrice != null  overridePrice != null) {
 item.setBasePrice(basePrice);
 // special hack to make sure we re-calc the promos after a 
price change
@@ -3579,6 +3581,23 @@ public class OrderServices {
 cart.clearItemShipInfo(item);
 cart.setItemShipGroupQty(item, item.getQuantity(), 
shipGroupIdx);
 }
+// set the order item attributes
+if (itemAttributesMap != null) {
+// go through the item attributes map once to get a list of 
key names
+SetString attributeNames =FastSet.newInstance();
+SetString keys  = itemAttributesMap.keySet();
+for (String key : keys) {
+attributeNames.add(key);
+}
+String attrValue = null;
+for (String attrName : attributeNames) {
+attrValue = itemAttributesMap.get(attrName);
+if (UtilValidate.isNotEmpty(attrName)) {
+item.setOrderItemAttribute(attrName, attrValue);
+Debug.logInfo(Set item attribute Name:  + attrName + 
 , Value: + attrValue, module);
+}
+}
+}
 } catch (CartItemModifyException e) {
 Debug.logError(e, module);
 return ServiceUtil.returnError(e.getMessage());




svn commit: r1661323 - in /ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt: ProductionRunDeclaration.groovy ViewProductionRun.groovy

2015-02-21 Thread jleroux
Author: jleroux
Date: Sat Feb 21 11:10:06 2015
New Revision: 1661323

URL: http://svn.apache.org/r1661323
Log:
Fixes a bug introduced by r1659914 for OFBIZ-5706  OFBIZ-5709

Thanks to Deepak's report on dev ML:

 +manufacturer = 
 from(WorkEffortPartyAssignment).where(workEffortId, productionRunId, 
 roleTypeId, MANUFACTURER).queryOne();
Here we need to use filterByDate for “ WorkEffortPartyAssignment”.

Actually it was a bit more because WorkEffortPartyAssignment PK is 
  prim-key field=workEffortId/
  prim-key field=partyId/
  prim-key field=roleTypeId/
  prim-key field=fromDate/

So I have also replaced .queryOne() by .queryFirst()


Modified:

ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy

ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy

Modified: 
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy?rev=1661323r1=1661322r2=1661323view=diff
==
--- 
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy
 (original)
+++ 
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy
 Sat Feb 21 11:10:06 2015
@@ -84,8 +84,8 @@ if (productionRunId) {
 productionRunData.actualCompletionDate = 
productionRun.getGenericValue().getTimestamp(actualCompletionDate);
 productionRunData.currentStatusId = 
productionRun.getGenericValue().currentStatusId;
 productionRunData.facilityId = 
productionRun.getGenericValue().facilityId;
-
-manufacturer = from(WorkEffortPartyAssignment).where(workEffortId, 
productionRunId, roleTypeId, MANUFACTURER).queryOne();
+
+manufacturer = from(WorkEffortPartyAssignment).where(workEffortId, 
productionRunId, roleTypeId, MANUFACTURER).filterByDate().queryFirst();
 if (manufacturer){
 productionRunData.manufacturerId = manufacturer.partyId;
 }

Modified: 
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy?rev=1661323r1=1661322r2=1661323view=diff
==
--- 
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy
 (original)
+++ 
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy
 Sat Feb 21 11:10:06 2015
@@ -42,7 +42,7 @@ if (productionRunId) {
 productionRunData.estimatedStartDate = 
productionRun.getEstimatedStartDate();
 productionRunData.estimatedCompletionDate = 
productionRun.getEstimatedCompletionDate();
 
-manufacturer = from(WorkEffortPartyAssignment).where(workEffortId, 
productionRunId, roleTypeId, MANUFACTURER).queryOne();
+   manufacturer = 
from(WorkEffortPartyAssignment).where(workEffortId, productionRunId, 
roleTypeId, MANUFACTURER).filterByDate().queryFirst();
 if (manufacturer){
 productionRunData.manufacturerId = manufacturer.partyId;
 }




svn commit: r1661325 - /ofbiz/branches/release14.12/applications/order/webapp/ordermgr/return/returnItems.ftl

2015-02-21 Thread mridulpathak
Author: mridulpathak
Date: Sat Feb 21 11:36:30 2015
New Revision: 1661325

URL: http://svn.apache.org/r1661325
Log:
[OFBIZ-6013, OFBIZ-6090] Return Selected Item(s) button broken for manually 
created returns. Applying patch from OFBIZ-6090. Thanks to Christian Carlow for 
reporting the initial issue and providing the initial patch. Thanks to Amardeep 
for providing the updated patch. Applying changes from trunk r1661324.

Modified:

ofbiz/branches/release14.12/applications/order/webapp/ordermgr/return/returnItems.ftl

Modified: 
ofbiz/branches/release14.12/applications/order/webapp/ordermgr/return/returnItems.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/order/webapp/ordermgr/return/returnItems.ftl?rev=1661325r1=1661324r2=1661325view=diff
==
--- 
ofbiz/branches/release14.12/applications/order/webapp/ordermgr/return/returnItems.ftl
 (original)
+++ 
ofbiz/branches/release14.12/applications/order/webapp/ordermgr/return/returnItems.ftl
 Sat Feb 21 11:36:30 2015
@@ -387,6 +387,7 @@ under the License.
 /#if
 !-- if no requestParameters.orderId??, then show list of items --
 #elseif returnHeader?has_content
+#assign selectAllFormName = returnItems/
 form name=returnItems method=post 
action=@ofbizUrlcreateReturnItems/@ofbizUrl
   input type=hidden name=returnId value=${returnId} /
   input type=hidden name=_useRowSubmit value=Y /




svn commit: r1661426 - /ofbiz/branches/release12.04/applications/order/webapp/ordermgr/return/returnItems.ftl

2015-02-21 Thread mridulpathak
Author: mridulpathak
Date: Sat Feb 21 18:38:24 2015
New Revision: 1661426

URL: http://svn.apache.org/r1661426
Log:
[OFBIZ-6013, OFBIZ-6090] Return Selected Item(s) button broken for manually 
created returns. Applying patch from OFBIZ-6090. Thanks to Christian Carlow for 
reporting the initial issue and providing the initial patch. Thanks to Amardeep 
for providing the updated patch. Applying changes from trunk r1661324.

Modified:

ofbiz/branches/release12.04/applications/order/webapp/ordermgr/return/returnItems.ftl

Modified: 
ofbiz/branches/release12.04/applications/order/webapp/ordermgr/return/returnItems.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/order/webapp/ordermgr/return/returnItems.ftl?rev=1661426r1=1661425r2=1661426view=diff
==
--- 
ofbiz/branches/release12.04/applications/order/webapp/ordermgr/return/returnItems.ftl
 (original)
+++ 
ofbiz/branches/release12.04/applications/order/webapp/ordermgr/return/returnItems.ftl
 Sat Feb 21 18:38:24 2015
@@ -387,6 +387,7 @@ under the License.
 /#if
 !-- if no requestParameters.orderId exists, then show list of items --
 #elseif returnHeader?has_content
+#assign selectAllFormName = returnItems/
 form name=returnItems method=post 
action=@ofbizUrlcreateReturnItems/@ofbizUrl
   input type=hidden name=returnId value=${returnId} /
   input type=hidden name=_useRowSubmit value=Y /




svn commit: r1661329 - in /ofbiz/branches/release14.12: ./ applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy

2015-02-21 Thread jleroux
Author: jleroux
Date: Sat Feb 21 12:01:37 2015
New Revision: 1661329

URL: http://svn.apache.org/r1661329
Log:
Applied fix from trunk for revision: 1661328 

r1661328 | jleroux | 2015-02-21 13:01:06 +0100 (sam., 21 févr. 2015) | 3 lines

A patch from Arun Patidar for Error on Sending confirm email from newly 
created order https://issues.apache.org/jira/browse/OFBIZ-6075

It was just a typing error while replacing entity engine with entityQuery method



Modified:
ofbiz/branches/release14.12/   (props changed)

ofbiz/branches/release14.12/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy

Propchange: ofbiz/branches/release14.12/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Feb 21 12:01:37 2015
@@ -8,4 +8,4 @@
 /ofbiz/branches/json-integration-refactoring:1634077-1635900
 /ofbiz/branches/multitenant20100310:921280-927264
 /ofbiz/branches/release13.07:1547657
-/ofbiz/trunk:1649393,1649742,1650240,1650583,1650642,1650678,1650882,1650887,1650938,1651593,1652361,1652706,1652725,1652731,1652739,1653248,1653456,1654175,1654273,1654509,1655046,1655668,1655979,1656185,1656198,1656445,1656983,1657323,1657506-1657507,1657514,1657714,1657790,1657848,1658364,1658662,1658882,1659224,1660031,1660053,1660389,1660444,1660579,1661303
+/ofbiz/trunk:1649393,1649742,1650240,1650583,1650642,1650678,1650882,1650887,1650938,1651593,1652361,1652706,1652725,1652731,1652739,1653248,1653456,1654175,1654273,1654509,1655046,1655668,1655979,1656185,1656198,1656445,1656983,1657323,1657506-1657507,1657514,1657714,1657790,1657848,1658364,1658662,1658882,1659224,1660031,1660053,1660389,1660444,1660579,1661303,1661328

Modified: 
ofbiz/branches/release14.12/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy?rev=1661329r1=1661328r2=1661329view=diff
==
--- 
ofbiz/branches/release14.12/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy
 (original)
+++ 
ofbiz/branches/release14.12/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy
 Sat Feb 21 12:01:37 2015
@@ -37,7 +37,7 @@ context.donePage = donePage;
 // Provide the correct order confirmation ProductStoreEmailSetting, if one 
exists
 orderHeader = from(OrderHeader).where(orderId, orderId).queryOne();
 if (orderHeader.productStoreId) {
-productStoreEmailSetting = 
from(ProductStoreEmailSetting).where(productStoreId, 
orderHeader.productStoreId, emailType, emailType)context.queryOne();
+productStoreEmailSetting = 
from(ProductStoreEmailSetting).where(productStoreId, 
orderHeader.productStoreId, emailType, emailType).queryOne();
 if (productStoreEmailSetting) {
 context.productStoreEmailSetting = productStoreEmailSetting;
 }




svn commit: r1661328 - /ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy

2015-02-21 Thread jleroux
Author: jleroux
Date: Sat Feb 21 12:01:06 2015
New Revision: 1661328

URL: http://svn.apache.org/r1661328
Log:
A patch from Arun Patidar for Error on Sending confirm email from newly 
created order https://issues.apache.org/jira/browse/OFBIZ-6075

It was just a typing error while replacing entity engine with entityQuery method

Modified:

ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy

Modified: 
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy?rev=1661328r1=1661327r2=1661328view=diff
==
--- 
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy
 (original)
+++ 
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy
 Sat Feb 21 12:01:06 2015
@@ -37,7 +37,7 @@ context.donePage = donePage;
 // Provide the correct order confirmation ProductStoreEmailSetting, if one 
exists
 orderHeader = from(OrderHeader).where(orderId, orderId).queryOne();
 if (orderHeader.productStoreId) {
-productStoreEmailSetting = 
from(ProductStoreEmailSetting).where(productStoreId, 
orderHeader.productStoreId, emailType, emailType)context.queryOne();
+productStoreEmailSetting = 
from(ProductStoreEmailSetting).where(productStoreId, 
orderHeader.productStoreId, emailType, emailType).queryOne();
 if (productStoreEmailSetting) {
 context.productStoreEmailSetting = productStoreEmailSetting;
 }




svn commit: r1661339 - /ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy

2015-02-21 Thread ashish
Author: ashish
Date: Sat Feb 21 12:26:28 2015
New Revision: 1661339

URL: http://svn.apache.org/r1661339
Log:
Applied patch from jira issue - OFBIZ-6058 - Find Shipment generates an error.
Thanks Pierre for reporting the issue, thanks Amardeep for providing the patch.

Modified:

ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy

Modified: 
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy?rev=1661339r1=1661338r2=1661339view=diff
==
--- 
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy
 (original)
+++ 
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy
 Sat Feb 21 12:26:28 2015
@@ -117,11 +117,6 @@ if (maxDate  maxDate.length()  8) {
 if (Y.equals(lookupFlag)) {
 context.paramList = paramListBuffer.toString();
 
-mainCond = null;
-if (findShipmentExprs.size()  0) {
-mainCond = EntityCondition.makeCondition(findShipmentExprs, 
EntityOperator.AND);
-}
-
 beganTransaction = false;
 try {
 beganTransaction = TransactionUtil.begin();
@@ -132,7 +127,11 @@ if (Y.equals(lookupFlag)) {
 
 if (!orderReturnValue) {
 // using list iterator
-orli = 
from(Shipment).where(mainCond).orderBy(-estimatedShipDate).cursorScrollInsensitive().distinct().maxRows(highIndex).queryIterator();
+if (findShipmentExprs.size()  0) {
+orli = 
from(Shipment).where(EntityCondition.makeCondition(findShipmentExprs, 
EntityOperator.AND)).orderBy(-estimatedShipDate).cursorScrollInsensitive().distinct().maxRows(highIndex).queryIterator();
+} else {
+orli = 
from(Shipment).orderBy(-estimatedShipDate).cursorScrollInsensitive().distinct().maxRows(highIndex).queryIterator();
+}
 
 shipmentListSize = orli.getResultsSizeAfterPartialList();
 if (highIndex  shipmentListSize) {




svn commit: r1661340 - in /ofbiz/branches/release14.12/applications/party/servicedef: secas.xml services.xml

2015-02-21 Thread pranayp
Author: pranayp
Date: Sat Feb 21 12:27:38 2015
New Revision: 1661340

URL: http://svn.apache.org/r1661340
Log:
Applied fix from trunk for revision: 1661334


[OFBIZ-6089] - Fixed error in locating service ensureNaPartyRoleTo by removing 
it and using ensurePartyRoleTo and ensurePartyRoleFrom services instead.
Thanks Deepak Dixit for reporting the issue and providing the patch.


Modified:
ofbiz/branches/release14.12/applications/party/servicedef/secas.xml
ofbiz/branches/release14.12/applications/party/servicedef/services.xml

Modified: ofbiz/branches/release14.12/applications/party/servicedef/secas.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/party/servicedef/secas.xml?rev=1661340r1=1661339r2=1661340view=diff
==
--- ofbiz/branches/release14.12/applications/party/servicedef/secas.xml 
(original)
+++ ofbiz/branches/release14.12/applications/party/servicedef/secas.xml Sat Feb 
21 12:27:38 2015
@@ -40,11 +40,11 @@ under the License.
 !-- before running the createPartyRelationship service, make sure the 
party is in the _NA_ role if that is the desired roleTypeId for From or To --
 eca service=createPartyRelationship event=invoke
 condition field-name=roleTypeIdFrom operator=equals value=_NA_/
-action service=ensureNaPartyRoleFrom mode=sync/
+action service=ensurePartyRoleFrom mode=sync/
 /eca
 eca service=createPartyRelationship event=invoke
 condition field-name=roleTypeIdTo operator=equals value=_NA_/
-action service=ensureNaPartyRoleTo mode=sync/
+action service=ensurePartyRoleTo mode=sync/
 /eca
 
 !-- party contact mech service ECAs --

Modified: ofbiz/branches/release14.12/applications/party/servicedef/services.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/party/servicedef/services.xml?rev=1661340r1=1661339r2=1661340view=diff
==
--- ofbiz/branches/release14.12/applications/party/servicedef/services.xml 
(original)
+++ ofbiz/branches/release14.12/applications/party/servicedef/services.xml Sat 
Feb 21 12:27:38 2015
@@ -282,11 +282,6 @@ under the License.
 descriptionEnsure that the party is in the _NA_ role./description
 attribute name=partyId type=String mode=IN optional=false/
 /service
-service name=ensureNaPartyRoleFrom engine=simple
-
location=component://party/script/org/ofbiz/party/party/PartySimpleMethods.xml
 invoke=ensureNaPartyRole auth=true
-descriptionEnsure that the party indicate by partyIdFrom is in the 
_NA_ role./description
-attribute name=partyIdFrom type=String mode=IN 
optional=false/
-/service
 service name=ensurePartyRoleFrom engine=simple
 
location=component://party/script/org/ofbiz/party/party/PartySimpleMethods.xml
 invoke=ensureNaPartyRole auth=true
 descriptionEnsure that the party indicate by partyIdFrom is in the 
roleTypeIdFrom specifc role. If roleTypeIdFrom isn't present use 
_NA_/description




svn commit: r1661353 - /ofbiz/branches/release13.07/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml

2015-02-21 Thread ashish
Author: ashish
Date: Sat Feb 21 13:02:52 2015
New Revision: 1661353

URL: http://svn.apache.org/r1661353
Log:
Applied bug fix from trunk r1661350.

Applied patch from jira issue - OFBIZ-5373 - If received quantity is greater 
then ordered quantity then order item quantity update but order item shipgroup 
assoc quantity does not updated.
Thanks Deepak for creating the issue, Thanks Rishi for providing the patch. 
Thanks Arun for the verification.


Modified:

ofbiz/branches/release13.07/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml

Modified: 
ofbiz/branches/release13.07/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml?rev=1661353r1=1661352r2=1661353view=diff
==
--- 
ofbiz/branches/release13.07/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
 (original)
+++ 
ofbiz/branches/release13.07/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
 Sat Feb 21 13:02:52 2015
@@ -467,7 +467,26 @@ under the License.
 /if-not-empty
 call-simple-method method-name=getReceivedQuantityForOrderItem/
 if-compare-field field=orderItem.quantity operator=less 
to-field=receivedQuantity type=BigDecimal
+entity-and list=orderItemShipGroupAssocs 
entity-name=OrderItemShipGroupAssoc
+field-map field-name=orderId 
from-field=orderItem.orderId/
+field-map field-name=orderItemSeqId 
from-field=orderItem.orderItemSeqId/
+/entity-and
+calculate field=quantityVariance type=BigDecimal 
decimal-scale=2 rounding-mode=HalfUp
+calcop operator=subtract
+calcop operator=get field=receivedQuantity/
+calcop operator=get field=orderItem.quantity/
+/calcop
+/calculate
+first-from-list entry=orderItemShipGroupAssoc 
list=orderItemShipGroupAssocs/
+calculate field=oisgaQuantity type=BigDecimal 
decimal-scale=2 rounding-mode=HalfUp
+calcop operator=add
+calcop operator=get 
field=orderItemShipGroupAssoc.quantity/
+calcop operator=get field=quantityVariance/
+/calcop
+/calculate
+set field=orderItemShipGroupAssoc.quantity 
from-field=oisgaQuantity/
 set field=orderItem.quantity from-field=receivedQuantity/
+store-value value-field=orderItemShipGroupAssoc/
 store-value value-field=orderItem/
 /if-compare-field
 if-not-empty field=parameters.shipmentId




svn commit: r1661359 - /ofbiz/branches/release14.12/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java

2015-02-21 Thread ashish
Author: ashish
Date: Sat Feb 21 13:28:31 2015
New Revision: 1661359

URL: http://svn.apache.org/r1661359
Log:
Applied bug fix from trunk r1661358.
==
Applied patch from jira issue - OFBIZ-5930 - Data resouce  caching issue while 
render data resource on multi tenant environment.
Thanks Deepak for the contribution. Thanks Scott and Adrian for sharing your 
thoughts here.
==

Modified:

ofbiz/branches/release14.12/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java

Modified: 
ofbiz/branches/release14.12/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java?rev=1661359r1=1661358r2=1661359view=diff
==
--- 
ofbiz/branches/release14.12/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
 (original)
+++ 
ofbiz/branches/release14.12/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
 Sat Feb 21 13:28:31 2015
@@ -588,7 +588,7 @@ public class DataResourceWorker  impleme
 if (dataResource != null) {
 String dataTemplateTypeId = 
dataResource.getString(dataTemplateTypeId);
 if (FTL.equals(dataTemplateTypeId)) {
-FreeMarkerWorker.clearTemplateFromCache(DataResource: + 
dataResourceId);
+
FreeMarkerWorker.clearTemplateFromCache(delegator.getDelegatorName() + 
:DataResource: + dataResourceId);
 }
 }
 }
@@ -626,7 +626,7 @@ public class DataResourceWorker  impleme
 String disableCache = 
EntityUtilProperties.getPropertyValue(content, disable.ftl.template.cache, 
delegator);
 if (disableCache == null || 
!disableCache.equalsIgnoreCase(true)) {
 try {
-Template cachedTemplate = 
FreeMarkerWorker.getTemplate(DataResource: + dataResourceId);
+Template cachedTemplate = 
FreeMarkerWorker.getTemplate(delegator.getDelegatorName() + :DataResource: + 
dataResourceId);
 if (cachedTemplate != null) {
 String subContentId = (String) 
templateContext.get(subContentId);
 if (UtilValidate.isNotEmpty(subContentId)) {
@@ -688,7 +688,7 @@ public class DataResourceWorker  impleme
 }
 
 // render the FTL template
-FreeMarkerWorker.renderTemplate(DataResource: + 
dataResourceId, templateText, templateContext, out);
+
FreeMarkerWorker.renderTemplate(delegator.getDelegatorName() + :DataResource: 
+ dataResourceId, templateText, templateContext, out);
 } catch (TemplateException e) {
 throw new GeneralException(Error rendering FTL template, 
e);
 }




svn commit: r1661358 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java

2015-02-21 Thread ashish
Author: ashish
Date: Sat Feb 21 13:27:02 2015
New Revision: 1661358

URL: http://svn.apache.org/r1661358
Log:
Applied patch from jira issue - OFBIZ-5930 - Data resouce  caching issue while 
render data resource on multi tenant environment.
Thanks Deepak for the contribution. Thanks Scott and Adrian for sharing your 
thoughts here. 

Modified:

ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java

Modified: 
ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java?rev=1661358r1=1661357r2=1661358view=diff
==
--- 
ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
 (original)
+++ 
ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
 Sat Feb 21 13:27:02 2015
@@ -588,7 +588,7 @@ public class DataResourceWorker  impleme
 if (dataResource != null) {
 String dataTemplateTypeId = 
dataResource.getString(dataTemplateTypeId);
 if (FTL.equals(dataTemplateTypeId)) {
-FreeMarkerWorker.clearTemplateFromCache(DataResource: + 
dataResourceId);
+
FreeMarkerWorker.clearTemplateFromCache(delegator.getDelegatorName() + 
:DataResource: + dataResourceId);
 }
 }
 }
@@ -626,7 +626,7 @@ public class DataResourceWorker  impleme
 String disableCache = 
EntityUtilProperties.getPropertyValue(content, disable.ftl.template.cache, 
delegator);
 if (disableCache == null || 
!disableCache.equalsIgnoreCase(true)) {
 try {
-Template cachedTemplate = 
FreeMarkerWorker.getTemplate(DataResource: + dataResourceId);
+Template cachedTemplate = 
FreeMarkerWorker.getTemplate(delegator.getDelegatorName() + :DataResource: + 
dataResourceId);
 if (cachedTemplate != null) {
 String subContentId = (String) 
templateContext.get(subContentId);
 if (UtilValidate.isNotEmpty(subContentId)) {
@@ -688,7 +688,7 @@ public class DataResourceWorker  impleme
 }
 
 // render the FTL template
-FreeMarkerWorker.renderTemplate(DataResource: + 
dataResourceId, templateText, templateContext, out);
+
FreeMarkerWorker.renderTemplate(delegator.getDelegatorName() + :DataResource: 
+ dataResourceId, templateText, templateContext, out);
 } catch (TemplateException e) {
 throw new GeneralException(Error rendering FTL template, 
e);
 }




svn commit: r1661334 - in /ofbiz/trunk/applications/party/servicedef: secas.xml services.xml

2015-02-21 Thread pranayp
Author: pranayp
Date: Sat Feb 21 12:12:31 2015
New Revision: 1661334

URL: http://svn.apache.org/r1661334
Log:
[OFBIZ-6089] - Fixed error in locating service ensureNaPartyRoleTo by removing 
it and using ensurePartyRoleTo and ensurePartyRoleFrom services instead.
Thanks Deepak Dixit for reporting the issue and providing the patch.

Modified:
ofbiz/trunk/applications/party/servicedef/secas.xml
ofbiz/trunk/applications/party/servicedef/services.xml

Modified: ofbiz/trunk/applications/party/servicedef/secas.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/secas.xml?rev=1661334r1=1661333r2=1661334view=diff
==
--- ofbiz/trunk/applications/party/servicedef/secas.xml (original)
+++ ofbiz/trunk/applications/party/servicedef/secas.xml Sat Feb 21 12:12:31 2015
@@ -40,11 +40,11 @@ under the License.
 !-- before running the createPartyRelationship service, make sure the 
party is in the _NA_ role if that is the desired roleTypeId for From or To --
 eca service=createPartyRelationship event=invoke
 condition field-name=roleTypeIdFrom operator=equals value=_NA_/
-action service=ensureNaPartyRoleFrom mode=sync/
+action service=ensurePartyRoleFrom mode=sync/
 /eca
 eca service=createPartyRelationship event=invoke
 condition field-name=roleTypeIdTo operator=equals value=_NA_/
-action service=ensureNaPartyRoleTo mode=sync/
+action service=ensurePartyRoleTo mode=sync/
 /eca
 
 !-- party contact mech service ECAs --

Modified: ofbiz/trunk/applications/party/servicedef/services.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/services.xml?rev=1661334r1=1661333r2=1661334view=diff
==
--- ofbiz/trunk/applications/party/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/party/servicedef/services.xml Sat Feb 21 12:12:31 
2015
@@ -282,11 +282,6 @@ under the License.
 descriptionEnsure that the party is in the _NA_ role./description
 attribute name=partyId type=String mode=IN optional=false/
 /service
-service name=ensureNaPartyRoleFrom engine=simple
-
location=component://party/script/org/ofbiz/party/party/PartySimpleMethods.xml
 invoke=ensureNaPartyRole auth=true
-descriptionEnsure that the party indicate by partyIdFrom is in the 
_NA_ role./description
-attribute name=partyIdFrom type=String mode=IN 
optional=false/
-/service
 service name=ensurePartyRoleFrom engine=simple
 
location=component://party/script/org/ofbiz/party/party/PartySimpleMethods.xml
 invoke=ensureNaPartyRole auth=true
 descriptionEnsure that the party indicate by partyIdFrom is in the 
roleTypeIdFrom specifc role. If roleTypeIdFrom isn't present use 
_NA_/description




svn commit: r1661342 - /ofbiz/branches/release14.12/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy

2015-02-21 Thread ashish
Author: ashish
Date: Sat Feb 21 12:28:59 2015
New Revision: 1661342

URL: http://svn.apache.org/r1661342
Log:
Applied bug fix from trunk r1661339.

Applied patch from jira issue - OFBIZ-6058 - Find Shipment generates an error.
Thanks Pierre for reporting the issue, thanks Amardeep for providing the patch.


Modified:

ofbiz/branches/release14.12/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy

Modified: 
ofbiz/branches/release14.12/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy?rev=1661342r1=1661341r2=1661342view=diff
==
--- 
ofbiz/branches/release14.12/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy
 (original)
+++ 
ofbiz/branches/release14.12/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy
 Sat Feb 21 12:28:59 2015
@@ -117,11 +117,6 @@ if (maxDate  maxDate.length()  8) {
 if (Y.equals(lookupFlag)) {
 context.paramList = paramListBuffer.toString();
 
-mainCond = null;
-if (findShipmentExprs.size()  0) {
-mainCond = EntityCondition.makeCondition(findShipmentExprs, 
EntityOperator.AND);
-}
-
 beganTransaction = false;
 try {
 beganTransaction = TransactionUtil.begin();
@@ -132,7 +127,11 @@ if (Y.equals(lookupFlag)) {
 
 if (!orderReturnValue) {
 // using list iterator
-orli = 
from(Shipment).where(mainCond).orderBy(-estimatedShipDate).cursorScrollInsensitive().distinct().maxRows(highIndex).queryIterator();
+if (findShipmentExprs.size()  0) {
+orli = 
from(Shipment).where(EntityCondition.makeCondition(findShipmentExprs, 
EntityOperator.AND)).orderBy(-estimatedShipDate).cursorScrollInsensitive().distinct().maxRows(highIndex).queryIterator();
+} else {
+orli = 
from(Shipment).orderBy(-estimatedShipDate).cursorScrollInsensitive().distinct().maxRows(highIndex).queryIterator();
+}
 
 shipmentListSize = orli.getResultsSizeAfterPartialList();
 if (highIndex  shipmentListSize) {




svn commit: r1661351 - /ofbiz/branches/release14.12/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml

2015-02-21 Thread ashish
Author: ashish
Date: Sat Feb 21 13:01:30 2015
New Revision: 1661351

URL: http://svn.apache.org/r1661351
Log:
Applied bug fix from trunk r1661350.

Applied patch from jira issue - OFBIZ-5373 - If received quantity is greater 
then ordered quantity then order item quantity update but order item shipgroup 
assoc quantity does not updated.
Thanks Deepak for creating the issue, Thanks Rishi for providing the patch. 
Thanks Arun for the verification.


Modified:

ofbiz/branches/release14.12/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml

Modified: 
ofbiz/branches/release14.12/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml?rev=1661351r1=1661350r2=1661351view=diff
==
--- 
ofbiz/branches/release14.12/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
 (original)
+++ 
ofbiz/branches/release14.12/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
 Sat Feb 21 13:01:30 2015
@@ -467,7 +467,26 @@ under the License.
 /if-not-empty
 call-simple-method method-name=getReceivedQuantityForOrderItem/
 if-compare-field field=orderItem.quantity operator=less 
to-field=receivedQuantity type=BigDecimal
+entity-and list=orderItemShipGroupAssocs 
entity-name=OrderItemShipGroupAssoc
+field-map field-name=orderId 
from-field=orderItem.orderId/
+field-map field-name=orderItemSeqId 
from-field=orderItem.orderItemSeqId/
+/entity-and
+calculate field=quantityVariance type=BigDecimal 
decimal-scale=2 rounding-mode=HalfUp
+calcop operator=subtract
+calcop operator=get field=receivedQuantity/
+calcop operator=get field=orderItem.quantity/
+/calcop
+/calculate
+first-from-list entry=orderItemShipGroupAssoc 
list=orderItemShipGroupAssocs/
+calculate field=oisgaQuantity type=BigDecimal 
decimal-scale=2 rounding-mode=HalfUp
+calcop operator=add
+calcop operator=get 
field=orderItemShipGroupAssoc.quantity/
+calcop operator=get field=quantityVariance/
+/calcop
+/calculate
+set field=orderItemShipGroupAssoc.quantity 
from-field=oisgaQuantity/
 set field=orderItem.quantity from-field=receivedQuantity/
+store-value value-field=orderItemShipGroupAssoc/
 store-value value-field=orderItem/
 /if-compare-field
 if-not-empty field=parameters.shipmentId




svn commit: r1661354 - /ofbiz/branches/release12.04/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml

2015-02-21 Thread ashish
Author: ashish
Date: Sat Feb 21 13:03:34 2015
New Revision: 1661354

URL: http://svn.apache.org/r1661354
Log:
Applied bug fix from trunk r1661350.

Applied patch from jira issue - OFBIZ-5373 - If received quantity is greater 
then ordered quantity then order item quantity update but order item shipgroup 
assoc quantity does not updated.
Thanks Deepak for creating the issue, Thanks Rishi for providing the patch. 
Thanks Arun for the verification.


Modified:

ofbiz/branches/release12.04/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml

Modified: 
ofbiz/branches/release12.04/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml?rev=1661354r1=1661353r2=1661354view=diff
==
--- 
ofbiz/branches/release12.04/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
 (original)
+++ 
ofbiz/branches/release12.04/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
 Sat Feb 21 13:03:34 2015
@@ -467,7 +467,26 @@ under the License.
 /if-not-empty
 call-simple-method method-name=getReceivedQuantityForOrderItem/
 if-compare-field field=orderItem.quantity operator=less 
to-field=receivedQuantity type=BigDecimal
+entity-and list=orderItemShipGroupAssocs 
entity-name=OrderItemShipGroupAssoc
+field-map field-name=orderId 
from-field=orderItem.orderId/
+field-map field-name=orderItemSeqId 
from-field=orderItem.orderItemSeqId/
+/entity-and
+calculate field=quantityVariance type=BigDecimal 
decimal-scale=2 rounding-mode=HalfUp
+calcop operator=subtract
+calcop operator=get field=receivedQuantity/
+calcop operator=get field=orderItem.quantity/
+/calcop
+/calculate
+first-from-list entry=orderItemShipGroupAssoc 
list=orderItemShipGroupAssocs/
+calculate field=oisgaQuantity type=BigDecimal 
decimal-scale=2 rounding-mode=HalfUp
+calcop operator=add
+calcop operator=get 
field=orderItemShipGroupAssoc.quantity/
+calcop operator=get field=quantityVariance/
+/calcop
+/calculate
+set field=orderItemShipGroupAssoc.quantity 
from-field=oisgaQuantity/
 set field=orderItem.quantity from-field=receivedQuantity/
+store-value value-field=orderItemShipGroupAssoc/
 store-value value-field=orderItem/
 /if-compare-field
 if-not-empty field=parameters.shipmentId