Fixed issue 14610 Add warehouse to Product Movements Report
authorSandra Huguet <sandra.huguet@openbravo.com>
Wed, 25 Apr 2012 10:38:10 +0200
changeset 16207 705c297b4a4e
parent 16206 01c9ee1b4fb9
child 16208 1616586eedf3
Fixed issue 14610 Add warehouse to Product Movements Report
Add a new column with warehouse for each table Product
Movements Report
src-db/database/sourcedata/AD_TEXTINTERFACES.xml
src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.html
src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.java
src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.xml
src/org/openbravo/erpCommon/ad_reports/ReportProductMovement_data.xsql
--- a/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Wed Apr 25 15:50:07 2012 +0200
+++ b/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Wed Apr 25 10:38:10 2012 +0200
@@ -19421,6 +19421,17 @@
 <!--AC7C3DDAFB4A4CD29F38A6D9E9DA3CEE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--AC7C3DDAFB4A4CD29F38A6D9E9DA3CEE--></AD_TEXTINTERFACES>
 
+<!--AD868CA9DF734111BBDE6386301A7044--><AD_TEXTINTERFACES>
+<!--AD868CA9DF734111BBDE6386301A7044-->  <AD_TEXTINTERFACES_ID><![CDATA[AD868CA9DF734111BBDE6386301A7044]]></AD_TEXTINTERFACES_ID>
+<!--AD868CA9DF734111BBDE6386301A7044-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--AD868CA9DF734111BBDE6386301A7044-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--AD868CA9DF734111BBDE6386301A7044-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--AD868CA9DF734111BBDE6386301A7044-->  <TEXT><![CDATA[Starting Warehouse]]></TEXT>
+<!--AD868CA9DF734111BBDE6386301A7044-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/ReportProductMovement.html]]></FILENAME>
+<!--AD868CA9DF734111BBDE6386301A7044-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--AD868CA9DF734111BBDE6386301A7044-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--AD868CA9DF734111BBDE6386301A7044--></AD_TEXTINTERFACES>
+
 <!--AD935A21C34B4D4DAB1A214124C25C07--><AD_TEXTINTERFACES>
 <!--AD935A21C34B4D4DAB1A214124C25C07-->  <AD_TEXTINTERFACES_ID><![CDATA[AD935A21C34B4D4DAB1A214124C25C07]]></AD_TEXTINTERFACES_ID>
 <!--AD935A21C34B4D4DAB1A214124C25C07-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -20037,6 +20048,17 @@
 <!--C9E7449ECD8E42BE8413D8521C4779A8-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--C9E7449ECD8E42BE8413D8521C4779A8--></AD_TEXTINTERFACES>
 
+<!--CA5A6F1F3FF3415598050F9B42CFB76B--><AD_TEXTINTERFACES>
+<!--CA5A6F1F3FF3415598050F9B42CFB76B-->  <AD_TEXTINTERFACES_ID><![CDATA[CA5A6F1F3FF3415598050F9B42CFB76B]]></AD_TEXTINTERFACES_ID>
+<!--CA5A6F1F3FF3415598050F9B42CFB76B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CA5A6F1F3FF3415598050F9B42CFB76B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CA5A6F1F3FF3415598050F9B42CFB76B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CA5A6F1F3FF3415598050F9B42CFB76B-->  <TEXT><![CDATA[Final Warehouse]]></TEXT>
+<!--CA5A6F1F3FF3415598050F9B42CFB76B-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/ReportProductMovement.html]]></FILENAME>
+<!--CA5A6F1F3FF3415598050F9B42CFB76B-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--CA5A6F1F3FF3415598050F9B42CFB76B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--CA5A6F1F3FF3415598050F9B42CFB76B--></AD_TEXTINTERFACES>
+
 <!--CA76F1FFFF0A45CF97D51E8E264A2547--><AD_TEXTINTERFACES>
 <!--CA76F1FFFF0A45CF97D51E8E264A2547-->  <AD_TEXTINTERFACES_ID><![CDATA[CA76F1FFFF0A45CF97D51E8E264A2547]]></AD_TEXTINTERFACES_ID>
 <!--CA76F1FFFF0A45CF97D51E8E264A2547-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.html	Wed Apr 25 15:50:07 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.html	Wed Apr 25 10:38:10 2012 +0200
@@ -13,7 +13,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) 2001-2010 Openbravo SLU
+ * All portions are Copyright (C) 2001-2012 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -452,35 +452,37 @@
                 <div style="height:25px;" />
                 <table cellspacing="0" cellpadding="0" width="100%" class="DataGrid_Header_Table DataGrid_Body_Table" style="table-layout: auto;" id="selEliminar1">
                   <tr class="DataGrid_Body_Row"> 
-                    <th class="DataGrid_Header_Cell" colspan="12"><span>Incoming/Outgoing</span></th>
+                    <th class="DataGrid_Header_Cell" colspan="14"><span>Incoming/Outgoing</span></th>
                   </tr>
                   <div id="sectionPartner"> 
                     <tr class="DataGrid_Body_Row"> 
-                      <th colspan="12" class="DataGrid_Header_Cell"><span>Customer<span>:&nbsp;</span><span id="fieldPartnername">xxAguinaga</span></span></th>
+                      <th colspan="14" class="DataGrid_Header_Cell"><span>Customer<span>:&nbsp;</span><span id="fieldPartnername">xxAguinaga</span></span></th>
                     </tr>
                     <tr class="DataGrid_Body_Row"> 
-                      <th width="10%" class="DataGrid_Header_Cell">Document No.</th>
-                      <th width="10%" class="DataGrid_Header_Cell">Date</th>
-                      <th width="34%" class="DataGrid_Header_Cell">Description</th>
-                      <th width="20%" class="DataGrid_Header_Cell">Attribute</th>
-                      <th width="12%" class="DataGrid_Header_Cell" colspan="3">
+                      <th width="8%" class="DataGrid_Header_Cell">Document No.</th>
+                      <th width="8%" class="DataGrid_Header_Cell">Date</th>
+                      <th width="12%" class="DataGrid_Header_Cell">Description</th>
+                      <th width="10%" class="DataGrid_Header_Cell">Attribute</th>
+                      <th width="16%" class="DataGrid_Header_Cell">Starting Warehouse</th>
+                      <th width="9%" class="DataGrid_Header_Cell" colspan="3">
                         <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background: none; border: 0px none">
-                          <tr class="DataGrid_Body_Row">
+                          <tr class="DataGrid_Header_Cell">
                             <th class="DataGrid_Header_Cell" width="100%" colspan="3" style="background: none; border: 0px none">Starting location</th>
                           </tr>
-                          <tr class="DataGrid_Body_Row">
+                          <tr class="DataGrid_Header_Cell">
                             <th class="DataGrid_Header_Cell" width="34%" style="background: none; border: 0px none">X</th>
                             <th class="DataGrid_Header_Cell" width="33%" style="background: none; border: 0px none">Y</th>
                             <th class="DataGrid_Header_Cell" width="33%" style="background: none; border: 0px none">Z</th>
                           </tr>
                         </table>
                       </th>
-                      <th width="12%" class="DataGrid_Header_Cell" colspan="3">
+                      <th width="16%" class="DataGrid_Header_Cell">Final Warehouse</th>
+                      <th width="9%" class="DataGrid_Header_Cell" colspan="3">
                         <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background: none; border: 0px none">
-                          <tr class="DataGrid_Body_Row" style="background: none; border: 0px none">
+                          <tr class="DataGrid_Header_Cell" style="background: none; border: 0px none">
                             <th class="DataGrid_Header_Cell" width="100%" colspan="3" style="background: none; border: 0px none">Final location</th>
                           </tr>
-                          <tr class="DataGrid_Body_Row">
+                          <tr class="DataGrid_Header_Cell">
                             <th class="DataGrid_Header_Cell" width="34%" style="background: none; border: 0px none">X</th>
                             <th class="DataGrid_Header_Cell" width="33%" style="background: none; border: 0px none">Y</th>
                             <th class="DataGrid_Header_Cell" width="33%" style="background: none; border: 0px none">Z</th>
