Commit 93e173ff48e317e8ebc2a8856834467b6294e954
Exists in
master
Merge branch 'master' into 'develop'
Master See merge request !101
Showing
1 changed file
Show diff stats
src/js/controller.js
... | ... | @@ -123,7 +123,6 @@ angular.module('focaCrearRemito').controller('remitoController', |
123 | 123 | function (notaPedido) { |
124 | 124 | //añado cabeceras |
125 | 125 | $scope.remitoIsDirty = true; |
126 | - $scope.notaPedido.id = notaPedido.id; | |
127 | 126 | $scope.notaPedido = notaPedido; |
128 | 127 | $scope.cliente = notaPedido.cliente; |
129 | 128 | $scope.$broadcast('removeCabecera', 'Bomba:'); |
... | ... | @@ -228,8 +227,7 @@ angular.module('focaCrearRemito').controller('remitoController', |
228 | 227 | cabeceras.push(cabeceraBomba); |
229 | 228 | } |
230 | 229 | |
231 | - delete notaPedido.id; | |
232 | - $scope.remito = notaPedido; | |
230 | + $scope.remito = angular.copy(notaPedido); | |
233 | 231 | $scope.remito.id = 0; |
234 | 232 | $scope.remito.remitoPlazo = notaPedido.notaPedidoPlazo; |
235 | 233 | $scope.remito.remitoPuntoDescarga = notaPedido.notaPedidoPuntoDescarga; |
... | ... | @@ -414,6 +412,7 @@ angular.module('focaCrearRemito').controller('remitoController', |
414 | 412 | } |
415 | 413 | ); |
416 | 414 | }; |
415 | + | |
417 | 416 | $scope.seleccionarProductos = function () { |
418 | 417 | if ($scope.idLista === undefined) { |
419 | 418 | focaModalService.alert( |
... | ... | @@ -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'); |
... | ... | @@ -516,6 +516,7 @@ angular.module('focaCrearRemito').controller('remitoController', |
516 | 516 | ); |
517 | 517 | } |
518 | 518 | }; |
519 | + | |
519 | 520 | $scope.seleccionarCliente = function () { |
520 | 521 | if (varlidarRemitoFacturado()) { |
521 | 522 | var modalInstance = $uibModal.open( |