mirror of
https://github.com/KeymonSoft/Guna_Preventa_BAT.git
synced 2026-04-19 21:59:28 +00:00
6.02.20
Se agrega opcion para deshabilitar descuentos Se modifica para que en mayoreo no les de el codigo de credito Se cambia el querie del conecta_click
This commit is contained in:
10
B4A/Subs.bas
10
B4A/Subs.bas
@@ -1765,7 +1765,7 @@ Sub traeUsarIntentBDWA As Boolean 'ignore
|
||||
Return BDWA
|
||||
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,dev As String,futuro As String)
|
||||
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,dev As String,futuro As String, aplicades As String)
|
||||
If nombre.Length < 6 Then ToastMessageShow("(actualizaProducto) El nombre del producto no es valido " & nombre, True)
|
||||
precioSin = NumberFormat2(precioSin, 1, 2, 2, False)
|
||||
costoU = NumberFormat2(costoU, 1, 2, 2, False)
|
||||
@@ -1797,7 +1797,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,futuro)
|
||||
If cant > 0 Then guardaProductoSinGestion(cedis, costoU, cant, nombre, prodId, clienteId, fecha, usuario, rutaV, precioSin, tipoVenta,futuro,aplicades)
|
||||
End If
|
||||
c.Close
|
||||
Else If dev = 1 Then
|
||||
@@ -1825,7 +1825,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,futuro)
|
||||
If cant > 0 Then guardaProductoSinGestion(cedis, costoU, cant, nombre, prodId, clienteId, fecha, usuario, rutaV, precioSin, tipoVenta,futuro,aplicades)
|
||||
End If
|
||||
c.Close
|
||||
End If
|
||||
@@ -1836,7 +1836,7 @@ 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,futuro As String)
|
||||
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,futuro As String, aplicades As String)
|
||||
If nombre.Length < 6 Then ToastMessageShow("(guardaProductoSinGestion) El nombre del producto no es valido " & nombre, True)
|
||||
precioSin = NumberFormat2(precioSin, 1, 2, 2, False)
|
||||
costoU = NumberFormat2(costoU, 1, 2, 2, False)
|
||||
@@ -1844,7 +1844,7 @@ Sub guardaProductoSinGestion(cedis As String, costoU As String, cant As String,
|
||||
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_FOLIO,PE_FUTURO) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?) ", Array As Object (cedis, (cant * costoU), costoU, cant, nombre, prodId, clienteId, fecha, usuario, rutaV, precioSin, tipoVenta,futuro))
|
||||
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_FOLIO,PE_FUTURO,PE_DESC) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?) ", Array As Object (cedis, (cant * costoU), costoU, cant, nombre, prodId, clienteId, fecha, usuario, rutaV, precioSin, tipoVenta,futuro,aplicades))
|
||||
'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)")
|
||||
|
||||
Reference in New Issue
Block a user