@@ -488,23 +490,25 @@
                         </table>
                       </th>
                       <th width="6%" class="DataGrid_Header_Cell">Exit</th>
-                      <th width="10%" class="DataGrid_Header_Cell">Quantity</th>
+                      <th width="6%" class="DataGrid_Header_Cell">Quantity</th>
                     </tr>
                     <div id="sectionDetail"> 
                       <tr class="DataGrid_Body_Row DataGrid_Body_Row_yy" id="funcEvenOddRow1xx">
-                        <td width="10%" class="DataGrid_Body_Cell"><a href="#" onclick="ShipmentOrReceipt('xx', 'yy');return false;" onmouseover="window.status='Incoming/Outgoing';return true;" onmouseout="window.status='';return true;" class="LabelLink" id="fieldId"> 
+                        <td width="8%" class="DataGrid_Body_Cell"><a href="#" onclick="ShipmentOrReceipt('xx', 'yy');return false;" onmouseover="window.status='Incoming/Outgoing';return true;" onmouseout="window.status='';return true;" class="LabelLink" id="fieldId"> 
                           <span id="fieldDocumentNo">xx850000007</span></a></td>
-                        <td width="10%" class="DataGrid_Body_Cell" id="fieldMovementdate">xxfd200</td>
-                        <td width="34%" class="DataGrid_Body_Cell" id="fieldName">xx2345</td>
-                        <td width="20%" class="DataGrid_Body_Cell" id="fieldAttr">xx2345</td>
-                        <td width="4%"  class="DataGrid_Body_Cell" id="fieldXOrigin">xx3</td>
-                        <td width="4%"  class="DataGrid_Body_Cell" id="fieldYOrigin">xx3</td>
-                        <td width="4%"  class="DataGrid_Body_Cell" id="fieldZOrigin">xx3</td>
-                        <td width="4%"  class="DataGrid_Body_Cell" id="fieldXDestiny">xx2</td>
-                        <td width="4%"  class="DataGrid_Body_Cell" id="fieldYDestiny">xx2</td>
-                        <td width="4%"  class="DataGrid_Body_Cell" id="fieldZDestiny">xx2</td>
+                        <td width="8%" class="DataGrid_Body_Cell" id="fieldMovementdate">xxfd200</td>
+                        <td width="12%" class="DataGrid_Body_Cell" id="fieldName">xx2345</td>
+                        <td width="10%" class="DataGrid_Body_Cell" id="fieldAttr">xx2345</td>
+                        <td width="16%" class="DataGrid_Body_Cell" id="fieldWaOrigin">xx3</td>
+                        <td width="3%"  class="DataGrid_Body_Cell" id="fieldXOrigin">xx3</td>
+                        <td width="3%"  class="DataGrid_Body_Cell" id="fieldYOrigin">xx3</td>
+                        <td width="3%"  class="DataGrid_Body_Cell" id="fieldZOrigin">xx3</td>
+                        <td width="16%" class="DataGrid_Body_Cell" id="fieldWaDestiny">xx2</td>
+                        <td width="3%"  class="DataGrid_Body_Cell" id="fieldXDestiny">xx2</td>
+                        <td width="3%"  class="DataGrid_Body_Cell" id="fieldYDestiny">xx2</td>
+                        <td width="3%"  class="DataGrid_Body_Cell" id="fieldZDestiny">xx2</td>
                         <td width="6%"  class="DataGrid_Body_Cell" id="fieldOut">xxsi</td>
-                        <td width="10%" class="DataGrid_Body_Cell" id="fieldMovementqty">xx23</td>
+                        <td width="6%" class="DataGrid_Body_Cell" id="fieldMovementqty">xx23</td>
                       </tr>
                     </div>
                   </div>
@@ -512,41 +516,43 @@
                 <div style="height:15px;" />
                 <table cellspacing="0" cellpadding="0" width="100%" class="DataGrid_Header_Table DataGrid_Body_Table" style="table-layout: auto;" id="selEliminar2">
                   <tr class="DataGrid_Body_Row">
-                    <th class="DataGrid_Header_Cell" align="center" colspan="8"><span>Inventory regulation</span></th>
+                    <th class="DataGrid_Header_Cell" align="center" colspan="10"><span>Inventory regulation</span></th>
                   </tr>
                   <div id="sectionPartner1"> 
                     <tr class="DataGrid_Body_Row">
-                      <th class="DataGrid_Header_Cell" colspan="8"><span>Customer<span>:&nbsp;</span><span id="fieldPartnername1">xxAguinaga</span></span></th>
+                      <th class="DataGrid_Header_Cell" colspan="10"><span>Customer<span>:&nbsp;</span><span id="fieldPartnername1">xxAguinaga</span></span></th>
                     </tr>
                     <tr class="DataGrid_Body_Row">
-                      <th class="DataGrid_Header_Cell" width="8%">Date</td>
-                      <th class="DataGrid_Header_Cell" width="26%">Movement</td>
-                      <th class="DataGrid_Header_Cell" width="26%">Description</td>
+                      <th class="DataGrid_Header_Cell" width="10%">Date</td>
+                      <th class="DataGrid_Header_Cell" width="20%">Movement</td>
+                      <th class="DataGrid_Header_Cell" width="15%">Description</td>
+                      <th class="DataGrid_Header_Cell" width="20%">Warehouse</td>
                       <th class="DataGrid_Header_Cell" width="12%" colspan="3">
                         <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background: none; border: 0px none">
-                          <tr class="DataGrid_Body_Row">
+                          <tr class="DataGrid_Header_Cell">
                             <th class="DataGrid_Header_Cell" width="100%" colspan="3" style="background: none; border: 0px none">Location</th>
                           </tr>
-                          <tr class="DataGrid_Body_Row">
+                          <tr class="DataGrid_Header_Cell">
                             <th class="DataGrid_Header_Cell" width="34%" style="background: none; border: 0px none">X</th>
                             <th class="DataGrid_Header_Cell" width="33%" style="background: none; border: 0px none">Y</th>
                             <th class="DataGrid_Header_Cell" width="33%" style="background: none; border: 0px none">Z</th>
                           </tr>
                         </table>
                       </th>
-                      <th class="DataGrid_Header_Cell"  width="6%">Exit</th>
+                      <th class="DataGrid_Header_Cell"  width="8%">Exit</th>
                       <th class="DataGrid_Header_Cell"  width="15%">Quantity</th>
                     </tr>
                     <div id="sectionDetail1"> 
                       <tr class="DataGrid_Body_Row DataGrid_Body_Row_yy" id="funcEvenOddRow2xx">
-                        <td class="DataGrid_Body_Cell" width="8%" id="fieldMovementdate1">xx23-02-2004</td>
-                        <td class="DataGrid_Body_Cell" width="26%"> <a href="#" onclick="submitCommandFormParameter('DIRECT', document.frmMain.inpmInventoryId, 'xx', false, document.frmMain, '../PhysicalInventory/Header_Relation.html', null, false, true);return false;" onmouseover="window.status='yy';return true;" onmouseout="window.status='';return true;" class="LabelLink" id="fieldId2"> 
+                        <td class="DataGrid_Body_Cell" width="10%" id="fieldMovementdate1">xx23-02-2004</td>
+                        <td class="DataGrid_Body_Cell" width="20%"> <a href="#" onclick="submitCommandFormParameter('DIRECT', document.frmMain.inpmInventoryId, 'xx', false, document.frmMain, '../PhysicalInventory/Header_Relation.html', null, false, true);return false;" onmouseover="window.status='yy';return true;" onmouseout="window.status='';return true;" class="LabelLink" id="fieldId2"> 
                           <span id="fieldMovement">xx850000007</span></a></td>
