diff --git a/src/org/openbravo/erpCommon/ad_forms/DocInOut.java b/src/org/openbravo/erpCommon/ad_forms/DocInOut.java
--- a/src/org/openbravo/erpCommon/ad_forms/DocInOut.java
+++ b/src/org/openbravo/erpCommon/ad_forms/DocInOut.java
@@ -325,7 +325,7 @@
             setMessageResult(conn, STATUS_NoRelatedPO, "error", parameters);
             throw new IllegalStateException();
           }
-          costs = ol.getUnitPrice().multiply(inOutLine.getMovementQuantity()).toString();
+          costs = ol.getUnitPrice().multiply(new BigDecimal(line.m_qty)).toString();
           BigDecimal b_Costs = new BigDecimal(costs).setScale(new Integer(strScale),
               RoundingMode.HALF_UP);
           strCosts = b_Costs.toString();
