mirror of
https://github.com/KeymonSoft/Lanterna_H.git
synced 2026-04-18 13:19:18 +00:00
- VERSION 4.09.11
- Se corrigio que, a veces cuando existia otra mesa y ticket igual (Diferente tipo de pago), traia el total de esa otra mesa y en el ticket ponia iva y total equivocado.
This commit is contained in:
@@ -90,7 +90,7 @@ Version=12.8
|
||||
#Region Project Attributes
|
||||
#ApplicationLabel: Lanterna
|
||||
#VersionCode: 1
|
||||
#VersionName: 4.08.30
|
||||
#VersionName: 4.09.11
|
||||
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
||||
#SupportedOrientations: landscape
|
||||
#CanInstallToExternalStorage: False
|
||||
|
||||
@@ -28,6 +28,6 @@ ModuleClosedNodes6=6
|
||||
ModuleClosedNodes7=
|
||||
ModuleClosedNodes8=
|
||||
ModuleClosedNodes9=
|
||||
NavigationStack=Principal,JobDone,3329,6,Main,user_TextChanged,399,1,Visual Designer,login.bal,-100,3,Principal,imprimeResumenGrupos,2048,0,Visual Designer,principal.bal,-100,5,Principal,b_cierraParcial_Click,1695,0,Principal,b_cierreTotal_Click,1677,3,Principal,b_imp3_Click,2526,0,Principal,b_impAB_Click,2956,0,Main,i_conf_Click,231,6
|
||||
NavigationStack=Principal,b_impAB_Click,2968,0,Subs,traeTotalTicketActual_P,1166,0,Visual Designer,principal.bal,-100,5,Principal,b_cierraParcial_Click,1695,0,Principal,b_cierreTotal_Click,1677,3,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
|
||||
SelectedBuild=0
|
||||
VisibleModules=7,6,8,1
|
||||
|
||||
@@ -1564,10 +1564,13 @@ Private Sub b_pagoCerrar_Click
|
||||
|
||||
Starter.ticketActual = sigTicketMT
|
||||
If elEfectivo > "0" Then
|
||||
Log("INSERTAMOS DESCUENTO")
|
||||
Log($"DescTicket: ${descuentoTicket}, descPago: ${descuentoTipoPago}"$)
|
||||
'Agregamos el efectivo como DESCUENTO en el pedido de la tarjeta.
|
||||
' Starter.skmt.ExecNonQuery2("INSERT INTO PEDIDO (PE_COSTO_TOT, PE_COSTOU, PE_CANT, PE_PRONOMBRE, PE_PROID, PE_TICKET, PE_FECHA, PE_MESERO, PE_MESA, PE_COSTO_SIN, PE_TIPO, PE_TIPO2, PE_ORIGEN) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?) ", Array As Object ((elEfectivo * -1), (elEfectivo * -1), 1, "DESCUENTO", "DESC01", descuentoTicket, Subs.traeFecha, Starter.meseroActual, Starter.mesaActual, elEfectivo, "TARJETA", descuentoTipoPago, $"${Starter.mesaActual}|${sigTicketMT}"$))
|
||||
Private rd As ResultSet = Starter.skmt.ExecQuery($"select pe_proid from pedido where pe_pronombre = 'DESCUENTO' and pe_mesa = '${Starter.mesaActual}' and pe_ticket = '${descuentoTicket}'"$)
|
||||
If rd.RowCount = 0 Then 'Si no se ha agregado el descuento al ticket, lo agregamos.
|
||||
Log("INSERTAMOS DESCUENTO")
|
||||
Log($"DescTicket: ${descuentoTicket}, descPago: ${descuentoTipoPago}"$)
|
||||
' Agregamos el efectivo como DESCUENTO en el pedido de la tarjeta.
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO PEDIDO (PE_COSTO_TOT, PE_COSTOU, PE_CANT, PE_PRONOMBRE, PE_PROID, PE_TICKET, PE_FECHA, PE_MESERO, PE_MESA, PE_COSTO_SIN, PE_TIPO, PE_TIPO2, PE_ORIGEN) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?) ", Array As Object ((elEfectivo * -1), (elEfectivo * -1), 1, "DESCUENTO", "DESC01", descuentoTicket, Subs.traeFecha, Starter.meseroActual, Starter.mesaActual, elEfectivo, "TARJETA", descuentoTipoPago, $"${Starter.mesaActual}|${sigTicketMT}"$))
|
||||
End If
|
||||
Starter.ticketActual = ticketX
|
||||
End If
|
||||
|
||||
@@ -3924,8 +3927,7 @@ Private Sub b_leyendaDescuento_Click
|
||||
Else
|
||||
elSubTotal = c.GetString("PE_COSTO_TOT")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Private nom() As String = Regex.Split("\$", elNombre)
|
||||
If nom.Length > 1 Then
|
||||
elNombre = nom(0)
|
||||
@@ -3937,10 +3939,11 @@ Private Sub b_leyendaDescuento_Click
|
||||
Log($"${elNombre}${CRLF}${cantXpu}${Subs.alineaDerecha("$"&NumberFormat2(elSubTotal, 1, 2, 2, True), (30 - cantXpu.Length), ".")}${CRLF}"$)
|
||||
' elTotalSumado = elTotalSumado + elSubTotal
|
||||
If i = c.RowCount - 1 Then
|
||||
Log(">>>>>>>>>>>>>>>>>>>>>>>>>< ")
|
||||
Private desc As ResultSet = Starter.skmt.ExecQuery($"select * from PEDIDO where PE_PRONOMBRE = 'DESCUENTO' and PE_MESA = '${Starter.mesaActual}' and PE_TIPO = '${tipoPago}' and PE_TICKET = '${Starter.ticketActual}'"$)
|
||||
' Log($"select * from PEDIDO where PE_PRONOMBRE = 'DESCUENTO' and PE_MESA = '${Starter.mesaActual}' and PE_TIPO = '${tipoPago}' and PE_TICKET = '${Starter.ticketActual}'"$)
|
||||
Log($"select * from PEDIDO where PE_PRONOMBRE = 'DESCUENTO' and PE_MESA = '${Starter.mesaActual}' and PE_TIPO = '${tipoPago}' and PE_TICKET = '${Starter.ticketActual}'"$)
|
||||
Log(">>>>> DESC: " & desc.RowCount)
|
||||
Do While desc.NextRow
|
||||
|
||||
If imprimirEste Then Printer1.WriteString($" Subtotal: ${Subs.alineaDerecha("$"&NumberFormat2( (Subs.traeTotalTicketActual_P(tipoPago)), 1, 2, 2, True), (45 - 12), ".")}${CRLF}"$)
|
||||
Log($"Subtotal: ${Subs.alineaDerecha("$"&NumberFormat2((Subs.traeTotalTicketActual_P(tipoPago)), 1, 2, 2, True), (45 - 12), ".")}${CRLF}"$)
|
||||
|
||||
@@ -3959,14 +3962,15 @@ Private Sub b_leyendaDescuento_Click
|
||||
' Log($"TIPO PAGO: ${tipoPago}"$)
|
||||
|
||||
Private elTotal As String = Subs.traeTotalTicketActual_P(tipoPago)
|
||||
|
||||
' LogColor("<<<<<<<<<<<<<<<< elTotal: " & elTotal, Colors.red)
|
||||
If c.GetString("ALM") = "MULTI-TICKET" Then
|
||||
' Log("ORIGEN: " & c.GetString("PT_ORIGEN"))
|
||||
Private m0() As String = Regex.Split("\|", c.GetString("PT_ORIGEN"))
|
||||
Private mesaX As String = m0(0)
|
||||
Private ticketX As String = m0(1)
|
||||
Private x As Cursor = Starter.skmt.ExecQuery($"select * from PEDIDO_TICKET where PT_MESA = '${mesaX}' and PT_TICKET = '${ticketX}'"$)
|
||||
Private x As Cursor = Starter.skmt.ExecQuery($"select * from PEDIDO_TICKET where PT_MESA = '${mesaX}' and PT_TICKET = '${ticketX}' and PT_PAGO = 'MULTI-TICKET'"$)
|
||||
Private y As Cursor = Starter.skmt.ExecQuery($"select ifnull(PT_MONTO, 0) as desc from PEDIDO_TICKET where PT_MESA = '${mesaX}' and PT_PAGO = 'EFECTIVO' and PT_ORIGEN = '${c.GetString("PT_ORIGEN")}'"$)
|
||||
' Log($"select * from PEDIDO_TICKET where PT_MESA = '${mesaX}' and PT_TICKET = '${ticketX}'"$)
|
||||
Private elDesc As String = "0"
|
||||
If y.RowCount > 0 Then
|
||||
y.Position = 0
|
||||
@@ -3975,7 +3979,7 @@ Private Sub b_leyendaDescuento_Click
|
||||
If x.RowCount > 0 Then
|
||||
x.Position = 0
|
||||
' Log(x.GetString("PT_TICKET"))
|
||||
' Log(x.GetString("PT_MONTO"))
|
||||
' LogColor(">>>>>> PT_MONTO= " & x.GetString("PT_MONTO"), Colors.red)
|
||||
elTotal = x.GetString("PT_MONTO") - elDesc
|
||||
End If
|
||||
End If
|
||||
@@ -4001,7 +4005,7 @@ Private Sub b_leyendaDescuento_Click
|
||||
If elTextoTotal.Length > 40 Then
|
||||
Private tot1 As String = elTextoTotal.SubString2(0, 40)
|
||||
Private tot2 As String = elTextoTotal.SubString(40)
|
||||
Log("xxxxxxxxxxxxxxxxx")
|
||||
' Log("xxxxxxxxxxxxxxxxx")
|
||||
If imprimirEste Then Printer1.WriteString($"${CRLF} ${tot1}"$)
|
||||
If imprimirEste Then Printer1.WriteString($"${CRLF} ${tot2}"$)
|
||||
Else
|
||||
|
||||
2
Subs.bas
2
Subs.bas
@@ -1191,7 +1191,7 @@ Sub traeTotalTicketActual_P(tipoPago As String) As String
|
||||
Private elSubTIndividual As String = p.GetString("PE_COSTOU") - (p.GetString("PE_COSTOU") * desc)
|
||||
Private st2 As String = Ceil(elSubTIndividual) * p.GetString("PE_CANT")
|
||||
' Log(">>>>>>> " & p.GetString("CAT_GP_NOMBRE") & " - " & (p.GetString("PE_COSTO_TOT") * desc))
|
||||
Log(" >>>>>> " & st & " + " & st2)
|
||||
' Log(" >>>>>> " & st & " + " & st2)
|
||||
st = st + st2 'Sumamos el subtotal anterior mas el REDONDEO del producto con descuento.
|
||||
Next
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user