Commit 6607e5c60ce3d6df3cc67fc62feac2065f542f18

Authored by Jose Pinto
1 parent 0c4b4d8187
Exists in master

agrego foca-botonera-lateral

1 angular.module('focaCrearHojaRuta', ['ngRoute', 'focaModalRemito', 'ui.bootstrap'/*, 1 angular.module('focaCrearHojaRuta', [
2 'focaBusquedaProductos', 2 'ngRoute',
3 'focaModalRemito',
4 'ui.bootstrap',
5 'focaBotoneraLateral',
6 /*'focaBusquedaProductos',
3 'focaModalProveedor', 7 'focaModalProveedor',
4 'focaBusquedaCliente', 8 'focaBusquedaCliente',
5 'focaModalPrecioCondicion', 9 'focaModalPrecioCondicion',
6 'focaModalFlete', 10 'focaModalFlete',
7 'focaDirectivas', 11 'focaDirectivas',
8 'focaModal', 12 'focaModal',
9 'focaModalDomicilio', 13 'focaModalDomicilio',
10 'focaModalMoneda', 14 'focaModalMoneda',
11 'focaModalCotizacion', 15 'focaModalCotizacion',
12 'focaSeguimiento', 16 'focaSeguimiento',
13 'angular-ladda', 17 'angular-ladda',
14 'cordovaGeolocationModule'*/ 18 'cordovaGeolocationModule'*/
15 ]); 19 ]);
16 20
src/js/controller.js
1 angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl', 1 angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl',
2 [ 2 [
3 '$scope', '$uibModal', '$location', '$filter', 'crearHojaRutaService', 'focaModalService', 3 '$scope',
4 function($scope, $uibModal, $location, $filter, crearHojaRutaService, focaModalService) { 4 '$uibModal',
5 '$location',
6 '$filter',
7 '$timeout',
8 'crearHojaRutaService',
9 'focaModalService',
10 'focaBotoneraLateralService',
11 function($scope, $uibModal, $location, $filter, $timeout,
12 crearHojaRutaService, focaModalService, focaBotoneraLateralService) {
5 13
6 $scope.botonera = crearHojaRutaService.getBotonera(); 14 $scope.botonera = crearHojaRutaService.getBotonera();
7 $scope.datepickerAbierto = false; 15 $scope.datepickerAbierto = false;
8 16
9 $scope.show = false; 17 $scope.show = false;
10 $scope.cargando = true; 18 $scope.cargando = true;
11 $scope.dateOptions = { 19 $scope.dateOptions = {
12 maxDate: new Date(), 20 maxDate: new Date(),
13 minDate: new Date(2010, 0, 1) 21 minDate: new Date(2010, 0, 1)
14 }; 22 };
15 23
16 $scope.hojaRuta = { 24 $scope.hojaRuta = {
17 fecha: new Date(), 25 fecha: new Date(),
18 litros: 0, 26 litros: 0,
19 chofer: {}, 27 chofer: {},
20 vehiculo: { 28 vehiculo: {
21 capacidad: 0 29 capacidad: 0
22 }, 30 },
23 transportista: {}, 31 transportista: {},
24 tarifario: { 32 tarifario: {
25 costo: null 33 costo: null
26 } 34 }
27 }; 35 };
28 36
29 $scope.showCabecera = true; 37 $scope.showCabecera = true;
30 38
31 $scope.now = new Date(); 39 $scope.now = new Date();
32 $scope.puntoVenta = '0000'; 40 $scope.puntoVenta = '0000';
33 $scope.comprobante = '00000000'; 41 $scope.comprobante = '00000000';
34 $scope.remitosTabla = []; 42 $scope.remitosTabla = [];
35 $scope.idLista = undefined; 43 $scope.idLista = undefined;
36 //La pantalla solo se usa para cargar pedidos 44 //La pantalla solo se usa para cargar pedidos
37 //var hojaRutaTemp = crearHojaRutaService.getHojaRuta(); 45 //var hojaRutaTemp = crearHojaRutaService.getHojaRuta();
38 46
47
48 //SETEO BOTONERA LATERAL
49 $timeout(function() {
50 focaBotoneraLateralService.showSalir(true);
51 focaBotoneraLateralService.showPausar(true);
52 focaBotoneraLateralService.showGuardar(true, $scope.crearNotaPedido);
53 });
54
55
39 crearHojaRutaService.getNumeroHojaRuta().then( 56 crearHojaRutaService.getNumeroHojaRuta().then(
40 function(res) { 57 function(res) {
41 $scope.puntoVenta = $scope.rellenar(res.data.sucursal, 4); 58 $scope.puntoVenta = $scope.rellenar(res.data.sucursal, 4);
42 $scope.comprobante = $scope.rellenar(res.data.numeroHojaRuta, 8); 59 $scope.comprobante = $scope.rellenar(res.data.numeroHojaRuta, 8);
43 }, 60 },
44 function(err) { 61 function(err) {
45 focaModalService.alert('La terminal no esta configurada correctamente'); 62 focaModalService.alert('La terminal no esta configurada correctamente');
46 console.info(err); 63 console.info(err);
47 } 64 }
48 ); 65 );
49 //La pantalla solo se usa para cargar pedidos 66 //La pantalla solo se usa para cargar pedidos
50 // if (hojaRutaTemp !== undefined) { 67 // if (hojaRutaTemp !== undefined) {
51 // hojaRutaTemp.fechaCarga = new Date(hojaRutaTemp.fechaCarga); 68 // hojaRutaTemp.fechaCarga = new Date(hojaRutaTemp.fechaCarga);
52 // $scope.hojaRuta = hojaRutaTemp; 69 // $scope.hojaRuta = hojaRutaTemp;
53 // $scope.hojaRuta.flete = ($scope.hojaRuta.flete).toString(); 70 // $scope.hojaRuta.flete = ($scope.hojaRuta.flete).toString();
54 // $scope.hojaRuta.bomba = ($scope.hojaRuta.bomba).toString(); 71 // $scope.hojaRuta.bomba = ($scope.hojaRuta.bomba).toString();
55 // $scope.idLista = $scope.hojaRuta.precioCondicion; 72 // $scope.idLista = $scope.hojaRuta.precioCondicion;
56 // crearHojaRutaService 73 // crearHojaRutaService
57 // .getArticulosByIdHojaRuta($scope.hojaRuta.id).then( 74 // .getArticulosByIdHojaRuta($scope.hojaRuta.id).then(
58 // function(res) { 75 // function(res) {
59 // $scope.remitosTabla = res.data; 76 // $scope.remitosTabla = res.data;
60 // } 77 // }
61 // ); 78 // );
62 //TODO DOMICILIOS QUE SE CARGAN AL EDITAR NOTA DE PEDIDO 79 //TODO DOMICILIOS QUE SE CARGAN AL EDITAR NOTA DE PEDIDO
63 //(NO REQUERIDO EN ESTA VERSION) 80 //(NO REQUERIDO EN ESTA VERSION)
64 // crearHojaRutaService.getDomiciliosByIdHojaRuta($scope.hojaRuta.id).then( 81 // crearHojaRutaService.getDomiciliosByIdHojaRuta($scope.hojaRuta.id).then(
65 // function(res) { 82 // function(res) {
66 // $scope.hojaRuta.domicilio = res.data; 83 // $scope.hojaRuta.domicilio = res.data;
67 // } 84 // }
68 // ); 85 // );
69 // } else { 86 // } else {
70 // $scope.hojaRuta.fechaCarga = new Date(); 87 // $scope.hojaRuta.fechaCarga = new Date();
71 // $scope.hojaRuta.bomba = '0'; 88 // $scope.hojaRuta.bomba = '0';
72 // $scope.hojaRuta.flete = '0'; 89 // $scope.hojaRuta.flete = '0';
73 // $scope.idLista = undefined; 90 // $scope.idLista = undefined;
74 // } 91 // }
75 //TO DO - FUNCIONES PARA MULTIPLES DOMICILIOS NO IMPLEMENTADAS EN ESTA DEMO 92 //TO DO - FUNCIONES PARA MULTIPLES DOMICILIOS NO IMPLEMENTADAS EN ESTA DEMO
76 // $scope.addNewDom = function() { 93 // $scope.addNewDom = function() {
77 // $scope.hojaRuta.domicilio.push({ 'id': 0 }); 94 // $scope.hojaRuta.domicilio.push({ 'id': 0 });
78 // }; 95 // };
79 // $scope.removeNewChoice = function(choice) { 96 // $scope.removeNewChoice = function(choice) {
80 // if ($scope.hojaRuta.domicilio.length > 1) { 97 // if ($scope.hojaRuta.domicilio.length > 1) {
81 // $scope.hojaRuta.domicilio.splice($scope.hojaRuta.domicilio.findIndex( 98 // $scope.hojaRuta.domicilio.splice($scope.hojaRuta.domicilio.findIndex(
82 // function(c) { 99 // function(c) {
83 // return c.$$hashKey === choice.$$hashKey; 100 // return c.$$hashKey === choice.$$hashKey;
84 // } 101 // }
85 // ), 1); 102 // ), 1);
86 // } 103 // }
87 // }; 104 // };
88 105
89 $scope.crearHojaRuta = function() { 106 $scope.crearHojaRuta = function() {
90 if($scope.hojaRuta.litros <= 0) { 107 if($scope.hojaRuta.litros <= 0) {
91 focaModalService.alert('Ingrese Remitos'); 108 focaModalService.alert('Ingrese Remitos');
92 return; 109 return;
93 } 110 }
94 111
95 if(!$scope.hojaRuta.chofer.id) { 112 if(!$scope.hojaRuta.chofer.id) {
96 focaModalService.alert('Ingrese Chofer'); 113 focaModalService.alert('Ingrese Chofer');
97 return; 114 return;
98 } 115 }
99 116
100 if(!$scope.hojaRuta.vehiculo.id) { 117 if(!$scope.hojaRuta.vehiculo.id) {
101 focaModalService.alert('Ingrese Vehiculo'); 118 focaModalService.alert('Ingrese Vehiculo');
102 return; 119 return;
103 } 120 }
104 121
105 if(!$scope.hojaRuta.transportista.codigo) { 122 if(!$scope.hojaRuta.transportista.codigo) {
106 focaModalService.alert('Ingrese Transportista'); 123 focaModalService.alert('Ingrese Transportista');
107 return; 124 return;
108 } 125 }
109 126
110 if($scope.hojaRuta.vehiculo.capacidad < $scope.hojaRuta.litros) { 127 if($scope.hojaRuta.vehiculo.capacidad < $scope.hojaRuta.litros) {
111 focaModalService.alert( 128 focaModalService.alert(
112 'La capacidad del Vehiculo es menor a lo ingresado en Remitos' 129 'La capacidad del Vehiculo es menor a lo ingresado en Remitos'
113 ); 130 );
114 return; 131 return;
115 } 132 }
116 133
117 if(!$scope.hojaRuta.tarifario.costo) { 134 if(!$scope.hojaRuta.tarifario.costo) {
118 focaModalService.alert('Ingrese Tarifario'); 135 focaModalService.alert('Ingrese Tarifario');
119 return; 136 return;
120 } 137 }
121 138
122 var date = new Date(); 139 var date = new Date();
123 var save = { 140 var save = {
124 hojaRuta: { 141 hojaRuta: {
125 id: 0, 142 id: 0,
126 fechaCreacion: 143 fechaCreacion:
127 new Date(date.getTime() - (date.getTimezoneOffset() * 60000)) 144 new Date(date.getTime() - (date.getTimezoneOffset() * 60000))
128 .toISOString().slice(0, 19) .replace('T', ' '), 145 .toISOString().slice(0, 19) .replace('T', ' '),
129 idTransportista: $scope.hojaRuta.transportista.codigo, 146 idTransportista: $scope.hojaRuta.transportista.codigo,
130 idChofer: $scope.hojaRuta.chofer.id, 147 idChofer: $scope.hojaRuta.chofer.id,
131 idVehiculo: $scope.hojaRuta.vehiculo.id, 148 idVehiculo: $scope.hojaRuta.vehiculo.id,
132 tarifaFlete: $scope.hojaRuta.tarifario.costo 149 tarifaFlete: $scope.hojaRuta.tarifario.costo
133 }, 150 },
134 remitos: $scope.remitosTabla 151 remitos: $scope.remitosTabla
135 }; 152 };
136 153
137 crearHojaRutaService.crearHojaRuta(save).then( 154 crearHojaRutaService.crearHojaRuta(save).then(
138 function(data) { 155 function(data) {
139 focaModalService.alert( 156 focaModalService.alert(
140 'Hoja ruta creada Nº: ' + 157 'Hoja ruta creada Nº: ' +
141 $scope.rellenar(data.data.sucursal, 4) + 158 $scope.rellenar(data.data.sucursal, 4) +
142 '-' + 159 '-' +
143 $scope.rellenar(data.data.numeroHojaRuta, 8) 160 $scope.rellenar(data.data.numeroHojaRuta, 8)
144 ); 161 );
145 $scope.hojaRuta = { 162 $scope.hojaRuta = {
146 fecha: new Date(), 163 fecha: new Date(),
147 litros: 0, 164 litros: 0,
148 chofer: {}, 165 chofer: {},
149 vehiculo: { 166 vehiculo: {
150 capacidad: 0 167 capacidad: 0
151 }, 168 },
152 transportista: {}, 169 transportista: {},
153 tarifario: { 170 tarifario: {
154 costo: null 171 costo: null
155 } 172 }
156 }; 173 };
157 174
158 $scope.remitosTabla = []; 175 $scope.remitosTabla = [];
159 $scope.$broadcast('cleanCabecera'); 176 $scope.$broadcast('cleanCabecera');
160 177
161 crearHojaRutaService.getNumeroHojaRuta().then(function(res) { 178 crearHojaRutaService.getNumeroHojaRuta().then(function(res) {
162 $scope.comprobante = $scope.rellenar(res.data.numeroHojaRuta, 8); 179 $scope.comprobante = $scope.rellenar(res.data.numeroHojaRuta, 8);
163 }); 180 });
164 }, 181 },
165 function(error) { 182 function(error) {
166 focaModalService.alert('Hubo un error al crear la nota de pedido'); 183 focaModalService.alert('Hubo un error al crear la nota de pedido');
167 console.info(error); 184 console.info(error);
168 } 185 }
169 ); 186 );
170 }; 187 };
171 188
172 $scope.seleccionarTransportista = function() { 189 $scope.seleccionarTransportista = function() {
173 var modalInstance = $uibModal.open( 190 var modalInstance = $uibModal.open(
174 { 191 {
175 ariaLabelledBy: 'Busqueda de Transportista', 192 ariaLabelledBy: 'Busqueda de Transportista',
176 templateUrl: 'modal-proveedor.html', 193 templateUrl: 'modal-proveedor.html',
177 controller: 'focaModalProveedorCtrl', 194 controller: 'focaModalProveedorCtrl',
178 size: 'lg', 195 size: 'lg',
179 resolve: { 196 resolve: {
180 transportista: function() { 197 transportista: function() {
181 return true; 198 return true;
182 } 199 }
183 } 200 }
184 } 201 }
185 ); 202 );
186 modalInstance.result.then( 203 modalInstance.result.then(
187 function(proveedor) { 204 function(proveedor) {
188 console.info($scope.hojaRuta); 205 console.info($scope.hojaRuta);
189 $scope.hojaRuta.transportista.codigo = proveedor.COD; 206 $scope.hojaRuta.transportista.codigo = proveedor.COD;
190 $scope.$broadcast('addCabecera', { 207 $scope.$broadcast('addCabecera', {
191 label: 'Transportista:', 208 label: 'Transportista:',
192 valor: proveedor.NOM 209 valor: proveedor.NOM
193 }); 210 });
194 }, function() { 211 }, function() {
195 212
196 } 213 }
197 ); 214 );
198 }; 215 };
199 216
200 $scope.seleccionarChofer = function() { 217 $scope.seleccionarChofer = function() {
201 var modalInstance = $uibModal.open( 218 var modalInstance = $uibModal.open(
202 { 219 {
203 ariaLabelledBy: 'Busqueda de Chofer', 220 ariaLabelledBy: 'Busqueda de Chofer',
204 templateUrl: 'modal-chofer.html', 221 templateUrl: 'modal-chofer.html',
205 controller: 'focaModalChoferController', 222 controller: 'focaModalChoferController',
206 size: 'lg' 223 size: 'lg'
207 } 224 }
208 ); 225 );
209 226
210 modalInstance.result.then( 227 modalInstance.result.then(
211 function(chofer) { 228 function(chofer) {
212 $scope.hojaRuta.chofer = chofer; 229 $scope.hojaRuta.chofer = chofer;
213 $scope.$broadcast('addCabecera', { 230 $scope.$broadcast('addCabecera', {
214 label: 'Chofer:', 231 label: 'Chofer:',
215 valor: chofer.nombre 232 valor: chofer.nombre
216 }); 233 });
217 }, function() { 234 }, function() {
218 // funcion ejecutada cuando se cancela el modal 235 // funcion ejecutada cuando se cancela el modal
219 } 236 }
220 ); 237 );
221 }; 238 };
222 239
223 $scope.seleccionarVehiculo = function() { 240 $scope.seleccionarVehiculo = function() {
224 var modalInstance = $uibModal.open( 241 var modalInstance = $uibModal.open(
225 { 242 {
226 ariaLabelledBy: 'Busqueda de Vehiculo', 243 ariaLabelledBy: 'Busqueda de Vehiculo',
227 templateUrl: 'modal-vehiculo.html', 244 templateUrl: 'modal-vehiculo.html',
228 controller: 'focaModalVehiculoController', 245 controller: 'focaModalVehiculoController',
229 size: 'lg' 246 size: 'lg'
230 } 247 }
231 ); 248 );
232 249
233 modalInstance.result.then( 250 modalInstance.result.then(
234 function(vehiculo) { 251 function(vehiculo) {
235 $scope.hojaRuta.vehiculo = vehiculo; 252 $scope.hojaRuta.vehiculo = vehiculo;
236 $scope.$broadcast('addCabecera', { 253 $scope.$broadcast('addCabecera', {
237 label: 'Tractor:', 254 label: 'Tractor:',
238 valor: vehiculo.tractor 255 valor: vehiculo.tractor
239 }); 256 });
240 $scope.$broadcast('addCabecera', { 257 $scope.$broadcast('addCabecera', {
241 label: 'Semi:', 258 label: 'Semi:',
242 valor: vehiculo.semi 259 valor: vehiculo.semi
243 }); 260 });
244 $scope.$broadcast('addCabecera', { 261 $scope.$broadcast('addCabecera', {
245 label: 'Capacidad:', 262 label: 'Capacidad:',
246 valor: vehiculo.capacidad 263 valor: vehiculo.capacidad
247 }); 264 });
248 }, function() { 265 }, function() {
249 // funcion ejecutada cuando se cancela el modal 266 // funcion ejecutada cuando se cancela el modal
250 } 267 }
251 ); 268 );
252 }; 269 };
253 270
254 $scope.seleccionarTarifario = function() { 271 $scope.seleccionarTarifario = function() {
255 var modalInstance = $uibModal.open( 272 var modalInstance = $uibModal.open(
256 { 273 {
257 ariaLabelledBy: 'Busqueda de Tarifario', 274 ariaLabelledBy: 'Busqueda de Tarifario',
258 templateUrl: 'modal-tarifa-flete.html', 275 templateUrl: 'modal-tarifa-flete.html',
259 controller: 'focaModalTarifaFleteController', 276 controller: 'focaModalTarifaFleteController',
260 size: 'lg', 277 size: 'lg',
261 resolve: { 278 resolve: {
262 parametrosTarifaFlete: function() { 279 parametrosTarifaFlete: function() {
263 return $scope.hojaRuta.tarifario.costo; 280 return $scope.hojaRuta.tarifario.costo;
264 } 281 }
265 } 282 }
266 } 283 }
267 ); 284 );
268 285
269 modalInstance.result.then( 286 modalInstance.result.then(
270 function(tarifario) { 287 function(tarifario) {
271 $scope.hojaRuta.tarifario = tarifario; 288 $scope.hojaRuta.tarifario = tarifario;
272 $scope.$broadcast('addCabecera', { 289 $scope.$broadcast('addCabecera', {
273 label: 'Tarifario:', 290 label: 'Tarifario:',
274 valor: tarifario.costo 291 valor: tarifario.costo
275 }); 292 });
276 }, function() { 293 }, function() {
277 // funcion ejecutada cuando se cancela el modal 294 // funcion ejecutada cuando se cancela el modal
278 } 295 }
279 ); 296 );
280 }; 297 };
281 298
282 $scope.seleccionarRemitos = function() { 299 $scope.seleccionarRemitos = function() {
283 var modalInstance = $uibModal.open( 300 var modalInstance = $uibModal.open(
284 { 301 {
285 ariaLabelledBy: 'Busqueda de Remito', 302 ariaLabelledBy: 'Busqueda de Remito',
286 templateUrl: 'foca-modal-remito.html', 303 templateUrl: 'foca-modal-remito.html',
287 controller: 'focaModalRemitoController', 304 controller: 'focaModalRemitoController',
288 size: 'lg', 305 size: 'lg',
289 resolve: {usadoPor: function() {return 'hojaRuta';}} 306 resolve: {usadoPor: function() {return 'hojaRuta';}}
290 } 307 }
291 ); 308 );
292 modalInstance.result.then( 309 modalInstance.result.then(
293 function(remito) { 310 function(remito) {
294 for (var i = $scope.remitosTabla.length - 1; i >= 0; i--) { 311 for (var i = $scope.remitosTabla.length - 1; i >= 0; i--) {
295 if ($scope.remitosTabla[i].id === remito.id) { 312 if ($scope.remitosTabla[i].id === remito.id) {
296 focaModalService.alert('Remito ya incluido'); 313 focaModalService.alert('Remito ya incluido');
297 return; 314 return;
298 } 315 }
299 } 316 }
300 317
301 var litros = 0; 318 var litros = 0;
302 for (var j = remito.articulosRemito.length - 1; j >= 0; j--) { 319 for (var j = remito.articulosRemito.length - 1; j >= 0; j--) {
303 litros = litros + parseFloat(remito.articulosRemito[j].cantidad); 320 litros = litros + parseFloat(remito.articulosRemito[j].cantidad);
304 } 321 }
305 322
306 if ($scope.hojaRuta.litros >= $scope.hojaRuta.vehiculo.capacidad) { 323 if ($scope.hojaRuta.litros >= $scope.hojaRuta.vehiculo.capacidad) {
307 focaModalService.alert( 324 focaModalService.alert(
308 'Debe ingresar toda la información para el transporte' 325 'Debe ingresar toda la información para el transporte'
309 ); 326 );
310 return; 327 return;
311 } 328 }
312 329
313 if ($scope.hojaRuta.litros + litros >= $scope.hojaRuta.vehiculo.capacidad) 330 if ($scope.hojaRuta.litros + litros >= $scope.hojaRuta.vehiculo.capacidad)
314 { 331 {
315 var litrostotales = litros; 332 var litrostotales = litros;
316 litros = $scope.hojaRuta.vehiculo.capacidad - $scope.hojaRuta.litros; 333 litros = $scope.hojaRuta.vehiculo.capacidad - $scope.hojaRuta.litros;
317 focaModalService.alert( 334 focaModalService.alert(
318 'La carga excede la capacidad disponible del vehiculo. ' + 335 'La carga excede la capacidad disponible del vehiculo. ' +
319 'Excedente no cargado: ' + (litrostotales - litros) + ' litros' 336 'Excedente no cargado: ' + (litrostotales - litros) + ' litros'
320 ); 337 );
321 } 338 }
322 339
323 remito.litros = litros; 340 remito.litros = litros;
324 $scope.hojaRuta.litros = $scope.hojaRuta.litros + litros; 341 $scope.hojaRuta.litros = $scope.hojaRuta.litros + litros;
325 $scope.remitosTabla.push(remito); 342 $scope.remitosTabla.push(remito);
326 }, function() { 343 }, function() {
327 // funcion ejecutada cuando se cancela el modal 344 // funcion ejecutada cuando se cancela el modal
328 } 345 }
329 ); 346 );
330 }; 347 };
331 348
332 $scope.getTotal = function() { 349 $scope.getTotal = function() {
333 var total = 0; 350 var total = 0;
334 var arrayTempArticulos = $scope.remitosTabla; 351 var arrayTempArticulos = $scope.remitosTabla;
335 for (var i = 0; i < arrayTempArticulos.length; i++) { 352 for (var i = 0; i < arrayTempArticulos.length; i++) {
336 total += arrayTempArticulos[i].precio * arrayTempArticulos[i].cantidad; 353 total += arrayTempArticulos[i].precio * arrayTempArticulos[i].cantidad;
337 } 354 }
338 return parseFloat(total.toFixed(2)); 355 return parseFloat(total.toFixed(2));
339 }; 356 };
340 357
341 $scope.getSubTotal = function() { 358 $scope.getSubTotal = function() {
342 if($scope.articuloACargar) { 359 if($scope.articuloACargar) {
343 return $scope.articuloACargar.precio * $scope.articuloACargar.cantidad; 360 return $scope.articuloACargar.precio * $scope.articuloACargar.cantidad;
344 } 361 }
345 }; 362 };
346 363
347 $scope.limpiarPantalla = function() { 364 $scope.limpiarPantalla = function() {
348 $scope.limpiarFlete(); 365 $scope.limpiarFlete();
349 $scope.hojaRuta.flete = '0'; 366 $scope.hojaRuta.flete = '0';
350 $scope.hojaRuta.bomba = '0'; 367 $scope.hojaRuta.bomba = '0';
351 $scope.hojaRuta.precioCondicion = ''; 368 $scope.hojaRuta.precioCondicion = '';
352 $scope.remitosTabla = []; 369 $scope.remitosTabla = [];
353 $scope.hojaRuta.vendedor.nombre = ''; 370 $scope.hojaRuta.vendedor.nombre = '';
354 $scope.hojaRuta.cliente = {nombre: ''}; 371 $scope.hojaRuta.cliente = {nombre: ''};
355 $scope.hojaRuta.domicilio = {dom: ''}; 372 $scope.hojaRuta.domicilio = {dom: ''};
356 $scope.hojaRuta.litros = 0; 373 $scope.hojaRuta.litros = 0;
357 $scope.domiciliosCliente = []; 374 $scope.domiciliosCliente = [];
358 }; 375 };
359 //Recibe aviso si el teclado está en uso 376 //Recibe aviso si el teclado está en uso
360 // $rootScope.$on('usarTeclado', function(event, data) { 377 // $rootScope.$on('usarTeclado', function(event, data) {
361 // if(data) { 378 // if(data) {
362 // $scope.mostrarTeclado = true; 379 // $scope.mostrarTeclado = true;
363 // return; 380 // return;
364 // } 381 // }
365 // $scope.mostrarTeclado = false; 382 // $scope.mostrarTeclado = false;
366 // }) 383 // })
367 $scope.selectFocus = function($event) { 384 $scope.selectFocus = function($event) {
368 //Si el teclado esta en uso no selecciona el valor 385 //Si el teclado esta en uso no selecciona el valor
369 // if($scope.mostrarTeclado) { 386 // if($scope.mostrarTeclado) {
370 // return; 387 // return;
371 // } 388 // }
372 $event.target.select(); 389 $event.target.select();
373 }; 390 };
374 391
375 $scope.salir = function() { 392 $scope.salir = function() {
376 $location.path('/'); 393 $location.path('/');
377 }; 394 };
378 395
379 $scope.parsearATexto = function(articulo) { 396 $scope.parsearATexto = function(articulo) {
380 articulo.cantidad = parseFloat(articulo.cantidad); 397 articulo.cantidad = parseFloat(articulo.cantidad);
381 articulo.precio = parseFloat(articulo.precio); 398 articulo.precio = parseFloat(articulo.precio);
382 }; 399 };
383 400
384 $scope.rellenar = function(relleno, longitud) { 401 $scope.rellenar = function(relleno, longitud) {
385 relleno = '' + relleno; 402 relleno = '' + relleno;
386 while (relleno.length < longitud) { 403 while (relleno.length < longitud) {
387 relleno = '0' + relleno; 404 relleno = '0' + relleno;
388 } 405 }
389 406
390 return relleno; 407 return relleno;
391 }; 408 };
392 409
393 $scope.quitarArticulo = function(key) { 410 $scope.quitarArticulo = function(key) {
394 $scope.remitosTabla.splice(key, 1); 411 $scope.remitosTabla.splice(key, 1);
395 var litros = 0; 412 var litros = 0;
396 413
397 for (var i = $scope.remitosTabla.length - 1; i >= 0; i--) { 414 for (var i = $scope.remitosTabla.length - 1; i >= 0; i--) {
398 litros += parseFloat($scope.remitosTabla[i].litros); 415 litros += parseFloat($scope.remitosTabla[i].litros);
399 } 416 }
400 417
401 $scope.hojaRuta.litros = litros; 418 $scope.hojaRuta.litros = litros;
402 419
403 }; 420 };
404 } 421 }
405 ] 422 ]
406 ) 423 )
407 .controller('hojaRutaListaCtrl', [ 424 .controller('hojaRutaListaCtrl', [
408 '$scope', 425 '$scope',
409 'crearHojaRutaService', 426 'crearHojaRutaService',
410 '$location', 427 '$location',
411 function($scope, crearHojaRutaService, $location) { 428 function($scope, crearHojaRutaService, $location) {
412 crearHojaRutaService.obtenerHojaRuta().then(function(datos) { 429 crearHojaRutaService.obtenerHojaRuta().then(function(datos) {
413 $scope.hojaRutas = datos.data; 430 $scope.hojaRutas = datos.data;
414 }); 431 });
415 $scope.editar = function(hojaRuta) { 432 $scope.editar = function(hojaRuta) {
416 crearHojaRutaService.setHojaRuta(hojaRuta); 433 crearHojaRutaService.setHojaRuta(hojaRuta);
417 $location.path('/venta-nota-pedido/abm/'); 434 $location.path('/venta-nota-pedido/abm/');
418 }; 435 };
419 $scope.crearPedido = function() { 436 $scope.crearPedido = function() {
420 crearHojaRutaService.clearHojaRuta(); 437 crearHojaRutaService.clearHojaRuta();
421 $location.path('/venta-nota-pedido/abm/'); 438 $location.path('/venta-nota-pedido/abm/');
422 }; 439 };
423 } 440 }
424 ]) 441 ])
425 .controller('focaCrearHojaRutaFichaClienteController', [ 442 .controller('focaCrearHojaRutaFichaClienteController', [
426 '$scope', 443 '$scope',
427 'crearHojaRutaService', 444 'crearHojaRutaService',
428 '$location', 445 '$location',
429 function($scope, crearHojaRutaService, $location) { 446 function($scope, crearHojaRutaService, $location) {
430 crearHojaRutaService.obtenerHojaRuta().then(function(datos) { 447 crearHojaRutaService.obtenerHojaRuta().then(function(datos) {
431 $scope.hojaRutas = datos.data; 448 $scope.hojaRutas = datos.data;
432 }); 449 });
433 $scope.editar = function(hojaRuta) { 450 $scope.editar = function(hojaRuta) {
434 crearHojaRutaService.setHojaRuta(hojaRuta); 451 crearHojaRutaService.setHojaRuta(hojaRuta);
435 $location.path('/venta-nota-pedido/abm/'); 452 $location.path('/venta-nota-pedido/abm/');
436 }; 453 };
437 $scope.crearPedido = function() { 454 $scope.crearPedido = function() {
438 crearHojaRutaService.clearHojaRuta(); 455 crearHojaRutaService.clearHojaRuta();
439 $location.path('/venta-nota-pedido/abm/'); 456 $location.path('/venta-nota-pedido/abm/');
440 }; 457 };
441 } 458 }
442 ]); 459 ]);
443 460
src/views/hoja-ruta.html
1 <div class="crear-hoja-ruta foca-crear one-row row"> 1 <div class="crear-hoja-ruta foca-crear one-row row">
2 <foca-cabecera-facturador 2 <foca-cabecera-facturador
3 titulo="'HOJA DE RUTA'" 3 titulo="'HOJA DE RUTA'"
4 numero="puntoVenta + '-' + comprobante" 4 numero="puntoVenta + '-' + comprobante"
5 fecha="now" 5 fecha="now"
6 class="mb-0 col-lg-12" 6 class="mb-0 col-lg-12"
7 ></foca-cabecera-facturador> 7 ></foca-cabecera-facturador>
8 <div class="col-lg-12"> 8 <div class="col-lg-12">
9 <div class="row mt-4"> 9 <div class="row mt-4">
10 <div class="col-12 col-md-10 border border-light rounded"> 10 <div class="col-12 col-md-10 border border-light rounded">
11 <div class="row px-5 py-2 botonera-secundaria"> 11 <div class="row px-5 py-2 botonera-secundaria">
12 <div class="col-12"> 12 <div class="col-12">
13 <foca-botonera-facturador botones="botonera" extra="1" class="row"></foca-botonera-facturador> 13 <foca-botonera-facturador botones="botonera" extra="7" class="row"></foca-botonera-facturador>
14 </div> 14 </div>
15 </div> 15 </div>
16 <!-- PC --> 16 <!-- PC -->
17 <div class="row grilla-articulo align-items-end d-none d-sm-flex"> 17 <div class="row grilla-articulo align-items-end d-none d-sm-flex">
18 <table class="table tabla-articulo table-striped table-sm mb-0 rounded-bottom"> 18 <table class="table tabla-articulo table-striped table-sm mb-0 rounded-bottom">
19 <thead> 19 <thead>
20 <tr class="d-flex"> 20 <tr class="d-flex">
21 <th class="col-auto">#</th> 21 <th class="col-auto">#</th>
22 <th class="col-2">Remito</th> 22 <th class="col-2">Remito</th>
23 <th class="col">Cliente</th> 23 <th class="col">Cliente</th>
24 <th class="col">Dirección</th> 24 <th class="col">Dirección</th>
25 <th class="text-right" style="width: 80px">Cantidad</th> 25 <th class="text-right" style="width: 80px">Cantidad</th>
26 <th class="col-auto"> 26 <th class="col-auto">
27 <button 27 <button
28 class="btn btn-outline-light selectable" 28 class="btn btn-outline-light selectable"
29 ng-click="show = !show; masMenos()" 29 ng-click="show = !show; masMenos()"
30 > 30 >
31 <i 31 <i
32 class="fa fa-chevron-down" 32 class="fa fa-chevron-down"
33 ng-show="show" 33 ng-show="show"
34 aria-hidden="true" 34 aria-hidden="true"
35 > 35 >
36 </i> 36 </i>
37 <i 37 <i
38 class="fa fa-chevron-up" 38 class="fa fa-chevron-up"
39 ng-hide="show" 39 ng-hide="show"
40 aria-hidden="true"> 40 aria-hidden="true">
41 </i> 41 </i>
42 </button> 42 </button>
43 </th> 43 </th>
44 </th> 44 </th>
45 </tr> 45 </tr>
46 </thead> 46 </thead>
47 <tbody class="tabla-articulo-body"> 47 <tbody class="tabla-articulo-body">
48 <tr 48 <tr
49 ng-repeat="(key, remito) in remitosTabla" 49 ng-repeat="(key, remito) in remitosTabla"
50 class="d-flex" 50 class="d-flex"
51 ng-show="show || key == remitosTabla.length - 1" 51 ng-show="show || key == remitosTabla.length - 1"
52 > 52 >
53 <td ng-bind="key + 1" class="col-auto"></td> 53 <td ng-bind="key + 1" class="col-auto"></td>
54 <td 54 <td
55 class="col-2" 55 class="col-2"
56 ng-bind="rellenar(remito.sucursal, 4) + '-' + rellenar(remito.numeroRemito, 8)" 56 ng-bind="rellenar(remito.sucursal, 4) + '-' + rellenar(remito.numeroRemito, 8)"
57 ></td> 57 ></td>
58 <th class="col" ng-bind="remito.cliente[0].NOM"></th> 58 <th class="col" ng-bind="remito.cliente[0].NOM"></th>
59 <th class="col" ng-bind="remito.domicilioStamp"></th> 59 <th class="col" ng-bind="remito.domicilioStamp"></th>
60 <th class="text-right" ng-bind="remito.litros" style="width: 80px"></th> 60 <th class="text-right" ng-bind="remito.litros" style="width: 80px"></th>
61 <td class="text-center col-auto"> 61 <td class="text-center col-auto">
62 <button 62 <button
63 class="btn btn-outline-light" 63 class="btn btn-outline-light"
64 ng-click="quitarArticulo(key)" 64 ng-click="quitarArticulo(key)"
65 > 65 >
66 <i class="fa fa-trash"></i> 66 <i class="fa fa-trash"></i>
67 </button> 67 </button>
68 </td> 68 </td>
69 </tr> 69 </tr>
70 </tbody> 70 </tbody>
71 <tfoot> 71 <tfoot>
72 <tr class="d-flex"> 72 <tr class="d-flex">
73 <td class="col-auto px-1"> 73 <td class="col-auto px-1">
74 <strong>Remitos:</strong> 74 <strong>Remitos:</strong>
75 <a ng-bind="remitosTabla.length"></a> 75 <a ng-bind="remitosTabla.length"></a>
76 </td> 76 </td>
77 <td class="col"></td> 77 <td class="col"></td>
78 <td class="col-auto px-1"> 78 <td class="col-auto px-1">
79 <strong>Cantidad:</strong> 79 <strong>Cantidad:</strong>
80 <a ng-bind="hojaRuta.litros"></a> 80 <a ng-bind="hojaRuta.litros"></a>
81 </td> 81 </td>
82 </tr> 82 </tr>
83 </tfoot> 83 </tfoot>
84 </table> 84 </table>
85 </div> 85 </div>
86 86
87 <!-- MOBILE --> 87 <!-- MOBILE -->
88 <div class="row d-sm-none"> 88 <div class="row d-sm-none">
89 <table class="table table-sm table-striped tabla-articulo margin-bottom-mobile"> 89 <table class="table table-sm table-striped tabla-articulo margin-bottom-mobile">
90 <thead> 90 <thead>
91 <tr class="d-flex"> 91 <tr class="d-flex">
92 <th class="">#</th> 92 <th class="">#</th>
93 <th class="col px-0"> 93 <th class="col px-0">
94 <div class="d-flex"> 94 <div class="d-flex">
95 <div class="col-4 px-1">Código</div> 95 <div class="col-4 px-1">Código</div>
96 <div class="col-8 px-1">Descripción</div> 96 <div class="col-8 px-1">Descripción</div>
97 </div> 97 </div>
98 <div class="d-flex"> 98 <div class="d-flex">
99 <div class="col-3 px-1">Cantidad</div> 99 <div class="col-3 px-1">Cantidad</div>
100 <div class="col px-1 text-right">P. Uni.</div> 100 <div class="col px-1 text-right">P. Uni.</div>
101 <div class="col px-1 text-right">Subtotal</div> 101 <div class="col px-1 text-right">Subtotal</div>
102 </div> 102 </div>
103 </th> 103 </th>
104 <th class="text-center tamaño-boton"> 104 <th class="text-center tamaño-boton">
105 &nbsp; 105 &nbsp;
106 </th> 106 </th>
107 </tr> 107 </tr>
108 </thead> 108 </thead>
109 <tbody> 109 <tbody>
110 <tr 110 <tr
111 ng-repeat="(key, articulo) in remitosTabla" 111 ng-repeat="(key, articulo) in remitosTabla"
112 ng-show="show || key == remitosTabla.length - 1" 112 ng-show="show || key == remitosTabla.length - 1"
113 > 113 >
114 <td class="w-100 align-middle d-flex p-0"> 114 <td class="w-100 align-middle d-flex p-0">
115 <div class="align-middle p-1"> 115 <div class="align-middle p-1">
116 <span ng-bind="key+1" class="align-middle"></span> 116 <span ng-bind="key+1" class="align-middle"></span>
117 </div> 117 </div>
118 <div class="col px-0"> 118 <div class="col px-0">
119 <div class="d-flex"> 119 <div class="d-flex">
120 <div class="col-4 px-1"> 120 <div class="col-4 px-1">
121 <span 121 <span
122 ng-bind="articulo.sector + '-' + articulo.codigo" 122 ng-bind="articulo.sector + '-' + articulo.codigo"
123 ></span> 123 ></span>
124 </div> 124 </div>
125 <div class="col-8 px-1"> 125 <div class="col-8 px-1">
126 <span ng-bind="articulo.descripcion"></span> 126 <span ng-bind="articulo.descripcion"></span>
127 </div> 127 </div>
128 </div> 128 </div>
129 <div class="d-flex"> 129 <div class="d-flex">
130 <div class="col-3 px-1"> 130 <div class="col-3 px-1">
131 <span ng-bind="'x' + articulo.cantidad"></span> 131 <span ng-bind="'x' + articulo.cantidad"></span>
132 </div> 132 </div>
133 <div class="col-3 px-1 text-right"> 133 <div class="col-3 px-1 text-right">
134 <span ng-bind="articulo.precio | currency: hojaRuta.moneda.simbolo : 4"></span> 134 <span ng-bind="articulo.precio | currency: hojaRuta.moneda.simbolo : 4"></span>
135 </div> 135 </div>
136 <div class="col px-1 text-right"> 136 <div class="col px-1 text-right">
137 <span 137 <span
138 ng-bind="(articulo.precio * articulo.cantidad) | currency: hojaRuta.moneda.simbolo" 138 ng-bind="(articulo.precio * articulo.cantidad) | currency: hojaRuta.moneda.simbolo"
139 > 139 >
140 </span> 140 </span>
141 </div> 141 </div>
142 </div> 142 </div>
143 </div> 143 </div>
144 <div class="align-middle p-1"> 144 <div class="align-middle p-1">
145 <button 145 <button
146 class="btn btn-outline-light" 146 class="btn btn-outline-light"
147 ng-click="quitarArticulo(key)" 147 ng-click="quitarArticulo(key)"
148 > 148 >
149 <i class="fa fa-trash"></i> 149 <i class="fa fa-trash"></i>
150 </button> 150 </button>
151 </div> 151 </div>
152 </td> 152 </td>
153 </tr> 153 </tr>
154 </tbody> 154 </tbody>
155 <tfoot> 155 <tfoot>
156 <!-- CARGANDO ITEM --> 156 <!-- CARGANDO ITEM -->
157 <tr ng-show="!cargando" class="d-flex"> 157 <tr ng-show="!cargando" class="d-flex">
158 <td 158 <td
159 class="align-middle p-1" 159 class="align-middle p-1"
160 ng-bind="remitosTabla.length + 1" 160 ng-bind="remitosTabla.length + 1"
161 ></td> 161 ></td>
162 <td class="col p-0"> 162 <td class="col p-0">
163 <div class="d-flex"> 163 <div class="d-flex">
164 <div class="col-4 px-1"> 164 <div class="col-4 px-1">
165 <span 165 <span
166 ng-bind="articuloACargar.sectorCodigo" 166 ng-bind="articuloACargar.sectorCodigo"
167 ></span> 167 ></span>
168 </div> 168 </div>
169 <div class="col-8 px-1"> 169 <div class="col-8 px-1">
170 <span ng-bind="articuloACargar.descripcion"></span> 170 <span ng-bind="articuloACargar.descripcion"></span>
171 </div> 171 </div>
172 </div> 172 </div>
173 <div class="d-flex"> 173 <div class="d-flex">
174 <div class="col-3 px-1 m-1"> 174 <div class="col-3 px-1 m-1">
175 <input 175 <input
176 class="form-control p-1" 176 class="form-control p-1"
177 type="number" 177 type="number"
178 min="1" 178 min="1"
179 ng-model="articuloACargar.cantidad" 179 ng-model="articuloACargar.cantidad"
180 foca-focus="!cargando" 180 foca-focus="!cargando"
181 ng-keypress="agregarATabla($event.keyCode)" 181 ng-keypress="agregarATabla($event.keyCode)"
182 style="height: auto; line-height: 1.1em" 182 style="height: auto; line-height: 1.1em"
183 > 183 >
184 </div> 184 </div>
185 <div class="col-3 px-1 text-right"> 185 <div class="col-3 px-1 text-right">
186 <span ng-bind="articuloACargar.precio | currency: hojaRuta.moneda.simbolo : 4"></span> 186 <span ng-bind="articuloACargar.precio | currency: hojaRuta.moneda.simbolo : 4"></span>
187 </div> 187 </div>
188 <div class="col px-1 text-right"> 188 <div class="col px-1 text-right">
189 <span 189 <span
190 ng-bind="getSubTotal() | currency: hojaRuta.moneda.simbolo" 190 ng-bind="getSubTotal() | currency: hojaRuta.moneda.simbolo"
191 > 191 >
192 </span> 192 </span>
193 </div> 193 </div>
194 </div> 194 </div>
195 </td> 195 </td>
196 <td class="text-center align-middle"> 196 <td class="text-center align-middle">
197 <button 197 <button
198 class="btn btn-outline-light" 198 class="btn btn-outline-light"
199 ng-click="agregarATabla(13)" 199 ng-click="agregarATabla(13)"
200 > 200 >
201 <i class="fa fa-save"></i> 201 <i class="fa fa-save"></i>
202 </button> 202 </button>
203 </td> 203 </td>
204 </tr> 204 </tr>
205 <!-- SELECCIONAR PRODUCTO --> 205 <!-- SELECCIONAR PRODUCTO -->
206 <tr ng-show="cargando" class="d-flex"> 206 <tr ng-show="cargando" class="d-flex">
207 <td class="col-12"> 207 <td class="col-12">
208 <input 208 <input
209 placeholder="Seleccione Articulo" 209 placeholder="Seleccione Articulo"
210 class="form-control form-control-sm" 210 class="form-control form-control-sm"
211 readonly 211 readonly
212 ng-click="seleccionarArticulo()" 212 ng-click="seleccionarArticulo()"
213 /> 213 />
214 </td> 214 </td>
215 </tr> 215 </tr>
216 <!-- TOOGLE EXPANDIR --> 216 <!-- TOOGLE EXPANDIR -->
217 <tr> 217 <tr>
218 <td class="col"> 218 <td class="col">
219 <button 219 <button
220 class="btn btn-outline-light selectable w-100" 220 class="btn btn-outline-light selectable w-100"
221 ng-click="show = !show; masMenos()" 221 ng-click="show = !show; masMenos()"
222 ng-show="remitosTabla.length > 0" 222 ng-show="remitosTabla.length > 0"
223 > 223 >
224 <i 224 <i
225 class="fa fa-chevron-down" 225 class="fa fa-chevron-down"
226 ng-hide="show" 226 ng-hide="show"
227 aria-hidden="true" 227 aria-hidden="true"
228 > 228 >
229 </i> 229 </i>
230 <i 230 <i
231 class="fa fa-chevron-up" 231 class="fa fa-chevron-up"
232 ng-show="show" 232 ng-show="show"
233 aria-hidden="true"> 233 aria-hidden="true">
234 </i> 234 </i>
235 </button> 235 </button>
236 </td> 236 </td>
237 </tr> 237 </tr>
238 <!-- FOOTER --> 238 <!-- FOOTER -->
239 <tr class="d-flex"> 239 <tr class="d-flex">
240 <td class="align-middle no-border-top" colspan="2"> 240 <td class="align-middle no-border-top" colspan="2">
241 <strong>Cantidad Items:</strong> 241 <strong>Cantidad Items:</strong>
242 <a ng-bind="remitosTabla.length"></a> 242 <a ng-bind="remitosTabla.length"></a>
243 </td> 243 </td>
244 <td class="text-right ml-auto table-celda-total no-border-top"> 244 <td class="text-right ml-auto table-celda-total no-border-top">
245 <h3>Total:</h3> 245 <h3>Total:</h3>
246 </td> 246 </td>
247 <td class="table-celda-total text-right no-border-top"> 247 <td class="table-celda-total text-right no-border-top">
248 <h3>{{getTotal() | currency: hojaRuta.moneda.simbolo}}</h3> 248 <h3>{{getTotal() | currency: hojaRuta.moneda.simbolo}}</h3>
249 </td> 249 </td>
250 </tr> 250 </tr>
251 </tfoot> 251 </tfoot>
252 </table> 252 </table>
253 </div> 253 </div>
254 </div> 254 </div>
255 <div class="col-auto my-2 col-lg-2 botonera-lateral d-none">
256 <div class="col-12 mt-auto">
257 <button
258 ng-click="crearHojaRuta()"
259 type="submit"
260 title="Crear nota pedido"
261 class="btn btn-default btn-block mb-2 border border-dark">
262 <strong>GUARDAR</strong>
263 </button>
264 <button
265 type="submit"
266 title="Crear nota pedido"
267 class="btn btn-default btn-block mb-2 border border-dark">
268 <strong>PAUSAR</strong>
269 </button>
270 <button
271 ng-click="salir()"
272 type="button"
273 title="Salir"
274 class="btn btn-default btn-block border border-dark">
275 <strong>SALIR</strong>
276 </button>
277 </div>
278 </div>
279 </div> 255 </div>
280 </div> 256 </div>
281 <div class="row d-md-none fixed-bottom"> 257 <div class="row d-md-none fixed-bottom">
282 <div class="w-100 bg-dark d-flex px-3 acciones-mobile"> 258 <div class="w-100 bg-dark d-flex px-3 acciones-mobile">
283 <span class="ml-3 text-muted" ng-click="salir()">Salir</span> 259 <span class="ml-3 text-muted" ng-click="salir()">Salir</span>
284 <span class="mr-3 ml-auto" ng-click="crearHojaRuta()">Guardar</span> 260 <span class="mr-3 ml-auto" ng-click="crearHojaRuta()">Guardar</span>
285 </div> 261 </div>
286 </div> 262 </div>
287 </div> 263 </div>
288 264