Commit 36d714c5bff8b68b7f4e287f36962d9124ab0316

Authored by Eric Fernandez
Exists in master and in 1 other branch develop

Merge branch 'master' into 'develop'

Master(efernandez)

See merge request !42
src/js/controller.js
... ... @@ -138,12 +138,12 @@ angular.module('focaBusquedaCliente')
138 138 $scope.vendedor.id = undefined;
139 139 $scope.cliente.cobrador.NOM = '';
140 140 $scope.cliente.cobrador.ID = undefined;
141   - $scope.accion = "Crear Cliente";
  141 + $scope.accion = 'Crear Cliente';
142 142 $scope.ingreso = true;
143   - }
  143 + };
144 144  
145 145 $scope.openModal = function (cliente) {
146   - focaBusquedaClienteService.obtenerClientePorCodigo(cliente.cod)
  146 + focaBusquedaClienteService.obtenerClientePorCodigo(cliente.COD)
147 147 .then(function (res) {
148 148 var data = res.data[0];
149 149 $scope.cliente.codigo = res.data[0].COD;
... ... @@ -178,11 +178,11 @@ angular.module('focaBusquedaCliente')
178 178 $scope.cliente.formaPago.ID = data.formaPago.ID;
179 179 $scope.cliente.ES_PROS = data.ES_PROS;
180 180 $scope.cliente.ES_MAY = data.ES_MAY;
181   - $scope.accion = "Editar Cliente";
  181 + $scope.accion = 'Editar Cliente';
182 182 $scope.ingreso = true;
183 183 })
184 184 .catch(function (e) { console.log(e); });
185   - }
  185 + };
186 186  
187 187 $scope.busquedaDown = function (key) {
188 188 if (key === 40) {
... ... @@ -401,14 +401,14 @@ angular.module('focaBusquedaCliente')
401 401 };
402 402 $scope.seleccionarTipoFactura = function (key) {
403 403  
404   - if ($scope.cliente.iva.NOMBRE == '') {
  404 + if ($scope.cliente.iva.NOMBRE === '') {
405 405 focaModalService.alert('Seleccione una responsabilidad ante el IVA');
406 406 return;
407 407 }
408 408  
409 409 if (key === 13) {
410 410 var datos;
411   - if ($scope.cliente.iva.ID == 1) {
  411 + if ($scope.cliente.iva.ID === 1) {
412 412 datos = [
413 413 {
414 414 ID: 'A',
... ... @@ -617,13 +617,19 @@ angular.module('focaBusquedaCliente')
617 617 } else if (!$scope.cliente.tipoFactura.NOMBRE) {
618 618 focaModalService.alert('Seleccione tipo de Factura');
619 619 return;
620   - } else if (!$scope.cliente.cuit1 && !$scope.cliente.cuit2 && !$scope.cliente.cuit3) {
  620 + } else if (!$scope.cliente.cuit1 && !$scope.cliente.cuit2 &&
  621 + !$scope.cliente.cuit3)
  622 + {
621 623 focaModalService.alert('Ingrese CUIT');
622 624 return;
623   - } else if (!$scope.cliente.cuit1 || !$scope.cliente.cuit2 || !$scope.cliente.cuit3) {
  625 + } else if (!$scope.cliente.cuit1 || !$scope.cliente.cuit2 ||
  626 + !$scope.cliente.cuit3)
  627 + {
624 628 focaModalService.alert('Ingrese CUIT válido');
625 629 return;
626   - } else if (!$scope.regexCuit.test($scope.cliente.cuit1 + $scope.cliente.cuit2 + $scope.cliente.cuit3)) {
  630 + } else if (!$scope.regexCuit.test($scope.cliente.cuit1 + $scope.cliente.cuit2 +
  631 + $scope.cliente.cuit3))
  632 + {
627 633 focaModalService.alert('Ingrese CUIT con formato: XX-XXXXXXXX-X');
628 634 return;
629 635 } else if (!$scope.cliente.tipoComprobante.NOMBRE) {
1 1 angular.module('focaBusquedaCliente')
2   - .service('focaBusquedaClienteService', ['$http', 'API_ENDPOINT', function ($http, API_ENDPOINT) {
  2 + .service('focaBusquedaClienteService', ['$http', 'API_ENDPOINT',
  3 + function ($http, API_ENDPOINT) {
3 4 return {
4 5 obtenerClientesPorNombreOCuitByVendedor: function (nombreOCuit, idVendedor) {
5 6 return $http.post(API_ENDPOINT.URL + '/cliente/listar',
src/views/foca-busqueda-cliente-modal.html
... ... @@ -84,9 +84,9 @@
84 84 class="selectable"
85 85 ng-repeat="(key, cliente) in currentPageClientes"
86 86 >
87   - <td ng-bind="('00000'+cliente.cod).slice(-5)"></td>
88   - <td ng-bind="cliente.nom"></td>
89   - <td ng-bind="cliente.cuit"></td>
  87 + <td ng-bind="('00000'+cliente.COD).slice(-5)"></td>
  88 + <td ng-bind="cliente.NOM"></td>
  89 + <td ng-bind="cliente.CUIT"></td>
90 90 <td>
91 91 <button
92 92 type="button"
... ... @@ -115,7 +115,7 @@
115 115 </table>
116 116  
117 117 <form name="formCliente">
118   - <fieldset>
  118 + <fieldset>
119 119 <uib-tabset class="tabs-right" ng-show="ingreso">
120 120 <uib-tab heading="Datos cliente">
121 121 <div class="row">