- VERSION 5.03.08

- Se agregó codigo para la confirmacion de pagares mediante WhatsApp en Cliente.
- Se agregaron 270 segundos (4.5 minutos) al tiempo calculado en el ruteo de Clientes.
- Se hicieorn mas pequeños los números de los globitos en MAPAS_RUTAS, de 20 a 15.
- Se puso un toastMessage cuando las coordenadas del CEDIS están en CERO.
This commit is contained in:
2025-03-09 00:35:10 -06:00
parent 2c9cdf7a6b
commit 8043a7787d
12 changed files with 837 additions and 674 deletions

View File

@@ -274,8 +274,8 @@ End Sub
'Mandamos "coords" en un mensaje a "Sprvsr"
Sub mandamosLoc(coords As String) 'ignore
'' Log("Iniciamos mandamosLoc "&coords)
'' Log("locRequest="&Tracker.locRequest)
'' Log("Iniciamos mandamosLoc "&coords)
'' Log("locRequest="&Tracker.locRequest)
' guardaInfoEnBD(coords)'Escribimos coordenadas y fecha a una bd
' Dim t As String
' If Tracker.locRequest="Activa" Then
@@ -293,10 +293,10 @@ End Sub
'Regresa la fecha y hora de hoy a las 00:00 en el formato "yyMMddHHMMSS"
Sub fechaInicioHoy As String 'ignore
Dim OrigFormat As String = DateTime.DateFormat 'save orig date format
DateTime.DateFormat="yyMMdd"
Private h As String = DateTime.Date(DateTime.Now)&"000000"
DateTime.DateFormat=OrigFormat 'return to orig date format
Dim OrigFormat As String = DateTime.DateFormat 'save orig date format
DateTime.DateFormat="yyMMdd"
Private h As String = DateTime.Date(DateTime.Now)&"000000"
DateTime.DateFormat=OrigFormat 'return to orig date format
Log("Hoy="&h)
Return h
End Sub
@@ -319,12 +319,12 @@ End Sub
'Regresa verdadero si ya pasaron XX minutos de la fechaKMT dada
Sub masDeXXMinsKMT(hora As String, mins As Int) As Boolean 'ignore
Try
' LogColor($"Hora=${fechaKMT(fechaKMT2Ticks(hora) + mins * DateTime.TicksPerMinute)}, Mins=${mins}, Actual=${fechaKMT(DateTime.Now)}"$,Colors.red)
' LogColor($"Hora=${fechaKMT(fechaKMT2Ticks(hora) + mins * DateTime.TicksPerMinute)}, Mins=${mins}, Actual=${fechaKMT(DateTime.Now)}"$,Colors.red)
If fechaKMT2Ticks(hora) + mins * DateTime.TicksPerMinute < DateTime.Now Then
' Log("+++ +++ "&fechaKMT(fechaKMT2Ticks(hora) + mins * DateTime.TicksPerMinute) & " < " & fechaKMT(DateTime.Now))
Return True
Else
' Log("+++ +++ "&fechaKMT(fechaKMT2Ticks(hora) + mins * DateTime.TicksPerMinute) & " > " & fechaKMT(DateTime.Now))
' Log("+++ +++ "&fechaKMT(fechaKMT2Ticks(hora) + mins * DateTime.TicksPerMinute) & " > " & fechaKMT(DateTime.Now))
Return False
End If
Catch
@@ -406,7 +406,7 @@ End Sub
'Revisamos que el servicio "PushService" este inicializado y activo
Sub revisaPushService 'ignore
' Private todoBienPS As Boolean = True
'' LogColor("**** **** Revisamos PushService **** ****", Colors.RGB(78,0,227))
'' LogColor("**** **** Revisamos PushService **** ****", Colors.RGB(78,0,227))
' Try
' If Not(PushService.wsh.IsInitialized) Then 'Si no esta inicializado ...
' log2DB("revisaPushService: No esta inicializado ... 'Reinicializando PushService'")
@@ -501,16 +501,16 @@ Sub dameErroresJSON(SQL As SQL, maxErrores As Int, comprimido As Boolean) As Str
cur.Close
j.Initialize(m2)
Log(j.ToString)
If comprimido Then
If comprimido Then
Return compress(j.ToString)
Else
Else
Return j.ToString
End If
End Sub
'Convierte una fecha en formato YYMMDDHHMMSS a Ticks
Sub fechaKMT2Ticks(fKMT As String) As Long 'ignore
Try
Try
If fKMT.Length = 12 Then
Private parteFecha As String = fKMT.SubString2(0,6)
Private parteHora As String = fKMT.SubString(6)
@@ -628,7 +628,7 @@ Sub centraBoton(elemento As Button, anchoElementoSuperior As Int) 'ignore
End Sub
'Trae el nombre del producto con ID dado, desde HIST_VENTAS.
Sub traeNombre(id As String) As String
Sub traeNombre(id As String) As String
Private nombre As String
Private idc As Cursor = kmt.ExecQuery($"select HVD_PRONOMBRE from HIST_VENTAS where HVD_PROID = '${id}'"$)
idc.Position=0
@@ -713,18 +713,17 @@ End Sub
Sub traeConversion(id As String) As String
Private pu As String = "0"
Private idc As Cursor = kmt.ExecQuery($"select CONVERSION from CAT_GUNAPROD where CAT_GP_ID = '${id}'"$)
If idc.RowCount > 0 Then
idc.Position=0
If idc.RowCount > 0 And IsNumber(idc.GetString("CONVERSION")) Then pu = idc.GetString("CONVERSION")
Private idc As Cursor = kmt.ExecQuery($"select CONVERSION from CAT_GUNAPROD where CAT_GP_ID = '${id}'"$)
If idc.RowCount > 0 Then
idc.Position=0
If idc.RowCount > 0 And IsNumber(idc.GetString("CONVERSION")) Then pu = idc.GetString("CONVERSION")
' Log("id=" & id & "|p=" & x & "|" & idc.GetString("CAT_GP_PRECIO"))
End If
idc.Close
End If
idc.Close
Return pu
End Sub
'Trae el cliente desde la BD.
Sub traeCliente As String 'ignore
Private cli As Cursor = Starter.skmt.ExecQuery("Select CUENTA from cuentaa")
@@ -1093,6 +1092,16 @@ Sub CreateBitmapWithNumber(OriginalBitmap As Bitmap, Number As Int) As Bitmap 'i
' Dibujar la imagen original
Canvas.DrawBitmap(OriginalBitmap, Null, DestRect)
' Dibujar el número en el centro del Bitmap y configurar el estilo del texto
Canvas.DrawText(Number, (OriginalBitmap.Width / 2), (OriginalBitmap.Height / 2.4), Typeface.DEFAULT, 20, Colors.White, "CENTER")
Canvas.DrawText(Number, (OriginalBitmap.Width / 2), (OriginalBitmap.Height / 2.4), Typeface.DEFAULT, 15, Colors.White, "CENTER")
Return NewBitmap
End Sub
'Muestra en el Log los campos y valores que regresan en el JobDone.
Sub logJobDoneResultados(resultado As DBResult)
For Each records() As Object In resultado.Rows
LogColor($"====== ${resultado.Tag} - REGISTROS = ${resultado.Rows.Size}"$, Colors.RGB(215,37,0))
For Each k As String In resultado.Columns.Keys
LogColor(k & " = " & records(resultado.Columns.Get(k)), Colors.RGB(215,37,0))
Next
Next
End Sub