diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..a3f49d9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,16 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# linguist-language +*.b4a linguist-language=B4X +*.b4i linguist-language=B4X +*.b4j linguist-language=B4X +*.b4r linguist-language=B4X +*.bas linguist-language=B4X + +# linguist-detectable +*.b4a linguist-detectable=true +*.b4i linguist-detectable=true +*.b4j linguist-detectable=true +*.b4r linguist-detectable=true +*.bas linguist-detectable=true \ No newline at end of file diff --git a/Files/principal.bal b/Files/principal.bal index 182ec26..6ff7d5e 100644 Binary files a/Files/principal.bal and b/Files/principal.bal differ diff --git a/Lanterna2.b4a b/Lanterna2.b4a index 00a94a3..c358f05 100644 --- a/Lanterna2.b4a +++ b/Lanterna2.b4a @@ -90,7 +90,7 @@ Version=12.8 #Region Project Attributes #ApplicationLabel: Lanterna #VersionCode: 1 - #VersionName: 4.09.11 + #VersionName: 5.02.13 'SupportedOrientations possible values: unspecified, landscape or portrait. #SupportedOrientations: landscape #CanInstallToExternalStorage: False diff --git a/Lanterna2.b4a.meta b/Lanterna2.b4a.meta index 720c2d7..1140712 100644 --- a/Lanterna2.b4a.meta +++ b/Lanterna2.b4a.meta @@ -28,6 +28,6 @@ ModuleClosedNodes6=6 ModuleClosedNodes7= ModuleClosedNodes8= ModuleClosedNodes9= -NavigationStack=Principal,b_imp3_Click,2526,0,Principal,p_mesasItem_Click,1260,0,Principal,b_pagoCerrar_Click,1563,6,Principal,b_leyendaDescuento_Click,4001,6,Main,i_conf_Click,231,6,Visual Designer,principal.bal,-100,6,Principal,b_agregarPago_Click,3459,0,Principal,agregaFormaDePago,3466,0,Principal,b_renombraVarios_Click,3450,0,Subs,Process_Globals,17,0 +NavigationStack=Subs,traeCuantasMesas,1547,6,Principal,Activity_Resume,422,0,Principal,cuentaProds,686,0,Principal,b_impAB_Click,2998,6,Principal,l_prods_Click,399,6,Principal,b_prodMenos_Click,621,0,Principal,b_prodMas_Click,668,0,DiseƱador Visual,proditem.bal,-100,1,DiseƱador Visual,principal.bal,-100,1,Principal,p_mesasItem_Click,1228,0 SelectedBuild=0 VisibleModules=7,6,8,1 diff --git a/Principal.bas b/Principal.bas index f7c749f..86af442 100644 --- a/Principal.bas +++ b/Principal.bas @@ -211,6 +211,7 @@ Sub Globals Private et_nuevoPago As EditText Private et_nuevoPagoPropina As EditText Private p_botonesCierreTotal As Panel + Private l_montoTotalMesa As Label End Sub Sub Activity_Create(FirstTime As Boolean) @@ -402,6 +403,7 @@ Sub l_prods_Click End Try et_selBuscar.Text = "" Log(listaProdsOrden) + l_montoTotalMesa.Text = "$" & NumberFormat2(Subs.traeTotalTicketActual_PT, 1, 0, 0, True) End Sub Sub resalta(p As Panel) As ResumableSub @@ -623,6 +625,7 @@ Sub b_prodMenos_Click Private elTotal As String = elPrecioU * laCant.text elNombre.Text = cs.Color(Colors.red).append(elTexto).pop.append(CRLF).Color(0xFF017F01).Append($"Precio $${NumberFormat2(elTotal, 1, 2, 2, True)}"$).Popall End If + l_montoTotalMesa.Text = "$" & NumberFormat2(Subs.traeTotalTicketActual_PT, 1, 0, 0, True) ' Log($"Total Prods: ${totalProds}, Total Compra: $$1.2{totalCompra}"$) End Sub @@ -669,6 +672,7 @@ Sub b_prodMas_Click Private elTotal As String = elPrecioU * laCant.text elNombre.Text = cs.Color(Colors.red).append(elTexto).pop.append(CRLF).Color(0xFF017F01).Append($"Precio $${NumberFormat2(elTotal, 1, 2, 2, True)}"$).Popall End If + l_montoTotalMesa.Text = "$" & NumberFormat2(Subs.traeTotalTicketActual_PT, 1, 0, 0, True) ' Log($"Total Prods: ${totalProds}, Total Compra: $$1.2{totalCompra}"$) End Sub @@ -686,7 +690,7 @@ Sub cuentaProds If c.GetString("total") <> Null And c.GetString("total") <> "null" Then total0 = c.GetString("total") Private p As Cursor = Starter.skmt.ExecQuery($"select count(PT_TICKET) as ordenes from pedido_TICKET where PT_PAGO <> 'MULTI-TICKET' and PT_PAGO <> 'VENTA' "$) p.Position = 0 -' Log($"Total Prods: ${cant0}, Total Compra: $$1.2{total0}"$) + Log($"Total Prods: ${cant0}, Total Compra: $$1.2{total0}"$) ' l_totalCarrito.text = $"Total: $${NumberFormat2(total0,1,2,2,True)}"$ c.Close If WobbleMenu1.GetCurrentTab = 2 Then LlenaProdsLL(Null, Null) @@ -1225,6 +1229,10 @@ Private Sub p_mesasItem_Click Starter.ticketActual = m.Get("ticket") Starter.comensalesActuales = m.Get("comensales") Starter.totalActual = m.Get("subtotal") + Log(Subs.traeTotalesTicketActual) + Log(Subs.traeTotalTicketActual_P("VENTA")) + Log(Subs.traeTotalTicketActual_PT) + l_montoTotalMesa.Text = "$" & NumberFormat2(m.Get("subtotal"), 1, 0, 0, True) l_mesa0.Text = $"MESA ${Starter.mesaActual}"$ cb_opcionEfectivo.Checked = False cb_mostrarDescuento.Checked = False @@ -2993,6 +3001,23 @@ Sub b_impAB_Click Log($"Tarjetas: ${Subs.alineaDerecha("$"&NumberFormat2(montoAmex+montoMifel, 1, 0, 0, True), (30 - "Tarjetas: ".Length), ".")} "$) Log($"Efectivo: ${Subs.alineaDerecha("$"&NumberFormat2(montoEfectivo, 1, 0, 0, True), (30 - "Efectivo: ".Length), ".")} "$) Log($"Total: ${Subs.alineaDerecha("$"&NumberFormat2(montoAmex+montoMifel+montoEfectivo, 1, 0, 0, True), (30 - "Total: ".Length), ".")} "$) + + 'TOTAL DE MESAS + If imprimirAqui Then Printer1.WriteString(CRLF) + If imprimirAqui Then Printer1.WriteString(Printer1.BOLD) + If imprimirAqui Then Printer1.WriteString($"*** TOTAL DE MESAS *** ${CRLF}"$) + If imprimirAqui Then Printer1.WriteString(Printer1.NOBOLD) + If imprimirAqui Then + Printer1.WriteString($"Total Mesas: ${Subs.alineaDerecha(Subs.traeCuantasMesas, (30 - "Total Mesas: ".Length), ".")} ${CRLF}"$) + End If + cs.Append(CRLF) + cs.Color(Colors.red).Append($"** TOTAL DE MESAS **${CRLF}"$).pop + cs.Color(Colors.DarkGray).Append($"Total Mesas: ${Subs.alineaDerecha(Subs.traeCuantasMesas, (30 - "Total Mesas: ".Length), ".")} ${CRLF}"$).pop + cs.Append(CRLF) + cs.Append(CRLF) + Log("*** TOTAL DE MESAS ***") + Log($"Total Mesas: ${Subs.traeCuantasMesas}"$) + End If If imprimirAqui Then Printer1.WriteString(CRLF) diff --git a/Subs.bas b/Subs.bas index bdd8ea8..58ca465 100644 --- a/Subs.bas +++ b/Subs.bas @@ -1548,6 +1548,12 @@ Sub revisaEfectivoBorrado As Boolean Return efeBorr End Sub +'Regresa cuantas mesas tuvieron venta +Sub traeCuantasMesas As Int + Private cm As Cursor = Starter.skmt.ExecQuery($"Select distinct pe_mesa, pe_ticket, PE_TIPO, pe_origen from pedido where pe_origen Is Null order by cast( pe_mesa As integer)"$) + Return cm.RowCount +End Sub + 'Change CheckBox colors Sub SetButtonTintList(View As View, Disabled As Int, Enabled As Int) Dim States(2,1) As Int