Fixed bug 27010: Invoice Dimensional Report should not consider voided status.
authorReinaldo Guerra <reinaldo.guerra@peoplewalking.com>
Thu, 26 Feb 2015 13:37:44 -0500
changeset 26093 452fedf8a214
parent 26092 e0db9fdfe275
child 26094 50e5345f5a57
Fixed bug 27010: Invoice Dimensional Report should not consider voided status.

A new primary filter, was added to the Sales Invoice Dimensional Report, to allow exclude or not, documents voided in report's output.
This filter can be managed through a new preference that was created too, in order to let user decide if filter will be shown. By default the filter will be hidden and documents voided will be considered.
src-db/database/sourcedata/AD_REF_LIST.xml
src-db/database/sourcedata/AD_TEXTINTERFACES.xml
src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR.java
src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJRFilter.html
src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJRFilter.xml
src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR_data.xsql
--- a/src-db/database/sourcedata/AD_REF_LIST.xml	Thu Feb 26 12:52:37 2015 +0100
+++ b/src-db/database/sourcedata/AD_REF_LIST.xml	Thu Feb 26 13:37:44 2015 -0500
@@ -10865,6 +10865,17 @@
 <!--9C2EC2F385E54F51BB0734A88A3BFC22-->  <SEQNO><![CDATA[3]]></SEQNO>
 <!--9C2EC2F385E54F51BB0734A88A3BFC22--></AD_REF_LIST>
 
+<!--9D1684E4CC114529866A61AD2BAC90C5--><AD_REF_LIST>
+<!--9D1684E4CC114529866A61AD2BAC90C5-->  <AD_REF_LIST_ID><![CDATA[9D1684E4CC114529866A61AD2BAC90C5]]></AD_REF_LIST_ID>
+<!--9D1684E4CC114529866A61AD2BAC90C5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--9D1684E4CC114529866A61AD2BAC90C5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--9D1684E4CC114529866A61AD2BAC90C5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--9D1684E4CC114529866A61AD2BAC90C5-->  <VALUE><![CDATA[ShowVoidCheckboxSalesInvoiceDimensionalReport]]></VALUE>
+<!--9D1684E4CC114529866A61AD2BAC90C5-->  <NAME><![CDATA[Enable void documents for Sales Invoice Dimensional Report]]></NAME>
+<!--9D1684E4CC114529866A61AD2BAC90C5-->  <AD_REFERENCE_ID><![CDATA[A26BA480E2014707B47257024C3CBFF7]]></AD_REFERENCE_ID>
+<!--9D1684E4CC114529866A61AD2BAC90C5-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--9D1684E4CC114529866A61AD2BAC90C5--></AD_REF_LIST>
+
 <!--9D453B94D05B4C719DDD896DE80C8B5A--><AD_REF_LIST>
 <!--9D453B94D05B4C719DDD896DE80C8B5A-->  <AD_REF_LIST_ID><![CDATA[9D453B94D05B4C719DDD896DE80C8B5A]]></AD_REF_LIST_ID>
 <!--9D453B94D05B4C719DDD896DE80C8B5A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Thu Feb 26 12:52:37 2015 +0100
+++ b/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Thu Feb 26 13:37:44 2015 -0500
@@ -20106,6 +20106,17 @@
 <!--A2EBE0F15C424862BE4C861A50ADAE7D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--A2EBE0F15C424862BE4C861A50ADAE7D--></AD_TEXTINTERFACES>
 
+<!--A34F97C04149414B907EB841AE6C3581--><AD_TEXTINTERFACES>
+<!--A34F97C04149414B907EB841AE6C3581-->  <AD_TEXTINTERFACES_ID><![CDATA[A34F97C04149414B907EB841AE6C3581]]></AD_TEXTINTERFACES_ID>
+<!--A34F97C04149414B907EB841AE6C3581-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--A34F97C04149414B907EB841AE6C3581-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--A34F97C04149414B907EB841AE6C3581-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A34F97C04149414B907EB841AE6C3581-->  <TEXT><![CDATA[Voided invoices needs to be included]]></TEXT>
+<!--A34F97C04149414B907EB841AE6C3581-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJRFilter.html]]></FILENAME>
+<!--A34F97C04149414B907EB841AE6C3581-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--A34F97C04149414B907EB841AE6C3581-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--A34F97C04149414B907EB841AE6C3581--></AD_TEXTINTERFACES>
+
 <!--A37C8063B7A840F4AB09A2E9F426CB65--><AD_TEXTINTERFACES>
 <!--A37C8063B7A840F4AB09A2E9F426CB65-->  <AD_TEXTINTERFACES_ID><![CDATA[A37C8063B7A840F4AB09A2E9F426CB65]]></AD_TEXTINTERFACES_ID>
 <!--A37C8063B7A840F4AB09A2E9F426CB65-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR.java	Thu Feb 26 12:52:37 2015 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR.java	Thu Feb 26 13:37:44 2015 -0500
