mirror of
https://github.com/KeymonSoft/Lanterna_H.git
synced 2026-04-19 05:39:30 +00:00
- VERSION 4.08.19
- Se corrigió que en el corte Z, no estaba tomando en cuenta el efectivo de los multi-ticket que se aplica como "descuento". - Se habilito el "Total sin propinas" en el corte Z (se agrego un "Or 1 = 1" al IF) en "b_ImpAB_Click".
This commit is contained in:
@@ -90,7 +90,7 @@ Version=12.8
|
|||||||
#Region Project Attributes
|
#Region Project Attributes
|
||||||
#ApplicationLabel: Lanterna
|
#ApplicationLabel: Lanterna
|
||||||
#VersionCode: 1
|
#VersionCode: 1
|
||||||
#VersionName: 4.08.01
|
#VersionName: 4.08.19
|
||||||
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
||||||
#SupportedOrientations: landscape
|
#SupportedOrientations: landscape
|
||||||
#CanInstallToExternalStorage: False
|
#CanInstallToExternalStorage: False
|
||||||
@@ -511,11 +511,11 @@ Private Sub b_fix_Click
|
|||||||
cmd.Initialize
|
cmd.Initialize
|
||||||
cmd.Name = "traePedido_Lanter"
|
cmd.Name = "traePedido_Lanter"
|
||||||
cmd.Parameters = Array As Object("07/28/24")
|
cmd.Parameters = Array As Object("07/28/24")
|
||||||
reqManager.ExecuteQuery(cmd , 0, "traePedido")
|
' reqManager.ExecuteQuery(cmd , 0, "traePedido")
|
||||||
cmd.Initialize
|
cmd.Initialize
|
||||||
cmd.Name = "traePedidoCliente_Lanter"
|
cmd.Name = "traePedidoCliente_Lanter"
|
||||||
cmd.Parameters = Array As Object("07/28/24")
|
cmd.Parameters = Array As Object("07/28/24")
|
||||||
reqManager.ExecuteQuery(cmd , 0, "traePedidoCliente")
|
' reqManager.ExecuteQuery(cmd , 0, "traePedidoCliente")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' Se revisa si hay una intención (intent) de abrir una base de datos y si es así, entonces se importa esa base de datos.
|
' Se revisa si hay una intención (intent) de abrir una base de datos y si es así, entonces se importa esa base de datos.
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ ModuleBreakpoints6=
|
|||||||
ModuleBreakpoints7=
|
ModuleBreakpoints7=
|
||||||
ModuleBreakpoints8=
|
ModuleBreakpoints8=
|
||||||
ModuleBreakpoints9=
|
ModuleBreakpoints9=
|
||||||
ModuleClosedNodes0=6,7,8,9,10,12,13,15,16,19,20,21,22
|
ModuleClosedNodes0=6,7,8,9,10,13,16,19,20,21,22
|
||||||
ModuleClosedNodes1=
|
ModuleClosedNodes1=
|
||||||
ModuleClosedNodes2=
|
ModuleClosedNodes2=
|
||||||
ModuleClosedNodes3=
|
ModuleClosedNodes3=
|
||||||
@@ -28,6 +28,6 @@ ModuleClosedNodes6=6
|
|||||||
ModuleClosedNodes7=
|
ModuleClosedNodes7=
|
||||||
ModuleClosedNodes8=
|
ModuleClosedNodes8=
|
||||||
ModuleClosedNodes9=
|
ModuleClosedNodes9=
|
||||||
NavigationStack=Principal,Process_Globals,29,0,Principal,actualizaProductos,4130,0,Principal,clv_orden_VisibleRangeChanged,4095,0,Principal,LlenaOrden,4117,0,Principal,imprimeResumenGrupos,1969,0,Principal,p_mesas_Click,4329,0,Principal,b_resumen_Click,4349,6,Visual Designer,principal.bal,-100,2,Visual Designer,login.bal,-100,1,Principal,b_impAB_Click,2822,6
|
NavigationStack=Principal,b_cierreTotal_LongClick,1758,0,Principal,borrarEfectivo,3349,0,Main,Activity_Create,89,0,Main,b_server_Click,169,0,Main,b_fix_Click,428,0,Starter,JobDone,104,0,Main,b_cargaProductos_Click,243,0,Main,JobDone,269,0,Principal,b_envioInfo_Click,3280,0,Principal,JobDone,3329,6
|
||||||
SelectedBuild=0
|
SelectedBuild=0
|
||||||
VisibleModules=7,6,8,1
|
VisibleModules=7,6,8,1
|
||||||
|
|||||||
@@ -328,12 +328,12 @@ Sub Activity_Create(FirstTime As Boolean)
|
|||||||
cb_nuevoPagoPropina.SetItems(Array As String("Amex", "Mifel", "Efectivo"))
|
cb_nuevoPagoPropina.SetItems(Array As String("Amex", "Mifel", "Efectivo"))
|
||||||
muestraCats
|
muestraCats
|
||||||
Log("################# PERMISOS BT: " & Starter.rp.Check("android.permission.BLUETOOTH_CONNECT"))
|
Log("################# PERMISOS BT: " & Starter.rp.Check("android.permission.BLUETOOTH_CONNECT"))
|
||||||
Log("Permisos BT: " & Starter.rp.Check("android.permission.BLUETOOTH_CONNECT"))
|
' Log("Permisos BT: " & Starter.rp.Check("android.permission.BLUETOOTH_CONNECT"))
|
||||||
Log("REVISAMOS PERMISOS DE BT")
|
' Log("REVISAMOS PERMISOS DE BT")
|
||||||
Starter.rp.CheckAndRequest("android.permission.BLUETOOTH_CONNECT")
|
Starter.rp.CheckAndRequest("android.permission.BLUETOOTH_CONNECT")
|
||||||
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
|
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
|
||||||
If Result Then Log("Tenemos permisos de bluetooth.")
|
' If Result Then Log("Tenemos permisos de bluetooth.")
|
||||||
Log($"Resultado del CheckAndRequest: ${Result}"$)
|
' Log($"Resultado del CheckAndRequest: ${Result}"$)
|
||||||
Starter.skmt.ExecNonQuery($"update pedido_ticket set PT_TARJETA = 'Mifel' where PT_TARJETA like '%Visa%'"$)
|
Starter.skmt.ExecNonQuery($"update pedido_ticket set PT_TARJETA = 'Mifel' where PT_TARJETA like '%Visa%'"$)
|
||||||
Starter.skmt.ExecNonQuery($"update pedido_ticket set PT_PAGO_PROPINA = 'Mifel' where PT_TARJETA like '%Visa%'"$)
|
Starter.skmt.ExecNonQuery($"update pedido_ticket set PT_PAGO_PROPINA = 'Mifel' where PT_TARJETA like '%Visa%'"$)
|
||||||
Starter.skmt.ExecNonQuery($"update pedido_ticket set PT_PAGO2 = 'Mifel' where PT_TARJETA like '%Visa%'"$)
|
Starter.skmt.ExecNonQuery($"update pedido_ticket set PT_PAGO2 = 'Mifel' where PT_TARJETA like '%Visa%'"$)
|
||||||
@@ -2258,6 +2258,26 @@ Sub imprimeResumenGrupos
|
|||||||
totMontoBebidas = totMontoBebidas + Ceil(grpsMonto)
|
totMontoBebidas = totMontoBebidas + Ceil(grpsMonto)
|
||||||
totCantBebidas = totCantBebidas + grpsCant
|
totCantBebidas = totCantBebidas + grpsCant
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Subs.revisaEfectivoBorrado And laCatAnt = "ALIMENTOS" Then ' Agregamos el efectivo descontado al monto de los alimentos.
|
||||||
|
Log("=========== TERMINA ALIMENTOS")
|
||||||
|
Private descs As ResultSet = Starter.skmt.ExecQuery($"select distinct pe_mesa, pe_costo_tot, pe_cant from pedido where pe_proid = 'DESC01'"$)
|
||||||
|
Private descsMonto As String = "0"
|
||||||
|
Private descsCant As String = "0"
|
||||||
|
Do While descs.NextRow
|
||||||
|
descsMonto = descsMonto + descs.GetString("PE_COSTO_TOT")
|
||||||
|
descsCant = descsCant + descs.GetString("PE_CANT")
|
||||||
|
Loop
|
||||||
|
|
||||||
|
grpsMonto = grpsMonto + descsMonto
|
||||||
|
grpsCant = grpsCant + descsCant
|
||||||
|
cs.Color(Colors.DarkGray).Append($"ALIMENTOS VARIOS ${primerEspacio.SubString(primerEspacio.Length/3)}${descsCant} ... ${descsMonto} ${CRLF}"$).pop
|
||||||
|
Log($" ALIMENTOS VARIOS${primerEspacio}${descsCant} ... ${descsMonto} ${CRLF}"$)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If imprimirAqui Then Printer1.WriteString($"Total ${laCatAnt}${primerEspacio}${grpsCant} .. $${NumberFormat2(grpsMonto, 1, 0, 0, True)} ${CRLF}"$)
|
If imprimirAqui Then Printer1.WriteString($"Total ${laCatAnt}${primerEspacio}${grpsCant} .. $${NumberFormat2(grpsMonto, 1, 0, 0, True)} ${CRLF}"$)
|
||||||
Log($" Total ${laCatAnt}: .......... "$ & grpsCant & " ..... " & NumberFormat2(grpsMonto, 1, 0, 0, True))
|
Log($" Total ${laCatAnt}: .......... "$ & grpsCant & " ..... " & NumberFormat2(grpsMonto, 1, 0, 0, True))
|
||||||
cs.Color(Colors.DarkGray).Append($"Total ${laCatAnt}${primerEspacio.SubString(primerEspacio.Length/3)}${grpsCant} ... $${NumberFormat2(grpsMonto, 1, 0, 0, True)} ${CRLF}"$).pop
|
cs.Color(Colors.DarkGray).Append($"Total ${laCatAnt}${primerEspacio.SubString(primerEspacio.Length/3)}${grpsCant} ... $${NumberFormat2(grpsMonto, 1, 0, 0, True)} ${CRLF}"$).pop
|
||||||
@@ -2297,7 +2317,7 @@ Sub imprimeResumenGrupos
|
|||||||
grpsCant = grpsCant + tm.Get("cant")
|
grpsCant = grpsCant + tm.Get("cant")
|
||||||
grpsMonto = grpsMonto + Ceil(tm.Get("monto"))
|
grpsMonto = grpsMonto + Ceil(tm.Get("monto"))
|
||||||
laCatAnt = tm.Get("grupo")
|
laCatAnt = tm.Get("grupo")
|
||||||
Next
|
Next
|
||||||
totMontoBebidas = totMontoBebidas + grpsMonto
|
totMontoBebidas = totMontoBebidas + grpsMonto
|
||||||
totCantBebidas = totCantBebidas + grpsCant
|
totCantBebidas = totCantBebidas + grpsCant
|
||||||
If imprimirAqui Then Printer1.WriteString($"${laCatAnt}${primerEspacio}${grpsCant} .. $${grpsMonto} ${CRLF}"$)
|
If imprimirAqui Then Printer1.WriteString($"${laCatAnt}${primerEspacio}${grpsCant} .. $${grpsMonto} ${CRLF}"$)
|
||||||
@@ -2657,9 +2677,6 @@ Sub b_impAB_Click
|
|||||||
' Private grps As ResultSet = Starter.skmt.ExecQuery($"select distinct PE_MESA, PE_PRONOMBRE, PE_TIPO, ifnull(PE_DESC,0) as PE_DESC,PE_COSTO_TOT, PE_CANT, CAT_GP_TIPO, CAT_GP_TIPO2, CAT_GP_ORDEN_GRUPOS from pedido join CAT_GUNAPROD on cat_gp_id = PE_PROID where PE_TIPO <> 'VENTA' and PE_TIPO <> 'MULTI-TICKET' and pe_ticket <> 'null' and PE_PROID not like 'CDA%' and PE_PROID not like 'DESC%' order by CAT_GP_ORDEN_GRUPOS, PE_PRONOMBRE"$)
|
' Private grps As ResultSet = Starter.skmt.ExecQuery($"select distinct PE_MESA, PE_PRONOMBRE, PE_TIPO, ifnull(PE_DESC,0) as PE_DESC,PE_COSTO_TOT, PE_CANT, CAT_GP_TIPO, CAT_GP_TIPO2, CAT_GP_ORDEN_GRUPOS from pedido join CAT_GUNAPROD on cat_gp_id = PE_PROID where PE_TIPO <> 'VENTA' and PE_TIPO <> 'MULTI-TICKET' and pe_ticket <> 'null' and PE_PROID not like 'CDA%' and PE_PROID not like 'DESC%' order by CAT_GP_ORDEN_GRUPOS, PE_PRONOMBRE"$)
|
||||||
|
|
||||||
Private grps As ResultSet = Starter.skmt.ExecQuery($"Select PE_MESA, PE_TICKET, PE_TIPO, PE_TIPO2, ifnull(PE_DESC,0) as PE_DESC, PE_COSTO_TOT, PE_COSTOU, PE_CANT, PE_PRONOMBRE, PE_PROID, CAT_GP_TIPO, CAT_GP_TIPO2, PE_ORIGEN, CAT_GP_ORDEN_GRUPOS from PEDIDO join CAT_GUNAPROD on cat_gp_id = PE_PROID where PE_TIPO <> 'VENTA' and PE_ORIGEN Is Null order by CAT_GP_ORDEN_GRUPOS, PE_PRONOMBRE"$)
|
Private grps As ResultSet = Starter.skmt.ExecQuery($"Select PE_MESA, PE_TICKET, PE_TIPO, PE_TIPO2, ifnull(PE_DESC,0) as PE_DESC, PE_COSTO_TOT, PE_COSTOU, PE_CANT, PE_PRONOMBRE, PE_PROID, CAT_GP_TIPO, CAT_GP_TIPO2, PE_ORIGEN, CAT_GP_ORDEN_GRUPOS from PEDIDO join CAT_GUNAPROD on cat_gp_id = PE_PROID where PE_TIPO <> 'VENTA' and PE_ORIGEN Is Null order by CAT_GP_ORDEN_GRUPOS, PE_PRONOMBRE"$)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private elProd, prodAnt As String
|
Private elProd, prodAnt As String
|
||||||
Private grpsCant As String = "0"
|
Private grpsCant As String = "0"
|
||||||
Private grpsProdCant As String = "0"
|
Private grpsProdCant As String = "0"
|
||||||
@@ -2692,15 +2709,37 @@ Sub b_impAB_Click
|
|||||||
If grps.GetString("CAT_GP_TIPO2") = "ALIMENTOS" And grps.GetString("PE_DESC") > 0 Then
|
If grps.GetString("CAT_GP_TIPO2") = "ALIMENTOS" And grps.GetString("PE_DESC") > 0 Then
|
||||||
' elMonto2 = elMonto2 - ((grps.GetString("PE_DESC")/100) * elMonto2)
|
' elMonto2 = elMonto2 - ((grps.GetString("PE_DESC")/100) * elMonto2)
|
||||||
desc = grps.GetString("PE_DESC") / 100
|
desc = grps.GetString("PE_DESC") / 100
|
||||||
' Log("Hacemos descuento: " & elMonto2)
|
' Log("Hacemos descuento: " & desc)
|
||||||
End If
|
End If
|
||||||
Private elSubTIndividual As String = grps.GetString("PE_COSTOU") - (grps.GetString("PE_COSTOU") * desc)
|
Private elSubTIndividual As String = grps.GetString("PE_COSTOU") - (grps.GetString("PE_COSTOU") * desc)
|
||||||
Private st2 As String = Ceil(elSubTIndividual) * grps.GetString("PE_CANT")
|
Private st2 As String = Ceil(elSubTIndividual) * grps.GetString("PE_CANT")
|
||||||
' st = st + st2
|
' st = st + st2
|
||||||
' Log($"${elProd}|${elMonto2}|${st}|${st2}"$)
|
' Log($"${elProd}|${elMonto2}|${st}|${st2}"$)
|
||||||
grpsProdMonto = grpsProdMonto + st2 'Ceil(elMonto2)
|
grpsProdMonto = grpsProdMonto + st2 'Ceil(elMonto2)
|
||||||
|
|
||||||
|
' Log($"laCat: ${laCat}, laCatAnt: ${laCatAnt}"$)
|
||||||
|
If Subs.revisaEfectivoBorrado And laCatAnt = "ALIMENTOS" And laCat <> "ALIMENTOS" Then ' Agregamos el efectivo descontado al monto de los alimentos.
|
||||||
|
' Log("=========== TERMINA ALIMENTOS")
|
||||||
|
Private descs As ResultSet = Starter.skmt.ExecQuery($"select distinct pe_mesa, pe_costo_tot, pe_cant from pedido where pe_proid = 'DESC01'"$)
|
||||||
|
Private descsMonto As String = "0"
|
||||||
|
Private descsCant As String = "0"
|
||||||
|
Do While descs.NextRow
|
||||||
|
descsMonto = descsMonto + descs.GetString("PE_COSTO_TOT")
|
||||||
|
descsCant = descsCant + descs.GetString("PE_CANT")
|
||||||
|
Loop
|
||||||
|
|
||||||
|
Private m As Map = CreateMap("prod":"ALIMENTOS VARIOS", "grupo":laCatAnt, "cant":descsCant,"monto":descsMonto)
|
||||||
|
mProds.Put("ALIMENTOS VARIOS", m)
|
||||||
|
' Log(m)
|
||||||
|
' grpsMonto = grpsMonto + descsMonto
|
||||||
|
' grpsCant = grpsCant + descsCant
|
||||||
|
' cs.Color(Colors.DarkGray).Append($"ALIMENTOS VARIOS ${primerEspacio.SubString(primerEspacio.Length/3)}${descsCant} ... ${descsMonto} ${CRLF}"$).pop
|
||||||
|
' Log($" ALIMENTOS VARIOS${primerEspacio}${descsCant} ... ${descsMonto} ${CRLF}"$)
|
||||||
|
End If
|
||||||
|
|
||||||
Private m As Map = CreateMap("prod":elProd, "grupo":laCat, "cant":grpsProdCant,"monto":grpsProdMonto)
|
Private m As Map = CreateMap("prod":elProd, "grupo":laCat, "cant":grpsProdCant,"monto":grpsProdMonto)
|
||||||
mProds.Put(elProd, m)
|
mProds.Put(elProd, m)
|
||||||
|
' Log(m)
|
||||||
prodAnt = grps.GetString("PE_PRONOMBRE")
|
prodAnt = grps.GetString("PE_PRONOMBRE")
|
||||||
laCatAnt = laCat
|
laCatAnt = laCat
|
||||||
Loop
|
Loop
|
||||||
@@ -2716,7 +2755,7 @@ Sub b_impAB_Click
|
|||||||
' Log(elProd2)
|
' Log(elProd2)
|
||||||
Private tm As Map = mProds.Get(elProd2)
|
Private tm As Map = mProds.Get(elProd2)
|
||||||
' Log(tm)
|
' Log(tm)
|
||||||
' Log($"${tm.Get("grupo")}, ${tm.Get("prod")}, ${tm.Get("cant")}, ${tm.Get("monto")}"$)
|
' Log($"${tm.Get("grupo")}, ${tm.Get("prod")}, ${tm.Get("cant")}, ${tm.Get("monto")}, ${totMontoAlimentos}, ${grpsMontoTotal}"$)
|
||||||
If tm.Get("grupo") <> laCatAnt Then
|
If tm.Get("grupo") <> laCatAnt Then
|
||||||
If grpsCant > 0 Or grpsMonto > 0 Then
|
If grpsCant > 0 Or grpsMonto > 0 Then
|
||||||
Private primerEspacioLargo As Int = 30 - laCatAnt.Length - (grpsCant.Length + 1) - 6
|
Private primerEspacioLargo As Int = 30 - laCatAnt.Length - (grpsCant.Length + 1) - 6
|
||||||
@@ -2724,7 +2763,7 @@ Sub b_impAB_Click
|
|||||||
For n = 1 To primerEspacioLargo
|
For n = 1 To primerEspacioLargo
|
||||||
primerEspacio = primerEspacio & "."
|
primerEspacio = primerEspacio & "."
|
||||||
Next
|
Next
|
||||||
' Log($"${grpsCant}, ${grpsMonto}, |${tm.Get("grupo")}|"$)
|
' Log($">>>>>> ${grpsCant}, ${grpsMonto}, ${totMontoAlimentos}, |${tm.Get("grupo")}|"$)
|
||||||
If laCatAnt = "ALIMENTOS" Then
|
If laCatAnt = "ALIMENTOS" Then
|
||||||
totMontoAlimentos = totMontoAlimentos + Ceil(grpsMonto)
|
totMontoAlimentos = totMontoAlimentos + Ceil(grpsMonto)
|
||||||
totCantAlimentos = totCantAlimentos + grpsCant
|
totCantAlimentos = totCantAlimentos + grpsCant
|
||||||
@@ -2790,6 +2829,7 @@ Sub b_impAB_Click
|
|||||||
' cs.Append($"${CRLF}"$)
|
' cs.Append($"${CRLF}"$)
|
||||||
Log($"TOTAL ALIMENTOS ........... $${NumberFormat2(totMontoAlimentos, 1, 0, 0, True)} ${CRLF}"$)
|
Log($"TOTAL ALIMENTOS ........... $${NumberFormat2(totMontoAlimentos, 1, 0, 0, True)} ${CRLF}"$)
|
||||||
Log($"TOTAL BEBIDAS ........... $${NumberFormat2(totMontoBebidas, 1, 0, 0, True)} ${CRLF}"$)
|
Log($"TOTAL BEBIDAS ........... $${NumberFormat2(totMontoBebidas, 1, 0, 0, True)} ${CRLF}"$)
|
||||||
|
Log($"TOTAL: $${Subs.alineaDerecha("$"&NumberFormat2(totMontoAlimentos+totMontoBebidas,1,0,0,True), 45 - "TOTAL BEBIDAS".Length, ".")} ${CRLF}"$)
|
||||||
|
|
||||||
'PROPINAS
|
'PROPINAS
|
||||||
' If imprimirAqui Then Sleep(1000)
|
' If imprimirAqui Then Sleep(1000)
|
||||||
@@ -2829,12 +2869,13 @@ Sub b_impAB_Click
|
|||||||
|
|
||||||
'PAGOS
|
'PAGOS
|
||||||
' If imprimirAqui Then Sleep(1000)
|
' If imprimirAqui Then Sleep(1000)
|
||||||
Private pgs As Cursor = Starter.skmt.ExecQuery($"Select PT_PAGO2, sum(PT_NOART) As arts, sum(PT_MONTO) As monto from PEDIDO_TICKET where pt_pago <> 'MULTI-TICKET' and pt_pago <> 'VENTA' group by PT_PAGO2
|
Private pgs As Cursor = Starter.skmt.ExecQuery($"Select PT_PAGO2, sum(PT_NOART) As arts, sum(PT_MONTO) As monto from PEDIDO_TICKET where pt_pago <> 'MULTI-TICKET' and pt_pago <> 'VENTA'
|
||||||
|
group by PT_PAGO2
|
||||||
order by CASE PT_PAGO_PROPINA
|
order by CASE PT_PAGO_PROPINA
|
||||||
WHEN 'Amex' THEN 0
|
WHEN 'Amex' THEN 0
|
||||||
WHEN 'Mifel' THEN 1
|
WHEN 'Mifel' THEN 1
|
||||||
WHEN 'Efectivo' THEN 2
|
WHEN 'Efectivo' THEN 2
|
||||||
END"$)
|
END"$) ' and (CASE WHEN PT_PAGO = 'EFECTIVO' and PT_ALMACEN = 'MULTI-TICKET' THEN false ELSE true END) - El primer "case" es para que en el efectivo NO cuente los tickets multi-tickets, porque esos son "Consumo de alimentos".
|
||||||
Private totalComensales As Int = 0
|
Private totalComensales As Int = 0
|
||||||
If imprimirAqui Then Printer1.WriteString($"${CRLF}"$)
|
If imprimirAqui Then Printer1.WriteString($"${CRLF}"$)
|
||||||
If imprimirAqui Then Printer1.WriteString(Printer1.BOLD)
|
If imprimirAqui Then Printer1.WriteString(Printer1.BOLD)
|
||||||
@@ -2858,7 +2899,7 @@ Sub b_impAB_Click
|
|||||||
primerEspacio = primerEspacio & "."
|
primerEspacio = primerEspacio & "."
|
||||||
Next
|
Next
|
||||||
' monto = NumberFormat2(monto.As(Double), 1, 0, 0, True)
|
' monto = NumberFormat2(monto.As(Double), 1, 0, 0, True)
|
||||||
' Log(monto)
|
' Log(">>> MONTO: " & monto)
|
||||||
' Aqui se sacan las PROPINAS para sumarselas a los subtotals de cada pago.
|
' Aqui se sacan las PROPINAS para sumarselas a los subtotals de cada pago.
|
||||||
Private propAmex = "0", propMifel = "0", propMifelDebito = "0", propEfectivo = "0" As String
|
Private propAmex = "0", propMifel = "0", propMifelDebito = "0", propEfectivo = "0" As String
|
||||||
Private rt As ResultSet = Starter.skmt.ExecQuery($"Select sum(pt_monto) as ptMonto, sum(pt_propina) as ptPropina, * from pedido_ticket where pt_pago <> 'VENTA' and PT_PAGO <> 'MULTI-TICKET' group by pt_pago2"$)
|
Private rt As ResultSet = Starter.skmt.ExecQuery($"Select sum(pt_monto) as ptMonto, sum(pt_propina) as ptPropina, * from pedido_ticket where pt_pago <> 'VENTA' and PT_PAGO <> 'MULTI-TICKET' group by pt_pago2"$)
|
||||||
@@ -2878,6 +2919,7 @@ Sub b_impAB_Click
|
|||||||
Do While rtpe.NextRow
|
Do While rtpe.NextRow
|
||||||
propEfectivo = rtpe.GetString("ptPropina")
|
propEfectivo = rtpe.GetString("ptPropina")
|
||||||
Loop
|
Loop
|
||||||
|
' Log($"PROPINA EFECTIVO: ${propEfectivo}"$)
|
||||||
If elPago = "Amex" Then
|
If elPago = "Amex" Then
|
||||||
' Log("ES AMEX")
|
' Log("ES AMEX")
|
||||||
montoAmex = monto
|
montoAmex = monto
|
||||||
@@ -2903,7 +2945,7 @@ Sub b_impAB_Click
|
|||||||
cs.Color(Colors.DarkGray).Append($"TOTAL PAGOS: ........... $${totalPagos} ${CRLF}"$).pop
|
cs.Color(Colors.DarkGray).Append($"TOTAL PAGOS: ........... $${totalPagos} ${CRLF}"$).pop
|
||||||
Log($"TOTAL PAGOS: .........${i}.. $${totalPagos} ${CRLF}"$)
|
Log($"TOTAL PAGOS: .........${i}.. $${totalPagos} ${CRLF}"$)
|
||||||
|
|
||||||
If Not(Subs.revisaEfectivoBorrado) Then ' Si es corte Z entonces no ponemos el Total sin propinas.
|
If Not(Subs.revisaEfectivoBorrado) Or 1 = 1 Then ' Si es corte Z entonces no ponemos el Total sin propinas.
|
||||||
'TOTAL SIN PROPINAS
|
'TOTAL SIN PROPINAS
|
||||||
If imprimirAqui Then Printer1.WriteString(CRLF)
|
If imprimirAqui Then Printer1.WriteString(CRLF)
|
||||||
If imprimirAqui Then Printer1.WriteString(Printer1.BOLD)
|
If imprimirAqui Then Printer1.WriteString(Printer1.BOLD)
|
||||||
@@ -3291,9 +3333,10 @@ Sub JobDone(Job As HttpJob)
|
|||||||
' End If
|
' End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If reqManager.reqsList.Size = 0 Then
|
If reqManager.reqsList.Size = 0 Then ' Si ya se completo el envio, etonces borramos el efectivo!
|
||||||
ProgressDialogHide
|
ProgressDialogHide
|
||||||
p_transparenteResumen.Visible = False
|
p_transparenteResumen.Visible = False
|
||||||
|
Log("Llamamos BorrarEfectivo")
|
||||||
borrarEfectivo
|
borrarEfectivo
|
||||||
llenaHistorial
|
llenaHistorial
|
||||||
Log(">>>>> ENVIO TERMINADO")
|
Log(">>>>> ENVIO TERMINADO")
|
||||||
@@ -3306,6 +3349,7 @@ End Sub
|
|||||||
Sub borrarEfectivo
|
Sub borrarEfectivo
|
||||||
Log("Borramos el efectivo")
|
Log("Borramos el efectivo")
|
||||||
Starter.skmt.ExecNonQuery($"delete from PEDIDO where PE_TIPO = 'EFECTIVO'"$)
|
Starter.skmt.ExecNonQuery($"delete from PEDIDO where PE_TIPO = 'EFECTIVO'"$)
|
||||||
|
' Starter.skmt.ExecNonQuery($"delete from PEDIDO where PE_PROID = 'DESC01'"$)
|
||||||
Starter.skmt.ExecNonQuery($"delete from PEDIDO_TICKET where PT_PAGO = 'EFECTIVO'"$)
|
Starter.skmt.ExecNonQuery($"delete from PEDIDO_TICKET where PT_PAGO = 'EFECTIVO'"$)
|
||||||
Starter.skmt.ExecNonQuery($"delete from PEDIDO_TICKET where PT_PAGO2 = 'Efectivo'"$)
|
Starter.skmt.ExecNonQuery($"delete from PEDIDO_TICKET where PT_PAGO2 = 'Efectivo'"$)
|
||||||
Starter.skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?", Array As Object ("EFECTIVO BORRADO"))
|
Starter.skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?", Array As Object ("EFECTIVO BORRADO"))
|
||||||
@@ -4360,7 +4404,7 @@ Private Sub b_resumen_Click
|
|||||||
clv_resumenDia.Clear
|
clv_resumenDia.Clear
|
||||||
Private o As ResultSet = Starter.skmt.ExecQuery($"select *, ifnull(PT_PROPINA, 0) as PT_PROPINA, ifnull(PT_PAGO_PROPINA, "") as PT_PAGO_PROPINA, ifnull(PT_FACTURAR, 'false') as PT_FACTURAR, ifnull(PT_PAGO2, 'PENDIENTE') as PT_PAGO2 from PEDIDO_TICKET where PT_PAGO <> 'MULTI-TICKET' and PT_PAGO <> 'VENTA' order by PT_FECHA"$)
|
Private o As ResultSet = Starter.skmt.ExecQuery($"select *, ifnull(PT_PROPINA, 0) as PT_PROPINA, ifnull(PT_PAGO_PROPINA, "") as PT_PAGO_PROPINA, ifnull(PT_FACTURAR, 'false') as PT_FACTURAR, ifnull(PT_PAGO2, 'PENDIENTE') as PT_PAGO2 from PEDIDO_TICKET where PT_PAGO <> 'MULTI-TICKET' and PT_PAGO <> 'VENTA' order by PT_FECHA"$)
|
||||||
Do While o.NextRow
|
Do While o.NextRow
|
||||||
Log($"xx - |${o.GetString("PT_PAGO")}|"$)
|
' Log($"xx - |${o.GetString("PT_PAGO")}|"$)
|
||||||
Private Pnl As B4XView = xui.CreatePanel("")
|
Private Pnl As B4XView = xui.CreatePanel("")
|
||||||
Pnl.SetLayoutAnimated(0, 0, 0, clv_resumenDia.AsView.Width, 52dip)
|
Pnl.SetLayoutAnimated(0, 0, 0, clv_resumenDia.AsView.Width, 52dip)
|
||||||
clv_resumenDia.Add(Pnl, 1)
|
clv_resumenDia.Add(Pnl, 1)
|
||||||
@@ -4393,7 +4437,7 @@ Private Sub b_resumen_Click
|
|||||||
n = n + 1
|
n = n + 1
|
||||||
Loop
|
Loop
|
||||||
Private propAmex = "0", propMifel = "0", propMifelDebito = "0", propEfectivo = "0" As String
|
Private propAmex = "0", propMifel = "0", propMifelDebito = "0", propEfectivo = "0" As String
|
||||||
Private rt As ResultSet = Starter.skmt.ExecQuery($"Select sum(pt_monto) as ptMonto, sum(pt_propina) as ptPropina, * from pedido_ticket where pt_pago <> 'VENTA' and PT_PAGO <> 'MULTI-TICKET' group by pt_pago2"$)
|
Private rt As ResultSet = Starter.skmt.ExecQuery($"Select sum(pt_monto) as ptMonto, sum(pt_propina) as ptPropina, * from pedido_ticket where pt_pago <> 'VENTA' and PT_PAGO <> 'MULTI-TICKET' group by pt_pago2"$) ' and (CASE WHEN PT_PAGO = 'EFECTIVO' and PT_ALMACEN = 'MULTI-TICKET' THEN false ELSE true END) - El "case" es para que en el efectivo NO cuente los tickets multi-tickets, porque esos son "Consumo de alimentos".
|
||||||
Private rtpa As ResultSet = Starter.skmt.ExecQuery($"Select ifnull(sum(pt_propina),0) as ptPropina, * from pedido_ticket where pt_pago_propina = 'Amex' group by pt_pago_propina"$)
|
Private rtpa As ResultSet = Starter.skmt.ExecQuery($"Select ifnull(sum(pt_propina),0) as ptPropina, * from pedido_ticket where pt_pago_propina = 'Amex' group by pt_pago_propina"$)
|
||||||
Do While rtpa.NextRow
|
Do While rtpa.NextRow
|
||||||
propAmex = rtpa.GetString("ptPropina")
|
propAmex = rtpa.GetString("ptPropina")
|
||||||
|
|||||||
Reference in New Issue
Block a user