diff --git a/.jshintrc b/.jshintrc index d8cbb07..2dfccda 100644 --- a/.jshintrc +++ b/.jshintrc @@ -23,7 +23,7 @@ // Force all variable names to use either camelCase style or UPPER_CASE // with underscores. - "camelcase": true, + "camelcase": false, // Prohibit use of == and != in favor of === and !==. "eqeqeq": true, diff --git a/src/js/controller.js b/src/js/controller.js index 9212d0e..0979abf 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -275,12 +275,13 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', }, { label: 'Vendedor:', - valor: notaPedido.vendedor.CodVen + ' - ' + - notaPedido.vendedor.NomVen + valor: $filter('rellenarDigitos')(notaPedido.vendedor.CodVen, 3) + + ' - ' + notaPedido.vendedor.NomVen }, { label: 'Proveedor:', - valor: notaPedido.proveedor.NOM + valor: $filter('rellenarDigitos')(notaPedido.proveedor.COD, 5) + + ' - ' + notaPedido.proveedor.NOM }, { label: 'Precios y condiciones:', @@ -863,7 +864,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', puntosDescarga.forEach(function(el) { var puntoDescarga = result.filter(function(resultPunto) { - return resultPunto.id == el.idPuntoDescarga; + return resultPunto.id === el.idPuntoDescarga; }); if(puntoDescarga.length) { diff --git a/src/js/service.js b/src/js/service.js index 570284c..15fd571 100644 --- a/src/js/service.js +++ b/src/js/service.js @@ -82,13 +82,16 @@ angular.module('focaCrearNotaPedido') image: 'productos.png' } ]; + if(!vendedor) { var botonVendedor = { label: 'Vendedor', image: 'vendedor.png' - } - result.unshift(botonVendedor) + }; + + result.unshift(botonVendedor); } + return result; }, crearPuntosDescarga: function(puntosDescarga) {