diff --git a/B4A/C_Cliente.bas b/B4A/C_Cliente.bas index ffb5395..d624afe 100644 --- a/B4A/C_Cliente.bas +++ b/B4A/C_Cliente.bas @@ -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 diff --git a/B4A/C_Principal.bas b/B4A/C_Principal.bas index 3d591fa..66c40a2 100644 --- a/B4A/C_Principal.bas +++ b/B4A/C_Principal.bas @@ -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 \ No newline at end of file diff --git a/B4A/INTMEX.b4a b/B4A/INTMEX.b4a index e645306..6ffd546 100644 --- a/B4A/INTMEX.b4a +++ b/B4A/INTMEX.b4a @@ -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 diff --git a/B4A/INTMEX.b4a.meta b/B4A/INTMEX.b4a.meta index 27ea769..8a02ca8 100644 --- a/B4A/INTMEX.b4a.meta +++ b/B4A/INTMEX.b4a.meta @@ -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