Commit bbe6f8622136ff109b22430680af14c972d1ef93
1 parent
a3f97a9777
Exists in
master
and in
1 other branch
crear nota sin vendedor
Showing
1 changed file
with
30 additions
and
31 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -145,10 +145,10 @@ angular.module('focaCrearNotaPedido').controller('notaPedidoCtrl', |
145 | 145 | focaModalService.alert('Ingrese Cliente'); |
146 | 146 | return; |
147 | 147 | } |
148 | - if (!$scope.notaPedido.vendedor.id) { | |
149 | - focaModalService.alert('Este cliente no tiene vendedor asignado'); | |
150 | - return; | |
151 | - } else if ($scope.notaPedido.idRemito === -1) { | |
148 | + // if (!$scope.notaPedido.vendedor.id) { | |
149 | + // focaModalService.alert('Este cliente no tiene vendedor asignado'); | |
150 | + // return; | |
151 | + if ($scope.notaPedido.idRemito === -1) { | |
152 | 152 | focaBotoneraLateralService.alert('No se puede modificar esta nota de pedido'); |
153 | 153 | return; |
154 | 154 | } else if (!$scope.notaPedido.proveedor.COD) { |
... | ... | @@ -181,7 +181,7 @@ angular.module('focaCrearNotaPedido').controller('notaPedidoCtrl', |
181 | 181 | id: $scope.notaPedido.id, |
182 | 182 | fechaCarga: new Date($scope.notaPedido.fechaCarga) |
183 | 183 | .toISOString().slice(0, 19).replace('T', ' '), |
184 | - idVendedor: $scope.notaPedido.vendedor.id, | |
184 | + // idVendedor: $scope.notaPedido.vendedor.id, | |
185 | 185 | idCliente: $scope.notaPedido.cliente.COD, |
186 | 186 | nombreCliente: $scope.notaPedido.cliente.NOM, |
187 | 187 | cuitCliente: $scope.notaPedido.cliente.CUIT, |
... | ... | @@ -236,8 +236,7 @@ angular.module('focaCrearNotaPedido').controller('notaPedidoCtrl', |
236 | 236 | crearNotaPedidoService.crearPlazosParaNotaPedido(plazosACrear); |
237 | 237 | } |
238 | 238 | |
239 | - notaPedidoBusinessService.addEstado(data.data.id, | |
240 | - $scope.notaPedido.vendedor.id); | |
239 | + notaPedidoBusinessService.addEstado(data.data.id); | |
241 | 240 | |
242 | 241 | focaBotoneraLateralService.endGuardar(true); |
243 | 242 | $scope.saveLoading = false; |
... | ... | @@ -507,7 +506,7 @@ angular.module('focaCrearNotaPedido').controller('notaPedidoCtrl', |
507 | 506 | resolve: { |
508 | 507 | parametros: function () { |
509 | 508 | return { |
510 | - vendedor: $scope.idVendedor, | |
509 | + // vendedor: $scope.idVendedor, | |
511 | 510 | cobrador: null, |
512 | 511 | searchText: $scope.notaPedido.cliente ? |
513 | 512 | $scope.notaPedido.cliente.NOM : '' |
... | ... | @@ -516,7 +515,7 @@ angular.module('focaCrearNotaPedido').controller('notaPedidoCtrl', |
516 | 515 | }, |
517 | 516 | size: 'lg' |
518 | 517 | } |
519 | - ); | |
518 | + ); | |
520 | 519 | modalInstance.result.then( |
521 | 520 | function (cliente) { |
522 | 521 | |
... | ... | @@ -534,15 +533,15 @@ angular.module('focaCrearNotaPedido').controller('notaPedidoCtrl', |
534 | 533 | }); |
535 | 534 | } |
536 | 535 | |
537 | - if (angular.equals({}, cliente.vendedor)) { | |
536 | + // if (angular.equals({}, cliente.vendedor)) { | |
538 | 537 | |
539 | - focaModalService | |
540 | - .alert('El cliente seleccionado no tiene tiene ' + | |
541 | - 'vendedor asignado.') | |
542 | - .then($scope.seleccionarCliente); | |
538 | + // focaModalService | |
539 | + // .alert('El cliente seleccionado no tiene tiene ' + | |
540 | + // 'vendedor asignado.') | |
541 | + // .then($scope.seleccionarCliente); | |
543 | 542 | |
544 | - return; | |
545 | - } | |
543 | + // return; | |
544 | + // } | |
546 | 545 | |
547 | 546 | $scope.abrirModalDomicilios(cliente); |
548 | 547 | }, function () { } |
... | ... | @@ -610,14 +609,14 @@ angular.module('focaCrearNotaPedido').controller('notaPedidoCtrl', |
610 | 609 | |
611 | 610 | $scope.notaPedido.domicilio = domicilio; |
612 | 611 | $scope.notaPedido.cliente = cliente; |
613 | - $scope.notaPedido.vendedor = cliente.vendedor; | |
612 | + // $scope.notaPedido.vendedor = cliente.vendedor; | |
614 | 613 | |
615 | - $scope.$broadcast('addCabecera', { | |
616 | - label: 'Vendedor:', | |
617 | - valor: $filter('rellenarDigitos') | |
618 | - ($scope.notaPedido.vendedor.NUM, 3) + | |
619 | - ' - ' + $scope.notaPedido.vendedor.NOM | |
620 | - }); | |
614 | + // $scope.$broadcast('addCabecera', { | |
615 | + // label: 'Vendedor:', | |
616 | + // valor: $filter('rellenarDigitos') | |
617 | + // ($scope.notaPedido.vendedor.NUM, 3) + | |
618 | + // ' - ' + $scope.notaPedido.vendedor.NOM | |
619 | + // }); | |
621 | 620 | |
622 | 621 | var domicilioStamp = |
623 | 622 | domicilio.Calle + ' ' + domicilio.Numero + ', ' + |
... | ... | @@ -957,7 +956,7 @@ angular.module('focaCrearNotaPedido').controller('notaPedidoCtrl', |
957 | 956 | |
958 | 957 | $scope.cabeceras = []; |
959 | 958 | |
960 | - if (notaPedido.cotizacion.moneda.CODIGO_AFIP !== 'PES') { | |
959 | + if (notaPedido.cotizacion.moneda.codigo !== 'PES') { | |
961 | 960 | $scope.cabeceras.push({ |
962 | 961 | label: 'Moneda:', |
963 | 962 | valor: notaPedido.cotizacion.moneda.DETALLE |
... | ... | @@ -978,13 +977,13 @@ angular.module('focaCrearNotaPedido').controller('notaPedidoCtrl', |
978 | 977 | $filter('filter')($scope.botonera, { label: 'Moneda' })[0].checked = true; |
979 | 978 | } |
980 | 979 | |
981 | - if (notaPedido.vendedor.NUM) { | |
982 | - $scope.cabeceras.push({ | |
983 | - label: 'Vendedor:', | |
984 | - valor: $filter('rellenarDigitos')(notaPedido.vendedor.NUM, 3) + | |
985 | - ' - ' + notaPedido.vendedor.NOM | |
986 | - }); | |
987 | - } | |
980 | + // if (notaPedido.vendedor.NUM) { | |
981 | + // $scope.cabeceras.push({ | |
982 | + // label: 'Vendedor:', | |
983 | + // valor: $filter('rellenarDigitos')(notaPedido.vendedor.NUM, 3) + | |
984 | + // ' - ' + notaPedido.vendedor.NOM | |
985 | + // }); | |
986 | + // } | |
988 | 987 | |
989 | 988 | if (notaPedido.cliente.COD) { |
990 | 989 | $scope.cabeceras.push({ |