-                        <td class="DataGrid_Body_Cell" width="26%" id="fieldName1">xx2345</td>
+                        <td class="DataGrid_Body_Cell" width="15%" id="fieldName1">xx2345</td>
+                        <td class="DataGrid_Body_Cell" width="20%"  id="fieldWaOrigin1">xx3</td>
                         <td class="DataGrid_Body_Cell" width="4%"  id="fieldXOrigin1">xx3</td>
                         <td class="DataGrid_Body_Cell" width="4%"  id="fieldYOrigin1">xx3</td>
                         <td class="DataGrid_Body_Cell" width="4%"  id="fieldZOrigin1">xx3</td>
-                        <td class="DataGrid_Body_Cell" width="6%"  id="fieldOut1">xxsi</td>
+                        <td class="DataGrid_Body_Cell" width="8%"  id="fieldOut1">xxsi</td>
                         <td class="DataGrid_Body_Cell" width="15%" id="fieldMovementqty1">xx23</td>
                       </tr>
                     </div>
@@ -555,34 +561,36 @@
                 <div style="height:15px;" />
                 <table cellspacing="0" cellpadding="0" width="100%" class="DataGrid_Header_Table DataGrid_Body_Table" style="table-layout: auto;" id="selEliminar3">
                   <tr class="DataGrid_Body_Row">
-                    <th class="DataGrid_Header_Cell" colspan="11"><span>Internal movements</span></th>
+                    <th class="DataGrid_Header_Cell" colspan="13"><span>Internal movements</span></th>
                   </tr>
                   <div id="sectionPartner2">
                     <tr class="DataGrid_Body_Row">
-                      <th class="DataGrid_Header_Cell" colspan="11"><span>Customer<span>:&nbsp;</span><span id="fieldPartnername2">xxAguinaga</span></span></th>
+                      <th class="DataGrid_Header_Cell" colspan="13"><span>Customer<span>:&nbsp;</span><span id="fieldPartnername2">xxAguinaga</span></span></th>
                     </tr>
                     <tr class="DataGrid_Body_Row">
-                      <th class="DataGrid_Header_Cell" width="7%">Date</th>
-                      <th class="DataGrid_Header_Cell" width="20%">Movement</th>
-                      <th class="DataGrid_Header_Cell" width="26%">Description</th>
-                      <th class="DataGrid_Header_Cell" width="12%" colspan="3">
+                      <th class="DataGrid_Header_Cell" width="8%">Date</th>
+                      <th class="DataGrid_Header_Cell" width="15%">Movement</th>
+                      <th class="DataGrid_Header_Cell" width="15%">Description</th>
+                      <th class="DataGrid_Header_Cell" width="15%">Starting Warehouse</th>
+                      <th class="DataGrid_Header_Cell" width="9%" colspan="3">
                         <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background: none; border: 0px none">
-                          <tr class="Border TableDetailHeader"> 
+                          <tr> 
                             <th class="DataGrid_Header_Cell" width="100%" colspan="3" style="background: none; border: 0px none">Starting location</th>
                           </tr>
-                          <tr class="Border TableDetailHeader"> 
+                          <tr> 
                             <th class="DataGrid_Header_Cell" width="34%" style="background: none; border: 0px none">X</th>
                             <th class="DataGrid_Header_Cell" width="33%" style="background: none; border: 0px none">Y</th>
                             <th class="DataGrid_Header_Cell" width="33%" style="background: none; border: 0px none">Z</th>
                           </tr>
                         </table>
                       </th>
-                      <th class="DataGrid_Header_Cell" width="12%" colspan="3">
+                      <th class="DataGrid_Header_Cell" width="15%">Final Warehouse</th>
+                      <th class="DataGrid_Header_Cell" width="9%" colspan="3">
                         <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background: none; border: 0px none">
-                          <tr class="Border TableDetailHeader"> 
+                          <tr> 
                             <th class="DataGrid_Header_Cell" width="100%" colspan="3" style="background: none; border: 0px none">Final location</th>
                           </tr>
-                          <tr class="Border TableDetailHeader"> 
+                          <tr> 
                             <th class="DataGrid_Header_Cell" width="34%" style="background: none; border: 0px none">X</th>
                             <th class="DataGrid_Header_Cell" width="33%" style="background: none; border: 0px none">Y</th>
                             <th class="DataGrid_Header_Cell" width="33%" style="background: none; border: 0px none">Z</th>
@@ -590,22 +598,24 @@
                         </table>
                       </th>
                       <th class="DataGrid_Header_Cell" width="6%">Exit</th>
-                      <th class="DataGrid_Header_Cell" width="10%">Quantity</th>
+                      <th class="DataGrid_Header_Cell" width="8%">Quantity</th>
                     </tr>
                     <div id="sectionDetail2">
                       <tr class="DataGrid_Body_Row DataGrid_Body_Row_yy" id="funcEvenOddRow3xx">
-                        <td class="DataGrid_Body_Cell" width="7%" id="fieldMovementdate2">xxfd200</td>
-                        <td class="DataGrid_Body_Cell" width="20%"> <a href="#" onclick="submitCommandFormParameter('DIRECT', document.frmMain.inpmMovementId, 'xx', false,     document.frmMain, '../GoodsMovements/Header_Relation.html', null, false, true);return false;" onmouseover="window.status='Inventory Move';return true;" onmouseout="window.status='';return true;" class="LabelLink" id="fieldId3"> 
+                        <td class="DataGrid_Body_Cell" width="8%" id="fieldMovementdate2">xxfd200</td>
+                        <td class="DataGrid_Body_Cell" width="15%"> <a href="#" onclick="submitCommandFormParameter('DIRECT', document.frmMain.inpmMovementId, 'xx', false,     document.frmMain, '../GoodsMovements/Header_Relation.html', null, false, true);return false;" onmouseover="window.status='Inventory Move';return true;" onmouseout="window.status='';return true;" class="LabelLink" id="fieldId3"> 
                           <span id="fieldMovement2">xx850000007</span></a></td>
-                        <td class="DataGrid_Body_Cell" width="26%" id="fieldName2">xx2345</td>
-                        <td class="DataGrid_Body_Cell" width="4%" id="fieldXOrigin2">xx3</td>
-                        <td class="DataGrid_Body_Cell" width="4%" id="fieldYOrigin2">xx3</td>
-                        <td class="DataGrid_Body_Cell" width="4%" id="fieldZOrigin2">xx3</td>
-                        <td class="DataGrid_Body_Cell" width="4%" id="fieldXDestiny2">xx2</td>
-                        <td class="DataGrid_Body_Cell" width="4%" id="fieldYDestiny2">xx2</td>
-                        <td class="DataGrid_Body_Cell" width="4%" id="fieldZDestiny2">xx2</td>
+                        <td class="DataGrid_Body_Cell" width="15%" id="fieldName2">xx2345</td>
+                        <td class="DataGrid_Body_Cell" width="15%" id="fieldWaOrigin2">xx3</td>
+                        <td class="DataGrid_Body_Cell" width="3%" id="fieldXOrigin2">xx3</td>
+                        <td class="DataGrid_Body_Cell" width="3%" id="fieldYOrigin2">xx3</td>
+                        <td class="DataGrid_Body_Cell" width="3%" id="fieldZOrigin2">xx3</td>
+                        <td class="DataGrid_Body_Cell" width="15%" id="fieldWaDestiny2">xx2</td>
+                        <td class="DataGrid_Body_Cell" width="3%" id="fieldXDestiny2">xx2</td>
+                        <td class="DataGrid_Body_Cell" width="3%" id="fieldYDestiny2">xx2</td>
+                        <td class="DataGrid_Body_Cell" width="3%" id="fieldZDestiny2">xx2</td>
                         <td class="DataGrid_Body_Cell" width="6%" id="fieldOut2">xxsi</td>
-                        <td class="DataGrid_Body_Cell" width="10%" id="fieldMovementqty2">xx23</td>
+                        <td class="DataGrid_Body_Cell" width="8%" id="fieldMovementqty2">xx23</td>
                       </tr>
                     </div>
                   </div>
