package reparto_mazapa.keymon.lat; import anywheresoftware.b4a.BA; import anywheresoftware.b4a.B4AClass; import anywheresoftware.b4a.BALayout; import anywheresoftware.b4a.debug.*; public class c_cliente extends B4AClass.ImplB4AClass implements BA.SubDelegator{ private static java.util.HashMap htSubs; private void innerInitialize(BA _ba) throws Exception { if (ba == null) { ba = new BA(_ba, this, htSubs, "reparto_mazapa.keymon.lat.c_cliente"); if (htSubs == null) { ba.loadHtSubs(this.getClass()); htSubs = ba.htSubs; } } if (BA.isShellModeRuntimeCheck(ba)) this.getClass().getMethod("_class_globals", reparto_mazapa.keymon.lat.c_cliente.class).invoke(this, new Object[] {null}); else ba.raiseEvent2(null, true, "class_globals", false); } public anywheresoftware.b4a.keywords.Common __c = null; public anywheresoftware.b4a.objects.B4XViewWrapper _root = null; public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null; public anywheresoftware.b4a.gps.GPS _g = null; public String _clie_id = ""; public String _sdate = ""; public String _stime = ""; public String _usuario = ""; public String _cuenta = ""; public anywheresoftware.b4a.objects.Serial.BluetoothAdmin _btadmin = null; public anywheresoftware.b4a.objects.Serial _cmp20 = null; public anywheresoftware.b4a.objects.streams.File.TextWriterWrapper _printer = null; public anywheresoftware.b4a.objects.collections.Map _paireddevices = null; public anywheresoftware.b4a.objects.collections.List _l = null; public int _tamano = 0; public int _espacio = 0; public String _blanco = ""; public boolean _impresoraconectada = false; public String _longitud = ""; public String _latitud = ""; public String _nombre = ""; public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null; public anywheresoftware.b4a.sql.SQL.CursorWrapper _s = null; public anywheresoftware.b4a.objects.ListViewWrapper _listview1 = null; public anywheresoftware.b4a.objects.LabelWrapper _la_cuenta = null; public anywheresoftware.b4a.objects.LabelWrapper _la_nombre = null; public anywheresoftware.b4a.objects.LabelWrapper _la_calle = null; public anywheresoftware.b4a.objects.LabelWrapper _la_numero = null; public anywheresoftware.b4a.objects.LabelWrapper _la_nint = null; public anywheresoftware.b4a.objects.LabelWrapper _la_edo = null; public anywheresoftware.b4a.objects.LabelWrapper _la_pob = null; public anywheresoftware.b4a.objects.LabelWrapper _la_col = null; public anywheresoftware.b4a.objects.LabelWrapper _la_cp = null; public anywheresoftware.b4a.objects.LabelWrapper _la_zona = null; public anywheresoftware.b4a.objects.ButtonWrapper _gest = null; public anywheresoftware.b4a.objects.LabelWrapper _la_saldotot = null; public anywheresoftware.b4a.objects.LabelWrapper _la_saldooper = null; public reparto_mazapa.keymon.lat.dbrequestmanager _reqmanager = null; public anywheresoftware.b4a.objects.ButtonWrapper _b_noentrega = null; public anywheresoftware.b4a.objects.LabelWrapper _label10 = null; public anywheresoftware.b4a.objects.LabelWrapper _label11 = null; public anywheresoftware.b4a.sql.SQL.CursorWrapper _d = null; public anywheresoftware.b4a.objects.ButtonWrapper _tar = null; public anywheresoftware.b4a.objects.LabelWrapper _l_qr = null; public anywheresoftware.b4a.objects.ButtonWrapper _bt_qr = null; public reparto_mazapa.keymon.lat.escposprinter _printer1 = null; public anywheresoftware.b4a.objects.LabelWrapper _la_comm = null; public anywheresoftware.b4a.objects.LabelWrapper _la_actdte = null; public anywheresoftware.b4a.objects.LabelWrapper _la_usuario = null; public anywheresoftware.b4a.objects.LabelWrapper _la_resultado = null; public anywheresoftware.b4a.objects.LabelWrapper _l_entre1 = null; public anywheresoftware.b4a.objects.LabelWrapper _l_entre2 = null; public anywheresoftware.b4a.objects.LabelWrapper _l_atiende = null; public anywheresoftware.b4a.objects.LabelWrapper _l_atiende2 = null; public anywheresoftware.b4a.objects.ButtonWrapper _datos = null; public anywheresoftware.b4a.objects.ButtonWrapper _guardar = null; public anywheresoftware.b4a.objects.ButtonWrapper _nuevo = null; public anywheresoftware.b4a.objects.LabelWrapper _l_total = null; public anywheresoftware.b4a.objects.ButtonWrapper _hist = null; public String _pasa_imp = ""; public anywheresoftware.b4a.objects.ButtonWrapper _b_imp = null; public String _total_cliente = ""; public String _credito = ""; public anywheresoftware.b4a.objects.PanelWrapper _p_principal = null; public anywheresoftware.b4a.objects.ButtonWrapper _b_paso2 = null; public anywheresoftware.b4a.objects.LabelWrapper _l_cant = null; public int _errorimpresora = 0; public int _banderaimp = 0; public anywheresoftware.b4a.objects.LabelWrapper _l_credi = null; public anywheresoftware.b4a.objects.LabelWrapper _l_pagare = null; public anywheresoftware.b4a.objects.LabelWrapper _l_montopag = null; public anywheresoftware.b4a.objects.LabelWrapper _l_efectivo = null; public anywheresoftware.b4a.objects.LabelWrapper _l_montoefec = null; public b4a.example.dateutils _dateutils = null; public reparto_mazapa.keymon.lat.main _main = null; public reparto_mazapa.keymon.lat.appupdater _appupdater = null; public reparto_mazapa.keymon.lat.foto _foto = null; public reparto_mazapa.keymon.lat.mapa_cliente _mapa_cliente = null; public reparto_mazapa.keymon.lat.mapa_rutas _mapa_rutas = null; public reparto_mazapa.keymon.lat.starter _starter = null; public reparto_mazapa.keymon.lat.subs _subs = null; public reparto_mazapa.keymon.lat.tracker _tracker = null; public reparto_mazapa.keymon.lat.newinst2 _newinst2 = null; public reparto_mazapa.keymon.lat.b4xpages _b4xpages = null; public reparto_mazapa.keymon.lat.b4xcollections _b4xcollections = null; public reparto_mazapa.keymon.lat.httputils2service _httputils2service = null; public reparto_mazapa.keymon.lat.xuiviewsutils _xuiviewsutils = null; public String _activity_pause(boolean _userclosed) throws Exception{ //BA.debugLineNum = 296;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)"; //BA.debugLineNum = 298;BA.debugLine="End Sub"; return ""; } public String _b_imp_click() throws Exception{ //BA.debugLineNum = 411;BA.debugLine="Sub B_IMP_Click"; //BA.debugLineNum = 825;BA.debugLine="Guardado"; _guardado(); //BA.debugLineNum = 826;BA.debugLine="End Sub"; return ""; } public String _b_noentrega_click() throws Exception{ //BA.debugLineNum = 368;BA.debugLine="Sub b_noEntrega_Click"; //BA.debugLineNum = 370;BA.debugLine="B4XPages.ShowPage(\"noVenta\")"; _b4xpages._showpage /*String*/ (ba,"noVenta"); //BA.debugLineNum = 371;BA.debugLine="End Sub"; return ""; } public String _b_paso2_click() throws Exception{ anywheresoftware.b4a.sql.SQL.CursorWrapper _mandamapa = null; //BA.debugLineNum = 900;BA.debugLine="Sub B_PASO2_Click"; //BA.debugLineNum = 901;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\""; __c.DateTime.setDateFormat("MM/dd/yyyy"); //BA.debugLineNum = 902;BA.debugLine="sDate=DateTime.Date(DateTime.Now)"; _sdate = __c.DateTime.Date(__c.DateTime.getNow()); //BA.debugLineNum = 903;BA.debugLine="sTime=DateTime.Time(DateTime.Now)"; _stime = __c.DateTime.Time(__c.DateTime.getNow()); //BA.debugLineNum = 904;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CUENTA from cuen"; _c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CUENTA from cuentaa"))); //BA.debugLineNum = 905;BA.debugLine="c.Position = 0"; _c.setPosition((int) (0)); //BA.debugLineNum = 906;BA.debugLine="cuenta = c.GetString(\"CUENTA\")"; _cuenta = _c.GetString("CUENTA"); //BA.debugLineNum = 907;BA.debugLine="c=Starter.skmt.ExecQuery(\"select usuario from usu"; _c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select usuario from usuarioa"))); //BA.debugLineNum = 908;BA.debugLine="c.Position = 0"; _c.setPosition((int) (0)); //BA.debugLineNum = 909;BA.debugLine="usuario = c.GetString(\"USUARIO\")"; _usuario = _c.GetString("USUARIO"); //BA.debugLineNum = 910;BA.debugLine="c.Close"; _c.Close(); //BA.debugLineNum = 911;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM NOVENTA WH"; _starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM NOVENTA WHERE NV_CLIENTE IN (select cuenta from cuentaa)"); //BA.debugLineNum = 912;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO NOVENTA"; _starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO NOVENTA (NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON) VALUES(?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cuenta),(Object)(_sdate+_stime),(Object)(_usuario),(Object)("PASO"),(Object)("PASO ESPERA"),(Object)(_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ )})); //BA.debugLineNum = 914;BA.debugLine="Dim mandamapa As Cursor = Starter.skmt.ExecQuery("; _mandamapa = new anywheresoftware.b4a.sql.SQL.CursorWrapper(); _mandamapa = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT * FROM kmt_info WHERE gestion = 0"))); //BA.debugLineNum = 915;BA.debugLine="If mandamapa.RowCount > 0 Then"; if (_mandamapa.getRowCount()>0) { //BA.debugLineNum = 916;BA.debugLine="StartActivity(MAPA_RUTAS)"; __c.StartActivity(ba,(Object)(_mapa_rutas.getObject())); }else if(_mandamapa.getRowCount()==0) { //BA.debugLineNum = 918;BA.debugLine="B4XPages.ShowPage(\"Principal\")"; _b4xpages._showpage /*String*/ (ba,"Principal"); }; //BA.debugLineNum = 920;BA.debugLine="End Sub"; return ""; } public String _b4xpage_appear() throws Exception{ anywheresoftware.b4a.objects.collections.Map _cym = null; anywheresoftware.b4a.sql.SQL.CursorWrapper _vc = null; String _cuenta0 = ""; String _arti = ""; int _i = 0; anywheresoftware.b4a.sql.SQL.CursorWrapper _vc2 = null; String _cuenta1 = ""; String _arti1 = ""; float _preu = 0f; anywheresoftware.b4a.sql.SQL.CursorWrapper _vc3 = null; anywheresoftware.b4a.sql.SQL.CursorWrapper _vc4 = null; String _cuenta2 = ""; String _arti2 = ""; anywheresoftware.b4a.sql.SQL.CursorWrapper _vc5 = null; anywheresoftware.b4a.sql.SQL.CursorWrapper _c4 = null; String _cuenta3 = ""; String _arti3 = ""; anywheresoftware.b4a.sql.SQL.CursorWrapper _pag = null; float _pagaremonto = 0f; float _pagaremonto2 = 0f; //BA.debugLineNum = 120;BA.debugLine="Sub B4XPage_Appear"; //BA.debugLineNum = 121;BA.debugLine="banderaimp = 0"; _banderaimp = (int) (0); //BA.debugLineNum = 122;BA.debugLine="Subs.centraPanel(p_principal, Root.Width)"; _subs._centrapanel /*String*/ (ba,_p_principal,_root.getWidth()); //BA.debugLineNum = 123;BA.debugLine="Starter.skmt.Initialize(Starter.ruta,\"kmt.db\", Tr"; _starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .Initialize(_starter._ruta /*String*/ ,"kmt.db",__c.True); //BA.debugLineNum = 124;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.SERVE"; _reqmanager._initialize /*String*/ (ba,this,_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ ); //BA.debugLineNum = 125;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CAT_CL_CODIGO,CA"; _c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_CODIGO,CAT_CL_RUTA,CAT_CL_NOMBRE,CAT_CL_ATIENDE1,CAT_CL_ATIENTE2,CAT_CL_TELEFONO,CAT_CL_EMAIL,CAT_CL_CALLE,CAT_CL_NOEXT,CAT_CL_NOINT,CAT_CL_CALLE1,CAT_CL_CALLE2,CAT_CL_COLONIA,CAT_CL_MUNI,CAT_CL_EDO,CAT_CL_CP,CAT_CL_LONG,CAT_CL_LAT, CAT_CL_BCREDITO from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)"))); //BA.debugLineNum = 126;BA.debugLine="s=Starter.skmt.ExecQuery(\"select sum(pe_costo_tot"; _s = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)"))); //BA.debugLineNum = 127;BA.debugLine="s.Position=0"; _s.setPosition((int) (0)); //BA.debugLineNum = 128;BA.debugLine="c.Position=0"; _c.setPosition((int) (0)); //BA.debugLineNum = 129;BA.debugLine="la_cuenta.Text = c.GetString(\"CAT_CL_CODIGO\")"; _la_cuenta.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CODIGO"))); //BA.debugLineNum = 130;BA.debugLine="La_nombre.Text = c.GetString(\"CAT_CL_NOMBRE\")"; _la_nombre.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_NOMBRE"))); //BA.debugLineNum = 131;BA.debugLine="NOMBRE = c.GetString(\"CAT_CL_NOMBRE\")"; _nombre = _c.GetString("CAT_CL_NOMBRE"); //BA.debugLineNum = 132;BA.debugLine="LONGITUD = c.GetString(\"CAT_CL_LONG\")"; _longitud = _c.GetString("CAT_CL_LONG"); //BA.debugLineNum = 133;BA.debugLine="LATITUD = c.GetString(\"CAT_CL_LAT\")"; _latitud = _c.GetString("CAT_CL_LAT"); //BA.debugLineNum = 134;BA.debugLine="la_Calle.Text = c.GetString(\"CAT_CL_CALLE\") & c.G"; _la_calle.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE")+_c.GetString("CAT_CL_NOEXT"))); //BA.debugLineNum = 135;BA.debugLine="la_col.Text = c.GetString(\"CAT_CL_COLONIA\")"; _la_col.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_COLONIA"))); //BA.debugLineNum = 136;BA.debugLine="la_edo.Text = c.GetString(\"CAT_CL_EDO\")"; _la_edo.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_EDO"))); //BA.debugLineNum = 137;BA.debugLine="la_cp.Text = c.GetString(\"CAT_CL_CP\")"; _la_cp.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CP"))); //BA.debugLineNum = 138;BA.debugLine="l_entre1.Text = c.GetString(\"CAT_CL_CALLE1\")"; _l_entre1.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE1"))); //BA.debugLineNum = 139;BA.debugLine="l_entre2.Text = c.GetString(\"CAT_CL_CALLE2\")"; _l_entre2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE2"))); //BA.debugLineNum = 140;BA.debugLine="If c.GetString(\"CAT_CL_ATIENDE1\") <> Null And c.G"; if (_c.GetString("CAT_CL_ATIENDE1")!= null && (_c.GetString("CAT_CL_ATIENDE1")).equals("null") == false) { //BA.debugLineNum = 141;BA.debugLine="l_atiende.Text = c.GetString(\"CAT_CL_ATIENDE1\")"; _l_atiende.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENDE1"))); }else { //BA.debugLineNum = 143;BA.debugLine="l_atiende.Text = \" \""; _l_atiende.setText(BA.ObjectToCharSequence(" ")); }; //BA.debugLineNum = 145;BA.debugLine="If c.GetString(\"CAT_CL_ATIENTE2\") <> Null And c.G"; if (_c.GetString("CAT_CL_ATIENTE2")!= null && (_c.GetString("CAT_CL_ATIENTE2")).equals("NULL") == false) { //BA.debugLineNum = 146;BA.debugLine="l_atiende2.Text = c.GetString(\"CAT_CL_ATIENTE2\")"; _l_atiende2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENTE2"))); }else { //BA.debugLineNum = 148;BA.debugLine="l_atiende2.Text = \" \""; _l_atiende2.setText(BA.ObjectToCharSequence(" ")); }; //BA.debugLineNum = 150;BA.debugLine="la_saldotot.Text = c.GetString(\"CAT_CL_TELEFONO\")"; _la_saldotot.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_TELEFONO"))); //BA.debugLineNum = 151;BA.debugLine="la_saldooper.Text = c.GetString(\"CAT_CL_EMAIL\")"; _la_saldooper.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_EMAIL"))); //BA.debugLineNum = 153;BA.debugLine="CREDITO = C.GetString(\"CAT_CL_BCREDITO\")"; _credito = _c.GetString("CAT_CL_BCREDITO"); //BA.debugLineNum = 156;BA.debugLine="Private cym As Map = Subs.traeCantYMonto2(Subs.tr"; _cym = new anywheresoftware.b4a.objects.collections.Map(); _cym = _subs._traecantymonto2 /*anywheresoftware.b4a.objects.collections.Map*/ (ba,_subs._traecliente /*String*/ (ba)); //BA.debugLineNum = 157;BA.debugLine="L_CANT.Text = cym.Get(\"cantidad\")"; _l_cant.setText(BA.ObjectToCharSequence(_cym.Get((Object)("cantidad")))); //BA.debugLineNum = 158;BA.debugLine="l_total.Text = Round2(cym.Get(\"monto\"), 2)"; _l_total.setText(BA.ObjectToCharSequence(__c.Round2((double)(BA.ObjectToNumber(_cym.Get((Object)("monto")))),(int) (2)))); //BA.debugLineNum = 166;BA.debugLine="Starter.skmt.ExecNonQuery(\"UPDATE HIST_VENTAS set"; _starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE HIST_VENTAS set ESPROMO = 1 where HVD_CODPROMO = HVD_PROID AND HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)"); //BA.debugLineNum = 167;BA.debugLine="Private vc As Cursor = Starter.skmt.ExecQuery($\"s"; _vc = new anywheresoftware.b4a.sql.SQL.CursorWrapper(); _vc = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select HVD_PROID,HVD_COSTO_TOT, HVD_CANT, IFNULL(HVD_RECHAZOCANT, 0) AS HVD_RECHAZOCANT from HIST_VENTAS where BCAJAS = 0 and HVD_CODPROMO ='"+__c.SmartStringFormatter("",(Object)(_subs._traealmacen /*String*/ (ba)))+"' and HVD_CLIENTE in (select cuenta from cuentaa)")))); //BA.debugLineNum = 169;BA.debugLine="Private cuenta0 As String = 0"; _cuenta0 = BA.NumberToString(0); //BA.debugLineNum = 170;BA.debugLine="Private arti As String = 0"; _arti = BA.NumberToString(0); //BA.debugLineNum = 171;BA.debugLine="If vc.RowCount > 0 Then"; if (_vc.getRowCount()>0) { //BA.debugLineNum = 172;BA.debugLine="For i = 0 To vc.RowCount - 1"; { final int step41 = 1; final int limit41 = (int) (_vc.getRowCount()-1); _i = (int) (0) ; for (;_i <= limit41 ;_i = _i + step41 ) { //BA.debugLineNum = 173;BA.debugLine="vc.Position = i"; _vc.setPosition(_i); //BA.debugLineNum = 176;BA.debugLine="cuenta0 = cuenta0 + ((vc.GetString(\"HVD_CANT\")"; _cuenta0 = BA.NumberToString((double)(Double.parseDouble(_cuenta0))+(((double)(Double.parseDouble(_vc.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc.GetString("HVD_RECHAZOCANT"))))*((double)(Double.parseDouble(_vc.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_vc.GetString("HVD_CANT")))))); //BA.debugLineNum = 181;BA.debugLine="arti = arti + (vc.GetString(\"HVD_CANT\") - vc.Ge"; _arti = BA.NumberToString((double)(Double.parseDouble(_arti))+((double)(Double.parseDouble(_vc.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc.GetString("HVD_RECHAZOCANT"))))); } }; }; //BA.debugLineNum = 187;BA.debugLine="Private vc2 As Cursor = Starter.skmt.ExecQuery(\"s"; _vc2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper(); _vc2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select HVD_PROID, HVD_CANT, IFNULL(HVD_RECHAZOCANT, 0) AS HVD_RECHAZOCANT, CANTC,HVD_COSTO_TOT from HIST_VENTAS where HVD_CLIENTE in (select cuenta from cuentaa) AND BCAJAS = 1"))); //BA.debugLineNum = 188;BA.debugLine="Private Cuenta1 As String = 0"; _cuenta1 = BA.NumberToString(0); //BA.debugLineNum = 189;BA.debugLine="Private arti1 As String = 0"; _arti1 = BA.NumberToString(0); //BA.debugLineNum = 190;BA.debugLine="If vc2.RowCount > 0 Then"; if (_vc2.getRowCount()>0) { //BA.debugLineNum = 191;BA.debugLine="For i = 0 To vc2.RowCount - 1"; { final int step51 = 1; final int limit51 = (int) (_vc2.getRowCount()-1); _i = (int) (0) ; for (;_i <= limit51 ;_i = _i + step51 ) { //BA.debugLineNum = 192;BA.debugLine="vc2.Position = i"; _vc2.setPosition(_i); //BA.debugLineNum = 193;BA.debugLine="Dim preu As Float = NumberFormat2(vc2.GetString"; _preu = (float)(Double.parseDouble(__c.NumberFormat2((double)(Double.parseDouble(_vc2.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_vc2.GetString("CANTC"))),(int) (0),(int) (2),(int) (2),__c.False))); //BA.debugLineNum = 194;BA.debugLine="Private vc3 As Cursor = Starter.skmt.ExecQuery("; _vc3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper(); _vc3 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select PRECIOCONVER, CONVERSION from CAT_GUNAPROD where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_vc2.GetString("HVD_PROID")))+"'")))); //BA.debugLineNum = 195;BA.debugLine="If vc3.RowCount > 0 Then"; if (_vc3.getRowCount()>0) { //BA.debugLineNum = 196;BA.debugLine="vc3.Position = 0"; _vc3.setPosition((int) (0)); //BA.debugLineNum = 197;BA.debugLine="Cuenta1 = Cuenta1 + ((vc2.GetString(\"CANTC\")-("; _cuenta1 = BA.NumberToString((double)(Double.parseDouble(_cuenta1))+(((double)(Double.parseDouble(_vc2.GetString("CANTC")))-((double)(Double.parseDouble(_vc2.GetString("HVD_RECHAZOCANT")))/(double)(double)(Double.parseDouble(_vc3.GetString("CONVERSION")))))*_preu)); //BA.debugLineNum = 198;BA.debugLine="arti1 = arti1 + (vc2.GetString(\"HVD_CANT\") - v"; _arti1 = BA.NumberToString((double)(Double.parseDouble(_arti1))+((double)(Double.parseDouble(_vc2.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc2.GetString("HVD_RECHAZOCANT"))))); }; } }; }; //BA.debugLineNum = 204;BA.debugLine="Private vc4 As Cursor = Starter.skmt.ExecQuery($\""; _vc4 = new anywheresoftware.b4a.sql.SQL.CursorWrapper(); _vc4 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select HVD_PROID,HVD_PRONOMBRE,HVD_COSTO_TOT, HVD_CANT, IFNULL(HVD_RECHAZOCANT, 0) AS HVD_RECHAZOCANT, CANTC,HVD_COSTO_TOT, HVD_RECHAZO, HVD_CODPROMO from HIST_VENTAS where HVD_CLIENTE in (select cuenta from cuentaa) AND BCAJAS = 0 and HVD_CODPROMO <> '"+__c.SmartStringFormatter("",(Object)(_subs._traealmacen /*String*/ (ba)))+"'")))); //BA.debugLineNum = 205;BA.debugLine="Private Cuenta2 As String = 0"; _cuenta2 = BA.NumberToString(0); //BA.debugLineNum = 206;BA.debugLine="Private arti2 As String = 0"; _arti2 = BA.NumberToString(0); //BA.debugLineNum = 207;BA.debugLine="If vc4.RowCount > 0 Then"; if (_vc4.getRowCount()>0) { //BA.debugLineNum = 209;BA.debugLine="For i = 0 To vc4.RowCount - 1"; { final int step66 = 1; final int limit66 = (int) (_vc4.getRowCount()-1); _i = (int) (0) ; for (;_i <= limit66 ;_i = _i + step66 ) { //BA.debugLineNum = 210;BA.debugLine="vc4.Position = i"; _vc4.setPosition(_i); //BA.debugLineNum = 211;BA.debugLine="If vc4.GetString(\"HVD_PROID\") <> vc4.GetString("; if ((_vc4.GetString("HVD_PROID")).equals(_vc4.GetString("HVD_CODPROMO")) == false) { //BA.debugLineNum = 212;BA.debugLine="If vc4.GetString(\"HVD_RECHAZO\") = 0 Then"; if ((_vc4.GetString("HVD_RECHAZO")).equals(BA.NumberToString(0))) { //BA.debugLineNum = 213;BA.debugLine="Cuenta2 = Cuenta2 + vc4.GetString(\"HVD_COSTO_"; _cuenta2 = BA.NumberToString((double)(Double.parseDouble(_cuenta2))+(double)(Double.parseDouble(_vc4.GetString("HVD_COSTO_TOT")))); //BA.debugLineNum = 214;BA.debugLine="arti2 = arti2 + vc4.GetString(\"HVD_CANT\")"; _arti2 = BA.NumberToString((double)(Double.parseDouble(_arti2))+(double)(Double.parseDouble(_vc4.GetString("HVD_CANT")))); }else { //BA.debugLineNum = 216;BA.debugLine="Private vc5 As Cursor = Starter.skmt.ExecQuer"; _vc5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper(); _vc5 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select CAT_GP_PRECIO from CAT_GUNAPROD where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_vc4.GetString("HVD_PROID")))+"'")))); //BA.debugLineNum = 217;BA.debugLine="If vc5.RowCount > 0 Then"; if (_vc5.getRowCount()>0) { //BA.debugLineNum = 218;BA.debugLine="vc5.Position= 0"; _vc5.setPosition((int) (0)); //BA.debugLineNum = 220;BA.debugLine="Cuenta2 = Cuenta2 +((vc4.GetString(\"HVD_CANT"; _cuenta2 = BA.NumberToString((double)(Double.parseDouble(_cuenta2))+(((double)(Double.parseDouble(_vc4.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc4.GetString("HVD_RECHAZOCANT"))))*((double)(Double.parseDouble(_vc4.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_vc4.GetString("HVD_CANT")))))); //BA.debugLineNum = 221;BA.debugLine="arti2 = arti2 +(vc4.GetString(\"HVD_CANT\")- v"; _arti2 = BA.NumberToString((double)(Double.parseDouble(_arti2))+((double)(Double.parseDouble(_vc4.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc4.GetString("HVD_RECHAZOCANT"))))); }; }; }; } }; }; //BA.debugLineNum = 230;BA.debugLine="Private c4 As Cursor = Starter.skmt.ExecQuery($\"S"; _c4 = new anywheresoftware.b4a.sql.SQL.CursorWrapper(); _c4 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("SELECT IFNULL(PE_CANT,0) AS PE_CANT, iFNULL(PE_COSTO_TOT,0) AS PE_COSTO_TOT FROM PEDIDO WHERE PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")))); //BA.debugLineNum = 231;BA.debugLine="Private Cuenta3 As String = 0"; _cuenta3 = BA.NumberToString(0); //BA.debugLineNum = 232;BA.debugLine="Private arti3 As String = 0"; _arti3 = BA.NumberToString(0); //BA.debugLineNum = 233;BA.debugLine="If c4.RowCount > 0 Then"; if (_c4.getRowCount()>0) { //BA.debugLineNum = 234;BA.debugLine="For i = 0 To c4.RowCount -1"; { final int step87 = 1; final int limit87 = (int) (_c4.getRowCount()-1); _i = (int) (0) ; for (;_i <= limit87 ;_i = _i + step87 ) { //BA.debugLineNum = 235;BA.debugLine="c4.Position = i"; _c4.setPosition(_i); //BA.debugLineNum = 236;BA.debugLine="arti3 = arti3 + c4.GetString(\"PE_CANT\")"; _arti3 = BA.NumberToString((double)(Double.parseDouble(_arti3))+(double)(Double.parseDouble(_c4.GetString("PE_CANT")))); //BA.debugLineNum = 237;BA.debugLine="Cuenta3 = Cuenta3 + c4.GetString(\"PE_COSTO_TOT\""; _cuenta3 = BA.NumberToString((double)(Double.parseDouble(_cuenta3))+(double)(Double.parseDouble(_c4.GetString("PE_COSTO_TOT")))); } }; }; //BA.debugLineNum = 240;BA.debugLine="Log(cuenta0)"; __c.LogImpl("27864440",_cuenta0,0); //BA.debugLineNum = 241;BA.debugLine="Log(Cuenta1)"; __c.LogImpl("27864441",_cuenta1,0); //BA.debugLineNum = 242;BA.debugLine="Log(Cuenta2)"; __c.LogImpl("27864442",_cuenta2,0); //BA.debugLineNum = 243;BA.debugLine="Log(Cuenta3)"; __c.LogImpl("27864443",_cuenta3,0); //BA.debugLineNum = 245;BA.debugLine="l_total.Text = NumberFormat2((cuenta0 + Cuenta1 +"; _l_total.setText(BA.ObjectToCharSequence(__c.NumberFormat2(((double)(Double.parseDouble(_cuenta0))+(double)(Double.parseDouble(_cuenta1))+(double)(Double.parseDouble(_cuenta2))+(double)(Double.parseDouble(_cuenta3))),(int) (0),(int) (2),(int) (2),__c.True))); //BA.debugLineNum = 246;BA.debugLine="L_CANT.Text = NumberFormat2((arti + arti1 +arti2"; _l_cant.setText(BA.ObjectToCharSequence(__c.NumberFormat2(((double)(Double.parseDouble(_arti))+(double)(Double.parseDouble(_arti1))+(double)(Double.parseDouble(_arti2))+(double)(Double.parseDouble(_arti3))),(int) (0),(int) (0),(int) (0),__c.True))); //BA.debugLineNum = 251;BA.debugLine="c = Starter.skmt.ExecQuery2(\"select CAT_VA_VALOR"; _c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?",new String[]{"MACIMP"}))); //BA.debugLineNum = 252;BA.debugLine="If c.RowCount > 0 Then"; if (_c.getRowCount()>0) { //BA.debugLineNum = 253;BA.debugLine="c.Position = 0"; _c.setPosition((int) (0)); //BA.debugLineNum = 254;BA.debugLine="Starter.MAC_IMPRESORA = c.GetString(\"CAT_VA_VALO"; _starter._mac_impresora /*String*/ = _c.GetString("CAT_VA_VALOR"); }; //BA.debugLineNum = 256;BA.debugLine="If Starter.MAC_IMPRESORA = \"\" Then Starter.MAC_IM"; if ((_starter._mac_impresora /*String*/ ).equals("")) { _starter._mac_impresora /*String*/ = "0";}; //BA.debugLineNum = 258;BA.debugLine="Printer1.Initialize(Me, \"Printer1\")"; _printer1._initialize /*String*/ (ba,this,"Printer1"); //BA.debugLineNum = 260;BA.debugLine="If Printer1.IsConnected = False Then"; if (_printer1._isconnected /*boolean*/ ()==__c.False) { }else { //BA.debugLineNum = 264;BA.debugLine="Printer1.DisConnect"; _printer1._disconnect /*String*/ (); //BA.debugLineNum = 265;BA.debugLine="Printer1.Connect"; _printer1._connect /*boolean*/ (); //BA.debugLineNum = 266;BA.debugLine="Log(\"2\")"; __c.LogImpl("27864466","2",0); }; //BA.debugLineNum = 269;BA.debugLine="Dim pag As Cursor = Starter.skmt.ExecQuery(\"selec"; _pag = new anywheresoftware.b4a.sql.SQL.CursorWrapper(); _pag = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select * FROM PAGARES WHERE TMP_CLIENTE IN (SELECT CUENTA FROM CUENTAA)"))); //BA.debugLineNum = 270;BA.debugLine="If pag.RowCount > 0 Then"; if (_pag.getRowCount()>0) { //BA.debugLineNum = 271;BA.debugLine="pag.Position = 0"; _pag.setPosition((int) (0)); //BA.debugLineNum = 272;BA.debugLine="l_credi.Visible = True"; _l_credi.setVisible(__c.True); //BA.debugLineNum = 273;BA.debugLine="l_pagare.Visible = True"; _l_pagare.setVisible(__c.True); //BA.debugLineNum = 274;BA.debugLine="l_montoefec.Visible = True"; _l_montoefec.setVisible(__c.True); //BA.debugLineNum = 275;BA.debugLine="l_efectivo.Visible = True"; _l_efectivo.setVisible(__c.True); //BA.debugLineNum = 276;BA.debugLine="l_montopag.Visible = True"; _l_montopag.setVisible(__c.True); //BA.debugLineNum = 277;BA.debugLine="l_montopag.Text = pag.GetString(\"TMP_MONTO_PAGAR"; _l_montopag.setText(BA.ObjectToCharSequence(_pag.GetString("TMP_MONTO_PAGARE"))); //BA.debugLineNum = 278;BA.debugLine="Dim PAGAREMONTO As Float = cuenta0 + Cuenta1 + C"; _pagaremonto = (float) ((double)(Double.parseDouble(_cuenta0))+(double)(Double.parseDouble(_cuenta1))+(double)(Double.parseDouble(_cuenta2))+(double)(Double.parseDouble(_cuenta3))); //BA.debugLineNum = 279;BA.debugLine="Dim PAGAREMONTO2 As Float = pag.GetString(\"TMP_M"; _pagaremonto2 = (float)(Double.parseDouble(_pag.GetString("TMP_MONTO_PAGARE"))); //BA.debugLineNum = 281;BA.debugLine="If PAGAREMONTO - PAGAREMONTO2 < 0 Then"; if (_pagaremonto-_pagaremonto2<0) { //BA.debugLineNum = 282;BA.debugLine="l_montoefec.Text = 0"; _l_montoefec.setText(BA.ObjectToCharSequence(0)); }else { //BA.debugLineNum = 284;BA.debugLine="l_montoefec.Text = PAGAREMONTO - PAGAREMONTO2"; _l_montoefec.setText(BA.ObjectToCharSequence(_pagaremonto-_pagaremonto2)); }; }else if(_pag.getRowCount()==0) { //BA.debugLineNum = 287;BA.debugLine="l_credi.Visible = False"; _l_credi.setVisible(__c.False); //BA.debugLineNum = 288;BA.debugLine="l_pagare.Visible = False"; _l_pagare.setVisible(__c.False); //BA.debugLineNum = 289;BA.debugLine="l_montoefec.Visible = False"; _l_montoefec.setVisible(__c.False); //BA.debugLineNum = 290;BA.debugLine="l_efectivo.Visible = False"; _l_efectivo.setVisible(__c.False); //BA.debugLineNum = 291;BA.debugLine="l_montopag.Visible = False"; _l_montopag.setVisible(__c.False); }; //BA.debugLineNum = 294;BA.debugLine="End Sub"; return ""; } public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper _b4xpage_closerequest() throws Exception{ ResumableSub_B4XPage_CloseRequest rsub = new ResumableSub_B4XPage_CloseRequest(this); rsub.resume(ba, null); return (anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.keywords.Common.ResumableSubWrapper(), rsub); } public static class ResumableSub_B4XPage_CloseRequest extends BA.ResumableSub { public ResumableSub_B4XPage_CloseRequest(reparto_mazapa.keymon.lat.c_cliente parent) { this.parent = parent; } reparto_mazapa.keymon.lat.c_cliente parent; @Override public void resume(BA ba, Object[] result) throws Exception{ while (true) { switch (state) { case -1: { parent.__c.ReturnFromResumableSub(this,null);return;} case 0: //C this.state = -1; //BA.debugLineNum = 376;BA.debugLine="B4XPages.ShowPage(\"Clientes\")"; parent._b4xpages._showpage /*String*/ (ba,"Clientes"); //BA.debugLineNum = 377;BA.debugLine="Return False"; if (true) { parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;}; //BA.debugLineNum = 378;BA.debugLine="End Sub"; if (true) break; } } } } public String _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{ //BA.debugLineNum = 81;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)"; //BA.debugLineNum = 82;BA.debugLine="Root = Root1"; _root = _root1; //BA.debugLineNum = 84;BA.debugLine="g.Initialize(\"GPS\")"; _g.Initialize("GPS"); //BA.debugLineNum = 86;BA.debugLine="Root.LoadLayout(\"cliente\")"; _root.LoadLayout("cliente",ba); //BA.debugLineNum = 87;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CAT_CL_CODIGO, C"; _c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_CODIGO, CAT_CL_RUTA, CAT_CL_NOMBRE, CAT_CL_ATIENDE1, CAT_CL_ATIENTE2, CAT_CL_TELEFONO, CAT_CL_EMAIL, CAT_CL_CALLE, CAT_CL_NOEXT,CAT_CL_NOINT,CAT_CL_CALLE1,CAT_CL_CALLE2,CAT_CL_COLONIA,CAT_CL_MUNI,CAT_CL_EDO,CAT_CL_CP,CAT_CL_LONG,CAT_CL_LAT from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)"))); //BA.debugLineNum = 88;BA.debugLine="s=Starter.skmt.ExecQuery(\"select sum(pe_costo_tot"; _s = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)"))); //BA.debugLineNum = 89;BA.debugLine="s.Position=0"; _s.setPosition((int) (0)); //BA.debugLineNum = 90;BA.debugLine="c.Position=0"; _c.setPosition((int) (0)); //BA.debugLineNum = 91;BA.debugLine="la_cuenta.Text = c.GetString(\"CAT_CL_CODIGO\")"; _la_cuenta.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CODIGO"))); //BA.debugLineNum = 92;BA.debugLine="La_nombre.Text = c.GetString(\"CAT_CL_NOMBRE\")"; _la_nombre.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_NOMBRE"))); //BA.debugLineNum = 93;BA.debugLine="la_Calle.Text = c.GetString(\"CAT_CL_CALLE\") & c.G"; _la_calle.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE")+_c.GetString("CAT_CL_NOEXT"))); //BA.debugLineNum = 94;BA.debugLine="la_col.Text = c.GetString(\"CAT_CL_COLONIA\")"; _la_col.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_COLONIA"))); //BA.debugLineNum = 95;BA.debugLine="la_edo.Text = c.GetString(\"CAT_CL_EDO\")"; _la_edo.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_EDO"))); //BA.debugLineNum = 96;BA.debugLine="la_cp.Text = c.GetString(\"CAT_CL_CP\")"; _la_cp.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CP"))); //BA.debugLineNum = 97;BA.debugLine="l_entre1.Text = c.GetString(\"CAT_CL_CALLE1\")"; _l_entre1.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE1"))); //BA.debugLineNum = 98;BA.debugLine="l_entre2.Text = c.GetString(\"CAT_CL_CALLE2\")"; _l_entre2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE2"))); //BA.debugLineNum = 99;BA.debugLine="If c.GetString(\"CAT_CL_ATIENDE1\") <> Null And c.G"; if (_c.GetString("CAT_CL_ATIENDE1")!= null && (_c.GetString("CAT_CL_ATIENDE1")).equals("null") == false) { //BA.debugLineNum = 100;BA.debugLine="l_atiende.Text = c.GetString(\"CAT_CL_ATIENDE1\")"; _l_atiende.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENDE1"))); }else { //BA.debugLineNum = 102;BA.debugLine="l_atiende.Text = \" \""; _l_atiende.setText(BA.ObjectToCharSequence(" ")); }; //BA.debugLineNum = 104;BA.debugLine="If c.GetString(\"CAT_CL_ATIENTE2\") <> Null And c.G"; if (_c.GetString("CAT_CL_ATIENTE2")!= null && (_c.GetString("CAT_CL_ATIENTE2")).equals("NULL") == false) { //BA.debugLineNum = 105;BA.debugLine="l_atiende2.Text = c.GetString(\"CAT_CL_ATIENTE2\")"; _l_atiende2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENTE2"))); //BA.debugLineNum = 106;BA.debugLine="Log(\"|\"&c.GetString(\"CAT_CL_ATIENTE2\")&\"|\")"; __c.LogImpl("27798809","|"+_c.GetString("CAT_CL_ATIENTE2")+"|",0); }else { //BA.debugLineNum = 108;BA.debugLine="l_atiende2.Text = \" \""; _l_atiende2.setText(BA.ObjectToCharSequence(" ")); }; //BA.debugLineNum = 110;BA.debugLine="la_saldotot.Text = c.GetString(\"CAT_CL_TELEFONO\")"; _la_saldotot.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_TELEFONO"))); //BA.debugLineNum = 111;BA.debugLine="la_saldooper.Text = c.GetString(\"CAT_CL_EMAIL\")"; _la_saldooper.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_EMAIL"))); //BA.debugLineNum = 113;BA.debugLine="btAdmin.Initialize(\"BlueTeeth\")"; _btadmin.Initialize(ba,"BlueTeeth"); //BA.debugLineNum = 114;BA.debugLine="cmp20.Initialize(\"Printer\")"; _cmp20.Initialize("Printer"); //BA.debugLineNum = 115;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.SERVE"; _reqmanager._initialize /*String*/ (ba,this,_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ ); //BA.debugLineNum = 116;BA.debugLine="End Sub"; return ""; } public String _class_globals() throws Exception{ //BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals"; //BA.debugLineNum = 2;BA.debugLine="Private Root As B4XView 'ignore"; _root = new anywheresoftware.b4a.objects.B4XViewWrapper(); //BA.debugLineNum = 3;BA.debugLine="Private xui As XUI 'ignore"; _xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI(); //BA.debugLineNum = 4;BA.debugLine="Dim g As GPS"; _g = new anywheresoftware.b4a.gps.GPS(); //BA.debugLineNum = 5;BA.debugLine="Dim clie_id As String"; _clie_id = ""; //BA.debugLineNum = 6;BA.debugLine="Dim sDate,sTime As String"; _sdate = ""; _stime = ""; //BA.debugLineNum = 7;BA.debugLine="Dim usuario As String"; _usuario = ""; //BA.debugLineNum = 8;BA.debugLine="Dim cuenta As String"; _cuenta = ""; //BA.debugLineNum = 9;BA.debugLine="Dim btAdmin As BluetoothAdmin"; _btadmin = new anywheresoftware.b4a.objects.Serial.BluetoothAdmin(); //BA.debugLineNum = 10;BA.debugLine="Dim cmp20 As Serial"; _cmp20 = new anywheresoftware.b4a.objects.Serial(); //BA.debugLineNum = 11;BA.debugLine="Dim printer As TextWriter"; _printer = new anywheresoftware.b4a.objects.streams.File.TextWriterWrapper(); //BA.debugLineNum = 12;BA.debugLine="Dim PairedDevices As Map"; _paireddevices = new anywheresoftware.b4a.objects.collections.Map(); //BA.debugLineNum = 13;BA.debugLine="Dim L As List"; _l = new anywheresoftware.b4a.objects.collections.List(); //BA.debugLineNum = 14;BA.debugLine="Dim TAMANO As Int"; _tamano = 0; //BA.debugLineNum = 15;BA.debugLine="Dim ESPACIO As Int"; _espacio = 0; //BA.debugLineNum = 16;BA.debugLine="Dim BLANCO As String"; _blanco = ""; //BA.debugLineNum = 17;BA.debugLine="Dim impresoraConectada As Boolean = False"; _impresoraconectada = __c.False; //BA.debugLineNum = 18;BA.debugLine="Dim LONGITUD As String"; _longitud = ""; //BA.debugLineNum = 19;BA.debugLine="Dim LATITUD As String"; _latitud = ""; //BA.debugLineNum = 20;BA.debugLine="Dim NOMBRE As String"; _nombre = ""; //BA.debugLineNum = 21;BA.debugLine="Dim c As Cursor"; _c = new anywheresoftware.b4a.sql.SQL.CursorWrapper(); //BA.debugLineNum = 22;BA.debugLine="Dim s As Cursor"; _s = new anywheresoftware.b4a.sql.SQL.CursorWrapper(); //BA.debugLineNum = 23;BA.debugLine="Dim ListView1 As ListView"; _listview1 = new anywheresoftware.b4a.objects.ListViewWrapper(); //BA.debugLineNum = 24;BA.debugLine="Dim la_cuenta As Label"; _la_cuenta = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 25;BA.debugLine="Dim La_nombre As Label"; _la_nombre = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 26;BA.debugLine="Dim la_Calle As Label"; _la_calle = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 27;BA.debugLine="Dim la_numero As Label"; _la_numero = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 28;BA.debugLine="Dim la_nint As Label"; _la_nint = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 29;BA.debugLine="Dim la_edo As Label"; _la_edo = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 30;BA.debugLine="Dim la_pob As Label"; _la_pob = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 31;BA.debugLine="Dim la_col As Label"; _la_col = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 32;BA.debugLine="Dim la_cp As Label"; _la_cp = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 33;BA.debugLine="Dim la_zona As Label"; _la_zona = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 34;BA.debugLine="Dim gest As Button"; _gest = new anywheresoftware.b4a.objects.ButtonWrapper(); //BA.debugLineNum = 35;BA.debugLine="Dim la_saldotot As Label"; _la_saldotot = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 36;BA.debugLine="Dim la_saldooper As Label"; _la_saldooper = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 37;BA.debugLine="Dim reqManager As DBRequestManager"; _reqmanager = new reparto_mazapa.keymon.lat.dbrequestmanager(); //BA.debugLineNum = 38;BA.debugLine="Dim b_noEntrega As Button"; _b_noentrega = new anywheresoftware.b4a.objects.ButtonWrapper(); //BA.debugLineNum = 39;BA.debugLine="Dim Label10 As Label"; _label10 = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 40;BA.debugLine="Dim Label11 As Label"; _label11 = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 41;BA.debugLine="Dim d As Cursor"; _d = new anywheresoftware.b4a.sql.SQL.CursorWrapper(); //BA.debugLineNum = 42;BA.debugLine="Dim Tar As Button"; _tar = new anywheresoftware.b4a.objects.ButtonWrapper(); //BA.debugLineNum = 43;BA.debugLine="Private L_QR As Label"; _l_qr = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 44;BA.debugLine="Private BT_QR As Button"; _bt_qr = new anywheresoftware.b4a.objects.ButtonWrapper(); //BA.debugLineNum = 45;BA.debugLine="Dim Printer1 As EscPosPrinter"; _printer1 = new reparto_mazapa.keymon.lat.escposprinter(); //BA.debugLineNum = 46;BA.debugLine="Dim la_comm As Label"; _la_comm = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 47;BA.debugLine="Dim la_actdte As Label"; _la_actdte = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 48;BA.debugLine="Dim la_usuario As Label"; _la_usuario = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 49;BA.debugLine="Dim la_resultado As Label"; _la_resultado = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 50;BA.debugLine="Dim l_entre1 As Label"; _l_entre1 = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 51;BA.debugLine="Dim l_entre2 As Label"; _l_entre2 = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 52;BA.debugLine="Dim l_atiende As Label"; _l_atiende = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 53;BA.debugLine="Dim l_atiende2 As Label"; _l_atiende2 = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 54;BA.debugLine="Dim DATOS As Button"; _datos = new anywheresoftware.b4a.objects.ButtonWrapper(); //BA.debugLineNum = 55;BA.debugLine="Dim Guardar As Button"; _guardar = new anywheresoftware.b4a.objects.ButtonWrapper(); //BA.debugLineNum = 56;BA.debugLine="Dim NUEVO As Button"; _nuevo = new anywheresoftware.b4a.objects.ButtonWrapper(); //BA.debugLineNum = 57;BA.debugLine="Private l_total As Label"; _l_total = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 58;BA.debugLine="Private HIST As Button"; _hist = new anywheresoftware.b4a.objects.ButtonWrapper(); //BA.debugLineNum = 59;BA.debugLine="Dim PASA_IMP As String"; _pasa_imp = ""; //BA.debugLineNum = 60;BA.debugLine="Private B_IMP As Button"; _b_imp = new anywheresoftware.b4a.objects.ButtonWrapper(); //BA.debugLineNum = 61;BA.debugLine="Dim total_cliente As String"; _total_cliente = ""; //BA.debugLineNum = 62;BA.debugLine="Dim CREDITO As String"; _credito = ""; //BA.debugLineNum = 63;BA.debugLine="Private p_principal As Panel"; _p_principal = new anywheresoftware.b4a.objects.PanelWrapper(); //BA.debugLineNum = 64;BA.debugLine="Private B_PASO2 As Button"; _b_paso2 = new anywheresoftware.b4a.objects.ButtonWrapper(); //BA.debugLineNum = 65;BA.debugLine="Private L_CANT As Label"; _l_cant = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 66;BA.debugLine="Dim errorImpresora As Int = 0"; _errorimpresora = (int) (0); //BA.debugLineNum = 67;BA.debugLine="Dim banderaimp As Int"; _banderaimp = 0; //BA.debugLineNum = 68;BA.debugLine="Private l_credi As Label"; _l_credi = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 69;BA.debugLine="Private l_pagare As Label"; _l_pagare = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 70;BA.debugLine="Private l_montopag As Label"; _l_montopag = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 71;BA.debugLine="Private l_efectivo As Label"; _l_efectivo = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 72;BA.debugLine="Private l_montoefec As Label"; _l_montoefec = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 73;BA.debugLine="End Sub"; return ""; } public String _datos_click() throws Exception{ //BA.debugLineNum = 385;BA.debugLine="Sub DATOS_Click"; //BA.debugLineNum = 387;BA.debugLine="End Sub"; return ""; } public String _gest_click() throws Exception{ //BA.debugLineNum = 315;BA.debugLine="Sub gest_Click"; //BA.debugLineNum = 316;BA.debugLine="B_IMP_Click"; _b_imp_click(); //BA.debugLineNum = 317;BA.debugLine="banderaimp = 1"; _banderaimp = (int) (1); //BA.debugLineNum = 318;BA.debugLine="End Sub"; return ""; } public String _gps_locationchanged(anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{ //BA.debugLineNum = 300;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)"; //BA.debugLineNum = 303;BA.debugLine="Dim sDate,sTime As String"; _sdate = ""; _stime = ""; //BA.debugLineNum = 304;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\""; __c.DateTime.setDateFormat("MM/dd/yyyy"); //BA.debugLineNum = 305;BA.debugLine="sDate=DateTime.Date(DateTime.Now)"; _sdate = __c.DateTime.Date(__c.DateTime.getNow()); //BA.debugLineNum = 306;BA.debugLine="sTime=DateTime.Time(DateTime.Now)"; _stime = __c.DateTime.Time(__c.DateTime.getNow()); //BA.debugLineNum = 307;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM HIST_GPS\")"; _starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM HIST_GPS"); //BA.debugLineNum = 308;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO HIST_GPS"; _starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO HIST_GPS (HGDATE, HGLAT, HGLON) VALUES(?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_sdate+_stime),(Object)(_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ )})); //BA.debugLineNum = 309;BA.debugLine="End Sub"; return ""; } public String _guardado() throws Exception{ String _ruta = ""; String _rutapre = ""; String _fechaprev = ""; String _rutaactualizar = ""; anywheresoftware.b4a.sql.SQL.CursorWrapper _rut = null; anywheresoftware.b4a.sql.SQL.CursorWrapper _mandamapa = null; //BA.debugLineNum = 320;BA.debugLine="Sub Guardado"; //BA.debugLineNum = 321;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\""; __c.DateTime.setDateFormat("MM/dd/yyyy"); //BA.debugLineNum = 322;BA.debugLine="DateTime.TimeFormat=\"HHmmss\""; __c.DateTime.setTimeFormat("HHmmss"); //BA.debugLineNum = 323;BA.debugLine="sDate=DateTime.Date(DateTime.Now)"; _sdate = __c.DateTime.Date(__c.DateTime.getNow()); //BA.debugLineNum = 324;BA.debugLine="sTime=DateTime.Time(DateTime.Now)"; _stime = __c.DateTime.Time(__c.DateTime.getNow()); //BA.debugLineNum = 325;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CUENTA from cuen"; _c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CUENTA from cuentaa"))); //BA.debugLineNum = 326;BA.debugLine="c.Position = 0"; _c.setPosition((int) (0)); //BA.debugLineNum = 327;BA.debugLine="cuenta = c.GetString(\"CUENTA\")"; _cuenta = _c.GetString("CUENTA"); //BA.debugLineNum = 328;BA.debugLine="c=Starter.skmt.ExecQuery(\"select usuario from usu"; _c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select usuario from usuarioa"))); //BA.debugLineNum = 329;BA.debugLine="c.Position = 0"; _c.setPosition((int) (0)); //BA.debugLineNum = 330;BA.debugLine="usuario = c.GetString(\"USUARIO\")"; _usuario = _c.GetString("USUARIO"); //BA.debugLineNum = 331;BA.debugLine="c.Close"; _c.Close(); //BA.debugLineNum = 332;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT RUTAA FROM RUT"; _d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT RUTAA FROM RUTAA"))); //BA.debugLineNum = 333;BA.debugLine="d.Position = 0"; _d.setPosition((int) (0)); //BA.debugLineNum = 334;BA.debugLine="Dim ruta As String = d.GetString(\"RUTAA\")"; _ruta = _d.GetString("RUTAA"); //BA.debugLineNum = 335;BA.debugLine="d.Close"; _d.Close(); //BA.debugLineNum = 336;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT CAT_CL_RUTA FR"; _d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT CAT_CL_RUTA FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)"))); //BA.debugLineNum = 337;BA.debugLine="d.Position = 0"; _d.setPosition((int) (0)); //BA.debugLineNum = 338;BA.debugLine="Dim rutapre As String = d.GetString(\"CAT_CL_RUTA\""; _rutapre = _d.GetString("CAT_CL_RUTA"); //BA.debugLineNum = 339;BA.debugLine="d.Close"; _d.Close(); //BA.debugLineNum = 340;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT HVD_FECHA FROM"; _d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT HVD_FECHA FROM HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)"))); //BA.debugLineNum = 341;BA.debugLine="d.Position = 0"; _d.setPosition((int) (0)); //BA.debugLineNum = 342;BA.debugLine="Dim fechaprev As String = d.GetString(\"HVD_FECHA\""; _fechaprev = _d.GetString("HVD_FECHA"); //BA.debugLineNum = 343;BA.debugLine="d.Close"; _d.Close(); //BA.debugLineNum = 345;BA.debugLine="Dim rutaactualizar As String"; _rutaactualizar = ""; //BA.debugLineNum = 346;BA.debugLine="Dim rut As Cursor = Starter.skmt.ExecQuery(\"SELEC"; _rut = new anywheresoftware.b4a.sql.SQL.CursorWrapper(); _rut = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT CAT_CL_RUTA FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)"))); //BA.debugLineNum = 347;BA.debugLine="If rut.RowCount > 0 Then"; if (_rut.getRowCount()>0) { //BA.debugLineNum = 348;BA.debugLine="rut.Position = 0"; _rut.setPosition((int) (0)); //BA.debugLineNum = 349;BA.debugLine="rutaactualizar = rut.GetString(\"CAT_CL_RUTA\")"; _rutaactualizar = _rut.GetString("CAT_CL_RUTA"); }; //BA.debugLineNum = 352;BA.debugLine="Starter.skmt.ExecNonQuery($\"DELETE FROM NOVENTA W"; _starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("DELETE FROM NOVENTA WHERE NV_CLIENTE IN (select cuenta from cuentaa) AND NV_RUTA ='"+__c.SmartStringFormatter("",(Object)(_rutaactualizar))+"' ")); //BA.debugLineNum = 353;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO NOVENTA ("; _starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO NOVENTA (NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON,NV_RUTA) VALUES(?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cuenta),(Object)(_sdate+" "+_stime),(Object)(_usuario),(Object)("ENTREGA"),(Object)("ENTREGA COMPLETA"),(Object)(_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_rutaactualizar)})); //BA.debugLineNum = 354;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO REPARTO_G"; _starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO REPARTO_GEO (CLIENTE, USUARIO, FECHA_PUNTEO, LATITUD, LONGITUD, ALMACEN, RUTA_REPARTO, RUTA_PREV, FECHA_PREVENTA, TIPO,ENVIO) VALUES(?,?,?,?,?,?,?,?,?,?,0)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_la_cuenta.getText(),_usuario,_sdate+" "+_stime,_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ,_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ ,_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._almacen /*String*/ ,_ruta,_rutapre,_fechaprev,"ENTREGADO"})); //BA.debugLineNum = 355;BA.debugLine="Starter.skmt.ExecNonQuery($\"UPDATE kmt_info set g"; _starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("UPDATE kmt_info set gestion = 2, HORAENT = '"+__c.SmartStringFormatter("",(Object)(_sdate+" "+_stime))+"' where CAT_CL_CODIGO In (select cuenta from cuentaa) and CAT_CL_RUTA = '"+__c.SmartStringFormatter("",(Object)(_rutaactualizar))+"' ")); //BA.debugLineNum = 356;BA.debugLine="Starter.skmt.ExecNonQuery(\"update HIST_VENTAS SET"; _starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("update HIST_VENTAS SET HVD_ESTATUS = 1 WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)"); //BA.debugLineNum = 357;BA.debugLine="mandaPendientesreparto"; _mandapendientesreparto(); //BA.debugLineNum = 360;BA.debugLine="Dim mandamapa As Cursor = Starter.skmt.ExecQuery("; _mandamapa = new anywheresoftware.b4a.sql.SQL.CursorWrapper(); _mandamapa = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT * FROM kmt_info WHERE gestion = 0"))); //BA.debugLineNum = 361;BA.debugLine="If mandamapa.RowCount > 0 Then"; if (_mandamapa.getRowCount()>0) { //BA.debugLineNum = 362;BA.debugLine="StartActivity(MAPA_RUTAS)"; __c.StartActivity(ba,(Object)(_mapa_rutas.getObject())); }else if(_mandamapa.getRowCount()==0) { //BA.debugLineNum = 364;BA.debugLine="B4XPages.ShowPage(\"Principal\")"; _b4xpages._showpage /*String*/ (ba,"Principal"); }; //BA.debugLineNum = 366;BA.debugLine="End Sub"; return ""; } public String _guardar_click() throws Exception{ anywheresoftware.b4a.sql.SQL.CursorWrapper _mandamapa = null; //BA.debugLineNum = 389;BA.debugLine="Sub Guardar_Click"; //BA.debugLineNum = 390;BA.debugLine="Dim mandamapa As Cursor = Starter.skmt.ExecQuery("; _mandamapa = new anywheresoftware.b4a.sql.SQL.CursorWrapper(); _mandamapa = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT * FROM kmt_info WHERE gestion = 0"))); //BA.debugLineNum = 391;BA.debugLine="If mandamapa.RowCount > 0 Then"; if (_mandamapa.getRowCount()>0) { //BA.debugLineNum = 392;BA.debugLine="StartActivity(MAPA_RUTAS)"; __c.StartActivity(ba,(Object)(_mapa_rutas.getObject())); }else if(_mandamapa.getRowCount()==0) { //BA.debugLineNum = 394;BA.debugLine="B4XPages.ShowPage(\"Principal\")"; _b4xpages._showpage /*String*/ (ba,"Principal"); }; //BA.debugLineNum = 396;BA.debugLine="End Sub"; return ""; } public String _hist_click() throws Exception{ //BA.debugLineNum = 402;BA.debugLine="Sub HIST_Click"; //BA.debugLineNum = 406;BA.debugLine="B4XPages.MainPage.detalleVenta.prodsMap.Initializ"; _b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._detalleventa /*reparto_mazapa.keymon.lat.c_detalleventa*/ ._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize(); //BA.debugLineNum = 408;BA.debugLine="B4XPages.ShowPage(\"DetalleVenta\")"; _b4xpages._showpage /*String*/ (ba,"DetalleVenta"); //BA.debugLineNum = 409;BA.debugLine="End Sub"; return ""; } public Object _initialize(anywheresoftware.b4a.BA _ba) throws Exception{ innerInitialize(_ba); //BA.debugLineNum = 76;BA.debugLine="Public Sub Initialize As Object"; //BA.debugLineNum = 77;BA.debugLine="Return Me"; if (true) return this; //BA.debugLineNum = 78;BA.debugLine="End Sub"; return null; } public String _jobdone(reparto_mazapa.keymon.lat.httpjob _job) throws Exception{ reparto_mazapa.keymon.lat.dbrequestmanager._dbresult _resultado = null; String _cliente = ""; Object[] _records = null; String _k = ""; //BA.debugLineNum = 943;BA.debugLine="Sub JobDone(Job As HttpJob)"; //BA.debugLineNum = 944;BA.debugLine="Log(Job.Success)"; __c.LogImpl("29109505",BA.ObjectToString(_job._success /*boolean*/ ),0); //BA.debugLineNum = 945;BA.debugLine="If Job.Success = False Then"; if (_job._success /*boolean*/ ==__c.False) { }else { //BA.debugLineNum = 948;BA.debugLine="LogColor(\"JobDone: '\" & reqManager.HandleJob(Job"; __c.LogImpl("29109509","JobDone: '"+BA.ObjectToString(_reqmanager._handlejob /*reparto_mazapa.keymon.lat.dbrequestmanager._dbresult*/ (_job).Tag /*Object*/ )+"' - Registros: "+BA.NumberToString(_reqmanager._handlejob /*reparto_mazapa.keymon.lat.dbrequestmanager._dbresult*/ (_job).Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),__c.Colors.Green); //BA.debugLineNum = 949;BA.debugLine="If Job.JobName = \"DBRequest\" Then"; if ((_job._jobname /*String*/ ).equals("DBRequest")) { //BA.debugLineNum = 950;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo"; _resultado = _reqmanager._handlejob /*reparto_mazapa.keymon.lat.dbrequestmanager._dbresult*/ (_job); //BA.debugLineNum = 951;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"ins_REPART"; if ((BA.ObjectToString(_resultado.Tag /*Object*/ )).indexOf("ins_REPARTOPendientes_head_")>-1) { //BA.debugLineNum = 952;BA.debugLine="Private cliente As String= resultado.Tag"; _cliente = BA.ObjectToString(_resultado.Tag /*Object*/ ); //BA.debugLineNum = 953;BA.debugLine="cliente = cliente.SubString(cliente.IndexOf(\"_"; _cliente = _cliente.substring((int) (_cliente.indexOf("_")+24)); //BA.debugLineNum = 954;BA.debugLine="Log($\"Cliente1:${cliente}\"$)"; __c.LogImpl("29109515",("Cliente1:"+__c.SmartStringFormatter("",(Object)(_cliente))+""),0); //BA.debugLineNum = 955;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update REPARTO_GEO"; _starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update REPARTO_GEO SET ENVIO = ? WHERE CLIENTE = ? AND ENVIO <> ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{"1",_cliente,"1"})); //BA.debugLineNum = 956;BA.debugLine="For Each records() As Object In resultado.Rows"; { final anywheresoftware.b4a.BA.IterableList group12 = _resultado.Rows /*anywheresoftware.b4a.objects.collections.List*/ ; final int groupLen12 = group12.getSize() ;int index12 = 0; ; for (; index12 < groupLen12;index12++){ _records = (Object[])(group12.Get(index12)); //BA.debugLineNum = 957;BA.debugLine="For Each k As String In resultado.Columns.Key"; { final anywheresoftware.b4a.BA.IterableList group13 = _resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys(); final int groupLen13 = group13.getSize() ;int index13 = 0; ; for (; index13 < groupLen13;index13++){ _k = BA.ObjectToString(group13.Get(index13)); //BA.debugLineNum = 958;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & record"; __c.LogImpl("29109519",BA.ObjectToString(_resultado.Tag /*Object*/ )+": "+_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0); } }; } }; }; }; //BA.debugLineNum = 963;BA.debugLine="Job.Release"; _job._release /*String*/ (); }; //BA.debugLineNum = 966;BA.debugLine="End Sub"; return ""; } public String _listview1_itemlongclick(int _position,Object _value) throws Exception{ //BA.debugLineNum = 311;BA.debugLine="Sub ListView1_ItemLongClick (Position As Int, Valu"; //BA.debugLineNum = 313;BA.debugLine="End Sub"; return ""; } public String _mandapendientesreparto() throws Exception{ int _i = 0; reparto_mazapa.keymon.lat.dbrequestmanager._dbcommand _cmd = null; //BA.debugLineNum = 923;BA.debugLine="Sub mandaPendientesreparto"; //BA.debugLineNum = 924;BA.debugLine="c=Starter.skmt.ExecQuery(\"SELECT CLIENTE, USUARI"; _c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT CLIENTE, USUARIO, FECHA_PUNTEO, LATITUD, LONGITUD, ALMACEN, RUTA_REPARTO, RUTA_PREV, FECHA_PREVENTA, MOTIVO, COMENTARIO,TIPO FROM REPARTO_GEO where ENVIO <> 1"))); //BA.debugLineNum = 925;BA.debugLine="Log($\"REPARTO_Cliente PENDIENTE: ${c.RowCount}\"$)"; __c.LogImpl("29043970",("REPARTO_Cliente PENDIENTE: "+__c.SmartStringFormatter("",(Object)(_c.getRowCount()))+""),0); //BA.debugLineNum = 926;BA.debugLine="If c.RowCount>0 Then"; if (_c.getRowCount()>0) { //BA.debugLineNum = 927;BA.debugLine="For i=0 To c.RowCount -1"; { final int step4 = 1; final int limit4 = (int) (_c.getRowCount()-1); _i = (int) (0) ; for (;_i <= limit4 ;_i = _i + step4 ) { //BA.debugLineNum = 928;BA.debugLine="c.Position=i"; _c.setPosition(_i); //BA.debugLineNum = 930;BA.debugLine="Dim cmd As DBCommand"; _cmd = new reparto_mazapa.keymon.lat.dbrequestmanager._dbcommand(); //BA.debugLineNum = 931;BA.debugLine="cmd.Initialize"; _cmd.Initialize(); //BA.debugLineNum = 933;BA.debugLine="cmd.Parameters = Array As Object(c.GetString(\"C"; _cmd.Parameters /*Object[]*/ = new Object[]{(Object)(_c.GetString("CLIENTE")),(Object)(_c.GetString("USUARIO")),(Object)(_c.GetString("FECHA_PUNTEO")),(Object)(_c.GetString("LATITUD")),(Object)(_c.GetString("LONGITUD")),(Object)(_c.GetString("ALMACEN")),(Object)(_c.GetString("RUTA_REPARTO")),(Object)(_c.GetString("RUTA_PREV")),(Object)(_c.GetString("FECHA_PREVENTA")),(Object)(_c.GetString("MOTIVO")),(Object)(_c.GetString("COMENTARIO")),(Object)(_c.GetString("TIPO"))}; //BA.debugLineNum = 934;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"ins_REPARTOPe"; _reqmanager._executecommand /*String*/ (_cmd,(Object)(("ins_REPARTOPendientes_head_"+__c.SmartStringFormatter("",(Object)(_c.GetString("CLIENTE")))+""))); } }; }; //BA.debugLineNum = 938;BA.debugLine="c.Close"; _c.Close(); //BA.debugLineNum = 939;BA.debugLine="End Sub"; return ""; } public String _nuevo_click() throws Exception{ //BA.debugLineNum = 398;BA.debugLine="Sub NUEVO_Click"; //BA.debugLineNum = 399;BA.debugLine="StartActivity(MAPA_CLIENTE)"; __c.StartActivity(ba,(Object)(_mapa_cliente.getObject())); //BA.debugLineNum = 400;BA.debugLine="End Sub"; return ""; } public String _printer_connected(boolean _success) throws Exception{ //BA.debugLineNum = 849;BA.debugLine="Sub Printer_Connected (Success As Boolean)"; //BA.debugLineNum = 850;BA.debugLine="If Success Then"; if (_success) { //BA.debugLineNum = 851;BA.debugLine="B_IMP.Enabled = True"; _b_imp.setEnabled(__c.True); //BA.debugLineNum = 852;BA.debugLine="PASA_IMP = \"1\""; _pasa_imp = "1"; }else { //BA.debugLineNum = 854;BA.debugLine="B_IMP.Enabled = False"; _b_imp.setEnabled(__c.False); //BA.debugLineNum = 855;BA.debugLine="If Msgbox2(\"\", \"Printer Error\",\"Reprint\",\"Cancel"; if (__c.Msgbox2(BA.ObjectToCharSequence(""),BA.ObjectToCharSequence("Printer Error"),"Reprint","Cancel","",(android.graphics.Bitmap)(__c.Null),ba)==__c.DialogResponse.POSITIVE) { //BA.debugLineNum = 856;BA.debugLine="StartPrinter"; _startprinter(); }; }; //BA.debugLineNum = 859;BA.debugLine="End Sub"; return ""; } public String _printer1_connected(boolean _success) throws Exception{ //BA.debugLineNum = 828;BA.debugLine="Sub Printer1_Connected (Success As Boolean)"; //BA.debugLineNum = 830;BA.debugLine="If Success Then"; if (_success) { //BA.debugLineNum = 831;BA.debugLine="ToastMessageShow(\"Impresora conectada\", False)"; __c.ToastMessageShow(BA.ObjectToCharSequence("Impresora conectada"),__c.False); //BA.debugLineNum = 832;BA.debugLine="Starter.skmt.ExecNonQuery2(\"delete from CAT_VARI"; _starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("MACIMP")})); //BA.debugLineNum = 833;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO CAT_VARI"; _starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("MACIMP"),(Object)(_starter._mac_impresora /*String*/ )})); //BA.debugLineNum = 834;BA.debugLine="LogColor(\"Impresora conectada\", Colors.Green)"; __c.LogImpl("28781830","Impresora conectada",__c.Colors.Green); //BA.debugLineNum = 836;BA.debugLine="impresoraConectada = True"; _impresoraconectada = __c.True; }else { //BA.debugLineNum = 840;BA.debugLine="LogColor(\"Error conectando la impresora\", Colors"; __c.LogImpl("28781836","Error conectando la impresora",__c.Colors.Red); //BA.debugLineNum = 841;BA.debugLine="errorImpresora = errorImpresora + 1"; _errorimpresora = (int) (_errorimpresora+1); //BA.debugLineNum = 842;BA.debugLine="If errorImpresora > 1 Then"; if (_errorimpresora>1) { //BA.debugLineNum = 843;BA.debugLine="Starter.MAC_IMPRESORA = \"0\""; _starter._mac_impresora /*String*/ = "0"; //BA.debugLineNum = 844;BA.debugLine="errorImpresora = 0"; _errorimpresora = (int) (0); }; }; //BA.debugLineNum = 847;BA.debugLine="End Sub"; return ""; } public String _startprinter() throws Exception{ int _resimp = 0; int _i = 0; //BA.debugLineNum = 861;BA.debugLine="Sub StartPrinter"; //BA.debugLineNum = 862;BA.debugLine="Dim PairedDevices As Map"; _paireddevices = new anywheresoftware.b4a.objects.collections.Map(); //BA.debugLineNum = 863;BA.debugLine="Dim L As List"; _l = new anywheresoftware.b4a.objects.collections.List(); //BA.debugLineNum = 864;BA.debugLine="Dim resimp As Int"; _resimp = 0; //BA.debugLineNum = 865;BA.debugLine="ToastMessageShow(\"Printing.....\",True)"; __c.ToastMessageShow(BA.ObjectToCharSequence("Printing....."),__c.True); //BA.debugLineNum = 866;BA.debugLine="PairedDevices.Initialize"; _paireddevices.Initialize(); //BA.debugLineNum = 867;BA.debugLine="Try"; try { //BA.debugLineNum = 868;BA.debugLine="PairedDevices = cmp20.GetPairedDevices"; _paireddevices = _cmp20.GetPairedDevices(); } catch (Exception e9) { ba.setLastException(e9); //BA.debugLineNum = 870;BA.debugLine="Msgbox(\"Getting Paired Devices\",\"Printer Error\")"; __c.Msgbox(BA.ObjectToCharSequence("Getting Paired Devices"),BA.ObjectToCharSequence("Printer Error"),ba); //BA.debugLineNum = 871;BA.debugLine="printer.Close"; _printer.Close(); //BA.debugLineNum = 872;BA.debugLine="cmp20.Disconnect"; _cmp20.Disconnect(); }; //BA.debugLineNum = 874;BA.debugLine="If PairedDevices.Size = 0 Then"; if (_paireddevices.getSize()==0) { //BA.debugLineNum = 875;BA.debugLine="Msgbox(\"Error Connecting to Printer - Printer No"; __c.Msgbox(BA.ObjectToCharSequence("Error Connecting to Printer - Printer Not Found"),BA.ObjectToCharSequence(""),ba); //BA.debugLineNum = 876;BA.debugLine="Return"; if (true) return ""; }; //BA.debugLineNum = 878;BA.debugLine="If PairedDevices.Size = 1 Then"; if (_paireddevices.getSize()==1) { //BA.debugLineNum = 879;BA.debugLine="Try"; try { //BA.debugLineNum = 881;BA.debugLine="cmp20.ConnectInsecure(btAdmin,PairedDevices.Get"; _cmp20.ConnectInsecure(ba,_btadmin,BA.ObjectToString(_paireddevices.Get(_paireddevices.GetKeyAt((int) (0)))),(int) (1)); } catch (Exception e21) { ba.setLastException(e21); //BA.debugLineNum = 884;BA.debugLine="Msgbox(\"Connecting\",\"Printer Error\") 'ignore"; __c.Msgbox(BA.ObjectToCharSequence("Connecting"),BA.ObjectToCharSequence("Printer Error"),ba); //BA.debugLineNum = 885;BA.debugLine="printer.Close"; _printer.Close(); //BA.debugLineNum = 886;BA.debugLine="cmp20.Disconnect"; _cmp20.Disconnect(); }; }else { //BA.debugLineNum = 889;BA.debugLine="L.Initialize"; _l.Initialize(); //BA.debugLineNum = 890;BA.debugLine="For i = 0 To PairedDevices.Size - 1"; { final int step27 = 1; final int limit27 = (int) (_paireddevices.getSize()-1); _i = (int) (0) ; for (;_i <= limit27 ;_i = _i + step27 ) { //BA.debugLineNum = 891;BA.debugLine="L.Add(PairedDevices.GetKeyAt(i))"; _l.Add(_paireddevices.GetKeyAt(_i)); } }; //BA.debugLineNum = 893;BA.debugLine="resimp = InputList(L, \"Choose device\", -1) 'igno"; _resimp = __c.InputList(_l,BA.ObjectToCharSequence("Choose device"),(int) (-1),ba); //BA.debugLineNum = 894;BA.debugLine="If resimp <> DialogResponse.CANCEL Then"; if (_resimp!=__c.DialogResponse.CANCEL) { //BA.debugLineNum = 895;BA.debugLine="cmp20.Connect(PairedDevices.Get(L.Get(resimp)))"; _cmp20.Connect(ba,BA.ObjectToString(_paireddevices.Get(_l.Get(_resimp)))); }; }; //BA.debugLineNum = 898;BA.debugLine="End Sub"; return ""; } public String _tar_click() throws Exception{ //BA.debugLineNum = 380;BA.debugLine="Sub Tar_Click"; //BA.debugLineNum = 382;BA.debugLine="B4XPages.ShowPage(\"Productos\")"; _b4xpages._showpage /*String*/ (ba,"Productos"); //BA.debugLineNum = 383;BA.debugLine="End Sub"; return ""; } public Object callSub(String sub, Object sender, Object[] args) throws Exception { BA.senderHolder.set(sender); if (BA.fastSubCompare(sub, "B4XPAGE_CREATED")) return _b4xpage_created((anywheresoftware.b4a.objects.B4XViewWrapper) args[0]); if (BA.fastSubCompare(sub, "GPS_LOCATIONCHANGED")) return _gps_locationchanged((anywheresoftware.b4a.gps.LocationWrapper) args[0]); if (BA.fastSubCompare(sub, "JOBDONE")) return _jobdone((reparto_mazapa.keymon.lat.httpjob) args[0]); return BA.SubDelegator.SubNotFound; } }