From 528847606f3045d1fcbf8385f0d8f007e1df7996 Mon Sep 17 00:00:00 2001 From: Jose Alberto Guerra Ugalde Date: Thu, 30 Nov 2023 12:15:58 -0600 Subject: [PATCH] =?UTF-8?q?30/11/23=20-=20Cambios=20para=20limite=20abordo?= =?UTF-8?q?.=20-=20Se=20agreg=C3=B3=20codigo=20para=20que=20si=20se=20modi?= =?UTF-8?q?fica=20la=20cantidad=20diractamente=20(sin=20botones=20de=20mas?= =?UTF-8?q?/menos)=20se=20respete=20el=20limite=20de=20abordo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- B4A/C_Productos.bas | 24 +++++++++++++++++------- B4A/Files/checks.bal | Bin 33821 -> 33803 bytes B4A/Files/foto.bal | Bin 3641 -> 3632 bytes B4A/KelloggsV4.b4a | 2 +- B4A/KelloggsV4.b4a.meta | 4 ++-- B4A/kms_helperSubs.bas | 4 ++-- 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/B4A/C_Productos.bas b/B4A/C_Productos.bas index 87e7d4d..c958a19 100644 --- a/B4A/C_Productos.bas +++ b/B4A/C_Productos.bas @@ -611,10 +611,6 @@ Sub b_prodMas_Click laCant.Text = NumberFormat2((laCant.Text + 1), 1, 0, 0, False) Log(clv_prods_ll.GetValue(index).As(Map)) End If - dispAbordo = NumberFormat2((kh.traeLimiteAbordoWeb - (kh.traeLimiteAbordoXInventario - kh.traeVenta) - kh.traeVentaAbordo), 0, 2, 2, False) - If dispAbordo < 1 Then - laCant.Text = NumberFormat2((laCant.Text - 1), 1, 0, 0, False) - End If else If laCant.Text + 1 <= inv And lfila.Text = "PRODUCTOS" Then LogColor(inv, Colors.blue) ' laCant.Text = $"$1.0{laCant.Text + 1}"$ @@ -644,6 +640,13 @@ Sub b_prodMas_Click laCant.Text = "0" et_pCant_TextChanged(100, 0) End If + dispAbordo = NumberFormat2((kh.traeLimiteAbordoWeb - (kh.traeLimiteAbordoXInventario - kh.traeVenta) - kh.traeVentaAbordo), 0, 2, 2, False) + If Subs.traeCliente = 0 And dispAbordo < 1 Then + Log("######### "& NumberFormat2((kh.traeLimiteAbordoWeb - (kh.traeLimiteAbordoXInventario - kh.traeVenta) - kh.traeVentaAbordo), 0, 2, 2, False)) + laCant.Text = NumberFormat2((laCant.Text - 1), 1, 0, 0, False) + Subs.actualizaProducto(almacenX, precioX, laCant.text, nombreX, id, clienteId, Subs.traeFecha, Subs.traeUsuarioDeBD, rutaUsuario, 0, Starter.tipov) + Log("######### "& NumberFormat2((kh.traeLimiteAbordoWeb - (kh.traeLimiteAbordoXInventario - kh.traeVenta) - kh.traeVentaAbordo), 0, 2, 2, False)) + End If cuentaProds Log($"Total Prods: ${totalProds}, Total Compra: $$1.2{totalCompra}"$) End Sub @@ -651,7 +654,6 @@ End Sub Private Sub et_pCant_TextChanged (Old As String, New As String) ' LogColor($"txt changed: ${Old}|${New}, hasfocus=${etCantHasFocus}"$,Colors.Magenta) ' If Not(Old = "0" And New = "") And etCantHasFocus Then cuentaProds - If etCantHasFocus = True Then Try ' LogColor($"txt changed: ${Old}|${New}, hasfocus=${etCantHasFocus}"$,Colors.Magenta) @@ -701,6 +703,14 @@ Private Sub et_pCant_TextChanged (Old As String, New As String) ' If Not(Old = "0" And New = "") And laCant.Text <> Null And laCant.Text <> "" And etCantHasFocus Then Subs.actualizaProducto(almacenX, precioX, laCant.Text, nombreX, id, clienteId, Subs.traeFecha, Subs.traeUsuarioDeBD, rutaUsuario, 0, Starter.tipov) ' End If + Log("REVISAMOS ABORDO DISP") + dispAbordo = NumberFormat2((kh.traeLimiteAbordoWeb - (kh.traeLimiteAbordoXInventario - kh.traeVenta) - kh.traeVentaAbordo), 0, 2, 2, False) + If Subs.traeCliente = 0 And dispAbordo < 1 Then + Log("######### "& NumberFormat2((kh.traeLimiteAbordoWeb - (kh.traeLimiteAbordoXInventario - kh.traeVenta) - kh.traeVentaAbordo), 0, 2, 2, False)) + laCant.Text = NumberFormat2(Old, 1, 0, 0, False) + Subs.actualizaProducto(almacenX, precioX, laCant.text, nombreX, id, clienteId, Subs.traeFecha, Subs.traeUsuarioDeBD, rutaUsuario, 0, Starter.tipov) + Log("######### "& NumberFormat2((kh.traeLimiteAbordoWeb - (kh.traeLimiteAbordoXInventario - kh.traeVenta) - kh.traeVentaAbordo), 0, 2, 2, False)) + End If Catch Log(LastException) End Try @@ -1085,7 +1095,7 @@ Private Sub clv_prods_ll_VisibleRangeChanged (FirstIndex As Int, LastIndex As In b_prodMenos.Tag = "vendido" b_prodMas.Tag = "vendido" If Subs.revisaImpresa Then - Log("YA IMPRESO") +' Log("YA IMPRESO") et_pCant.Enabled = False ' b_prodMas.Enabled = False b_prodMenos.Enabled = False @@ -1180,7 +1190,7 @@ Sub LlenaProdsLL(p As ResultSet, extra As String) Else ' Log("NO HAY RESULTSET") Dim p As ResultSet = Starter.skmt.ExecQuery($"select CAT_GP_ID, CAT_GP_NOMBRE, CAT_GP_ALMACEN, CAT_GP_PRECIO, CAT_GP_TIPOPROD from ${Subs.traeTablaProds(Starter.tipov)} where CAT_GP_PRECIO > 0 And CAT_GP_CLASIF <> 'PROMOS' order by CAT_GP_NOMBRE"$) - Log(p.RowCount & " - " & Subs.traeTablaProds(Starter.tipov)) +' Log(p.RowCount & " - " & Subs.traeTablaProds(Starter.tipov)) End If Do While p.NextRow diff --git a/B4A/Files/checks.bal b/B4A/Files/checks.bal index 9d6f2966affb52dc42ad9f5e1d913ee23f52ee4a..dcf7dc3d488321172b4433f0fa9592c2016ba87b 100644 GIT binary patch delta 122 zcmbQ+!PMQsw4pF(@&r!_PRYb}6$Soa}YxeNLTKWEBNf8hOq+AP# zc|<`x0U%)m#H 0 Then c.Position = 0 va = c.GetDouble("ventaAbordo") End If - Log("VENTA ABORDO: " & va) +' Log("VENTA ABORDO: " & va) Return va End Sub