mirror of
https://github.com/KeymonSoft/ADM2.git
synced 2026-04-20 12:49:16 +00:00
VERSION 6.01.10
- Se corrige en resumen dia la venta por marcas
This commit is contained in:
@@ -32,33 +32,35 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
If File.Exists(ruta, "kmt.db") = False Then
|
||||
File.Copy(File.DirAssets, "kmt.db", ruta, "kmt.db")
|
||||
End If
|
||||
c = B4XPages.MainPage.skmt.ExecQuery("select PC_CLIENTE,PC_MONTO,PC_NOART FROM PEDIDO_CLIENTE ORDER BY PC_FECHA asc")
|
||||
|
||||
|
||||
' c = B4XPages.MainPage.skmt.ExecQuery("select PC_CLIENTE,PC_MONTO,PC_NOART FROM PEDIDO_CLIENTE ORDER BY PC_FECHA asc")
|
||||
ListView1.TwoLinesLayout.ItemHeight = 50dip
|
||||
ListView1.Clear
|
||||
If c.RowCount>0 Then
|
||||
For i=0 To c.RowCount -1
|
||||
c.Position=i
|
||||
Dim label1 As Label
|
||||
label1 = ListView1.TwoLinesLayout.Label
|
||||
label1.TextSize = 10
|
||||
label1.TextColor = Colors.Black
|
||||
Dim label2 As Label
|
||||
label2 = ListView1.TwoLinesLayout.SecondLabel
|
||||
label2.TextSize = 13
|
||||
label2.TextColor = Colors.Blue
|
||||
ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),"Cantidad #"& c.GetString("PC_NOART")& " SubTotal $"& c.GetString("PC_MONTO"))
|
||||
Next
|
||||
End If
|
||||
' If c.RowCount>0 Then
|
||||
' For i=0 To c.RowCount -1
|
||||
' c.Position=i
|
||||
' Dim label1 As Label
|
||||
' label1 = ListView1.TwoLinesLayout.Label
|
||||
' label1.TextSize = 10
|
||||
' label1.TextColor = Colors.Black
|
||||
' Dim label2 As Label
|
||||
' label2 = ListView1.TwoLinesLayout.SecondLabel
|
||||
' label2.TextSize = 12
|
||||
' label2.TextColor = Colors.Blue
|
||||
' ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),"Cantidad #"& c.GetString("PC_NOART")& " Monto de venta $"& c.GetString("PC_MONTO"))
|
||||
' Next
|
||||
' End If
|
||||
p_ticketsdia.Height = Root.Height
|
||||
ListView1.Height = p_ticketsdia.Height * 0.8
|
||||
ListView1.Width = Root.Width * 0.9
|
||||
b_noventa.Top = Root.Height - b_noventa.Height - 20dip
|
||||
End Sub
|
||||
|
||||
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
||||
|
||||
Sub B4XPage_Appear
|
||||
nombre_boton = "NOVENTA"
|
||||
c=B4XPages.MainPage.skmt.ExecQuery("select PC_CLIENTE,PC_MONTO,PC_NOART,(select CAT_CL_NOMBRE from kmt_info where cat_cl_codigo = pc_cliente UNION select CAT_CL_NOMBRE from kmt_info2 where cat_cl_codigo = pc_cliente ) as NOMBRE FROM PEDIDO_CLIENTE ORDER BY PC_FECHA asc")
|
||||
c=B4XPages.MainPage.skmt.ExecQuery("select PC_CLIENTE, PC_MONTO, PC_NOART, (select CAT_CL_NOMBRE from kmt_info where cat_cl_codigo = pc_cliente UNION select CAT_CL_NOMBRE from kmt_info2 where cat_cl_codigo = pc_cliente ) as NOMBRE FROM PEDIDO_CLIENTE ORDER BY PC_FECHA asc")
|
||||
Dim noArticulos As Int = 0
|
||||
|
||||
ListView1.Clear
|
||||
If c.RowCount>0 Then
|
||||
For i=0 To c.RowCount -1
|
||||
@@ -69,15 +71,18 @@ Sub B4XPage_Appear
|
||||
' Log(x.GetString("PC_NOART"))
|
||||
noArticulos = x.GetString("PC_NOART")
|
||||
End If
|
||||
Dim label1 As Label
|
||||
Dim label1 As B4XView
|
||||
label1 = ListView1.TwoLinesLayout.Label
|
||||
label1.TextSize = 10
|
||||
label1.TextColor = Colors.Black
|
||||
Dim label2 As Label
|
||||
label1.Height = 1dip
|
||||
label1.TextSize = 1
|
||||
label1.TextColor = Colors.White
|
||||
Dim label2 As B4XView
|
||||
label2 = ListView1.TwoLinesLayout.SecondLabel
|
||||
label2.TextSize = 13
|
||||
ListView1.TwoLinesLayout.SecondLabel.SetLayout(0,0,ListView1.Width,50dip)
|
||||
label2.TextSize = 12
|
||||
label2.TextColor = Colors.Blue
|
||||
ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),c.GetString("NOMBRE") &" Cantidad #"& noArticulos & " SubTotal $"& c.GetString("PC_MONTO"))
|
||||
' ListView1.AddSingleLine(c.GetString("NOMBRE") &" Cantidad #"& noArticulos & " Monto de venta $"& c.GetString("PC_MONTO"))
|
||||
ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),c.GetString("NOMBRE") &" Cantidad #"& noArticulos & " Monto preventa $"& c.GetString("PC_MONTO"))
|
||||
Next
|
||||
End If
|
||||
c.Close
|
||||
@@ -86,6 +91,7 @@ End Sub
|
||||
Sub Regresar_Click
|
||||
B4XPages.ShowPage("cliente")
|
||||
End Sub
|
||||
|
||||
Sub Activity_KeyPress (key As Int) As Boolean
|
||||
' BACK key pressed
|
||||
If key=KeyCodes.KEYCODE_BACK Then
|
||||
@@ -96,7 +102,9 @@ Sub Activity_KeyPress (key As Int) As Boolean
|
||||
' Returning False signals the system to handle the key
|
||||
Return False
|
||||
End Sub
|
||||
|
||||
Sub ListView1_ItemLongClick (Position As Int, Value As Object)
|
||||
Log(Value)
|
||||
B4XPages.MainPage.skmt.ExecNonQuery("delete from CUENTAA")
|
||||
B4XPages.MainPage.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object(Value))
|
||||
DateTime.TimeFormat = "HHmmss"
|
||||
@@ -127,13 +135,15 @@ Sub b_noventa_Click
|
||||
c.Position=i
|
||||
Dim label1 As Label
|
||||
label1 = ListView1.TwoLinesLayout.Label
|
||||
label1.TextSize = 15
|
||||
label1.TextSize = 10
|
||||
label1.Height = 0
|
||||
label1.TextColor = Colors.Black
|
||||
Dim label2 As Label
|
||||
label2 = ListView1.TwoLinesLayout.SecondLabel
|
||||
label2.TextSize = 10
|
||||
label2.TextSize = 12
|
||||
label2.TextColor = Colors.Blue
|
||||
ListView1.AddTwoLines(c.GetString("NV_CLIENTE"),c.GetString("NOMBRE") &" Motivo #"& c.GetString("NV_MOTIVO")& " Comentario $"& c.GetString("NV_COMM"))
|
||||
ListView1.AddTwoLines("",c.GetString("NOMBRE") &" Causa #"& c.GetString("NV_MOTIVO")& " Comentario: " & c.GetString("NV_COMM"))
|
||||
' ListView1.AddSingleLine(c.GetString("NOMBRE") &" Causa #"& c.GetString("NV_MOTIVO")& " Comentario: " & c.GetString("NV_COMM"))
|
||||
Next
|
||||
End If
|
||||
Else
|
||||
@@ -147,13 +157,15 @@ Sub b_noventa_Click
|
||||
c.Position=i
|
||||
Dim label1 As Label
|
||||
label1 = ListView1.TwoLinesLayout.Label
|
||||
label1.TextSize = 15
|
||||
label1.TextSize = 10
|
||||
label1.Height = 0
|
||||
label1.TextColor = Colors.Black
|
||||
Dim label2 As Label
|
||||
label2 = ListView1.TwoLinesLayout.SecondLabel
|
||||
label2.TextSize = 10
|
||||
label2.TextSize = 12
|
||||
label2.TextColor = Colors.Blue
|
||||
ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),c.GetString("NOMBRE") &" Cantidad #"& c.GetString("PC_NOART")& " SubTotal $"& c.GetString("PC_MONTO"))
|
||||
' ListView1.AddSingleLine(c.GetString("NOMBRE") &" Cantidad #"& c.GetString("PC_NOART")& " Monto de venta $"& c.GetString("PC_MONTO"))
|
||||
ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),c.GetString("NOMBRE") &" Cantidad #"& c.GetString("PC_NOART")& " Monto preventa $"& c.GetString("PC_MONTO"))
|
||||
Next
|
||||
End If
|
||||
c.Close
|
||||
|
||||
Reference in New Issue
Block a user