Fixes bug 8448 Added attribute column In Product movements report
authorVinoth Babu <vinoth.babu@openbravo.com>
Tue, 21 Apr 2009 11:42:02 +0530
changeset 3684 9bd469a5a025
parent 3683 8e3f98960618
child 3685 4805d9a55dec
Fixes bug 8448 Added attribute column In Product movements report
src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.html
src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.xml
src/org/openbravo/erpCommon/ad_reports/ReportProductMovement_data.xsql
--- a/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.html	Tue Apr 21 11:28:23 2009 -0400
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.html	Tue Apr 21 11:42:02 2009 +0530
@@ -432,16 +432,17 @@
                 <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="11"><span>Incoming/Outgoing</span></th>
+                    <th class="DataGrid_Header_Cell" colspan="12"><span>Incoming/Outgoing</span></th>
                   </tr>
                   <div id="sectionPartner"> 
                     <tr class="DataGrid_Body_Row"> 
-                      <th colspan="11" class="DataGrid_Header_Cell"><span>Customer<span>:&nbsp;</span><span id="fieldPartnername">xxAguinaga</span></span></th>
+                      <th colspan="12" 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">
                         <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background: none; border: 0px none">
                           <tr class="DataGrid_Body_Row">
@@ -475,6 +476,7 @@
                           <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>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.xml	Tue Apr 21 11:28:23 2009 -0400
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.xml	Tue Apr 21 11:42:02 2009 +0530
@@ -65,6 +65,7 @@
     <FIELD id="fieldId" attribute="onclick" replace="yy">issotrx</FIELD>
     <FIELD id="fieldDocumentNo">documentno</FIELD>
     <FIELD id="fieldName">name</FIELD>
+    <FIELD id="fieldAttr">attr</FIELD>
     <FIELD id="fieldPartnername">partnername</FIELD>
     <FIELD id="fieldMovementdate">movementdate</FIELD>
     <FIELD id="fieldMovementqty">movementqty</FIELD>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement_data.xsql	Tue Apr 21 11:28:23 2009 -0400
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement_data.xsql	Tue Apr 21 11:42:02 2009 +0530
@@ -28,7 +28,7 @@
     <SqlMethodComment></SqlMethodComment>
     <Sql>
     <![CDATA[
-      SELECT M_PRODUCT.VALUE, M_PRODUCT.NAME, M_TRANSACTION.MOVEMENTDATE, C_BPARTNER.NAME AS PARTNERNAME,
+      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_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, 
@@ -40,7 +40,8 @@
       M_INOUT.DOCUMENTNO AS DOCUMENTNO, '' AS M_MOVEMENTLINE_ID, '' AS MOVEMENT, '' AS MOVEMENT_DESCRIPTION,
       '' AS M_INVENTORY_ID, '' AS M_MOVEMENT_ID, '' AS M_PRODUCTIONPLAN_ID, '' 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,
+                     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
       WHERE M_TRANSACTION.M_LOCATOR_ID = M_LOCATOR.M_LOCATOR_ID
       AND M_TRANSACTION.M_INOUTLINE_ID = M_INOUTLINE.M_INOUTLINE_ID
@@ -51,7 +52,7 @@
       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_LOCATOR.Z, M_INOUT.ISSOTRX, C_UOM.NAME, M_INOUT.M_INOUT_ID, M_INOUT.DOCUMENTNO, M_ATTRIBUTESETINSTANCE.DESCRIPTION
       ORDER BY C_BPARTNER.NAME, M_TRANSACTION.MOVEMENTDATE DESC
      ]]></Sql>
     <Parameter name="adLanguage"/>