@@ -613,34 +623,36 @@
                 <div style="height:15px;" />
                 <table cellspacing="0" cellpadding="0" width="100%" class="DataGrid_Header_Table DataGrid_Body_Table" style="table-layout: auto;" id="selEliminar4">
                   <tr class="DataGrid_Body_Row">
-                    <th class="DataGrid_Header_Cell" colspan="11"><span>Production</span></td>
+                    <th class="DataGrid_Header_Cell" colspan="13"><span>Production</span></td>
                   </tr>
                   <div id="sectionPartner3"> 
                     <tr class="DataGrid_Body_Row">
-                      <th class="DataGrid_Header_Cell" colspan="11"><span>Customer<span>:&nbsp;</span><span id="fieldPartnername3">xxAguinaga</span></span></th>
+                      <th class="DataGrid_Header_Cell" colspan="13"><span>Customer<span>:&nbsp;</span><span id="fieldPartnername3">xxAguinaga</span></span></th>
                     </tr>
                     <tr class="DataGrid_Body_Row">
-                      <th class="DataGrid_Header_Cell" width="7%">Date</th>
-                      <th class="DataGrid_Header_Cell" width="20%">Movement</th>
-                      <th class="DataGrid_Header_Cell" width="26%">Description</th>
-                      <th class="DataGrid_Header_Cell" width="12%" colspan="3">
+                      <th class="DataGrid_Header_Cell" width="8%" >Date</th>
+                      <th class="DataGrid_Header_Cell" width="15%">Movement</th>
+                      <th class="DataGrid_Header_Cell" width="15%">Description</th>
+                      <th class="DataGrid_Header_Cell" width="15%">Starting Warehouse</th>
+                      <th class="DataGrid_Header_Cell" width="9%" colspan="3">
                         <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background: none; border: 0px none">
-                          <tr class="Border TableDetailHeader"> 
+                          <tr> 
                             <th class="DataGrid_Header_Cell" width="100%" colspan="3" style="background: none; border: 0px none">Location</th>
                           </tr>
-                          <tr class="Border TableDetailHeader"> 
+                          <tr> 
                             <th class="DataGrid_Header_Cell" width="34%" style="background: none; border: 0px none">X</th>
                             <th class="DataGrid_Header_Cell" width="33%" style="background: none; border: 0px none">Y</th>
                             <th class="DataGrid_Header_Cell" width="33%" style="background: none; border: 0px none">Z</th>
                           </tr>
                         </table>
                       </th>
-                      <th class="DataGrid_Header_Cell" width="12%" colspan="3">
+                      <th class="DataGrid_Header_Cell" width="15%">Final Warehouse</th>
+                      <th class="DataGrid_Header_Cell" width="9%" colspan="3">
                         <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background: none; border: 0px none">
-                          <tr class="Border TableDetailHeader"> 
+                          <tr > 
                             <th class="DataGrid_Header_Cell" width="100%" colspan="3" style="background: none; border: 0px none">Location</th>
                           </tr>
-                          <tr class="Border TableDetailHeader"> 
+                          <tr> 
                             <th class="DataGrid_Header_Cell" width="34%" style="background: none; border: 0px none">X</th>
                             <th class="DataGrid_Header_Cell" width="33%" style="background: none; border: 0px none">Y</th>
                             <th class="DataGrid_Header_Cell" width="33%" style="background: none; border: 0px none">Z</th>
@@ -648,23 +660,25 @@
                         </table>
                       </th>
                       <th class="DataGrid_Header_Cell" width="6%">Exit</th>
-                      <th class="DataGrid_Header_Cell" width="10%">Quantity</th>
+                      <th class="DataGrid_Header_Cell" width="8%">Quantity</th>
                     </tr>
                     </tr>
                     <div id="sectionDetail3"> 
                       <tr class="DataGrid_Body_Row DataGrid_Body_Row_yy" id="funcEvenOddRow4xx">
-                        <td class="DataGrid_Body_Cell" width="7%" id="fieldMovementdate3">xxfd200</td>
-                        <td class="DataGrid_Body_Cell" width="20%"> <a href="#" onclick="BOMorWorkEffort('xx', 'yy');return false;" onmouseover="window.status='Production Plan';return true;" onmouseout="window.status='';return true;" class="LabelLink" id="fieldId4"> 
+                        <td class="DataGrid_Body_Cell" width="8%" id="fieldMovementdate3">xxfd200</td>
+                        <td class="DataGrid_Body_Cell" width="15%"> <a href="#" onclick="BOMorWorkEffort('xx', 'yy');return false;" onmouseover="window.status='Production Plan';return true;" onmouseout="window.status='';return true;" class="LabelLink" id="fieldId4"> 
                         <span id="fieldProductionPlan">xx850000007</span></a></td>
-                        <td class="DataGrid_Body_Cell" width="26%" id="fieldName3">xx2345</td>
-                        <td class="DataGrid_Body_Cell" width="4%" id="fieldXOrigin3">xx3</td>
-                        <td class="DataGrid_Body_Cell" width="4%" id="fieldYOrigin3">xx3</td>
-                        <td class="DataGrid_Body_Cell" width="4%" id="fieldZOrigin3">xx3</td>
-                        <td class="DataGrid_Body_Cell" width="4%" id="fieldXDestiny3">xx2</td>
-                        <td class="DataGrid_Body_Cell" width="4%" id="fieldYDestiny3">xx2</td>
-                        <td class="DataGrid_Body_Cell" width="4%" id="fieldZDestiny3">xx2</td>
+                        <td class="DataGrid_Body_Cell" width="15%" id="fieldName3">xx2345</td>
+                        <td class="DataGrid_Body_Cell" width="15%" id="fieldWaOrigin3">xx3</td>
+                        <td class="DataGrid_Body_Cell" width="3%" id="fieldXOrigin3">xx3</td>
+                        <td class="DataGrid_Body_Cell" width="3%" id="fieldYOrigin3">xx3</td>
+                        <td class="DataGrid_Body_Cell" width="3%" id="fieldZOrigin3">xx3</td>
+                        <td class="DataGrid_Body_Cell" width="15%" id="fieldWaDestiny3">xx2</td>
+                        <td class="DataGrid_Body_Cell" width="3%" id="fieldXDestiny3">xx2</td>
+                        <td class="DataGrid_Body_Cell" width="3%" id="fieldYDestiny3">xx2</td>
+                        <td class="DataGrid_Body_Cell" width="3%" id="fieldZDestiny3">xx2</td>
                         <td class="DataGrid_Body_Cell" width="6%" id="fieldOut3">xxsi</td>
-                        <td class="DataGrid_Body_Cell" width="10%" id="fieldMovementqty3">xx23</td>
+                        <td class="DataGrid_Body_Cell" width="8%" id="fieldMovementqty3">xx23</td>
                       </tr>
                     </div>
                   </div>
@@ -672,22 +686,23 @@
                 <div style="height:15px;" />
                 <table cellspacing="0" cellpadding="0" width="100%" class="DataGrid_Header_Table DataGrid_Body_Table" style="table-layout: auto;" id="selEliminar5">
                   <tr class="DataGrid_Body_Row">
-                    <th class="DataGrid_Header_Cell" align="center" colspan="8"><span>Internal Consumption</span></th>
+                    <th class="DataGrid_Header_Cell" align="center" colspan="9"><span>Internal Consumption</span></th>
                   </tr>
                   <div id="sectionPartner4"> 
                     <tr class="DataGrid_Body_Row">
-                      <th class="DataGrid_Header_Cell" colspan="8"><span>Customer<span>:&nbsp;</span><span id="fieldPartnername4">xxAguinaga</span></span></th>
+                      <th class="DataGrid_Header_Cell" colspan="9"><span>Customer<span>:&nbsp;</span><span id="fieldPartnername4">xxAguinaga</span></span></th>
                     </tr>
                     <tr class="DataGrid_Body_Row">
                       <th class="DataGrid_Header_Cell" width="8%">Date</td>
