details:   https://code.openbravo.com/erp/devel/pi/rev/e510966c00fd
changeset: 22012:e510966c00fd
user:      Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> 
openbravo.com>
date:      Thu Feb 13 21:00:30 2014 +0530
summary:   Related to Issue 25644: Cannot create a work effort from a work 
requirement if operation time / quantity returns a repeating decimal value

diffstat:

 src/org/openbravo/erpCommon/ad_actionButton/CreateWorkEffort.java |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (14 lines):

diff -r e2e4ee246202 -r e510966c00fd 
src/org/openbravo/erpCommon/ad_actionButton/CreateWorkEffort.java
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateWorkEffort.java Thu Feb 
13 20:19:32 2014 +0530
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateWorkEffort.java Thu Feb 
13 21:00:30 2014 +0530
@@ -140,8 +140,8 @@
             BigDecimal estimatedTime = BigDecimal.ZERO;
             if (wrOp.getEstimatedTime() != null && wrOp.getQuantity() != null
                 && wrOp.getQuantity().compareTo(BigDecimal.ZERO) != 0) {
-              estimatedTime = wrOp.getEstimatedTime()
-                  .divide(wrOp.getQuantity(), 
BigDecimal.ROUND_HALF_UP).multiply(requeriedQty);
+              estimatedTime = wrOp.getEstimatedTime().multiply(requeriedQty)
+                  .divide(wrOp.getQuantity(), BigDecimal.ROUND_HALF_UP);
             }
             productionPlan.setEstimatedTime(new 
BigDecimal(estimatedTime.longValue()));
           } else {

------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to