Fixes issue 0020916: Product name does not appear in Dimensional Reports if
authorJon Alegría <jon.alegria@openbravo.com>
Tue, 03 Jul 2012 12:36:48 +0200
changeset 9872 00dc02380cab
parent 9871 c9b5c1ab5b1f
child 9873 a0a3f0685d7e
Fixes issue 0020916: Product name does not appear in Dimensional Reports if
the UOM symbol is not defined
src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR.java
src/org/openbravo/erpCommon/ad_reports/ReportInvoiceVendorDimensionalAnalysesJR.java
src/org/openbravo/erpCommon/ad_reports/ReportMaterialDimensionalAnalysesJR.java
src/org/openbravo/erpCommon/ad_reports/ReportPurchaseDimensionalAnalysesJR.java
src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalyses.java
src/org/openbravo/erpCommon/ad_reports/ReportSalesDimensionalAnalyzeJR.java
src/org/openbravo/erpCommon/ad_reports/ReportShipmentDimensionalAnalyzeJR.java
--- a/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR.java	Tue Jul 03 12:26:29 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR.java	Tue Jul 03 12:36:48 2012 +0200
@@ -522,7 +522,7 @@
         levelsconcat.append("M_PRODUCT_CATEGORY.M_PRODUCT_CATEGORY_ID");
       } else if (strShownArray[i].equals("4")) {
         strTextShow[i] = "AD_COLUMN_IDENTIFIER(to_char('M_Product'), to_char( M_PRODUCT.M_PRODUCT_ID), to_char( '"
-            + vars.getLanguage() + "'))||' ('||UOMSYMBOL||')'";
+	    + vars.getLanguage() + "'))|| CASE WHEN uomsymbol IS NULL THEN '' ELSE to_char(' ('||uomsymbol||')') END";
         intAuxDiscard = i;
         intOrder++;
         intProductLevel = i + 1;
--- a/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceVendorDimensionalAnalysesJR.java	Tue Jul 03 12:26:29 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceVendorDimensionalAnalysesJR.java	Tue Jul 03 12:36:48 2012 +0200
@@ -412,7 +412,7 @@
         strLevelLabel[i] = dimensionLabel[2].name;
       } else if (strShownArray[i].equals("4")) {
         strTextShow[i] = "AD_COLUMN_IDENTIFIER(to_char('M_Product'), to_char( M_PRODUCT.M_PRODUCT_ID), to_char('"
-            + vars.getLanguage() + "'))||' ('||UOMSYMBOL||')'";
+	    + vars.getLanguage() + "'))|| CASE WHEN uomsymbol IS NULL THEN '' ELSE to_char(' ('||uomsymbol||')') END";
         intAuxDiscard = i;
         intDiscard++;
         intProductLevel = i + 1;
--- a/src/org/openbravo/erpCommon/ad_reports/ReportMaterialDimensionalAnalysesJR.java	Tue Jul 03 12:26:29 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportMaterialDimensionalAnalysesJR.java	Tue Jul 03 12:36:48 2012 +0200
@@ -394,7 +394,7 @@
         strLevelLabel[i] = dimensionLabel[2].name;
       } else if (strShownArray[i].equals("4")) {
         strTextShow[i] = "AD_COLUMN_IDENTIFIER(to_char('M_Product'), to_char( M_PRODUCT.M_PRODUCT_ID), to_char('"
-            + vars.getLanguage() + "'))||' ('||UOMSYMBOL||')'";
+	    + vars.getLanguage() + "'))|| CASE WHEN uomsymbol IS NULL THEN '' ELSE to_char(' ('||uomsymbol||')') END";
         intAuxDiscard = i;
         intDiscard++;
         intProductLevel = i + 1;
--- a/src/org/openbravo/erpCommon/ad_reports/ReportPurchaseDimensionalAnalysesJR.java	Tue Jul 03 12:26:29 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportPurchaseDimensionalAnalysesJR.java	Tue Jul 03 12:36:48 2012 +0200
@@ -398,7 +398,7 @@
         strLevelLabel[i] = dimensionLabel[2].name;
       } else if (strShownArray[i].equals("4")) {
         strTextShow[i] = "AD_COLUMN_IDENTIFIER(to_char('M_Product'), to_char( M_PRODUCT.M_PRODUCT_ID), to_char('"
-            + vars.getLanguage() + "'))||' ('||UOMSYMBOL||')'";
+	    + vars.getLanguage() + "'))|| CASE WHEN uomsymbol IS NULL THEN '' ELSE to_char(' ('||uomsymbol||')') END";
         intProductLevel = i + 1;
         intDiscard++;
         intAuxDiscard = i;
--- a/src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalyses.java	Tue Jul 03 12:26:29 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalyses.java	Tue Jul 03 12:36:48 2012 +0200
@@ -415,7 +415,7 @@
         intDiscard++;
       } else if (strShownArray[i].equals("4")) {
         strTextShow[i] = "AD_COLUMN_IDENTIFIER(to_char('M_Product'), to_char( M_PRODUCT.M_PRODUCT_ID), to_char('"
-            + vars.getLanguage() + "'))||' ('||UOMSYMBOL||')'";
+	    + vars.getLanguage() + "'))|| CASE WHEN uomsymbol IS NULL THEN '' ELSE to_char(' ('||uomsymbol||')') END";
         intAuxDiscard = i;
         intDiscard++;
       } else if (strShownArray[i].equals("5")) {
--- a/src/org/openbravo/erpCommon/ad_reports/ReportSalesDimensionalAnalyzeJR.java	Tue Jul 03 12:26:29 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportSalesDimensionalAnalyzeJR.java	Tue Jul 03 12:36:48 2012 +0200
@@ -480,7 +480,7 @@
         levelsconcat.append("M_PRODUCT_CATEGORY.M_PRODUCT_CATEGORY_ID");
       } else if (strShownArray[i].equals("4")) {
         strTextShow[i] = "AD_COLUMN_IDENTIFIER(to_char('M_Product'), to_char( M_PRODUCT.M_PRODUCT_ID), to_char('"
-            + vars.getLanguage() + "'))||' ('||UOMSYMBOL||')'";
+	    + vars.getLanguage() + "'))|| CASE WHEN uomsymbol IS NULL THEN '' ELSE to_char(' ('||uomsymbol||')') END";
         intAuxDiscard = i;
         intDiscard++;
         intProductLevel = i + 1;
--- a/src/org/openbravo/erpCommon/ad_reports/ReportShipmentDimensionalAnalyzeJR.java	Tue Jul 03 12:26:29 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportShipmentDimensionalAnalyzeJR.java	Tue Jul 03 12:36:48 2012 +0200
@@ -490,7 +490,7 @@
         levelsconcat.append("M_PRODUCT_CATEGORY.M_PRODUCT_CATEGORY_ID");
       } else if (strShownArray[i].equals("4")) {
         strTextShow[i] = "AD_COLUMN_IDENTIFIER(to_char('M_Product'), to_char( M_PRODUCT.M_PRODUCT_ID), to_char('"
-            + vars.getLanguage() + "'))||' ('||UOMSYMBOL||')'";
+	    + vars.getLanguage() + "'))|| CASE WHEN uomsymbol IS NULL THEN '' ELSE to_char(' ('||uomsymbol||')') END";
         intAuxDiscard = i;
         intDiscard++;
         intProductLevel = i + 1;