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