details:   https://code.openbravo.com/erp/devel/pi/rev/853d7ec9da6e
changeset: 32926:853d7ec9da6e
user:      Atul Gaware <atul.gaware <at> openbravo.com>
date:      Tue Oct 31 00:35:15 2017 +0530
summary:   Fixes Issue 37160:The BOM production transactions do not appear 
correctly
in the traceability report

M_Transaction records were skipped in methods called in
processExternalChilds as attributsetinstance = '0' in case
products does not attributeset defined. Hence remove check
m_attributesetinstance_id <> '0' from methods
selectProductionOut, selectProductionIn and selectMovement

details:   https://code.openbravo.com/erp/devel/pi/rev/13e6dd634416
changeset: 32927:13e6dd634416
user:      David Miguelez <david.miguelez <at> openbravo.com>
date:      Mon Nov 06 16:36:24 2017 +0100
summary:   Related to Issue 37160.

This report was not meant to show information about products without
attributes. However, it should show the information about products
consumed in productions.

The fix was to remove the restrictions while filtering for products
without attributes.

But also, it does now explode the children of this products

diffstat:

 src/org/openbravo/erpCommon/ad_reports/MInOutTraceReports.java      |  11 
++++++++-
 src/org/openbravo/erpCommon/ad_reports/MInOutTraceReports_data.xsql |   3 --
 2 files changed, 9 insertions(+), 5 deletions(-)

diffs (55 lines):

diff -r bb674eaf41ef -r 13e6dd634416 
src/org/openbravo/erpCommon/ad_reports/MInOutTraceReports.java
--- a/src/org/openbravo/erpCommon/ad_reports/MInOutTraceReports.java    Mon Nov 
06 11:44:16 2017 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/MInOutTraceReports.java    Mon Nov 
06 16:36:24 2017 +0100
@@ -415,7 +415,10 @@
                   + calculated.get(strCalculate));
             }
             Integer isnull = calculated.get(strCalculate);
-            if (isnull == null) {
+            if (isnull == null
+                && 
!StringUtils.equals(dataProduction[j].mAttributesetinstanceId, "0")) {
+              // If there is not attribute Set Instance ID, do not explode the 
children for this
+              // report. It is meant to explode children of Products with 
attribute in this scenario
               MInOutTraceReportsData[] data = 
MInOutTraceReportsData.selectChilds(readOnlyCP,
                   vars.getLanguage(), 
dataProduction[j].mAttributesetinstanceId,
                   dataProduction[j].mProductId, dataProduction[j].mLocatorId,
@@ -505,7 +508,11 @@
                 log4j.debug("******** Movement, hashtable calculated: "
                     + calculated.get(strCalculate));
               }
-              if (calculated.get(strCalculate) == null) {
+              if (calculated.get(strCalculate) == null
+                  && 
!StringUtils.equals(dataMovement[j].mAttributesetinstanceId, "0")) {
+                // If there is not attribute Set Instance ID, do not explode 
the children for this
+                // report. It is meant to explode children of Products with 
attribute in this
+                // scenario
                 MInOutTraceReportsData[] data = 
MInOutTraceReportsData.selectChilds(readOnlyCP,
                     vars.getLanguage(), 
dataMovement[j].mAttributesetinstanceId,
                     dataMovement[j].mProductId, dataMovement[j].mLocatorId,
diff -r bb674eaf41ef -r 13e6dd634416 
src/org/openbravo/erpCommon/ad_reports/MInOutTraceReports_data.xsql
--- a/src/org/openbravo/erpCommon/ad_reports/MInOutTraceReports_data.xsql       
Mon Nov 06 11:44:16 2017 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/MInOutTraceReports_data.xsql       
Mon Nov 06 16:36:24 2017 +0100
@@ -130,7 +130,6 @@
         SELECT M_PRODUCTIONPLAN_ID FROM M_PRODUCTIONLINE WHERE 
M_PRODUCTIONLINE_ID = ?)) 
       AND T.MOVEMENTQTY > 0
       AND T.M_PRODUCTIONLINE_ID <> ?
-      AND T.M_ATTRIBUTESETINSTANCE_ID <> '0'
       ORDER BY T.MOVEMENTDATE, T.CREATED
      ]]></Sql>
      <Parameter name="adLanguage"/>
@@ -175,7 +174,6 @@
         SELECT M_PRODUCTIONPLAN_ID FROM M_PRODUCTIONLINE WHERE 
M_PRODUCTIONLINE_ID = ?)) 
       AND T.MOVEMENTQTY < 0
       AND T.M_PRODUCTIONLINE_ID <> ?
-      AND T.M_ATTRIBUTESETINSTANCE_ID <> '0'
       ORDER BY T.MOVEMENTDATE, T.CREATED
      ]]></Sql>
      <Parameter name="adLanguage"/>
@@ -215,7 +213,6 @@
       AND L.AD_LANGUAGE = ? 
       AND T.C_UOM_ID = C1.C_UOM_ID 
       AND T.M_MOVEMENTLINE_ID = ?
-      AND T.M_ATTRIBUTESETINSTANCE_ID <> '0'
       ORDER BY T.MOVEMENTDATE, T.CREATED
      ]]></Sql>
      <Parameter name="adLanguage"/>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to