mirror of
https://github.com/KeymonSoft/Lanterna.git
synced 2026-04-18 05:09:22 +00:00
- Se agrego la opción de reasignar una mesa haciendo clic largo sobre la mesa en cuestion
This commit is contained in:
@@ -94,6 +94,12 @@ Sub Class_Globals
|
||||
' Private p_test As Panel
|
||||
Private tipoPago As String = "VENTA"
|
||||
Dim n2t As numeroATexto
|
||||
Private p_transparenteCambioMesa As Panel
|
||||
Private p_cambioMesa As Panel
|
||||
Private l_cambioMesa2 As Label
|
||||
Private cb_cambioMesa As B4XComboBox
|
||||
Private b_cambioMesa As Button
|
||||
Private l_cambioMesa As Label
|
||||
End Sub
|
||||
|
||||
'You can add more parameters here.
|
||||
@@ -132,6 +138,9 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
p_mesas.Height = Root.Height - WobbleMenu1.Height
|
||||
p_historial.Width = Root.Width
|
||||
p_historial.Height = Root.Height - WobbleMenu1.Height
|
||||
Subs.centraPanel(p_cambioMesa, p_transparenteCambioMesa.Width)
|
||||
p_transparenteCambioMesa.Top = 0 : p_transparenteCambioMesa.Left = 0
|
||||
p_transparenteCambioMesa.Height = Root.Height : p_transparenteCambioMesa.width = Root.width
|
||||
Subs.panelWH(p_transparenteCierreAdmin, Root.Width, Root.Height)
|
||||
p_transparenteCierreAdmin.Top = 0 : p_transparenteCierreAdmin.left = 0
|
||||
Subs.panelWH(p_transparenteResumen, Root.Width, Root.Height)
|
||||
@@ -237,7 +246,9 @@ End Sub
|
||||
Sub B4XPage_CloseRequest As ResumableSub
|
||||
' BACK key pressed
|
||||
'Return True to close, False to cancel
|
||||
If p_pago.visible Then 'Si se esta mostrando el popup de pago, lo cerramos.
|
||||
If p_transparenteCambioMesa.Visible Then
|
||||
p_transparenteCambioMesa.Visible = False
|
||||
Else If p_pago.visible Then 'Si se esta mostrando el popup de pago, lo cerramos.
|
||||
p_pago.Visible = False
|
||||
Else If clv_prods_ll.AsView.Visible Then 'SI se muestran los
|
||||
clv_prods_ll.AsView.Visible = False
|
||||
@@ -965,6 +976,46 @@ Private Sub p_mesasItem_Click
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub p_mesasItem_LongClick
|
||||
Private m As Map = Sender.As(Panel).tag
|
||||
If m.Get("estatus") <> "CERRADA" Then
|
||||
Log(m)
|
||||
Private c As Cursor = Starter.skmt.ExecQuery($"select M_ID from CAT_MESAS where ifnull(M_ESTATUS, 0) <> 'ABIERTA' order by M_ID"$)
|
||||
If c.RowCount > 0 Then
|
||||
Private listaMesas As List
|
||||
listaMesas.Initialize
|
||||
Log(c.RowCount)
|
||||
For i = 0 To c.RowCount - 1
|
||||
c.Position = i
|
||||
listaMesas.Add(c.GetInt("M_ID"))
|
||||
Next
|
||||
listaMesas.Sort(True)
|
||||
End If
|
||||
cb_cambioMesa.SetItems(listaMesas)
|
||||
l_cambioMesa2.Text = $"Reasignar la mesa ${m.Get("id")} a la mesa:"$
|
||||
b_cambioMesa.Tag = m.Get("id")
|
||||
p_transparenteCambioMesa.Visible = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub b_cambioMesa_Click
|
||||
Private c As Cursor = Starter.skmt.ExecQuery($"select * from CAT_MESAS where M_ID = '${Sender.As(Button).tag}'"$)
|
||||
Log($"select * from CAT_MESAS where M_ID = '${Sender.As(Button).tag}'"$)
|
||||
If c.RowCount > 0 Then
|
||||
c.Position = 0
|
||||
Starter.skmt.BeginTransaction
|
||||
Starter.skmt.ExecNonQuery($"update CAT_MESAS set M_ESTATUS = '${c.GetString("M_ESTATUS")}', M_TICKET = '${c.GetString("M_TICKET")}', M_MESERO = '${c.GetString("M_MESERO")}', M_COMENSALES = '${c.GetString("M_COMENSALES")}' where M_ID = '${cb_cambioMesa.SelectedItem}'"$)
|
||||
Log($"update CAT_MESAS set M_ESTATUS = '${c.GetString("M_ESTATUS")}', M_TICKET = '${c.GetString("M_TICKET")}', M_MESERO = '${c.GetString("M_MESERO")}', M_COMENSALES = '${c.GetString("M_COMENSALES")}' where M_ID = '${cb_cambioMesa.SelectedItem}'"$)
|
||||
Starter.skmt.ExecNonQuery($"update CAT_MESAS set M_ESTATUS = null, M_TICKET = null, M_MESERO = null, M_COMENSALES = null where M_ID = '${Sender.As(Button).tag}'"$)
|
||||
Starter.skmt.ExecNonQuery($"update PEDIDO set PE_MESA = '${cb_cambioMesa.SelectedItem}' where PE_TIPO = 'VENTA' and PE_TICKET = '${c.GetString("M_TICKET")}' and PE_MESA = '${Sender.As(Button).tag}'"$)
|
||||
Starter.skmt.ExecNonQuery($"update PEDIDO_TICKET set PT_MESA = '${cb_cambioMesa.SelectedItem}' where PT_PAGO = 'VENTA' and PT_TICKET = '${c.GetString("M_TICKET")}' and PT_MESA = '${Sender.As(Button).tag}'"$)
|
||||
Starter.skmt.TransactionSuccessful
|
||||
Starter.skmt.EndTransaction
|
||||
End If
|
||||
p_transparenteCambioMesa.Visible = False
|
||||
WobbleMenu1_Tab1Click
|
||||
End Sub
|
||||
|
||||
Private Sub b_abrirMesa_Click
|
||||
If cb_mesero.SelectedIndex <> 0 Then
|
||||
Private c As Cursor = Starter.skmt.ExecQuery($"select M_ESTATUS from CAT_MESAS where M_ID = '${Starter.mesaActual}' and M_ESTATUS = 'ABIERTA'"$)
|
||||
@@ -1838,4 +1889,8 @@ End Sub
|
||||
|
||||
Private Sub cb_pagoPropina_SelectedIndexChanged (Index As Int)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub p_transparenteCambioMesa_Click
|
||||
|
||||
End Sub
|
||||
Binary file not shown.
@@ -80,7 +80,7 @@ Version=12.8
|
||||
#Region Project Attributes
|
||||
#ApplicationLabel: Lanterna
|
||||
#VersionCode: 1
|
||||
#VersionName: 4.02.14
|
||||
#VersionName: 4.02.25
|
||||
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
||||
#SupportedOrientations: portrait
|
||||
#CanInstallToExternalStorage: False
|
||||
|
||||
@@ -18,13 +18,13 @@ ModuleBreakpoints7=
|
||||
ModuleBreakpoints8=
|
||||
ModuleClosedNodes0=
|
||||
ModuleClosedNodes1=12
|
||||
ModuleClosedNodes2=28
|
||||
ModuleClosedNodes2=
|
||||
ModuleClosedNodes3=
|
||||
ModuleClosedNodes4=
|
||||
ModuleClosedNodes5=
|
||||
ModuleClosedNodes6=
|
||||
ModuleClosedNodes7=
|
||||
ModuleClosedNodes8=47,48,68
|
||||
NavigationStack=numeroATexto,NumberToWordsPositive,40,6,C_Principal,p_mesasItem_Click,922,0,C_Principal,Class_Globals,88,1,C_Principal,b_regresarProds_Click,1664,0,C_Principal,b_imprimirTicket_Click,1826,6,C_Principal,Printer1_Error,1195,0,C_Principal,b_mesaCerrar_Click,1008,0,Visual Designer,principal.bal,-100,6,C_Principal,b_pagoCerrar_Click,1060,2,C_Principal,b_imp_Click,1205,2,C_Principal,et_inicioDia_EnterPressed,1164,2
|
||||
NavigationStack=Subs,panelWH,545,0,C_Principal,b_pagoCerrar_Click,1060,2,C_Principal,b_imp_Click,1216,2,C_Principal,et_inicioDia_EnterPressed,1172,2,C_Principal,b_abrirMesa_Click,991,0,C_Principal,p_transparenteCambioMesa_Click,1868,0,C_Principal,b_cambioMesa_Click,996,6,C_Principal,p_mesasItem_Click,969,0,Visual Designer,principal.bal,-100,6,C_Principal,p_mesasItem_LongClick,983,6
|
||||
SelectedBuild=0
|
||||
VisibleModules=1,7,8,2,3,6
|
||||
|
||||
Reference in New Issue
Block a user