-                      <th class="DataGrid_Header_Cell" width="26%">Movement</td>
-                      <th class="DataGrid_Header_Cell" width="26%">Description</td>
+                      <th class="DataGrid_Header_Cell" width="20%">Movement</td>
+                      <th class="DataGrid_Header_Cell" width="20%">Description</td>
+                      <th class="DataGrid_Header_Cell" width="20%">Warehouse</td>
                       <th class="DataGrid_Header_Cell" width="12%" colspan="3">
                         <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background: none; border: 0px none">
-                          <tr class="DataGrid_Body_Row">
+                          <tr >
                             <th class="DataGrid_Header_Cell" width="100%" colspan="3" style="background: none; border: 0px none">Location</th>
                           </tr>
-                          <tr class="DataGrid_Body_Row">
+                          <tr >
                             <th class="DataGrid_Header_Cell" width="34%" style="background: none; border: 0px none">X</th>
                             <th class="DataGrid_Header_Cell" width="33%" style="background: none; border: 0px none">Y</th>
                             <th class="DataGrid_Header_Cell" width="33%" style="background: none; border: 0px none">Z</th>
@@ -695,19 +710,20 @@
                         </table>
                       </th>
                       <th class="DataGrid_Header_Cell"  width="6%">Exit</th>
-                      <th class="DataGrid_Header_Cell"  width="15%">Quantity</th>
+                      <th class="DataGrid_Header_Cell"  width="14%">Quantity</th>
                     </tr>
                     <div id="sectionDetail4"> 
                       <tr class="DataGrid_Body_Row DataGrid_Body_Row_yy" id="funcEvenOddRow5xx">
                         <td class="DataGrid_Body_Cell" width="8%" id="fieldMovementdate4">xx23-02-2004</td>
-                        <td class="DataGrid_Body_Cell" width="26%"> <a href="#" onclick="submitCommandFormParameter('DIRECT', document.frmMain.inpmInternalConsumptionId, 'xx', false, document.frmMain, '../InternalConsumption/Header_Relation.html', null, false, true);return false;" onmouseover="window.status='yy';return true;" onmouseout="window.status='';return true;" class="LabelLink" id="fieldId5">
+                        <td class="DataGrid_Body_Cell" width="20%"> <a href="#" onclick="submitCommandFormParameter('DIRECT', document.frmMain.inpmInternalConsumptionId, 'xx', false, document.frmMain, '../InternalConsumption/Header_Relation.html', null, false, true);return false;" onmouseover="window.status='yy';return true;" onmouseout="window.status='';return true;" class="LabelLink" id="fieldId5">
                           <span id="fieldMovement3">xx850000007</span></a></td>
-                        <td class="DataGrid_Body_Cell" width="26%" id="fieldName4">xx2345</td>
+                        <td class="DataGrid_Body_Cell" width="20%" id="fieldName4">xx2345</td>
+                        <td class="DataGrid_Body_Cell" width="20%"  id="fieldWaOrigin4">xx3</td>
                         <td class="DataGrid_Body_Cell" width="4%"  id="fieldXOrigin4">xx3</td>
                         <td class="DataGrid_Body_Cell" width="4%"  id="fieldYOrigin4">xx3</td>
                         <td class="DataGrid_Body_Cell" width="4%"  id="fieldZOrigin4">xx3</td>
                         <td class="DataGrid_Body_Cell" width="6%"  id="fieldOut4">xxsi</td>
-                        <td class="DataGrid_Body_Cell" width="15%" id="fieldMovementqty4">xx23</td>
+                        <td class="DataGrid_Body_Cell" width="14%" id="fieldMovementqty4">xx23</td>
                       </tr>
                     </div>
                   </div>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.java	Wed Apr 25 15:50:07 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.java	Wed Apr 25 10:38:10 2012 +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) 2001-2010 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2012 Openbravo SLU 
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -61,9 +61,10 @@
       String strProduction = vars.getGlobalVariable("inpProduction",
           "ReportProductMovement|production", "-1");
       String strInternalConsumption = vars.getGlobalVariable("inpInternalConsumption",
-              "ReportProductMovement|internalConsumption", "-1");
+          "ReportProductMovement|internalConsumption", "-1");
       printPageDataSheet(response, vars, strDateFrom, strDateTo, strcBpartnerId, strmProductId,
-          strInout, strInventory, strMovement, strProduction, strmAttributesetinstanceId, strInternalConsumption);
+          strInout, strInventory, strMovement, strProduction, strmAttributesetinstanceId,
+          strInternalConsumption);
     } else if (vars.commandIn("DIRECT")) {
       String strDateFrom = vars.getGlobalVariable("inpDateFrom", "ReportProductMovement|dateFrom",
           "");
@@ -82,10 +83,11 @@
       String strProduction = vars.getGlobalVariable("inpProduction",
           "ReportProductMovement|production", "");
       String strInternalConsumption = vars.getGlobalVariable("inpInternalConsumption",
-              "ReportProductMovement|internalConsumption", "");
+          "ReportProductMovement|internalConsumption", "");
       setHistoryCommand(request, "DIRECT");
       printPageDataSheet(response, vars, strDateFrom, strDateTo, strcBpartnerId, strmProductId,
-          strInout, strInventory, strMovement, strProduction, strmAttributesetinstanceId, strInternalConsumption);
+          strInout, strInventory, strMovement, strProduction, strmAttributesetinstanceId,
+          strInternalConsumption);
     } else if (vars.commandIn("FIND")) {
       String strDateFrom = vars.getRequestGlobalVariable("inpDateFrom",
           "ReportProductMovement|dateFrom");
@@ -104,10 +106,11 @@
       String strProduction = vars.getRequestGlobalVariable("inpProduction",
           "ReportProductMovement|production");
       String strInternalConsumption = vars.getRequestGlobalVariable("inpInternalConsumption",
-              "ReportProductMovement|internalConsumption");
+          "ReportProductMovement|internalConsumption");
       setHistoryCommand(request, "DIRECT");
       printPageDataSheet(response, vars, strDateFrom, strDateTo, strcBpartnerId, strmProductId,
-          strInout, strInventory, strMovement, strProduction, strmAttributesetinstanceId, strInternalConsumption);
+          strInout, strInventory, strMovement, strProduction, strmAttributesetinstanceId,
+          strInternalConsumption);
     } else
       pageError(response);
   }
@@ -115,7 +118,8 @@
   private void printPageDataSheet(HttpServletResponse response, VariablesSecureApp vars,
       String strDateFrom, String strDateTo, String strcBpartnerId, String strmProductId,
       String strInout, String strInventory, String strMovement, String strProduction,
-      String strmAttributesetinstanceId, String strInternalConsumption) throws IOException, ServletException {
+      String strmAttributesetinstanceId, String strInternalConsumption) throws IOException,
+      ServletException {
     if (log4j.isDebugEnabled())
       log4j.debug("Output: dataSheet");
     response.setContentType("text/html; charset=UTF-8");
@@ -189,19 +193,19 @@
         data3 = ReportProductMovementData.set();
       }
       if (strInternalConsumption.equals("-1")) {
-          data4 = ReportProductMovementData.selectInternalConsumption(this,
-              Utility.getContext(this, vars, "#User_Client", "ReportProductMovement"),
-              Utility.getContext(this, vars, "#AccessibleOrgTree", "ReportProductMovement"),
-              strDateFrom, DateTimeData.nDaysAfter(this, strDateTo, "1"), strcBpartnerId,
-              strmProductId);
-          if (data4 == null || data4.length == 0) {
-            discard[4] = "selEliminar5";
-            data4 = ReportProductMovementData.set();
-          }
-        } else {
+        data4 = ReportProductMovementData.selectInternalConsumption(this,
+            Utility.getContext(this, vars, "#User_Client", "ReportProductMovement"),
+            Utility.getContext(this, vars, "#AccessibleOrgTree", "ReportProductMovement"),
+            strDateFrom, DateTimeData.nDaysAfter(this, strDateTo, "1"), strcBpartnerId,
+            strmProductId);
+        if (data4 == null || data4.length == 0) {
           discard[4] = "selEliminar5";
           data4 = ReportProductMovementData.set();
         }
+      } else {
+        discard[4] = "selEliminar5";
+        data4 = ReportProductMovementData.set();
+      }
     } else {
       discard[0] = "selEliminar1";
       discard[1] = "selEliminar2";
--- a/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.xml	Wed Apr 25 15:50:07 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.xml	Wed Apr 25 10:38:10 2012 +0200
@@ -12,7 +12,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) 2001-2006 Openbravo SLU 
+* All portions are Copyright (C) 2001-2012 Openbravo SLU 
 * All Rights Reserved. 
 * Contributor(s):  ______________________________________.
 ************************************************************************
