details:   http://code.openbravo.com/erp/devel/pi/rev/973c74129894
changeset: 3518:973c74129894
user:      Ainhoa Pagola <ainhoa.pagola <at> openbravo.com>
date:      Mon Apr 06 11:55:56 2009 +0200
summary:   Fixes bug 0007200. Product Movement Report: Links issue solved.

diffstat:

 src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.html      |  14 
++++--
 src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.java      |  10 
+----
 src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.xml       |   3 +-
 src/org/openbravo/erpCommon/ad_reports/ReportProductMovement_data.xsql |   8 
++--
 4 files changed, 16 insertions(+), 19 deletions(-)

diffs (131 lines):

diff -r 77606dd26da9 -r 973c74129894 
src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.html
--- a/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.html Mon Apr 
06 13:34:49 2009 -0400
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.html Mon Apr 
06 11:55:56 2009 +0200
@@ -52,9 +52,13 @@
       </script>
 <script language="JavaScript" type="text/javascript">
  function abrirVentana(id, issotrx){
-  if (issotrx == 'Si')  submitCommandFormParameter('DIRECT', 
document.frmMain.inpmInoutId, id, false, document.frmMain, 
'../GoodsShipment/Header_Relation.html', null, false, true);
+  if (issotrx == 'Y')  submitCommandFormParameter('DIRECT', 
document.frmMain.inpmInoutId, id, false, document.frmMain, 
'../GoodsShipment/Header_Relation.html', null, false, true);
   else submitCommandFormParameter('DIRECT', document.frmMain.inpmInoutId, id, 
false, document.frmMain, '../GoodsReceipt/Header_Relation.html', null, false, 
true)
  }
+ function BOMorWorkEffort(id, isBOM){
+        if (isBOM == 'Y') submitCommandFormParameter('DIRECT', 
document.frmMain.inpmProductionplanId, id, false, document.frmMain, 
'../BillofMaterialsProduction/ProductionPlan_Relation.html', null, false, true);
+        else submitCommandFormParameter('DIRECT', 
document.frmMain.inpmProductionplanId, id, false, document.frmMain, 
'../WorkEffort/ProductionRun_Relation.html', null, false, true);
+ }
 function validate(action)
 {
   var frm = document.frmMain;
@@ -467,7 +471,7 @@
                     </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="abrirVentana(xx, 'yy');return false;" 
onmouseover="window.status='Incoming/Outgoing';return true;" 
onmouseout="window.status='';return true;" class="LabelLink" id="fieldId"> 
+                        <td width="10%" class="DataGrid_Body_Cell"><a href="#" 
onclick="abrirVentana('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>
@@ -514,7 +518,7 @@
                     <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="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"> 
                           <span id="fieldMovement">xx850000007</span></a></td>
                         <td class="DataGrid_Body_Cell" width="26%" 
id="fieldName1">xx2345</td>
                         <td class="DataGrid_Body_Cell" width="4%"  
id="fieldXOrigin1">xx3</td>
@@ -569,7 +573,7 @@
                     <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="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"> 
                           <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>
@@ -628,7 +632,7 @@
                     <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="submitCommandFormParameter('DIRECT', 
document.frmMain.inpmProductionplanId, xx, false, document.frmMain, 
'../BillofMaterialsProduction/ProductionPlan_Relation.html', null, false, 
true);return false;" onmouseover="window.status='Production Plan';return true;" 
onmouseout="window.status='';return true;" class="LabelLink" id="fieldId4"> 
+                        <td class="DataGrid_Body_Cell" width="20%"> <a 
href="#" onclick="BOMorWorkEffort('xx', 'zz');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>
diff -r 77606dd26da9 -r 973c74129894 
src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.java
--- a/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.java Mon Apr 
06 13:34:49 2009 -0400
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.java Mon Apr 
06 11:55:56 2009 +0200
@@ -234,14 +234,6 @@
     xmlDocument.setParameter("paramBPartnerId", strcBpartnerId);
     xmlDocument.setParameter("mProduct", strmProductId);
 
