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 9d6f296..dcf7dc3 100644 Binary files a/B4A/Files/checks.bal and b/B4A/Files/checks.bal differ diff --git a/B4A/Files/foto.bal b/B4A/Files/foto.bal index 8deea1e..9afc565 100644 Binary files a/B4A/Files/foto.bal and b/B4A/Files/foto.bal differ diff --git a/B4A/KelloggsV4.b4a b/B4A/KelloggsV4.b4a index ab96c04..e5a52b2 100644 --- a/B4A/KelloggsV4.b4a +++ b/B4A/KelloggsV4.b4a @@ -870,7 +870,7 @@ Version=12.5 #Region Project Attributes #ApplicationLabel: Kelloggs Venta #VersionCode: 3000 - #VersionName: 3.11.23 PRUEBA V4 + #VersionName: 3.11.29 PRUEBA V4 #SupportedOrientations: portrait #CanInstallToExternalStorage: False #BridgeLogger:true diff --git a/B4A/KelloggsV4.b4a.meta b/B4A/KelloggsV4.b4a.meta index c9fa51a..b27184f 100644 --- a/B4A/KelloggsV4.b4a.meta +++ b/B4A/KelloggsV4.b4a.meta @@ -91,6 +91,6 @@ ModuleClosedNodes6= ModuleClosedNodes7= ModuleClosedNodes8= ModuleClosedNodes9= -NavigationStack=kms_helperSubs,RD_restaura_cat_rmi,400,2,Visual Designer,cliente.bal,-100,1,C_Cliente,B4XPage_Appear,463,0,C_Principal,B4XPage_Appear,266,2,kms_helperSubs,respaldoBatch,401,0,C_Cliente,Guardar_Click,871,6,C_Principal,e_ruta_EnterPressed,2030,0,C_Principal,B4XPage_Created,252,0,C_Cliente,B4XPage_Created,301,0,C_Cliente,Initialize,285,0 +NavigationStack=C_Productos,LlenaProdsLL,1181,0,Visual Designer,cliente.bal,-100,1,Visual Designer,checklist.bal,-100,1,Visual Designer,checks.bal,-100,2,C_Productos,et_pCant_FocusChanged,720,0,Visual Designer,foto.bal,-100,3,C_Productos,cuentaProds,735,0,C_Productos,b_prodMas_Click,636,4,kms_helperSubs,traeVentaAbordo,711,0,C_Productos,et_pCant_TextChanged,698,6 SelectedBuild=0 -VisibleModules=1,28,11,24,3,29,14,12,9,21 +VisibleModules=1,28,11,24,3,29,14,12,9 diff --git a/B4A/kms_helperSubs.bas b/B4A/kms_helperSubs.bas index 95486b8..fb0dac5 100644 --- a/B4A/kms_helperSubs.bas +++ b/B4A/kms_helperSubs.bas @@ -715,14 +715,14 @@ End Sub 'Regresa el total de la venta de abordo en la tabla pedido. Sub traeVentaAbordo As Double - Log("Venta abordo") +' Log("Venta abordo") Private va As Double = 0 Private c As Cursor = khdb.ExecQuery("select sum(PE_COSTO_TOT) as ventaAbordo from pedido where PE_TIPO = 'ABORDO'") If c.RowCount > 0 Then c.Position = 0 va = c.GetDouble("ventaAbordo") End If - Log("VENTA ABORDO: " & va) +' Log("VENTA ABORDO: " & va) Return va End Sub