Commit e0e6f8fbef4a3dcfd72d205c9c2e316a80f348ba
1 parent
ef65174fec
Exists in
master
fix id lista 0
Showing
1 changed file
with
3 additions
and
2 deletions
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; |