diff --git a/B4A/C_Principal.bas b/B4A/C_Principal.bas index 664a88a..dac2119 100644 --- a/B4A/C_Principal.bas +++ b/B4A/C_Principal.bas @@ -446,12 +446,19 @@ Sub B4XPage_Appear ' Subs.guardaUltimaActividadBD("principal") ' Revisamos si hay abordo y si SI hay y no esta impreso, lo borramos. - Private imp As ResultSet = Starter.skmt.ExecQuery("select IMPRESION from kmt_info where CAT_CL_CODIGO = '0'") 'Revisamos si el cliente 0 esta impreso. + Private impr As Cursor = Starter.skmt.ExecQuery("select count(*) as CUANTOS from kmt_info where (impresion = 1 or cat_cl_codigo in (select ci_cuenta from cliente_impreso)) and CAT_CL_CODIGO = '0'") Private abordoImpreso As Boolean = False - Do While imp.NextRow - If imp.GetString("IMPRESION") = 1 Then abordoImpreso = True ' - Loop +' Log($"REGISTROS: ${impr.RowCount}"$) + If impr.RowCount > 0 Then + impr.Position = 0 + If impr.GetInt("CUANTOS") > 0 Then +' Log("IMPRESION = 1") + abordoImpreso = True + End If + End If + Log($"##### ABORDO IMPRESO = ${abordoImpreso}"$) Private ab As ResultSet = Starter.skmt.ExecQuery("select * from PEDIDO where PE_CLIENTE = '0'") + Log($"### HAY ABORDO: ${ab.RowCount}"$) Do While ab.NextRow If Not(abordoImpreso) Then LogColor("BORRAMOS PEDIDO DE ABORDO PORQUE NO ESTA IMPRESO", Colors.red) @@ -3671,4 +3678,20 @@ End Sub Private Sub r_1_CheckedChange(Checked As Boolean) r_razonNoVisita = r_1.Text +End Sub + +Private Sub BUSCA_LongClick + Private impr As Cursor = Starter.skmt.ExecQuery("select IMPRESION from kmt_info where CAT_CL_CODIGO = '0'") 'Revisamos si el cliente 0 esta impreso. + Private abordoImpreso As Boolean = False + Log("select IMPRESION from kmt_info where CAT_CL_CODIGO = '0'") + Log($"REGISTROS: ${impr.RowCount}"$) + If impr.RowCount > 0 Then + impr.Position = 0 + Log($">>>>>>> IMPRESION: |${impr.GetInt("IMPRESION")}|"$) + ToastMessageShow($"IMPRESION: |${impr.GetInt("IMPRESION")}|"$, False) + If impr.GetInt("IMPRESION") = 1 Then + Log("IMPRESION = 1") + abordoImpreso = True + End If + End If End Sub \ No newline at end of file diff --git a/B4A/KelloggsV4.b4a b/B4A/KelloggsV4.b4a index abe5977..8683baf 100644 --- a/B4A/KelloggsV4.b4a +++ b/B4A/KelloggsV4.b4a @@ -887,7 +887,7 @@ Version=12.8 #Region Project Attributes #ApplicationLabel: Kelloggs Venta #VersionCode: 3000 - #VersionName: 4.07.24 + #VersionName: 4.07.31 #SupportedOrientations: portrait #CanInstallToExternalStorage: False #BridgeLogger:true diff --git a/B4A/KelloggsV4.b4a.meta b/B4A/KelloggsV4.b4a.meta index c7de3ee..e6c43a6 100644 --- a/B4A/KelloggsV4.b4a.meta +++ b/B4A/KelloggsV4.b4a.meta @@ -91,6 +91,6 @@ ModuleClosedNodes6= ModuleClosedNodes7= ModuleClosedNodes8= ModuleClosedNodes9= -NavigationStack=C_Productos,et_pCant_FocusChanged,808,1,C_Productos,l_prodX_LongClick,1167,0,C_Productos,et_pCant_TextChanged,719,6,kms_helperSubs,totalPedido,1181,0,kms_helperSubs,ping,1129,0,kms_helperSubs,traeLimiteCredito,1163,1,Visual Designer,principal.bal,-100,2,C_Principal,B4XPage_Appear,424,5,Subs,guardaProductoSinGestion,922,0,C_Productos,b_prodMas_Click,645,0 +NavigationStack=C_Principal,b_reactivaRuta_Click,3634,0,C_Principal,b_noVisita_Click,3590,0,Subs,revisaImpresa,1585,0,C_Principal,e_ruta_EnterPressed,2190,0,C_Cliente,b_noVenta_Click,872,0,C_Cliente,gest_Click,866,0,C_Cliente,Guardar_Click,932,0,B4XMainPage,Initialize,122,0,Visual Designer,principal.bal,-100,2,C_Principal,B4XPage_Appear,440,6,C_Productos,cuentaProds,869,0 SelectedBuild=0 VisibleModules=1,28,11,3,26,23,29,12,4,13