mirror of
https://github.com/KeymonSoft/Lanterna.git
synced 2026-04-17 21:06:32 +00:00
- Se corrigio un error que afectaba a las productos con descuento y redondeo.
This commit is contained in:
@@ -1129,9 +1129,9 @@ Private Sub b_mesaCerrar_Click
|
||||
l_faltaMonto.Text = ""
|
||||
cb_opcionEfectivo.Checked = False
|
||||
p_formasDePago.Height = 40dip
|
||||
p_propina.Top = 133dip
|
||||
p_botonesCerrar.Top = 257dip
|
||||
p_pago.Height = 320dip
|
||||
p_propina.Top = 143dip
|
||||
p_botonesCerrar.Top = 265dip
|
||||
p_pago.Height = 330dip
|
||||
p_formasDePago.RemoveAllViews
|
||||
Private c As Cursor = Starter.skmt.ExecQuery($"select PE_MESA from PEDIDO where PE_MESA = '${Starter.mesaActual}' and PE_TIPO = 'VENTA'"$)
|
||||
If c.RowCount > 0 Then
|
||||
@@ -2259,7 +2259,7 @@ Private Sub b_agregarPago_Click
|
||||
End Sub
|
||||
|
||||
Sub agregaFormaDePago(left0 As Int, top0 As Int, tag0 As Int)
|
||||
Log("agregaFormaDePago |" & top0 & "|" & tag0)
|
||||
' Log("agregaFormaDePago |" & top0 & "|" & tag0)
|
||||
p_opcionEfectivo.Visible = False
|
||||
Private p_num As Panel
|
||||
p_num.Initialize("")
|
||||
@@ -2583,24 +2583,29 @@ Private Sub b_leyendaDescuento_Click
|
||||
If imprimirEste Then Printer1.WriteString(" " & CRLF)
|
||||
c = Starter.skmt.ExecQuery($"select *, ifnull(PE_DESC, 0) as DESC from PEDIDO join cat_gunaprod on PE_PROID = CAT_GP_ID where PE_MESA = '${Starter.mesaActual}' and PE_TIPO = '${tipoPago}' and PE_TICKET = '${Starter.ticketActual}'"$)
|
||||
' Log($"select * from PEDIDO where PE_MESA = '${Starter.mesaActual}' and PE_TIPO = '${tipoPago}' and PE_TICKET = '${Starter.ticketActual}'"$)
|
||||
' Private elTotalSumado As String = "0"
|
||||
If c.RowCount > 0 Then
|
||||
Private elSubTotal As String = 0
|
||||
Private elPU As String = 0
|
||||
If imprimirEste Then Printer1.WriteString(Printer1.NOBOLD)
|
||||
For i = 0 To c.RowCount - 1
|
||||
c.Position = i
|
||||
Private elNombre As String = c.GetString("PE_PRONOMBRE")
|
||||
elPU = c.GetString("PE_COSTOU")
|
||||
If elNombre.Length > 30 Then elNombre.SubString2(0, 30)
|
||||
If c.GetString("CAT_GP_TIPO") = "ALIMENTOS" Then
|
||||
' Log($">> APLICAMOS DESC POR ALIMENTOS"$)
|
||||
elSubTotal = c.GetString("PE_COSTO_TOT") - (c.GetString("PE_COSTO_TOT") * (c.GetString("DESC") / 100))
|
||||
elSubTotal = Ceil(elSubTotal)
|
||||
elPU = Ceil(c.GetString("PE_COSTOU") - (c.GetString("PE_COSTOU") * (c.GetString("DESC") / 100)))
|
||||
Else
|
||||
elSubTotal = c.GetString("PE_COSTO_TOT")
|
||||
End If
|
||||
' Log($"${c.GetString("PE_PRONOMBRE")}, ${c.GetString("DESC")}${elSubTotal}"$)
|
||||
Private cantXpu As String = $"${c.GetString("PE_CANT")} x ${elSubTotal}"$
|
||||
Private cantXpu As String = $"${c.GetString("PE_CANT")} x ${elPU}"$
|
||||
If imprimirEste Then Printer1.WriteString($"${c.GetString("PE_CANT")} ${elNombre}${CRLF}${cantXpu}${Subs.alineaDerecha("$"&NumberFormat2(elSubTotal, 1, 2, 2, True), (30 - cantXpu.Length), ".")}${CRLF}"$)
|
||||
Log($"${c.GetString("PE_CANT")} ${elNombre}${CRLF}${cantXpu}${Subs.alineaDerecha("$"&NumberFormat2(elSubTotal, 1, 2, 2, True), (30 - cantXpu.Length), ".")}${CRLF}"$)
|
||||
' elTotalSumado = elTotalSumado + elSubTotal
|
||||
Next
|
||||
End If
|
||||
c = Starter.skmt.ExecQuery($"select *, ifnull(PT_PROPINA, "0") as propina, ifnull(PT_ALMACEN, "") as ALM from PEDIDO_TICKET where PT_MESA = '${Starter.mesaActual}' and PT_PAGO = '${tipoPago}' and PT_TICKET = '${Starter.ticketActual}'"$)
|
||||
@@ -2608,6 +2613,7 @@ Private Sub b_leyendaDescuento_Click
|
||||
If c.RowCount > 0 Then
|
||||
c.Position = 0
|
||||
Private elTotal As String = Subs.traeTotalTicketActual_P(tipoPago)
|
||||
' elTotal = elTotalSumado
|
||||
If c.GetString("ALM") = "MULTI-TICKET" Then elTotal = c.GetString("PT_MONTO")
|
||||
' Log(">>>>>>>> " & Subs.traeTotalTicketActual_P(tipoPago))
|
||||
' If c.GetString("propina") <> 0 And c.GetString("PT_PAGO_PROPINA") = "Tarjeta" Then 'Se comento porque lo propina no se debe de sumar al ticket.
|
||||
|
||||
Binary file not shown.
@@ -77,12 +77,12 @@ Module8=Subs
|
||||
NumberOfFiles=24
|
||||
NumberOfLibraries=17
|
||||
NumberOfModules=8
|
||||
Version=12.8
|
||||
Version=12.5
|
||||
@EndOfDesignText@
|
||||
#Region Project Attributes
|
||||
#ApplicationLabel: Lanterna
|
||||
#VersionCode: 1
|
||||
#VersionName: 4.03.28
|
||||
#VersionName: 4.03.29
|
||||
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
||||
#SupportedOrientations: portrait
|
||||
#CanInstallToExternalStorage: False
|
||||
|
||||
@@ -25,6 +25,6 @@ ModuleClosedNodes5=
|
||||
ModuleClosedNodes6=
|
||||
ModuleClosedNodes7=
|
||||
ModuleClosedNodes8=47,48
|
||||
NavigationStack=Subs,traeTotalTicketActual_P,1158,0,C_Principal,p_transparentePago_Click,2226,3,C_Principal,p_pago_Click,1194,0,Subs,guardaProductoSinGestion,1334,0,C_Principal,b_prodMenos_Click,418,0,C_Principal,b_prodMas_Click,463,0,C_Principal,b_renombraVarios_Click,2225,0,C_Principal,b_leyendaDescuento_Click,2496,0,C_Principal,b_pagoCerrar_Click,1211,6,B4XMainPage,JobDone,215,0
|
||||
NavigationStack=C_Principal,B4XPage_Appear,277,0,Main,Activity_ActionBarHomeClick,33,0,Main,Activity_KeyPress,39,0,C_Principal,Class_Globals,123,0,Subs,traeTotalTicketActual_P,1173,6,C_Principal,b_leyendaDescuento_Click,2587,6,Visual Designer,principal.bal,-100,6,C_Principal,b_mesaCerrar_Click,1126,0,C_Principal,agregaFormaDePago,2255,0,Main,Globals,21,0
|
||||
SelectedBuild=0
|
||||
VisibleModules=1,7,8,2,3,6,4,5
|
||||
|
||||
@@ -1154,7 +1154,7 @@ End Sub
|
||||
Sub traeTotalTicketActual_PT As String
|
||||
Private t As String = 0
|
||||
Private pt As Cursor = Starter.skmt.ExecQuery($"select ifnull(sum(PT_MONTO),0) as subtotal from PEDIDO_TICKET where PT_TICKET = '${Starter.ticketActual}' and PT_MESA = '${Starter.mesaActual}' and PT_PAGO = 'VENTA'"$)
|
||||
pt.Position=0
|
||||
pt.Position = 0
|
||||
If pt.RowCount > 0 Then
|
||||
t = pt.GetString("subtotal")
|
||||
End If
|
||||
@@ -1177,10 +1177,10 @@ Sub traeTotalTicketActual_P(tipoPago As String) As String
|
||||
desc = 0
|
||||
End If
|
||||
' Log(">>>>>>> " & p.GetString("CAT_GP_NOMBRE") & " - " & (p.GetString("PE_COSTO_TOT") * desc))
|
||||
st = st + (p.GetString("PE_COSTO_TOT") - (p.GetString("PE_COSTO_TOT") * desc))
|
||||
st = st + Ceil((p.GetString("PE_COSTO_TOT") - (p.GetString("PE_COSTO_TOT") * desc))) 'Sumamos el subtotal anterior mas el REDONDEO del producto con descuento.
|
||||
Next
|
||||
End If
|
||||
st = Ceil(st)
|
||||
'st = Ceil(st)
|
||||
Return st
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user