svn commit: r1802883 - /ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_commevent.xml

2017-07-24 Thread arunpatidar
Author: arunpatidar
Date: Tue Jul 25 05:57:23 2017
New Revision: 1802883

URL: http://svn.apache.org/viewvc?rev=1802883=rev
Log:
Fixed typo of entity name  and invoke attribute in service 
defination.(OFBIZ-8834)
Thanks Devanshu for reporting.

Modified:

ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_commevent.xml

Modified: 
ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_commevent.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_commevent.xml?rev=1802883=1802882=1802883=diff
==
--- 
ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_commevent.xml
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_commevent.xml
 Tue Jul 25 05:57:23 2017
@@ -99,7 +99,7 @@ under the License.
  
 
 
-
+
 Expire CommEventContentAssoc
 
 




svn commit: r1802811 - /ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy

2017-07-24 Thread nmalin
Author: nmalin
Date: Mon Jul 24 13:07:52 2017
New Revision: 1802811

URL: http://svn.apache.org/viewvc?rev=1802811=rev
Log:
Fixed: remove uneeded makeValidContext call with Groovy DSL improvement on run 
service at revision 1802798

Modified:

ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy

Modified: 
ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy?rev=1802811=1802810=1802811=diff
==
--- 
ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy
 Mon Jul 24 13:07:52 2017
@@ -21,10 +21,8 @@ import org.apache.ofbiz.base.util.UtilDa
 import org.apache.ofbiz.base.util.UtilProperties
 import org.apache.ofbiz.entity.GenericValue
 import org.apache.ofbiz.entity.util.EntityUtil
-import org.apache.ofbiz.service.ModelService
 import org.apache.ofbiz.service.ServiceUtil
 
-
 import java.sql.Timestamp
 
 
