Commit 8b0f03e94fe9b42eb650f7529a3dcccc0ad8b1c5
Exists in
master
Merge branch 'master' into 'develop'
Master(mpuebla) See merge request !84
Showing
2 changed files
Show diff stats
package.json
... | ... | @@ -4,6 +4,7 @@ |
4 | 4 | "description": "Listado y ABM nota de remitos", |
5 | 5 | "main": "index.js", |
6 | 6 | "scripts": { |
7 | + "refresh": "gulp uglify && cp tmp/foca-crear-remito.js ../wrapper-demo/node_modules/foca-crear-remito/dist/foca-crear-remito.min.js", | |
7 | 8 | "test": "test.html", |
8 | 9 | "compile": "gulp uglify", |
9 | 10 | "gulp-pre-commit": "gulp pre-commit", |
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 |