Commit 0b61458012dc315c73e3497c1b24e717679788b3
1 parent
6d40a0d282
Exists in
master
and in
1 other branch
rellenar al seleccionar nota pedido
Showing
3 changed files
with
11 additions
and
7 deletions
Show diff stats
.jshintrc
src/js/controller.js
... | ... | @@ -275,12 +275,13 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
275 | 275 | }, |
276 | 276 | { |
277 | 277 | label: 'Vendedor:', |
278 | - valor: notaPedido.vendedor.CodVen + ' - ' + | |
279 | - notaPedido.vendedor.NomVen | |
278 | + valor: $filter('rellenarDigitos')(notaPedido.vendedor.CodVen, 3) + | |
279 | + ' - ' + notaPedido.vendedor.NomVen | |
280 | 280 | }, |
281 | 281 | { |
282 | 282 | label: 'Proveedor:', |
283 | - valor: notaPedido.proveedor.NOM | |
283 | + valor: $filter('rellenarDigitos')(notaPedido.proveedor.COD, 5) + | |
284 | + ' - ' + notaPedido.proveedor.NOM | |
284 | 285 | }, |
285 | 286 | { |
286 | 287 | label: 'Precios y condiciones:', |
... | ... | @@ -863,7 +864,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
863 | 864 | |
864 | 865 | puntosDescarga.forEach(function(el) { |
865 | 866 | var puntoDescarga = result.filter(function(resultPunto) { |
866 | - return resultPunto.id == el.idPuntoDescarga; | |
867 | + return resultPunto.id === el.idPuntoDescarga; | |
867 | 868 | }); |
868 | 869 | |
869 | 870 | if(puntoDescarga.length) { |
src/js/service.js
... | ... | @@ -82,13 +82,16 @@ angular.module('focaCrearNotaPedido') |
82 | 82 | image: 'productos.png' |
83 | 83 | } |
84 | 84 | ]; |
85 | + | |
85 | 86 | if(!vendedor) { |
86 | 87 | var botonVendedor = { |
87 | 88 | label: 'Vendedor', |
88 | 89 | image: 'vendedor.png' |
89 | - } | |
90 | - result.unshift(botonVendedor) | |
90 | + }; | |
91 | + | |
92 | + result.unshift(botonVendedor); | |
91 | 93 | } |
94 | + | |
92 | 95 | return result; |
93 | 96 | }, |
94 | 97 | crearPuntosDescarga: function(puntosDescarga) { |