mirror of
https://github.com/KeymonSoft/Lanterna_H.git
synced 2026-04-17 21:06:16 +00:00
- Se modificó el resumen de grupos para que se agrupe por una columna nueva (CAT_GP_TIPO2) a peticion de Mario
This commit is contained in:
@@ -1955,7 +1955,7 @@ Sub b_imp2_Click
|
||||
Private c As Cursor = Starter.skmt.ExecQuery($"select M_ESTATUS from CAT_MESAS where M_ESTATUS = 'ABIERTA'"$)
|
||||
' Log(c.RowCount)
|
||||
' If c.RowCount = 0 Then 'Si no hay mesas abiertas entonces ...
|
||||
Private c As Cursor = Starter.skmt.ExecQuery("select distinct CAT_GP_CLASIF, PE_PRONOMBRE, sum(pe_cant) as cuantos, sum(pe_costo_tot) as monto from pedido join CAT_GUNAPROD on cat_gp_id = PE_PROID where PE_TIPO <> 'VENTA' group by PE_PRONOMBRE order by CAT_GP_CLASIF, PE_PRONOMBRE") 'Este query quita los "Consumo de alimentos", que son los tickets que se generan con el multi-ticket, porque en CAT_GUNAPROD no existe el ID CDA01.
|
||||
Private c As Cursor = Starter.skmt.ExecQuery("select distinct CAT_GP_TIPO2, CAT_GP_CLASIF, PE_PRONOMBRE, sum(pe_cant) as cuantos, sum(pe_costo_tot) as monto from pedido join CAT_GUNAPROD on cat_gp_id = PE_PROID where PE_TIPO <> 'VENTA' group by CAT_GP_TIPO2, PE_PRONOMBRE order by CAT_GP_TIPO2, PE_PRONOMBRE") 'Este query quita los "Consumo de alimentos", que son los tickets que se generan con el multi-ticket, porque en CAT_GUNAPROD no existe el ID CDA01.
|
||||
' Log(c.RowCount)
|
||||
If c.RowCount > 0 Then
|
||||
c.Position = 0
|
||||
@@ -1969,8 +1969,8 @@ Sub b_imp2_Click
|
||||
Printer1.WriteString(Printer1.NOBOLD)
|
||||
For i = 0 To c.RowCount - 1
|
||||
c.Position = i
|
||||
' Log($"${catAnt} - ${c.GetString("CAT_GP_CLASIF")}"$)
|
||||
If catAnt <> c.GetString("CAT_GP_CLASIF") Then
|
||||
' Log($"${catAnt} - ${c.GetString("CAT_GP_TIPO2")}"$)
|
||||
If catAnt <> c.GetString("CAT_GP_TIPO2") Then
|
||||
' Private tm As Cursor = Starter.skmt.ExecQuery($"select sum(PT_MONTO) as totalMesa from PEDIDO_TICKET where PT_MESA = '${c.GetString("PE_MESA")}' and PT_PAGO <> 'MULTI-TICKET'"$)
|
||||
' tm.Position = 0
|
||||
If catAnt <> "" Then
|
||||
@@ -1982,10 +1982,10 @@ Sub b_imp2_Click
|
||||
End If
|
||||
' Log($">>>>>>> CAT TOTAL ${catAnt}: ${catTotal}"$ )
|
||||
End If
|
||||
cs.Color(Colors.red).Append($"++ ${c.GetString("CAT_GP_CLASIF")} ++${CRLF}"$).pop
|
||||
Log($"++ ${c.GetString("CAT_GP_CLASIF")} ++${CRLF}"$)
|
||||
cs.Color(Colors.red).Append($"++ ${c.GetString("CAT_GP_TIPO2")} ++${CRLF}"$).pop
|
||||
Log($"++ ${c.GetString("CAT_GP_TIPO2")} ++${CRLF}"$)
|
||||
Printer1.WriteString(Printer1.BOLD)
|
||||
If imprimirAqui Then Printer1.WriteString($"++ ${c.GetString("CAT_GP_CLASIF")} ++${CRLF}"$)
|
||||
If imprimirAqui Then Printer1.WriteString($"++ ${c.GetString("CAT_GP_TIPO2")} ++${CRLF}"$)
|
||||
Printer1.WriteString(Printer1.NOBOLD)
|
||||
Private tipoAnt As String = ""
|
||||
catTotal = 0
|
||||
@@ -2007,23 +2007,23 @@ Sub b_imp2_Click
|
||||
' If imprimirAqui Then Printer1.WriteString($"${elNombre}${Subs.alineaDerecha(c.GetString("cuantos"), (31 - elNombre.Length), ".")} ${CRLF}"$)
|
||||
If imprimirAqui Then Printer1.WriteString($"${elNombre}${primerEspacio}${c.GetString("cuantos")}..${monto} ${CRLF}"$)
|
||||
catTotal = catTotal + c.GetString("cuantos")
|
||||
' Log($">>>> ${catAnt} - ${c.GetString("CAT_GP_CLASIF")}"$)
|
||||
' Log($">>>> ${catAnt} - ${c.GetString("CAT_GP_TIPO2")}"$)
|
||||
If i = c.RowCount - 1 Then
|
||||
Log($"Total ${c.GetString("CAT_GP_CLASIF")}: ${catTotal}${CRLF}"$)
|
||||
cs.Color(Colors.Green).Append($"Total ${c.GetString("CAT_GP_CLASIF")}: ${catTotal}${CRLF}"$).pop
|
||||
Log($"Total ${c.GetString("CAT_GP_TIPO2")}: ${catTotal}${CRLF}"$)
|
||||
cs.Color(Colors.Green).Append($"Total ${c.GetString("CAT_GP_TIPO2")}: ${catTotal}${CRLF}"$).pop
|
||||
If imprimirAqui Then
|
||||
Printer1.WriteString(Printer1.BOLD)
|
||||
Printer1.WriteString($"Total ${c.GetString("CAT_GP_CLASIF")}: ${catTotal}${CRLF}"$)
|
||||
Printer1.WriteString($"Total ${c.GetString("CAT_GP_TIPO2")}: ${catTotal}${CRLF}"$)
|
||||
Printer1.WriteString(Printer1.NOBOLD)
|
||||
End If
|
||||
End If
|
||||
Private tipoAnt As String = ""
|
||||
catAnt = c.GetString("CAT_GP_CLASIF")
|
||||
catAnt = c.GetString("CAT_GP_TIPO2")
|
||||
' Log(i)
|
||||
Next
|
||||
If imprimirAqui Then Printer1.WriteString(CRLF)
|
||||
|
||||
' l_resumen.Text = cs
|
||||
' l_resumen.Text = cs
|
||||
l_resumen.Height = su.MeasureMultilineTextHeight(l_resumen, l_resumen.Text)
|
||||
sv_resumen.Panel.Height = l_resumen.Height
|
||||
End If
|
||||
@@ -2031,7 +2031,7 @@ Sub b_imp2_Click
|
||||
'RESUMEN
|
||||
LogColor("sleeping ....", Colors.Magenta)
|
||||
If imprimirAqui Then Sleep(4000)
|
||||
Private rsm As Cursor = Starter.skmt.ExecQuery($"select distinct CAT_GP_CLASIF, sum(pe_cant) as cuantos, sum(pe_costo_tot) as monto from pedido join CAT_GUNAPROD on cat_gp_id = PE_PROID group by CAT_GP_CLASIF order by CAT_GP_CLASIF"$) 'Este query quita los "Consumo de alimentos", que son los tickets que se generan con el multi-ticket, porque en CAT_GUNAPROD no existe el ID CDA01.
|
||||
Private rsm As Cursor = Starter.skmt.ExecQuery($"select distinct CAT_GP_TIPO2, sum(pe_cant) as cuantos, sum(pe_costo_tot) as monto from pedido join CAT_GUNAPROD on cat_gp_id = PE_PROID group by CAT_GP_TIPO2 order by CAT_GP_TIPO2"$) 'Este query quita los "Consumo de alimentos", que son los tickets que se generan con el multi-ticket, porque en CAT_GUNAPROD no existe el ID CDA01.
|
||||
' Log(rsm.RowCount)
|
||||
If rsm.RowCount > 0 Then
|
||||
Printer1.WriteString(Printer1.BOLD)
|
||||
@@ -2041,7 +2041,7 @@ Sub b_imp2_Click
|
||||
Printer1.WriteString(Printer1.NOBOLD)
|
||||
For i = 0 To rsm.RowCount - 1
|
||||
rsm.Position = i
|
||||
Private laCat As String = rsm.GetString("CAT_GP_CLASIF")
|
||||
Private laCat As String = rsm.GetString("CAT_GP_TIPO2")
|
||||
If laCat.Length > 20 Then laCat = laCat.SubString2(0, 20)
|
||||
' Log($"${rsm.Position} - ${laCat.Length} - ${laCat}"$)
|
||||
Private monto As String = NumberFormat2(rsm.GetString("monto"), 1, 0, 0, True)
|
||||
|
||||
Reference in New Issue
Block a user