Commit f45cee40d83646e1105402e0247af2e7f1b5dfbe
Exists in
master
and in
1 other branch
Merge branch 'develop' into 'master'
Develop See merge request !102
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; |