mirror of
https://github.com/KeymonSoft/Medicomed_Preventa.git
synced 2026-04-21 23:09:13 +00:00
v: 5.10.24
Se hicieron invisibles normales de la venta, se agregaron 2 botones mas, uno indica que tieene venta y el otro que no tiene, tambien al boton que indica que tiene venta se le agrega una pequeña ventana para agregar la venta que se le indique.
This commit is contained in:
@@ -23,6 +23,36 @@ Public Sub Initialize As Object
|
||||
Return Me
|
||||
End Sub
|
||||
|
||||
''This event will be called once, before the page becomes visible.
|
||||
'Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
' Root = Root1
|
||||
' 'load the layout to Root
|
||||
' ruta = File.DirInternal
|
||||
' Root.LoadLayout("ticketsdia")
|
||||
' 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")
|
||||
' 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 = 15
|
||||
' label2.TextColor = Colors.Blue
|
||||
' label2.Height = 60dip
|
||||
' label2.Width = ListView1.Width * 0.99
|
||||
' ListView1.TwoLinesLayout.ItemHeight = 80dip
|
||||
' ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),"Cantidad #"& c.GetString("PC_NOART")& " SubTotal $"& c.GetString("PC_MONTO"))
|
||||
' Next
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
'This event will be called once, before the page becomes visible.
|
||||
Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
Root = Root1
|
||||
@@ -32,11 +62,36 @@ 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")
|
||||
|
||||
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 ) as NOMBRE FROM PEDIDO_CLIENTE ORDER BY PC_FECHA asc")
|
||||
' 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 = 15
|
||||
' label1.TextColor = Colors.Black
|
||||
' Dim label2 As Label
|
||||
' label2 = ListView1.TwoLinesLayout.SecondLabel
|
||||
' label2.TextSize = 10
|
||||
' label2.TextColor = Colors.Blue
|
||||
' ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),c.GetString("NOMBRE") &" Cantidad #"& c.GetString("PC_NOART")& " SubTotal $"& c.GetString("PC_MONTO"))
|
||||
' Next
|
||||
' End If
|
||||
' c.Close
|
||||
c = B4XPages.MainPage.skmt.ExecQuery("select * from venta_no_venta where eventov <> 'SinVenta'")
|
||||
ListView1.Clear
|
||||
If c.RowCount>0 Then
|
||||
For i=0 To c.RowCount -1
|
||||
c.Position=i
|
||||
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
|
||||
@@ -48,29 +103,8 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
label2.Height = 60dip
|
||||
label2.Width = ListView1.Width * 0.99
|
||||
ListView1.TwoLinesLayout.ItemHeight = 80dip
|
||||
ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),"Cantidad #"& c.GetString("PC_NOART")& " SubTotal $"& c.GetString("PC_MONTO"))
|
||||
Next
|
||||
End If
|
||||
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 ) as NOMBRE FROM PEDIDO_CLIENTE ORDER BY PC_FECHA asc")
|
||||
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 = 15
|
||||
label1.TextColor = Colors.Black
|
||||
Dim label2 As Label
|
||||
label2 = ListView1.TwoLinesLayout.SecondLabel
|
||||
label2.TextSize = 10
|
||||
label2.TextColor = Colors.Blue
|
||||
ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),c.GetString("NOMBRE") &" Cantidad #"& c.GetString("PC_NOART")& " SubTotal $"& c.GetString("PC_MONTO"))
|
||||
ListView1.AddTwoLines(c.GetString("clientev"), "SubTotal $" & c.GetString("montoVentav"))
|
||||
Log(c.GetString("clientev") & "SubTotal $" & c.GetString("montoVentav"))
|
||||
Next
|
||||
End If
|
||||
c.Close
|
||||
@@ -112,40 +146,47 @@ Sub b_noventa_Click
|
||||
If nombre_boton = "NOVENTA" Then
|
||||
nombre_boton = "VENTA"
|
||||
b_noventa.Text ="VENTA"
|
||||
c=B4XPages.MainPage.skmt.ExecQuery("select NV_CLIENTE,NV_MOTIVO,NV_COMM, (select CAT_CL_NOMBRE from kmt_info where cat_cl_codigo = NV_CLIENTE ) as NOMBRE FROM NOVENTA ORDER BY NV_CLIENTE asc")
|
||||
c = B4XPages.MainPage.skmt.ExecQuery("select * from venta_no_venta where eventov = 'SinVenta'")
|
||||
ListView1.Clear
|
||||
If c.RowCount>0 Then
|
||||
For i=0 To c.RowCount -1
|
||||
c.Position=i
|
||||
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 = 15
|
||||
label1.TextSize = 10
|
||||
label1.TextColor = Colors.Black
|
||||
Dim label2 As Label
|
||||
label2 = ListView1.TwoLinesLayout.SecondLabel
|
||||
label2.TextSize = 10
|
||||
label2.TextSize = 15
|
||||
label2.TextColor = Colors.Blue
|
||||
ListView1.AddTwoLines(c.GetString("NV_CLIENTE"),c.GetString("NOMBRE") &" Motivo #"& c.GetString("NV_MOTIVO")& " Comentario $"& c.GetString("NV_COMM"))
|
||||
label2.Height = 60dip
|
||||
label2.Width = ListView1.Width * 0.99
|
||||
ListView1.TwoLinesLayout.ItemHeight = 80dip
|
||||
ListView1.AddTwoLines(c.GetString("clientev"), "SubTotal $" & c.GetString("montoVentav"))
|
||||
Log(c.GetString("clientev") & "SubTotal $" & c.GetString("montoVentav"))
|
||||
Next
|
||||
End If
|
||||
Else
|
||||
nombre_boton = "NOVENTA"
|
||||
b_noventa.Text ="NO VENTA"
|
||||
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 ) as NOMBRE FROM PEDIDO_CLIENTE ORDER BY PC_FECHA asc")
|
||||
c = B4XPages.MainPage.skmt.ExecQuery("select * from venta_no_venta where eventov <> 'SinVenta'")
|
||||
ListView1.Clear
|
||||
|
||||
If c.RowCount>0 Then
|
||||
For i=0 To c.RowCount -1
|
||||
c.Position=i
|
||||
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 = 15
|
||||
label1.TextSize = 10
|
||||
label1.TextColor = Colors.Black
|
||||
Dim label2 As Label
|
||||
label2 = ListView1.TwoLinesLayout.SecondLabel
|
||||
label2.TextSize = 10
|
||||
label2.TextSize = 15
|
||||
label2.TextColor = Colors.Blue
|
||||
ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),c.GetString("NOMBRE") &" Cantidad #"& c.GetString("PC_NOART")& " SubTotal $"& c.GetString("PC_MONTO"))
|
||||
label2.Height = 60dip
|
||||
label2.Width = ListView1.Width * 0.99
|
||||
ListView1.TwoLinesLayout.ItemHeight = 80dip
|
||||
ListView1.AddTwoLines(c.GetString("clientev"), "SubTotal $" & c.GetString("montoVentav"))
|
||||
Log(c.GetString("clientev") & "SubTotal $" & c.GetString("montoVentav"))
|
||||
Next
|
||||
End If
|
||||
c.Close
|
||||
|
||||
Reference in New Issue
Block a user