@@ -113,17 +113,24 @@
       String strCurrencyId = vars.getGlobalVariable("inpCurrencyId",
           "ReportInvoiceCustomerDimensionalAnalysesJR|currency", strUserCurrencyId);
       String strComparative = "";
-      if (vars.commandIn("DEFAULT_COMPARATIVE"))
+      String strVoid = "";
+      if (vars.commandIn("DEFAULT_COMPARATIVE")) {
         strComparative = vars.getRequestGlobalVariable("inpComparative",
             "ReportInvoiceCustomerDimensionalAnalysesJR|comparative");
-      else
+        strVoid = vars.getRequestGlobalVariable("inpVoid",
+            "ReportInvoiceCustomerDimensionalAnalysesJR|Void");
+      } else {
         strComparative = vars.getGlobalVariable("inpComparative",
             "ReportInvoiceCustomerDimensionalAnalysesJR|comparative", "N");
+        strVoid = vars.getGlobalVariable("inpVoid",
+            "ReportInvoiceCustomerDimensionalAnalysesJR|Void", "Y");
+      }
+
       printPageDataSheet(request, response, vars, strComparative, strDateFrom, strDateTo,
           strPartnerGroup, strcBpartnerId, strProductCategory, strmProductId, strNotShown,
           strShown, strDateFromRef, strDateToRef, strDateFromRef2, strDateToRef2, strDateFromRef3,
           strDateToRef3, strOrg, strsalesrepId, strcProjectId, strProducttype, strcDocTypeId,
-          strOrder, strMayor, strMenor, strPartnerSalesRepId, strCurrencyId);
+          strOrder, strMayor, strMenor, strPartnerSalesRepId, strCurrencyId, strVoid);
     } else if (vars.commandIn("EDIT_HTML", "EDIT_HTML_COMPARATIVE")) {
       String strDateFrom = vars.getRequestGlobalVariable("inpDateFrom",
           "ReportInvoiceCustomerDimensionalAnalysesJR|dateFrom");
@@ -171,11 +178,13 @@
           "ReportInvoiceCustomerDimensionalAnalysesJR|partnersalesrep");
       String strCurrencyId = vars.getGlobalVariable("inpCurrencyId",
           "ReportInvoiceCustomerDimensionalAnalysesJR|currency", strUserCurrencyId);
+      String strVoid = vars.getRequestGlobalVariable("inpVoid",
+          "ReportInvoiceCustomerDimensionalAnalysesJR|Void");
       printPageHtml(request, response, vars, strComparative, strDateFrom, strDateTo,
           strPartnerGroup, strcBpartnerId, strProductCategory, strmProductId, strNotShown,
           strShown, strDateFromRef, strDateToRef, strDateFromRef2, strDateToRef2, strDateFromRef3,
           strDateToRef3, strOrg, strsalesrepId, strcProjectId, strProducttype, strcDocTypeId,
-          strOrder, strMayor, strMenor, strPartnerSalesrepId, strCurrencyId, "html");
+          strOrder, strMayor, strMenor, strPartnerSalesrepId, strCurrencyId, strVoid, "html");
     } else if (vars.commandIn("EDIT_PDF", "EDIT_PDF_COMPARATIVE")) {
       String strDateFrom = vars.getRequestGlobalVariable("inpDateFrom",
           "ReportInvoiceCustomerDimensionalAnalysesJR|dateFrom");
@@ -223,11 +232,13 @@
           "ReportInvoiceCustomerDimensionalAnalysesJR|partnersalesrep");
       String strCurrencyId = vars.getGlobalVariable("inpCurrencyId",
           "ReportInvoiceCustomerDimensionalAnalysesJR|currency", strUserCurrencyId);