@@ -74,9 +74,11 @@
     <FIELD id="fieldXOrigin">xOrigin</FIELD>
     <FIELD id="fieldYOrigin">yOrigin</FIELD>
     <FIELD id="fieldZOrigin">zOrigin</FIELD>
+    <FIELD id="fieldWaOrigin">waOrigin</FIELD>
     <FIELD id="fieldXDestiny">xDestiny</FIELD>
     <FIELD id="fieldYDestiny">yDestiny</FIELD>
     <FIELD id="fieldZDestiny">zDestiny</FIELD>
+    <FIELD id="fieldWaDestiny">waDestiny</FIELD>
     <FIELD id="fieldOut">out</FIELD>
     <SECTION id="sectionPartner" field="partnername"/>
     <SECTION id="sectionDetail"/>
@@ -94,6 +96,7 @@
     <FIELD id="fieldXOrigin1">xOrigin</FIELD>
     <FIELD id="fieldYOrigin1">yOrigin</FIELD>
     <FIELD id="fieldZOrigin1">zOrigin</FIELD>
+    <FIELD id="fieldWaOrigin1">waOrigin</FIELD>
     <FIELD id="fieldOut1">out</FIELD>
     <SECTION id="sectionPartner1" field="partnername"/>
     <SECTION id="sectionDetail1"/>
@@ -110,9 +113,11 @@
     <FIELD id="fieldXOrigin2">xOrigin</FIELD>
     <FIELD id="fieldYOrigin2">yOrigin</FIELD>
     <FIELD id="fieldZOrigin2">zOrigin</FIELD>
+    <FIELD id="fieldWaOrigin2">waOrigin</FIELD>
     <FIELD id="fieldXDestiny2">xDestiny</FIELD>
     <FIELD id="fieldYDestiny2">yDestiny</FIELD>
     <FIELD id="fieldZDestiny2">zDestiny</FIELD>
+    <FIELD id="fieldWaDestiny2">waDestiny</FIELD>
     <FIELD id="fieldOut2">out</FIELD>
     <SECTION id="sectionPartner2" field="partnername"/>
     <SECTION id="sectionDetail2"/>
@@ -130,9 +135,11 @@
     <FIELD id="fieldXOrigin3">xOrigin</FIELD>
     <FIELD id="fieldYOrigin3">yOrigin</FIELD>
     <FIELD id="fieldZOrigin3">zOrigin</FIELD>
+    <FIELD id="fieldWaOrigin3">waOrigin</FIELD>
     <FIELD id="fieldXDestiny3">xDestiny</FIELD>
     <FIELD id="fieldYDestiny3">yDestiny</FIELD>
     <FIELD id="fieldZDestiny3">zDestiny</FIELD>
+    <FIELD id="fieldWaDestiny3">waDestiny</FIELD>
     <FIELD id="fieldOut3">out</FIELD>
     <SECTION id="sectionPartner3" field="partnername"/>
     <SECTION id="sectionDetail3"/>
@@ -150,6 +157,7 @@
     <FIELD id="fieldXOrigin4">xOrigin</FIELD>
     <FIELD id="fieldYOrigin4">yOrigin</FIELD>
     <FIELD id="fieldZOrigin4">zOrigin</FIELD>
+    <FIELD id="fieldWaOrigin4">waOrigin</FIELD>
     <FIELD id="fieldOut4">out</FIELD>
     <SECTION id="sectionPartner4" field="partnername"/>
     <SECTION id="sectionDetail4"/>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement_data.xsql	Wed Apr 25 15:50:07 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement_data.xsql	Wed Apr 25 10:38:10 2012 +0200
@@ -12,7 +12,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) 2001-2010 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2012 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -29,9 +29,11 @@
     <Sql>
     <![CDATA[
       SELECT M_PRODUCT.VALUE, M_PRODUCT.NAME, M_TRANSACTION.MOVEMENTDATE, C_BPARTNER.NAME AS PARTNERNAME,M_ATTRIBUTESETINSTANCE.DESCRIPTION AS ATTR,
+      (CASE M_INOUT.ISSOTRX WHEN 'Y' THEN TO_CHAR(M_WAREHOUSE.NAME) ELSE '-' END)AS WA_ORIGIN,
       (CASE M_INOUT.ISSOTRX WHEN 'Y' THEN TO_CHAR(M_LOCATOR.X) ELSE '-' END) AS X_ORIGIN, 
       (CASE M_INOUT.ISSOTRX WHEN 'Y' THEN TO_CHAR(M_LOCATOR.Y) ELSE '-' END) AS Y_ORIGIN, 
-      (CASE M_INOUT.ISSOTRX WHEN 'Y' THEN TO_CHAR(M_LOCATOR.Z) ELSE '-' END) AS Z_ORIGIN, 
+      (CASE M_INOUT.ISSOTRX WHEN 'Y' THEN TO_CHAR(M_LOCATOR.Z) ELSE '-' END) AS Z_ORIGIN,
+      (CASE M_INOUT.ISSOTRX WHEN 'Y' THEN '-' ELSE TO_CHAR(M_WAREHOUSE.NAME) END) AS WA_DESTINY, 
       (CASE M_INOUT.ISSOTRX WHEN 'Y' THEN '-' ELSE TO_CHAR(M_LOCATOR.X) END) AS X_DESTINY, 
       (CASE M_INOUT.ISSOTRX WHEN 'Y' THEN '-' ELSE TO_CHAR(M_LOCATOR.Y) END) AS Y_DESTINY, 
       (CASE M_INOUT.ISSOTRX WHEN 'Y' THEN '-' ELSE TO_CHAR(M_LOCATOR.Z) END) AS Z_DESTINY,
@@ -42,17 +44,19 @@
       FROM M_PRODUCT left join C_BPARTNER on M_PRODUCT.C_BPARTNER_ID = C_BPARTNER.C_BPARTNER_ID
                      right join M_TRANSACTION on M_TRANSACTION.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID
                      left join M_ATTRIBUTESETINSTANCE ON M_ATTRIBUTESETINSTANCE.M_ATTRIBUTESETINSTANCE_ID=M_TRANSACTION.M_ATTRIBUTESETINSTANCE_ID,
-           M_LOCATOR, M_INOUTLINE, M_INOUT, C_UOM
+           M_LOCATOR, M_INOUTLINE, M_INOUT, C_UOM, M_WAREHOUSE
       WHERE M_TRANSACTION.M_LOCATOR_ID = M_LOCATOR.M_LOCATOR_ID
       AND M_TRANSACTION.M_INOUTLINE_ID = M_INOUTLINE.M_INOUTLINE_ID
       AND M_INOUTLINE.M_INOUT_ID = M_INOUT.M_INOUT_ID
       AND M_TRANSACTION.C_UOM_ID = C_UOM.C_UOM_ID
+      AND M_LOCATOR.M_WAREHOUSE_ID = M_WAREHOUSE.M_WAREHOUSE_ID 
       AND M_TRANSACTION.M_INOUTLINE_ID IS NOT NULL 
       AND M_TRANSACTION.AD_CLIENT_ID IN ('1')
       AND M_TRANSACTION.AD_ORG_ID IN ('1')
       AND 1=1
       GROUP BY M_PRODUCT.VALUE, M_PRODUCT.NAME, M_TRANSACTION.MOVEMENTDATE, C_BPARTNER.NAME, M_LOCATOR.X, M_LOCATOR.Y, 
-      M_LOCATOR.Z, M_INOUT.ISSOTRX, C_UOM.NAME, M_INOUT.M_INOUT_ID, M_INOUT.DOCUMENTNO, M_ATTRIBUTESETINSTANCE.DESCRIPTION
+      M_LOCATOR.Z, M_INOUT.ISSOTRX, C_UOM.NAME, M_INOUT.M_INOUT_ID, M_INOUT.DOCUMENTNO, M_ATTRIBUTESETINSTANCE.DESCRIPTION,
+      M_WAREHOUSE.NAME
       ORDER BY C_BPARTNER.NAME, M_TRANSACTION.MOVEMENTDATE DESC
      ]]></Sql>
     <Parameter name="adLanguage"/>
