Commit 262c826ac8b847359783bc68795c1566a650733a
1 parent
e9fe03dc09
Exists in
master
and in
1 other branch
espacios
Showing
1 changed file
with
10 additions
and
10 deletions
Show diff stats
src/js/osm-directive.js
| ... | ... | @@ -13,10 +13,10 @@ angular.module('focaAdminSeguimiento').directive('osm', function() { |
| 13 | 13 | for(var i in $scope.markers) { |
| 14 | 14 | $scope.map.removeLayer($scope.markers[i]); |
| 15 | 15 | } |
| 16 | - | |
| 16 | + | |
| 17 | 17 | $scope.markers = []; |
| 18 | 18 | var observacion = ''; |
| 19 | - | |
| 19 | + | |
| 20 | 20 | angular.forEach($scope.marcadores, function(marcador) { |
| 21 | 21 | if ($scope.parametros.actividad === 'Nota de pedido') { |
| 22 | 22 | observacion = generarObservacion(getNotaPedido(marcador)); |
| ... | ... | @@ -35,7 +35,7 @@ angular.module('focaAdminSeguimiento').directive('osm', function() { |
| 35 | 35 | L.marker([marcador.latitud, marcador.longitud]).addTo($scope.map) |
| 36 | 36 | .bindPopup(observacion) |
| 37 | 37 | ); |
| 38 | - | |
| 38 | + | |
| 39 | 39 | $scope.markers[0].openPopup(); |
| 40 | 40 | } |
| 41 | 41 | }); |
| ... | ... | @@ -46,7 +46,7 @@ angular.module('focaAdminSeguimiento').directive('osm', function() { |
| 46 | 46 | if (!marcador.notaPedido.id) { |
| 47 | 47 | return false; |
| 48 | 48 | } |
| 49 | - | |
| 49 | + | |
| 50 | 50 | var notaPedido = marcador.notaPedido; |
| 51 | 51 | var textVendedor = notaPedido.idVendedor + ' - '; |
| 52 | 52 | |
| ... | ... | @@ -59,11 +59,11 @@ angular.module('focaAdminSeguimiento').directive('osm', function() { |
| 59 | 59 | if (!$scope.parametros.individual) { |
| 60 | 60 | observacion.push(['Ultima Nota de Pedido', '']); |
| 61 | 61 | } |
| 62 | - | |
| 62 | + | |
| 63 | 63 | var textFecha = $filter('date')(marcador.fecha.slice(0,10), 'dd/MM/yyyy') + |
| 64 | 64 | ' ' + marcador.fecha.slice(11,19); |
| 65 | 65 | observacion.push(['Fecha', textFecha]); |
| 66 | - | |
| 66 | + | |
| 67 | 67 | observacion.push(['Nº', |
| 68 | 68 | $filter('comprobante')([notaPedido.sucursal, notaPedido.numeroNotaPedido ]) |
| 69 | 69 | ]); |
| ... | ... | @@ -71,7 +71,7 @@ angular.module('focaAdminSeguimiento').directive('osm', function() { |
| 71 | 71 | if (notaPedido.cliente) { |
| 72 | 72 | observacion.push(['Cliente', notaPedido.cliente.NOM]); |
| 73 | 73 | } |
| 74 | - | |
| 74 | + | |
| 75 | 75 | if ($scope.parametros.individual) { |
| 76 | 76 | observacion.push(['Total', $filter('currency')(notaPedido.total, '$')]); |
| 77 | 77 | observacion.unshift(['Orden', marcador.orden]); |
| ... | ... | @@ -109,7 +109,7 @@ angular.module('focaAdminSeguimiento').directive('osm', function() { |
| 109 | 109 | observacion += 'Nº: ' + $filter('comprobante')([ |
| 110 | 110 | marcador.sucursal, marcador.idUsuario]) + '<br/>'; |
| 111 | 111 | observacion += 'Cliente: ' + marcador.recibo.cliente.NOM + '<br/>'; |
| 112 | - | |
| 112 | + | |
| 113 | 113 | if ($scope.parametros.individual) { |
| 114 | 114 | if (marcador.distancia) { |
| 115 | 115 | observacion += 'Distancia a casa central: ' + |
| ... | ... | @@ -149,14 +149,14 @@ angular.module('focaAdminSeguimiento').directive('osm', function() { |
| 149 | 149 | observacion += 'Fecha: ' + |
| 150 | 150 | $filter('date')(marcador.fecha.slice(0,10), 'dd/MM/yyyy') + ' ' + |
| 151 | 151 | marcador.fecha.slice(11,19) + '<br/>'; |
| 152 | - | |
| 152 | + | |
| 153 | 153 | observacion += 'Nº: ' + $filter('comprobante')([ |
| 154 | 154 | remito.sucursal, |
| 155 | 155 | remito.numeroRemito |
| 156 | 156 | ]) + '<br/>'; |
| 157 | 157 | observacion += 'Cliente: ' + |
| 158 | 158 | remito.cliente.NOM + '<br/>'; |
| 159 | - | |
| 159 | + | |
| 160 | 160 | if ($scope.parametros.individual) { |
| 161 | 161 | observacion += 'Producto: ' + |
| 162 | 162 | remito.articulosRemito[0].descripcion + '<br/>'; |