+      String strVoid = vars.getRequestGlobalVariable("inpVoid",
+          "ReportInvoiceCustomerDimensionalAnalysesJR|Void");
       printPageHtml(request, response, vars, strComparative, strDateFrom, strDateTo,
           strPartnerGroup, strcBpartnerId, strProductCategory, strmProductId, strNotShown,
           strShown, strDateFromRef, strDateToRef, strDateFromRef2, strDateToRef2, strDateFromRef3,
           strDateToRef3, strOrg, strsalesrepId, strcProjectId, strProducttype, strcDocTypeId,
-          strOrder, strMayor, strMenor, strPartnerSalesrepId, strCurrencyId, "pdf");
+          strOrder, strMayor, strMenor, strPartnerSalesrepId, strCurrencyId, strVoid, "pdf");
     } else if (vars.commandIn("EXCEL")) {
       String strDateFrom = vars.getRequestGlobalVariable("inpDateFrom",
           "ReportInvoiceCustomerDimensionalAnalysesJR|dateFrom");
@@ -275,11 +286,13 @@
           "ReportInvoiceCustomerDimensionalAnalysesJR|partnersalesrep");
       String strCurrencyId = vars.getGlobalVariable("inpCurrencyId",
           "ReportInvoiceCustomerDimensionalAnalysesJR|currency", strUserCurrencyId);
+      String strVoid = vars.getRequestGlobalVariable("inpVoid",
+          "ReportInvoiceCustomerDimensionalAnalysesJR|Void");
       printPageHtml(request, response, vars, strComparative, strDateFrom, strDateTo,
           strPartnerGroup, strcBpartnerId, strProductCategory, strmProductId, strNotShown,
           strShown, strDateFromRef, strDateToRef, strDateFromRef2, strDateToRef2, strDateFromRef3,
           strDateToRef3, strOrg, strsalesrepId, strcProjectId, strProducttype, strcDocTypeId,
-          strOrder, strMayor, strMenor, strPartnerSalesrepId, strCurrencyId, "xls");
+          strOrder, strMayor, strMenor, strPartnerSalesrepId, strCurrencyId, strVoid, "xls");
     } else
       pageErrorPopUp(response);
   }
@@ -291,8 +304,8 @@
       String strDateToRef, String strDateFromRef2, String strDateToRef2, String strDateFromRef3,
       String strDateToRef3, String strOrg, String strsalesrepId, String strcProjectId,
       String strProducttype, String strcDocTypeId, String strOrder, String strMayor,
-      String strMenor, String strPartnerSalesrepId, String strCurrencyId) throws IOException,
-      ServletException {
+      String strMenor, String strPartnerSalesrepId, String strCurrencyId, String strVoid)
+      throws IOException, ServletException {
     if (log4j.isDebugEnabled())
       log4j.debug("Output: dataSheet");
     String discard[] = { "selEliminarHeader1" };
@@ -385,6 +398,7 @@
     xmlDocument.setParameter("mayor", strMayor);
     xmlDocument.setParameter("menor", strMenor);
     xmlDocument.setParameter("comparative", strComparative);
+    xmlDocument.setParameter("void", strVoid);
     xmlDocument.setParameter("cProjectId", strcProjectId);
     xmlDocument.setParameter("producttype", strProducttype);
     xmlDocument.setParameter("partnerSalesRepId", strPartnerSalesrepId);
@@ -533,8 +547,8 @@
       String strDateToRef, String strDateFromRef2, String strDateToRef2, String strDateFromRef3,
       String strDateToRef3, String strOrg, String strsalesrepId, String strcProjectId,
       String strProducttype, String strcDocTypeId, String strOrder, String strMayor,
-      String strMenor, String strPartnerSalesrepId, String strCurrencyId, String strOutput)
-      throws IOException, ServletException {
+      String strMenor, String strPartnerSalesrepId, String strCurrencyId, String strVoid,
+      String strOutput) throws IOException, ServletException {
     if (log4j.isDebugEnabled())
       log4j.debug("Output: print html");
     String strOrderby = "";
@@ -782,17 +796,18 @@
                     vars, "#User_Client", "ReportInvoiceCustomerDimensionalAnalysesJR"),
                     strPartnerGroup, strcBpartnerId, strProductCategory, strmProductId,
                     strsalesrepId, strPartnerSalesrepId, strcProjectId, strProducttype,
