mirror of
https://github.com/KeymonSoft/Durakelo.git
synced 2026-04-17 19:36:12 +00:00
Cambios para que corregir la busqueda, se cambiaron colores de la nota y productos
This commit is contained in:
@@ -114,6 +114,7 @@ Sub B4XPage_Appear
|
||||
Private elColor = Colors.Black
|
||||
If c.GetString("PE_TIPO") = "PREVENTA" Then elColor = Colors.RGB(200,95,20) 'Si es preventa, cambiamos el color del texto.
|
||||
If Not(IsNumber(c.GetString("PE_CEDIS"))) Then elColor = Colors.red 'Si es promo, cambiamos el color del texto.
|
||||
If Not(IsNumber(c.GetString("PE_CEDIS"))) And c.GetString("PE_TIPO") = "VENTA" Then elColor = Colors.RGB(202,0,174) 'Si es promo, cambiamos el color del texto.
|
||||
' Log(c.GetString("PE_PRONOMBRE") & "|" & elColor)
|
||||
ListView1.AddTwoLines(cs.Color(elColor).append(c.GetString("PE_PRONOMBRE")).Pop,"Cantidad #"& c.GetString("PE_CANT")& " SubTotal $"& c.GetString("PE_COSTO_TOT")& " Folio "& c.GetString("PE_FOLIO"))
|
||||
folio = c.GetString("PE_FOLIO")
|
||||
|
||||
@@ -193,7 +193,7 @@ Sub B4XPage_Appear
|
||||
entro ="3"
|
||||
lv_catalogos.Clear
|
||||
Sleep(100)
|
||||
lfila.Text = "CATALOGOS"
|
||||
lfila.Text = "CATALOGO"
|
||||
p_productos.Height = Root.Height
|
||||
clv_prods_ll.AsView.Visible = False
|
||||
lv_catalogos.BringToFront
|
||||
@@ -641,8 +641,8 @@ Sub b_prodMas_Click
|
||||
Dim pnl As B4XView = pnl0.GetView(0)
|
||||
Dim lProdX As B4XView = pnl.GetView(1)
|
||||
Private existencias As String = lProdX.tag.As(Map).Get("almacen")
|
||||
|
||||
' LogColor(clv_prods_ll.GetValue(index).As(Map), Colors.blue)
|
||||
Log(1)
|
||||
LogColor(clv_prods_ll.GetValue(index).As(Map), Colors.blue)
|
||||
' LogColor(lProdX.tag.As(Map), Colors.red)
|
||||
|
||||
Log($">>> ALMACEN: ${existencias}"$)
|
||||
@@ -664,7 +664,7 @@ Sub b_prodMas_Click
|
||||
laCant.Text = NumberFormat2((laCant.Text + 1), 1, 0, 0, False)
|
||||
' Log(clv_prods_ll.GetValue(index).As(Map))
|
||||
End If
|
||||
else If laCant.Text + 1 <= inv And lfila.Text = "PRODUCTOS" Then
|
||||
else If laCant.Text + 1 <= inv And (lfila.Text = "PRODUCTOS" or lfila.Text = "CATALOGO") Then
|
||||
' LogColor(inv, Colors.blue)
|
||||
' laCant.Text = $"$1.0{laCant.Text + 1}"$
|
||||
laCant.Text = NumberFormat2((laCant.Text + 1), 1, 0, 0, False)
|
||||
@@ -850,6 +850,7 @@ Sub b_terminar1_Click
|
||||
' If c_prods.GetString("PE_CEDIS") = "DUR" Then textColor = Colors.red
|
||||
If c_prods.GetString("PE_TIPO") = "PREVENTA" Then textColor = Colors.RGB(200,95,20) 'Si es preventa, cambiamos el color del texto.
|
||||
If Not(IsNumber(c_prods.GetString("PE_CEDIS"))) Then textColor = Colors.red 'Si es promo, cambiamos el color del texto.
|
||||
If Not(IsNumber(c_prods.GetString("PE_CEDIS"))) And c_prods.GetString("PE_TIPO") = "VENTA" Then textColor = Colors.RGB(202,0,174) 'Si es promo, cambiamos el color del texto.
|
||||
Dim label2 As Label
|
||||
label2 = lv_prodsPedido.TwoLinesLayout.SecondLabel
|
||||
label2.TextSize = 10
|
||||
@@ -1241,7 +1242,7 @@ Sub Busca_TextChanged (Old As String, New As String)
|
||||
forzarBusqueda = False
|
||||
If lfila.text = "PROMOCIONES" Then
|
||||
If Not(lv_promos.Visible) Then lv_promos.Visible = True
|
||||
Private cPromo As Cursor=Starter.skmt.ExecQuery($"select CAT_GP_ID, CAT_GP_NOMBRE, CAT_GP_PRECIO, CAT_GP_ALMACEN, CAT_GP_IMG from ${query} where CAT_GP_NOMBRE like '%${New}%' and CAT_GP_ALMACEN > 0 AND CAT_GP_TIPO = 'PROMOS' AND CAT_GP_SUBTIPO = 'PROMOS' AND CAT_GP_TIPOPROD <> 1 and (length(CAT_GP_CODPROMO) = 1 OR CAT_GP_CODPROMO = CAT_GP_ID)"$)
|
||||
Private cPromo As Cursor=Starter.skmt.ExecQuery($"select CAT_GP_ID, CAT_GP_NOMBRE, CAT_GP_PRECIO, CAT_GP_ALMACEN, CAT_GP_IMG from ${query} where CAT_GP_NOMBRE like '%${New}%' and CAT_GP_ALMACEN > 0 AND CAT_GP_TIPO = 'PROMOS' AND CAT_GP_SUBTIPO = 'PROMOS' AND CAT_GP_TIPOPROD <> 1 and (length(CAT_GP_CODPROMO) = 1 OR CAT_GP_CODPROMO = CAT_GP_ID) "$)
|
||||
Log($"res:${cPromo.RowCount}"$)
|
||||
If cPromo.RowCount > 0 Then
|
||||
lv_promos.Clear
|
||||
@@ -1292,7 +1293,7 @@ Sub LlenaProdsLL(p As ResultSet, extra As String)
|
||||
cantsMap.Initialize
|
||||
tiposMap.Initialize
|
||||
preciosMap.Initialize
|
||||
Dim pe As ResultSet = Starter.skmt.ExecQuery($"select PE_PROID, PE_CANT, PE_TIPO, PE_COSTOU from PEDIDO where PE_CLIENTE = '${clienteId}' and PE_CEDIS = '${Subs.traeAlmacen}'"$)
|
||||
Dim pe As ResultSet = Starter.skmt.ExecQuery($"select PE_PROID, PE_CANT, PE_TIPO, PE_COSTOU from PEDIDO where PE_CLIENTE = '${clienteId}' and PE_CEDIS = '${Subs.traeAlmacen}' and PE_TIPO = '${Starter.tipov}'"$)
|
||||
'Si EXTRA es igual a rmi, entonces regresamos los RMIs existentes.
|
||||
If extra = "rmi" Then pe = Starter.skmt.ExecQuery($"select PE_PROID, PE_CANT, PE_COSTOU from PEDIDO where PE_CLIENTE = '${clienteId}' and PE_CEDIS = 'DUR'"$)
|
||||
|
||||
|
||||
@@ -55,15 +55,15 @@ ModuleClosedNodes17=
|
||||
ModuleClosedNodes18=
|
||||
ModuleClosedNodes19=1
|
||||
ModuleClosedNodes2=
|
||||
ModuleClosedNodes20=10,12,14
|
||||
ModuleClosedNodes20=10,12,14,58
|
||||
ModuleClosedNodes21=
|
||||
ModuleClosedNodes3=
|
||||
ModuleClosedNodes4=
|
||||
ModuleClosedNodes5=
|
||||
ModuleClosedNodes6=1
|
||||
ModuleClosedNodes6=1,3
|
||||
ModuleClosedNodes7=
|
||||
ModuleClosedNodes8=
|
||||
ModuleClosedNodes9=1,3,31,35,36,37,38,39,40,41,42
|
||||
NavigationStack=C_Cliente,B4XPage_Created,156,3,C_Cliente,B4XPage_Appear,264,4,C_Productos,clv_prods_ll_VisibleRangeChanged,1212,0,C_Productos,Busca_TextChanged,1266,0,B4XMainPage,Initialize,96,0,B4XMainPage,B4XPage_Created,163,0,B4XMainPage,B4XPage_Appear,254,0,B4XMainPage,JobDone,366,0,B4XMainPage,GPS_LocationChanged,375,0,B4XMainPage,ImageView4_Click,402,0,B4XMainPage,b_envioBD_Click,478,0
|
||||
ModuleClosedNodes9=1,3,7,31,35,36,37,38,39,40,41,42
|
||||
NavigationStack=C_Productos,lv_catalogos2_ItemClick,357,0,C_Productos,lv_catalogos_ItemClick,297,0,C_Productos,LlenaProdsLL,1288,5,C_Productos,Busca_TextChanged,1237,0,Subs,guardaProductoSinGestion,746,0,Subs,actualizaProducto,773,6,Subs,guardaProductoSin,765,0,C_Nota,Class_Globals,0,0,C_Productos,b_prodMas_Click,692,3,C_Nota,B4XPage_Appear,110,5,C_Productos,b_terminar1_Click,846,0
|
||||
SelectedBuild=0
|
||||
VisibleModules=19,1,8,16,6,3,9,20,10,21,12
|
||||
|
||||
@@ -775,18 +775,18 @@ Sub actualizaProducto(cedis As String, costoU As String, precio2 As String, cant
|
||||
LogColor($"actualizaProducto, p=${prodId}, nombre=${nombre}, cant=${cant}, cedis=${cedis}, tipo=${tipoVenta}, ${traeTablaProds(tipoVenta)}"$, Colors.Magenta)
|
||||
' Private tablaProds As String = "cat_gunaprod2"
|
||||
' If tipoVenta = "ABORDO" Then tablaProds = "cat_gunaprod"
|
||||
Private c As Cursor=Starter.skmt.ExecQuery($"select * from pedido where pe_cedis = '${cedis}' and pe_proid = '${prodId}' and pe_cliente = '${clienteId}'"$)
|
||||
Private c As Cursor=Starter.skmt.ExecQuery($"select * from pedido where pe_cedis = '${cedis}' and pe_proid = '${prodId}' and pe_cliente = '${clienteId}' and PE_TIPO = '${tipoVenta}'"$)
|
||||
If c.RowCount > 0 Then
|
||||
LogColor("ACTUALIZAMOS PROD", Colors.Blue)
|
||||
c.Position=0
|
||||
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"))} where pe_cedis = '${cedis}' and pe_proid = '${prodId}' and pe_cliente = '${clienteId}' and PE_TIPO = '${tipoVenta}'"$)
|
||||
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)
|
||||
Starter.skmt.ExecNonQuery($"delete from pedido where pe_cedis = '${cedis}' and pe_proid = '${prodId}' and pe_cliente = '${clienteId}' "$)
|
||||
Starter.skmt.ExecNonQuery($"delete from pedido where pe_cedis = '${cedis}' and pe_proid = '${prodId}' and pe_cliente = '${clienteId}' and PE_TIPO = '${tipoVenta}'"$)
|
||||
Log($"Borramos pe_cedis='${cedis}' and pe_proid='${prodId}' and pe_cliente='${clienteId}'"$)
|
||||
Private pe As Cursor = Starter.skmt.ExecQuery("select count(pe_cliente) as cuantosPedidos from pedido where pe_cliente In (select cuenta from cuentaa)")
|
||||
pe.Position=0
|
||||
|
||||
Reference in New Issue
Block a user