Commit b241d0fb4f1af8d67ffae9993cd8ea93a1e39e72
Exists in
master
and in
1 other branch
Merge branch 'master' into 'master'
Master See merge request !23
Showing
3 changed files
 
Show diff stats
src/js/controller.js
| ... | ... | @@ -62,12 +62,6 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', | 
| 62 | 62 | focaBotoneraLateralService.addCustomButton('Salir', salir); | 
| 63 | 63 | }); | 
| 64 | 64 | |
| 65 | - crearNotaPedidoService.getPrecioCondicion().then( | |
| 66 | - function(res) { | |
| 67 | - $scope.precioCondiciones = res.data; | |
| 68 | - } | |
| 69 | - ); | |
| 70 | - | |
| 71 | 65 | crearNotaPedidoService.getNumeroNotaPedido().then( | 
| 72 | 66 | function(res) { | 
| 73 | 67 | $scope.puntoVenta = rellenar(res.data.sucursal, 4); | 
| ... | ... | @@ -476,9 +470,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', | 
| 476 | 470 | modalInstance.result.then( | 
| 477 | 471 | function(cliente) { | 
| 478 | 472 | $scope.abrirModalDomicilios(cliente); | 
| 479 | - }, function() { | |
| 480 | - | |
| 481 | - } | |
| 473 | + }, function() {} | |
| 482 | 474 | ); | 
| 483 | 475 | } | 
| 484 | 476 | }; | 
| ... | ... | @@ -524,6 +516,11 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', | 
| 524 | 516 | label: 'Domicilio:', | 
| 525 | 517 | valor: domicilioStamp | 
| 526 | 518 | }); | 
| 519 | + crearNotaPedidoService | |
| 520 | + .getPuntosDescargaByClienDom(domicilio.id, cliente.cod) | |
| 521 | + .then(function(res) { | |
| 522 | + if(res.data.length) $scope.seleccionarPuntosDeDescarga(); | |
| 523 | + }); | |
| 527 | 524 | }, function() { | 
| 528 | 525 | $scope.seleccionarCliente(); | 
| 529 | 526 | return; | 
src/js/service.js
| ... | ... | @@ -84,16 +84,16 @@ angular.module('focaCrearNotaPedido') | 
| 84 | 84 | { | 
| 85 | 85 | label: 'Productos', | 
| 86 | 86 | image: 'productos.png' | 
| 87 | - }, | |
| 88 | - { | |
| 89 | - label: 'Puntos de descarga', | |
| 90 | - image: 'puntosDeDescarga.png' | |
| 91 | 87 | } | 
| 92 | 88 | ]; | 
| 93 | 89 | }, | 
| 94 | 90 | crearPuntosDescarga: function(puntosDescarga) { | 
| 95 | 91 | return $http.post(route + '/puntos-descarga/nota-pedido', | 
| 96 | 92 | {puntosDescarga: puntosDescarga}); | 
| 93 | + }, | |
| 94 | + getPuntosDescargaByClienDom: function(idDomicilio, idCliente) { | |
| 95 | + return $http.get(API_ENDPOINT.URL + '/punto-descarga/' + | |
| 96 | + idDomicilio + '/' + idCliente); | |
| 97 | 97 | } | 
| 98 | 98 | }; | 
| 99 | 99 | }]); | 
src/views/nota-pedido.html
| ... | ... | @@ -11,7 +11,7 @@ | 
| 11 | 11 | <div class="col-12 col-md-10 col-lg-10 border border-light rounded"> | 
| 12 | 12 | <div class="row px-5 py-2 botonera-secundaria"> | 
| 13 | 13 | <div class="col-12"> | 
| 14 | - <foca-botonera-facturador botones="botonera" extra="4" class="row"></foca-botonera-facturador> | |
| 14 | + <foca-botonera-facturador botones="botonera" extra="5" class="row"></foca-botonera-facturador> | |
| 15 | 15 | </div> | 
| 16 | 16 | </div> | 
| 17 | 17 | <!-- PC --> |