-                    strcDocTypeId, strDateFrom, DateTimeData.nDaysAfter(this, strDateTo, "1"),
-                    strDateFromRef, DateTimeData.nDaysAfter(this, strDateToRef, "1"),
-                    strDateFromRef2, DateTimeData.nDaysAfter(this, strDateToRef2, "1"),
-                    strDateFromRef3, DateTimeData.nDaysAfter(this, strDateToRef3, "1"))
-                : ReportInvoiceCustomerDimensionalAnalysesJRData.selectNoComparativeCount(this,
-                    levelsconcat.toString(), Tree.getMembers(this,
-                        TreeData.getTreeOrg(this, vars.getClient()), strOrg), Utility.getContext(
-                        this, vars, "#User_Client", "ReportInvoiceCustomerDimensionalAnalysesJR"),
+                    strcDocTypeId, strVoid.equals("Y") ? "" : "VO", strDateFrom, DateTimeData
+                        .nDaysAfter(this, strDateTo, "1"), strDateFromRef, DateTimeData.nDaysAfter(
+                        this, strDateToRef, "1"), strDateFromRef2, DateTimeData.nDaysAfter(this,
+                        strDateToRef2, "1"), strDateFromRef3, DateTimeData.nDaysAfter(this,
+                        strDateToRef3, "1")) : ReportInvoiceCustomerDimensionalAnalysesJRData
+                .selectNoComparativeCount(this, levelsconcat.toString(), Tree.getMembers(this,
+                    TreeData.getTreeOrg(this, vars.getClient()), strOrg), Utility.getContext(this,
+                    vars, "#User_Client", "ReportInvoiceCustomerDimensionalAnalysesJR"),
                     strPartnerGroup, strcBpartnerId, strProductCategory, strmProductId,
                     strsalesrepId, strPartnerSalesrepId, strcProjectId, strProducttype,
-                    strcDocTypeId, strDateFrom, DateTimeData.nDaysAfter(this, strDateTo, "1")));
+                    strcDocTypeId, strVoid.equals("Y") ? "" : "VO", strDateFrom, DateTimeData
+                        .nDaysAfter(this, strDateTo, "1")));
       }
     } catch (NumberFormatException e) {
     }
@@ -816,7 +831,7 @@
                       "ReportInvoiceCustomerDimensionalAnalysesJR"), strDateFrom, DateTimeData
                   .nDaysAfter(this, strDateTo, "1"), strPartnerGroup, strcBpartnerId,
               strProductCategory, strmProductId, strsalesrepId, strPartnerSalesrepId,
-              strcProjectId, strProducttype, strcDocTypeId);
+              strcProjectId, strProducttype, strcDocTypeId, strVoid.equals("Y") ? "" : "VO");
         } catch (ServletException ex) {
           myMessage = Utility.translateError(this, vars, vars.getLanguage(), ex.getMessage());
         }
@@ -834,10 +849,10 @@
                         "ReportInvoiceCustomerDimensionalAnalysesJR"), strDateFrom, DateTimeData
                         .nDaysAfter(this, strDateTo, "1"), strPartnerGroup, strcBpartnerId,
                     strProductCategory, strmProductId, strsalesrepId, strPartnerSalesrepId,
-                    strcProjectId, strProducttype, strcDocTypeId, strDateFromRef, DateTimeData
-                        .nDaysAfter(this, strDateToRef, "1"), strDateFromRef2, DateTimeData
-                        .nDaysAfter(this, strDateToRef2, "1"), strDateFromRef3, DateTimeData
-                        .nDaysAfter(this, strDateToRef3, "1"), strOrderby);
+                    strcProjectId, strProducttype, strcDocTypeId, strVoid.equals("Y") ? "" : "VO",
+                    strDateFromRef, DateTimeData.nDaysAfter(this, strDateToRef, "1"),
+                    strDateFromRef2, DateTimeData.nDaysAfter(this, strDateToRef2, "1"),
+                    strDateFromRef3, DateTimeData.nDaysAfter(this, strDateToRef3, "1"), strOrderby);
               } else {
                 // Multi-comparative A: 1 base date, 2 reference dates
                 data = ReportInvoiceCustomerDimensionalAnalysesJRData.select2(this, strCurrencyId,
@@ -848,9 +863,9 @@
                         "ReportInvoiceCustomerDimensionalAnalysesJR"), strDateFrom, DateTimeData
                         .nDaysAfter(this, strDateTo, "1"), strPartnerGroup, strcBpartnerId,
                     strProductCategory, strmProductId, strsalesrepId, strPartnerSalesrepId,
-                    strcProjectId, strProducttype, strcDocTypeId, strDateFromRef, DateTimeData
-                        .nDaysAfter(this, strDateToRef, "1"), strDateFromRef2, DateTimeData
-                        .nDaysAfter(this, strDateToRef2, "1"), strOrderby);
+                    strcProjectId, strProducttype, strcDocTypeId, strVoid.equals("Y") ? "" : "VO",
+                    strDateFromRef, DateTimeData.nDaysAfter(this, strDateToRef, "1"),
+                    strDateFromRef2, DateTimeData.nDaysAfter(this, strDateToRef2, "1"), strOrderby);
               }
             } else {
               // Regular comparative: 1 base date, 1 reference date
@@ -862,8 +877,8 @@
                       "ReportInvoiceCustomerDimensionalAnalysesJR"), strDateFrom, DateTimeData
                       .nDaysAfter(this, strDateTo, "1"), strPartnerGroup, strcBpartnerId,
                   strProductCategory, strmProductId, strsalesrepId, strPartnerSalesrepId,
