- VERSION 4.08.11

- Se agrego que cuando se revisa venta de Kellogg's, traiga el estatus del arqueo y de la liquidación.
This commit is contained in:
Jose Alberto Guerra Ugalde
2024-08-15 18:43:25 -06:00
parent 7822b5e2e9
commit f390c2d6d6
4 changed files with 167 additions and 7 deletions

View File

@@ -30,11 +30,11 @@ Module3=Subs
NumberOfFiles=6
NumberOfLibraries=11
NumberOfModules=3
Version=12.5
Version=12.8
@EndOfDesignText@
#Region Project Attributes
#ApplicationLabel: Soporte Keymonsoft
#VersionName: 3.11.15
#VersionName: 4.08.11
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False
@@ -65,6 +65,7 @@ Sub Process_Globals
'These variables can be accessed from all modules.
Dim DBRS_1782 As String = "http://keymon.lat:1782"
Dim DBRS_1781 As String = "http://keymon.lat:1781"
Dim DBRS_9000 As String = "http://keymon.lat:9000"
' Dim DBRS_1782 As String = "http://11.0.0.231:1783" 'Para pruebas locales
' Dim DBRS_1782 As String = "http://187.189.244.154:1782" 'Para pruebas locales
Dim conexionDBRS As String = "externa"
@@ -184,6 +185,17 @@ Sub Globals
Private l_tipoVentaBV As Label
Private p_tipoVentaBV As Panel
Dim elTipoDeVenta As String
Private b_pasarInfoMovilKellogs As Button
Private b_pasarInfoMovilDurakelo As Button
Private b_pasarInfoMovilDurakeloRep As Button
Private b_pasarInfoMovilIntmex As Button
Private l_resVentaTitulo As Label
Private l_resVentaTotal As Label
Private l_resArqueo As Label
Private l_resLiquidacion As Label
Private b_cerrar As Button
Private p_resVenta As Panel
Private p_resVentaTransparente As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
@@ -449,6 +461,10 @@ Sub WobbleMenu1_Tab6Click 'Facturacion
' Subs.centraPanelEnPanel(Panel16, PanelFacturacion)
Subs.centraBotonEnPanel(b_libBanderaFactura, PanelFacturacion)
Subs.centraBotonEnPanel(b_libBanderaCargaForanea, PanelFacturacion)
Subs.centraBotonEnPanel(b_pasarInfoMovilKellogs, PanelFacturacion)
Subs.centraBotonEnPanel(b_pasarInfoMovilDurakelo, PanelFacturacion)
Subs.centraBotonEnPanel(b_pasarInfoMovilDurakeloRep, PanelFacturacion)
Subs.centraBotonEnPanel(b_pasarInfoMovilIntmex, PanelFacturacion)
End Sub
Sub WobbleMenu1_Tab7Click 'About
@@ -684,6 +700,26 @@ Sub JobDone(Job As HttpJob)
cmd.Name = "select_soporte" 'Reintentamos conexión.
reqManager.ExecuteQuery(cmd , 0, "pruebaConexion", 0)
End If
else If Job.Tag = "pasarInfoMovilKell" Then
' Subs.logJobDoneResultados(result)
b_pasarInfoMovilKellogs.Enabled = True
DateTime.DateFormat = "HH:mm:ss"
b_pasarInfoMovilKellogs.Text = $"PasarInfoMovil Kelloggs"$
else If Job.Tag = "pasarInfoMovilDur" Then
' Subs.logJobDoneResultados(result)
b_pasarInfoMovilDurakelo.Enabled = True
DateTime.DateFormat = "HH:mm:ss"
b_pasarInfoMovilDurakelo.Text = $"PasarInfoMovil Durakelo"$
else If Job.Tag = "pasarInfoMovilDurRep" Then
' Subs.logJobDoneResultados(result)
b_pasarInfoMovilDurakeloRep.Enabled = True
DateTime.DateFormat = "HH:mm:ss"
b_pasarInfoMovilDurakeloRep.Text = $"PasarInfoMovil Durakelo Rep"$
else If Job.Tag = "pasarInfoMovilIntmex" Then
' Subs.logJobDoneResultados(result)
b_pasarInfoMovilIntmex.Enabled = True
DateTime.DateFormat = "HH:mm:ss"
b_pasarInfoMovilIntmex.Text = $"PasarInfoMovil Intmex"$
Else
LogColor("JobDone Error: " & Job.ErrorMessage, Colors.red)
Toast("Error: " & Job.ErrorMessage, 0)
@@ -927,6 +963,7 @@ Sub JobDone(Job As HttpJob)
If Job.JobName = "DBRequest" Then 'Buscamos si existe la venta.
Dim result As DBResult = reqManager.HandleJob(Job)
If result.Tag = "select_ventaXrutaKelloggs_soporte" Then 'query tag
b_revisaVenta2.text = "Revisar Venta"
Log(reqManager.HandleJob(Job).Rows.Size)
Log(result.Rows.Size)
For Each records() As Object In result.Rows
@@ -934,6 +971,13 @@ Sub JobDone(Job As HttpJob)
Log(result.Tag & ": " & k & ": " & records(result.Columns.Get(k)))
Next
Toast($"Ruta ${records(result.Columns.Get("HVD_RUTA"))}${CRLF}$$1.2{records(result.Columns.Get("MONTO"))}, ${records(result.Columns.Get("HVD_TIPOVENTA"))}"$, 0)
Log(123)
l_resVentaTitulo.Text = $"Ruta ${records(result.Columns.Get("HVD_RUTA"))}"$
l_resVentaTotal.Text = $"$$1.2{records(result.Columns.Get("MONTO"))}, ${records(result.Columns.Get("HVD_TIPOVENTA"))}"$
p_resVentaTransparente.Left = 0 : p_resVentaTransparente.top = 0
p_resVentaTransparente.Width = Activity.Width : p_resVentaTransparente.height = Activity.height
Subs.centraPanelEnPanel(p_resVenta, p_resVentaTransparente)
p_resVentaTransparente.Visible = True
Next
If result.Rows.Size = 0 Then Toast("NO HAY VENTA", 0)
End If
@@ -1117,6 +1161,29 @@ Sub JobDone(Job As HttpJob)
s_tipoVentaBV.SelectedIndex = 0
Toast("Venta Eliminada.", 0)
End If
If result.Tag = "pasarInfoMovilKell" Then
Subs.logJobDoneResultados(result)
' s_almacenBV.SelectedIndex = 0
' et_rutaBV.Text = ""
' s_tipoVentaBV.SelectedIndex = 0
b_pasarInfoMovilKellogs.Enabled = True
DateTime.DateFormat = "HH:mm:ss"
b_pasarInfoMovilKellogs.Text = $"PasarInfoMovil Kelloggs"$
Toast("Corriendo PasarInfoMovil Kelloggs.", 0)
End If
If result.Tag = "revisaArqueoYLiquidacion_Kelloggs" Then
b_revisaVenta2.text = "Revisar Venta"
Subs.logJobDoneResultados(result)
For Each records() As Object In result.Rows
Private arqueo As String = records(result.Columns.Get("ARQUEO"))
If arqueo = "null" Then arqueo = "ABIERTO"
Private liquidado As String = records(result.Columns.Get("LIQUIDADO"))
If liquidado <> "NO" Then liquidado = records(result.Columns.Get("HVD_DTECIERRE"))
l_resArqueo.Text = $"ARQUEO: ${arqueo}"$
l_resLiquidacion.Text = $"LIQUIDADA: ${liquidado}"$
Next
p_resVentaTransparente.Visible = True
End If
End If
Job.Release
End If
@@ -1126,6 +1193,7 @@ End Sub
Private Sub et_login_TextChanged (Old As String, New As String)
Private contrasenaHoy As String = pass1 & DateTime.GetDayOfMonth(DateTime.Now) & DateTime.GetHour(DateTime.now)
Log($"${contrasenaHoy}"$)
Log(New)
If New = contrasenaHoy Then
p_login.Visible = False
Sleep(80)
@@ -1206,11 +1274,20 @@ End Sub
Private Sub b_revisaVenta2_Click
kb.HideKeyboard
b_revisaVenta2.text = "Revisando ..."
Private rut As String = et_ruta2.text.Trim
cmd.Name = "select_ventaXrutaKelloggs_soporte"
cmd.Parameters = Array As Object(rut, almacenKelloggs, tipoVentaKelloggs)
Log($"mandamos: ruta=${rut}, almacen=${almacenKelloggs}"$)
reqManager.ExecuteQuery(cmd, 0 , "select_ventaXrutaKelloggs_soporte", 0)
reqManager.Initialize(Me, DBRS_1781)
cmd.Name = "revisaArqueoYLiquidacion_Kelloggs"
cmd.Parameters = Array As Object(almacenKelloggs, rut, almacenKelloggs, rut)
Log($"mandamos: ruta=${rut}, almacen=${almacenKelloggs}"$)
reqManager.ExecuteQuery(cmd, 0 , "revisaArqueoYLiquidacion_Kelloggs", 0)
Sleep(500)
reqManager.Initialize(Me, DBRS_1781)
End Sub
Private Sub b_revisaVenta3_Click
@@ -1266,6 +1343,7 @@ End Sub
Private Sub b_borrarPagare_Click
kb.HideKeyboard
reqManager.Initialize(Me, DBRS_1781)
cmd.Name = "proc_QUITAR_PAGOPAGARE_KELLOGGS"
cmd.Parameters = Array As Object(et_referencia.text.Trim, et_folio.Text.Trim, et_monto.Text.Trim)
Log($"Mandamos: ref:${et_referencia.text}, folio:${et_folio.Text}, monto:${et_monto.Text}"$)
@@ -1274,6 +1352,8 @@ End Sub
Private Sub b_libBanderaFactura_Click
kb.HideKeyboard
reqManager.Initialize(Me, DBRS_1781)
' reqManager.Initialize(Me, "http://keymon.lat:9001") 'DBReqSrver de pruebas
cmd.Name = "proc_LIBERA_BANDERA_FACTURACION_KELLOGGS"
' cmd.Parameters = Array As Object(et_referencia.text, et_folio.Text, et_monto.Text)
' Log($"Mandamos: ref:${et_referencia.text}, folio:${et_folio.Text}, monto:${et_monto.Text}"$)
@@ -1282,6 +1362,7 @@ Private Sub b_libBanderaFactura_Click
End Sub
Private Sub b_libBanderaCargaForanea_Click
reqManager.Initialize(Me, DBRS_1781)
kb.HideKeyboard
cmd.Name = "proc_LIBERA_BANDERA_CARGAFORANEA_KELLOGGS"
cmd.Parameters = Array As Object("101", "")
@@ -1397,7 +1478,7 @@ Private Sub b_revisarVentaBV_Click
End Sub
Private Sub s_tipoVentaBV_ItemClick (Position As Int, Value As Object)
elTipoDeVenta = value
elTipoDeVenta = Value
End Sub
Private Sub et_rutaBV_TextChanged (Old As String, New As String)
@@ -1438,4 +1519,60 @@ Private Sub s_empresaBV_ItemClick (Position As Int, Value As Object)
Next
s_almacenBV.SelectedIndex = 0
Log($"Empresa seleccionada: ${Value}"$ )
End Sub
Private Sub b_pasarInfoMovilKellogs_Click
b_pasarInfoMovilKellogs.Enabled = False
DateTime.DateFormat = "HH:mm:ss"
b_pasarInfoMovilKellogs.Text = $"pimKell - Inicio a las ${DateTime.Date(DateTime.Now)}"$
Toast("Corriendo PasarInfoMovil Kelloggs.", 0)
' reqManager.Initialize(Me, "http://keymon.lat:9001")
reqManager.Initialize(Me, DBRS_1781)
cmd.Initialize
cmd.Name = "sp_pasarInfo_Kelloggs"
reqManager.ExecuteQuery(cmd , 0, "pasarInfoMovilKell", 180000) 'request con timeout largo en ms.
End Sub
Private Sub b_pasarInfoMovilDurakelo_Click
b_pasarInfoMovilDurakelo.Enabled = False
DateTime.DateFormat = "HH:mm:ss"
b_pasarInfoMovilDurakelo.Text = $"pimDur - Inicio a las ${DateTime.Date(DateTime.Now)}"$
Toast("Corriendo PasarInfoMovil Durakelo.", 0)
' reqManager.Initialize(Me, "http://keymon.lat:9001")
reqManager.Initialize(Me, DBRS_1781)
cmd.Initialize
cmd.Name = "sp_pasarInfo_Durakelo"
reqManager.ExecuteQuery(cmd , 0, "pasarInfoMovilDur", 180000) 'request con timeout largo en ms.
End Sub
Private Sub b_pasarInfoMovilDurakeloRep_Click
b_pasarInfoMovilDurakeloRep.Enabled = False
DateTime.DateFormat = "HH:mm:ss"
b_pasarInfoMovilDurakeloRep.Text = $"pimDurRep - Inicio a las ${DateTime.Date(DateTime.Now)}"$
Toast("Corriendo PasarInfoMovil Durakelo Rep.", 0)
' reqManager.Initialize(Me, "http://keymon.lat:9001")
reqManager.Initialize(Me, DBRS_1781)
cmd.Initialize
cmd.Name = "sp_pasarInfo_DurakeloRep"
reqManager.ExecuteQuery(cmd , 0, "pasarInfoMovilDurRep", 180000) 'request con timeout largo en ms.
End Sub
Private Sub b_pasarInfoMovilIntmex_Click
b_pasarInfoMovilIntmex.Enabled = False
DateTime.DateFormat = "HH:mm:ss"
b_pasarInfoMovilIntmex.Text = $"pimIntmex - Inicio a las ${DateTime.Date(DateTime.Now)}"$
Toast("Corriendo PasarInfoMovil Intmex.", 0)
' reqManager.Initialize(Me, "http://keymon.lat:9001")
reqManager.Initialize(Me, DBRS_1781)
cmd.Initialize
cmd.Name = "sp_pasarInfo_Intmex"
reqManager.ExecuteQuery(cmd , 0, "pasarInfoMovilIntmex", 180000) 'request con timeout largo en ms.
End Sub
Private Sub b_cerrar_Click
p_resVentaTransparente.Visible = False
End Sub
Private Sub p_resVentaTransparente_Click
p_resVentaTransparente.Visible = False
End Sub