# HG changeset patch
# User Ranjith S R <ranjith@qualiantech.com>
# Date 1462189277 -19800
#      Mon May 02 17:11:17 2016 +0530
# Node ID 6f536bcdefcd74951c968a3ae1daac2f4ccc19fe
# Parent  6d2ac93bcbc6edac52169530681f4dbfcb1127b0
Related to issue 32822 : Removing Duplicate code in receipt line selection

Receipt line selection event has been added in posterminal editline.js

diff -r 6d2ac93bcbc6 -r 6f536bcdefcd web/org.openbravo.mobile.core/source/component/ob-keypadbasic.js
--- a/web/org.openbravo.mobile.core/source/component/ob-keypadbasic.js	Thu Apr 28 20:15:57 2016 +0200
+++ b/web/org.openbravo.mobile.core/source/component/ob-keypadbasic.js	Mon May 02 17:11:17 2016 +0530
@@ -1,6 +1,6 @@
 /*
  ************************************************************************************
- * Copyright (C) 2012-2015 Openbravo S.L.U.
+ * Copyright (C) 2012-2016 Openbravo S.L.U.
  * Licensed under the Openbravo Commercial License version 1.0
  * You may obtain a copy of the License at http://www.openbravo.com/legal/obcl.html
  * or in the legal folder of this module distribution.
@@ -210,36 +210,7 @@
   permission: null,
   label: null,
   switchButton: function () {
-    var receipt = OB.MobileApp.model.receipt,
-        me = this;
-    if (receipt) {
-      receipt.get('lines').on('selected', function (line) {
-        var i, prod, isServicePresent = false;
-        if (me.owner.selectedModels && me.owner.selectedModels.length > 0) {
-          for (i = 0; i < me.owner.selectedModels.length; i++) {
-            prod = me.owner.selectedModels[i].get('product');
-            if (prod.get('productType') === 'S' && prod.get('isLinkedToProduct')) {
-              isServicePresent = true;
-              break;
-            }
-          }
-          me.waterfall('onDisableButton', {
-            disabled: !me.owner.selectedModelsSameQty || isServicePresent
-          });
-        } else if (line) {
-          var product = line.get('product');
-          if (product && product.get('productType') === 'S' && product.get('isLinkedToProduct')) {
-            me.waterfall('onDisableButton', {
-              disabled: true
-            });
-          } else {
-            me.waterfall('onDisableButton', {
-              disabled: false
-            });
-          }
-        }
-      }, this);
-    }
+
   },
   components: [{
     kind: 'OB.UI.Button',