@@ -70,22 +74,24 @@
     <SqlMethodComment></SqlMethodComment>
     <Sql>
     <![CDATA[
-      SELECT M_PRODUCT.VALUE, M_PRODUCT.NAME, M_LOCATOR.X AS X_ORIGIN, M_LOCATOR.Y AS Y_ORIGIN, M_LOCATOR.Z AS Z_ORIGIN, C_BPARTNER.NAME AS PARTNERNAME, 
+      SELECT M_PRODUCT.VALUE, M_PRODUCT.NAME, M_WAREHOUSE.NAME as WA_ORIGIN, 
+      M_LOCATOR.X AS X_ORIGIN, M_LOCATOR.Y AS Y_ORIGIN, M_LOCATOR.Z AS Z_ORIGIN, C_BPARTNER.NAME AS PARTNERNAME, 
       (SUM(M_TRANSACTION.MOVEMENTQTY)||' '||C_UOM.NAME) AS MOVEMENTQTY, M_TRANSACTION.MOVEMENTDATE, 'No' AS OUT,
       M_INVENTORY.M_INVENTORY_ID, M_INVENTORY.NAME AS MOVEMENT, M_INVENTORY.NAME AS MOVEMENT_DESCRIPTION
       FROM M_PRODUCT left join C_BPARTNER on M_PRODUCT.C_BPARTNER_ID = C_BPARTNER.C_BPARTNER_ID
                      right join M_TRANSACTION on M_TRANSACTION.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID,
-          M_LOCATOR,  C_UOM, M_INVENTORYLINE, M_INVENTORY
+          M_LOCATOR,  C_UOM, M_INVENTORYLINE, M_INVENTORY,  M_WAREHOUSE
       WHERE  M_TRANSACTION.M_LOCATOR_ID = M_LOCATOR.M_LOCATOR_ID
       AND M_TRANSACTION.C_UOM_ID = C_UOM.C_UOM_ID
       AND M_TRANSACTION.M_INVENTORYLINE_ID = M_INVENTORYLINE.M_INVENTORYLINE_ID
       AND M_INVENTORYLINE.M_INVENTORY_ID = M_INVENTORY.M_INVENTORY_ID
+      AND M_LOCATOR.M_WAREHOUSE_ID = M_WAREHOUSE.M_WAREHOUSE_ID 
       AND M_TRANSACTION.M_INVENTORYLINE_ID IS NOT NULL
       AND M_TRANSACTION.AD_CLIENT_ID IN ('1')
       AND M_TRANSACTION.AD_ORG_ID IN ('1')
       AND 1=1
       GROUP BY M_PRODUCT.VALUE, M_PRODUCT.NAME, M_LOCATOR.X, M_LOCATOR.Y, M_LOCATOR.Z, C_BPARTNER.NAME, C_UOM.NAME, 
-      M_TRANSACTION.MOVEMENTDATE, M_INVENTORY.M_INVENTORY_ID, M_INVENTORY.NAME
+      M_TRANSACTION.MOVEMENTDATE, M_INVENTORY.M_INVENTORY_ID, M_INVENTORY.NAME, M_WAREHOUSE.NAME
       HAVING SUM(M_TRANSACTION.MOVEMENTQTY) <> 0
       ORDER BY C_BPARTNER.NAME, M_TRANSACTION.MOVEMENTDATE DESC
      ]]></Sql>
