mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-20 03:29:14 +00:00
Cambios para que si se cambia la impresora no sea necesario borrar la MAC.
This commit is contained in:
@@ -276,6 +276,7 @@ Sub Class_Globals
|
||||
Private Panel11 As Panel
|
||||
Private BP_DOE_R1 As Button
|
||||
Dim RMI_VALOR As String
|
||||
Dim errorImpresora As Int = 0
|
||||
End Sub
|
||||
|
||||
'You can add more parameters here.
|
||||
@@ -336,7 +337,7 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
End If
|
||||
End If
|
||||
c=Starter.skmt.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("MACIMP"))
|
||||
c.Position =0
|
||||
c.Position = 0
|
||||
If c.RowCount > 0 Then
|
||||
MAC_IMPRESORA = c.GetString("CAT_VA_VALOR")
|
||||
Else
|
||||
@@ -357,6 +358,15 @@ Sub B4XPage_Appear
|
||||
Subs.panelVisibleCompleto(P_INF_GENERAL, Root)
|
||||
' P_INF_GENERAL.Height = Root.Height
|
||||
' P_INF_GENERAL.Width = Root.Width
|
||||
c=Starter.skmt.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("MACIMP"))
|
||||
c.Position = 0
|
||||
If c.RowCount > 0 Then
|
||||
MAC_IMPRESORA = c.GetString("CAT_VA_VALOR")
|
||||
Else
|
||||
MAC_IMPRESORA = 0
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)", Array As Object ("MACIMP","0"))
|
||||
End If
|
||||
Starter.MAC_IMPRESORA = MAC_IMPRESORA
|
||||
et_geopass.Text = ""
|
||||
If Subs.traeUltimaActividadBD <> "Cliente" Then Subs.iniciaActividad(Subs.traeUltimaActividadBD)
|
||||
If Not(muestraBoleta) Then P_INF_GENERAL.Visible = True
|
||||
@@ -416,7 +426,7 @@ Sub B4XPage_Appear
|
||||
If c.GetString("CAT_CL_LONG") <> Null And c.GetString("CAT_CL_LONG") <> "null" And IsNumber(c.GetString("CAT_CL_LONG")) Then LONGITUD = c.GetString("CAT_CL_LONG")
|
||||
LATITUD = 0
|
||||
If c.GetString("CAT_CL_LAT") <> Null And c.GetString("CAT_CL_LAT") <> "null" And IsNumber(c.GetString("CAT_CL_LAT")) Then LATITUD = c.GetString("CAT_CL_LAT")
|
||||
LogColor($"${c.GetString("CAT_CL_LAT")}, ${c.GetString("CAT_CL_LONG")}"$, Colors.red)
|
||||
' LogColor($"${c.GetString("CAT_CL_LAT")}, ${c.GetString("CAT_CL_LONG")}"$, Colors.red)
|
||||
If logger Then Log($"Lat: ${LATITUD}, Lon: ${LONGITUD}"$)
|
||||
NOMBRE = c.GetString("CAT_CL_NOMBRE")
|
||||
' Log(l_total.text)
|
||||
@@ -501,6 +511,7 @@ Sub B4XPage_Appear
|
||||
Else
|
||||
Cuestionario
|
||||
End If
|
||||
' Log(Subs.revisaImpresa)
|
||||
If YA_IMPRIMIO2 = 0 Then
|
||||
Guardar.Visible = False
|
||||
Else
|
||||
@@ -599,6 +610,8 @@ Sub B4XPage_Appear
|
||||
GPS_LocationChanged(Tracker.FLP.GetLastKnownLocation)
|
||||
End If
|
||||
muestraBoleta = False
|
||||
' Log(Subs.revisaImpresa)
|
||||
If Subs.revisaImpresa Then Guardar.Visible = True
|
||||
End Sub
|
||||
|
||||
Sub Printer1_Connected (Success As Boolean)
|
||||
@@ -613,10 +626,19 @@ Sub Printer1_Connected (Success As Boolean)
|
||||
Else
|
||||
' Msgbox(Printer1.ConnectedErrorMsg, "Error connecting.") 'ignore
|
||||
' ToastMessageShow("Error conectando la impresora", False)
|
||||
If logger Then LogColor("Error conectando la impresora", Colors.Red)
|
||||
LogColor("Error conectando la impresora", Colors.Red)
|
||||
errorImpresora = errorImpresora + 1
|
||||
If errorImpresora > 1 Then
|
||||
Starter.MAC_IMPRESORA = "0"
|
||||
errorImpresora = 0
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Sub Printer1_Error
|
||||
Log("error printer")
|
||||
End Sub
|
||||
|
||||
Sub GPS_LocationChanged (Location1 As Location)
|
||||
'Este codigo se corre desde Tracker/flp_LocationChanged
|
||||
b_ubicacion.TextColor = Colors.Gray
|
||||
@@ -624,8 +646,8 @@ Sub GPS_LocationChanged (Location1 As Location)
|
||||
b_ubicacion.TextColor = Colors.White
|
||||
If logger Then Log($"${Location1.Latitude}, ${Location1.Longitude}, ${Location1.Accuracy}"$)
|
||||
|
||||
If m_lat = Null Or m_lat = "" Then m_lat = 0
|
||||
If m_lon = Null Or m_lon = "" Then m_lon = 0
|
||||
If m_lat = Null Or m_lat = "null" Or m_lat = "" Then m_lat = 0
|
||||
If m_lon = Null Or m_lon = "null" Or m_lon = "" Then m_lon = 0
|
||||
|
||||
Private ubicacionTienda As Location
|
||||
ubicacionTienda.Initialize
|
||||
|
||||
Reference in New Issue
Block a user