[Reservations]Backout unwanted changes.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Mon, 05 Nov 2012 10:19:42 +0100
changeset 18673 097d9d76658b
parent 18672 c2dcaf0dacbb
child 18674 e187111ee5cc
[Reservations]Backout unwanted changes.
src/org/openbravo/common/actionhandler/RMInOutPickEditLines.java
src/org/openbravo/common/actionhandler/RMShipmentPickEditLines.java
src/org/openbravo/costing/CostingMigrationProcess.java
src/org/openbravo/costing/CostingServer.java
src/org/openbravo/costing/CostingUtils.java
src/org/openbravo/erpCommon/ad_forms/DocInOut.java
--- a/src/org/openbravo/common/actionhandler/RMInOutPickEditLines.java	Fri Nov 02 14:41:34 2012 +0100
+++ b/src/org/openbravo/common/actionhandler/RMInOutPickEditLines.java	Mon Nov 05 10:19:42 2012 +0100
@@ -32,7 +32,7 @@
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.common.enterprise.Locator;
 import org.openbravo.model.common.order.OrderLine;
-import org.openbravo.model.materialmgmt.transaction.ReservationStock;
+import org.openbravo.model.materialmgmt.transaction.ShipmentInOut;
 import org.openbravo.model.materialmgmt.transaction.ShipmentInOutLine;
 import org.openbravo.model.sales.ConditionGoods;
 
@@ -52,7 +52,7 @@
       jsonRequest = new JSONObject(content);
       log.debug(jsonRequest);
       final String strInOutId = jsonRequest.getString("inpmInoutId");
-      ReservationStock inOut = OBDal.getInstance().get(ReservationStock.class, strInOutId);
+      ShipmentInOut inOut = OBDal.getInstance().get(ShipmentInOut.class, strInOutId);
       if (cleanInOutLines(inOut)) {
         createInOutLines(jsonRequest);
       }
@@ -65,7 +65,7 @@
     return jsonRequest;
   }
 
