Commit 4904564f7cdc495796542753b39531b49704fe23
Exists in
master
and in
1 other branch
Merge branch 'master' into 'develop'
Master See merge request !5
Showing
4 changed files
Show diff stats
src/js/controller.js
| ... | ... | @@ -8,12 +8,17 @@ angular.module('focaAbmCliente') |
| 8 | 8 | NOM: undefined, |
| 9 | 9 | COD: undefined |
| 10 | 10 | }; |
| 11 | - $scope.vendedor = {}; | |
| 12 | - | |
| 13 | - $scope.botonCliente = [{ | |
| 14 | - label: 'Cliente', | |
| 15 | - image: 'cliente.png' | |
| 16 | - }]; | |
| 11 | + | |
| 12 | + $scope.botonCliente = [ | |
| 13 | + { | |
| 14 | + label: 'Cliente', | |
| 15 | + image: 'cliente.png' | |
| 16 | + }, | |
| 17 | + { | |
| 18 | + label: 'Nuevo Cliente', | |
| 19 | + image: 'nuevoCliente.png' | |
| 20 | + } | |
| 21 | + ]; | |
| 17 | 22 | |
| 18 | 23 | $scope.botonera = [ |
| 19 | 24 | { |
| ... | ... | @@ -43,6 +48,7 @@ angular.module('focaAbmCliente') |
| 43 | 48 | }); |
| 44 | 49 | |
| 45 | 50 | $scope.seleccionarCliente = function() { |
| 51 | + $scope.$broadcast('cleanCabecera'); | |
| 46 | 52 | var datos = null; |
| 47 | 53 | focaAbmClienteService.getAllClientes() |
| 48 | 54 | .then(function (res) { |
| ... | ... | @@ -80,6 +86,36 @@ angular.module('focaAbmCliente') |
| 80 | 86 | }); |
| 81 | 87 | }; |
| 82 | 88 | |
| 89 | + $scope.seleccionarNuevoCliente = function () { | |
| 90 | + if ($scope.cliente.NOM !== undefined && $scope.cliente.COD !== undefined) { | |
| 91 | + $scope.$broadcast('cleanCabecera'); | |
| 92 | + $scope.cliente= {}; | |
| 93 | + } | |
| 94 | + var modalInstanceCliente = $uibModal.open( | |
| 95 | + { | |
| 96 | + ariaLabelledBy: '', | |
| 97 | + templateUrl: 'foca-modal-nuevo-cliente.html', | |
| 98 | + controller: 'focaModalClienteController', | |
| 99 | + resolve: { | |
| 100 | + idCliente: function () { return null; }, | |
| 101 | + }, | |
| 102 | + size: 'lg', | |
| 103 | + } | |
| 104 | + ); | |
| 105 | + modalInstanceCliente.result | |
| 106 | + .then( function(data) { | |
| 107 | + if (data) { | |
| 108 | + $scope.cliente.NOM = data.NOM; | |
| 109 | + $scope.cliente.COD = data.COD; | |
| 110 | + $scope.$broadcast('cleanCabecera'); | |
| 111 | + $scope.$broadcast('addCabecera', { | |
| 112 | + label: 'Cliente:', | |
| 113 | + valor: $filter('rellenarDigitos')($scope.cliente.NOM) | |
| 114 | + }); | |
| 115 | + } | |
| 116 | + }); | |
| 117 | + }; | |
| 118 | + | |
| 83 | 119 | $scope.seleccionarDatosCliente = function () { |
| 84 | 120 | if ($scope.cliente.NOM === undefined || $scope.cliente.COD === undefined) { |
| 85 | 121 | focaModalService.alert('Seleccione cliente'); |
src/js/controllerCliente.js
| ... | ... | @@ -4,59 +4,88 @@ angular.module('focaAbmCliente') |
| 4 | 4 | 'focaAbmClienteService', 'idCliente', |
| 5 | 5 | function ($scope, $timeout, $uibModalInstance, focaModalService, |
| 6 | 6 | focaAbmClienteService, idCliente) { |
| 7 | - $scope.cliente = { | |
| 8 | - provincia: {}, | |
| 9 | - localidad: {}, | |
| 10 | - zona: {}, | |
| 11 | - actividad: {}, | |
| 12 | - cobrador: {}, | |
| 13 | - vendedor: {}, | |
| 14 | - iva: {}, | |
| 15 | - tipoFactura: {}, | |
| 16 | - tipoComprobante: {}, | |
| 17 | - formaPago: {} | |
| 7 | + | |
| 8 | + $scope.clienteTemplate = { | |
| 9 | + COD: 0, | |
| 10 | + ES_MAY: true, | |
| 11 | + cuit1: '', | |
| 12 | + cuit2: '', | |
| 13 | + cuit3: '', | |
| 14 | + provincia: { | |
| 15 | + NOMBRE: '' | |
| 16 | + }, | |
| 17 | + localidad: { | |
| 18 | + NOMBRE: '' | |
| 19 | + }, | |
| 20 | + iva: { | |
| 21 | + NOMBRE: '' | |
| 22 | + }, | |
| 23 | + actividad: { | |
| 24 | + NOM: '' | |
| 25 | + }, | |
| 26 | + zona: { | |
| 27 | + NOM: '' | |
| 28 | + }, | |
| 29 | + tipoFactura: { | |
| 30 | + NOMBRE: '' | |
| 31 | + }, | |
| 32 | + tipoComprobante: { | |
| 33 | + NOMBRE: '' | |
| 34 | + }, | |
| 35 | + formaPago: { | |
| 36 | + NOMBRE: '' | |
| 37 | + }, | |
| 38 | + cobrador: { | |
| 39 | + NOM: '' | |
| 40 | + } | |
| 18 | 41 | }; |
| 42 | + | |
| 43 | + $scope.cliente = angular.copy($scope.clienteTemplate); | |
| 44 | + $scope.vendedor = {}; | |
| 45 | + | |
| 19 | 46 | $scope.regexCuit = new RegExp(/\b(20|23|24|27|30|33|34)(\D)?[0-9]{8}(\D)?[0-9]/); |
| 20 | 47 | $scope.vendedor = {}; |
| 21 | 48 | |
| 22 | - focaAbmClienteService.obtenerClientePorCodigo(idCliente) | |
| 23 | - .then(function (res) { | |
| 24 | - var data = res.data[0]; | |
| 25 | - $scope.cliente.codigo = data.COD; | |
| 26 | - $scope.cliente.DOM = data.DOM; | |
| 27 | - $scope.cliente.NOM = data.NOM; | |
| 28 | - $scope.cliente.CPO = data.CPO; | |
| 29 | - $scope.cliente.provincia.ID = data.PCX; | |
| 30 | - $scope.cliente.provincia.NOMBRE = data.PCI; | |
| 31 | - $scope.cliente.localidad.ID = data.LOX; | |
| 32 | - $scope.cliente.localidad.NOMBRE = data.LOC; | |
| 33 | - $scope.cliente.zona.ID = data.zona.ID; | |
| 34 | - $scope.cliente.zona.NOM = data.zona.NOM; | |
| 35 | - $scope.cliente.actividad.NOM = data.actividad.NOM; | |
| 36 | - $scope.cliente.actividad.ID = data.actividad.ID; | |
| 37 | - $scope.cliente.cobrador.NOM = data.cobrador ? data.cobrador.NOM : ''; | |
| 38 | - $scope.cliente.cobrador.NUM = data.cobrador ? data.cobrador.NUM : undefined; | |
| 39 | - $scope.cliente.cobrador.ID = data.cobrador ? data.cobrador.id : undefined; | |
| 40 | - $scope.vendedor.NOM = data.vendedor.NOM; | |
| 41 | - $scope.vendedor.id = data.vendedor.id; | |
| 42 | - $scope.cliente.MAIL = data.MAIL; | |
| 43 | - $scope.cliente.TEL = data.TEL; | |
| 44 | - $scope.cliente.iva.NOMBRE = data.iva.NOMBRE; | |
| 45 | - $scope.cliente.tipoFactura.NOMBRE = data.tipoFactura.NOMBRE; | |
| 46 | - $scope.cliente.tipoFactura.ID = data.tipoFactura.ID; | |
| 47 | - var cuit = data.CUIT.split('-'); | |
| 48 | - $scope.cliente.cuit1 = cuit[0]; | |
| 49 | - $scope.cliente.cuit2 = cuit[1]; | |
| 50 | - $scope.cliente.cuit3 = cuit[2]; | |
| 51 | - $scope.cliente.tipoComprobante.NOMBRE = data.tipoComprobante.NOMBRE; | |
| 52 | - $scope.cliente.tipoComprobante.ID = data.tipoComprobante.ID; | |
| 53 | - $scope.cliente.formaPago.NOMBRE = data.formaPago.NOMBRE; | |
| 54 | - $scope.cliente.formaPago.ID = data.formaPago.ID; | |
| 55 | - $scope.cliente.ES_PROS = data.ES_PROS; | |
| 56 | - $scope.cliente.ES_MAY = data.ES_MAY; | |
| 57 | - $scope.editando = true; | |
| 58 | - }) | |
| 59 | - .catch(function (e) { console.log(e); }); | |
| 49 | + if (idCliente) { | |
| 50 | + focaAbmClienteService.obtenerClientePorCodigo(idCliente) | |
| 51 | + .then(function (res) { | |
| 52 | + var data = res.data[0]; | |
| 53 | + $scope.cliente.COD = data.COD; | |
| 54 | + $scope.cliente.DOM = data.DOM; | |
| 55 | + $scope.cliente.NOM = data.NOM; | |
| 56 | + $scope.cliente.CPO = data.CPO; | |
| 57 | + $scope.cliente.provincia.ID = data.PCX; | |
| 58 | + $scope.cliente.provincia.NOMBRE = data.PCI; | |
| 59 | + $scope.cliente.localidad.ID = data.LOX; | |
| 60 | + $scope.cliente.localidad.NOMBRE = data.LOC; | |
| 61 | + $scope.cliente.zona.ID = data.zona.ID; | |
| 62 | + $scope.cliente.zona.NOM = data.zona.NOM; | |
| 63 | + $scope.cliente.actividad.NOM = data.actividad.NOM; | |
| 64 | + $scope.cliente.actividad.ID = data.actividad.ID; | |
| 65 | + $scope.cliente.cobrador.NOM = data.cobrador ? data.cobrador.NOM : ''; | |
| 66 | + $scope.cliente.cobrador.NUM = data.cobrador ? data.cobrador.NUM : undefined; | |
| 67 | + $scope.cliente.cobrador.ID = data.cobrador ? data.cobrador.id : undefined; | |
| 68 | + $scope.vendedor.NOM = data.vendedor.NOM; | |
| 69 | + $scope.vendedor.id = data.vendedor.id; | |
| 70 | + $scope.cliente.MAIL = data.MAIL; | |
| 71 | + $scope.cliente.TEL = data.TEL; | |
| 72 | + $scope.cliente.iva.NOMBRE = data.iva.NOMBRE; | |
| 73 | + $scope.cliente.tipoFactura.NOMBRE = data.tipoFactura.NOMBRE; | |
| 74 | + $scope.cliente.tipoFactura.ID = data.tipoFactura.ID; | |
| 75 | + var cuit = data.CUIT.split('-'); | |
| 76 | + $scope.cliente.cuit1 = cuit[0]; | |
| 77 | + $scope.cliente.cuit2 = cuit[1]; | |
| 78 | + $scope.cliente.cuit3 = cuit[2]; | |
| 79 | + $scope.cliente.tipoComprobante.NOMBRE = data.tipoComprobante.NOMBRE; | |
| 80 | + $scope.cliente.tipoComprobante.ID = data.tipoComprobante.ID; | |
| 81 | + $scope.cliente.formaPago.NOMBRE = data.formaPago.NOMBRE; | |
| 82 | + $scope.cliente.formaPago.ID = data.formaPago.ID; | |
| 83 | + $scope.cliente.ES_PROS = data.ES_PROS; | |
| 84 | + $scope.cliente.ES_MAY = data.ES_MAY; | |
| 85 | + $scope.editando = true; | |
| 86 | + }) | |
| 87 | + .catch(function (e) { console.log(e); }); | |
| 88 | + } | |
| 60 | 89 | |
| 61 | 90 | $scope.cancel = function () { |
| 62 | 91 | $uibModalInstance.dismiss('cancel'); |
| ... | ... | @@ -122,7 +151,8 @@ angular.module('focaAbmCliente') |
| 122 | 151 | var cliente = crearCopia(); |
| 123 | 152 | focaAbmClienteService |
| 124 | 153 | .guardarCliente(cliente) |
| 125 | - .then(function () { | |
| 154 | + .then(function (data) { | |
| 155 | + cliente.COD = data.data.COD; | |
| 126 | 156 | $uibModalInstance.close(cliente); |
| 127 | 157 | }) |
| 128 | 158 | .catch(function (e) { |
| ... | ... | @@ -476,7 +506,7 @@ angular.module('focaAbmCliente') |
| 476 | 506 | |
| 477 | 507 | function crearCopia() { |
| 478 | 508 | var cliente = angular.copy($scope.cliente); |
| 479 | - cliente.COD = cliente.codigo; | |
| 509 | + cliente.COD = cliente.COD; | |
| 480 | 510 | cliente.CPO = cliente.CPO; |
| 481 | 511 | cliente.PCX = parseInt(cliente.provincia.ID); |
| 482 | 512 | cliente.LOX = parseInt(cliente.localidad.ID); |
src/views/foca-modal-cliente.html
src/views/foca-modal-nuevo-cliente.html
| ... | ... | @@ -0,0 +1,515 @@ |
| 1 | +<div class="modal-header py-1"> | |
| 2 | + <div class="row w-100"> | |
| 3 | + <div class="col-lg-4 col-7"> | |
| 4 | + <h5 class="modal-title my-1">Crear Cliente</h5> | |
| 5 | + </div> | |
| 6 | + <div class="col-lg-3 col-5 front-index"> | |
| 7 | + <div class="custom-control custom-checkbox mt-2"> | |
| 8 | + <input | |
| 9 | + type="checkbox" | |
| 10 | + class="custom-control-input" | |
| 11 | + id="checkProspecto" | |
| 12 | + ng-model="cliente.ES_PROS"> | |
| 13 | + <label class="custom-control-label" for="checkProspecto">ยฟEs prospecto?</label> | |
| 14 | + </div> | |
| 15 | + </div> | |
| 16 | + </div> | |
| 17 | +</div> | |
| 18 | +<div class="modal-body" id="modal-body"> | |
| 19 | + <form name="formCliente"> | |
| 20 | + <fieldset> | |
| 21 | + <uib-tabset class="tabs-right"> | |
| 22 | + <uib-tab heading="Datos cliente"> | |
| 23 | + <div class="row"> | |
| 24 | + <div class="col-3 mt-2"> | |
| 25 | + <label>Cรณdigo</label> | |
| 26 | + <input | |
| 27 | + type="text" | |
| 28 | + class="form-control form-control-sm" | |
| 29 | + ng-model="cliente.COD" | |
| 30 | + readonly | |
| 31 | + /> | |
| 32 | + </div> | |
| 33 | + <div class="col-9 mt-2"> | |
| 34 | + <label>Nombre</label> | |
| 35 | + <input | |
| 36 | + type="text" | |
| 37 | + class="form-control form-control-sm" | |
| 38 | + ng-model="cliente.NOM" | |
| 39 | + teclado-virtual | |
| 40 | + placeholder="Ingrese nombre" | |
| 41 | + ng-required="true" | |
| 42 | + foca-focus="focused == 1" | |
| 43 | + ng-focus="focus(1)" | |
| 44 | + ng-keypress="next($event.keyCode)" | |
| 45 | + /> | |
| 46 | + </div> | |
| 47 | + </div> | |
| 48 | + <div class="row"> | |
| 49 | + <div class="col-md-9 col-12 mt-2"> | |
| 50 | + <label>Domicilio</label> | |
| 51 | + <input | |
| 52 | + type="text" | |
| 53 | + class="form-control form-control-sm" | |
| 54 | + ng-model="cliente.DOM" | |
| 55 | + teclado-virtual | |
| 56 | + placeholder="Ingrese domicilio" | |
| 57 | + ng-required="true" | |
| 58 | + ng-focus="focus(2)" | |
| 59 | + foca-focus="focused == 2" | |
| 60 | + ng-keypress="next($event.keyCode)" | |
| 61 | + /> | |
| 62 | + </div> | |
| 63 | + <div class="col-md-3 col-12 mt-2"> | |
| 64 | + <label>Cรณdigo postal</label> | |
| 65 | + <input | |
| 66 | + type="text" | |
| 67 | + class="form-control form-control-sm" | |
| 68 | + ng-model="cliente.CPO" | |
| 69 | + placeholder="Ingrese CP" | |
| 70 | + ng-required="true" | |
| 71 | + ng-focus="focus(3)" | |
| 72 | + foca-focus="focused == 3" | |
| 73 | + ng-keypress="next($event.keyCode)" | |
| 74 | + teclado-virtual | |
| 75 | + /> | |
| 76 | + </div> | |
| 77 | + </div> | |
| 78 | + <div class="row"> | |
| 79 | + <div class="col-md-6 col-12 mt-2"> | |
| 80 | + <label>Provincia</label> | |
| 81 | + <div class="input-group"> | |
| 82 | + <input | |
| 83 | + type="text" | |
| 84 | + class="form-control form-control-sm" | |
| 85 | + ng-model="cliente.provincia.NOMBRE" | |
| 86 | + ng-keypress="seleccionarProvincia($event.keyCode)" | |
| 87 | + placeholder="Seleccione provincia" | |
| 88 | + ng-required="true" | |
| 89 | + ng-focus="focus(4)" | |
| 90 | + foca-focus="focused == 4" | |
| 91 | + teclado-virtual | |
| 92 | + /> | |
| 93 | + <button | |
| 94 | + ng-show="cliente.provincia.NOMBRE !== ''" | |
| 95 | + type="button" | |
| 96 | + class="clear-input" | |
| 97 | + ng-click= | |
| 98 | + "cliente.provincia.NOMBRE = ''; | |
| 99 | + cliente.provincia.ID = undefined" | |
| 100 | + ><i class="fa fa-times"></i> | |
| 101 | + </button> | |
| 102 | + <div class="input-group-append"> | |
| 103 | + <button | |
| 104 | + ladda="searchLoading" | |
| 105 | + class="btn btn-outline-secondary" | |
| 106 | + type="button" | |
| 107 | + ng-click="seleccionarProvincia(13)" | |
| 108 | + ><i class="fa fa-search" aria-hidden="true"></i> | |
| 109 | + </button> | |
| 110 | + </div> | |
| 111 | + </div> | |
| 112 | + </div> | |
| 113 | + <div class="col-md-6 col-12 mt-2"> | |
| 114 | + <label>Localidad</label> | |
| 115 | + <div class="input-group"> | |
| 116 | + <input | |
| 117 | + type="text" | |
| 118 | + class="form-control form-control-sm" | |
| 119 | + ng-model="cliente.localidad.NOMBRE" | |
| 120 | + ng-keypress="seleccionarLocalidad($event.keyCode)" | |
| 121 | + placeholder="Seleccione localidad" | |
| 122 | + ng-required="true" | |
| 123 | + foca-focus="focused == 5" | |
| 124 | + ng-focus="focus(5)" | |
| 125 | + teclado-virtual | |
| 126 | + /> | |
| 127 | + <button | |
| 128 | + ng-show="cliente.localidad.NOMBRE !== ''" | |
| 129 | + type="button" | |
| 130 | + class="clear-input" | |
| 131 | + ng-click="cliente.localidad.NOMBRE = ''" | |
| 132 | + ><i class="fa fa-times"></i> | |
| 133 | + </button> | |
| 134 | + <div class="input-group-append"> | |
| 135 | + <button | |
| 136 | + ladda="searchLoading" | |
| 137 | + class="btn btn-outline-secondary" | |
| 138 | + type="button" | |
| 139 | + ng-click="seleccionarLocalidad(13)" | |
| 140 | + ><i class="fa fa-search" aria-hidden="true"></i> | |
| 141 | + </button> | |
| 142 | + </div> | |
| 143 | + </div> | |
| 144 | + </div> | |
| 145 | + </div> | |
| 146 | + <div class="row"> | |
| 147 | + <div class="col-md-6 col-12 mt-2"> | |
| 148 | + <label>Zona</label> | |
| 149 | + <div class="input-group"> | |
| 150 | + <input | |
| 151 | + type="text" | |
| 152 | + class="form-control form-control-sm" | |
| 153 | + ng-model="cliente.zona.NOM" | |
| 154 | + ng-keypress="seleccionarZona($event.keyCode)" | |
| 155 | + placeholder="Seleccione zona" | |
| 156 | + ng-required="true" | |
| 157 | + ng-focus="focus(6)" | |
| 158 | + foca-focus="focused == 6" | |
| 159 | + teclado-virtual | |
| 160 | + /> | |
| 161 | + <button | |
| 162 | + ng-show="cliente.zona.NOM !== ''" | |
| 163 | + type="button" | |
| 164 | + class="clear-input" | |
| 165 | + ng-click="cliente.zona.NOM = ''" | |
| 166 | + ><i class="fa fa-times"></i> | |
| 167 | + </button> | |
| 168 | + <div class="input-group-append"> | |
| 169 | + <button | |
| 170 | + ladda="searchLoading" | |
| 171 | + class="btn btn-outline-secondary" | |
| 172 | + type="button" | |
| 173 | + ng-click="seleccionarZona(13)" | |
| 174 | + ><i class="fa fa-search" aria-hidden="true"></i> | |
| 175 | + </button> | |
| 176 | + </div> | |
| 177 | + </div> | |
| 178 | + </div> | |
| 179 | + <div class="col-md-6 col-12 mt-2"> | |
| 180 | + <label> Actividad </label> | |
| 181 | + <div class="input-group"> | |
| 182 | + <input | |
| 183 | + type="text" | |
| 184 | + class="form-control form-control-sm" | |
| 185 | + ng-model="cliente.actividad.NOM" | |
| 186 | + ng-keypress="seleccionarActividad($event.keyCode)" | |
| 187 | + placeholder="Seleccione actividad" | |
| 188 | + ng-required="true" | |
| 189 | + ng-focus="focus(7)" | |
| 190 | + foca-focus="focused == 7" | |
| 191 | + teclado-virtual | |
| 192 | + /> | |
| 193 | + <button | |
| 194 | + ng-show="cliente.actividad.NOM !== ''" | |
| 195 | + type="button" | |
| 196 | + class="clear-input" | |
| 197 | + ng-click="cliente.actividad.NOM = ''" | |
| 198 | + ><i class="fa fa-times"></i> | |
| 199 | + </button> | |
| 200 | + <div class="input-group-append"> | |
| 201 | + <button | |
| 202 | + ladda="searchLoading" | |
| 203 | + class="btn btn-outline-secondary" | |
| 204 | + type="button" | |
| 205 | + ng-click="seleccionarActividad(13)" | |
| 206 | + ><i class="fa fa-search" aria-hidden="true"></i> | |
| 207 | + </button> | |
| 208 | + </div> | |
| 209 | + </div> | |
| 210 | + </div> | |
| 211 | + </div> | |
| 212 | + <div class="row"> | |
| 213 | + <div class="col-md-6 col-12 mt-2"> | |
| 214 | + <label>Cobrador</label> | |
| 215 | + <div class="input-group"> | |
| 216 | + <input | |
| 217 | + type="text" | |
| 218 | + class="form-control form-control-sm" | |
| 219 | + ng-model="cliente.cobrador.NOM" | |
| 220 | + ng-keypress="seleccionarCobrador($event.keyCode)" | |
| 221 | + placeholder="Seleccione cobrador" | |
| 222 | + ng-focus="focus(8)" | |
| 223 | + foca-focus="focused == 8" | |
| 224 | + teclado-virtual | |
| 225 | + /> | |
| 226 | + <button | |
| 227 | + ng-show="cliente.cobrador.NOM !== ''" | |
| 228 | + type="button" | |
| 229 | + class="clear-input" | |
| 230 | + ng-click="cliente.cobrador.NOM = ''" | |
| 231 | + ><i class="fa fa-times"></i> | |
| 232 | + </button> | |
| 233 | + <div class="input-group-append"> | |
| 234 | + <button | |
| 235 | + ladda="searchLoading" | |
| 236 | + class="btn btn-outline-secondary" | |
| 237 | + type="button" | |
| 238 | + ng-click="seleccionarCobrador(13)" | |
| 239 | + ><i class="fa fa-search" aria-hidden="true"></i> | |
| 240 | + </button> | |
| 241 | + </div> | |
| 242 | + </div> | |
| 243 | + </div> | |
| 244 | + <div class="col-md-6 col-12 mt-2"> | |
| 245 | + <label>Vendedor</label> | |
| 246 | + <div class="input-group"> | |
| 247 | + <input | |
| 248 | + type="text" | |
| 249 | + class="form-control form-control-sm" | |
| 250 | + ng-model="vendedor.NOM" | |
| 251 | + ng-keypress="seleccionarVendedor($event.keyCode)" | |
| 252 | + placeholder="Seleccione vendedor" | |
| 253 | + ng-focus="focus(9)" | |
| 254 | + foca-focus="focused == 9" | |
| 255 | + teclado-virtual | |
| 256 | + /> | |
| 257 | + <button | |
| 258 | + ng-show="vendedor.NOM !== ''" | |
| 259 | + type="button" | |
| 260 | + class="clear-input" | |
| 261 | + ng-click="vendedor.NOM = ''" | |
| 262 | + ><i class="fa fa-times"></i> | |
| 263 | + </button> | |
| 264 | + <div class="input-group-append"> | |
| 265 | + <button | |
| 266 | + ladda="searchLoading" | |
| 267 | + class="btn btn-outline-secondary" | |
| 268 | + type="button" | |
| 269 | + ng-click="seleccionarVendedor(13)" | |
| 270 | + ><i class="fa fa-search" aria-hidden="true"></i> | |
| 271 | + </button> | |
| 272 | + </div> | |
| 273 | + </div> | |
| 274 | + </div> | |
| 275 | + <div class="col-md-6 col-12 mt-2"> | |
| 276 | + <label>Email</label> | |
| 277 | + <div class="input-group"> | |
| 278 | + <input | |
| 279 | + type="text" | |
| 280 | + class="form-control form-control-sm" | |
| 281 | + placeholder="Ingrese Email" | |
| 282 | + ng-model="cliente.MAIL" | |
| 283 | + ng-required="true" | |
| 284 | + ng-keypress="next($event.keyCode)" | |
| 285 | + ng-focus="focus(10)" | |
| 286 | + foca-focus="focused == 10" | |
| 287 | + teclado-virtual> | |
| 288 | + </div> | |
| 289 | + </div> | |
| 290 | + <div class="col-md-6 col-12 mt-2"> | |
| 291 | + <label>Telefono</label> | |
| 292 | + <div class="input-group"> | |
| 293 | + <input | |
| 294 | + foca-tipo-input | |
| 295 | + limite-numeros-max="20" | |
| 296 | + class="form-control form-control-sm" | |
| 297 | + placeholder="Ingrese Telefono" | |
| 298 | + ng-model="cliente.TEL" | |
| 299 | + ng-required="true" | |
| 300 | + ng-keypress="next($event.keyCode)" | |
| 301 | + ng-focus="focus(11)" | |
| 302 | + foca-focus="focused == 11" | |
| 303 | + teclado-virtual> | |
| 304 | + </div> | |
| 305 | + </div> | |
| 306 | + </div> | |
| 307 | + <div class="row"> | |
| 308 | + <div class="col-6 d-flex mt-3"> | |
| 309 | + <div class="custom-control custom-checkbox mt-auto"> | |
| 310 | + <input | |
| 311 | + type="checkbox" | |
| 312 | + class="custom-control-input" | |
| 313 | + id="checkDistribuidor" | |
| 314 | + ng-model="cliente.ES_MAY" | |
| 315 | + checked | |
| 316 | + disabled="disabled"> | |
| 317 | + <label class="custom-control-label" for="checkDistribuidor">ยฟEste cliente es distribuidor?</label> | |
| 318 | + </div> | |
| 319 | + </div> | |
| 320 | + </div> | |
| 321 | + </uib-tab> | |
| 322 | + <uib-tab heading="Datos impositivos"> | |
| 323 | + <div class="row"> | |
| 324 | + <div class="col-md-7 col-12 mt-2"> | |
| 325 | + <label>Responsabilidad ante el IVA</label> | |
| 326 | + <div class="input-group"> | |
| 327 | + <input | |
| 328 | + type="text" | |
| 329 | + class="form-control form-control-sm" | |
| 330 | + placeholder="Seleccione responsabilidad ante el IVA" | |
| 331 | + ng-model="cliente.iva.NOMBRE" | |
| 332 | + ng-keypress="seleccionarIva($event.keyCode)" | |
| 333 | + ng-required="true" | |
| 334 | + ng-focus="focus(12)" | |
| 335 | + foca-focus="focused == 12" | |
| 336 | + teclado-virtual | |
| 337 | + /> | |
| 338 | + <button | |
| 339 | + ng-show="cliente.iva.NOMBRE !== ''" | |
| 340 | + type="button" | |
| 341 | + class="clear-input" | |
| 342 | + ng-click="cliente.iva.NOMBRE = ''" | |
| 343 | + ><i class="fa fa-times"></i> | |
| 344 | + </button> | |
| 345 | + <div class="input-group-append"> | |
| 346 | + <button | |
| 347 | + ladda="searchLoading" | |
| 348 | + class="btn btn-outline-secondary" | |
| 349 | + type="button" | |
| 350 | + ng-click="seleccionarIva(13)" | |
| 351 | + ><i class="fa fa-search" aria-hidden="true"></i> | |
| 352 | + </button> | |
| 353 | + </div> | |
| 354 | + </div> | |
| 355 | + </div> | |
| 356 | + <div class="col-md-5 col-12 mt-2"> | |
| 357 | + <label>Factura que emite</label> | |
| 358 | + <div class="input-group"> | |
| 359 | + <input | |
| 360 | + type="text" | |
| 361 | + class="form-control form-control-sm" | |
| 362 | + placeholder="Seleccione factura que emite" | |
| 363 | + ng-model="cliente.tipoFactura.NOMBRE" | |
| 364 | + ng-required="true" | |
| 365 | + ng-keypress="seleccionarTipoFactura(13)" | |
| 366 | + ng-focus="focus(13)" | |
| 367 | + foca-focus="focused == 13" | |
| 368 | + teclado-virtual> | |
| 369 | + <button | |
| 370 | + ng-show="cliente.tipoFactura.NOMBRE !== ''" | |
| 371 | + type="button" | |
| 372 | + class="clear-input" | |
| 373 | + ng-click="cliente.tipoFactura.NOMBRE = ''" | |
| 374 | + ><i class="fa fa-times"></i> | |
| 375 | + </button> | |
| 376 | + <div class="input-group-append"> | |
| 377 | + <button | |
| 378 | + ladda="searchLoading" | |
| 379 | + class="btn btn-outline-secondary" | |
| 380 | + type="button" | |
| 381 | + ng-click="seleccionarTipoFactura(13)" | |
| 382 | + ><i class="fa fa-search" aria-hidden="true"></i> | |
| 383 | + </button> | |
| 384 | + </div> | |
| 385 | + </div> | |
| 386 | + </div> | |
| 387 | + </div> | |
| 388 | + <div class="row"> | |
| 389 | + <div class= "col-md-4 col-12 mt-2"> | |
| 390 | + <label>CUIT</label> | |
| 391 | + <div class="d-flex"> | |
| 392 | + <input | |
| 393 | + type="text" | |
| 394 | + class="text-center form-control form-control-sm col-2" | |
| 395 | + limite-numeros-max="2" | |
| 396 | + ng-model="cliente.cuit1" | |
| 397 | + ng-required="true" | |
| 398 | + ng-keypress="pasarCampoCuit(1)" | |
| 399 | + ng-focus="focus(14)" | |
| 400 | + foca-focus="focused == 14" | |
| 401 | + teclado-virtual | |
| 402 | + foca-tipo-input | |
| 403 | + > | |
| 404 | + <span class="m-1"> - </span> | |
| 405 | + <input | |
| 406 | + type="text" | |
| 407 | + class="text-center form-control form-control-sm col-5" | |
| 408 | + maxlength="8" | |
| 409 | + limite-numeros-max="8" | |
| 410 | + ng-keypress="pasarCampoCuit(2)" | |
| 411 | + ng-model="cliente.cuit2" | |
| 412 | + ng-required="true" | |
| 413 | + ng-focus="focus(15)" | |
| 414 | + foca-focus="cuitActivo == 2 || focused == 15" | |
| 415 | + teclado-virtual | |
| 416 | + foca-tipo-input | |
| 417 | + > | |
| 418 | + <span class="m-1"> - </span> | |
| 419 | + <input | |
| 420 | + type="text" | |
| 421 | + class="text-center form-control form-control-sm col-2" | |
| 422 | + maxlength="1" | |
| 423 | + limite-numeros-max="1" | |
| 424 | + ng-keypress="pasarCampoCuit(3)" | |
| 425 | + ng-model="cliente.cuit3" | |
| 426 | + ng-required="true" | |
| 427 | + ng-focus="focus(16)" | |
| 428 | + foca-focus="cuitActivo == 3 || focused == 16" | |
| 429 | + teclado-virtual | |
| 430 | + foca-tipo-input | |
| 431 | + > | |
| 432 | + </div> | |
| 433 | + </div> | |
| 434 | + <div class="col-md-4 col-12 mt-2"> | |
| 435 | + <label>Clase de comprobante</label> | |
| 436 | + <div class="input-group"> | |
| 437 | + <input | |
| 438 | + type="text" | |
| 439 | + class="form-control form-control-sm" | |
| 440 | + placeholder="Seleccione clase de comprobante" | |
| 441 | + ng-keypress="seleccionarTipoComprobante($event.keyCode)" | |
| 442 | + ng-model="cliente.tipoComprobante.NOMBRE" | |
| 443 | + ng-required="true" | |
| 444 | + ng-focus="focus(17)" | |
| 445 | + foca-focus="focused == 17" | |
| 446 | + teclado-virtual> | |
| 447 | + <button | |
| 448 | + ng-show="cliente.tipoComprobante.NOMBRE !== ''" | |
| 449 | + type="button" | |
| 450 | + class="clear-input" | |
| 451 | + ng-click="cliente.tipoComprobante.NOMBRE = ''" | |
| 452 | + ><i class="fa fa-times"></i> | |
| 453 | + </button> | |
| 454 | + <div class="input-group-append"> | |
| 455 | + <button | |
| 456 | + ladda="searchLoading" | |
| 457 | + class="btn btn-outline-secondary" | |
| 458 | + type="button" | |
| 459 | + ng-click="seleccionarTipoComprobante(13)" | |
| 460 | + ><i class="fa fa-search" aria-hidden="true"></i> | |
| 461 | + </button> | |
| 462 | + </div> | |
| 463 | + </div> | |
| 464 | + </div> | |
| 465 | + <div class="col-md-4 col-12 mt-2"> | |
| 466 | + <label>Forma de pago</label> | |
| 467 | + <div class="input-group"> | |
| 468 | + <input | |
| 469 | + type="text" | |
| 470 | + class="form-control form-control-sm" | |
| 471 | + placeholder="Seleccione forma de pago" | |
| 472 | + ng-model="cliente.formaPago.NOMBRE" | |
| 473 | + ng-required="true" | |
| 474 | + ng-keypress="seleccionarFormaPago($event.keyCode)" | |
| 475 | + ng-focus="focus(18)" | |
| 476 | + foca-focus="focused == 18" | |
| 477 | + teclado-virtual> | |
| 478 | + <button | |
| 479 | + ng-show="cliente.formaPago.NOMBRE !== ''" | |
| 480 | + type="button" | |
| 481 | + class="clear-input" | |
| 482 | + ng-click="cliente.formaPago.NOMBRE = ''" | |
| 483 | + ><i class="fa fa-times"></i> | |
| 484 | + </button> | |
| 485 | + <div class="input-group-append"> | |
| 486 | + <button | |
| 487 | + ladda="searchLoading" | |
| 488 | + class="btn btn-outline-secondary" | |
| 489 | + type="button" | |
| 490 | + ng-click="seleccionarFormaPago(13)" | |
| 491 | + ><i class="fa fa-search" aria-hidden="true"></i> | |
| 492 | + </button> | |
| 493 | + </div> | |
| 494 | + </div> | |
| 495 | + </div> | |
| 496 | + </div> | |
| 497 | + </uib-tab> | |
| 498 | + </uib-tabset> | |
| 499 | + </fieldset> | |
| 500 | + </form> | |
| 501 | +</div> | |
| 502 | +<div class="modal-footer py-1"> | |
| 503 | + <button | |
| 504 | + class="btn btn-sm btn-secondary" | |
| 505 | + type="button" | |
| 506 | + data-dismiss="modal" | |
| 507 | + ng-click="cancel()">Cancelar | |
| 508 | + </button> | |
| 509 | + <button | |
| 510 | + class="btn btn-sm btn-primary" | |
| 511 | + type="button" | |
| 512 | + ng-click="guardar()" | |
| 513 | + >Guardar | |
| 514 | + </button> | |
| 515 | +</div> |