mirror of
https://github.com/KeymonSoft/DBCheck.git
synced 2026-04-17 19:37:09 +00:00
11/9/23 - Cambio de ligas de Github
This commit is contained in:
@@ -10,12 +10,13 @@ Version=9.85
|
|||||||
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
|
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
|
||||||
'###########################################################################################################
|
'###########################################################################################################
|
||||||
'###################### PULL #############################################################
|
'###################### PULL #############################################################
|
||||||
'Ctrl + click ide://run?file=%WINDIR%\System32\cmd.exe&Args=/c&Args=..\..\gitpull.bat
|
'Ctrl + click ide://run?file=%WINDIR%\System32\cmd.exe&Args=/c&Args=git&Args=pull
|
||||||
'###########################################################################################################
|
'###########################################################################################################
|
||||||
'###################### PUSH #############################################################
|
'###################### PUSH #############################################################
|
||||||
'Ctrl + click ide://run?file=%WINDIR%\System32\cmd.exe&Args=/c&Args=github&Args=..\..\
|
'Ctrl + click ide://run?file=%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe&Args=github&Args=..\..\
|
||||||
'###########################################################################################################
|
'###########################################################################################################
|
||||||
#End Region
|
#End Region
|
||||||
|
'Ctrl + click ide://run?file=%WINDIR%\System32\cmd.exe&Args=/c&Args=github&Args=..\..\
|
||||||
|
|
||||||
Sub Class_Globals
|
Sub Class_Globals
|
||||||
Private Root As B4XView
|
Private Root As B4XView
|
||||||
@@ -53,7 +54,7 @@ Sub Class_Globals
|
|||||||
Private et_nuevaRuta As EditText
|
Private et_nuevaRuta As EditText
|
||||||
Private et_nuevoAlmacen As EditText
|
Private et_nuevoAlmacen As EditText
|
||||||
Private p_clientes As Panel
|
Private p_clientes As Panel
|
||||||
Private lv_clientes As ListView
|
' Private lv_clientes As ListView
|
||||||
Private clv_clientes As CustomListView
|
Private clv_clientes As CustomListView
|
||||||
Private p_item As Panel
|
Private p_item As Panel
|
||||||
Private l_item As Label
|
Private l_item As Label
|
||||||
@@ -76,6 +77,7 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
|||||||
Subs.centraPanel(p_editaRuta, Root.Width)
|
Subs.centraPanel(p_editaRuta, Root.Width)
|
||||||
Subs.centraPanel(p_editaAlmacen, Root.Width)
|
Subs.centraPanel(p_editaAlmacen, Root.Width)
|
||||||
Subs.centraPanel(p_clientes, Root.Width)
|
Subs.centraPanel(p_clientes, Root.Width)
|
||||||
|
ime.Initialize("ime")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
||||||
@@ -106,46 +108,75 @@ Sub B4XPage_Appear
|
|||||||
Log($"Existe BD: ${File.Exists(File.DirInternal, "kmt.db") }"$)
|
Log($"Existe BD: ${File.Exists(File.DirInternal, "kmt.db") }"$)
|
||||||
If File.Exists(File.DirInternal, "kmt.db") Then
|
If File.Exists(File.DirInternal, "kmt.db") Then
|
||||||
If Not(skmt.IsInitialized) Then skmt.Initialize(File.DirInternal,"kmt.db", True)
|
If Not(skmt.IsInitialized) Then skmt.Initialize(File.DirInternal,"kmt.db", True)
|
||||||
Dim ai As Cursor = skmt.ExecQuery($"select CAT_VA_DESCRIPCION, CAT_VA_VALOR from cat_variables where CAT_VA_DESCRIPCION = 'EMPRESA' or CAT_VA_DESCRIPCION = 'APP_VERSION'"$)
|
Try
|
||||||
If ai.RowCount > 1 Then
|
Dim ai As Cursor = skmt.ExecQuery($"select CAT_VA_DESCRIPCION, CAT_VA_VALOR from cat_variables where CAT_VA_DESCRIPCION = 'EMPRESA' or CAT_VA_DESCRIPCION = 'APP_VERSION'"$)
|
||||||
For i = 0 To ai.RowCount -1
|
If ai.RowCount > 1 Then
|
||||||
ai.Position = i
|
For i = 0 To ai.RowCount -1
|
||||||
If ai.GetString("CAT_VA_DESCRIPCION") = "EMPRESA" Then empresa = ai.GetString("CAT_VA_VALOR")
|
ai.Position = i
|
||||||
If ai.GetString("CAT_VA_DESCRIPCION") = "APP_VERSION" Then appVersion = ai.GetString("CAT_VA_VALOR")
|
If ai.GetString("CAT_VA_DESCRIPCION") = "EMPRESA" Then empresa = ai.GetString("CAT_VA_VALOR")
|
||||||
Next
|
If ai.GetString("CAT_VA_DESCRIPCION") = "APP_VERSION" Then appVersion = ai.GetString("CAT_VA_VALOR")
|
||||||
l_appInfo.Text = $"${empresa} ${appVersion}"$
|
Next
|
||||||
End If
|
l_appInfo.Text = $"${empresa} ${appVersion}"$
|
||||||
Dim c As Cursor = skmt.ExecQuery($"select count(distinct pe_cliente) as pedidos, group_concat(distinct substr(pe_fecha, 4,2)) as diasVenta, sum(pe_costo_tot) as total, (select PE_CANT from pedido where PE_CANT = 0) as cantsEnCero, (select count(distinct PE_CLIENTE) from pedido where printf("%d", PE_CLIENTE) <> PE_CLIENTE ) as clienteNoNumerico from pedido"$)
|
End If
|
||||||
Log(c.RowCount)
|
ai.Close
|
||||||
If c.RowCount > 0 Then
|
Catch
|
||||||
c.Position = 0
|
Log(LastException)
|
||||||
l_pedidos2.Text = c.GetString("pedidos")
|
LogColor("Error en CAT_VARIABLES", Colors.red)
|
||||||
l_diasVenta.Text = "N/A"
|
End Try
|
||||||
If c.GetString("diasVenta") <> Null Then l_diasVenta.Text = c.GetString("diasVenta")
|
Try
|
||||||
If c.GetString("total") <> Null Then l_totalVenta.Text = "$" & NumberFormat2(c.GetString("total"), 1, 2, 2, True) Else l_totalVenta.Text = "0"
|
Dim c As Cursor = skmt.ExecQuery($"select count(distinct pe_cliente) as pedidos, group_concat(distinct substr(pe_fecha, 4,2)) as diasVenta, sum(pe_costo_tot) as total, (select PE_CANT from pedido where PE_CANT = 0) as cantsEnCero, (select count(distinct PE_CLIENTE) from pedido where printf("%d", PE_CLIENTE) <> PE_CLIENTE ) as clienteNoNumerico from pedido"$)
|
||||||
l_cantsEnCero.Text = "0"
|
Log(c.RowCount)
|
||||||
If c.GetString("cantsEnCero") <> Null Then l_cantsEnCero.Text = c.GetString("cantsEnCero")
|
If c.RowCount > 0 Then
|
||||||
l_clienteNoNumerico.Text = c.GetString("clienteNoNumerico")
|
c.Position = 0
|
||||||
End If
|
l_pedidos2.Text = c.GetString("pedidos")
|
||||||
Dim c As Cursor = skmt.ExecQuery("select pe_ruta from pedido")
|
l_diasVenta.Text = "N/A"
|
||||||
If c.RowCount > 0 Then
|
If c.GetString("diasVenta") <> Null Then l_diasVenta.Text = c.GetString("diasVenta")
|
||||||
c.Position = 0
|
If c.GetString("total") <> Null Then l_totalVenta.Text = "$" & NumberFormat2(c.GetString("total"), 1, 2, 2, True) Else l_totalVenta.Text = "0"
|
||||||
ruta = c.GetString("PE_RUTA")
|
l_cantsEnCero.Text = "0"
|
||||||
l_ruta2.Text = ruta
|
If c.GetString("cantsEnCero") <> Null Then l_cantsEnCero.Text = c.GetString("cantsEnCero")
|
||||||
End If
|
l_clienteNoNumerico.Text = c.GetString("clienteNoNumerico")
|
||||||
Dim c As Cursor = skmt.ExecQuery("select USUARIO from usuarioa")
|
End If
|
||||||
If c.RowCount > 0 Then
|
c.Close
|
||||||
c.Position = 0
|
Catch
|
||||||
usuario = c.GetString("USUARIO")
|
Log(LastException)
|
||||||
l_usuario2.Text = usuario
|
LogColor("Error en PEDIDO", Colors.red)
|
||||||
End If
|
End Try
|
||||||
Dim c As Cursor = skmt.ExecQuery("select ID_ALMACEN from cat_almacen")
|
Try
|
||||||
If c.RowCount > 0 Then
|
Dim c As Cursor = skmt.ExecQuery("select pe_ruta from pedido")
|
||||||
c.Position = 0
|
If c.RowCount > 0 Then
|
||||||
almacen = c.GetString("ID_ALMACEN")
|
c.Position = 0
|
||||||
l_almacen2.Text = almacen
|
ruta = c.GetString("PE_RUTA")
|
||||||
End If
|
l_ruta2.Text = ruta
|
||||||
c.Close
|
End If
|
||||||
|
c.Close
|
||||||
|
Catch
|
||||||
|
Log(LastException)
|
||||||
|
LogColor("Error en PEDIDO", Colors.red)
|
||||||
|
End Try
|
||||||
|
Try
|
||||||
|
Dim c As Cursor = skmt.ExecQuery("select USUARIO from usuarioa")
|
||||||
|
If c.RowCount > 0 Then
|
||||||
|
c.Position = 0
|
||||||
|
usuario = c.GetString("USUARIO")
|
||||||
|
l_usuario2.Text = usuario
|
||||||
|
End If
|
||||||
|
c.Close
|
||||||
|
Catch
|
||||||
|
Log(LastException)
|
||||||
|
LogColor("Error en USUARIOA", Colors.red)
|
||||||
|
End Try
|
||||||
|
Try
|
||||||
|
Dim c As Cursor = skmt.ExecQuery("select ID_ALMACEN from cat_almacen")
|
||||||
|
If c.RowCount > 0 Then
|
||||||
|
c.Position = 0
|
||||||
|
almacen = c.GetString("ID_ALMACEN")
|
||||||
|
l_almacen2.Text = almacen
|
||||||
|
End If
|
||||||
|
c.Close
|
||||||
|
Catch
|
||||||
|
Log(LastException)
|
||||||
|
LogColor("Error en CAT_ALMACEN", Colors.red)
|
||||||
|
End Try
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -475,7 +506,7 @@ End Sub
|
|||||||
|
|
||||||
Sub CreateListItem(mostrar As String) As Panel
|
Sub CreateListItem(mostrar As String) As Panel
|
||||||
Dim p As B4XView = xui.CreatePanel("")
|
Dim p As B4XView = xui.CreatePanel("")
|
||||||
p.SetLayoutAnimated(0, 0, 0, 1, 10)
|
p.SetLayoutAnimated(0, 0, 0, 1, 10) 'ignore
|
||||||
p.LoadLayout("listItem")
|
p.LoadLayout("listItem")
|
||||||
p.Height= 36dip
|
p.Height= 36dip
|
||||||
p.Width = clv_clientes.GetBase.Width
|
p.Width = clv_clientes.GetBase.Width
|
||||||
|
|||||||
Reference in New Issue
Block a user