se modifica para que cuando carguen día no aparezcan los clientes como no gestionados

This commit is contained in:
Javier
2025-09-03 16:22:28 -06:00
parent 3d4a0e3e12
commit 8d784e4448
4 changed files with 23 additions and 10 deletions

View File

@@ -495,14 +495,14 @@ Sub gest_Click
End If
'Buscamos en el historial de cuestionarios si el cliente ya tiene cuestionario contestado.
Private hc As Cursor = Starter.skmt.ExecQuery($"select count(HC_CLIENTE) as cuantos from HIST_CUESTIONARIO where HC_CLIENTE = '${Subs.traeCliente}'"$)
hc.Position = 0
Log($"${cuest.encuestaIniciada} - ${hc.GetString("cuantos")} - ${cuest.clienteConCuestionario(Subs.traeCliente)}"$)
If la_cuenta.Text <> "0" And Not(cuest.encuestaIniciada) And hc.GetString("cuantos") = 0 And Not(cuest.clienteConCuestionario(Subs.traeCliente)) Then
cuest.agregaPregunta("1", "¿Se puede acceder al negocio o está enrejado?", Array As String("No, está enrejado o no se tiene acceso", "Si se pude acceder"))
Return False
End If
' Private hc As Cursor = Starter.skmt.ExecQuery($"select count(HC_CLIENTE) as cuantos from HIST_CUESTIONARIO where HC_CLIENTE = '${Subs.traeCliente}'"$)
' hc.Position = 0
' Log($"${cuest.encuestaIniciada} - ${hc.GetString("cuantos")} - ${cuest.clienteConCuestionario(Subs.traeCliente)}"$)
'
' If la_cuenta.Text <> "0" And Not(cuest.encuestaIniciada) And hc.GetString("cuantos") = 0 And Not(cuest.clienteConCuestionario(Subs.traeCliente)) Then
' cuest.agregaPregunta("1", "¿Se puede acceder al negocio o está enrejado?", Array As String("No, está enrejado o no se tiene acceso", "Si se pude acceder"))
' Return False
' End If
Private x As Cursor = B4XPages.MainPage.skmt.ExecQuery($"select tienda_id from COORDENADAS_GPS where tienda_id = '${la_cuenta.text}'"$)
' Log("+++++++++++++ " & x.RowCount)
If la_cuenta.Text<> "0" And distance > 50 And x.RowCount = 0 Then

View File

@@ -554,6 +554,7 @@ Sub B4XPage_Appear
End Sub
Sub Subir_Click
checaPedido
CARGA = "SUBIR"
p_mandaInfo.Width = Root.Width
p_mandaInfo.Height = Root.Height
@@ -2217,6 +2218,7 @@ Sub B_OK_PAS_Click
Resumen.Visible= True
img2.Visible=False
Subs.panelVisible(p_principal, 0, 0)
checaPedido
Else if CARGA = "CARGAR" And (S_CP.Text <> "LISTO" Or S_CC.Text <> "LISTO" Or S_CH.Text <> "LISTO") Then
RES = Msgbox2("Seguro que desea abortar el proceso","Cierre", "Si", "", "No",LoadBitmap(File.DirAssets,"alert2.png")) 'ignore
If RES = DialogResponse.POSITIVE Then
@@ -2711,4 +2713,15 @@ Sub val_Terminado(msg As String)
b_muestraPendientes.Text = msg
Sleep (1000)
p_muestraPendientes.Visible = False
End Sub
Sub checaPedido
Private c As Cursor = Starter.skmt.ExecQuery("SELECT PC_CLIENTE FROM PEDIDO_CLIENTE")
If c.RowCount > 0 Then
Starter.skmt.ExecNonQuery("Update kmt_info set gestion = 2 WHERE CAT_CL_CODIGO IN (SELECT PC_CLIENTE FROM PEDIDO_CLIENTE)")
End If
Private c As Cursor = Starter.skmt.ExecQuery("SELECT NV_CLIENTE FROM NOVENTA")
If c.RowCount > 0 Then
Starter.skmt.ExecNonQuery("Update kmt_info set gestion = 3 WHERE CAT_CL_CODIGO IN (SELECT NV_CLIENTE FROM NOVENTA)")
End If
End Sub

View File

@@ -164,7 +164,7 @@ Version=12.8
#Region Project Attributes
#ApplicationLabel: Intmex
#VersionCode: 1
#VersionName: 5.08.31
#VersionName: 5.09.02
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False

View File

@@ -91,6 +91,6 @@ ModuleClosedNodes6=
ModuleClosedNodes7=
ModuleClosedNodes8=
ModuleClosedNodes9=
NavigationStack=C_Productos,B4XPage_CloseRequest,429,0,C_Productos,llenaCatalogo,391,0,Diseñador Visual,productos.bal,-100,6,C_Productos,cuentaProds,764,0,C_Productos,B4XPage_Appear,216,0,C_Productos,LlenaProdsLL,1176,0,C_Productos,lv_catalogos_ItemClick,254,1,C_Productos,b_prodMenos_Click,572,0,C_Productos,b_prodMas_Click,649,6,C_Productos,et_pCant_TextChanged,745,6
NavigationStack=C_Productos,et_pCant_TextChanged,745,6,C_Cuestionario,agregaPregunta,60,0,C_Cliente,gest_Click,491,0,C_Cliente,cuest_preguntaContestada,1534,0,C_Principal,Class_Globals,0,0,C_Principal,val_Terminado,2708,0,C_Principal,checaPedido,2709,0,C_Principal,Subir_Click,550,0,C_Principal,JobDone,1708,0,C_Principal,B_OK_PAS_Click,2214,0,C_Productos,Class_Globals,0,0
SelectedBuild=0
VisibleModules=28,2,13,20,14,29,17,15,9,4