-                  strcProjectId, strProducttype, strcDocTypeId, strDateFromRef, DateTimeData
-                      .nDaysAfter(this, strDateToRef, "1"), strOrderby);
+                  strcProjectId, strProducttype, strcDocTypeId, strVoid.equals("Y") ? "" : "VO",
+                  strDateFromRef, DateTimeData.nDaysAfter(this, strDateToRef, "1"), strOrderby);
             }
           } catch (ServletException ex) {
             myMessage = Utility.translateError(this, vars, vars.getLanguage(), ex.getMessage());
@@ -878,7 +893,8 @@
                     "ReportInvoiceCustomerDimensionalAnalysesJR"), strDateFrom, DateTimeData
                     .nDaysAfter(this, strDateTo, "1"), strPartnerGroup, strcBpartnerId,
                 strProductCategory, strmProductId, strsalesrepId, strPartnerSalesrepId,
-                strcProjectId, strProducttype, strcDocTypeId, strOrderby);
+                strcProjectId, strProducttype, strcDocTypeId, strVoid.equals("Y") ? "" : "VO",
+                strOrderby);
           } catch (ServletException ex) {
             myMessage = Utility.translateError(this, vars, vars.getLanguage(), ex.getMessage());
           }
--- a/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJRFilter.html	Thu Feb 26 12:52:37 2015 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJRFilter.html	Thu Feb 26 13:37:44 2015 -0500
@@ -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-2014 Openbravo SLU
+ * All portions are Copyright (C) 2001-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -114,6 +114,13 @@
 		updateMenuIcon('buttonMenu');
 
 		setWindowElementFocus('firstElement');
