diff -r 1ebf81509d4f src/org/openbravo/retail/posterminal/OrderLoader.java
--- a/src/org/openbravo/retail/posterminal/OrderLoader.java	Wed Aug 21 08:30:34 2013 +0200
+++ b/src/org/openbravo/retail/posterminal/OrderLoader.java	Wed Aug 21 23:53:48 2013 +0200
@@ -12,6 +12,7 @@
 import java.io.StringWriter;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
+import java.sql.CallableStatement;
 import java.sql.SQLException;
 import java.sql.Timestamp;
 import java.util.ArrayList;
@@ -308,9 +309,20 @@
       t2 = System.currentTimeMillis();
       updateAuditInfo(order, invoice, jsonorder);
       t3 = System.currentTimeMillis();
+
+      if (!isQuotation) {
+        if (!isLayaway && !partialpayLayaway) {
+          // Stock manipulation
+          handleStock(shipment);
+          // Send email
+        }
+      }
+      long t4 = System.currentTimeMillis();
+
       log.debug("Creation of bobs. Order: " + (t112 - t111) + "; Orderlines: " + (t113 - t112)
           + "; Shipment: " + (t115 - t113) + "; Invoice: " + (t116 - t115) + "; Approvals"
-          + (t11 - t116));
+          + (t11 - t116) + "; stock" + (t4 - t3));
+
     } finally {
       TriggerHandler.getInstance().enable();
     }
@@ -323,11 +335,6 @@
       if (paymentResponse != null) {
         return paymentResponse;
       }
-      if (!isLayaway && !partialpayLayaway) {
-        // Stock manipulation
-        handleStock(shipment);
-        // Send email
-      }
       if (sendEmail) {
         EmailSender emailSender = new EmailSender(order.getId(), jsonorder);
       }
@@ -982,11 +989,59 @@
         transaction.setGoodsShipmentLine(line);
         transaction.setAttributeSetValue(line.getAttributeSetValue());
 
+        updateInventory(transaction);
+
         OBDal.getInstance().save(transaction);
       }
     }
   }
 
+  protected void updateInventory(MaterialTransaction transaction) {
+    try {
+      org.openbravo.database.ConnectionProvider cp = new DalConnectionProvider(false);
+      CallableStatement cs = cp.getConnection().prepareCall(
+          "{call M_UPDATE_INVENTORY (?,?,?,?,?,?,?,?,?,?,?,?,?)}");
+
+      // client
+      cs.setString(1, OBContext.getOBContext().getCurrentClient().getId());
+      // org
+      cs.setString(2, OBContext.getOBContext().getCurrentOrganization().getId());
+      // user
+      cs.setString(3, OBContext.getOBContext().getUser().getId());
+      // product
+      cs.setString(4, transaction.getProduct().getId());
+      // locator
+      cs.setString(5, transaction.getStorageBin().getId());
+      // attributesetinstance
+      cs.setString(6, transaction.getAttributeSetValue() != null ? transaction
+          .getAttributeSetValue().getId() : null);
+      // uom
+      cs.setString(7, transaction.getUOM().getId());
+      // product uom
+      cs.setString(8, null);
+      // p_qty
+      cs.setBigDecimal(9,
+          transaction.getMovementQuantity() != null ? transaction.getMovementQuantity() : null);
+      // p_qtyorder
+      cs.setBigDecimal(10, transaction.getOrderQuantity() != null ? transaction.getOrderQuantity()
+          : null);
+      // p_dateLastInventory --- **
+      cs.setDate(11, null);
+      // p_preqty
+      cs.setBigDecimal(12, transaction.getMovementQuantity() != null ? transaction
+          .getMovementQuantity().multiply(NEGATIVE_ONE) : null);
+      // p_preqtyorder
+      cs.setBigDecimal(13, transaction.getOrderQuantity() != null ? transaction.getOrderQuantity()
+          .multiply(NEGATIVE_ONE) : null);
+
+      cs.execute();
+      cs.close();
+    } catch (Exception e) {
+      System.out.println("Error calling to M_UPDATE_INVENTORY");
+      throw new OBException(e.getMessage());
+    }
+  }
+
   protected JSONObject handlePayments(JSONObject jsonorder, Order order, Invoice invoice)
       throws Exception {
     String posTerminalId = jsonorder.getString("posTerminal");
