Commit 63a10250d34bd5e9ee3a4043b5c0008e7f4b011c
1 parent
dc9232fb85
Exists in
master
Arreglo de busqueda de notas
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
src/js/controller.js
| ... | ... | @@ -124,7 +124,6 @@ angular.module('focaCrearRemito').controller('remitoController', |
| 124 | 124 | //añado cabeceras |
| 125 | 125 | $scope.remitoIsDirty = true; |
| 126 | 126 | $scope.notaPedido = notaPedido; |
| 127 | - $scope.notaPedido.id = notaPedido.id; | |
| 128 | 127 | $scope.cliente = notaPedido.cliente; |
| 129 | 128 | $scope.$broadcast('removeCabecera', 'Bomba:'); |
| 130 | 129 | $scope.$broadcast('removeCabecera', 'Kilometros:'); |
| ... | ... | @@ -228,8 +227,8 @@ angular.module('focaCrearRemito').controller('remitoController', |
| 228 | 227 | cabeceras.push(cabeceraBomba); |
| 229 | 228 | } |
| 230 | 229 | |
| 231 | - $scope.remito = notaPedido; | |
| 232 | - $scope.remito.id = notaPedido.id; | |
| 230 | + $scope.remito = angular.copy(notaPedido); | |
| 231 | + $scope.remito.id = 0; | |
| 233 | 232 | $scope.remito.remitoPlazo = notaPedido.notaPedidoPlazo; |
| 234 | 233 | $scope.remito.remitoPuntoDescarga = notaPedido.notaPedidoPuntoDescarga; |
| 235 | 234 | |
| ... | ... | @@ -473,6 +472,7 @@ angular.module('focaCrearRemito').controller('remitoController', |
| 473 | 472 | } |
| 474 | 473 | ); |
| 475 | 474 | }; |
| 475 | + | |
| 476 | 476 | $scope.seleccionarPuntosDeDescarga = function () { |
| 477 | 477 | if (!$scope.remito.cliente.COD || !$scope.remito.domicilio.id) { |
| 478 | 478 | focaModalService.alert('Primero seleccione un cliente y un domicilio'); |