Related to issue 30077: applied js beautifier
authorVíctor Martínez Romanos <victor.martinez@openbravo.com>
Fri, 03 Jul 2015 13:33:24 +0200
changeset 27081 317d186e5a31
parent 27080 9d85d9a430b2
child 27082 b815e49be324
Related to issue 30077: applied js beautifier
web/js/checkAvailableCredit.js
--- a/web/js/checkAvailableCredit.js	Thu Jun 11 12:43:23 2015 +0200
+++ b/web/js/checkAvailableCredit.js	Fri Jul 03 13:33:24 2015 +0200
@@ -23,38 +23,36 @@
   var callback, form = view.theForm,
       businessPartnerId = view.parentWindow.view.getContextInfo().C_BPartner_ID,
       currencyId = form.getItem('C_Currency_ID').getValue();
-  
-  callback = function (response, data, request) {    
+
+  callback = function (response, data, request) {
     if (data.availableCredit) {
       view.messageBar.setMessage(isc.OBMessageBar.TYPE_INFO, null, OB.I18N.getLabel('BPCurrencyChange'));
       form.getItem('c_glitem_id').visible = true;
-    }
-    else {
+    } else {
       form.getItem('c_glitem_id').visible = false;
     }
     form.redraw();
   };
 
   OB.RemoteCallManager.call('org.openbravo.common.actionhandler.CheckAvailableCreditActionHandler', {
-	businessPartnerId: businessPartnerId,
-	currencyId: currencyId
-  }, {}, callback);  
+    businessPartnerId: businessPartnerId,
+    currencyId: currencyId
+  }, {}, callback);
 };
 
 OB.CheckAvailableCredit.onProcess = function (view, actionHandlerCall, clientSideValidationFail) {
-  var form = view.theForm,                    
+  var form = view.theForm,
       currencyFromId = view.parentWindow.view.getContextInfo().inpbpCurrencyId,
       currencyToId = form.getItem('C_Currency_ID').getValue(),
       glItemId = form.getItem('c_glitem_id').getValue(),
       setAmount = form.getItem("Amount").getValue(),
       currentBalance = view.parentWindow.view.getContextInfo().inpsoCreditused,
       foreignAmount = form.getItem('Foreign_Amount').getValue();
-      
+
   if (currencyFromId !== currencyToId && glItemId && setAmount === true && currentBalance === 0 && foreignAmount !== 0) {
-	view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('BPCurrencyChangeRate'));
+    view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('BPCurrencyChangeRate'));
     return clientSideValidationFail();
-  }
-  else {
+  } else {
     actionHandlerCall();
   }
 };
\ No newline at end of file