Commit de6c18d28d57116610188f768333b8c883b5a25b
Exists in
master
Merge branch 'master' into 'develop'
Master(efernandez) See merge request !101
Showing
1 changed file
Show diff stats
src/js/controller.js
... | ... | @@ -651,12 +651,13 @@ angular.module('focaCrearNotaPedido').controller('notaPedidoCtrl', |
651 | 651 | $scope.notaPedido.notaPedidoPlazo = precioCondicion.plazoPago; |
652 | 652 | $scope.notaPedido.precioCondicion = precioCondicion; |
653 | 653 | $scope.notaPedido.idPrecioCondicion = precioCondicion.listaPrecio.ID; |
654 | - $scope.idLista = precioCondicion.listaPrecio.ID; | |
654 | + $scope.idLista = parseInt(precioCondicion.listaPrecio.ID) ? | |
655 | + parseInt(precioCondicion.listaPrecio.ID) : -1; | |
655 | 656 | for (var i = 0; i < precioCondicion.plazoPago.length; i++) { |
656 | 657 | plazosConcat += precioCondicion.plazoPago[i].dias + ', '; |
657 | 658 | } |
658 | 659 | plazosConcat = plazosConcat.substring(0, plazosConcat.length - 2); |
659 | - cabecera = $filter('rellenarDigitos')(parseInt(precioCondicion.listaPrecio.ID), 4) + | |
660 | + cabecera = $filter('rellenarDigitos')($scope.idLista, 4) + | |
660 | 661 | ' - ' + precioCondicion.listaPrecio.DES + ' ' + plazosConcat.trim(); |
661 | 662 | } else { //Cuando se ingresan los plazos manualmente |
662 | 663 | $scope.notaPedido.idPrecioCondicion = 0; |