From 2249c2449fcaa4b741ba6990b74415119f3f0bfd Mon Sep 17 00:00:00 2001 From: Isaac Date: Mon, 20 Jan 2025 20:23:35 -0600 Subject: [PATCH] Version: 5.01.15 Se movio el temporizador de la impresion y se movio el evento de impresion. --- B4A/C_Cliente.bas | 2 +- B4A/EscPosPrinter.bas | 31 ++++++++++++++++++++++++++----- B4A/MAZAPA.b4a | 4 ++-- B4A/MAZAPA.b4a.meta | 4 ++-- 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/B4A/C_Cliente.bas b/B4A/C_Cliente.bas index 6533db4..bfe2d6e 100644 --- a/B4A/C_Cliente.bas +++ b/B4A/C_Cliente.bas @@ -1198,7 +1198,7 @@ Sub B_IMP_Click c = skmt.ExecQuery2("SELECT * FROM PEDIDO WHERE PE_FOLIO = ? AND PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA)",Array As String("PREVENTA_48")) If c.RowCount > 0 Then imprime_venta - t1.Initialize("T1", 5000) ' 1000 = 1 second + t1.Initialize("T1", 3000) ' 1000 = 1 second t1.Enabled = True Else If c.RowCount = 0 Then s = skmt.ExecQuery2("SELECT * FROM PEDIDO WHERE PE_FOLIO = ? AND PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA)",Array As String("PREVENTA_24")) diff --git a/B4A/EscPosPrinter.bas b/B4A/EscPosPrinter.bas index 21dca71..ede68a9 100644 --- a/B4A/EscPosPrinter.bas +++ b/B4A/EscPosPrinter.bas @@ -1118,12 +1118,32 @@ End Sub ' Internal Serial Events '----------------------- -Private Sub Serial1_Connected (Success As Boolean) +'Private Sub Serial1_Connected (Success As Boolean) +' If Success Then +' Astream.Initialize(Serial1.InputStream, Serial1.OutputStream, "astream") +' Connected = True +' ConnectedError = "" +' Serial1.Listen +' Else +' Connected = False +' ConnectedError = LastException.Message +' End If +' If SubExists(CallBack, EventName & "_Connected") Then +' CallSub2(CallBack, EventName & "_Connected", Success) +' End If +'End Sub + +Private Sub Serial1_Connected(Success As Boolean) If Success Then - Astream.Initialize(Serial1.InputStream, Serial1.OutputStream, "astream") - Connected = True - ConnectedError = "" - Serial1.Listen + Try + Astream.Initialize(Serial1.InputStream, Serial1.OutputStream, "astream") + Connected = True + ConnectedError = "" + Serial1.Listen + Catch + Connected = False + ConnectedError = LastException.Message + End Try Else Connected = False ConnectedError = LastException.Message @@ -1133,6 +1153,7 @@ Private Sub Serial1_Connected (Success As Boolean) End If End Sub + '---------------------------- ' Internal AsyncStream Events '---------------------------- diff --git a/B4A/MAZAPA.b4a b/B4A/MAZAPA.b4a index 5439b6a..1fbfb8a 100644 --- a/B4A/MAZAPA.b4a +++ b/B4A/MAZAPA.b4a @@ -206,12 +206,12 @@ Module9=C_Mapas NumberOfFiles=69 NumberOfLibraries=33 NumberOfModules=31 -Version=12.8 +Version=13 @EndOfDesignText@ #Region Project Attributes #ApplicationLabel: mazapa #VersionCode: 1 - #VersionName: 5.01.11 + #VersionName: 5.01.15 'SupportedOrientations possible values: unspecified, landscape or portrait. #SupportedOrientations: portrait #CanInstallToExternalStorage: False diff --git a/B4A/MAZAPA.b4a.meta b/B4A/MAZAPA.b4a.meta index 6128ce0..b3c62be 100644 --- a/B4A/MAZAPA.b4a.meta +++ b/B4A/MAZAPA.b4a.meta @@ -94,6 +94,6 @@ ModuleClosedNodes6= ModuleClosedNodes7= ModuleClosedNodes8= ModuleClosedNodes9= -NavigationStack=Subs,traemosInventarioDisponibleParaPromo,1035,0,Subs,restaFijosPromo,1072,0,Subs,procesaPromocion,1205,0,Subs,alcanzanLosVariablesParaPromo,1136,5,C_Principal,Class_Globals,0,0,C_Principal,connecta_Click,2117,0,Main,Activity_Create,28,0,C_Cliente,GPS_LocationChanged,516,1,C_Cliente,imprime_preventa,1269,2,C_Cliente,imprime_venta,1453,0 +NavigationStack=Subs,alcanzanLosVariablesParaPromo,1136,5,C_Principal,Class_Globals,0,0,C_Principal,connecta_Click,2117,0,Main,Activity_Create,28,0,C_Cliente,GPS_LocationChanged,516,1,C_Cliente,imprime_preventa,1264,2,C_Cliente,imprime_venta,1439,0,C_Cliente,B_IMP_Click,1194,0,EscPosPrinter,Serial1_Connected,1135,0,EscPosPrinter,WriteQRCode,1114,0 SelectedBuild=0 -VisibleModules=29,1,14,2,12,3,6,7,8,26,5 +VisibleModules=29,1,14,2,12,3,6,7,8,26,5,22