@@ -102,18 +108,20 @@
     <SqlMethodComment></SqlMethodComment>
     <Sql>
     <![CDATA[
-        SELECT M_PRODUCT.VALUE, M_PRODUCT.NAME, M_LOCATOR.X AS X_ORIGIN, M_LOCATOR.Y AS Y_ORIGIN, M_LOCATOR.Z AS Z_ORIGIN, 
+        SELECT M_PRODUCT.VALUE, M_PRODUCT.NAME, M_WAREHOUSE.NAME as WA_ORIGIN, M_LOCATOR.X AS X_ORIGIN, 
+        M_LOCATOR.Y AS Y_ORIGIN, M_LOCATOR.Z AS Z_ORIGIN, M_L_WAREHOUSE.NAME as WA_DESTINY,
         M_L.X AS X_DESTINY, M_L.Y AS Y_DESTINY, M_L.Z AS Z_DESTINY, C_BPARTNER.NAME AS PARTNERNAME, 
         (M_TRANSACTION.MOVEMENTQTY||' '||C_UOM.NAME) AS MOVEMENTQTY, M_TRANSACTION.MOVEMENTDATE, 'No' AS OUT,
         M_MOVEMENTLINE.M_MOVEMENT_ID, M_MOVEMENT.NAME AS MOVEMENT
         FROM  M_PRODUCT left join C_BPARTNER on M_PRODUCT.C_BPARTNER_ID = C_BPARTNER.C_BPARTNER_ID
                         right join M_TRANSACTION on M_TRANSACTION.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID,
-         M_MOVEMENTLINE, M_LOCATOR, M_LOCATOR M_L,  C_UOM,
-        M_MOVEMENT
+        M_MOVEMENTLINE, M_LOCATOR, M_LOCATOR M_L,  C_UOM,M_MOVEMENT,  M_WAREHOUSE, M_WAREHOUSE M_L_WAREHOUSE
         WHERE M_TRANSACTION.M_MOVEMENTLINE_ID = M_MOVEMENTLINE.M_MOVEMENTLINE_ID
         AND M_MOVEMENTLINE.M_LOCATOR_ID = M_LOCATOR.M_LOCATOR_ID
         AND M_MOVEMENTLINE.M_LOCATORTO_ID = M_L.M_LOCATOR_ID
         AND M_TRANSACTION.C_UOM_ID = C_UOM.C_UOM_ID
+        AND M_LOCATOR.M_WAREHOUSE_ID = M_WAREHOUSE.M_WAREHOUSE_ID
+        AND M_L.M_WAREHOUSE_ID = M_L_WAREHOUSE.M_WAREHOUSE_ID
         AND M_TRANSACTION.M_MOVEMENTLINE_ID IS NOT NULL
         AND M_MOVEMENTLINE.M_MOVEMENT_ID = M_MOVEMENT.M_MOVEMENT_ID
         AND M_TRANSACTION.AD_CLIENT_ID IN ('1')
@@ -135,24 +143,25 @@
     <SqlMethodComment></SqlMethodComment>
     <Sql>
     <![CDATA[
-        SELECT M_PRODUCT.VALUE, M_PRODUCT.NAME, M_LOCATOR.X AS X_ORIGIN, M_LOCATOR.Y AS Y_ORIGIN, M_LOCATOR.Z AS Z_ORIGIN,
-        C_BPARTNER.NAME AS PARTNERNAME, '-' AS X_DESTINY, '-' AS Y_DESTINY, '-' AS Z_DESTINY, 
+        SELECT M_PRODUCT.VALUE, M_PRODUCT.NAME, M_WAREHOUSE.NAME as WA_ORIGIN, M_LOCATOR.X AS X_ORIGIN, M_LOCATOR.Y AS Y_ORIGIN, M_LOCATOR.Z AS Z_ORIGIN,
+        C_BPARTNER.NAME AS PARTNERNAME, '-' AS WA_DESTINY, '-' AS X_DESTINY, '-' AS Y_DESTINY, '-' AS Z_DESTINY, 
         (SUM(M_TRANSACTION.MOVEMENTQTY)||' '||C_UOM.NAME) AS MOVEMENTQTY, M_TRANSACTION.MOVEMENTDATE, 'No' AS OUT, M_PRODUCTION.ISSOTRX AS ISSOTRX,
         M_PRODUCTIONPLAN.M_PRODUCTIONPLAN_ID, ((CASE WHEN M_PRODUCTION.NAME IS NULL THEN M_PRODUCTION.DOCUMENTNO ELSE M_PRODUCTION.NAME END) || ' - ' || M_PRODUCTIONPLAN.LINE) AS PRODUCTION_PLAN
         FROM M_PRODUCT left join C_BPARTNER on M_PRODUCT.C_BPARTNER_ID = C_BPARTNER.C_BPARTNER_ID
                        right join M_TRANSACTION on M_TRANSACTION.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID,
-             M_LOCATOR, C_UOM, M_PRODUCTIONLINE, M_PRODUCTIONPLAN, M_PRODUCTION
+             M_LOCATOR, C_UOM, M_PRODUCTIONLINE, M_PRODUCTIONPLAN, M_PRODUCTION, M_WAREHOUSE
         WHERE M_TRANSACTION.M_LOCATOR_ID = M_LOCATOR.M_LOCATOR_ID
         AND M_TRANSACTION.C_UOM_ID = C_UOM.C_UOM_ID
         AND M_TRANSACTION.M_PRODUCTIONLINE_ID = M_PRODUCTIONLINE.M_PRODUCTIONLINE_ID
         AND M_PRODUCTIONLINE.M_PRODUCTIONPLAN_ID = M_PRODUCTIONPLAN.M_PRODUCTIONPLAN_ID
         AND M_PRODUCTIONPLAN.M_PRODUCTION_ID = M_PRODUCTION.M_PRODUCTION_ID
+        AND M_LOCATOR.M_WAREHOUSE_ID = M_WAREHOUSE.M_WAREHOUSE_ID
         AND M_TRANSACTION.M_PRODUCTIONLINE_ID IS NOT NULL
         AND M_TRANSACTION.AD_CLIENT_ID IN ('1')
         AND M_TRANSACTION.AD_ORG_ID IN ('1')
         AND 1=1
         GROUP BY M_PRODUCT.VALUE, M_PRODUCT.NAME, M_LOCATOR.X, M_LOCATOR.Y, M_LOCATOR.Z, C_BPARTNER.NAME, C_UOM.NAME, 
-        M_TRANSACTION.MOVEMENTDATE,M_PRODUCTIONPLAN.M_PRODUCTIONPLAN_ID, M_PRODUCTION.NAME, M_PRODUCTIONPLAN.LINE, M_PRODUCTION.ISSOTRX, M_PRODUCTION.DOCUMENTNO
+        M_TRANSACTION.MOVEMENTDATE,M_PRODUCTIONPLAN.M_PRODUCTIONPLAN_ID, M_PRODUCTION.NAME, M_PRODUCTIONPLAN.LINE, M_PRODUCTION.ISSOTRX, M_PRODUCTION.DOCUMENTNO, M_WAREHOUSE.NAME
         HAVING SUM(M_TRANSACTION.MOVEMENTQTY) <> 0
         ORDER BY C_BPARTNER.NAME, M_TRANSACTION.MOVEMENTDATE DESC
      ]]></Sql>
@@ -169,22 +178,24 @@
     <SqlMethodComment></SqlMethodComment>
     <Sql>
     <![CDATA[
-      SELECT M_PRODUCT.VALUE, M_PRODUCT.NAME, M_LOCATOR.X AS X_ORIGIN, M_LOCATOR.Y AS Y_ORIGIN, M_LOCATOR.Z AS Z_ORIGIN, C_BPARTNER.NAME AS PARTNERNAME, 
+      SELECT M_PRODUCT.VALUE, M_PRODUCT.NAME, M_WAREHOUSE.NAME as WA_ORIGIN, 
+      M_LOCATOR.X AS X_ORIGIN, M_LOCATOR.Y AS Y_ORIGIN, M_LOCATOR.Z AS Z_ORIGIN, C_BPARTNER.NAME AS PARTNERNAME, 
       (SUM(M_TRANSACTION.MOVEMENTQTY)||' '||C_UOM.NAME) AS MOVEMENTQTY, M_TRANSACTION.MOVEMENTDATE, 'No' AS OUT,
       M_INTERNAL_CONSUMPTION.M_INTERNAL_CONSUMPTION_ID, M_INTERNAL_CONSUMPTION.NAME AS MOVEMENT, M_INTERNAL_CONSUMPTION.NAME AS MOVEMENT_DESCRIPTION
       FROM M_PRODUCT left join C_BPARTNER on M_PRODUCT.C_BPARTNER_ID = C_BPARTNER.C_BPARTNER_ID
                      right join M_TRANSACTION on M_TRANSACTION.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID,
-          M_LOCATOR,  C_UOM, M_INTERNAL_CONSUMPTIONLINE, M_INTERNAL_CONSUMPTION
+          M_LOCATOR,  C_UOM, M_INTERNAL_CONSUMPTIONLINE, M_INTERNAL_CONSUMPTION, M_WAREHOUSE
       WHERE  M_TRANSACTION.M_LOCATOR_ID = M_LOCATOR.M_LOCATOR_ID
       AND M_TRANSACTION.C_UOM_ID = C_UOM.C_UOM_ID
       AND M_TRANSACTION.M_INTERNAL_CONSUMPTIONLINE_ID = M_INTERNAL_CONSUMPTIONLINE.M_INTERNAL_CONSUMPTIONLINE_ID
       AND M_INTERNAL_CONSUMPTIONLINE.M_INTERNAL_CONSUMPTION_ID = M_INTERNAL_CONSUMPTION.M_INTERNAL_CONSUMPTION_ID
+      AND M_LOCATOR.M_WAREHOUSE_ID = M_WAREHOUSE.M_WAREHOUSE_ID
       AND M_TRANSACTION.M_INTERNAL_CONSUMPTIONLINE_ID IS NOT NULL
       AND M_TRANSACTION.AD_CLIENT_ID IN ('1')
       AND M_TRANSACTION.AD_ORG_ID IN ('1')
       AND 1=1
       GROUP BY M_PRODUCT.VALUE, M_PRODUCT.NAME, M_LOCATOR.X, M_LOCATOR.Y, M_LOCATOR.Z, C_BPARTNER.NAME, C_UOM.NAME, 
-      M_TRANSACTION.MOVEMENTDATE, M_INTERNAL_CONSUMPTION.M_INTERNAL_CONSUMPTION_ID, M_INTERNAL_CONSUMPTION.NAME, M_INTERNAL_CONSUMPTION.DESCRIPTION
+      M_TRANSACTION.MOVEMENTDATE, M_INTERNAL_CONSUMPTION.M_INTERNAL_CONSUMPTION_ID, M_INTERNAL_CONSUMPTION.NAME, M_INTERNAL_CONSUMPTION.DESCRIPTION, M_WAREHOUSE.NAME
       HAVING SUM(M_TRANSACTION.MOVEMENTQTY) <> 0
       ORDER BY C_BPARTNER.NAME, M_TRANSACTION.MOVEMENTDATE DESC
      ]]></Sql>