Sfoglia il codice sorgente

[FIX] Indentación de codigo widget cobros realizado en el dia

adrielso 7 anni fa
parent
commit
d8dfd5460f
1 ha cambiato i file con 22 aggiunte e 17 eliminazioni
  1. 22 17
      static/src/js/widgets/voucher_today_counters.js

+ 22 - 17
static/src/js/widgets/voucher_today_counters.js

@@ -1,7 +1,7 @@
 function voucher_today_counters (widget) {
     "use strict";
 
-    var model= openerp;
+    var model = openerp;
 
     widget.VoucherTodayCountersWidget = widget.Base.extend({
         template: 'VoucherTodayCounters',
@@ -16,7 +16,7 @@ function voucher_today_counters (widget) {
 
         init: function (parent) {
             this._super(parent, {
-                width : 3,
+                width: 3,
                 height: 2
             });
         },
@@ -44,7 +44,7 @@ function voucher_today_counters (widget) {
             }).then(function (resCompany) {
                 self.resCompany = resCompany;
                 return self.fetchResCurrecy();
-            }).then(function(resCurrecy){
+            }).then(function(resCurrecy) {
                 self.resCurrecy = resCurrecy;
                 return self.fetchVoucherCurrency();
             });
@@ -68,8 +68,8 @@ function voucher_today_counters (widget) {
         fetchResCompany: function () {
             var self = this;
             var defer = $.Deferred();
-            var fields =['id','name', 'currency_id','logo'];
-            var domain =[['id', '=', 1]];
+            var fields = ['id','name', 'currency_id','logo'];
+            var domain = [['id', '=', 1]];
             var resCompany = new model.web.Model('res.company');
 
             resCompany.query(fields).filter(domain).all().then(function (results) {
@@ -79,14 +79,14 @@ function voucher_today_counters (widget) {
             return defer;
         },
         // Res currecy
-        fetchResCurrecy : function(){
+        fetchResCurrecy : function() {
             var self = this;
             var defer = $.Deferred();
-            var fields =['id','name', 'symbol', 'rate_silent', 'base', 'decimal_separator', 'decimal_places', 'thousands_separator', 'symbol_position'];
-            var domain =[['active','=', true]];
+            var fields = ['id','name', 'symbol', 'rate_silent', 'base', 'decimal_separator', 'decimal_places', 'thousands_separator', 'symbol_position'];
+            var domain = [['active','=', true]];
             var resCurrecy = new model.web.Model('res.currency');
 
-            resCurrecy.query(fields).filter(domain).all().then(function(results){
+            resCurrecy.query(fields).filter(domain).all().then(function(results) {
                 defer.resolve(results);
             });
 
@@ -106,14 +106,14 @@ function voucher_today_counters (widget) {
                 itemVoucher = self.accountVoucher[i];
 
                 currencyVoucher = self.getCutrrency(itemVoucher.payment_rate_currency_id[0]).shift();
-                if(!currencyVoucher){
+                if(!currencyVoucher) {
                     currencyVoucher = {};
                     currencyVoucher.rate_silent = currencyBase.rate_silent;
                 }
 
                 newVoucher.push({
-                    amount : itemVoucher.amount,
-                    amount_rate : (itemVoucher.amount * (currencyBase.rate_silent / currencyVoucher.rate_silent))
+                    amount: itemVoucher.amount,
+                    amount_rate: (itemVoucher.amount * (currencyBase.rate_silent / currencyVoucher.rate_silent))
                 });
             }
 
@@ -139,24 +139,29 @@ function voucher_today_counters (widget) {
         // modal
         showCustomers: function (e) {
             var self = this;
-            if (self.accountVoucher.length === 0){
+            if (self.accountVoucher.length === 0) {
                 model.web.notification.do_warn("Atención","Sin datos");
                 return
             }
 
-
-
             var hoy =moment().format('YYYY-MM-DD');
 
             this.do_action({
-                name:"Listado de cobros realizado en el día",
+                name: "Listado de cobros realizado en el día",
                 type: 'ir.actions.act_window',
                 res_model: "account.voucher",
                 views: [[false, 'list'],[false,'form']],
                 target: 'new',
                 domain: [['state', '=', 'posted'], ['type', '=', 'receipt'], ['date', '=', hoy]],
                 context: {},
-                flags: {'form': {'action_buttons': false, 'options': {'mode': 'view'}}},
+                flags: {
+                    'form': {
+                        'action_buttons': false,
+                        'options': {
+                            'mode': 'view'
+                        }
+                    }
+                },
             });
         }
     });