Commit 537d7045096291dbcd00a63499b77b55406bd8d7
Exists in
master
and in
2 other branches
Merge branch 'master' into 'develop'
Master(benjamin) See merge request !131
Showing
1 changed file
Show diff stats
src/js/controller.js
... | ... | @@ -48,7 +48,6 @@ angular.module('focaCrearRemito').controller('remitoController', |
48 | 48 | }); |
49 | 49 | |
50 | 50 | init(); |
51 | - | |
52 | 51 | } |
53 | 52 | |
54 | 53 | function init() { |
... | ... | @@ -290,13 +289,16 @@ angular.module('focaCrearRemito').controller('remitoController', |
290 | 289 | //validacion por domicilio y por plazo pago |
291 | 290 | $scope.crearRemito = function () { |
292 | 291 | |
293 | - if (!remitoBusinessService.validarRemito($scope.remito, $scope.articulosFiltro())) | |
294 | - { | |
292 | + if (!remitoBusinessService.validarRemito($scope.remito, $scope.articulosFiltro())) { | |
295 | 293 | return; |
296 | 294 | } |
297 | 295 | |
298 | 296 | focaBotoneraLateralService.startGuardar(); |
299 | 297 | $scope.saveLoading = true; |
298 | + var rutaJson = JSON.parse($localStorage.rutas); | |
299 | + removeItemFromArr(rutaJson, 'venta-remito/crear'); | |
300 | + $localStorage.rutas = JSON.stringify(rutaJson); | |
301 | + | |
300 | 302 | var save = { |
301 | 303 | remito: { |
302 | 304 | id: $scope.remito.id, |
... | ... | @@ -874,7 +876,7 @@ angular.module('focaCrearRemito').controller('remitoController', |
874 | 876 | cotizacionPArgentino.moneda = moneda; |
875 | 877 | |
876 | 878 | actualizarCabeceraMoneda(cotizacionPArgentino); |
877 | - $filter('filter')($scope.botonera, | |
879 | + $filter('filter')($scope.botonera, | |
878 | 880 | { label: 'Moneda' })[0].checked = true; |
879 | 881 | $scope.remito.cotizacion = cotizacionPArgentino; |
880 | 882 | }); |
... | ... | @@ -912,7 +914,7 @@ angular.module('focaCrearRemito').controller('remitoController', |
912 | 914 | cotizacion.moneda = moneda; |
913 | 915 | $scope.remitoIsDirty = true; |
914 | 916 | actualizarCabeceraMoneda(cotizacion); |
915 | - $filter('filter')($scope.botonera, | |
917 | + $filter('filter')($scope.botonera, | |
916 | 918 | { label: 'Moneda' })[0].checked = true; |
917 | 919 | $scope.remito.cotizacion = cotizacion; |
918 | 920 | }, function () { |
... | ... | @@ -1068,6 +1070,14 @@ angular.module('focaCrearRemito').controller('remitoController', |
1068 | 1070 | } |
1069 | 1071 | } |
1070 | 1072 | |
1073 | + function removeItemFromArr(arr, item) { | |
1074 | + var i = arr.indexOf(item); | |
1075 | + | |
1076 | + if (i !== -1) { | |
1077 | + arr.splice(i, 1); | |
1078 | + } | |
1079 | + } | |
1080 | + | |
1071 | 1081 | function salir() { |
1072 | 1082 | var confirmacion = false; |
1073 | 1083 | |
... | ... | @@ -1081,6 +1091,9 @@ angular.module('focaCrearRemito').controller('remitoController', |
1081 | 1091 | ).then(function (data) { |
1082 | 1092 | if (data) { |
1083 | 1093 | $location.path('/'); |
1094 | + var rutaJson = JSON.parse($localStorage.rutas); | |
1095 | + removeItemFromArr(rutaJson, 'venta-remito/crear'); | |
1096 | + $localStorage.rutas = JSON.stringify(rutaJson); | |
1084 | 1097 | } |
1085 | 1098 | }); |
1086 | 1099 | } else { |
... | ... | @@ -1267,6 +1280,10 @@ angular.module('focaCrearRemito').controller('remitoController', |
1267 | 1280 | nombre: numeroRemito + '.pdf', |
1268 | 1281 | url: '/remito/comprobante', |
1269 | 1282 | }, |
1283 | + descargaSinValorizar: { | |
1284 | + nombre: numeroRemito + '.pdf', | |
1285 | + url: '/remito/comprobanteSV', | |
1286 | + }, | |
1270 | 1287 | envio: { |
1271 | 1288 | mailCliente: cliente.MAIL, |
1272 | 1289 | url: '/remito/mail', |