Commit 15a95082a5a08c5e8d2d8d6da80be5f00b4dda27

Authored by Eric Fernandez
Exists in master

Merge branch 'master' into 'master'

Master(efernandez)

See merge request !11
src/js/controller.js
... ... @@ -63,7 +63,7 @@ angular.module('focaModalDescarga')
63 63 idProveedor: $scope.remito.proveedor.COD,
64 64 idDomicilio: 0,
65 65 idCotizacion: $scope.remito.cotizacion.ID,
66   - idListaPrecio: parseInt($scope.remito.cliente.mod),
  66 + idListaPrecio: parseInt($scope.remito.cliente.mod) || '',
67 67 flete: $scope.remito.flete,
68 68 fob: $scope.remito.fob,
69 69 bomba: $scope.remito.bomba,
... ... @@ -186,6 +186,17 @@ angular.module('focaModalDescarga')
186 186 return importe;
187 187 };
188 188 function validarDescarga() {
  189 +
  190 + if ($scope.nroRemito > 99999999) {
  191 + focaModalService.alert('Numero remito mayor al permitido máximo 8');
  192 + return true;
  193 + }
  194 +
  195 + if ($scope.nroSucursal > 9999) {
  196 + focaModalService.alert('Numero sucursal mayor a la permitida máximo 4');
  197 + return true;
  198 + }
  199 +
189 200 for (var i = 0; i < $scope.cisternas.length; i++) {
190 201 if (parseInt($scope.cisternas[i].cisternaCarga.descargar) >
191 202 $scope.cisternas[i].cisternaCarga.cantidad ||
... ... @@ -4,7 +4,7 @@ angular.module(&#39;focaModalDescarga&#39;)
4 4 var route = API_ENDPOINT.URL;
5 5 return {
6 6 crearRemito: function (remito) {
7   - return $http.post(route + '/remito/mobile', remito);
  7 + return $http.post(route + '/remito/guardar/mobile', remito);
8 8 },
9 9 validarSucursalRemito: function (sucursal, remito) {
10 10 return $http.get(route + '/remito/validar/' +
src/views/foca-modal-descarga.html
... ... @@ -44,7 +44,7 @@
44 44 ng-focus="$event.target.select();"
45 45 ng-model="nroSucursal"
46 46 ng-change="validateSucursalRemito(nroSucursal, nroRemito)"
47   - limite-numeros-max="4">
  47 + >
48 48 </div>
49 49 <div class="col-6 mt-1">
50 50 <input
... ... @@ -52,7 +52,7 @@
52 52 ng-focus="$event.target.select();"
53 53 ng-model="nroRemito"
54 54 ng-change="validateSucursalRemito(nroSucursal, nroRemito)"
55   - limite-numeros-max="8">
  55 + >
56 56 </div>
57 57 <div
58 58 class="col-12 mt-1 alert alert-danger text-center" role="alert"