+		
+		var f = getFrame('LayoutMDI');
+        if (f.OB.PropertyStore.get('ShowVoidCheckboxSalesInvoiceDimensionalReport') == 'Y') {
+           displayLogicElement('showexcludevoided_section', true);
+        } else {
+           displayLogicElement('showexcludevoided_section', false);
+        }
 	}
 
 	function onResizeDo(){
@@ -470,6 +477,16 @@
                   <td class="TextBox_ContentCell"> <input dojoType="openbravo:RealNumberTextbox" greaterThan="paramMayor" class="TextBox_OneCell_width" type="text" name="inpMenor" maxlength="10" id="paramMenor" value="" outputformat="euroEdition"></input><script>djConfig.searchIds.push("paramMenor");</script>
                   </td>
                 </tr>
+                <tr id="showexcludevoided_section" >
+                  <td class="TitleCell"><span class="LabelText">Voided invoices needs to be included</span>
+                  </td>
+                  <td class="FieldButton_ContentCell"><span class="Checkbox_container_NOT_Focused"><input type="checkbox" name="inpVoid" id="paramVoid" value="Y"></input></span>
+                  </td>
+                  <td class="TitleCell"></td>
+                  <td class="TitleCell"></td>
+                  <td class="TitleCell"></td>
+                  <td class="TitleCell"></td>
+                </tr>
                 <tr>
                   <td colspan="6">
                     <table class="FieldGroup" cellspacing="0" cellpadding="0" border="0">
--- a/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJRFilter.xml	Thu Feb 26 12:52:37 2015 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJRFilter.xml	Thu Feb 26 13:37:44 2015 -0500
@@ -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-2014 Openbravo SLU 
+* All portions are Copyright (C) 2001-2015 Openbravo SLU 
 * All Rights Reserved. 
 * Contributor(s):  ______________________________________.
 ************************************************************************
@@ -79,6 +79,8 @@
   <PARAMETER id="messageBoxID" name="messageType" attribute="class" replace="yy" default="HIDDEN"/>
   <PARAMETER id="messageBoxIDTitle" name="messageTitle" default=""/>
   <PARAMETER id="messageBoxIDMessage" name="messageMessage" default=""/>
+  <PARAMETER id="fieldCheck" name="check" default="Y"/>
+  <PARAMETER id="paramVoid" name="void" boolean="checked" withId="fieldCheck"/>
 
   <structure name="structure1">
     <FIELD id="paramNotShown" attribute="value">id</FIELD>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR_data.xsql	Thu Feb 26 12:52:37 2015 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR_data.xsql	Thu Feb 26 13:37:44 2015 -0500
@@ -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-2014 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2015 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -169,6 +169,7 @@
     <Parameter name="cProjectId" optional="true" after="AND 1=1"><![CDATA[AND C_PROJECT.C_PROJECT_ID = ?]]></Parameter>
     <Parameter name="producttype" optional="true" after="AND 1=1"><![CDATA[AND M_PRODUCT.PRODUCTTYPE = ?]]></Parameter>
     <Parameter name="cDocTypeId" optional="true" type="argument" after="AND 1=1"><![CDATA[AND C_DOCTYPE.C_DOCTYPE_ID IN]]></Parameter>
+    <Parameter name="strvoid" optional="true" after="AND 1=1"><![CDATA[AND C_INVOICE.DOCSTATUS <> ?]]></Parameter>
     <Parameter name="nivel1" type="replace" optional="true" after="UNION ALL SELECT to_char(" text="'8'"/>
     <Parameter name="nivel2" type="replace" optional="true" after="AS NIVEL1 , to_char(" text="'9'"/>
     <Parameter name="nivel3" type="replace" optional="true" after="AS NIVEL2 , to_char(" text="'10'"/>
@@ -193,6 +194,7 @@
     <Parameter name="cProjectId" optional="true" after="AND 2=2"><![CDATA[AND C_PROJECT.C_PROJECT_ID = ?]]></Parameter>
     <Parameter name="producttype" optional="true" after="AND 2=2"><![CDATA[AND M_PRODUCT.PRODUCTTYPE = ?]]></Parameter>
     <Parameter name="cDocTypeId" optional="true" type="argument" after="AND 2=2"><![CDATA[AND C_DOCTYPE.C_DOCTYPE_ID IN]]></Parameter>
+    <Parameter name="strvoid" optional="true" after="AND 2=2"><![CDATA[AND C_INVOICE.DOCSTATUS <> ?]]></Parameter>
     <Parameter name="orderby" type="replace" optional="true" after="GROUP BY NIVEL1, NIVEL2, NIVEL3, NIVEL4, NIVEL5, NIVEL6, NIVEL7, NIVEL8, NIVEL9, NIVEL10" text=", 1"/>
   </SqlMethod>
   
@@ -407,6 +409,7 @@
     <Parameter name="cProjectId" optional="true" after="AND 1=1"><![CDATA[AND C_PROJECT.C_PROJECT_ID = ?]]></Parameter>
     <Parameter name="producttype" optional="true" after="AND 1=1"><![CDATA[AND M_PRODUCT.PRODUCTTYPE = ?]]></Parameter>
     <Parameter name="cDocTypeId" optional="true" type="argument" after="AND 1=1"><![CDATA[AND C_DOCTYPE.C_DOCTYPE_ID IN]]></Parameter>
+    <Parameter name="strvoid" optional="true" after="AND 1=1"><![CDATA[AND C_INVOICE.DOCSTATUS <> ?]]></Parameter>
     <Parameter name="nivel1" type="replace" optional="true" after="UNION ALL SELECT to_char(" text="'8'"/>
     <Parameter name="nivel2" type="replace" optional="true" after="AS NIVEL1 , to_char(" text="'9'"/>
     <Parameter name="nivel3" type="replace" optional="true" after="AS NIVEL2 , to_char(" text="'10'"/>
@@ -431,6 +434,7 @@
     <Parameter name="cProjectId" optional="true" after="AND 2=2"><![CDATA[AND C_PROJECT.C_PROJECT_ID = ?]]></Parameter>
     <Parameter name="producttype" optional="true" after="AND 2=2"><![CDATA[AND M_PRODUCT.PRODUCTTYPE = ?]]></Parameter>
     <Parameter name="cDocTypeId" optional="true" type="argument" after="AND 2=2"><![CDATA[AND C_DOCTYPE.C_DOCTYPE_ID IN]]></Parameter>
+    <Parameter name="strvoid" optional="true" after="AND 2=2"><![CDATA[AND C_INVOICE.DOCSTATUS <> ?]]></Parameter>
     <Parameter name="nivel1" type="replace" optional="true" after="UNION ALL SELECT  to_char(" text="'28'"/>
     <Parameter name="nivel2" type="replace" optional="true" after="AS NIVEL1 ,to_char(" text="'29'"/>
     <Parameter name="nivel3" type="replace" optional="true" after="AS NIVEL2 ,to_char(" text="'30'"/>
@@ -455,6 +459,7 @@
     <Parameter name="cProjectId" optional="true" after="AND 4=4"><![CDATA[AND C_PROJECT.C_PROJECT_ID = ?]]></Parameter>
     <Parameter name="producttype" optional="true" after="AND 4=4"><![CDATA[AND M_PRODUCT.PRODUCTTYPE = ?]]></Parameter>
     <Parameter name="cDocTypeId" optional="true" type="argument" after="AND 4=4"><![CDATA[AND C_DOCTYPE.C_DOCTYPE_ID IN]]></Parameter>
+    <Parameter name="strvoid" optional="true" after="AND 4=4"><![CDATA[AND C_INVOICE.DOCSTATUS <> ?]]></Parameter>
     <Parameter name="orderby" type="replace" optional="true" after="GROUP BY NIVEL1, NIVEL2, NIVEL3, NIVEL4, NIVEL5, NIVEL6, NIVEL7, NIVEL8, NIVEL9, NIVEL10" text=", 1"/>
   </SqlMethod>
   
@@ -737,6 +742,7 @@
     <Parameter name="cProjectId" optional="true" after="AND 1=1"><![CDATA[AND C_PROJECT.C_PROJECT_ID = ?]]></Parameter>
     <Parameter name="producttype" optional="true" after="AND 1=1"><![CDATA[AND M_PRODUCT.PRODUCTTYPE = ?]]></Parameter>
     <Parameter name="cDocTypeId" optional="true" type="argument" after="AND 1=1"><![CDATA[AND C_DOCTYPE.C_DOCTYPE_ID IN]]></Parameter>
+    <Parameter name="strvoid" optional="true" after="AND 1=1"><![CDATA[AND C_INVOICE.DOCSTATUS <> ?]]></Parameter>
     <Parameter name="nivel1" type="replace" optional="true" after="UNION ALL SELECT to_char(" text="'8'"/>
     <Parameter name="nivel2" type="replace" optional="true" after="AS NIVEL1 , to_char(" text="'9'"/>
     <Parameter name="nivel3" type="replace" optional="true" after="AS NIVEL2 , to_char(" text="'10'"/>
@@ -761,6 +767,7 @@
     <Parameter name="cProjectId" optional="true" after="AND 2=2"><![CDATA[AND C_PROJECT.C_PROJECT_ID = ?]]></Parameter>
     <Parameter name="producttype" optional="true" after="AND 2=2"><![CDATA[AND M_PRODUCT.PRODUCTTYPE = ?]]></Parameter>
     <Parameter name="cDocTypeId" optional="true" type="argument" after="AND 2=2"><![CDATA[AND C_DOCTYPE.C_DOCTYPE_ID IN]]></Parameter>
+    <Parameter name="strvoid" optional="true" after="AND 2=2"><![CDATA[AND C_INVOICE.DOCSTATUS <> ?]]></Parameter>
     <Parameter name="nivel1" type="replace" optional="true" after="UNION ALL SELECT  to_char(" text="'28'"/>
     <Parameter name="nivel2" type="replace" optional="true" after="AS NIVEL1 ,to_char(" text="'29'"/>
     <Parameter name="nivel3" type="replace" optional="true" after="AS NIVEL2 ,to_char(" text="'30'"/>
@@ -785,6 +792,7 @@
     <Parameter name="cProjectId" optional="true" after="AND 4=4"><![CDATA[AND C_PROJECT.C_PROJECT_ID = ?]]></Parameter>
     <Parameter name="producttype" optional="true" after="AND 4=4"><![CDATA[AND M_PRODUCT.PRODUCTTYPE = ?]]></Parameter>
     <Parameter name="cDocTypeId" optional="true" type="argument" after="AND 4=4"><![CDATA[AND C_DOCTYPE.C_DOCTYPE_ID IN]]></Parameter>
+    <Parameter name="strvoid" optional="true" after="AND 4=4"><![CDATA[AND C_INVOICE.DOCSTATUS <> ?]]></Parameter>
     <Parameter name="nivel1" type="replace" optional="true" after="UNION ALL  SELECT  to_char(" text="'39'"/>
     <Parameter name="nivel2" type="replace" optional="true" after="AS NIVEL1  ,to_char(" text="'40'"/>
     <Parameter name="nivel3" type="replace" optional="true" after="AS NIVEL2  ,to_char(" text="'41'"/>
@@ -809,6 +817,7 @@
     <Parameter name="cProjectId" optional="true" after="AND 6=6"><![CDATA[AND C_PROJECT.C_PROJECT_ID = ?]]></Parameter>
     <Parameter name="producttype" optional="true" after="AND 6=6"><![CDATA[AND M_PRODUCT.PRODUCTTYPE = ?]]></Parameter>
     <Parameter name="cDocTypeId" optional="true" type="argument" after="AND 6=6"><![CDATA[AND C_DOCTYPE.C_DOCTYPE_ID IN]]></Parameter>
+    <Parameter name="strvoid" optional="true" after="AND 6=6"><![CDATA[AND C_INVOICE.DOCSTATUS <> ?]]></Parameter>
     <Parameter name="orderby" type="replace" optional="true" after="GROUP BY NIVEL1, NIVEL2, NIVEL3, NIVEL4, NIVEL5, NIVEL6, NIVEL7, NIVEL8, NIVEL9, NIVEL10" text=", 1"/>
   </SqlMethod>
 
@@ -849,6 +858,7 @@
     <Parameter name="cProjectId" optional="true" after="AND 1=1"><![CDATA[AND C_PROJECT.C_PROJECT_ID = ?]]></Parameter>
     <Parameter name="producttype" optional="true" after="AND 1=1"><![CDATA[AND M_PRODUCT.PRODUCTTYPE = ?]]></Parameter>
     <Parameter name="cDocTypeId" optional="true" type="argument" after="AND 1=1"><![CDATA[AND C_DOCTYPE.C_DOCTYPE_ID IN]]></Parameter>
+    <Parameter name="strvoid" optional="true" after="AND 1=1"><![CDATA[AND C_INVOICE.DOCSTATUS <> ?]]></Parameter>
     <Parameter name="dateFrom" optional="true" after="2=2"><![CDATA[AND C_INVOICE.DATEINVOICED >= to_date(?)]]></Parameter>
     <Parameter name="dateTo" optional="true" after="2=2"><![CDATA[AND C_INVOICE.DATEINVOICED < to_date(?)]]></Parameter>
     <Parameter name="dateFromRef" optional="true" after="3=3"><![CDATA[AND C_INVOICE.DATEINVOICED >= to_date(?)]]></Parameter>
@@ -955,6 +965,7 @@
     <Parameter name="cProjectId" optional="true" after="AND 1=1"><![CDATA[AND C_PROJECT.C_PROJECT_ID = ?]]></Parameter>
     <Parameter name="producttype" optional="true" after="AND 1=1"><![CDATA[AND M_PRODUCT.PRODUCTTYPE = ?]]></Parameter>
     <Parameter name="cDocTypeId" optional="true" type="argument" after="AND 1=1"><![CDATA[AND C_DOCTYPE.C_DOCTYPE_ID IN]]></Parameter>
+    <Parameter name="strvoid" optional="true" after="AND 1=1"><![CDATA[AND C_INVOICE.DOCSTATUS <> ?]]></Parameter>
     <Parameter name="orderby" type="replace" optional="true" after="GROUP BY NIVEL1, NIVEL2, NIVEL3, NIVEL4, NIVEL5, NIVEL6, NIVEL7, NIVEL8, NIVEL9, NIVEL10" text=", 1"/>
   </SqlMethod>
 
@@ -995,6 +1006,7 @@
     <Parameter name="cProjectId" optional="true" after="AND 1=1"><![CDATA[AND C_PROJECT.C_PROJECT_ID = ?]]></Parameter>
     <Parameter name="producttype" optional="true" after="AND 1=1"><![CDATA[AND M_PRODUCT.PRODUCTTYPE = ?]]></Parameter>
     <Parameter name="cDocTypeId" optional="true" type="argument" after="AND 1=1"><![CDATA[AND C_DOCTYPE.C_DOCTYPE_ID IN]]></Parameter>
+    <Parameter name="strvoid" optional="true" after="AND 1=1"><![CDATA[AND C_INVOICE.DOCSTATUS <> ?]]></Parameter>
     <Parameter name="dateFrom" optional="true" after="2=2"><![CDATA[AND C_INVOICE.DATEINVOICED >= to_date(?)]]></Parameter>
     <Parameter name="dateTo" optional="true" after="2=2"><![CDATA[AND C_INVOICE.DATEINVOICED < to_date(?)]]></Parameter>
   </SqlMethod>
@@ -1189,5 +1201,6 @@
     <Parameter name="cProjectId" optional="true" after="AND 1=1"><![CDATA[AND C_PROJECT.C_PROJECT_ID = ?]]></Parameter>
     <Parameter name="producttype" optional="true" after="AND 1=1"><![CDATA[AND M_PRODUCT.PRODUCTTYPE = ?]]></Parameter>
     <Parameter name="cDocTypeId" optional="true" type="argument" after="AND 1=1"><![CDATA[AND C_DOCTYPE.C_DOCTYPE_ID IN]]></Parameter>
+    <Parameter name="strvoid" optional="true" after="AND 1=1"><![CDATA[AND C_INVOICE.DOCSTATUS <> ?]]></Parameter>
   </SqlMethod>
 </SqlClass>