Version final productivo 4.10.19

This commit is contained in:
cvaldes1201
2024-11-02 15:57:12 -06:00
parent 76fe782492
commit ec7d9ddc36
17 changed files with 934 additions and 372 deletions

View File

@@ -38,6 +38,7 @@ Sub Class_Globals
Private CHECK As Int
Private l_baseodia As Label
Private CREDITO As Label
End Sub
'You can add more parameters here.
@@ -75,7 +76,7 @@ Sub B4XPage_Appear
busca.Text = ""
entro ="2"
colonia = 0
c=B4XPages.MainPage.skmt.ExecQuery($"select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where gestion = 0 AND CAT_CL_CODIGO <> ${"0"} AND CAT_CL_CODIGO <> ${"1"} ORDER BY CAT_CL_CODIGO"$)
c=B4XPages.MainPage.skmt.ExecQuery($"select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where gestion = 0 AND CAT_CL_CODIGO <> ${"0"} AND CAT_CL_CODIGO <> ${"1"} ORDER BY CAST(CAT_CL_NUM_SERIEFISICO AS INTEGER) ASC"$)
ListView1.Clear
lfila.Text = "NOMBRE"
@@ -89,7 +90,21 @@ Sub B4XPage_Appear
Else
cxc.Visible = True
End If
d.Close
d = B4XPages.MainPage.skmt.ExecQuery($"select IFNULL(CAT_CL_BCREDITO,0) AS CAT_CL_BCREDITO FROM kmt_info WHERE CAT_CL_CODIGO = '${c.GetString("CAT_CL_CODIGO")}'"$)
' LogColor(d.RowCount,Colors.Blue)
If d.RowCount > 0 Then
d.Position = 0
If d.GetString("CAT_CL_BCREDITO") = "1" Then
CREDITO.Visible = True
Else
CREDITO.Visible = False
End If
d.Close
Else
CREDITO.Visible = False
End If
Next
If c.RowCount>0 Then
For i=0 To c.RowCount -1
@@ -187,7 +202,7 @@ End Sub
Sub BUSCA_TextChanged (Old As String, New As String)
If CHECK = 0 Then
q_buscar = "%" & busca.Text & "%"
c2=B4XPages.MainPage.skmt.ExecQuery2($"select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where (CAT_CL_NOMBRE like ? OR CAT_CL_CODIGO LIKE ? OR CAT_CL_CALLE LIKE ?)and gestion = 0 AND CAT_CL_CODIGO <> ${"0"} AND CAT_CL_CODIGO <> ${"1"} order by CAT_CL_NOMBRE "$, Array As String(q_buscar,q_buscar,q_buscar))
c2=B4XPages.MainPage.skmt.ExecQuery2($"select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where (CAT_CL_NOMBRE like ? OR CAT_CL_CODIGO LIKE ? OR CAT_CL_CALLE LIKE ?)and gestion = 0 AND CAT_CL_CODIGO <> ${"0"} AND CAT_CL_CODIGO <> ${"1"} order by CAT_CL_CODIGO "$, Array As String(q_buscar,q_buscar,q_buscar))
ListView1.Clear
lfila.text = "Nombre y Calle"
@@ -201,7 +216,22 @@ Sub BUSCA_TextChanged (Old As String, New As String)
Else
cxc.Visible = True
End If
d.Close
d = B4XPages.MainPage.skmt.ExecQuery($"select IFNULL(CAT_CL_BCREDITO,0) AS CAT_CL_BCREDITO FROM kmt_info WHERE CAT_CL_CODIGO = '${c2.GetString("CAT_CL_CODIGO")}'"$)
' LogColor(d.RowCount,Colors.Blue)
If d.RowCount > 0 Then
d.Position = 0
' LogColor(d.GetString("CAT_CL_BCREDITO"),Colors.Blue)
If d.GetString("CAT_CL_BCREDITO") = "1" Then
CREDITO.Visible = True
Else
CREDITO.Visible = False
End If
d.Close
Else
CREDITO.Visible = False
End If
Next
@@ -223,7 +253,7 @@ Sub BUSCA_TextChanged (Old As String, New As String)
c2.Close
Else If CHECK = 1 Then
q_buscar = "%" & busca.Text & "%"
c2=B4XPages.MainPage.skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info2 where (CAT_CL_NOMBRE like ? OR CAT_CL_CODIGO LIKE ? OR CAT_CL_CALLE LIKE ?)and gestion = 0 order by CAT_CL_NOMBRE ", Array As String(q_buscar,q_buscar,q_buscar))
c2=B4XPages.MainPage.skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info2 where (CAT_CL_NOMBRE like ? OR CAT_CL_CODIGO LIKE ? OR CAT_CL_CALLE LIKE ?)and gestion = 0 order by CAT_CL_CODIGO ", Array As String(q_buscar,q_buscar,q_buscar))
ListView1.Clear
lfila.text = "Nombre y Calle"
@@ -237,7 +267,20 @@ Sub BUSCA_TextChanged (Old As String, New As String)
Else
cxc.Visible = True
End If
d.Close
d = B4XPages.MainPage.skmt.ExecQuery($"select IFNULL(CAT_CL_BCREDITO,0) AS CAT_CL_BCREDITO FROM kmt_info2 WHERE CAT_CL_CODIGO = '${c2.GetString("CAT_CL_CODIGO")}'"$)
' LogColor(d.RowCount,Colors.Blue)
If d.RowCount > 0 Then
d.Position = 0
LogColor(d.GetString("CAT_CL_BCREDITO"),Colors.Blue)
If d.GetString("CAT_CL_BCREDITO") = "1" Then
CREDITO.Visible = True
Else
CREDITO.Visible = False
End If
d.Close
Else
CREDITO.Visible = False
End If
Next
@@ -383,7 +426,22 @@ Private Sub b_buscar_Click
Else
cxc.Visible = True
End If
d.Close
d = B4XPages.MainPage.skmt.ExecQuery($"select IFNULL(CAT_CL_BCREDITO,0) AS CAT_CL_BCREDITO FROM kmt_info2 WHERE CAT_CL_CODIGO = '${c.GetString("CAT_CL_CODIGO")}'"$)
' LogColor(d.RowCount,Colors.Blue)
If d.RowCount > 0 Then
d.Position = 0
LogColor(d.GetString("CAT_CL_BCREDITO"),Colors.Blue)
If d.GetString("CAT_CL_BCREDITO") = "1" Then
CREDITO.Visible = True
Else
CREDITO.Visible = False
End If
d.Close
Else
CREDITO.Visible = False
End If
Next
If c.RowCount>0 Then
For i=0 To c.RowCount -1
@@ -422,7 +480,21 @@ Private Sub b_buscar_Click
Else
cxc.Visible = True
End If
d.Close
d = B4XPages.MainPage.skmt.ExecQuery($"select IFNULL(CAT_CL_BCREDITO,0) AS CAT_CL_BCREDITO FROM kmt_info WHERE CAT_CL_CODIGO = '${c.GetString("CAT_CL_CODIGO")}'"$)
' LogColor(d.RowCount,Colors.Blue)
If d.RowCount > 0 Then
d.Position = 0
LogColor(d.GetString("CAT_CL_BCREDITO"),Colors.Blue)
If d.GetString("CAT_CL_BCREDITO") = "1" Then
CREDITO.Visible = True
Else
CREDITO.Visible = False
End If
d.Close
Else
CREDITO.Visible = False
End If
Next
If c.RowCount>0 Then
For i=0 To c.RowCount -1
@@ -442,4 +514,4 @@ Private Sub b_buscar_Click
entro = "4"
End If
End Sub
End Sub