details:   https://code.openbravo.com/erp/devel/pi/rev/83a89e5a2543
changeset: 33778:83a89e5a2543
user:      David Miguelez <david.miguelez <at> openbravo.com>
date:      Fri Apr 06 09:47:12 2018 +0200
summary:   Backed out changeset d27b7f54d0da

diffstat:

 src-db/database/sourcedata/AD_COLUMN.xml                          |   2 +-
 src/org/openbravo/erpCommon/ad_actionButton/CreateWorkEffort.java |  10 
+++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (51 lines):

diff -r b4a1ae65524d -r 83a89e5a2543 src-db/database/sourcedata/AD_COLUMN.xml
--- a/src-db/database/sourcedata/AD_COLUMN.xml  Fri Apr 06 08:43:49 2018 +0200
+++ b/src-db/database/sourcedata/AD_COLUMN.xml  Fri Apr 06 09:47:12 2018 +0200
@@ -170425,7 +170425,7 @@
 <!--802026-->  <HELP><![CDATA[How many times it is necessary to complete a 
phase before closing it.]]></HELP>
 <!--802026-->  <COLUMNNAME><![CDATA[Neededquantity]]></COLUMNNAME>
 <!--802026-->  <AD_TABLE_ID><![CDATA[385]]></AD_TABLE_ID>
-<!--802026-->  <AD_REFERENCE_ID><![CDATA[29]]></AD_REFERENCE_ID>
+<!--802026-->  <AD_REFERENCE_ID><![CDATA[11]]></AD_REFERENCE_ID>
 <!--802026-->  <FIELDLENGTH><![CDATA[8]]></FIELDLENGTH>
 <!--802026-->  <DEFAULTVALUE><![CDATA[@SQL=SELECT (QUANTITY - DONEQUANTITY) AS 
DefaultValue FROM MA_WRPhase WHERE MA_WRPhase_ID = 
@MA_WRPhase_ID@]]></DEFAULTVALUE>
 <!--802026-->  <ISKEY><![CDATA[N]]></ISKEY>
diff -r b4a1ae65524d -r 83a89e5a2543 
src/org/openbravo/erpCommon/ad_actionButton/CreateWorkEffort.java
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateWorkEffort.java Fri Apr 
06 08:43:49 2018 +0200
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateWorkEffort.java Fri Apr 
06 09:47:12 2018 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2011-2018 Openbravo SLU 
+ * All portions are Copyright (C) 2011-2014 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -134,14 +134,14 @@
 
           productionPlan.setRunTime(0L);
           productionPlan.setClosephase(false);
-          BigDecimal requiredQty = 
wrOp.getQuantity().subtract(wrOp.getCompletedQuantity());
+          BigDecimal requeriedQty = 
wrOp.getQuantity().subtract(wrOp.getCompletedQuantity());
 
           if (wrOp.isCreateStandards()) {
-            productionPlan.setProductionQuantity(requiredQty);
+            productionPlan.setProductionQuantity(requeriedQty);
             BigDecimal estimatedTime = BigDecimal.ZERO;
             if (wrOp.getEstimatedTime() != null && wrOp.getQuantity() != null
                 && wrOp.getQuantity().compareTo(BigDecimal.ZERO) != 0) {
-              estimatedTime = wrOp.getEstimatedTime().multiply(requiredQty)
+              estimatedTime = wrOp.getEstimatedTime().multiply(requeriedQty)
                   .divide(wrOp.getQuantity(), RoundingMode.HALF_UP);
             }
             productionPlan.setEstimatedTime(new 
BigDecimal(estimatedTime.longValue()));
@@ -156,7 +156,7 @@
           productionPlan.setStartingTime(starttime);
           productionPlan.setEndingTime(endtime);
 
-          productionPlan.setRequiredQuantity(requiredQty);
+          productionPlan.setRequiredQuantity(requeriedQty.longValue());
           
productionPlan.setProcessUnit(wrOp.getWorkRequirement().getProcessUnit());
           if (wrOp.getWorkRequirement().getConversionRate() != null
               && 
wrOp.getWorkRequirement().getConversionRate().compareTo(BigDecimal.ZERO) != 0) {

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to