-  private boolean cleanInOutLines(ReservationStock inOut) {
+  private boolean cleanInOutLines(ShipmentInOut inOut) {
     if (inOut == null) {
       return false;
     } else if (inOut.getMaterialMgmtShipmentInOutLineList().isEmpty()) {
@@ -90,7 +90,7 @@
       return;
     }
     final String strInOutId = jsonRequest.getString("inpmInoutId");
-    ReservationStock inOut = OBDal.getInstance().get(ReservationStock.class, strInOutId);
+    ShipmentInOut inOut = OBDal.getInstance().get(ShipmentInOut.class, strInOutId);
     for (long i = 0; i < selectedLines.length(); i++) {
       JSONObject selectedLine = selectedLines.getJSONObject((int) i);
       log.debug(selectedLine);
--- a/src/org/openbravo/common/actionhandler/RMShipmentPickEditLines.java	Fri Nov 02 14:41:34 2012 +0100
+++ b/src/org/openbravo/common/actionhandler/RMShipmentPickEditLines.java	Mon Nov 05 10:19:42 2012 +0100
@@ -33,7 +33,7 @@
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.common.enterprise.Locator;
 import org.openbravo.model.common.order.OrderLine;
-import org.openbravo.model.materialmgmt.transaction.ReservationStock;
+import org.openbravo.model.materialmgmt.transaction.ShipmentInOut;
 import org.openbravo.model.materialmgmt.transaction.ShipmentInOutLine;
 
 /**
@@ -53,7 +53,7 @@
       jsonRequest = new JSONObject(content);
       log.debug(jsonRequest);
       final String strInOutId = jsonRequest.getString("inpmInoutId");
-      ReservationStock inOut = OBDal.getInstance().get(ReservationStock.class, strInOutId);
+      ShipmentInOut inOut = OBDal.getInstance().get(ShipmentInOut.class, strInOutId);
       if (cleanInOutLines(inOut)) {
         createInOutLines(jsonRequest);
       }
@@ -66,7 +66,7 @@
     return jsonRequest;
   }
 
-  private boolean cleanInOutLines(ReservationStock inOut) {
+  private boolean cleanInOutLines(ShipmentInOut inOut) {
     if (inOut == null) {
       return false;
     } else if (inOut.getMaterialMgmtShipmentInOutLineList().isEmpty()) {
@@ -94,7 +94,7 @@
       return;
     }
     final String strInOutId = jsonRequest.getString("inpmInoutId");
-    ReservationStock inOut = OBDal.getInstance().get(ReservationStock.class, strInOutId);
+    ShipmentInOut inOut = OBDal.getInstance().get(ShipmentInOut.class, strInOutId);
     TreeSet<String> rmVendorRefs = new TreeSet<String>();
     for (long i = 0; i < selectedLines.length(); i++) {
       JSONObject selectedLine = selectedLines.getJSONObject((int) i);
--- a/src/org/openbravo/costing/CostingMigrationProcess.java	Fri Nov 02 14:41:34 2012 +0100
+++ b/src/org/openbravo/costing/CostingMigrationProcess.java	Mon Nov 05 10:19:42 2012 +0100
@@ -70,7 +70,7 @@
 import org.openbravo.model.materialmgmt.transaction.InventoryCount;
 import org.openbravo.model.materialmgmt.transaction.InventoryCountLine;
 import org.openbravo.model.materialmgmt.transaction.MaterialTransaction;
-import org.openbravo.model.materialmgmt.transaction.ReservationStock;
+import org.openbravo.model.materialmgmt.transaction.ShipmentInOut;
 import org.openbravo.model.materialmgmt.transaction.ShipmentInOutLine;
 import org.openbravo.scheduling.Process;
 import org.openbravo.scheduling.ProcessBundle;
@@ -439,7 +439,7 @@
         + " < 0 then -tc." + TransactionCost.PROPERTY_COST);
     select.append("     else tc." + TransactionCost.PROPERTY_COST + " end ) as cost,");
     select.append("  tc." + TransactionCost.PROPERTY_CURRENCY + ".id as currency,");
-    select.append("  coalesce(sr." + ReservationStock.PROPERTY_ACCOUNTINGDATE + ", trx."
+    select.append("  coalesce(sr." + ShipmentInOut.PROPERTY_ACCOUNTINGDATE + ", trx."
         + MaterialTransaction.PROPERTY_MOVEMENTDATE + ") as mdate,");
     select.append("  sum(trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + ") as stock");
 
@@ -454,7 +454,7 @@
     select.append("   and trx." + MaterialTransaction.PROPERTY_ISCOSTCALCULATED + " = true");
     select.append("   and trx." + MaterialTransaction.PROPERTY_ORGANIZATION + ".id in (:orgs)");
     select.append(" group by tc." + TransactionCost.PROPERTY_CURRENCY + ",");
-    select.append("   coalesce(sr." + ReservationStock.PROPERTY_ACCOUNTINGDATE + ", trx."
+    select.append("   coalesce(sr." + ShipmentInOut.PROPERTY_ACCOUNTINGDATE + ", trx."
         + MaterialTransaction.PROPERTY_MOVEMENTDATE + ")");
 
     Query trxQry = OBDal.getInstance().getSession().createQuery(select.toString());
--- a/src/org/openbravo/costing/CostingServer.java	Fri Nov 02 14:41:34 2012 +0100
+++ b/src/org/openbravo/costing/CostingServer.java	Mon Nov 05 10:19:42 2012 +0100
@@ -214,7 +214,7 @@
     static TrxType getTrxType(MaterialTransaction transaction) {
       if (transaction.getGoodsShipmentLine() != null) {
         // Receipt / Shipment
-        org.openbravo.model.materialmgmt.transaction.ReservationStock inout = transaction
+        org.openbravo.model.materialmgmt.transaction.ShipmentInOut inout = transaction
             .getGoodsShipmentLine().getShipmentReceipt();
         if (inout.isSalesTransaction()) {
           // Shipment
--- a/src/org/openbravo/costing/CostingUtils.java	Fri Nov 02 14:41:34 2012 +0100
+++ b/src/org/openbravo/costing/CostingUtils.java	Mon Nov 05 10:19:42 2012 +0100
@@ -49,7 +49,7 @@
 import org.openbravo.model.materialmgmt.cost.Costing;
 import org.openbravo.model.materialmgmt.cost.TransactionCost;
 import org.openbravo.model.materialmgmt.transaction.MaterialTransaction;
-import org.openbravo.model.materialmgmt.transaction.ReservationStock;
+import org.openbravo.model.materialmgmt.transaction.ShipmentInOut;
 import org.openbravo.model.materialmgmt.transaction.ShipmentInOutLine;
 
 public class CostingUtils {
@@ -314,7 +314,7 @@
         + " < 0 then -tc." + TransactionCost.PROPERTY_COST);
     select.append("     else tc." + TransactionCost.PROPERTY_COST + " end ) as cost,");
     select.append("  tc." + TransactionCost.PROPERTY_CURRENCY + ".id as currency,");
-    select.append("  coalesce(sr." + ReservationStock.PROPERTY_ACCOUNTINGDATE + ", trx."
+    select.append("  coalesce(sr." + ShipmentInOut.PROPERTY_ACCOUNTINGDATE + ", trx."
         + MaterialTransaction.PROPERTY_MOVEMENTDATE + ") as mdate");
 
     select.append(" from " + TransactionCost.ENTITY_NAME + " as tc");
@@ -332,7 +332,7 @@
     }
     select.append("   and trx." + MaterialTransaction.PROPERTY_ORGANIZATION + ".id in (:orgs)");
     select.append(" group by tc." + TransactionCost.PROPERTY_CURRENCY + ",");
-    select.append("   coalesce(sr." + ReservationStock.PROPERTY_ACCOUNTINGDATE + ", trx."
+    select.append("   coalesce(sr." + ShipmentInOut.PROPERTY_ACCOUNTINGDATE + ", trx."
         + MaterialTransaction.PROPERTY_MOVEMENTDATE + ")");
 
     Query trxQry = OBDal.getInstance().getSession().createQuery(select.toString());
--- a/src/org/openbravo/erpCommon/ad_forms/DocInOut.java	Fri Nov 02 14:41:34 2012 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocInOut.java	Mon Nov 05 10:19:42 2012 +0100
@@ -44,7 +44,7 @@
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.common.plm.Product;
 import org.openbravo.model.materialmgmt.transaction.MaterialTransaction;
-import org.openbravo.model.materialmgmt.transaction.ReservationStock;
+import org.openbravo.model.materialmgmt.transaction.ShipmentInOut;
 import org.openbravo.model.materialmgmt.transaction.ShipmentInOutLine;
 
 public class DocInOut extends AcctServer {
@@ -451,7 +451,7 @@
   public boolean getDocumentConfirmation(ConnectionProvider conn, String strRecordId) {
     try {
       DocLineInOutData[] data = DocLineInOutData.select(conn, Record_ID);
-      ReservationStock inOut = OBDal.getInstance().get(ReservationStock.class, strRecordId);
+      ShipmentInOut inOut = OBDal.getInstance().get(ShipmentInOut.class, strRecordId);
       String dateFormat = OBPropertiesProvider.getInstance().getOpenbravoProperties()
           .getProperty("dateFormat.java");
       SimpleDateFormat outputFormat = new SimpleDateFormat(dateFormat);