Correção LAT E LONG mudando a , para ponto
This commit is contained in:
@@ -59,8 +59,10 @@ module SimpliRoute
|
||||
|
||||
private
|
||||
|
||||
# Monta [valores, tipos] de uma linha (A..Z). Lat/long numéricos quando há
|
||||
# match; D/E como texto ("08:00"/"18:00"); NF/ref como texto (igual ao exemplo).
|
||||
# Monta [valores, tipos] de uma linha (A..Z). Lat/long como TEXTO com ponto
|
||||
# decimal — se fossem numéricas, Excel/LibreOffice em pt-BR exibiria vírgula
|
||||
# (locale) e o cliente subiria "-23,57" pro SimpliRoute; D/E como texto
|
||||
# ("08:00"/"18:00"); NF/ref como texto (igual ao exemplo).
|
||||
def linha(l)
|
||||
lat = l[:latitude]
|
||||
lng = l[:longitude]
|
||||
@@ -72,8 +74,8 @@ module SimpliRoute
|
||||
l[:janela_fim], # E
|
||||
l[:tempo], # F
|
||||
l[:anotacoes].to_s, # G
|
||||
(lat.nil? ? '' : lat), # H
|
||||
(lng.nil? ? '' : lng), # I
|
||||
lat.to_s, # H
|
||||
lng.to_s, # I
|
||||
l[:referencia].to_s, # J
|
||||
'', '', # K, L
|
||||
l[:contato].to_s, # M
|
||||
@@ -82,8 +84,8 @@ module SimpliRoute
|
||||
]
|
||||
tipos = [
|
||||
:string, :string, :integer, :string, :string, :integer, :string,
|
||||
(lat.nil? ? :string : :float), # H
|
||||
(lng.nil? ? :string : :float), # I
|
||||
:string, # H
|
||||
:string, # I
|
||||
:string, :string, :string, :string, :string,
|
||||
*Array.new(VAZIAS_FINAIS.size, :string)
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user