Commit 7376fa31dc1e0d4402b3e8ee6a1b589957c14eb8
1 parent
d35a17b532
Exists in
master
and in
1 other branch
Agregado cambio para setear bien en la cabecera los valores de precio y condiciones.
Showing
1 changed file
with
7 additions
and
7 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -681,9 +681,8 @@ angular.module('focaCrearRemito').controller('remitoController', |
681 | 681 | controller: 'focaModalPrecioCondicionController', |
682 | 682 | size: 'lg', |
683 | 683 | resolve: { |
684 | - idListaPrecio: function () { | |
685 | - return $scope.remito.cliente.MOD || null; | |
686 | - } | |
684 | + idListaPrecio: function () { return $scope.remito.cliente.MOD || null; }, | |
685 | + idCliente: function () { return $scope.remito.cliente.COD } | |
687 | 686 | } |
688 | 687 | } |
689 | 688 | ); |
... | ... | @@ -692,14 +691,15 @@ angular.module('focaCrearRemito').controller('remitoController', |
692 | 691 | var cabecera = ''; |
693 | 692 | var plazosConcat = ''; |
694 | 693 | if (!Array.isArray(precioCondicion)) { |
695 | - $scope.remito.idPrecioCondicion = precioCondicion.id; | |
694 | + $scope.remito.idPrecioCondicion = precioCondicion.listaPrecio.ID; | |
696 | 695 | $scope.remito.remitoPlazo = precioCondicion.plazoPago; |
697 | - $scope.idLista = precioCondicion.idListaPrecio; | |
696 | + $scope.idLista = precioCondicion.listaPrecio.ID; | |
698 | 697 | for (var i = 0; i < precioCondicion.plazoPago.length; i++) { |
699 | - plazosConcat += precioCondicion.plazoPago[i].dias + ' '; | |
698 | + plazosConcat += precioCondicion.plazoPago[i].dias + ', '; | |
700 | 699 | } |
700 | + var plazosConcat = plazosConcat.substring(0, plazosConcat.length - 2); | |
701 | 701 | cabecera = $filter('rellenarDigitos')(precioCondicion.id, 4) + |
702 | - ' - ' + precioCondicion.nombre + ' ' + plazosConcat.trim(); | |
702 | + ' - ' + precioCondicion.listaPrecio.DES + ' ' + plazosConcat.trim(); | |
703 | 703 | } else { //Cuando se ingresan los plazos manualmente |
704 | 704 | $scope.remito.idPrecioCondicion = 0; |
705 | 705 | //-1, el modal productos busca todos los productos |