Version 5.11.25

This commit is contained in:
2026-03-18 10:53:45 -06:00
parent 257ab5018a
commit 831bec62fc
22 changed files with 7642 additions and 115 deletions

View File

@@ -158,6 +158,17 @@ Sub traeUsuarioDeBD As String 'ignore
Return u
End Sub
'Regresa el usuario de la tabla USUARIOA
Sub traeUsuario As String 'ignore
Private c As Cursor
Private u As String = "SinUsuario"
c = B4XPages.MainPage.skmt.ExecQuery("select USUARIO from usuarioa")
c.Position = 0
If c.RowCount > 0 Then u = c.GetString("USUARIO")
c.Close
Return u
End Sub
'Regresa la ruta actual de la base de datos.
Sub traeRuta As String 'ignore
Private c As Cursor
@@ -229,4 +240,50 @@ Sub logJobDoneResultados(resultado As DBResult)
LogColor(k & " = " & records(resultado.Columns.Get(k)), Colors.RGB(215,37,0))
Next
Next
End Sub
Sub traeFecha As String 'ignore
DateTime.DateFormat = "MM/dd/yyyy"
Private sDate As String =DateTime.Date(DateTime.Now)
Private sTime As String =DateTime.Time(DateTime.Now)
Return sDate & sTime
End Sub
Sub parseHTTPError(error As String) As String
Private nuevoError As String = error
Private inicio As Int = error.IndexOf("<title>")
Private final As Int = error.IndexOf("</title>")
Log("|" & inicio & "|" & final & "|")
If inicio > 0 And final > 0 Then
nuevoError = error.SubString2(inicio + 17, final)
' LogColor(error.SubString2(inicio + 17, final), Colors.Blue)
End If
Return nuevoError
End Sub
'Trae el precio del ID dado, desde CAT_GUNAPROD o HIST_VENTAS, dependiendo de si es promoción o no Y CAJAS.
Sub traeConversion(id As String) As String
Private pu As String = "0"
Private idc As Cursor = B4XPages.MainPage.skmt.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
Return pu
End Sub
'Trae un string con hora, minutos y segundos - HHmmss
Sub hmsKMT As String 'ignore
' Log(fecha)
Dim OrigFormat As String = DateTime.DateFormat 'save orig date format
DateTime.DateFormat="HHmmss"
Private nuevaHora As String=DateTime.Date(DateTime.Now)
DateTime.DateFormat=OrigFormat 'return to orig date format
' Log(nuevaFecha)
Return nuevaHora
End Sub