# HG changeset patch
# User Ranjith S R <ranjith@qualiantech.com>
# Date 1549004954 -19800
#      Fri Feb 01 12:39:14 2019 +0530
# Node ID 26f54030d6486fe8661417632edde9957994e2a6
# Parent  849cfdc2820004c2dd5b4dbcb40aa9962fb933bd
Related to issue 40086 : All Fields and Filters should be cleared even it is disabled

diff -r 849cfdc28200 -r 26f54030d648 web/org.openbravo.mobile.core/source/component/dialog/ob-modaladvancedfilters.js
--- a/web/org.openbravo.mobile.core/source/component/dialog/ob-modaladvancedfilters.js	Wed Jan 30 11:28:48 2019 +0100
+++ b/web/org.openbravo.mobile.core/source/component/dialog/ob-modaladvancedfilters.js	Fri Feb 01 12:39:14 2019 +0530
@@ -199,14 +199,15 @@
 
   clearAll: function () {
     _.each(this.filters, function (flt) {
-      if (flt.filter.filter && !flt.owner.$['input' + flt.filter.name].disabled) {
-        if (flt.filter.preset) {
-          flt.owner.$['input' + flt.filter.name].setPresetValue(flt.filter.preset);
+      if (flt.filter.filter) {
+        var inputBox = flt.owner.$['input' + flt.filter.name];
+        if (flt.filter.preset && inputBox.setPresetValue) {
+          inputBox.setPresetValue(flt.filter.preset);
         } else {
-          flt.owner.$['input' + flt.filter.name].setValue('');
+          inputBox.setValue('');
           flt.owner.$['filterEditor' + flt.filter.name].hideRemove();
         }
-        flt.owner.$['input' + flt.filter.name].removeClass('error');
+        inputBox.removeClass('error');
       }
     });
     this.owner.$.dateFormatError.hide();
