Compare View
Commits (3)
-
Develop See merge request !31
-
Develop See merge request !33
Showing
1 changed file
Show diff stats
src/js/osm-directive.js
| ... | ... | @@ -57,7 +57,7 @@ angular.module('focaAdminSeguimiento').directive('osm', function() { |
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | - if (marcador.visita) icon.options.iconUrl = 'img/marker-icon-2x-yellow.png'; | |
| 60 | + // if (marcador.visita) icon.options.iconUrl = 'img/marker-icon-2x-yellow.png'; | |
| 61 | 61 | |
| 62 | 62 | if (observacion) { |
| 63 | 63 | $scope.markers.push( |
| ... | ... | @@ -74,15 +74,17 @@ angular.module('focaAdminSeguimiento').directive('osm', function() { |
| 74 | 74 | function getNotaPedido(marcador) { |
| 75 | 75 | var observacion = []; |
| 76 | 76 | |
| 77 | - if(marcador.visita) { | |
| 78 | - return getVisita(marcador); | |
| 79 | - } else if(!marcador.notaPedido.id) { | |
| 80 | - return false; | |
| 81 | - } | |
| 77 | + // if(marcador.visita) { | |
| 78 | + // return getVisita(marcador); | |
| 79 | + // } else if(!marcador.id) { | |
| 80 | + // return false; | |
| 81 | + // } | |
| 82 | 82 | |
| 83 | - var notaPedido = marcador.notaPedido; | |
| 83 | + var notaPedido = marcador; | |
| 84 | 84 | |
| 85 | - if (notaPedido.vendedor) { | |
| 85 | + if (notaPedido.vendedor && | |
| 86 | + notaPedido.vendedor.NUM && | |
| 87 | + notaPedido.vendedor.NOM) { | |
| 86 | 88 | observacion.push([ |
| 87 | 89 | 'Vendedor', |
| 88 | 90 | notaPedido.vendedor.NUM + ' - ' + notaPedido.vendedor.NOM |
| ... | ... | @@ -94,8 +96,8 @@ angular.module('focaAdminSeguimiento').directive('osm', function() { |
| 94 | 96 | observacion.push(['Ultima Nota de Pedido', '']); |
| 95 | 97 | } |
| 96 | 98 | |
| 97 | - var textFecha = $filter('date')(marcador.fecha.slice(0,10), 'dd/MM/yyyy') + | |
| 98 | - ' ' + marcador.fecha.slice(11,19); | |
| 99 | + var textFecha = $filter('date')(notaPedido.fechaCarga.slice(0,10), 'dd/MM/yyyy') + | |
| 100 | + ' ' + notaPedido.fechaCarga.slice(11,19); | |
| 99 | 101 | observacion.push(['Fecha', textFecha]); |
| 100 | 102 | |
| 101 | 103 | observacion.push(['Nº', |
| ... | ... | @@ -108,7 +110,7 @@ angular.module('focaAdminSeguimiento').directive('osm', function() { |
| 108 | 110 | |
| 109 | 111 | if ($scope.parametros.individual) { |
| 110 | 112 | observacion.push(['Total', $filter('currency')(notaPedido.total, '$')]); |
| 111 | - observacion.unshift(['Orden', marcador.orden]); | |
| 113 | + // observacion.unshift(['Orden', marcador.orden]); | |
| 112 | 114 | |
| 113 | 115 | if (marcador.distancia) { |
| 114 | 116 | observacion.push(['Distancia a casa central', |
| ... | ... | @@ -117,11 +119,11 @@ angular.module('focaAdminSeguimiento').directive('osm', function() { |
| 117 | 119 | } |
| 118 | 120 | } else { |
| 119 | 121 | observacion.push(['Cantidad de nota de pedido', |
| 120 | - marcador.cantidad | |
| 122 | + notaPedido.cantidad | |
| 121 | 123 | ]); |
| 122 | 124 | |
| 123 | 125 | observacion.push(['Total Vendido', |
| 124 | - $filter('currency')(marcador.total, '$') | |
| 126 | + $filter('currency')(notaPedido.total, '$') | |
| 125 | 127 | ]); |
| 126 | 128 | } |
| 127 | 129 |