cambio de borrado

This commit is contained in:
cvaldes1201
2024-09-19 13:09:38 -06:00
parent 11419cdc97
commit 08f0c5a27b
5 changed files with 64 additions and 17 deletions

View File

@@ -810,12 +810,30 @@ Sub traeVentaAbordo As Double
Return va
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.
Sub traeDisponibleAbordo As Double
' Log("Venta abordo")
Private disp As Double = 0
' 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
End Sub