mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-21 20:09:13 +00:00
cambio de borrado
This commit is contained in:
@@ -1037,6 +1037,20 @@ Sub b_mapa_Click
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub B_IMP_Click
|
Sub B_IMP_Click
|
||||||
|
' 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
|
||||||
|
|
||||||
|
Sleep(1000)
|
||||||
|
|
||||||
Starter.skmt.Close : Log("Cerramos BD") : Starter.revisaBD
|
Starter.skmt.Close : Log("Cerramos BD") : Starter.revisaBD
|
||||||
Subs.panelAnchoAlto(Panel_INV_A, Root.Width, Root.Height)
|
Subs.panelAnchoAlto(Panel_INV_A, Root.Width, Root.Height)
|
||||||
Panel_INV_A.Visible = True
|
Panel_INV_A.Visible = True
|
||||||
|
|||||||
@@ -471,22 +471,22 @@ Sub B4XPage_Appear
|
|||||||
Do While ab.NextRow
|
Do While ab.NextRow
|
||||||
If Not(abordoImpreso) Then
|
If Not(abordoImpreso) Then
|
||||||
LogColor("BORRAMOS PEDIDO DE ABORDO PORQUE NO ESTA IMPRESO", Colors.red)
|
LogColor("BORRAMOS PEDIDO DE ABORDO PORQUE NO ESTA IMPRESO", Colors.red)
|
||||||
' Starter.skmt.ExecNonQuery("delete from PEDIDO where PE_CLIENTE = '0'") 'Borramos el abordo si no esta impreso.
|
' Starter.skmt.ExecNonQuery("delete from PEDIDO where PE_CLIENTE = '0'") ''Borramos el abordo si no esta impreso.
|
||||||
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.
|
' ' 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)")
|
' 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
|
' If t.RowCount > 0 Then
|
||||||
For i = 0 To t.RowCount - 1
|
' For i = 0 To t.RowCount - 1
|
||||||
t.Position = i ' Y los BORRAMOS.
|
' t.Position = i ' Y los BORRAMOS.
|
||||||
Log(t.GetString("CAT_CL_CODIGO"))
|
' Log(t.GetString("CAT_CL_CODIGO"))
|
||||||
Starter.skmt.ExecNonQuery($"update CUENTAA set CUENTA = '${t.GetString("CAT_CL_CODIGO")}'"$)
|
' Starter.skmt.ExecNonQuery($"update CUENTAA set CUENTA = '${t.GetString("CAT_CL_CODIGO")}'"$)
|
||||||
Subs.borraPedidoClienteActual
|
' 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)
|
' Msgbox2Async($"El pedido del cliente ${t.GetString("CAT_CL_CODIGO")} no está impreso, se va a borrar"$, "PEDIDO NO IMPRESO", "Aceptar", "", "", Null, True)
|
||||||
Next
|
' Next
|
||||||
End If
|
' 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")
|
||||||
@@ -551,6 +551,21 @@ Sub trabajar_Click
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub Subir_Click
|
Sub Subir_Click
|
||||||
|
|
||||||
|
' 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
|
||||||
|
|
||||||
|
Sleep(1000)
|
||||||
|
|
||||||
CARGA = "SUBIR"
|
CARGA = "SUBIR"
|
||||||
' P1.Visible = True
|
' P1.Visible = True
|
||||||
trabajar.Visible = False
|
trabajar.Visible = False
|
||||||
|
|||||||
@@ -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.28
|
#VersionName: 4.09.05
|
||||||
#SupportedOrientations: portrait
|
#SupportedOrientations: portrait
|
||||||
#CanInstallToExternalStorage: False
|
#CanInstallToExternalStorage: False
|
||||||
#BridgeLogger:true
|
#BridgeLogger:true
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ ModuleClosedNodes2=
|
|||||||
ModuleClosedNodes20=
|
ModuleClosedNodes20=
|
||||||
ModuleClosedNodes21=
|
ModuleClosedNodes21=
|
||||||
ModuleClosedNodes22=
|
ModuleClosedNodes22=
|
||||||
ModuleClosedNodes23=70
|
ModuleClosedNodes23=
|
||||||
ModuleClosedNodes24=
|
ModuleClosedNodes24=
|
||||||
ModuleClosedNodes25=
|
ModuleClosedNodes25=
|
||||||
ModuleClosedNodes26=
|
ModuleClosedNodes26=
|
||||||
@@ -91,6 +91,6 @@ ModuleClosedNodes6=
|
|||||||
ModuleClosedNodes7=
|
ModuleClosedNodes7=
|
||||||
ModuleClosedNodes8=
|
ModuleClosedNodes8=
|
||||||
ModuleClosedNodes9=
|
ModuleClosedNodes9=
|
||||||
NavigationStack=C_Principal,StartPrinter,2738,0,C_Cliente,B_IMP2BAK_Click,1641,0,C_Cliente,B_IMP2_Click,1119,0,C_Principal,GetResult,2786,2,EscPosPrinter,Reset,141,0,EscPosPrinter,Class_Globals,17,0,Subs,guardaProductoSin,928,0,Subs,guardaProducto,906,0,Subs,guardaProductoSinGestion,926,0,C_Cliente,Imprime_ticket,1599,6
|
NavigationStack=C_Principal,Class_Globals,0,0,Diseñador Visual,principal.bal,-100,3,Diseñador Visual,cliente.bal,-100,2,C_Cliente,Class_Globals,0,0,C_Cliente,B_IMP_Click,1041,0,Subs,borraPedidoClienteActual,1487,0,C_Cliente,BP_DOE_R_Click,4168,0,C_Cliente,BP_DOE_A_Click,4163,0,C_Principal,Subir_Click,556,1,C_Principal,B4XPage_Appear,472,0
|
||||||
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
|
||||||
|
|||||||
@@ -810,12 +810,30 @@ Sub traeVentaAbordo As Double
|
|||||||
Return va
|
Return va
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Sub TraeVentaSinImprimir As Double
|
||||||
|
' 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) and CAT_CL_CODIGO <> '0'")
|
||||||
|
If t.RowCount > 0 Then
|
||||||
|
Private resta As Double = 0
|
||||||
|
For i = 0 To t.RowCount - 1
|
||||||
|
t.Position = i
|
||||||
|
|
||||||
|
Private m As Cursor = Starter.skmt.ExecQuery($"Select SUM(PE_COSTO_TOT) AS RESTA from PEDIDO where PE_CLIENTE = '${t.GetString("CAT_CL_CODIGO")}' "$)
|
||||||
|
m.Position = 0
|
||||||
|
resta = resta + m.GetString("RESTA")
|
||||||
|
m.Close
|
||||||
|
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Return resta
|
||||||
|
End Sub
|
||||||
|
|
||||||
'Regresa el monto disponible para el abordo.
|
'Regresa el monto disponible para el abordo.
|
||||||
Sub traeDisponibleAbordo As Double
|
Sub traeDisponibleAbordo As Double
|
||||||
' Log("Venta abordo")
|
' Log("Venta abordo")
|
||||||
Private disp As Double = 0
|
Private disp As Double = 0
|
||||||
' Log($"${traeLimiteAbordoWeb} - ${traeLimiteAbordoXInventario} - ${traeVentaAbordo}"$)
|
' Log($"${traeLimiteAbordoWeb} - ${traeLimiteAbordoXInventario} - ${traeVentaAbordo}"$)
|
||||||
disp = NumberFormat2(((traeLimiteAbordoWeb - traeLimiteAbordoXInventario) - traeVentaAbordo), 0, 2, 2, False)
|
disp = NumberFormat2(((traeLimiteAbordoWeb - traeLimiteAbordoXInventario) - (traeVentaAbordo + TraeVentaSinImprimir)), 0, 2, 2, False)
|
||||||
Return disp
|
Return disp
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user