mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-21 03:49:14 +00:00
29/11/23 - Cambios en respaldo diario
- Se agregó´la table CAT_RMI al respaldo. - Cuando se restaura el respaldo, se suma el abordo al inventario de CAT_GUNAPROD2. - Se agregó códigp para el limite de abordo (No esta terminado)
This commit is contained in:
@@ -932,7 +932,7 @@ Sub actualizaProducto(cedis As String, costoU As String, cant As String, nombre
|
||||
Private antCant As Int = 0
|
||||
If IsNumber(c.GetInt("PE_CANT")) Then antCant=c.GetInt("PE_CANT")
|
||||
Private difCant As Int = cant - antCant
|
||||
Starter.skmt.ExecNonQuery($"update pedido set pe_cant = ${cant}, pe_costo_tot = ${(cant*c.GetString("PE_COSTOU"))} where pe_cedis = '${cedis}' and pe_proid = '${prodId}' and pe_cliente = '${clienteId}' "$)
|
||||
Starter.skmt.ExecNonQuery($"update pedido set pe_cant = ${cant}, pe_costo_tot = ${(cant*c.GetString("PE_COSTOU"))}, pe_tipo = '${tipoVenta}' where pe_cedis = '${cedis}' and pe_proid = '${prodId}' and pe_cliente = '${clienteId}' "$)
|
||||
If cedis <> "DUR" Then Starter.skmt.ExecNonQuery($"update ${traeTablaProds(tipoVenta)} set cat_gp_almacen = cat_gp_almacen - (${difCant}) where cat_gp_id = '${prodId}' "$)
|
||||
If cant = 0 Then
|
||||
LogColor($"BORRAMOS PRODUCTO - ${prodId}"$, Colors.Red)
|
||||
@@ -1269,6 +1269,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)
|
||||
Return t.Get(0) 'Regresamos el resultado mas pequeño.
|
||||
End Sub
|
||||
|
||||
@@ -1404,9 +1405,10 @@ End Sub
|
||||
'Borra los registros de la tabla "pedido" y "pedido_cliente"
|
||||
'Actualiza las tablas "cat_gunaprod" o "cat_gunaprod2" y "kmt_info".
|
||||
Sub borraPedidoClienteActual As String
|
||||
Log($"Boramos pedido de ${traeCliente}"$)
|
||||
Private thisC As Cursor
|
||||
' 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) ")
|
||||
thisC = Starter.skmt.ExecQuery("select PE_PROID, PE_CANT, PE_CEDIS FROM PEDIDO where pe_cliente in (Select CUENTA from cuentaa)")
|
||||
If thisC.RowCount>0 Then
|
||||
For i=0 To thisC.RowCount -1
|
||||
thisC.Position=i
|
||||
@@ -1566,7 +1568,7 @@ End Sub
|
||||
'Trae la sumatoria del pedido del cliente especificado de la tabla PEDIDO.
|
||||
'A veces hace el SUM() REDONDEA el monto, con esta función no se redondea nada.
|
||||
Sub sumaPedido(cliente As String) As String 'ignore
|
||||
Dim x As Cursor = Starter.skmt.ExecQuery($"select PE_COSTO_TOT from pedido where PE_CEDIS <> PE_PROID and pe_cliente = ${cliente} and PE_CEDIS <> "DOE""$)
|
||||
Dim x As Cursor = Starter.skmt.ExecQuery($"select PE_COSTO_TOT from pedido where PE_CEDIS <> PE_PROID and pe_cliente = '${cliente}' and PE_CEDIS <> "DOE""$)
|
||||
Private total As String = 0
|
||||
For i = 0 To x.RowCount - 1
|
||||
x.Position = i
|
||||
|
||||
Reference in New Issue
Block a user