mirror of
https://github.com/KeymonSoft/Durakelo.git
synced 2026-04-20 04:39:17 +00:00
12/1/24 - Cambios para la lista de precios de SuperQ
This commit is contained in:
16
B4A/Subs.bas
16
B4A/Subs.bas
@@ -738,13 +738,13 @@ End Sub
|
||||
'Inserta un producto en la tabla "pedido" y "pedido_cliente" y actualiza "cat_gunaprod".
|
||||
'NO ACTUALIZA LA BANDERA DE GESTION EN LA TABLA "kmt_info".
|
||||
'Si "gestion=2" entonces el sistema considera que el pedido ya se guardó y ya no se debe modificar.
|
||||
Sub guardaProductoSinGestion(cedis As String, costoU As String, cant As String, nombre As String, prodId As String, clienteId As String, fecha As String, usuario As String, rutaV As String, precioSin As String, tipoVenta As String)
|
||||
Sub guardaProductoSinGestion(cedis As String, costoU As String, precio2 As String, cant As String, nombre As String, prodId As String, clienteId As String, fecha As String, usuario As String, rutaV As String, precioSin As String, tipoVenta As String)
|
||||
If nombre.Length < 6 Then ToastMessageShow("(guardaProductoSinGestion) El nombre del producto no es valido " & nombre, True)
|
||||
LogColor("guardaProductoSinGestion: "&prodId&", cant="&cant&", tipo="&tipoVenta, Colors.Magenta)
|
||||
Private c As Cursor
|
||||
' Private tablaProds As String = "cat_gunaprod2"
|
||||
' If tipoVenta = "ABORDO" Then tablaProds = "cat_gunaprod"
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO PEDIDO (PE_CEDIS, PE_COSTO_TOT, PE_COSTOU, PE_CANT, PE_PRONOMBRE, PE_PROID, PE_CLIENTE, PE_FECHA, PE_USUARIO, PE_RUTA, PE_COSTO_SIN, PE_TIPO) VALUES(?,?,?,?,?,?,?,?,?,?,?,?) ", Array As Object (cedis, (cant * costoU), costoU, cant, nombre, prodId, clienteId, fecha, usuario, rutaV, precioSin, tipoVenta))
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO PEDIDO (PE_CEDIS, PE_PRECIO2, PE_COSTO_TOT, PE_COSTOU, PE_CANT, PE_PRONOMBRE, PE_PROID, PE_CLIENTE, PE_FECHA, PE_USUARIO, PE_RUTA, PE_COSTO_SIN, PE_TIPO) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?) ", Array As Object (cedis, precio2, (cant * costoU), costoU, cant, nombre, prodId, clienteId, fecha, usuario, rutaV, precioSin, tipoVenta))
|
||||
'Actualizamos el inventario en cat_gunaprod solo si no es RMI
|
||||
If cedis <> "DUR" Then Starter.skmt.ExecNonQuery2($"update ${traeTablaProds(tipoVenta)} set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? "$, Array As Object(cant, prodId))
|
||||
c=Starter.skmt.ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, SUM(PE_COSTO_SIN) AS TOTAL_CLIE_SIN FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")
|
||||
@@ -770,7 +770,7 @@ Sub guardaProductoSin(cedis As String, costoTot As String, costoU As String, can
|
||||
ToastMessageShow("guardaProdSin", False)
|
||||
End Sub
|
||||
|
||||
Sub actualizaProducto(cedis As String, costoU As String, cant As String, nombre As String, prodId As String, clienteId As String, fecha As String, usuario As String, rutaV As String, precioSin As String, tipoVenta As String)
|
||||
Sub actualizaProducto(cedis As String, costoU As String, precio2 As String, cant As String, nombre As String, prodId As String, clienteId As String, fecha As String, usuario As String, rutaV As String, precioSin As String, tipoVenta As String)
|
||||
If nombre.Length < 6 Then ToastMessageShow("(actualizaProducto) El nombre del producto no es valido " & nombre, True)
|
||||
LogColor($"actualizaProducto, p=${prodId}, nombre=${nombre}, cant=${cant}, cedis=${cedis}, tipo=${tipoVenta}, ${traeTablaProds(tipoVenta)}"$, Colors.Magenta)
|
||||
' Private tablaProds As String = "cat_gunaprod2"
|
||||
@@ -795,7 +795,7 @@ Sub actualizaProducto(cedis As String, costoU As String, cant As String, nombre
|
||||
Else
|
||||
'INSERTAMOS
|
||||
LogColor("INSERTAMOS PROD", Colors.red)
|
||||
If cant > 0 Then guardaProductoSinGestion(cedis, costoU, cant, nombre, prodId, clienteId, fecha, usuario, rutaV, precioSin, tipoVenta)
|
||||
If cant > 0 Then guardaProductoSinGestion(cedis, costoU, precio2, cant, nombre, prodId, clienteId, fecha, usuario, rutaV, precioSin, tipoVenta)
|
||||
End If
|
||||
c.Close
|
||||
End Sub
|
||||
@@ -1302,10 +1302,10 @@ Sub totalPedido As String
|
||||
Private pTotal As String = "0"
|
||||
If cT.RowCount > 0 Then
|
||||
cT.Position = 0
|
||||
' Log("|"&cT.GetLong("total")&"|"&pTotal)
|
||||
Private tempT As String = cT.GetLong("total")
|
||||
If tempT <> "null" And tempT <> Null Then
|
||||
' Log("|"&cT.GetLong("total")&"|")
|
||||
Private tempT As String = cT.GetString("total")
|
||||
' Log("|"&tempT&"|"&pTotal)
|
||||
If tempT <> Null And tempT <> "null" Then
|
||||
' Log("|"&cT.GetString("total")&"|")
|
||||
pTotal = tempT
|
||||
End If
|
||||
' Log($"Cliente actual=${traeCliente}, hayPedido=${hay}"$)
|
||||
|
||||
Reference in New Issue
Block a user