mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-21 20:09:13 +00:00
- VERSION 4.08.14
- Se corrigio que la categorias en "Resumen Dia" no reflejaban los RMI's - Se agregó que si un pedido no esta impreso y se reinicia la aplicacion, al entrar a la pantalla principal se borre el pedido, y le avise al vendedor que se va a borrar!!
This commit is contained in:
@@ -466,6 +466,18 @@ Sub B4XPage_Appear
|
|||||||
Subs.actualizaProducto(ALMACEN, 0, 0, ab.GetString("PE_PRONOMBRE"), ab.GetString("PE_PROID"), ab.GetString("PE_CLIENTE"), Subs.traeFecha, Subs.traeUsuarioDeBD, ab.GetString("PE_RUTA"), 0, ab.GetString("PE_TIPO"))
|
Subs.actualizaProducto(ALMACEN, 0, 0, ab.GetString("PE_PRONOMBRE"), ab.GetString("PE_PROID"), ab.GetString("PE_CLIENTE"), Subs.traeFecha, Subs.traeUsuarioDeBD, ab.GetString("PE_RUTA"), 0, ab.GetString("PE_TIPO"))
|
||||||
End If
|
End If
|
||||||
Loop
|
Loop
|
||||||
|
|
||||||
|
' Buscamos los clientes que tienen pedido y NO estan impresos.
|
||||||
|
Private t As Cursor = Starter.skmt.ExecQuery("Select cat_cl_codigo from kmt_info where impresion = 0 and cat_cl_codigo not in (select ci_cuenta from cliente_impreso) and cat_cl_codigo in (select distinct pe_cliente from pedido)")
|
||||||
|
If t.RowCount > 0 Then
|
||||||
|
For i = 0 To t.RowCount - 1
|
||||||
|
t.Position = i ' Y los BORRAMOS.
|
||||||
|
Log(t.GetString("CAT_CL_CODIGO"))
|
||||||
|
Starter.skmt.ExecNonQuery($"update CUENTAA set CUENTA = '${t.GetString("CAT_CL_CODIGO")}'"$)
|
||||||
|
Subs.borraPedidoClienteActual
|
||||||
|
Msgbox2Async($"El pedido del cliente ${t.GetString("CAT_CL_CODIGO")} no está impreso, se va a borrar"$, "PEDIDO NO IMPRESO", "Aceptar", "", "", Null, True)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
' Log("Check phone state: " & rp.Check(rp.PERMISSION_READ_PHONE_STATE))
|
' Log("Check phone state: " & rp.Check(rp.PERMISSION_READ_PHONE_STATE))
|
||||||
' Log("Pedimos permisos de estado del cel")
|
' Log("Pedimos permisos de estado del cel")
|
||||||
@@ -2514,21 +2526,21 @@ Sub Resumen_Click
|
|||||||
c.Position = 0
|
c.Position = 0
|
||||||
l_cambios.Text = c.GetString("CAMBIOS")
|
l_cambios.Text = c.GetString("CAMBIOS")
|
||||||
c.Close
|
c.Close
|
||||||
c=Starter.skmt.ExecQuery2("Select sum(PE_COSTO_TOT) As MONTO_DIA from pedido where PE_CLIENTE <> 0 and pe_proid in (Select CAT_GP_ID from cat_gunaprod2 where CAT_GP_TIPO = ? )", Array As String("RTEC"))
|
c=Starter.skmt.ExecQuery2("Select sum(PE_COSTO_TOT) As MONTO_DIA from pedido where PE_CLIENTE <> 0 and (pe_proid in (Select CAT_GP_ID from cat_gunaprod2 where CAT_GP_TIPO = ? ) or pe_proid in (Select CAT_GP_ID from cat_gunaprod where CAT_GP_TIPO = ?))", Array As String("RTEC","RTEC"))
|
||||||
c.Position = 0
|
c.Position = 0
|
||||||
l_monto_k.Text = c.GetString("MONTO_DIA")
|
l_monto_k.Text = c.GetString("MONTO_DIA")
|
||||||
If l_monto_k.Text = "null" Then
|
If l_monto_k.Text = "null" Then
|
||||||
l_monto_k.Text = "0"
|
l_monto_k.Text = "0"
|
||||||
End If
|
End If
|
||||||
c.Close
|
c.Close
|
||||||
c=Starter.skmt.ExecQuery2("Select sum(PE_COSTO_TOT) As MONTO_DIA from pedido where PE_CLIENTE <> 0 and pe_proid in (Select CAT_GP_ID from cat_gunaprod2 where CAT_GP_TIPO = ? )", Array As String("PING"))
|
c=Starter.skmt.ExecQuery2("Select sum(PE_COSTO_TOT) As MONTO_DIA from pedido where PE_CLIENTE <> 0 and (pe_proid in (Select CAT_GP_ID from cat_gunaprod2 where CAT_GP_TIPO = ? ) or pe_proid in (Select CAT_GP_ID from cat_gunaprod where CAT_GP_TIPO = ?))", Array As String("PING","PING"))
|
||||||
c.Position = 0
|
c.Position = 0
|
||||||
l_monto_kp.Text = c.GetString("MONTO_DIA")
|
l_monto_kp.Text = c.GetString("MONTO_DIA")
|
||||||
If l_monto_kp.Text = "null" Then
|
If l_monto_kp.Text = "null" Then
|
||||||
l_monto_kp.Text = "0"
|
l_monto_kp.Text = "0"
|
||||||
End If
|
End If
|
||||||
c.Close
|
c.Close
|
||||||
c=Starter.skmt.ExecQuery2("Select sum(PE_COSTO_TOT) As MONTO_DIA from pedido where PE_CLIENTE <> 0 and pe_proid in (Select CAT_GP_ID from cat_gunaprod2 where CAT_GP_TIPO = ? )", Array As String("SALTY SNACKS"))
|
c=Starter.skmt.ExecQuery2("Select sum(PE_COSTO_TOT) As MONTO_DIA from pedido where PE_CLIENTE <> 0 and (pe_proid in (Select CAT_GP_ID from cat_gunaprod2 where CAT_GP_TIPO = ? ) or pe_proid in (Select CAT_GP_ID from cat_gunaprod where CAT_GP_TIPO = ?))", Array As String("SALTY SNACKS","SALTY SNACKS"))
|
||||||
c.Position = 0
|
c.Position = 0
|
||||||
l_monto_ks.Text = c.GetString("MONTO_DIA")
|
l_monto_ks.Text = c.GetString("MONTO_DIA")
|
||||||
If l_monto_ks.Text = "null" Then
|
If l_monto_ks.Text = "null" Then
|
||||||
@@ -2557,6 +2569,13 @@ Sub Resumen_Click
|
|||||||
b.Position = 0
|
b.Position = 0
|
||||||
' L_MONTOD.Text = c.GetString("MONTO_DIA")
|
' L_MONTOD.Text = c.GetString("MONTO_DIA")
|
||||||
L_MONTOD.Text = Subs.sumaPedido(Subs.traeCliente) 'Trae el monto sin el redondeo que a veces hace el SUM().
|
L_MONTOD.Text = Subs.sumaPedido(Subs.traeCliente) 'Trae el monto sin el redondeo que a veces hace el SUM().
|
||||||
|
|
||||||
|
' Dim x As Cursor = Starter.skmt.ExecQuery($"select PE_COSTO_TOT from pedido where PE_CEDIS <> PE_PROID and PE_CEDIS <> "DOE" and PE_CLIENTE <> 0"$)
|
||||||
|
' If x.RowCount > 0 Then
|
||||||
|
' x.Position = 0
|
||||||
|
' Log($">>>> ${}"$)
|
||||||
|
' End If
|
||||||
|
|
||||||
' Log(Subs.sumaPedido(Subs.traeCliente) & " - " & L_MONTOD.Text)
|
' Log(Subs.sumaPedido(Subs.traeCliente) & " - " & L_MONTOD.Text)
|
||||||
' Subs.sumaPedido(Subs.traeCliente)
|
' Subs.sumaPedido(Subs.traeCliente)
|
||||||
l_cuantosc.Text = c.GetString("CLIENTES_DIA")
|
l_cuantosc.Text = c.GetString("CLIENTES_DIA")
|
||||||
|
|||||||
@@ -938,7 +938,7 @@ Sub b_terminar1_Click
|
|||||||
End If
|
End If
|
||||||
' Log(list_prodsPedido)
|
' Log(list_prodsPedido)
|
||||||
c_prods.Close
|
c_prods.Close
|
||||||
l_total2.Text = $"${numberformat2(kh.traeTotalCliente, 1, 2, 2, True)}"$
|
l_total2.Text = $"${NumberFormat2(kh.traeTotalCliente, 1, 2, 2, True)}"$
|
||||||
l_cant.Text = cantPedido
|
l_cant.Text = cantPedido
|
||||||
If Subs.revisaImpresa Then b_rechazar.Visible = False Else b_rechazar.Visible = True
|
If Subs.revisaImpresa Then b_rechazar.Visible = False Else b_rechazar.Visible = True
|
||||||
p_vistaPrevia.Visible=True
|
p_vistaPrevia.Visible=True
|
||||||
|
|||||||
@@ -887,7 +887,7 @@ Version=12.8
|
|||||||
#Region Project Attributes
|
#Region Project Attributes
|
||||||
#ApplicationLabel: Kelloggs Venta
|
#ApplicationLabel: Kelloggs Venta
|
||||||
#VersionCode: 3000
|
#VersionCode: 3000
|
||||||
#VersionName: 4.08.07
|
#VersionName: 4.08.14
|
||||||
#SupportedOrientations: portrait
|
#SupportedOrientations: portrait
|
||||||
#CanInstallToExternalStorage: False
|
#CanInstallToExternalStorage: False
|
||||||
#BridgeLogger:true
|
#BridgeLogger:true
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ ModuleBreakpoints9=
|
|||||||
ModuleClosedNodes0=
|
ModuleClosedNodes0=
|
||||||
ModuleClosedNodes1=
|
ModuleClosedNodes1=
|
||||||
ModuleClosedNodes10=
|
ModuleClosedNodes10=
|
||||||
ModuleClosedNodes11=
|
ModuleClosedNodes11=1,3
|
||||||
ModuleClosedNodes12=
|
ModuleClosedNodes12=
|
||||||
ModuleClosedNodes13=
|
ModuleClosedNodes13=
|
||||||
ModuleClosedNodes14=
|
ModuleClosedNodes14=
|
||||||
@@ -91,6 +91,6 @@ ModuleClosedNodes6=
|
|||||||
ModuleClosedNodes7=
|
ModuleClosedNodes7=
|
||||||
ModuleClosedNodes8=
|
ModuleClosedNodes8=
|
||||||
ModuleClosedNodes9=
|
ModuleClosedNodes9=
|
||||||
NavigationStack=Visual Designer,principal.bal,-100,3,C_Principal,b_motivoNoVisita_Click,3562,0,C_Principal,b_noVisita_Click,3593,2,C_Clientes,Class_Globals,1,0,C_Clientes,B4XPage_Appear,68,0,Subs,guardaCambiosDeProducto,1606,0,Subs,restaFijosPromo,1120,1,Subs,traeTablaProds,1628,0,Subs,traemosInventarioDisponibleParaPromo,1107,0,C_Productos,Busca_TextChanged,1267,0,C_Productos,clv_prods_ll_VisibleRangeChanged,1261,0
|
NavigationStack=Subs,guardaProductoSin,944,0,Subs,guardaProductoSinGestion,923,0,C_Cliente,B_IMP_Click,1100,0,Visual Designer,pedido.bal,-100,2,Visual Designer,principal.bal,-100,4,C_Principal,Resumen_Click,2534,6,C_Principal,JobDone,971,0,C_Principal,cargar_Click,608,0,C_Principal,B4XPage_Created,218,2,C_Principal,B4XPage_Appear,474,6
|
||||||
SelectedBuild=0
|
SelectedBuild=0
|
||||||
VisibleModules=1,28,11,3,26,23,29,12,4,13
|
VisibleModules=1,28,11,3,26,23,29,12,4,13
|
||||||
|
|||||||
@@ -1492,7 +1492,7 @@ End Sub
|
|||||||
'Borra los registros de la tabla "pedido" y "pedido_cliente"
|
'Borra los registros de la tabla "pedido" y "pedido_cliente"
|
||||||
'Actualiza las tablas "cat_gunaprod" o "cat_gunaprod2" y "kmt_info".
|
'Actualiza las tablas "cat_gunaprod" o "cat_gunaprod2" y "kmt_info".
|
||||||
Sub borraPedidoClienteActual As String
|
Sub borraPedidoClienteActual As String
|
||||||
Log($"Borramos pedido de ${traeCliente}"$)
|
Log($"Borramos pedido del cliente ${traeCliente}"$)
|
||||||
Private thisC As Cursor
|
Private thisC As Cursor
|
||||||
' Private tablaProds As String = "cat_gunaprod2"
|
' Private tablaProds As String = "cat_gunaprod2"
|
||||||
thisC = Starter.skmt.ExecQuery("select PE_PROID, PE_CANT, PE_CEDIS FROM PEDIDO where pe_cliente in (Select CUENTA from cuentaa) and PE_CEDIS <> 'DOE'")
|
thisC = Starter.skmt.ExecQuery("select PE_PROID, PE_CANT, PE_CEDIS FROM PEDIDO where pe_cliente in (Select CUENTA from cuentaa) and PE_CEDIS <> 'DOE'")
|
||||||
@@ -1506,9 +1506,7 @@ Sub borraPedidoClienteActual As String
|
|||||||
' Starter.skmt.ExecNonQuery2("INSERT INTO INVENT_X_ENVIAR (ALMACEN , PROID , CANTIDAD ) VALUES(?,?,?) ", Array As Object (traeAlmacen, thisC.GetString("PE_PROID"),thisC.GetString("PE_CANT")* -1))
|
' Starter.skmt.ExecNonQuery2("INSERT INTO INVENT_X_ENVIAR (ALMACEN , PROID , CANTIDAD ) VALUES(?,?,?) ", Array As Object (traeAlmacen, thisC.GetString("PE_PROID"),thisC.GetString("PE_CANT")* -1))
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Starter.skmt.ExecNonQuery("delete from pedido where pe_cliente in (Select CUENTA from cuentaa) and PE_CEDIS <> 'DOE'")
|
Starter.skmt.ExecNonQuery("delete from pedido where pe_cliente in (Select CUENTA from cuentaa) and PE_CEDIS <> 'DOE'")
|
||||||
|
|
||||||
'la intencion es que al borrar el pedido, y queda doe o normal, no se borre el cliente de pedido_cliente
|
'la intencion es que al borrar el pedido, y queda doe o normal, no se borre el cliente de pedido_cliente
|
||||||
thisC = Starter.skmt.ExecQuery($"select pe_cedis from pedido where pe_cliente in (Select CUENTA from cuentaa)"$)
|
thisC = Starter.skmt.ExecQuery($"select pe_cedis from pedido where pe_cliente in (Select CUENTA from cuentaa)"$)
|
||||||
If thisC.RowCount < 1 Then Starter.skmt.ExecNonQuery("delete from pedido_cliente where pc_cliente in (Select CUENTA from cuentaa)")
|
If thisC.RowCount < 1 Then Starter.skmt.ExecNonQuery("delete from pedido_cliente where pc_cliente in (Select CUENTA from cuentaa)")
|
||||||
|
|||||||
Reference in New Issue
Block a user