Fixed issue 29641: With lazy filtering, summary functions display wrong value
authorNaroa Iriarte <naroa.iriarte@openbravo.com>
Wed, 20 May 2015 15:32:41 +0200
changeset 26721 f164ac49351b
parent 26720 3c8f772fc1ba
child 26722 0e9b82c56280
Fixed issue 29641: With lazy filtering, summary functions display wrong value

The problem is when a summary function field exists, in this case, it is not taken into account the
fact of having the lazy filtering enabled. So, when a summary function is added to a field using the UI,
the values of that summary function are displayed before clicking the check icon, under the funnel icon,
in the right.
For fix this, a condition that checks if the lazy filtering has been enabled has been added.
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Tue May 19 12:19:13 2015 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Wed May 20 15:32:41 2015 +0200
@@ -487,7 +487,7 @@
 
     // only show summary rows if there are summary functions
     for (i = 0; i < this.getFields().length; i++) {
-      if (this.getFields()[i].summaryFunction) {
+      if (this.getFields()[i].summaryFunction && !this.lazyFiltering) {
         this.showGridSummary = true;
       }
     }