Commit 6dcb83cd870a4f2a55d488d8acd03a11379ea37e
Exists in
master
Merge branch 'master' into 'master'
guardo id precio condicion See merge request modulos-npm/foca-crear-nota-pedido!76
Showing
1 changed file
Show diff stats
src/js/controller.js
... | ... | @@ -163,6 +163,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
163 | 163 | idProveedor: $scope.notaPedido.proveedor.codigo, |
164 | 164 | idDomicilio: $scope.notaPedido.domicilio.id, |
165 | 165 | idCotizacion: $scope.notaPedido.cotizacion.ID, |
166 | + idPrecioCondicion: $scope.notaPedido.idPrecioCondicion, | |
166 | 167 | cotizacion: $scope.notaPedido.cotizacion.VENDEDOR, |
167 | 168 | flete: $scope.notaPedido.flete, |
168 | 169 | fob: $scope.notaPedido.fob, |
... | ... | @@ -379,6 +380,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
379 | 380 | var cabecera = ''; |
380 | 381 | var plazosConcat = ''; |
381 | 382 | if(!Array.isArray(precioCondicion)) { |
383 | + $scope.notaPedido.idPrecioCondicion = precioCondicion.id; | |
382 | 384 | $scope.plazosPagos = precioCondicion.plazoPago; |
383 | 385 | $scope.idLista = precioCondicion.idListaPrecio; |
384 | 386 | for(var i = 0; i < precioCondicion.plazoPago.length; i++) { |
... | ... | @@ -386,6 +388,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
386 | 388 | } |
387 | 389 | cabecera = precioCondicion.nombre + ' ' + plazosConcat.trim(); |
388 | 390 | } else { //Cuando se ingresan los plazos manualmente |
391 | + $scope.notaPedido.idPrecioCondicion = 0; | |
389 | 392 | $scope.idLista = -1; //-1, el modal productos busca todos los productos |
390 | 393 | $scope.plazosPagos = precioCondicion; |
391 | 394 | for(var j = 0; j < precioCondicion.length; j++) { |