@@ -50,8 +48,7 @@ def updateRateAmount() {
 if (rateAmountLookedUpValue) {
 updating = 
(rateAmountLookedUpValue.fromDate.compareTo(newEntity.fromDate) == 0)
 if (rateAmountLookedUpValue.rateAmount != rateAmount) {
-Map expireRateAmountMap = 
dispatcher.getDispatchContext().makeValidContext('expireRateAmount', 
ModelService.IN_PARAM, rateAmountLookedUpValue)
-result = run service: 'expireRateAmount', with: expireRateAmountMap
+result = run service: 'expireRateAmount', with: 
rateAmountLookedUpValue
 if (ServiceUtil.isError(result)) return result
 } else {
 return error(UtilProperties.getMessage('AccountingErrorUiLabels', 
'AccountingUpdateRateAmountAlreadyExist', locale))
@@ -107,8 +104,7 @@ def updatePartyRate() {
 }
 }
 if (parameters.rateAmount) {
-Map createRateAmountMap = 
dispatcher.getDispatchContext().makeValidContext('updateRateAmount', 
ModelService.IN_PARAM, parameters)
-result = run service: 'updateRateAmount', with: createRateAmountMap
+result = run service: 'updateRateAmount', with: parameters
 if (ServiceUtil.isError(result)) return result
 }
 return success()
@@ -123,8 +119,7 @@ def expirePartyRate() {
 lookedUpValue.store()
 
 //expire related rate amount
-Map expireRateAmountMap = 
dispatcher.getDispatchContext().makeValidContext('expireRateAmount', 
ModelService.IN_PARAM, parameters)
-result = run service: 'expireRateAmount', with: expireRateAmountMap
+result = run service: 'expireRateAmount', with: parameters
 if (ServiceUtil.isError(result)) return result
 }
 return success()
@@ -165,8 +160,8 @@ def getRateAmount() {
 serviceName = 'getRatesAmountsFromEmplPositionTypeId'
 }
 if (serviceName) {
-Map serviceContextMap = 
dispatcher.getDispatchContext().makeValidContext(serviceName, 
ModelService.IN_PARAM, parameters)
-if (!parameters.rateCurrencyUomId) {
+Map serviceContextMap = new HashMap<>(parameters)
+if (!serviceContextMap.rateCurrencyUomId) {
 serviceContextMap.rateCurrencyUomId = 
UtilProperties.getPropertyValue('general.properties', 
'currency.uom.id.default', 'USD')
 }
 Map result = run service: serviceName, with: serviceContextMap
@@ -177,7 +172,7 @@ def getRateAmount() {
 
 if (!ratesList) {
 ratesList = from('RateAmount').where([rateTypeId: 
parameters.rateTypeId]).queryList();
-Map serviceContextMap = 
dispatcher.getDispatchContext().makeValidContext("filterRateAmountList", 
ModelService.IN_PARAM, parameters)
+Map serviceContextMap = new HashMap<>(parameters)
 serviceContextMap.ratesList = ratesList
 Map result = run service: 'filterRateAmountList', with: 
serviceContextMap
 ratesList = EntityUtil.filterByDate(result.filteredRatesList)




svn commit: r1802798 - /ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/engine/GroovyBaseScript.groovy

2017-07-24 Thread nmalin
Author: nmalin
Date: Mon Jul 24 12:17:01 2017
New Revision: 1802798

URL: http://svn.apache.org/viewvc?rev=1802798=rev
Log:
Improved: Improve groovy DSL, runService call makeValidContext (OFBIZ-9523)
When you call run service with groovy, you need to be sure that all parametes 
are good for the service call.
This improvement simplify this dsl with an automatic parameters check so you 
can call directly like that
run service : createProduct, with: context

Modified:

ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/engine/GroovyBaseScript.groovy

Modified: 
ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/engine/GroovyBaseScript.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/engine/GroovyBaseScript.groovy?rev=1802798=1802797=1802798=diff
==
--- 
ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/engine/GroovyBaseScript.groovy
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/engine/GroovyBaseScript.groovy
 Mon Jul 24 12:17:01 2017
@@ -20,6 +20,9 @@ package org.apache.ofbiz.service.engine
 
 import org.apache.ofbiz.base.util.Debug
 import org.apache.ofbiz.entity.util.EntityQuery
+import org.apache.ofbiz.service.DispatchContext
+import org.apache.ofbiz.service.LocalDispatcher
+import org.apache.ofbiz.service.ModelService
 import org.apache.ofbiz.service.ServiceUtil
 import org.apache.ofbiz.service.ExecutionServiceException
 
@@ -27,6 +30,8 @@ abstract class GroovyBaseScript extends
 public static final String module = GroovyBaseScript.class.getName()
 
 Map runService(String serviceName, Map inputMap) throws 
ExecutionServiceException {
+LocalDispatcher dispatcher = binding.getVariable('dispatcher');
+DispatchContext dctx = dispatcher.getDispatchContext();
 if (!inputMap.userLogin) {
 inputMap.userLogin = 
this.binding.getVariable('parameters').userLogin
 }
@@ -36,7 +41,8 @@ abstract class GroovyBaseScript extends
 if (!inputMap.locale) {
 inputMap.locale = this.binding.getVariable('parameters').locale
 }
-Map result = binding.getVariable('dispatcher').runSync(serviceName, 
inputMap)
+Map serviceContext = dctx.makeValidContext(serviceName, 
ModelService.IN_PARAM, inputMap)
+Map result = dispatcher.runSync(serviceName, serviceContext)
 if (ServiceUtil.isError(result)) {
 throw new 
ExecutionServiceException(ServiceUtil.getErrorMessage(result))
 }




svn commit: r1802779 - in /ofbiz/branches/ofbiz-new-website: download.html template/page/download.tpl.php

2017-07-24 Thread sharan
Author: sharan
Date: Mon Jul 24 10:00:06 2017
New Revision: 1802779

URL: http://svn.apache.org/viewvc?rev=1802779=rev
Log:
Improved:Added links to Release Notes for 16.11.03 and 13.07.03 and regenerated 
Download page

Modified:
ofbiz/branches/ofbiz-new-website/download.html
ofbiz/branches/ofbiz-new-website/template/page/download.tpl.php

Modified: ofbiz/branches/ofbiz-new-website/download.html
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/download.html?rev=1802779=1802778=1802779=diff
==
--- ofbiz/branches/ofbiz-new-website/download.html (original)
+++ ofbiz/branches/ofbiz-new-website/download.html Mon Jul 24 10:00:06 2017
@@ -155,32 +155,32 @@
 
   
 
-
-   16.11.03
+   
+   16.11.03
>Bug

- [OFBIZ-9286] - ERROR: Cannot do a 
find that returns an EntityListIterator with no transaction in place
- [OFBIZ-9305] - change 
debug.properties property value cause ofbiz can't start
- [OFBIZ-9373] - Create new blog 
article entry error
- [OFBIZ-9374] - Fix 
TemporalExpressions.Frequency to avoid moving job start times away from given 
freqCount raster
- [OFBIZ-9384] - 
RequestHandlerException on request link of Quote Price page
- [OFBIZ-9386] - 
RequestHandlerException on request link of Quote Profit page
- [OFBIZ-9387] - 
CostServices.xml#getProductCost fail currency conversion
-  [OFBIZ-9407] -  simple methods 
not terminating on error condition
-  [OFBIZ-9410] - Software not 
usable all standard installs failed
- [OFBIZ-9425 - createShipment code 
logic error
+ https://issues.apache.org/jira/browse/OFBIZ-9286; 
target="external">[OFBIZ-9286] - ERROR: Cannot do a find that returns an 
EntityListIterator with no transaction in place
+ https://issues.apache.org/jira/browse/OFBIZ-9305; 
target="external">[OFBIZ-9305] - change debug.properties property value 
cause ofbiz can't start
+ https://issues.apache.org/jira/browse/OFBIZ-9373; 
target="external">[OFBIZ-9373] - Create new blog article entry error
+ https://issues.apache.org/jira/browse/OFBIZ-9284; 
target="external">[OFBIZ-9374] - Fix TemporalExpressions.Frequency to avoid 
moving job start times away from given freqCount raster
+ https://issues.apache.org/jira/browse/OFBIZ-9384; 
target="external">[OFBIZ-9384] - RequestHandlerException on request link of 
Quote Price page
+ https://issues.apache.org/jira/browse/OFBIZ-9386; 
target="external">[OFBIZ-9386] - RequestHandlerException on request link of 
Quote Profit page
+ https://issues.apache.org/jira/browse/OFBIZ-9387; 
target="external">[OFBIZ-9387] - CostServices.xml#getProductCost fail 
currency conversion
+ https://issues.apache.org/jira/browse/OFBIZ-9407; 
target="external">[OFBIZ-9407] -  simple methods not terminating on error 
condition
+ https://issues.apache.org/jira/browse/OFBIZ-9410; 
target="external">[OFBIZ-9410] - Software not usable all standard installs 
failed
+ https://issues.apache.org/jira/browse/OFBIZ-9425; 
target="external">[OFBIZ-9425] - createShipment code logic error

>Improvement

- [OFBIZ-8202] - Use 
try-with-resources statement wherever it's possible
- [OFBIZ-9380] - renderDateTimeField 
works in IE, not working with lastest Chrome
- [OFBIZ-9406] - Update Geo data for 
India
- [OFBIZ-9413] - Update Currency Uom 
data
- [OFBIZ-9422] -  Accounting Manager 
\ Fixed Assets, press button [NEW FIXED ASSET], but action button is [Update], 
not [Save]
+ https://issues.apache.org/jira/browse/OFBIZ-8202; 
target="external">[OFBIZ-8202] - Use try-with-resources statement wherever 
it's possible
+ https://issues.apache.org/jira/browse/OFBIZ-9380; 
target="external">[OFBIZ-9380] - renderDateTimeField works in IE, not 
working with lastest Chrome
+ https://issues.apache.org/jira/browse/OFBIZ-9406; 
target="external">[OFBIZ-9406] - Update Geo data for India
+ https://issues.apache.org/jira/browse/OFBIZ-9413; 
target="external">[OFBIZ-9413] - Update Currency Uom data
+ 

svn commit: r1802773 - in /ofbiz/branches/release16.11: ./ applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/mrp/MrpServices.java

2017-07-24 Thread jacopoc
Author: jacopoc
Date: Mon Jul 24 09:39:12 2017
New Revision: 1802773

URL: http://svn.apache.org/viewvc?rev=1802773=rev
Log:
Applied fix from trunk for revision: 1802766 
===

Fixed: MRP generates duplicate requirements when items are initially under 
minimum quantity and have with pending approved purchase orders.
(OFBIZ-9526)

With this change the requirements to replenish the inventory up to the minimum 
stock quantity is generated, if needed, only when the first demand event is 
processed or at the end.

Thanks: Amit Gadaley for the help in recreating the issue and testing the fix.


Modified:
ofbiz/branches/release16.11/   (props changed)

ofbiz/branches/release16.11/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/mrp/MrpServices.java

Propchange: ofbiz/branches/release16.11/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jul 24 09:39:12 2017
@@ -10,5 +10,5 @@
 /ofbiz/branches/json-integration-refactoring:1634077-1635900
 /ofbiz/branches/multitenant20100310:921280-927264
 /ofbiz/branches/release13.07:1547657
-/ofbiz/ofbiz-framework/trunk:1783202,1783388,1784549,1784558,1784708,1785882,1785925,1786079,1786214,1786525,1787047,1787133,1787176,1787535,1787906-1787911,1787949,1789665,1789863,1789874,1790396,1790810,1791277,1791288,1791342,1791346,1791490,1791496,1791625,1791634,1791791,1791804,1792270,1792272,1792275,1792432,1792609,1792638,1794008,1794132,1796047,1796262,1797733,1798668,1798682,1798796,1798803,1798808,1799088,1799183,1799327,1799417,1799687,1799767,1799793,1799859,1800250,1800780,1800832,1800853,1801094,1801262-1801263,1801273-1801274,1801303,1801318-1801319,1801336,1801340,1801346,1801359,1801742,1802657
+/ofbiz/ofbiz-framework/trunk:1783202,1783388,1784549,1784558,1784708,1785882,1785925,1786079,1786214,1786525,1787047,1787133,1787176,1787535,1787906-1787911,1787949,1789665,1789863,1789874,1790396,1790810,1791277,1791288,1791342,1791346,1791490,1791496,1791625,1791634,1791791,1791804,1792270,1792272,1792275,1792432,1792609,1792638,1794008,1794132,1796047,1796262,1797733,1798668,1798682,1798796,1798803,1798808,1799088,1799183,1799327,1799417,1799687,1799767,1799793,1799859,1800250,1800780,1800832,1800853,1801094,1801262-1801263,1801273-1801274,1801303,1801318-1801319,1801336,1801340,1801346,1801359,1801742,1802657,1802766
 
/ofbiz/trunk:1770481,1770490,1770540,1771440,1771448,1771516,1771935,1772346,1772880,1774772,1775441,1779724,1780659,1781109,1781125,1781979,1782498,1782520

Modified: 
ofbiz/branches/release16.11/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/mrp/MrpServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/mrp/MrpServices.java?rev=1802773=1802772=1802773=diff
==
--- 
ofbiz/branches/release16.11/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/mrp/MrpServices.java
 (original)
+++ 
ofbiz/branches/release16.11/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/mrp/MrpServices.java
 Mon Jul 24 09:39:12 2017
@@ -687,8 +687,12 @@ public class MrpServices {
 bomLevelWithNoEvent = 0;
 
 oldProductId = "";
+int eventCount = 0;
 for (GenericValue inventoryEventForMRP : 
listInventoryEventForMRP) {
+eventCount++;
+
 productId = inventoryEventForMRP.getString("productId");
+boolean isLastEvent = (eventCount == 
listInventoryEventForMRP.size() || 
!productId.equals(listInventoryEventForMRP.get(eventCount).getString("productId")));
 eventQuantity = 
inventoryEventForMRP.getBigDecimal("quantity");
 
 if (!productId.equals(oldProductId)) {
@@ -745,7 +749,7 @@ public class MrpServices {
 }
 
 stockTmp = stockTmp.add(eventQuantity);
-if (stockTmp.compareTo(minimumStock) < 0) {
+if (stockTmp.compareTo(minimumStock) < 0 && 
(eventQuantity.compareTo(BigDecimal.ZERO) < 0 || isLastEvent)) { // No need to 
create a supply event/requirement if the current event is not a demand and 
there are other events to process
 BigDecimal qtyToStock = 
minimumStock.subtract(stockTmp);
 //need to buy or build the product as we have not 
enough stock
 eventDate = 
inventoryEventForMRP.getTimestamp("eventDate");




svn commit: r1802772 - in /ofbiz/ofbiz-framework/trunk/applications: content/servicedef/services_commevent.xml party/webapp/partymgr/WEB-INF/controller.xml

2017-07-24 Thread arunpatidar
Author: arunpatidar
Date: Mon Jul 24 09:24:15 2017
New Revision: 1802772

URL: http://svn.apache.org/viewvc?rev=1802772=rev
Log:
Improvements in CommEventContentAssoc entity definition and services. 
(OFBIZ-8843)
Applied improved patch. thanks Devanshu for  your contribution.

Modified:

ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_commevent.xml

ofbiz/ofbiz-framework/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml

Modified: 
ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_commevent.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_commevent.xml?rev=1802772=1802771=1802772=diff
==
--- 
ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_commevent.xml
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_commevent.xml
 Mon Jul 24 09:24:15 2017
@@ -99,8 +99,8 @@ under the License.
  
 
 
-
-Remove CommEventContentAssoc
+
+Expire CommEventContentAssoc
 
 
 

Modified: 
ofbiz/ofbiz-framework/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml?rev=1802772=1802771=1802772=diff
==
--- 
ofbiz/ofbiz-framework/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml
 Mon Jul 24 09:24:15 2017
@@ -663,7 +663,7 @@ under the License.
 
 
 
-
+
 
 
 




svn commit: r1802771 - /ofbiz/ofbiz-plugins/trunk/scrum/webapp/scrum/WEB-INF/controller.xml

2017-07-24 Thread arunpatidar
Author: arunpatidar
Date: Mon Jul 24 09:22:19 2017
New Revision: 1802771

URL: http://svn.apache.org/viewvc?rev=1802771=rev
Log:
Improvements in CommEventContentAssoc entity definition and 
services.(OFBIZ-8843)
Applied imporved patch. Thanks Devanshu for your contribution.

Modified:
ofbiz/ofbiz-plugins/trunk/scrum/webapp/scrum/WEB-INF/controller.xml

Modified: ofbiz/ofbiz-plugins/trunk/scrum/webapp/scrum/WEB-INF/controller.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/scrum/webapp/scrum/WEB-INF/controller.xml?rev=1802771=1802770=1802771=diff
==
--- ofbiz/ofbiz-plugins/trunk/scrum/webapp/scrum/WEB-INF/controller.xml 
(original)
+++ ofbiz/ofbiz-plugins/trunk/scrum/webapp/scrum/WEB-INF/controller.xml Mon Jul 
24 09:22:19 2017
@@ -990,7 +990,7 @@ under the License.
 
 
 
-
+
 
 
 
@@ -1127,7 +1127,7 @@ under the License.
 
 
 
-
+
 
 
 




svn commit: r1802766 - /ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/mrp/MrpServices.java

2017-07-24 Thread jacopoc
Author: jacopoc
Date: Mon Jul 24 09:09:38 2017
New Revision: 1802766

URL: http://svn.apache.org/viewvc?rev=1802766=rev
Log:
Fixed: MRP generates duplicate requirements when items are initially under 
minimum quantity and have with pending approved purchase orders.
(OFBIZ-9526)

With this change the requirements to replenish the inventory up to the minimum 
stock quantity is generated, if needed, only when the first demand event is 
processed or at the end.

Thanks: Amit Gadaley for the help in recreating the issue and testing the fix.

Modified:

ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/mrp/MrpServices.java

Modified: 
ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/mrp/MrpServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/mrp/MrpServices.java?rev=1802766=1802765=1802766=diff
==
--- 
ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/mrp/MrpServices.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/mrp/MrpServices.java
 Mon Jul 24 09:09:38 2017
@@ -688,8 +688,12 @@ public class MrpServices {
 bomLevelWithNoEvent = 0;
 
 oldProductId = "";
+int eventCount = 0;
 for (GenericValue inventoryEventForMRP : 
listInventoryEventForMRP) {
+eventCount++;
+
 productId = inventoryEventForMRP.getString("productId");
+boolean isLastEvent = (eventCount == 
listInventoryEventForMRP.size() || 
!productId.equals(listInventoryEventForMRP.get(eventCount).getString("productId")));
 eventQuantity = 
inventoryEventForMRP.getBigDecimal("quantity");
 
 if (!productId.equals(oldProductId)) {
@@ -746,7 +750,7 @@ public class MrpServices {
 }
 
 stockTmp = stockTmp.add(eventQuantity);
-if (stockTmp.compareTo(minimumStock) < 0) {
+if (stockTmp.compareTo(minimumStock) < 0 && 
(eventQuantity.compareTo(BigDecimal.ZERO) < 0 || isLastEvent)) { // No need to 
create a supply event/requirement if the current event is not a demand and 
there are other events to process
 BigDecimal qtyToStock = 
minimumStock.subtract(stockTmp);
 //need to buy or build the product as we have not 
enough stock
 eventDate = 
inventoryEventForMRP.getTimestamp("eventDate");




svn commit: r1802763 - in /ofbiz/branches/ofbiz-new-website: ./ template/region/

2017-07-24 Thread sharan
Author: sharan
Date: Mon Jul 24 09:08:38 2017
New Revision: 1802763

URL: http://svn.apache.org/viewvc?rev=1802763=rev
Log:
Improved:Updated footer with ASF and other missing links and regenerated all 
pages

Modified:
ofbiz/branches/ofbiz-new-website/about-ofbiz.html
ofbiz/branches/ofbiz-new-website/business-users.html
ofbiz/branches/ofbiz-new-website/developers.html
ofbiz/branches/ofbiz-new-website/download.html
ofbiz/branches/ofbiz-new-website/faqs.html
ofbiz/branches/ofbiz-new-website/getting-involved.html
ofbiz/branches/ofbiz-new-website/index.html
ofbiz/branches/ofbiz-new-website/mailinglists.html
ofbiz/branches/ofbiz-new-website/ofbiz-demos.html
ofbiz/branches/ofbiz-new-website/our-users.html
ofbiz/branches/ofbiz-new-website/service-providers.html
ofbiz/branches/ofbiz-new-website/source-repository.html
ofbiz/branches/ofbiz-new-website/template/region/footer.tpl.php
ofbiz/branches/ofbiz-new-website/user-stories.html

Modified: ofbiz/branches/ofbiz-new-website/about-ofbiz.html
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/about-ofbiz.html?rev=1802763=1802762=1802763=diff
==
--- ofbiz/branches/ofbiz-new-website/about-ofbiz.html (original)
+++ ofbiz/branches/ofbiz-new-website/about-ofbiz.html Mon Jul 24 09:08:38 2017
@@ -176,8 +176,8 @@
   target="_blank" title="follow us on 
Twitter">twitter
   
 https://www.youtube.com/user/ofbiz; class="icon-play 
socialIcon tips"  title="follow us on Youtube">Youtube
-  

svn commit: r1802756 - in /ofbiz/branches/ofbiz-new-website: ./ template/region/

2017-07-24 Thread sharan
Author: sharan
Date: Mon Jul 24 08:18:05 2017
New Revision: 1802756

URL: http://svn.apache.org/viewvc?rev=1802756=rev
Log:
Improved:Added Downloads page to menu bar and regenerated all pages

Modified:
ofbiz/branches/ofbiz-new-website/about-ofbiz.html
ofbiz/branches/ofbiz-new-website/business-users.html
ofbiz/branches/ofbiz-new-website/developers.html
ofbiz/branches/ofbiz-new-website/download.html
ofbiz/branches/ofbiz-new-website/faqs.html
ofbiz/branches/ofbiz-new-website/getting-involved.html
ofbiz/branches/ofbiz-new-website/index.html
ofbiz/branches/ofbiz-new-website/mailinglists.html
ofbiz/branches/ofbiz-new-website/ofbiz-demos.html
ofbiz/branches/ofbiz-new-website/our-users.html
ofbiz/branches/ofbiz-new-website/service-providers.html
ofbiz/branches/ofbiz-new-website/source-repository.html
ofbiz/branches/ofbiz-new-website/template/region/header.tpl.php
ofbiz/branches/ofbiz-new-website/user-stories.html

Modified: ofbiz/branches/ofbiz-new-website/about-ofbiz.html
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/about-ofbiz.html?rev=1802756=1802755=1802756=diff
==
--- ofbiz/branches/ofbiz-new-website/about-ofbiz.html (original)
+++ ofbiz/branches/ofbiz-new-website/about-ofbiz.html Mon Jul 24 08:18:05 2017
@@ -86,6 +86,7 @@
 Getting Involved  
  
 Mailing Lists
 Source Repository
+   Downloadshttps://issues.apache.org/jira/browse/OFBIZ/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel;
 target="_blank" >Issue Tracker
 FAQ
   

Modified: ofbiz/branches/ofbiz-new-website/business-users.html
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/business-users.html?rev=1802756=1802755=1802756=diff
==
--- ofbiz/branches/ofbiz-new-website/business-users.html (original)
+++ ofbiz/branches/ofbiz-new-website/business-users.html Mon Jul 24 08:18:05 
2017
@@ -86,6 +86,7 @@
 Getting Involved  
  
 Mailing Lists
 Source Repository
+   Downloadshttps://issues.apache.org/jira/browse/OFBIZ/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel;
 target="_blank" >Issue Tracker
 FAQ
   

Modified: ofbiz/branches/ofbiz-new-website/developers.html
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/developers.html?rev=1802756=1802755=1802756=diff
==
--- ofbiz/branches/ofbiz-new-website/developers.html (original)
+++ ofbiz/branches/ofbiz-new-website/developers.html Mon Jul 24 08:18:05 2017
@@ -86,6 +86,7 @@
 Getting Involved  
  
 Mailing Lists
 Source Repository
+   Downloadshttps://issues.apache.org/jira/browse/OFBIZ/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel;
 target="_blank" >Issue Tracker
 FAQ
   

Modified: ofbiz/branches/ofbiz-new-website/download.html
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/download.html?rev=1802756=1802755=1802756=diff
==
--- ofbiz/branches/ofbiz-new-website/download.html (original)
+++ ofbiz/branches/ofbiz-new-website/download.html Mon Jul 24 08:18:05 2017
@@ -86,6 +86,7 @@
 Getting Involved  
  
 Mailing Lists
 Source Repository
+   Downloadshttps://issues.apache.org/jira/browse/OFBIZ/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel;
 target="_blank" >Issue Tracker
 FAQ
   

Modified: ofbiz/branches/ofbiz-new-website/faqs.html
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/faqs.html?rev=1802756=1802755=1802756=diff
==
--- ofbiz/branches/ofbiz-new-website/faqs.html (original)
+++ ofbiz/branches/ofbiz-new-website/faqs.html Mon Jul 24 08:18:05 2017
@@ -86,6 +86,7 @@
 Getting Involved  
  
 Mailing Lists
 Source Repository
+   Downloadshttps://issues.apache.org/jira/browse/OFBIZ/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel;
 target="_blank" >Issue Tracker
 FAQ
   

Modified: ofbiz/branches/ofbiz-new-website/getting-involved.html
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/getting-involved.html?rev=1802756=1802755=1802756=diff
==
--- ofbiz/branches/ofbiz-new-website/getting-involved.html (original)

svn commit: r1802755 - in /ofbiz/ofbiz-framework/trunk/applications: manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java product/servicedef/services_invent

2017-07-24 Thread deepak
Author: deepak
Date: Mon Jul 24 06:47:08 2017
New Revision: 1802755

URL: http://svn.apache.org/viewvc?rev=1802755=rev
Log:
Fixed: Improvements in Lot entity definition and services, 
Applied slightly modified patch from jira issue OFBIZ-8273.
productionruntests test was failing, this will fix the test case.  

Thanks Devanshu for your contribution.

Modified:

ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java

ofbiz/ofbiz-framework/trunk/applications/product/servicedef/services_inventory.xml

Modified: 
ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?rev=1802755=1802754=1802755=diff
==
--- 
ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
 Mon Jul 24 06:47:08 2017
@@ -1650,9 +1650,8 @@ public class ProductionRunServices {
 GenericValue lot = 
EntityQuery.use(delegator).from("Lot").where("lotId", lotId).queryOne();
 if (lot == null) {
 if (createLotIfNeeded.booleanValue()) {
-Map createLotCtx = new HashMap<>();
+Map createLotCtx = 
ctx.makeValidContext("createLot", ModelService.IN_PARAM, context);
 createLotCtx.put("creationDate", 
UtilDateTime.nowTimestamp());
-createLotCtx.put("userLogin", userLogin);
 Map serviceResults = 
dispatcher.runSync("createLot", createLotCtx);
 if (!ServiceUtil.isSuccess(serviceResults)) {
 
Debug.logError(ServiceUtil.getErrorMessage(serviceResults), module);

Modified: 
ofbiz/ofbiz-framework/trunk/applications/product/servicedef/services_inventory.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/servicedef/services_inventory.xml?rev=1802755=1802754=1802755=diff
==
--- 
ofbiz/ofbiz-framework/trunk/applications/product/servicedef/services_inventory.xml
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/product/servicedef/services_inventory.xml
 Mon Jul 24 06:47:08 2017
@@ -71,7 +71,7 @@ under the License.
 
 
 Create a Lot
-
+
 
 
 




svn commit: r1802753 - in /ofbiz/ofbiz-framework/trunk/applications: accounting/groovyScripts/admin/ accounting/groovyScripts/payment/ accounting/groovyScripts/rate/ workeffort/groovyScripts/workeffor

2017-07-24 Thread deepak
Author: deepak
Date: Mon Jul 24 06:13:11 2017
New Revision: 1802753

URL: http://svn.apache.org/viewvc?rev=1802753=rev
Log:
Improved: Used ModelService.IN_PARAM instead of hard coded "IN" in groovy file.

Modified:

ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/admin/AcctgAdminServices.groovy

ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/payment/FindInvoicesByDueDate.groovy

ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy

ofbiz/ofbiz-framework/trunk/applications/workeffort/groovyScripts/workeffort/calendar/Days.groovy

ofbiz/ofbiz-framework/trunk/applications/workeffort/groovyScripts/workeffort/calendar/Month.groovy

ofbiz/ofbiz-framework/trunk/applications/workeffort/groovyScripts/workeffort/calendar/Week.groovy

Modified: 
ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/admin/AcctgAdminServices.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/admin/AcctgAdminServices.groovy?rev=1802753=1802752=1802753=diff
==
--- 
ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/admin/AcctgAdminServices.groovy
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/admin/AcctgAdminServices.groovy
 Mon Jul 24 06:13:11 2017
@@ -23,6 +23,8 @@ import org.apache.ofbiz.base.util.UtilPr
 import org.apache.ofbiz.entity.condition.EntityConditionBuilder
 import org.apache.ofbiz.entity.GenericValue
 import org.apache.ofbiz.entity.util.EntityUtil
+import org.apache.ofbiz.service.ModelService
+
 
 def createPartyAcctgPreference() {
 //check that the party is an INTERNAL_ORGANIZATION, as defined in PartyRole
@@ -120,7 +122,7 @@ def updateFXConversion() {
 delegator.storeAll(uomConversions)
 
 //now create a new conversion relationship
-Map createParams = 
dispatcher.getDispatchContext().makeValidContext("createUomConversionDated", 
"IN", parameters)
+Map createParams = 
dispatcher.getDispatchContext().makeValidContext("createUomConversionDated", 
ModelService.IN_PARAM, parameters)
 if (!parameters.fromDate) {
 createParams.put("fromDate", nowTimestamp)
 }

Modified: 
ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/payment/FindInvoicesByDueDate.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/payment/FindInvoicesByDueDate.groovy?rev=1802753=1802752=1802753=diff
==
--- 
ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/payment/FindInvoicesByDueDate.groovy
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/payment/FindInvoicesByDueDate.groovy
 Mon Jul 24 06:13:11 2017
@@ -17,10 +17,11 @@
  * under the License.
  */
 
+import org.apache.ofbiz.service.ModelService
 context.invoicePaymentInfoList = []
 
 if (parameters.invoiceTypeId) { // it's not the initialisation but a real 
search request
-serviceCtx = 
dispatcher.getDispatchContext().makeValidContext("getInvoicePaymentInfoListByDueDateOffset",
 "IN", parameters)
+serviceCtx = 
dispatcher.getDispatchContext().makeValidContext("getInvoicePaymentInfoListByDueDateOffset",
 ModelService.IN_PARAM, parameters)
 result = runService("getInvoicePaymentInfoListByDueDateOffset", serviceCtx)
 context.invoicePaymentInfoList = result.invoicePaymentInfoList 
 }

Modified: 
ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy?rev=1802753=1802752=1802753=diff
==
--- 
ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy
 Mon Jul 24 06:13:11 2017
@@ -21,8 +21,10 @@ import org.apache.ofbiz.base.util.UtilDa
 import org.apache.ofbiz.base.util.UtilProperties
 import org.apache.ofbiz.entity.GenericValue
 import org.apache.ofbiz.entity.util.EntityUtil
+import org.apache.ofbiz.service.ModelService
 import org.apache.ofbiz.service.ServiceUtil
 
+
 import java.sql.Timestamp
 
 
@@ -48,7 +50,7 @@ def updateRateAmount() {
 if (rateAmountLookedUpValue) {
 updating = 
(rateAmountLookedUpValue.fromDate.compareTo(newEntity.fromDate) == 0)
 if (rateAmountLookedUpValue.rateAmount != rateAmount) {
-Map expireRateAmountMap = 
dispatcher.getDispatchContext().makeValidContext('expireRateAmount', 'IN', 
rateAmountLookedUpValue)
+Map expireRateAmountMap = 
dispatcher.getDispatchContext().makeValidContext('expireRateAmount', 
ModelService.IN_PARAM, 

svn commit: r1802752 - /ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy

2017-07-24 Thread deepak
Author: deepak
Date: Mon Jul 24 06:01:41 2017
New Revision: 1802752

URL: http://svn.apache.org/viewvc?rev=1802752=rev
Log:
Fixed: Fixed typo done at r#1802668, Corrected service name from 
filteredRatesList to filterRateAmountList

Modified:

ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy

Modified: 
ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy?rev=1802752=1802751=1802752=diff
==
--- 
ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy
 Mon Jul 24 06:01:41 2017
@@ -175,7 +175,7 @@ def getRateAmount() {
 
 if (!ratesList) {
 ratesList = from('RateAmount').where([rateTypeId: 
parameters.rateTypeId]).queryList();
-Map serviceContextMap = 
dispatcher.getDispatchContext().makeValidContext("filteredRatesList", "IN", 
parameters)
+Map serviceContextMap = 
dispatcher.getDispatchContext().makeValidContext("filterRateAmountList", "IN", 
parameters)
 serviceContextMap.ratesList = ratesList
 Map result = run service: 'filterRateAmountList', with: 
serviceContextMap
 ratesList = EntityUtil.filterByDate(result.filteredRatesList)