mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-17 18:26:11 +00:00
- Se comentaron logs inecesarios
This commit is contained in:
@@ -515,7 +515,7 @@ Sub B4XPage_Appear
|
||||
' LogColor($"${c.GetString("CAT_CL_LAT")}, ${c.GetString("CAT_CL_LONG")}"$, Colors.red)
|
||||
If logger Then Log($"Lat: ${LATITUD}, Lon: ${LONGITUD}"$)
|
||||
NOMBRE = c.GetString("CAT_CL_NOMBRE")
|
||||
Log($"TOTAL DE LA VENTA: ${kh.traeTotalCliente}"$)
|
||||
' Log($"TOTAL DE LA VENTA: ${kh.traeTotalCliente}"$)
|
||||
If kh.traeTotalCliente < 0.01 And kh.traeTotalClienteDOE < 0.01 Then
|
||||
If Not(clienteId.StartsWith("N")) And la_cuenta.Text <> "0" Then b_noVenta.Visible = True 'Ni cliente nuevo, ni abordo.
|
||||
Else
|
||||
@@ -773,7 +773,7 @@ Sub GPS_LocationChanged (Location1 As Location)
|
||||
Else
|
||||
l_ubicacion2.TextColor = Colors.Black
|
||||
dentroDeGeocerca = True
|
||||
Log("dentro de geocerca")
|
||||
' Log("dentro de geocerca")
|
||||
End If
|
||||
|
||||
'''' GEO CERCA
|
||||
@@ -931,7 +931,7 @@ Sub Guardar_Click
|
||||
' B4XPages.ShowPageAndRemovePreviousPages("Principal")
|
||||
Guardar.SendToBack
|
||||
b_inicioFinVenta.Text = "TERMINAR VENTA"
|
||||
Log("RESPLDO")
|
||||
' Log("RESPALDO")
|
||||
kh.RD_respaldoBatch
|
||||
If la_cuenta.Text <> "0" Then 'Si es ABORDO, no mostramos el boton b_inicioFinVenta y regresamos a Principal.
|
||||
b_inicioFinVenta.Visible = True
|
||||
@@ -4091,13 +4091,13 @@ Private Sub b_inicioFinVenta_Click
|
||||
If Starter.enVenta Then
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), usuario, Id_Almacen, ruta_tienda, "Termina Venta", la_cuenta.text, "", Subs.fechanormal(DateTime.Now), Starter.lat_gps, Starter.lon_gps, precision, motivoNoVenta, "")
|
||||
Starter.enVenta = False
|
||||
LogColor(">>>>>> EN VENTA: " & Starter.enVenta, Colors.red)
|
||||
' LogColor(">>>>>> EN VENTA: " & Starter.enVenta, Colors.red)
|
||||
Subs.iniciaActividad("principal")
|
||||
B4XPages.ShowPageAndRemovePreviousPages("Principal")
|
||||
Else
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now),usuario, Id_Almacen, ruta_tienda, "Inicia Venta", la_cuenta.text, Subs.fechanormal(DateTime.Now), "", Starter.lat_gps, Starter.lon_gps, precision, motivoNoVenta, "")
|
||||
Starter.enVenta = True
|
||||
LogColor(">>>>>> EN VENTA: " & Starter.enVenta, Colors.red)
|
||||
' LogColor(">>>>>> EN VENTA: " & Starter.enVenta, Colors.red)
|
||||
End If
|
||||
b_inicioFinVenta.Visible = False
|
||||
End Sub
|
||||
|
||||
@@ -85,7 +85,7 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
' Next
|
||||
' End If
|
||||
list_prodsPedido.Initialize
|
||||
Log("list_prodsPedido.Initialize")
|
||||
' Log("list_prodsPedido.Initialize")
|
||||
If Existe <> 0 Then
|
||||
c = Starter.skmt.ExecQuery("select pc_noart, pc_monto from pedido_cliente where pc_cliente in (Select CUENTA from cuentaa)")
|
||||
C.Position = 0
|
||||
@@ -145,7 +145,7 @@ Sub B4XPage_Appear
|
||||
End If
|
||||
c=Starter.skmt.ExecQuery("select count(*) as CUANTOS from kmt_info where (impresion = 1 or cat_cl_codigo in (select ci_cuenta from cliente_impreso)) and CAT_CL_CODIGO in (Select CUENTA from cuentaa)")
|
||||
c.Position = 0
|
||||
If logger Then Log($"Impreso: ${c.GetString("CUANTOS")}"$)
|
||||
' If logger Then Log($"Impreso: ${c.GetString("CUANTOS")}"$)
|
||||
If c.GetString("CUANTOS") > 0 Then
|
||||
borra.Visible = False
|
||||
Else
|
||||
@@ -485,7 +485,7 @@ Private Sub clv_pedidos_ItemLongClick (position As Int, Value As Object)
|
||||
c = Starter.skmt.ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, count(*) as CUANTOS FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")
|
||||
c.Position = 0
|
||||
If c.GetString("CUANTOS") > 0 Then
|
||||
Log($"============== TOTAL = ${c.GetString("TOTAL_CLIE")}"$)
|
||||
' Log($"============== TOTAL = ${c.GetString("TOTAL_CLIE")}"$)
|
||||
If c.GetString("TOTAL_CLIE") < 1 Then
|
||||
Starter.skmt.ExecNonQuery("delete from pedido where PE_PRONOMBRE like 'CAMBIO%' and PE_CLIENTE In (select cuenta from cuentaa)"$)
|
||||
End If
|
||||
|
||||
@@ -391,9 +391,7 @@ Sub B4XPage_Appear
|
||||
' If Not(File.Exists(File.DirInternal,"FOTO4.jpg")) Then Log("Falta foto4")
|
||||
Cedis_Check = 0
|
||||
End If
|
||||
|
||||
Log(">>>> CHECKLIST: |" & Cedis_Check & "|")
|
||||
|
||||
' Log(">>>> CHECKLIST: |" & Cedis_Check & "|")
|
||||
Btn_CheckList.Visible = False
|
||||
If Cedis_Check = 0 Then ' And l_ruta.Text <> 0
|
||||
If l_ruta.Text <> 0 Then Btn_CheckList.Visible = True
|
||||
|
||||
@@ -606,15 +606,15 @@ Sub b_prodMas_Click
|
||||
Private inv As Int = clv_prods_ll.GetValue(index).As(Map).Get("almacen")
|
||||
' Log(tmpMap)
|
||||
If buttonTag = "vendido" Then
|
||||
Log("VENDIDO")
|
||||
Log($"${(laCant.Text + 1 <= inv)} And ${(Subs.totalPedido - precio > 1)}"$)
|
||||
' Log("VENDIDO")
|
||||
' Log($"${(laCant.Text + 1 <= inv)} And ${(Subs.totalPedido - precio > 1)}"$)
|
||||
If inv > 0 And (laCant.Text + 1 <= existencias) And (Subs.totalPedido - precio > 1) Then
|
||||
Log(clv_prods_ll.GetValue(index).As(Map))
|
||||
' Log(clv_prods_ll.GetValue(index).As(Map))
|
||||
clv_prods_ll.GetValue(index).As(Map).Put("almacen", (inv - 1))
|
||||
inv = inv - 1
|
||||
' laCant.Text = $"$1.0{laCant.Text+1}"$
|
||||
laCant.Text = NumberFormat2((laCant.Text + 1), 1, 0, 0, False)
|
||||
Log(clv_prods_ll.GetValue(index).As(Map))
|
||||
' Log(clv_prods_ll.GetValue(index).As(Map))
|
||||
End If
|
||||
else If laCant.Text + 1 <= inv And lfila.Text = "PRODUCTOS" Then
|
||||
' LogColor(inv, Colors.blue)
|
||||
@@ -749,12 +749,12 @@ Sub cuentaProds
|
||||
If lfila.Text = "RMI" Then l_mDisponible.Visible = True Else l_mDisponible.Visible = False
|
||||
l_mDisponible.Text = $"Disponible: $${Subs.totalPedido}"$
|
||||
|
||||
Log(clienteId)
|
||||
' Log(clienteId)
|
||||
If clienteId = "0" Then
|
||||
LogColor($" DispoAbordoWeb: ${kh.traeLimiteAbordoWeb}${CRLF}
|
||||
Limite X Inventario: ${kh.traeLimiteAbordoXInventario}${CRLF}
|
||||
Venta: ${kh.traeVenta}${CRLF}
|
||||
Venta Abordo: ${kh.traeVentaAbordo} "$, Colors.red)
|
||||
' LogColor($" DispoAbordoWeb: ${kh.traeLimiteAbordoWeb}${CRLF}
|
||||
' Limite X Inventario: ${kh.traeLimiteAbordoXInventario}${CRLF}
|
||||
' Venta: ${kh.traeVenta}${CRLF}
|
||||
' Venta Abordo: ${kh.traeVentaAbordo} "$, Colors.red)
|
||||
l_infoPedido.Text = $"LimiteAbordo: ${NumberFormat2(kh.traeLimiteAbordoWeb,1,2,1,True)} TotalInv: ${NumberFormat2(kh.traeLimiteAbordoXInventario,1,2,1,True)}
|
||||
Venta: ${NumberFormat2(kh.traeVenta,1,2,1,True)} VentaAbordo: ${NumberFormat2(kh.traeVentaAbordo,1,2,1,True)} "$
|
||||
' Log($"${kh.traeLimiteAbordoXInventario} - ${kh.traeVenta} - ${kh.traeLimiteAbordoWeb}"$)
|
||||
@@ -772,7 +772,6 @@ Sub cuentaProds
|
||||
b_terminar1.Visible = True
|
||||
End If
|
||||
Else
|
||||
Log("No ABORDO")
|
||||
l_infoPedido.Text = $"Total pedido: $${kh.traeTotalCliente}"$
|
||||
End If
|
||||
|
||||
|
||||
@@ -395,7 +395,7 @@ End Sub
|
||||
|
||||
Private Sub b_continuar_Click
|
||||
cuentaProds
|
||||
Log("====================================================================")
|
||||
' Log("====================================================================")
|
||||
' Log($"${prodsIds}${CRLF}${prodsCants}${CRLF}${prodsPrecios}"$)
|
||||
For t = 0 To prodsIds.Size - 1 'Guardamos los productos fijos de la promocion en pedido.
|
||||
Private pn As String = Subs.traeProdNombre(prodsIds.Get(t))
|
||||
|
||||
@@ -61,7 +61,7 @@ ModuleBreakpoints7=
|
||||
ModuleBreakpoints8=
|
||||
ModuleBreakpoints9=
|
||||
ModuleClosedNodes0=
|
||||
ModuleClosedNodes1=35
|
||||
ModuleClosedNodes1=2,35
|
||||
ModuleClosedNodes10=
|
||||
ModuleClosedNodes11=50,51,52
|
||||
ModuleClosedNodes12=
|
||||
@@ -88,9 +88,9 @@ ModuleClosedNodes30=
|
||||
ModuleClosedNodes4=
|
||||
ModuleClosedNodes5=
|
||||
ModuleClosedNodes6=
|
||||
ModuleClosedNodes7=3,11,12
|
||||
ModuleClosedNodes7=11,12
|
||||
ModuleClosedNodes8=
|
||||
ModuleClosedNodes9=
|
||||
NavigationStack=kms_helperSubs,traeCliente,613,0,kms_helperSubs,traeRuta,611,0,C_Productos,et_pCant_TextChanged,704,0,C_Productos,B4XPage_Created,143,0,kms_helperSubs,traeVentaAbordo,757,0,Visual Designer,checks.bal,-100,1,C_Productos,Class_Globals,95,0,Visual Designer,productos.bal,-100,6,C_Productos,cuentaProds,766,6,C_Productos,B4XPage_Appear,172,6
|
||||
NavigationStack=C_Nota,clv_pedidos_ItemLongClick,481,0,C_Nota,B4XPage_Created,81,0,kms_helperSubs,traeDisponibleAbordo,761,0,C_Productos,b_prodMas_Click,602,0,C_Productos,cuentaProds,747,6,C_Promos,b_continuar_Click,391,0,Subs,revisaMaxPromosProdsFijosPorInventario,1264,0,Subs,procesaPromocion,1152,1,Subs,traeMaxPromos,1130,1,Subs,restaFijosPromo,1048,1
|
||||
SelectedBuild=0
|
||||
VisibleModules=1,28,11,24,3,12,7,4,29,2
|
||||
VisibleModules=1,28,11,24,3,12,7,4,29,2,13
|
||||
|
||||
13
B4A/Subs.bas
13
B4A/Subs.bas
@@ -1053,7 +1053,7 @@ End Sub
|
||||
'Hay que darle como parametro un mapa (traePromo(promo)) con toda la informacion de la promocion.
|
||||
'Regresa en el mapa la llave "resultado" que nos da "ok" o "No hay suficiente producto para la promocion".
|
||||
Sub restaFijosPromo(promoMap As Map) As Map 'ignore
|
||||
Private thisLog As Boolean = True 'Si es verdadero, muestra los logs de este sub.
|
||||
Private thisLog As Boolean = False 'Si es verdadero, muestra los logs de este sub.
|
||||
Private inventariosDisponiblesParaEstaPromo As Map = traemosInventarioDisponibleParaPromo(promoMap.Get("id")) 'Obtenemos un mapa con el inventario disponible para cada producto de la promocion desde la base de datos.
|
||||
If thisLog Then LogColor(inventariosDisponiblesParaEstaPromo, Colors.red)
|
||||
If thisLog Then LogColor("Inventario inicial antes de FIJOS: "&inventariosDisponiblesParaEstaPromo, Colors.Gray) 'Inventario inicial.
|
||||
@@ -1111,7 +1111,7 @@ End Sub
|
||||
|
||||
'Regresa el numero máximo de promociones permitidas, tomando en cuenta recurrentes, clientes y maxPromos.
|
||||
Sub traeMaxPromos(pm As Map) As Int
|
||||
Private thisLog As Boolean = True 'Si es verdadero, muestra los logs de este sub.
|
||||
Private thisLog As Boolean = False 'Si es verdadero, muestra los logs de este sub.
|
||||
Private maxPromos As List
|
||||
Private mp0, mp As String = "0"
|
||||
maxPromos.Initialize
|
||||
@@ -1133,12 +1133,11 @@ Sub traeMaxPromos(pm As Map) As Int
|
||||
maxPromos.Add(hccp.GetInt("HCCP_CANT"))
|
||||
End If
|
||||
maxPromos.Sort(True)
|
||||
Log($">>>>> max promos : ${maxPromos}"$)
|
||||
If thisLog Then Log(maxPromos)
|
||||
If thisLog Then Log($">>>>> Max promos : ${maxPromos}"$)
|
||||
mp = 0
|
||||
If maxPromos.Size > 0 Then
|
||||
mp0 = maxPromos.Get(0)
|
||||
Log(mp0)
|
||||
' Log(mp0)
|
||||
mp = mp0 - traePromosVendidas(pm.Get("id"), traeCliente)
|
||||
If thisLog Then Log($"Max Promos (${mp0}) - promos vendidas (${(traePromosVendidas(pm.Get("id"), traeCliente)).As(Int)}) = ${mp}"$)
|
||||
End If
|
||||
@@ -1158,7 +1157,7 @@ Sub traePromosVendidas(promo As String, cliente As String) As Int
|
||||
End Sub
|
||||
|
||||
Sub procesaPromocion(idPromo As String, cliente As String) As Map 'ignore
|
||||
Private thisLog As Boolean = True 'Si es verdadero, muestra los logs de este sub.
|
||||
Private thisLog As Boolean = False 'Si es verdadero, muestra los logs de este sub.
|
||||
Private inicioContador As String = DateTime.Now
|
||||
Private mp = 0
|
||||
If thisLog Then LogColor($"********* Iniciamos revision de Promo ${idPromo} *********"$, Colors.red)
|
||||
@@ -1269,7 +1268,7 @@ Sub revisaMaxPromosProdsFijosPorInventario(pm As Map) As Int
|
||||
If thisLog Then LogColor($"prodsFijosPiezasReq=${prodsFijosPiezas}"$, Colors.Blue)
|
||||
If thisLog Then LogColor($"invFijoXpromo=${invFijoXpromo}"$, Colors.Blue)
|
||||
If thisLog Then LogColor("Max promos de prodsFijos POR inventario = " & t.Get(0), Colors.red)
|
||||
LogColor(">>>>>> " & t.Get(0), Colors.red)
|
||||
' LogColor(">>>>>> " & t.Get(0), Colors.red)
|
||||
Return t.Get(0) 'Regresamos el resultado mas pequeño.
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -428,11 +428,11 @@ Sub RD_copiaRespaldoDiario 'ignore
|
||||
Catch
|
||||
Log(LastException)
|
||||
End Try
|
||||
Private extDir = ""
|
||||
Private extDir as string = ""
|
||||
If File.IsDirectory(File.DirRootExternal, "kmts") Then extDir = "/kmts"
|
||||
Try
|
||||
Private name() As String = Regex.split(" ", Application.LabelName) 'Obtenemos el nombre de la app para ponerselo a la BD.
|
||||
Log($"------ COPIAMOS A SDCARD - ${name(0)}.rkmt.km"$)
|
||||
' Log($"------ COPIAMOS A SDCARD - ${name(0)}.rkmt.km"$)
|
||||
File.Copy(File.DirInternal&"/kmts", $"${name(0)}.rkmt.km"$, File.DirRootExternal & extDir, $"${name(0)}.rkmt.km"$)
|
||||
Catch
|
||||
Log(LastException)
|
||||
@@ -765,7 +765,7 @@ End Sub
|
||||
Sub traeDisponibleAbordo As Double
|
||||
' Log("Venta abordo")
|
||||
Private disp As Double = 0
|
||||
Log($"${traeLimiteAbordoWeb} - ${traeLimiteAbordoXInventario} - ${traeVentaAbordo}"$)
|
||||
' Log($"${traeLimiteAbordoWeb} - ${traeLimiteAbordoXInventario} - ${traeVentaAbordo}"$)
|
||||
disp = NumberFormat2((traeLimiteAbordoWeb - (traeLimiteAbordoXInventario) - traeVentaAbordo), 0, 2, 2, False)
|
||||
Return disp
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user