-    if (strmProductId.equals("")) {
-      data = new ReportProductMovementData[0];
-    } else {
-      data = ReportProductMovementData.select(this, vars.getLanguage(), 
Utility.getContext(this,
-          vars, "#AccessibleOrgTree", "ReportProductMovement"), 
Utility.getContext(this, vars,
-          "#User_Client", "ReportProductMovement"), strDateFrom, 
DateTimeData.nDaysAfter(this,
-          strDateTo, "1"), strcBpartnerId, strmProductId, 
strmAttributesetinstanceId);
-    }
     xmlDocument.setData("reportM_ATTRIBUTESETINSTANCE_ID", "liststructure",
         AttributeSetInstanceComboData.select(this, vars.getLanguage(), 
strmProductId, Utility
             .getContext(this, vars, "#User_Client", "ReportProductMovement"), 
Utility.getContext(
@@ -268,4 +260,4 @@
   public String getServletInfo() {
     return "Servlet ReportProductMovement. This Servlet was made by Jon 
Alegria";
   } // end of getServletInfo() method
-}
\ No newline at end of file
+}
diff -r 77606dd26da9 -r 973c74129894 
src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.xml
--- a/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.xml  Mon Apr 
06 13:34:49 2009 -0400
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.xml  Mon Apr 
06 11:55:56 2009 +0200
@@ -62,7 +62,7 @@
     <FIELD id="fieldRownum1">rownum</FIELD>
     <FUNCTION id="funcEvenOddRow1xx" name="MODULE" arg1="fieldRownum1" 
arg2="param2" format="integerEdition" attribute="class" replace="yy"/>
     <FIELD id="fieldId" attribute="onclick" replace="xx">mInoutId</FIELD>
-    <FIELD id="fieldId" attribute="onclick" replace="yy">out</FIELD>
+    <FIELD id="fieldId" attribute="onclick" replace="yy">issotrx</FIELD>
     <FIELD id="fieldDocumentNo">documentno</FIELD>
     <FIELD id="fieldName">name</FIELD>
     <FIELD id="fieldPartnername">partnername</FIELD>
@@ -118,6 +118,7 @@
     <FIELD id="fieldRownum4">rownum</FIELD>
     <FUNCTION id="funcEvenOddRow4xx" name="MODULE" arg1="fieldRownum4" 
arg2="param2" format="integerEdition" attribute="class" replace="yy"/>
     <FIELD id="fieldId4" attribute="onclick" 
replace="xx">mProductionplanId</FIELD>
+    <FIELD id="fieldId4" attribute="onclick" replace="yy">issotrx</FIELD>
     <FIELD id="fieldProductionPlan">productionPlan</FIELD>
     <FIELD id="fieldName3">name</FIELD>
     <FIELD id="fieldPartnername3">partnername</FIELD>
diff -r 77606dd26da9 -r 973c74129894 
src/org/openbravo/erpCommon/ad_reports/ReportProductMovement_data.xsql
--- a/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement_data.xsql    
Mon Apr 06 13:34:49 2009 -0400
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement_data.xsql    
Mon Apr 06 11:55:56 2009 +0200
@@ -36,7 +36,7 @@
       (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,
       AD_MESSAGE_GET2(M_INOUT.ISSOTRX,?) AS OUT,
-      (SUM(M_TRANSACTION.MOVEMENTQTY)||' '||C_UOM.NAME) AS MOVEMENTQTY, 
M_INOUT.ISSOTRX, M_INOUT.M_INOUT_ID,
+      (SUM(M_TRANSACTION.MOVEMENTQTY)||' '||C_UOM.NAME) AS MOVEMENTQTY, 
M_INOUT.ISSOTRX AS ISSOTRX, M_INOUT.M_INOUT_ID,
       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
@@ -136,8 +136,8 @@
     <![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, 
-        (SUM(M_TRANSACTION.MOVEMENTQTY)||' '||C_UOM.NAME) AS MOVEMENTQTY, 
M_TRANSACTION.MOVEMENTDATE, 'No' AS OUT,
-        M_PRODUCTIONPLAN.M_PRODUCTIONPLAN_ID, (M_PRODUCTION.NAME || ' - ' || 
M_PRODUCTIONPLAN.LINE) AS PRODUCTION_PLAN
+        (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
@@ -151,7 +151,7 @@
         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_TRANSACTION.MOVEMENTDATE,M_PRODUCTIONPLAN.M_PRODUCTIONPLAN_ID, 
M_PRODUCTION.NAME, M_PRODUCTIONPLAN.LINE, M_PRODUCTION.ISSOTRX, 
M_PRODUCTION.DOCUMENTNO
         HAVING SUM(M_TRANSACTION.MOVEMENTQTY) <> 0
         ORDER BY C_BPARTNER.NAME, M_TRANSACTION.MOVEMENTDATE DESC
      ]]></Sql>

------------------------------------------------------------------------------
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to