- VERSION 5.01.18

- Se agrego la opcion "Cerrado Permanente" a los motivos de "No Venta"
This commit is contained in:
Jose Alberto Guerra Ugalde
2025-01-21 23:16:48 -06:00
parent 2201740446
commit 68623e79ea
8 changed files with 72 additions and 12 deletions

View File

@@ -141,6 +141,9 @@ Sub Class_Globals
Private l_calle1 As Label
Private l_ubicacion2 As Label
Private l_version As Label
Private b_pedidoYalo As Button
Private p_transYalo As Panel
Private lv_yalo As ListView
End Sub
'You can add more parameters here.
@@ -187,6 +190,11 @@ Private Sub B4XPage_Created (Root1 As B4XView)
End If
c.Close
s.Close
p_transYalo.Width = Root.Width : p_transYalo.Height = Root.Height
p_transYalo.Top = 0 : p_transYalo.Left = 0
lv_yalo.Width = Root.Width * 0.9 : lv_yalo.Height = Root.Height * 0.8
lv_yalo.Left = (Root.Width / 2) - (lv_yalo.Width / 2)
lv_yalo.top = (Root.Height / 2) - (lv_yalo.Height / 2)
btAdmin.Initialize("BlueTeeth")
cmp20.Initialize("Printer")
End Sub
@@ -409,7 +417,9 @@ Private Sub B4XPage_CloseRequest As ResumableSub
' BACK key pressed
' Return True To close, False To cancel
' Log($"venimosDeTicketsDia=${venimosDeTicketsDia}"$)
If IsNumber(l_total.text) And l_total.text <> "0" And Not(Subs.pedidoGuardado) Then
If p_transYalo.Visible Then
p_transYalo.Visible = False
else If IsNumber(l_total.text) And l_total.text <> "0" And Not(Subs.pedidoGuardado) Then
LogColor("Hay Venta", Colors.Red)
Private resultado1 As Int = Msgbox2($"Va salir sin haber guardado la venta, si continua, la venta se BORRARA.${CRLF}${CRLF}¿Esta seguro que desea continuar?"$, "SE VA A BORRAR LA VENTA", "Borrar Venta", "Guardar Venta", "", LoadBitmap(File.DirAssets,"alert2.png"))
If resultado1 = DialogResponse.POSITIVE Then
@@ -926,11 +936,10 @@ Sub JobDone(Job As HttpJob)
End If
Job.Release
End If
End Sub
Private Sub p_abono_Click
End Sub
Private Sub b_abono_Click
@@ -955,4 +964,28 @@ End Sub
Private Sub b_abono1_Click
p_abono.Visible = True
End Sub
Private Sub b_pedidoYalo_Click
Private rs As ResultSet = Starter.skmt.ExecQuery($"select * from CAT_PEDIDOS_YALO where PY_IDCLIENTE = '${Subs.traeCliente}' order by PY_FECHA, PY_TICKET"$)
Private ticket As String = ""
Private cs As CSBuilder
Private label1 As B4XView = lv_yalo.SingleLineLayout.Label
lv_yalo.Clear
Do While rs.NextRow
label1.Left = 75dip
If ticket <> rs.GetString("PY_TICKET") Then
cs.Initialize
ticket = rs.GetString("PY_TICKET")
lv_yalo.AddSingleLine(cs.Size(16).Color(Colors.red).append("Pedido: " & ticket & " - " & rs.GetString("PY_FECHA").SubString2(0, rs.GetString("PY_FECHA").IndexOf(" "))).popAll)
End If
cs.Initialize
lv_yalo.AddSingleLine(cs.Size(13).Color(Colors.DarkGray).append(rs.GetString("PY_PRODNOMBRE") & " - Cant: " & rs.GetString("PY_CANT")).popAll)
Loop
p_transYalo.Visible = True
End Sub
Private Sub p_transYalo_Click
p_transYalo.Visible = False
End Sub