package reparto_izca.keymon.lat;


import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;

public class c_principal extends B4AClass.ImplB4AClass implements BA.SubDelegator{
    private static java.util.HashMap<String, java.lang.reflect.Method> htSubs;
    private void innerInitialize(BA _ba) throws Exception {
        if (ba == null) {
            ba = new BA(_ba, this, htSubs, "reparto_izca.keymon.lat.c_principal");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", reparto_izca.keymon.lat.c_principal.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 reparto_izca.keymon.lat.dbrequestmanager _reqmanager = null;
public String _conectado = "";
public anywheresoftware.b4a.objects.Timer _t1 = null;
public anywheresoftware.b4a.keywords.StringBuilderWrapper _sb = null;
public anywheresoftware.b4a.phone.Phone _phone = null;
public anywheresoftware.b4a.objects.ButtonWrapper _trabajar = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _d = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _b = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _e = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _f = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _f1 = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _f2 = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _f3 = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _f4 = null;
public anywheresoftware.b4a.objects.ListViewWrapper _lv = null;
public anywheresoftware.b4a.objects.ButtonWrapper _cargar = null;
public anywheresoftware.b4a.objects.ButtonWrapper _pendiente = null;
public byte[] _foto1 = null;
public String _usuario = "";
public anywheresoftware.b4a.objects.ButtonWrapper _connecta = null;
public String _conn = "";
public anywheresoftware.b4a.objects.ButtonWrapper _subir = null;
public reparto_izca.keymon.lat.dbrequestmanager._dbcommand _cmd = null;
public int _tope = 0;
public int _count_clie = 0;
public String _fecha = "";
public double _drop = 0;
public double _efectiva = 0;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _l = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_aliquidar = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_cuantosc = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_montosalida = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_ctast = null;
public anywheresoftware.b4a.objects.ButtonWrapper _busca = null;
public String _cuantos = "";
public anywheresoftware.b4a.objects.LabelWrapper _l_cuantosn = null;
public anywheresoftware.b4a.objects.EditTextWrapper _e_ruta = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_porvisitar = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_mapa = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_ruta = null;
public String _almacen = "";
public anywheresoftware.b4a.objects.ImageViewWrapper _img2 = null;
public String _listo1 = "";
public String _listo2 = "";
public String _listo3 = "";
public String _listo4 = "";
public String _listo5 = "";
public String _ejecutando = "";
public String _res = "";
public String _inve = "";
public String _cuantos_pedidosc = "";
public String _cuantos_pedido = "";
public String _cuantos_noventa = "";
public String _datos_iguales = "";
public anywheresoftware.b4a.phone.Phone.PhoneId _p = null;
public String _imei = "";
public anywheresoftware.b4a.objects.ButtonWrapper _inv = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_montoe = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_clieprod = null;
public anywheresoftware.b4a.objects.ListViewWrapper _listview1 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_regresa = null;
public anywheresoftware.b4a.objects.PanelWrapper _panel1 = null;
public String _estatus = "";
public int[] _batterystatus = null;
public reparto_izca.keymon.lat.batteryutilities _bu = null;
public String _ruta_t = "";
public anywheresoftware.b4a.objects.collections.List _reqs = null;
public anywheresoftware.b4a.objects.ButtonWrapper _btn_ubicar_ru = null;
public String _cargo = "";
public anywheresoftware.b4a.objects.PanelWrapper _p_principal = null;
public anywheresoftware.b4a.objects.IME _ime = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_tabulador = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_rutasp = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_rechazo = null;
public anywheresoftware.b4a.objects.LabelWrapper _label9 = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _cp = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_check = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_rechazos = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_prod = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_regreso = null;
public anywheresoftware.b4a.objects.ListViewWrapper _lv_prod_prin = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_venta_emp = null;
public anywheresoftware.b4a.objects.Timer _t8 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_carga = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_carga = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_carga = null;
public anywheresoftware.b4a.objects.ProgressBarWrapper _pb_carga = null;
public anywheresoftware.b4a.objects.ProgressBarWrapper _pb_carga2 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_carga2 = null;
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 int _tamano = 0;
public int _espacio = 0;
public String _blanco = "";
public reparto_izca.keymon.lat.escposprinter _printer1 = null;
public boolean _impresoraconectada = false;
public int _errorimpresora = 0;
public anywheresoftware.b4a.objects.ImageViewWrapper _inventario = null;
public String _pasa_imp = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_imp_inventario = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _s = null;
public boolean _printerisready = false;
public long _lastconnectionattempt = 0L;
public anywheresoftware.b4a.objects.ButtonWrapper _b_impresion_rec = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_clientes_visit = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_clientes_recha = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_clientes_visitados = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_numtickets = null;
public b4a.example.dateutils _dateutils = null;
public reparto_izca.keymon.lat.main _main = null;
public reparto_izca.keymon.lat.appupdater _appupdater = null;
public reparto_izca.keymon.lat.foto _foto = null;
public reparto_izca.keymon.lat.mapa_cliente _mapa_cliente = null;
public reparto_izca.keymon.lat.mapa_rutas _mapa_rutas = null;
public reparto_izca.keymon.lat.starter _starter = null;
public reparto_izca.keymon.lat.subs _subs = null;
public reparto_izca.keymon.lat.tracker _tracker = null;
public reparto_izca.keymon.lat.newinst2 _newinst2 = null;
public reparto_izca.keymon.lat.b4xpages _b4xpages = null;
public reparto_izca.keymon.lat.b4xcollections _b4xcollections = null;
public reparto_izca.keymon.lat.httputils2service _httputils2service = null;
public reparto_izca.keymon.lat.xuiviewsutils _xuiviewsutils = null;
public String  _b_carga_click() throws Exception{
anywheresoftware.b4a.sql.SQL.CursorWrapper _checagestion = null;
 //BA.debugLineNum = 2563;BA.debugLine="Private Sub B_carga_Click";
 //BA.debugLineNum = 2564;BA.debugLine="If L_carga.Text = \"LISTO\" And l_carga2.Text = \"LI";
if ((_l_carga.getText()).equals("LISTO") && (_l_carga2.getText()).equals("LISTO")) { 
 //BA.debugLineNum = 2565;BA.debugLine="P_carga.Visible = False";
_p_carga.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 2567;BA.debugLine="Dim checagestion As Cursor = Starter.skmt.ExecQu";
_checagestion = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_checagestion = (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 NOVENTA")));
 //BA.debugLineNum = 2568;BA.debugLine="If checagestion.RowCount = 0 Then";
if (_checagestion.getRowCount()==0) { 
 //BA.debugLineNum = 2569;BA.debugLine="P_carga.Visible = False";
_p_carga.setVisible(__c.False);
 //BA.debugLineNum = 2570;BA.debugLine="e_ruta.Text = \"\"";
_e_ruta.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 2571;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from PICK_CIE";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PICK_CIEGO");
 //BA.debugLineNum = 2572;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from pedido_c";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente");
 //BA.debugLineNum = 2573;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from PAGARES\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PAGARES");
 //BA.debugLineNum = 2574;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CHECADO_";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CHECADO_CHECK");
 //BA.debugLineNum = 2575;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CHECKLIS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CHECKLIST2");
 //BA.debugLineNum = 2576;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from pedido\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido");
 //BA.debugLineNum = 2577;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from noventa\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from noventa");
 //BA.debugLineNum = 2578;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from clie_act";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from clie_act");
 //BA.debugLineNum = 2579;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from kmt_info";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from kmt_info");
 //BA.debugLineNum = 2580;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cat_guna";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod");
 //BA.debugLineNum = 2581;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cat_guna";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod3");
 //BA.debugLineNum = 2582;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CAT_DETA";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CAT_DETALLES_PAQ");
 //BA.debugLineNum = 2583;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from HIST_VEN";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_VENTAS");
 //BA.debugLineNum = 2584;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from REPARTO\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from REPARTO");
 //BA.debugLineNum = 2585;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM TABULADO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM TABULADOR_MONEDAS");
 //BA.debugLineNum = 2586;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM TABULADO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM TABULADOR_BILLETES");
 //BA.debugLineNum = 2587;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM RUTAA\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM RUTAA");
 //BA.debugLineNum = 2588;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM ABONOSP\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM ABONOSP");
 //BA.debugLineNum = 2589;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM ABONOS\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM ABONOS");
 //BA.debugLineNum = 2590;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM BLOCKENV";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM BLOCKENVIO");
 //BA.debugLineNum = 2591;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 2592;BA.debugLine="MsgboxAsync(\"No se cargo bien la informacion, f";
__c.MsgboxAsync(BA.ObjectToCharSequence("No se cargo bien la informacion, favor de cargar día nuevamente"),BA.ObjectToCharSequence("Atención"),ba);
 }else {
 //BA.debugLineNum = 2594;BA.debugLine="MsgboxAsync(\"No se cargo bien la informacion, f";
__c.MsgboxAsync(BA.ObjectToCharSequence("No se cargo bien la informacion, favor de cargar día nuevamente"),BA.ObjectToCharSequence("Atención"),ba);
 //BA.debugLineNum = 2595;BA.debugLine="P_carga.Visible = False";
_p_carga.setVisible(__c.False);
 };
 };
 //BA.debugLineNum = 2598;BA.debugLine="End Sub";
return "";
}
public String  _b_check_click() throws Exception{
 //BA.debugLineNum = 2431;BA.debugLine="Private Sub b_check_Click";
 //BA.debugLineNum = 2433;BA.debugLine="B4XPages.ShowPage(\"checklist\")";
_b4xpages._showpage /*String*/ (ba,"checklist");
 //BA.debugLineNum = 2435;BA.debugLine="End Sub";
return "";
}
public String  _b_clieprod_click() throws Exception{
anywheresoftware.b4a.sql.SQL.CursorWrapper _ch = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _ch1 = null;
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
int _i = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc = null;
String _cuenta0 = "";
String _arti = "";
int _a = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc2 = null;
String _cuenta1 = "";
String _arti1 = "";
int _h = 0;
float _preu = 0f;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc3 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc4 = null;
String _cuenta2 = "";
String _arti2 = "";
int _k = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc5 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c4 = null;
String _cuenta3 = "";
String _arti3 = "";
int _x = 0;
String _totalmonto = "";
String _totalcantidad = "";
 //BA.debugLineNum = 2160;BA.debugLine="Sub B_CLIEPROD_Click";
 //BA.debugLineNum = 2161;BA.debugLine="If b_check.Visible = True Then";
if (_b_check.getVisible()==__c.True) { 
 //BA.debugLineNum = 2162;BA.debugLine="MsgboxAsync(\"Favor de hacer el checklist.\",\"Aten";
__c.MsgboxAsync(BA.ObjectToCharSequence("Favor de hacer el checklist."),BA.ObjectToCharSequence("Atención"),ba);
 }else {
 //BA.debugLineNum = 2164;BA.debugLine="BUSCA.Visible = True";
_busca.setVisible(__c.True);
 //BA.debugLineNum = 2165;BA.debugLine="connecta.Visible = False";
_connecta.setVisible(__c.False);
 //BA.debugLineNum = 2166;BA.debugLine="trabajar.Visible = True";
_trabajar.setVisible(__c.True);
 //BA.debugLineNum = 2167;BA.debugLine="B_CLIEPROD.Visible = True";
_b_clieprod.setVisible(__c.True);
 //BA.debugLineNum = 2168;BA.debugLine="Panel1.Visible = True";
_panel1.setVisible(__c.True);
 //BA.debugLineNum = 2169;BA.debugLine="Panel1.BringToFront";
_panel1.BringToFront();
 //BA.debugLineNum = 2170;BA.debugLine="Panel1.Width = Root.Width";
_panel1.setWidth(_root.getWidth());
 //BA.debugLineNum = 2171;BA.debugLine="Panel1.Height = Root.Height";
_panel1.setHeight(_root.getHeight());
 //BA.debugLineNum = 2172;BA.debugLine="B_REGRESA.Top = Panel1.Height - B_REGRESA.Height";
_b_regresa.setTop((int) (_panel1.getHeight()-_b_regresa.getHeight()));
 //BA.debugLineNum = 2173;BA.debugLine="Btn_Ubicar_Ru.Visible=True";
_btn_ubicar_ru.setVisible(__c.True);
 //BA.debugLineNum = 2175;BA.debugLine="Dim ch As Cursor = Starter.skmt.ExecQuery(\"selec";
_ch = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_ch = (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 count(*) as visit from kmt_info WHERE gestion = 2")));
 //BA.debugLineNum = 2176;BA.debugLine="ch.Position = 0";
_ch.setPosition((int) (0));
 //BA.debugLineNum = 2177;BA.debugLine="L_clientes_visit.Text = ch.GetInt(\"visit\")";
_l_clientes_visit.setText(BA.ObjectToCharSequence(_ch.GetInt("visit")));
 //BA.debugLineNum = 2179;BA.debugLine="Dim ch1 As Cursor = Starter.skmt.ExecQuery(\"sele";
_ch1 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_ch1 = (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 count(*) as rechazo from kmt_info WHERE gestion = 3")));
 //BA.debugLineNum = 2180;BA.debugLine="ch1.Position = 0";
_ch1.setPosition((int) (0));
 //BA.debugLineNum = 2181;BA.debugLine="l_clientes_recha.Text = ch1.GetInt(\"rechazo\")";
_l_clientes_recha.setText(BA.ObjectToCharSequence(_ch1.GetInt("rechazo")));
 //BA.debugLineNum = 2182;BA.debugLine="l_clientes_visitados.Text = ch1.GetInt(\"rechazo\"";
_l_clientes_visitados.setText(BA.ObjectToCharSequence(_ch1.GetInt("rechazo")+_ch.GetInt("visit")));
 //BA.debugLineNum = 2184;BA.debugLine="c=Starter.skmt.ExecQuery(\"select * from kmt_info";
_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 * from kmt_info WHERE gestion <> 0 order by HORAENT")));
 //BA.debugLineNum = 2185;BA.debugLine="Subs.SetDivider(ListView1, Colors.LightGray, 2)";
_subs._setdivider /*String*/ (ba,_listview1,__c.Colors.LightGray,(int) (2));
 //BA.debugLineNum = 2186;BA.debugLine="ListView1.Clear";
_listview1.Clear();
 //BA.debugLineNum = 2187;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 2188;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = _listview1.getTwoLinesLayout().Label;
 //BA.debugLineNum = 2189;BA.debugLine="label1.TextSize = 16";
_label1.setTextSize((float) (16));
 //BA.debugLineNum = 2190;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 2191;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 2192;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = _listview1.getTwoLinesLayout().SecondLabel;
 //BA.debugLineNum = 2193;BA.debugLine="label2.TextSize = 16";
_label2.setTextSize((float) (16));
 //BA.debugLineNum = 2194;BA.debugLine="label2.TextColor = Colors.Black";
_label2.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 2196;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 2197;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step33 = 1;
final int limit33 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit33 ;_i = _i + step33 ) {
 //BA.debugLineNum = 2198;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 2199;BA.debugLine="If c.GetString(\"gestion\") = \"2\" Then";
if ((_c.GetString("gestion")).equals("2")) { 
 //BA.debugLineNum = 2200;BA.debugLine="ESTATUS = \"ENTREGADO\"";
_estatus = "ENTREGADO";
 //BA.debugLineNum = 2201;BA.debugLine="Log(\"entrega\")";
__c.LogImpl("515466537","entrega",0);
 }else if((_c.GetString("gestion")).equals("3")) { 
 //BA.debugLineNum = 2203;BA.debugLine="Log(\"no entrega\")";
__c.LogImpl("515466539","no entrega",0);
 //BA.debugLineNum = 2204;BA.debugLine="ESTATUS = \"RECHAZADO\"";
_estatus = "RECHAZADO";
 }else {
 //BA.debugLineNum = 2206;BA.debugLine="ESTATUS = \"SIN ESTATUS\"";
_estatus = "SIN ESTATUS";
 };
 //BA.debugLineNum = 2211;BA.debugLine="If ESTATUS = \"ENTREGADO\" Then";
if ((_estatus).equals("ENTREGADO")) { 
 //BA.debugLineNum = 2212;BA.debugLine="Private vc As Cursor = Starter.skmt.ExecQuery";
_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, CAT_GP_PRECIO from HIST_VENTAS LEFT JOIN CAT_GUNAPROD ON CAT_GP_ID = HVD_PROID where BCAJAS = 0 and HVD_CODPROMO ='"+__c.SmartStringFormatter("",(Object)(_subs._traealmacen /*String*/ (ba)))+"' and HVD_CLIENTE = '"+__c.SmartStringFormatter("",(Object)(_c.GetString("CAT_CL_CODIGO")))+"'"))));
 //BA.debugLineNum = 2214;BA.debugLine="Private cuenta0 As String = 0";
_cuenta0 = BA.NumberToString(0);
 //BA.debugLineNum = 2215;BA.debugLine="Private arti As String = 0";
_arti = BA.NumberToString(0);
 //BA.debugLineNum = 2216;BA.debugLine="If vc.RowCount > 0 Then";
if (_vc.getRowCount()>0) { 
 //BA.debugLineNum = 2217;BA.debugLine="For a = 0 To vc.RowCount - 1";
{
final int step49 = 1;
final int limit49 = (int) (_vc.getRowCount()-1);
_a = (int) (0) ;
for (;_a <= limit49 ;_a = _a + step49 ) {
 //BA.debugLineNum = 2218;BA.debugLine="vc.Position = a";
_vc.setPosition(_a);
 //BA.debugLineNum = 2220;BA.debugLine="arti = arti + (vc.GetString(\"HVD_CANT\") - v";
_arti = BA.NumberToString((double)(Double.parseDouble(_arti))+((double)(Double.parseDouble(_vc.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc.GetString("HVD_RECHAZOCANT")))));
 //BA.debugLineNum = 2221;BA.debugLine="cuenta0 = cuenta0 + ((vc.GetString(\"HVD_CAN";
_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 = 2226;BA.debugLine="Private vc2 As Cursor = Starter.skmt.ExecQuer";
_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 = '"+__c.SmartStringFormatter("",(Object)(_c.GetString("CAT_CL_CODIGO")))+"' AND BCAJAS = 1"))));
 //BA.debugLineNum = 2227;BA.debugLine="Private Cuenta1 As String = 0";
_cuenta1 = BA.NumberToString(0);
 //BA.debugLineNum = 2228;BA.debugLine="Private arti1 As String = 0";
_arti1 = BA.NumberToString(0);
 //BA.debugLineNum = 2229;BA.debugLine="If vc2.RowCount > 0 Then";
if (_vc2.getRowCount()>0) { 
 //BA.debugLineNum = 2230;BA.debugLine="For h = 0 To vc2.RowCount - 1";
{
final int step59 = 1;
final int limit59 = (int) (_vc2.getRowCount()-1);
_h = (int) (0) ;
for (;_h <= limit59 ;_h = _h + step59 ) {
 //BA.debugLineNum = 2231;BA.debugLine="vc2.Position = h";
_vc2.setPosition(_h);
 //BA.debugLineNum = 2232;BA.debugLine="Dim preu As Float = NumberFormat2(vc2.GetSt";
_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 = 2233;BA.debugLine="Private vc3 As Cursor = Starter.skmt.ExecQu";
_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 = 2234;BA.debugLine="If vc3.RowCount > 0 Then";
if (_vc3.getRowCount()>0) { 
 //BA.debugLineNum = 2235;BA.debugLine="vc3.Position = 0";
_vc3.setPosition((int) (0));
 //BA.debugLineNum = 2236;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 = 2237;BA.debugLine="arti1 = arti1 + (vc2.GetString(\"HVD_CANT\")";
_arti1 = BA.NumberToString((double)(Double.parseDouble(_arti1))+((double)(Double.parseDouble(_vc2.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc2.GetString("HVD_RECHAZOCANT")))));
 };
 }
};
 };
 //BA.debugLineNum = 2243;BA.debugLine="Private vc4 As Cursor = Starter.skmt.ExecQuer";
_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_CANT, IFNULL(HVD_RECHAZOCANT, 0) AS HVD_RECHAZOCANT, CANTC,HVD_COSTO_TOT, HVD_RECHAZO, HVD_CODPROMO from HIST_VENTAS where HVD_CLIENTE = '"+__c.SmartStringFormatter("",(Object)(_c.GetString("CAT_CL_CODIGO")))+"' AND BCAJAS = 0 and HVD_CODPROMO <> '"+__c.SmartStringFormatter("",(Object)(_subs._traealmacen /*String*/ (ba)))+"'"))));
 //BA.debugLineNum = 2244;BA.debugLine="Private Cuenta2 As String = 0";
_cuenta2 = BA.NumberToString(0);
 //BA.debugLineNum = 2245;BA.debugLine="Private arti2 As String = 0";
_arti2 = BA.NumberToString(0);
 //BA.debugLineNum = 2246;BA.debugLine="If vc4.RowCount > 0 Then";
if (_vc4.getRowCount()>0) { 
 //BA.debugLineNum = 2248;BA.debugLine="For k = 0 To vc4.RowCount - 1";
{
final int step74 = 1;
final int limit74 = (int) (_vc4.getRowCount()-1);
_k = (int) (0) ;
for (;_k <= limit74 ;_k = _k + step74 ) {
 //BA.debugLineNum = 2249;BA.debugLine="vc4.Position = k";
_vc4.setPosition(_k);
 //BA.debugLineNum = 2250;BA.debugLine="If vc4.GetString(\"HVD_PROID\") <> vc4.GetStr";
if ((_vc4.GetString("HVD_PROID")).equals(_vc4.GetString("HVD_CODPROMO")) == false) { 
 //BA.debugLineNum = 2251;BA.debugLine="If vc4.GetString(\"HVD_RECHAZO\") = 0 Then";
if ((_vc4.GetString("HVD_RECHAZO")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 2252;BA.debugLine="Cuenta2 = Cuenta2 + vc4.GetString(\"HVD_CO";
_cuenta2 = BA.NumberToString((double)(Double.parseDouble(_cuenta2))+(double)(Double.parseDouble(_vc4.GetString("HVD_COSTO_TOT"))));
 //BA.debugLineNum = 2253;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 = 2255;BA.debugLine="Private vc5 As Cursor = Starter.skmt.Exec";
_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 = 2256;BA.debugLine="If vc5.RowCount > 0 Then";
if (_vc5.getRowCount()>0) { 
 //BA.debugLineNum = 2257;BA.debugLine="vc5.Position= 0";
_vc5.setPosition((int) (0));
 //BA.debugLineNum = 2259;BA.debugLine="Cuenta2 = Cuenta2 +((vc4.GetString(\"HVD_";
_cuenta2 = BA.NumberToString((double)(Double.parseDouble(_cuenta2))+(((double)(Double.parseDouble(_vc4.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc4.GetString("HVD_RECHAZOCANT"))))*(double)(Double.parseDouble(_vc5.GetString("CAT_GP_PRECIO")))));
 //BA.debugLineNum = 2260;BA.debugLine="arti2 = arti2 +(vc4.GetString(\"HVD_CANT\"";
_arti2 = BA.NumberToString((double)(Double.parseDouble(_arti2))+((double)(Double.parseDouble(_vc4.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc4.GetString("HVD_RECHAZOCANT")))));
 };
 };
 };
 }
};
 };
 //BA.debugLineNum = 2269;BA.debugLine="Private c4 As Cursor = Starter.skmt.ExecQuery";
_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 = '"+__c.SmartStringFormatter("",(Object)(_c.GetString("CAT_CL_CODIGO")))+"'"))));
 //BA.debugLineNum = 2270;BA.debugLine="Private Cuenta3 As String = 0";
_cuenta3 = BA.NumberToString(0);
 //BA.debugLineNum = 2271;BA.debugLine="Private arti3 As String = 0";
_arti3 = BA.NumberToString(0);
 //BA.debugLineNum = 2272;BA.debugLine="If c4.RowCount > 0 Then";
if (_c4.getRowCount()>0) { 
 //BA.debugLineNum = 2273;BA.debugLine="For x = 0 To c4.RowCount -1";
{
final int step95 = 1;
final int limit95 = (int) (_c4.getRowCount()-1);
_x = (int) (0) ;
for (;_x <= limit95 ;_x = _x + step95 ) {
 //BA.debugLineNum = 2274;BA.debugLine="c4.Position = x";
_c4.setPosition(_x);
 //BA.debugLineNum = 2275;BA.debugLine="arti3 = arti3 + c4.GetString(\"PE_CANT\")";
_arti3 = BA.NumberToString((double)(Double.parseDouble(_arti3))+(double)(Double.parseDouble(_c4.GetString("PE_CANT"))));
 //BA.debugLineNum = 2276;BA.debugLine="Cuenta3 = Cuenta3 + c4.GetString(\"PE_COSTO_";
_cuenta3 = BA.NumberToString((double)(Double.parseDouble(_cuenta3))+(double)(Double.parseDouble(_c4.GetString("PE_COSTO_TOT"))));
 }
};
 };
 //BA.debugLineNum = 2281;BA.debugLine="Private TOTALMONTO As String = cuenta0 + Cuen";
_totalmonto = BA.NumberToString((double)(Double.parseDouble(_cuenta0))+(double)(Double.parseDouble(_cuenta1))+(double)(Double.parseDouble(_cuenta2))+(double)(Double.parseDouble(_cuenta3)));
 //BA.debugLineNum = 2282;BA.debugLine="Private TOTALcantidad As String = arti + arti";
_totalcantidad = BA.NumberToString((double)(Double.parseDouble(_arti))+(double)(Double.parseDouble(_arti1))+(double)(Double.parseDouble(_arti2))+(double)(Double.parseDouble(_arti3)));
 //BA.debugLineNum = 2284;BA.debugLine="ListView1.AddTwoLines(c.GetString(\"CAT_CL_COD";
_listview1.AddTwoLines(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CODIGO")+" - "+_c.GetString("CAT_CL_NOMBRE")),BA.ObjectToCharSequence("Articulos :"+_totalcantidad+" Monto :"+__c.NumberFormat2((double)(Double.parseDouble(_totalmonto)),(int) (0),(int) (2),(int) (2),__c.True)+"   "+_estatus));
 //BA.debugLineNum = 2285;BA.debugLine="Log(\"si entre2\")";
__c.LogImpl("515466621","si entre2",0);
 }else if((_estatus).equals("RECHAZADO")) { 
 //BA.debugLineNum = 2289;BA.debugLine="Private vc As Cursor = Starter.skmt.ExecQuery";
_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_CANT, IFNULL(HVD_RECHAZOCANT, 0) AS HVD_RECHAZOCANT, CAT_GP_PRECIO, HVD_COSTO_TOT from HIST_VENTAS LEFT JOIN CAT_GUNAPROD ON CAT_GP_ID = HVD_PROID where BCAJAS = 0 and HVD_CODPROMO ='"+__c.SmartStringFormatter("",(Object)(_subs._traealmacen /*String*/ (ba)))+"' and HVD_CLIENTE = '"+__c.SmartStringFormatter("",(Object)(_c.GetString("CAT_CL_CODIGO")))+"'"))));
 //BA.debugLineNum = 2291;BA.debugLine="Private cuenta0 As String = 0";
_cuenta0 = BA.NumberToString(0);
 //BA.debugLineNum = 2292;BA.debugLine="Private arti As String = 0";
_arti = BA.NumberToString(0);
 //BA.debugLineNum = 2293;BA.debugLine="If vc.RowCount > 0 Then";
if (_vc.getRowCount()>0) { 
 //BA.debugLineNum = 2294;BA.debugLine="For a = 0 To vc.RowCount - 1";
{
final int step110 = 1;
final int limit110 = (int) (_vc.getRowCount()-1);
_a = (int) (0) ;
for (;_a <= limit110 ;_a = _a + step110 ) {
 //BA.debugLineNum = 2295;BA.debugLine="vc.Position = a";
_vc.setPosition(_a);
 //BA.debugLineNum = 2296;BA.debugLine="Dim preu As Float = NumberFormat2(vc.GetStr";
_preu = (float)(Double.parseDouble(__c.NumberFormat2((double)(Double.parseDouble(_vc.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_vc.GetString("HVD_CANT"))),(int) (0),(int) (2),(int) (2),__c.False)));
 //BA.debugLineNum = 2298;BA.debugLine="arti = arti + (vc.GetString(\"HVD_RECHAZOCAN";
_arti = BA.NumberToString((double)(Double.parseDouble(_arti))+(double)(Double.parseDouble((_vc.GetString("HVD_RECHAZOCANT")))));
 //BA.debugLineNum = 2299;BA.debugLine="cuenta0 = cuenta0 + ((vc.GetString(\"HVD_REC";
_cuenta0 = BA.NumberToString((double)(Double.parseDouble(_cuenta0))+((double)(Double.parseDouble((_vc.GetString("HVD_RECHAZOCANT"))))*_preu));
 }
};
 };
 //BA.debugLineNum = 2304;BA.debugLine="Private vc2 As Cursor = Starter.skmt.ExecQuer";
_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 = '"+__c.SmartStringFormatter("",(Object)(_c.GetString("CAT_CL_CODIGO")))+"' AND BCAJAS = 1"))));
 //BA.debugLineNum = 2305;BA.debugLine="Private Cuenta1 As String = 0";
_cuenta1 = BA.NumberToString(0);
 //BA.debugLineNum = 2306;BA.debugLine="Private arti1 As String = 0";
_arti1 = BA.NumberToString(0);
 //BA.debugLineNum = 2307;BA.debugLine="If vc2.RowCount > 0 Then";
if (_vc2.getRowCount()>0) { 
 //BA.debugLineNum = 2308;BA.debugLine="For h = 0 To vc2.RowCount - 1";
{
final int step121 = 1;
final int limit121 = (int) (_vc2.getRowCount()-1);
_h = (int) (0) ;
for (;_h <= limit121 ;_h = _h + step121 ) {
 //BA.debugLineNum = 2309;BA.debugLine="vc2.Position = h";
_vc2.setPosition(_h);
 //BA.debugLineNum = 2310;BA.debugLine="Dim preu As Float = NumberFormat2(vc2.GetSt";
_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 = 2311;BA.debugLine="Private vc3 As Cursor = Starter.skmt.ExecQu";
_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 = 2312;BA.debugLine="If vc3.RowCount > 0 Then";
if (_vc3.getRowCount()>0) { 
 //BA.debugLineNum = 2313;BA.debugLine="vc3.Position = 0";
_vc3.setPosition((int) (0));
 //BA.debugLineNum = 2314;BA.debugLine="Cuenta1 = Cuenta1 + ((vc2.GetString(\"HVD_R";
_cuenta1 = BA.NumberToString((double)(Double.parseDouble(_cuenta1))+(((double)(Double.parseDouble(_vc2.GetString("HVD_RECHAZOCANT")))/(double)(double)(Double.parseDouble(_vc3.GetString("CONVERSION"))))*_preu));
 //BA.debugLineNum = 2315;BA.debugLine="arti1 = arti1 + (vc2.GetString(\"HVD_RECHAZ";
_arti1 = BA.NumberToString((double)(Double.parseDouble(_arti1))+(double)(Double.parseDouble((_vc2.GetString("HVD_RECHAZOCANT")))));
 };
 }
};
 };
 //BA.debugLineNum = 2321;BA.debugLine="Private vc4 As Cursor = Starter.skmt.ExecQuer";
_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_CANT, IFNULL(HVD_RECHAZOCANT, 0) AS HVD_RECHAZOCANT, CANTC,HVD_COSTO_TOT, HVD_RECHAZO, HVD_CODPROMO from HIST_VENTAS where HVD_CLIENTE = '"+__c.SmartStringFormatter("",(Object)(_c.GetString("CAT_CL_CODIGO")))+"' AND BCAJAS = 0 and HVD_CODPROMO <> '"+__c.SmartStringFormatter("",(Object)(_subs._traealmacen /*String*/ (ba)))+"'"))));
 //BA.debugLineNum = 2322;BA.debugLine="Private Cuenta2 As String = 0";
_cuenta2 = BA.NumberToString(0);
 //BA.debugLineNum = 2323;BA.debugLine="Private arti2 As String = 0";
_arti2 = BA.NumberToString(0);
 //BA.debugLineNum = 2324;BA.debugLine="If vc4.RowCount > 0 Then";
if (_vc4.getRowCount()>0) { 
 //BA.debugLineNum = 2326;BA.debugLine="For k = 0 To vc4.RowCount - 1";
{
final int step136 = 1;
final int limit136 = (int) (_vc4.getRowCount()-1);
_k = (int) (0) ;
for (;_k <= limit136 ;_k = _k + step136 ) {
 //BA.debugLineNum = 2327;BA.debugLine="vc4.Position = k";
_vc4.setPosition(_k);
 //BA.debugLineNum = 2328;BA.debugLine="If vc4.GetString(\"HVD_PROID\") <> vc4.GetStr";
if ((_vc4.GetString("HVD_PROID")).equals(_vc4.GetString("HVD_CODPROMO")) == false) { 
 //BA.debugLineNum = 2329;BA.debugLine="If vc4.GetString(\"HVD_RECHAZO\") = 0 Then";
if ((_vc4.GetString("HVD_RECHAZO")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 2330;BA.debugLine="Cuenta2 = Cuenta2 + vc4.GetString(\"HVD_CO";
_cuenta2 = BA.NumberToString((double)(Double.parseDouble(_cuenta2))+(double)(Double.parseDouble(_vc4.GetString("HVD_COSTO_TOT"))));
 //BA.debugLineNum = 2331;BA.debugLine="arti2 = arti2 + vc4.GetString(\"HVD_RECHAZ";
_arti2 = BA.NumberToString((double)(Double.parseDouble(_arti2))+(double)(Double.parseDouble(_vc4.GetString("HVD_RECHAZOCANT"))));
 }else {
 //BA.debugLineNum = 2333;BA.debugLine="Private vc5 As Cursor = Starter.skmt.Exec";
_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 = 2334;BA.debugLine="If vc5.RowCount > 0 Then";
if (_vc5.getRowCount()>0) { 
 //BA.debugLineNum = 2335;BA.debugLine="vc5.Position= 0";
_vc5.setPosition((int) (0));
 //BA.debugLineNum = 2337;BA.debugLine="Cuenta2 = Cuenta2 +(( vc4.GetString(\"HVD";
_cuenta2 = BA.NumberToString((double)(Double.parseDouble(_cuenta2))+((double)(Double.parseDouble((_vc4.GetString("HVD_RECHAZOCANT"))))*(double)(Double.parseDouble(_vc5.GetString("CAT_GP_PRECIO")))));
 //BA.debugLineNum = 2338;BA.debugLine="arti2 = arti2 +(vc4.GetString(\"HVD_RECHA";
_arti2 = BA.NumberToString((double)(Double.parseDouble(_arti2))+(double)(Double.parseDouble((_vc4.GetString("HVD_RECHAZOCANT")))));
 };
 };
 };
 }
};
 };
 //BA.debugLineNum = 2347;BA.debugLine="Private c4 As Cursor = Starter.skmt.ExecQuery";
_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 = '"+__c.SmartStringFormatter("",(Object)(_c.GetString("CAT_CL_CODIGO")))+"'"))));
 //BA.debugLineNum = 2348;BA.debugLine="Private Cuenta3 As String = 0";
_cuenta3 = BA.NumberToString(0);
 //BA.debugLineNum = 2349;BA.debugLine="Private arti3 As String = 0";
_arti3 = BA.NumberToString(0);
 //BA.debugLineNum = 2350;BA.debugLine="If c4.RowCount > 0 Then";
if (_c4.getRowCount()>0) { 
 //BA.debugLineNum = 2351;BA.debugLine="For x = 0 To c4.RowCount -1";
{
final int step157 = 1;
final int limit157 = (int) (_c4.getRowCount()-1);
_x = (int) (0) ;
for (;_x <= limit157 ;_x = _x + step157 ) {
 //BA.debugLineNum = 2352;BA.debugLine="c4.Position = x";
_c4.setPosition(_x);
 //BA.debugLineNum = 2353;BA.debugLine="arti3 = arti3 + c4.GetString(\"PE_CANT\")";
_arti3 = BA.NumberToString((double)(Double.parseDouble(_arti3))+(double)(Double.parseDouble(_c4.GetString("PE_CANT"))));
 //BA.debugLineNum = 2354;BA.debugLine="Cuenta3 = Cuenta3 + c4.GetString(\"PE_COSTO_";
_cuenta3 = BA.NumberToString((double)(Double.parseDouble(_cuenta3))+(double)(Double.parseDouble(_c4.GetString("PE_COSTO_TOT"))));
 }
};
 };
 //BA.debugLineNum = 2359;BA.debugLine="Private TOTALMONTO As String = cuenta0 + Cuen";
_totalmonto = BA.NumberToString((double)(Double.parseDouble(_cuenta0))+(double)(Double.parseDouble(_cuenta1))+(double)(Double.parseDouble(_cuenta2))+(double)(Double.parseDouble(_cuenta3)));
 //BA.debugLineNum = 2360;BA.debugLine="Private TOTALcantidad As String = arti + arti";
_totalcantidad = BA.NumberToString((double)(Double.parseDouble(_arti))+(double)(Double.parseDouble(_arti1))+(double)(Double.parseDouble(_arti2))+(double)(Double.parseDouble(_arti3)));
 //BA.debugLineNum = 2362;BA.debugLine="Log(\"si entre\")";
__c.LogImpl("515466698","si entre",0);
 //BA.debugLineNum = 2363;BA.debugLine="ListView1.AddTwoLines(c.GetString(\"CAT_CL_COD";
_listview1.AddTwoLines(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CODIGO")+" - "+_c.GetString("CAT_CL_NOMBRE")),BA.ObjectToCharSequence("Articulos :"+_totalcantidad+" Monto :"+__c.NumberFormat2((double)(Double.parseDouble(_totalmonto)),(int) (0),(int) (2),(int) (2),__c.True)+"   "+_estatus));
 };
 }
};
 };
 };
 //BA.debugLineNum = 2400;BA.debugLine="End Sub";
return "";
}
public void  _b_imp_inventario_click() throws Exception{
ResumableSub_b_imp_inventario_Click rsub = new ResumableSub_b_imp_inventario_Click(this);
rsub.resume(ba, null);
}
public static class ResumableSub_b_imp_inventario_Click extends BA.ResumableSub {
public ResumableSub_b_imp_inventario_Click(reparto_izca.keymon.lat.c_principal parent) {
this.parent = parent;
}
reparto_izca.keymon.lat.c_principal parent;
int _cont = 0;
anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _bmp = null;
reparto_izca.keymon.lat.escposprinter._animage _myimage = null;
String _sdate = "";
String _stime = "";
int _i = 0;
String _firstchar = "";
String _productoinven = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _sumainv = null;
int step56;
int limit56;
int step62;
int limit62;

@Override
public void resume(BA ba, Object[] result) throws Exception{

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
 //BA.debugLineNum = 2782;BA.debugLine="ProgressDialogShow(\"Imprimiendo, un momento ...\")";
parent.__c.ProgressDialogShow(ba,BA.ObjectToCharSequence("Imprimiendo, un momento ..."));
 //BA.debugLineNum = 2783;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 2784;BA.debugLine="If Not(Printer1.IsConnected) Then";
if (true) break;

case 1:
//if
this.state = 38;
if (parent.__c.Not(parent._printer1._isconnected /*boolean*/ ())) { 
this.state = 3;
}else {
this.state = 21;
}if (true) break;

case 3:
//C
this.state = 4;
 //BA.debugLineNum = 2786;BA.debugLine="Printer1.Connect";
parent._printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 2787;BA.debugLine="Private cont As Int = 0";
_cont = (int) (0);
 //BA.debugLineNum = 2788;BA.debugLine="Do While Not(impresoraConectada)";
if (true) break;

case 4:
//do while
this.state = 19;
while (parent.__c.Not(parent._impresoraconectada)) {
this.state = 6;
if (true) break;
}
if (true) break;

case 6:
//C
this.state = 7;
 //BA.debugLineNum = 2789;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 57;
return;
case 57:
//C
this.state = 7;
;
 //BA.debugLineNum = 2790;BA.debugLine="cont = cont + 1";
_cont = (int) (_cont+1);
 //BA.debugLineNum = 2791;BA.debugLine="If cont = 7 Then Printer1.Connect 'Tratamos de";
if (true) break;

case 7:
//if
this.state = 12;
if (_cont==7) { 
this.state = 9;
;}if (true) break;

case 9:
//C
this.state = 12;
parent._printer1._connect /*boolean*/ ();
if (true) break;

case 12:
//C
this.state = 13;
;
 //BA.debugLineNum = 2792;BA.debugLine="If cont > 15 Then impresoraConectada = True";
if (true) break;

case 13:
//if
this.state = 18;
if (_cont>15) { 
this.state = 15;
;}if (true) break;

case 15:
//C
this.state = 18;
parent._impresoraconectada = parent.__c.True;
if (true) break;

case 18:
//C
this.state = 4;
;
 if (true) break;

case 19:
//C
this.state = 38;
;
 //BA.debugLineNum = 2794;BA.debugLine="Sleep(500)";
parent.__c.Sleep(ba,this,(int) (500));
this.state = 58;
return;
case 58:
//C
this.state = 38;
;
 //BA.debugLineNum = 2795;BA.debugLine="impresoraConectada = False";
parent._impresoraconectada = parent.__c.False;
 if (true) break;

case 21:
//C
this.state = 22;
 //BA.debugLineNum = 2798;BA.debugLine="Printer1.Connect";
parent._printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 2799;BA.debugLine="Private cont As Int = 0";
_cont = (int) (0);
 //BA.debugLineNum = 2800;BA.debugLine="Do While Not(impresoraConectada) Or Not(Printer1";
if (true) break;

case 22:
//do while
this.state = 37;
while (parent.__c.Not(parent._impresoraconectada) || parent.__c.Not(parent._printer1._isconnected /*boolean*/ ())) {
this.state = 24;
if (true) break;
}
if (true) break;

case 24:
//C
this.state = 25;
 //BA.debugLineNum = 2801;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 59;
return;
case 59:
//C
this.state = 25;
;
 //BA.debugLineNum = 2802;BA.debugLine="cont = cont + 1";
_cont = (int) (_cont+1);
 //BA.debugLineNum = 2803;BA.debugLine="If cont = 2 Then Printer1.Connect";
if (true) break;

case 25:
//if
this.state = 30;
if (_cont==2) { 
this.state = 27;
;}if (true) break;

case 27:
//C
this.state = 30;
parent._printer1._connect /*boolean*/ ();
if (true) break;

case 30:
//C
this.state = 31;
;
 //BA.debugLineNum = 2804;BA.debugLine="If cont > 4 Then impresoraConectada = True";
if (true) break;

case 31:
//if
this.state = 36;
if (_cont>4) { 
this.state = 33;
;}if (true) break;

case 33:
//C
this.state = 36;
parent._impresoraconectada = parent.__c.True;
if (true) break;

case 36:
//C
this.state = 22;
;
 if (true) break;

case 37:
//C
this.state = 38;
;
 //BA.debugLineNum = 2806;BA.debugLine="Sleep(500)";
parent.__c.Sleep(ba,this,(int) (500));
this.state = 60;
return;
case 60:
//C
this.state = 38;
;
 //BA.debugLineNum = 2807;BA.debugLine="impresoraConectada = False";
parent._impresoraconectada = parent.__c.False;
 if (true) break;

case 38:
//C
this.state = 39;
;
 //BA.debugLineNum = 2810;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 2811;BA.debugLine="ESPACIO = 28";
parent._espacio = (int) (28);
 //BA.debugLineNum = 2812;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 2813;BA.debugLine="Dim bmp As Bitmap";
_bmp = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper();
 //BA.debugLineNum = 2814;BA.debugLine="Printer1.Justify= 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 2815;BA.debugLine="bmp.InitializeResize(File.DirAssets, \"inventarios";
_bmp.InitializeResize(parent.__c.File.getDirAssets(),"inventarios.jpg",(int) (92),(int) (92),parent.__c.True);
 //BA.debugLineNum = 2816;BA.debugLine="Dim myimage As AnImage = Printer1.ImageToBWIMage(";
_myimage = parent._printer1._imagetobwimage /*reparto_izca.keymon.lat.escposprinter._animage*/ (_bmp);
 //BA.debugLineNum = 2817;BA.debugLine="myimage = Printer1.DitherImage2D(myimage, 128)";
_myimage = parent._printer1._ditherimage2d /*reparto_izca.keymon.lat.escposprinter._animage*/ (_myimage,(int) (128));
 //BA.debugLineNum = 2818;BA.debugLine="myimage= Printer1.PackImage(myimage)";
_myimage = parent._printer1._packimage /*reparto_izca.keymon.lat.escposprinter._animage*/ (_myimage);
 //BA.debugLineNum = 2819;BA.debugLine="Printer1.WriteString(CRLF) ' nudge the printer to";
parent._printer1._writestring /*String*/ (parent.__c.CRLF);
 //BA.debugLineNum = 2820;BA.debugLine="Printer1.WriteString(CRLF) ' nudge the printer to";
parent._printer1._writestring /*String*/ (parent.__c.CRLF);
 //BA.debugLineNum = 2821;BA.debugLine="Printer1.WriteString(Printer1.REVERSE)";
parent._printer1._writestring /*String*/ (parent._printer1._reverse /*String*/ );
 //BA.debugLineNum = 2822;BA.debugLine="Printer1.PrintImage(myimage)";
parent._printer1._printimage /*int*/ (_myimage);
 //BA.debugLineNum = 2823;BA.debugLine="Printer1.WriteString(Printer1.UNREVERSE)";
parent._printer1._writestring /*String*/ (parent._printer1._unreverse /*String*/ );
 //BA.debugLineNum = 2824;BA.debugLine="Printer1.WriteString(\" \" & CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2825;BA.debugLine="Private c As Cursor = Starter.skmt.ExecQuery(\"sel";
parent._c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
parent._c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select HVD_PRONOMBRE, IFNULL(SUM(HVD_CANT), 0) AS HVD_CANT, HVD_PROID from HIST_VENTAS WHERE HVD_PRONOMBRE <> 'Cobranza Pendiente' and HVD_PROID <> HVD_CODPROMO GROUP BY HVD_PROID order by HVD_PRONOMBRE asc")));
 //BA.debugLineNum = 2826;BA.debugLine="lv_prod_Prin.SingleLineLayout.Label.TextColor = C";
parent._lv_prod_prin.getSingleLineLayout().Label.setTextColor(parent.__c.Colors.White);
 //BA.debugLineNum = 2827;BA.debugLine="lv_prod_Prin.Clear";
parent._lv_prod_prin.Clear();
 //BA.debugLineNum = 2828;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 2829;BA.debugLine="Dim sDate, sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 2830;BA.debugLine="DateTime.DateFormat = \"dd/MM/yyyy\"";
parent.__c.DateTime.setDateFormat("dd/MM/yyyy");
 //BA.debugLineNum = 2831;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
parent.__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 2832;BA.debugLine="sDate = DateTime.Date(DateTime.Now)";
_sdate = parent.__c.DateTime.Date(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 2833;BA.debugLine="sTime = DateTime.Time(DateTime.Now)";
_stime = parent.__c.DateTime.Time(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 2834;BA.debugLine="Printer1.WriteString(\"Fecha: \" &sDate & CRLF)";
parent._printer1._writestring /*String*/ ("Fecha: "+_sdate+parent.__c.CRLF);
 //BA.debugLineNum = 2835;BA.debugLine="Printer1.WriteString(\"Hora: \" &sTime & CRLF)";
parent._printer1._writestring /*String*/ ("Hora: "+_stime+parent.__c.CRLF);
 //BA.debugLineNum = 2836;BA.debugLine="Printer1.WriteString(\"Ruta: \" & l_ruta.Text & CRL";
parent._printer1._writestring /*String*/ ("Ruta: "+parent._l_ruta.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 2837;BA.debugLine="Printer1.WriteString(\"Usuario: \" & Subs.dameUsuar";
parent._printer1._writestring /*String*/ ("Usuario: "+parent._subs._dameusuariodedb /*String*/ (ba)+parent.__c.CRLF);
 //BA.debugLineNum = 2839;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("--------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 2840;BA.debugLine="If c.RowCount > 0 Then";
if (true) break;

case 39:
//if
this.state = 56;
if (parent._c.getRowCount()>0) { 
this.state = 41;
}if (true) break;

case 41:
//C
this.state = 42;
 //BA.debugLineNum = 2841;BA.debugLine="For i = 0 To c.RowCount - 1";
if (true) break;

case 42:
//for
this.state = 55;
step56 = 1;
limit56 = (int) (parent._c.getRowCount()-1);
_i = (int) (0) ;
this.state = 61;
if (true) break;

case 61:
//C
this.state = 55;
if ((step56 > 0 && _i <= limit56) || (step56 < 0 && _i >= limit56)) this.state = 44;
if (true) break;

case 62:
//C
this.state = 61;
_i = ((int)(0 + _i + step56)) ;
if (true) break;

case 44:
//C
this.state = 45;
 //BA.debugLineNum = 2842;BA.debugLine="c.Position = i";
parent._c.setPosition(_i);
 //BA.debugLineNum = 2844;BA.debugLine="Printer1.WriteString(\"-----------INVENTARIO----";
parent._printer1._writestring /*String*/ ("-----------INVENTARIO-----------"+parent.__c.CRLF);
 //BA.debugLineNum = 2845;BA.debugLine="Printer1.WriteString(\"-------------------------";
parent._printer1._writestring /*String*/ ("--------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 2846;BA.debugLine="Printer1.WriteString(\"Cant.      Producto\" &  C";
parent._printer1._writestring /*String*/ ("Cant.      Producto"+parent.__c.CRLF);
 //BA.debugLineNum = 2847;BA.debugLine="Printer1.WriteString(\"-------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 2848;BA.debugLine="For i=0 To c.RowCount -1";
if (true) break;

case 45:
//for
this.state = 54;
step62 = 1;
limit62 = (int) (parent._c.getRowCount()-1);
_i = (int) (0) ;
this.state = 63;
if (true) break;

case 63:
//C
this.state = 54;
if ((step62 > 0 && _i <= limit62) || (step62 < 0 && _i >= limit62)) this.state = 47;
if (true) break;

case 64:
//C
this.state = 63;
_i = ((int)(0 + _i + step62)) ;
if (true) break;

case 47:
//C
this.state = 48;
 //BA.debugLineNum = 2849;BA.debugLine="c.Position=i";
parent._c.setPosition(_i);
 //BA.debugLineNum = 2852;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 2853;BA.debugLine="Printer1.WriteString( (c.GetString(\"HVD_CANT\")";
parent._printer1._writestring /*String*/ ((parent._c.GetString("HVD_CANT"))+"- ");
 //BA.debugLineNum = 2854;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 2855;BA.debugLine="Dim firstChar As String = c.GetString(\"HVD_PRO";
_firstchar = parent._c.GetString("HVD_PRONOMBRE").substring((int) (0),(int) (1));
 //BA.debugLineNum = 2856;BA.debugLine="Dim productoinven As String";
_productoinven = "";
 //BA.debugLineNum = 2859;BA.debugLine="If Asc(firstChar) >= Asc(\"0\") And Asc(firstCha";
if (true) break;

case 48:
//if
this.state = 53;
if (parent.__c.Asc(BA.ObjectToChar(_firstchar))>=parent.__c.Asc(BA.ObjectToChar("0")) && parent.__c.Asc(BA.ObjectToChar(_firstchar))<=parent.__c.Asc(BA.ObjectToChar("9"))) { 
this.state = 50;
}else {
this.state = 52;
}if (true) break;

case 50:
//C
this.state = 53;
 //BA.debugLineNum = 2861;BA.debugLine="productoinven = c.GetString(\"HVD_PRONOMBRE\").";
_productoinven = parent._c.GetString("HVD_PRONOMBRE").substring((int) (4));
 if (true) break;

case 52:
//C
this.state = 53;
 //BA.debugLineNum = 2864;BA.debugLine="productoinven = c.GetString(\"HVD_PRONOMBRE\")";
_productoinven = parent._c.GetString("HVD_PRONOMBRE");
 if (true) break;

case 53:
//C
this.state = 64;
;
 //BA.debugLineNum = 2868;BA.debugLine="Printer1.WriteString(productoinven)";
parent._printer1._writestring /*String*/ (_productoinven);
 //BA.debugLineNum = 2869;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2870;BA.debugLine="Printer1.WriteString(\" \" & CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 if (true) break;
if (true) break;

case 54:
//C
this.state = 62;
;
 if (true) break;
if (true) break;

case 55:
//C
this.state = 56;
;
 if (true) break;

case 56:
//C
this.state = -1;
;
 //BA.debugLineNum = 2877;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 2879;BA.debugLine="Dim sumainv As Cursor = Starter.skmt.ExecQuery(\"S";
_sumainv = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_sumainv = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT SUM(HVD_CANT) AS CANTIDAD FROM HIST_VENTAS WHERE HVD_CODPROMO <> HVD_PROID")));
 //BA.debugLineNum = 2880;BA.debugLine="sumainv.Position = 0";
_sumainv.setPosition((int) (0));
 //BA.debugLineNum = 2882;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 2883;BA.debugLine="Printer1.WriteString(\"Total piezas: \" & sumainv.G";
parent._printer1._writestring /*String*/ ("Total piezas: "+_sumainv.GetString("CANTIDAD")+parent.__c.CRLF);
 //BA.debugLineNum = 2884;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 2885;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 2886;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2887;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2888;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2889;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2890;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 65;
return;
case 65:
//C
this.state = -1;
;
 //BA.debugLineNum = 2891;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 2892;BA.debugLine="ProgressDialogHide";
parent.__c.ProgressDialogHide();
 //BA.debugLineNum = 2893;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public void  _b_impresion_rec_click() throws Exception{
ResumableSub_b_impresion_rec_Click rsub = new ResumableSub_b_impresion_rec_Click(this);
rsub.resume(ba, null);
}
public static class ResumableSub_b_impresion_rec_Click extends BA.ResumableSub {
public ResumableSub_b_impresion_rec_Click(reparto_izca.keymon.lat.c_principal parent) {
this.parent = parent;
}
reparto_izca.keymon.lat.c_principal parent;
int _totalentrega = 0;
int _totalrechazo = 0;
int _totalpiezas = 0;
String _sdate = "";
String _stime = "";
int _cont = 0;
int _i = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c3 = null;
String _resta = "";
int step46;
int limit46;

@Override
public void resume(BA ba, Object[] result) throws Exception{

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
 //BA.debugLineNum = 2897;BA.debugLine="Dim totalentrega As Int";
_totalentrega = 0;
 //BA.debugLineNum = 2898;BA.debugLine="Dim totalrechazo As Int";
_totalrechazo = 0;
 //BA.debugLineNum = 2899;BA.debugLine="Dim totalpiezas As Int";
_totalpiezas = 0;
 //BA.debugLineNum = 2900;BA.debugLine="Dim sDate, sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 2901;BA.debugLine="c=Starter.skmt.ExecQuery(\"select USUARIO from usu";
parent._c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
 //BA.debugLineNum = 2902;BA.debugLine="c.Position=0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 2903;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
parent._usuario = parent._c.GetString("USUARIO");
 //BA.debugLineNum = 2905;BA.debugLine="DateTime.DateFormat = \"dd/MM/yyyy\"";
parent.__c.DateTime.setDateFormat("dd/MM/yyyy");
 //BA.debugLineNum = 2906;BA.debugLine="DateTime.TimeFormat=\"HH:mm:ss\"";
parent.__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 2907;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = parent.__c.DateTime.Date(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 2908;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = parent.__c.DateTime.Time(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 2909;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 2915;BA.debugLine="ProgressDialogShow(\"Imprimiendo, un momento ...\")";
parent.__c.ProgressDialogShow(ba,BA.ObjectToCharSequence("Imprimiendo, un momento ..."));
 //BA.debugLineNum = 2916;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 2917;BA.debugLine="If Not(Printer1.IsConnected) Then";
if (true) break;

case 1:
//if
this.state = 38;
if (parent.__c.Not(parent._printer1._isconnected /*boolean*/ ())) { 
this.state = 3;
}else {
this.state = 21;
}if (true) break;

case 3:
//C
this.state = 4;
 //BA.debugLineNum = 2919;BA.debugLine="Printer1.Connect";
parent._printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 2920;BA.debugLine="Private cont As Int = 0";
_cont = (int) (0);
 //BA.debugLineNum = 2921;BA.debugLine="Do While Not(impresoraConectada)";
if (true) break;

case 4:
//do while
this.state = 19;
while (parent.__c.Not(parent._impresoraconectada)) {
this.state = 6;
if (true) break;
}
if (true) break;

case 6:
//C
this.state = 7;
 //BA.debugLineNum = 2922;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 53;
return;
case 53:
//C
this.state = 7;
;
 //BA.debugLineNum = 2924;BA.debugLine="cont = cont + 1";
_cont = (int) (_cont+1);
 //BA.debugLineNum = 2925;BA.debugLine="If cont = 2 Then Printer1.Connect 'Tratamos de";
if (true) break;

case 7:
//if
this.state = 12;
if (_cont==2) { 
this.state = 9;
;}if (true) break;

case 9:
//C
this.state = 12;
parent._printer1._connect /*boolean*/ ();
if (true) break;

case 12:
//C
this.state = 13;
;
 //BA.debugLineNum = 2926;BA.debugLine="If cont > 3 Then impresoraConectada = True";
if (true) break;

case 13:
//if
this.state = 18;
if (_cont>3) { 
this.state = 15;
;}if (true) break;

case 15:
//C
this.state = 18;
parent._impresoraconectada = parent.__c.True;
if (true) break;

case 18:
//C
this.state = 4;
;
 if (true) break;

case 19:
//C
this.state = 38;
;
 //BA.debugLineNum = 2928;BA.debugLine="Sleep(500)";
parent.__c.Sleep(ba,this,(int) (500));
this.state = 54;
return;
case 54:
//C
this.state = 38;
;
 //BA.debugLineNum = 2929;BA.debugLine="impresoraConectada = False";
parent._impresoraconectada = parent.__c.False;
 if (true) break;

case 21:
//C
this.state = 22;
 //BA.debugLineNum = 2932;BA.debugLine="Printer1.Connect";
parent._printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 2933;BA.debugLine="Private cont As Int = 0";
_cont = (int) (0);
 //BA.debugLineNum = 2934;BA.debugLine="Do While Not(impresoraConectada) Or Not(Printer1";
if (true) break;

case 22:
//do while
this.state = 37;
while (parent.__c.Not(parent._impresoraconectada) || parent.__c.Not(parent._printer1._isconnected /*boolean*/ ())) {
this.state = 24;
if (true) break;
}
if (true) break;

case 24:
//C
this.state = 25;
 //BA.debugLineNum = 2935;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 55;
return;
case 55:
//C
this.state = 25;
;
 //BA.debugLineNum = 2937;BA.debugLine="cont = cont + 1";
_cont = (int) (_cont+1);
 //BA.debugLineNum = 2938;BA.debugLine="If cont = 2 Then Printer1.Connect";
if (true) break;

case 25:
//if
this.state = 30;
if (_cont==2) { 
this.state = 27;
;}if (true) break;

case 27:
//C
this.state = 30;
parent._printer1._connect /*boolean*/ ();
if (true) break;

case 30:
//C
this.state = 31;
;
 //BA.debugLineNum = 2939;BA.debugLine="If cont > 3 Then impresoraConectada = True";
if (true) break;

case 31:
//if
this.state = 36;
if (_cont>3) { 
this.state = 33;
;}if (true) break;

case 33:
//C
this.state = 36;
parent._impresoraconectada = parent.__c.True;
if (true) break;

case 36:
//C
this.state = 22;
;
 if (true) break;

case 37:
//C
this.state = 38;
;
 //BA.debugLineNum = 2941;BA.debugLine="Sleep(500)";
parent.__c.Sleep(ba,this,(int) (500));
this.state = 56;
return;
case 56:
//C
this.state = 38;
;
 //BA.debugLineNum = 2942;BA.debugLine="impresoraConectada = False";
parent._impresoraconectada = parent.__c.False;
 if (true) break;

case 38:
//C
this.state = 39;
;
 //BA.debugLineNum = 2945;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 2946;BA.debugLine="ESPACIO = 28";
parent._espacio = (int) (28);
 //BA.debugLineNum = 2947;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 2949;BA.debugLine="Printer1.WriteString(\"Izca Distribuciones\" &  CRL";
parent._printer1._writestring /*String*/ ("Izca Distribuciones"+parent.__c.CRLF);
 //BA.debugLineNum = 2950;BA.debugLine="Printer1.WriteString(sDate & \" \" &sTime &  CRLF)";
parent._printer1._writestring /*String*/ (_sdate+" "+_stime+parent.__c.CRLF);
 //BA.debugLineNum = 2952;BA.debugLine="Printer1.WriteString(\"------------ENTREGA--------";
parent._printer1._writestring /*String*/ ("------------ENTREGA-----------"+parent.__c.CRLF);
 //BA.debugLineNum = 2953;BA.debugLine="Private c As Cursor = Starter.skmt.ExecQuery(\"sel";
parent._c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
parent._c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select HVD_PRONOMBRE, IFNULL(SUM(HVD_RECHAZOCANT), 0) AS HVD_RECHAZOCANT, IFNULL(SUM(HVD_CANT), 0) AS HVD_CANT, (IFNULL(SUM(HVD_CANT), 0) - IFNULL(SUM(HVD_RECHAZOCANT), 0)) as total, HVD_PROID from HIST_VENTAS where HVD_PROID <> HVD_CODPROMO GROUP BY HVD_PROID order by HVD_PRONOMBRE asc")));
 //BA.debugLineNum = 2954;BA.debugLine="If c.RowCount > 0 Then";
if (true) break;

case 39:
//if
this.state = 52;
if (parent._c.getRowCount()>0) { 
this.state = 41;
}if (true) break;

case 41:
//C
this.state = 42;
 //BA.debugLineNum = 2955;BA.debugLine="For i = 0 To c.RowCount - 1";
if (true) break;

case 42:
//for
this.state = 51;
step46 = 1;
limit46 = (int) (parent._c.getRowCount()-1);
_i = (int) (0) ;
this.state = 57;
if (true) break;

case 57:
//C
this.state = 51;
if ((step46 > 0 && _i <= limit46) || (step46 < 0 && _i >= limit46)) this.state = 44;
if (true) break;

case 58:
//C
this.state = 57;
_i = ((int)(0 + _i + step46)) ;
if (true) break;

case 44:
//C
this.state = 45;
 //BA.debugLineNum = 2956;BA.debugLine="c.Position = i";
parent._c.setPosition(_i);
 //BA.debugLineNum = 2959;BA.debugLine="Private c3 As Cursor=Starter.skmt.ExecQuery($\"s";
_c3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c3 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select Ifnull(sum(PE_CANT),0) AS PE_CANT from PEDIDO WHERE PE_PROID ='"+parent.__c.SmartStringFormatter("",(Object)(parent._c.GetString("HVD_PROID")))+"'"))));
 //BA.debugLineNum = 2960;BA.debugLine="Private resta As String = 0";
_resta = BA.NumberToString(0);
 //BA.debugLineNum = 2962;BA.debugLine="If c3.RowCount > 0 Then";
if (true) break;

case 45:
//if
this.state = 50;
if (_c3.getRowCount()>0) { 
this.state = 47;
}else {
this.state = 49;
}if (true) break;

case 47:
//C
this.state = 50;
 //BA.debugLineNum = 2963;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
 //BA.debugLineNum = 2964;BA.debugLine="resta =  c3.GetString(\"PE_CANT\")";
_resta = _c3.GetString("PE_CANT");
 if (true) break;

case 49:
//C
this.state = 50;
 //BA.debugLineNum = 2966;BA.debugLine="resta = 0";
_resta = BA.NumberToString(0);
 if (true) break;

case 50:
//C
this.state = 58;
;
 //BA.debugLineNum = 2968;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 2969;BA.debugLine="Printer1.WriteString(c.GetString(\"HVD_PRONOMBRE";
parent._printer1._writestring /*String*/ (parent._c.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 2970;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 2971;BA.debugLine="Printer1.WriteString(\"TP: \"& c.GetInt(\"HVD_CANT";
parent._printer1._writestring /*String*/ ("TP: "+BA.NumberToString(parent._c.GetInt("HVD_CANT"))+"  ");
 //BA.debugLineNum = 2972;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 2973;BA.debugLine="Printer1.WriteString(\"   TE: \" & (c.GetInt(\"tot";
parent._printer1._writestring /*String*/ ("   TE: "+BA.NumberToString((parent._c.GetInt("total")+(double)(Double.parseDouble(_resta))))+"  ");
 //BA.debugLineNum = 2974;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 2975;BA.debugLine="Printer1.WriteString(\"   TR: \" & (c.GetInt(\"HVD";
parent._printer1._writestring /*String*/ ("   TR: "+BA.NumberToString((parent._c.GetInt("HVD_RECHAZOCANT")-(double)(Double.parseDouble(_resta))))+"  ");
 //BA.debugLineNum = 2976;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 2977;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2979;BA.debugLine="totalentrega = totalentrega + c.GetInt(\"total\")";
_totalentrega = (int) (_totalentrega+parent._c.GetInt("total")+(double)(Double.parseDouble(_resta)));
 //BA.debugLineNum = 2980;BA.debugLine="totalrechazo = totalrechazo + c.GetInt(\"HVD_REC";
_totalrechazo = (int) (_totalrechazo+parent._c.GetInt("HVD_RECHAZOCANT")-(double)(Double.parseDouble(_resta)));
 //BA.debugLineNum = 2981;BA.debugLine="totalpiezas = totalpiezas + c.GetInt(\"HVD_CANT\"";
_totalpiezas = (int) (_totalpiezas+parent._c.GetInt("HVD_CANT"));
 if (true) break;
if (true) break;

case 51:
//C
this.state = 52;
;
 if (true) break;

case 52:
//C
this.state = -1;
;
 //BA.debugLineNum = 2986;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 2987;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2988;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2989;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2991;BA.debugLine="Printer1.WriteString(\"Total Piezas:  \"& totalpiez";
parent._printer1._writestring /*String*/ ("Total Piezas:  "+BA.NumberToString(_totalpiezas)+parent.__c.CRLF);
 //BA.debugLineNum = 2992;BA.debugLine="Printer1.WriteString(\"Total Entrega:  \"& totalent";
parent._printer1._writestring /*String*/ ("Total Entrega:  "+BA.NumberToString(_totalentrega)+parent.__c.CRLF);
 //BA.debugLineNum = 2993;BA.debugLine="Printer1.WriteString(\"Total Rechazo:  \"& totalrec";
parent._printer1._writestring /*String*/ ("Total Rechazo:  "+BA.NumberToString(_totalrechazo)+parent.__c.CRLF);
 //BA.debugLineNum = 2996;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 2997;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 2998;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2999;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 3000;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 3001;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 59;
return;
case 59:
//C
this.state = -1;
;
 //BA.debugLineNum = 3002;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 3004;BA.debugLine="ProgressDialogHide";
parent.__c.ProgressDialogHide();
 //BA.debugLineNum = 3005;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b_mapa_click() throws Exception{
 //BA.debugLineNum = 2099;BA.debugLine="Sub b_mapa_Click";
 //BA.debugLineNum = 2101;BA.debugLine="B4XPages.ShowPage(\"mapas\")";
_b4xpages._showpage /*String*/ (ba,"mapas");
 //BA.debugLineNum = 2102;BA.debugLine="End Sub";
return "";
}
public String  _b_rechazos_click() throws Exception{
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
int _i = 0;
String _itemtext = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _c3 = null;
String _resta = "";
 //BA.debugLineNum = 2449;BA.debugLine="Private Sub b_rechazos_Click";
 //BA.debugLineNum = 2450;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 2451;BA.debugLine="label1 = lv_prod_Prin.SingleLineLayout.Label";
_label1 = _lv_prod_prin.getSingleLineLayout().Label;
 //BA.debugLineNum = 2452;BA.debugLine="label1.TextSize = 14";
_label1.setTextSize((float) (14));
 //BA.debugLineNum = 2453;BA.debugLine="p_prod.Width = Root.Width";
_p_prod.setWidth(_root.getWidth());
 //BA.debugLineNum = 2454;BA.debugLine="p_prod.Height = Root.Height";
_p_prod.setHeight(_root.getHeight());
 //BA.debugLineNum = 2457;BA.debugLine="b_regreso.Top = p_prod.Height - b_regreso.Height";
_b_regreso.setTop((int) (_p_prod.getHeight()-_b_regreso.getHeight()));
 //BA.debugLineNum = 2458;BA.debugLine="b_impresion_rec.Top = p_prod.Height - b_impresion";
_b_impresion_rec.setTop((int) (_p_prod.getHeight()-_b_impresion_rec.getHeight()));
 //BA.debugLineNum = 2460;BA.debugLine="p_prod.Visible = True";
_p_prod.setVisible(__c.True);
 //BA.debugLineNum = 2461;BA.debugLine="p_prod.BringToFront";
_p_prod.BringToFront();
 //BA.debugLineNum = 2463;BA.debugLine="If l_ctast.Text = \"0\" Then";
if ((_l_ctast.getText()).equals("0")) { 
 //BA.debugLineNum = 2464;BA.debugLine="b_impresion_rec.Enabled = True";
_b_impresion_rec.setEnabled(__c.True);
 }else if((_l_ctast.getText()).equals("0") == false) { 
 //BA.debugLineNum = 2466;BA.debugLine="b_impresion_rec.Enabled = False";
_b_impresion_rec.setEnabled(__c.False);
 };
 //BA.debugLineNum = 2470;BA.debugLine="Private c As Cursor = Starter.skmt.ExecQuery(\"sel";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_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 HVD_PRONOMBRE, IFNULL(SUM(HVD_RECHAZOCANT), 0) AS HVD_RECHAZOCANT, HVD_PROID from HIST_VENTAS WHERE hvd_rechazo <> 2 and HVD_RECHAZOCANT > 0 GROUP BY HVD_PROID order by HVD_PRONOMBRE asc")));
 //BA.debugLineNum = 2472;BA.debugLine="lv_prod_Prin.SingleLineLayout.Label.TextColor = C";
_lv_prod_prin.getSingleLineLayout().Label.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 2473;BA.debugLine="lv_prod_Prin.Clear";
_lv_prod_prin.Clear();
 //BA.debugLineNum = 2474;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 2475;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step19 = 1;
final int limit19 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit19 ;_i = _i + step19 ) {
 //BA.debugLineNum = 2476;BA.debugLine="c.Position = i";
_c.setPosition(_i);
 //BA.debugLineNum = 2477;BA.debugLine="Dim itemText As String";
_itemtext = "";
 //BA.debugLineNum = 2479;BA.debugLine="Private c3 As Cursor=Starter.skmt.ExecQuery($\"s";
_c3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c3 = (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(sum(PE_CANT),0) AS PE_CANT from PEDIDO WHERE PE_PROID ='"+__c.SmartStringFormatter("",(Object)(_c.GetString("HVD_PROID")))+"'"))));
 //BA.debugLineNum = 2480;BA.debugLine="Private resta As String = 0";
_resta = BA.NumberToString(0);
 //BA.debugLineNum = 2482;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
 //BA.debugLineNum = 2483;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
 //BA.debugLineNum = 2484;BA.debugLine="resta =  c3.GetString(\"PE_CANT\")";
_resta = _c3.GetString("PE_CANT");
 }else {
 //BA.debugLineNum = 2486;BA.debugLine="resta = 0";
_resta = BA.NumberToString(0);
 };
 //BA.debugLineNum = 2488;BA.debugLine="If ( c.GetInt(\"HVD_RECHAZOCANT\") - resta) <= 0";
if ((_c.GetInt("HVD_RECHAZOCANT")-(double)(Double.parseDouble(_resta)))<=0) { 
 }else {
 //BA.debugLineNum = 2491;BA.debugLine="itemText = $\"${c.GetString(\"HVD_PRONOMBRE\")} $";
_itemtext = (""+__c.SmartStringFormatter("",(Object)(_c.GetString("HVD_PRONOMBRE")))+" "+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Inventario: "+__c.SmartStringFormatter("",(Object)((_c.GetInt("HVD_RECHAZOCANT")-(double)(Double.parseDouble(_resta)))))+"");
 //BA.debugLineNum = 2492;BA.debugLine="lv_prod_Prin.AddSingleLine(itemText)";
_lv_prod_prin.AddSingleLine(BA.ObjectToCharSequence(_itemtext));
 };
 }
};
 }else {
 //BA.debugLineNum = 2498;BA.debugLine="lv_prod_Prin.AddSingleLine(\"No hay datos disponi";
_lv_prod_prin.AddSingleLine(BA.ObjectToCharSequence("No hay datos disponibles."));
 };
 //BA.debugLineNum = 2500;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 2503;BA.debugLine="End Sub";
return "";
}
public String  _b_regresa_click() throws Exception{
 //BA.debugLineNum = 2402;BA.debugLine="Sub B_REGRESA_Click";
 //BA.debugLineNum = 2403;BA.debugLine="Log(\"B_REGRESA_Click\")";
__c.LogImpl("515532033","B_REGRESA_Click",0);
 //BA.debugLineNum = 2404;BA.debugLine="BUSCA.Visible = False";
_busca.setVisible(__c.False);
 //BA.debugLineNum = 2405;BA.debugLine="connecta.Visible = True";
_connecta.setVisible(__c.True);
 //BA.debugLineNum = 2406;BA.debugLine="trabajar.Visible = True";
_trabajar.setVisible(__c.True);
 //BA.debugLineNum = 2407;BA.debugLine="B_CLIEPROD.Visible = True";
_b_clieprod.setVisible(__c.True);
 //BA.debugLineNum = 2408;BA.debugLine="Panel1.Visible = False";
_panel1.setVisible(__c.False);
 //BA.debugLineNum = 2409;BA.debugLine="Btn_Ubicar_Ru.Visible=True";
_btn_ubicar_ru.setVisible(__c.True);
 //BA.debugLineNum = 2410;BA.debugLine="End Sub";
return "";
}
public String  _b_regreso_click() throws Exception{
 //BA.debugLineNum = 2505;BA.debugLine="Private Sub b_regreso_Click";
 //BA.debugLineNum = 2506;BA.debugLine="p_prod.Visible = False";
_p_prod.setVisible(__c.False);
 //BA.debugLineNum = 2507;BA.debugLine="End Sub";
return "";
}
public String  _b_tabulador_click() throws Exception{
 //BA.debugLineNum = 2423;BA.debugLine="Private Sub b_tabulador_Click";
 //BA.debugLineNum = 2424;BA.debugLine="If b_check.Visible = True Then";
if (_b_check.getVisible()==__c.True) { 
 //BA.debugLineNum = 2425;BA.debugLine="MsgboxAsync(\"Favor de hacer el checklist.\",\"Aten";
__c.MsgboxAsync(BA.ObjectToCharSequence("Favor de hacer el checklist."),BA.ObjectToCharSequence("Atención"),ba);
 }else {
 //BA.debugLineNum = 2427;BA.debugLine="B4XPages.ShowPage(\"tabulador\")";
_b4xpages._showpage /*String*/ (ba,"tabulador");
 };
 //BA.debugLineNum = 2429;BA.debugLine="End Sub";
return "";
}
public String  _b_venta_emp_click() throws Exception{
 //BA.debugLineNum = 2513;BA.debugLine="Private Sub b_venta_emp_Click";
 //BA.debugLineNum = 2514;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CUENTAA\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CUENTAA");
 //BA.debugLineNum = 2515;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO CUENTAA V";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("63403")}));
 //BA.debugLineNum = 2516;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 //BA.debugLineNum = 2517;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear() throws Exception{
int _i = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _numticks = null;
String _monto_rec_dia = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _rc = null;
int _i3 = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc = null;
int _i4 = 0;
anywheresoftware.b4a.objects.collections.Map _entmap = null;
anywheresoftware.b4a.objects.collections.Map _rechmap = null;
anywheresoftware.b4a.objects.collections.Map _vendmap = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _cancelrecha = null;
int _h54 = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _r5 = null;
String _rescant = "";
int _j4 = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _r6 = null;
String _totalcantped = "";
double _rescant2 = 0;
int _j5 = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _r5r = null;
String _rescantr = "";
int _j4r = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _r6r = null;
String _rescant2r = "";
int _j5r = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _r55 = null;
double _rescant3 = 0;
int _r75 = 0;
double _rescant4 = 0;
double _rescant5 = 0;
double _rescant6 = 0;
double _rescant7 = 0;
double _rescant10 = 0;
int _pztotal = 0;
int _pztotal2 = 0;
double _rescant11 = 0;
int _pztotal3 = 0;
double _rescant12 = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _g8 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _g11 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _g12 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _g13 = null;
 //BA.debugLineNum = 196;BA.debugLine="Sub B4XPage_Appear";
 //BA.debugLineNum = 198;BA.debugLine="Private c As Cursor = Starter.skmt.ExecQuery(\"SEL";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_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 * FROM NOVENTA WHERE NV_MOTIVO = 'ENTREGA' AND NV_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 199;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 200;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from NOVENTA w";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from NOVENTA where NV_MOTIVO <> 'ENTREGA' AND NV_CLIENTE IN (SELECT CUENTA FROM CUENTAA)");
 };
 //BA.debugLineNum = 203;BA.debugLine="Private c As Cursor = Starter.skmt.ExecQuery(\"SEL";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_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 * FROM NOVENTA")));
 //BA.debugLineNum = 204;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 205;BA.debugLine="Starter.skmt.ExecNonQuery(\"Update kmt_info set g";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("Update kmt_info set gestion = 2  WHERE CAT_CL_CODIGO IN (SELECT NV_CLIENTE FROM NOVENTA WHERE NV_MOTIVO = 'ENTREGA')");
 };
 //BA.debugLineNum = 207;BA.debugLine="Private c As Cursor = Starter.skmt.ExecQuery(\"SEL";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_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 NV_CLIENTE FROM NOVENTA")));
 //BA.debugLineNum = 208;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 209;BA.debugLine="Starter.skmt.ExecNonQuery(\"Update kmt_info set g";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("Update kmt_info set gestion = 3  WHERE CAT_CL_CODIGO IN (SELECT NV_CLIENTE FROM NOVENTA WHERE NV_MOTIVO <> 'ENTREGA')");
 };
 //BA.debugLineNum = 212;BA.debugLine="b_check.visible = False";
_b_check.setVisible(__c.False);
 //BA.debugLineNum = 213;BA.debugLine="Subs.centraPanel(p_principal, Root.Width)";
_subs._centrapanel /*String*/ (ba,_p_principal,_root.getWidth());
 //BA.debugLineNum = 226;BA.debugLine="If EJECUTANDO = 0 Then";
if ((_ejecutando).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 227;BA.debugLine="Listo1 = 0";
_listo1 = BA.NumberToString(0);
 //BA.debugLineNum = 228;BA.debugLine="Listo2 = 0";
_listo2 = BA.NumberToString(0);
 //BA.debugLineNum = 229;BA.debugLine="Listo3 = 0";
_listo3 = BA.NumberToString(0);
 //BA.debugLineNum = 230;BA.debugLine="Listo4 = 0";
_listo4 = BA.NumberToString(0);
 //BA.debugLineNum = 231;BA.debugLine="Listo5 = 0";
_listo5 = BA.NumberToString(0);
 //BA.debugLineNum = 232;BA.debugLine="inve = 0";
_inve = BA.NumberToString(0);
 //BA.debugLineNum = 233;BA.debugLine="img2.Visible =False";
_img2.setVisible(__c.False);
 };
 //BA.debugLineNum = 235;BA.debugLine="l_ruta.Text = 0";
_l_ruta.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 236;BA.debugLine="f=Starter.skmt.ExecQuery(\"select rutaa from rutaa";
_f = (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 = 237;BA.debugLine="If f.RowCount > 0 Then";
if (_f.getRowCount()>0) { 
 //BA.debugLineNum = 238;BA.debugLine="f.Position = 0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 239;BA.debugLine="l_ruta.Text = f.GetString(\"RUTAA\")";
_l_ruta.setText(BA.ObjectToCharSequence(_f.GetString("RUTAA")));
 };
 //BA.debugLineNum = 241;BA.debugLine="f.Close";
_f.Close();
 //BA.debugLineNum = 242;BA.debugLine="If l_ruta.Text = 0 Then";
if ((_l_ruta.getText()).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 243;BA.debugLine="l_ruta.Text = 0";
_l_ruta.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 244;BA.debugLine="l_rutasP.Text = 0";
_l_rutasp.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 245;BA.debugLine="l_numtickets.Text = 0";
_l_numtickets.setText(BA.ObjectToCharSequence(0));
 }else {
 //BA.debugLineNum = 247;BA.debugLine="f=Starter.skmt.ExecQuery(\"select distinct CAT_CL";
_f = (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 distinct CAT_CL_RUTA from kmt_info WHERE CAT_CL_RUTA <> 1000 order by CAT_CL_RUTA")));
 //BA.debugLineNum = 249;BA.debugLine="l_rutasP.Text = \"\"";
_l_rutasp.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 250;BA.debugLine="For i = 0 To f.RowCount - 1";
{
final int step38 = 1;
final int limit38 = (int) (_f.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit38 ;_i = _i + step38 ) {
 //BA.debugLineNum = 251;BA.debugLine="f.Position = i";
_f.setPosition(_i);
 //BA.debugLineNum = 252;BA.debugLine="If i = 0 Then";
if (_i==0) { 
 //BA.debugLineNum = 253;BA.debugLine="l_rutasP.Text = f.GetString(\"CAT_CL_RUTA\")";
_l_rutasp.setText(BA.ObjectToCharSequence(_f.GetString("CAT_CL_RUTA")));
 }else {
 //BA.debugLineNum = 255;BA.debugLine="l_rutasP.Text = l_rutasP.Text & \", \" & f.GetSt";
_l_rutasp.setText(BA.ObjectToCharSequence(_l_rutasp.getText()+", "+_f.GetString("CAT_CL_RUTA")));
 };
 }
};
 //BA.debugLineNum = 258;BA.debugLine="f.Close";
_f.Close();
 //BA.debugLineNum = 260;BA.debugLine="Dim numticks As Cursor = Starter.skmt.ExecQuery(";
_numticks = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_numticks = (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 COUNT(distinct HVD_NUM_TICKET) AS TICKET from HIST_VENTAS")));
 //BA.debugLineNum = 261;BA.debugLine="numticks.Position = 0";
_numticks.setPosition((int) (0));
 //BA.debugLineNum = 262;BA.debugLine="l_numtickets.Text = numticks.GetInt(\"TICKET\")";
_l_numtickets.setText(BA.ObjectToCharSequence(_numticks.GetInt("TICKET")));
 };
 //BA.debugLineNum = 264;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 265;BA.debugLine="fecha=DateTime.Date(DateTime.Now)";
_fecha = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 266;BA.debugLine="b=Starter.skmt.ExecQuery(\"Select count(*) as CUAN";
_b = (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 count(*) as CUANTOS from kmt_info")));
 //BA.debugLineNum = 267;BA.debugLine="b.Position=0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 268;BA.debugLine="If b.RowCount > 0 Then Cuantos = b.GetString(\"CUA";
if (_b.getRowCount()>0) { 
_cuantos = _b.GetString("CUANTOS");};
 //BA.debugLineNum = 269;BA.debugLine="d=Starter.skmt.ExecQuery(\"select count(*) as TOTA";
_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 count(*) as TOTAL_VISITAR from kmt_info where gestion = 0 AND CAT_CL_RUTA <> 1000")));
 //BA.debugLineNum = 270;BA.debugLine="D.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 271;BA.debugLine="b.Close";
_b.Close();
 //BA.debugLineNum = 272;BA.debugLine="e=Starter.skmt.ExecQuery(\"select count(*) as POR_";
_e = (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 count(*) as POR_VISITAR from kmt_info WHERE CAT_CL_RUTA <> 1000")));
 //BA.debugLineNum = 273;BA.debugLine="e.Position=0";
_e.setPosition((int) (0));
 //BA.debugLineNum = 284;BA.debugLine="cargar.Visible = False";
_cargar.setVisible(__c.False);
 //BA.debugLineNum = 285;BA.debugLine="Subir.Visible = False";
_subir.setVisible(__c.False);
 //BA.debugLineNum = 286;BA.debugLine="connecta.Visible = True";
_connecta.setVisible(__c.True);
 //BA.debugLineNum = 288;BA.debugLine="If Cuantos = 0 Then";
if ((_cuantos).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 289;BA.debugLine="l_aLiquidar.Text = 0";
_l_aliquidar.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 290;BA.debugLine="l_cuantosc.Text = 0";
_l_cuantosc.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 291;BA.debugLine="l_cuantosn.Text = 0";
_l_cuantosn.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 292;BA.debugLine="drop = 0";
_drop = 0;
 //BA.debugLineNum = 293;BA.debugLine="l_montoSalida.Text = 0";
_l_montosalida.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 294;BA.debugLine="efectiva = 0";
_efectiva = 0;
 //BA.debugLineNum = 297;BA.debugLine="L_MONTOE.Text = 0";
_l_montoe.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 298;BA.debugLine="l_ctast.Text = 0";
_l_ctast.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 299;BA.debugLine="If d.RowCount > 0 Then l_ctast.Text = d.GetStrin";
if (_d.getRowCount()>0) { 
_l_ctast.setText(BA.ObjectToCharSequence(_d.GetString("TOTAL_VISITAR")));};
 //BA.debugLineNum = 300;BA.debugLine="l_porvisitar.Text = 0";
_l_porvisitar.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 301;BA.debugLine="If e.RowCount > 0 Then l_porvisitar.Text = e.Get";
if (_e.getRowCount()>0) { 
_l_porvisitar.setText(BA.ObjectToCharSequence(_e.GetString("POR_VISITAR")));};
 //BA.debugLineNum = 302;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 303;BA.debugLine="e.Close";
_e.Close();
 }else {
 //BA.debugLineNum = 305;BA.debugLine="c=Starter.skmt.ExecQuery(\"select sum(hvd_costo_t";
_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 sum(hvd_costo_tot) as MONTO_DIA  from hist_ventas where hvd_cliente in (select cat_cl_codigo from kmt_info ) AND HVD_ESTATUS = 1 ")));
 //BA.debugLineNum = 306;BA.debugLine="f1=Starter.skmt.ExecQuery(\"select sum(hvd_costo_";
_f1 = (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(hvd_costo_tot) as MONTO_TOTAL_DIA from hist_ventas2 where hvd_cliente in (select cat_cl_codigo from kmt_info ) AND HVD_RECHAZO = 0")));
 //BA.debugLineNum = 307;BA.debugLine="f2=Starter.skmt.ExecQuery(\"select sum(REP_COSTO_";
_f2 = (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(REP_COSTO_TOT) as MONTO_REC_DIA FROM REPARTO where REP_cliente in (Select cat_cl_codigo from kmt_info)")));
 //BA.debugLineNum = 309;BA.debugLine="b=Starter.skmt.ExecQuery(\"select count(DISTINCT";
_b = (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 count(DISTINCT NV_CLIENTE) as CUANTOS from noventa where nv_motivo <> 'ENTREGA' and NV_CLIENTE <> 63403")));
 //BA.debugLineNum = 311;BA.debugLine="L=Starter.skmt.ExecQuery(\"select count(DISTINCT";
_l = (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 count(DISTINCT NV_CLIENTE) as CLIENTES_DIA from noventa where nv_motivo = 'ENTREGA' and NV_CLIENTE <> 63403")));
 //BA.debugLineNum = 312;BA.debugLine="f2.Position=0";
_f2.setPosition((int) (0));
 //BA.debugLineNum = 315;BA.debugLine="Private MONTO_REC_DIA = 0";
_monto_rec_dia = BA.NumberToString(0);
 //BA.debugLineNum = 316;BA.debugLine="If f2.GetString(\"MONTO_REC_DIA\") <> Null Then MO";
if (_f2.GetString("MONTO_REC_DIA")!= null) { 
_monto_rec_dia = _f2.GetString("MONTO_REC_DIA");};
 //BA.debugLineNum = 327;BA.debugLine="C.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 328;BA.debugLine="b.Position = 0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 329;BA.debugLine="L.Position = 0";
_l.setPosition((int) (0));
 //BA.debugLineNum = 330;BA.debugLine="f1.Position = 0";
_f1.setPosition((int) (0));
 //BA.debugLineNum = 331;BA.debugLine="l_aLiquidar.Text = 0";
_l_aliquidar.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 332;BA.debugLine="If f1.RowCount > 0 Then l_aLiquidar.Text = to_nu";
if (_f1.getRowCount()>0) { 
_l_aliquidar.setText(BA.ObjectToCharSequence(_to_number_vb((Object)(_f1.GetString("MONTO_TOTAL_DIA")))));};
 //BA.debugLineNum = 333;BA.debugLine="L_MONTOE.Text = 0";
_l_montoe.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 335;BA.debugLine="l_cuantosc.Text = 0";
_l_cuantosc.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 336;BA.debugLine="If L.RowCount > 0 Then l_cuantosc.Text = L.GetSt";
if (_l.getRowCount()>0) { 
_l_cuantosc.setText(BA.ObjectToCharSequence(_l.GetString("CLIENTES_DIA")));};
 //BA.debugLineNum = 337;BA.debugLine="l_cuantosn.Text = 0";
_l_cuantosn.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 338;BA.debugLine="If b.RowCount > 0 Then l_cuantosn.Text = b.GetSt";
if (_b.getRowCount()>0) { 
_l_cuantosn.setText(BA.ObjectToCharSequence(_b.GetString("CUANTOS")));};
 //BA.debugLineNum = 340;BA.debugLine="If f1.GetString(\"MONTO_TOTAL_DIA\") <> Null Then";
if (_f1.GetString("MONTO_TOTAL_DIA")!= null) { 
_l_montosalida.setText(BA.ObjectToCharSequence(__c.Round2((double)(Double.parseDouble(_f1.GetString("MONTO_TOTAL_DIA"))),(int) (2))));};
 //BA.debugLineNum = 342;BA.debugLine="l_ctast.Text = 0";
_l_ctast.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 343;BA.debugLine="If d.RowCount > 0 Then l_ctast.Text = d.GetStrin";
if (_d.getRowCount()>0) { 
_l_ctast.setText(BA.ObjectToCharSequence(_d.GetString("TOTAL_VISITAR")));};
 //BA.debugLineNum = 344;BA.debugLine="l_porvisitar.Text = 0";
_l_porvisitar.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 345;BA.debugLine="If e.RowCount > 0 Then l_porvisitar.Text = e.Get";
if (_e.getRowCount()>0) { 
_l_porvisitar.setText(BA.ObjectToCharSequence(_e.GetString("POR_VISITAR")));};
 //BA.debugLineNum = 346;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 347;BA.debugLine="b.Close";
_b.Close();
 //BA.debugLineNum = 358;BA.debugLine="c.Close";
_c.Close();
 };
 //BA.debugLineNum = 360;BA.debugLine="c=Starter.skmt.ExecQuery(\"select  ID_ALMACEN from";
_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  ID_ALMACEN from CAT_ALMACEN")));
 //BA.debugLineNum = 361;BA.debugLine="C.Position =0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 362;BA.debugLine="ALMACEN = 0";
_almacen = BA.NumberToString(0);
 //BA.debugLineNum = 363;BA.debugLine="If C.RowCount > 0 Then ALMACEN = C.GetString(\"ID_";
if (_c.getRowCount()>0) { 
_almacen = _c.GetString("ID_ALMACEN");};
 //BA.debugLineNum = 364;BA.debugLine="B4XPages.MainPage.almacen = ALMACEN";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._almacen /*String*/  = _almacen;
 //BA.debugLineNum = 365;BA.debugLine="C.Close";
_c.Close();
 //BA.debugLineNum = 366;BA.debugLine="c=Starter.skmt.ExecQuery(\"select HGDATE, HGLAT, H";
_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 HGDATE, HGLAT, HGLON from HIST_GPS")));
 //BA.debugLineNum = 368;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 369;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step115 = 1;
final int limit115 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit115 ;_i = _i + step115 ) {
 //BA.debugLineNum = 370;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 371;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 372;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 373;BA.debugLine="cmd.Name = \"insert_gps_actual_REP\"";
_cmd.Name /*String*/  = "insert_gps_actual_REP";
 //BA.debugLineNum = 374;BA.debugLine="cmd.Parameters = Array As Object(c.GetString(\"h";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_c.GetString("hgdate")),(Object)(_c.GetString("hglat")),(Object)(_c.GetString("hglon")),(Object)(_usuario)};
 }
};
 };
 //BA.debugLineNum = 378;BA.debugLine="bu.Initialize";
_bu._initialize /*String*/ (ba);
 //BA.debugLineNum = 379;BA.debugLine="batterystatus = bu.BatteryInformation";
_batterystatus = _bu._getbatteryinformation /*int[]*/ ();
 //BA.debugLineNum = 381;BA.debugLine="B4XPages.MainPage.batt = batterystatus(0)";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._batt /*int*/  = _batterystatus[(int) (0)];
 //BA.debugLineNum = 382;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 = 383;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 384;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 385;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 386;BA.debugLine="c=Starter.skmt.ExecQuery(\"select RUTAA from RUTAA";
_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 RUTAA from RUTAA")));
 //BA.debugLineNum = 387;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 388;BA.debugLine="RUTA_T = 0";
_ruta_t = BA.NumberToString(0);
 //BA.debugLineNum = 389;BA.debugLine="If c.RowCount > 0 Then RUTA_T = c.GetString(\"RUTA";
if (_c.getRowCount()>0) { 
_ruta_t = _c.GetString("RUTAA");};
 //BA.debugLineNum = 390;BA.debugLine="B4XPages.MainPage.rutaPreventa = RUTA_T";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._rutapreventa /*String*/  = _ruta_t;
 //BA.debugLineNum = 391;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 392;BA.debugLine="reqs.Initialize";
_reqs.Initialize();
 //BA.debugLineNum = 394;BA.debugLine="Private rc As Cursor = Starter.skmt.ExecQuery($\"s";
_rc = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_rc = (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 REPARTO where REP_RECHAZO = \"1\" and REP_CANT > 0"))));
 //BA.debugLineNum = 396;BA.debugLine="If rc.RowCount > 0 Then";
if (_rc.getRowCount()>0) { 
 //BA.debugLineNum = 397;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from RECHAZOS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from RECHAZOS"));
 //BA.debugLineNum = 398;BA.debugLine="For i3=0 To rc.RowCount -1 'Copiamos los rechazo";
{
final int step140 = 1;
final int limit140 = (int) (_rc.getRowCount()-1);
_i3 = (int) (0) ;
for (;_i3 <= limit140 ;_i3 = _i3 + step140 ) {
 //BA.debugLineNum = 399;BA.debugLine="rc.Position = i3";
_rc.setPosition(_i3);
 //BA.debugLineNum = 402;BA.debugLine="Starter.skmt.ExecNonQuery($\"insert into RECHAZO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("insert into RECHAZOS(R_FECHA, R_CLIENTE, R_CLI_ORIG, R_PRODID, R_CANT, R_RECHAZO, R_PRECIO) select REP_FECHA, REP_CLIENTE, REP_CLI_ORIG, REP_PRODID, REP_CANT, REP_RECHAZO, REP_PRECIO from REPARTO where REP_CLIENTE = '"+__c.SmartStringFormatter("",(Object)(_rc.GetString("REP_CLIENTE")))+"' and REP_CLI_ORIG = '"+__c.SmartStringFormatter("",(Object)(_rc.GetString("REP_CLI_ORIG")))+"' and REP_PRODID = '"+__c.SmartStringFormatter("",(Object)(_rc.GetString("REP_PRODID")))+"' and REP_RECHAZO = '1' and REP_CANT > 0"));
 }
};
 };
 //BA.debugLineNum = 405;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 * from REPARTO where REP_RECHAZO = \"0\" and REP_CANT > 0"))));
 //BA.debugLineNum = 407;BA.debugLine="If vc.RowCount > 0 Then";
if (_vc.getRowCount()>0) { 
 //BA.debugLineNum = 408;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from VENTAS\"$";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from VENTAS"));
 //BA.debugLineNum = 409;BA.debugLine="For i4=0 To vc.RowCount -1 'Copiamos las ventas";
{
final int step148 = 1;
final int limit148 = (int) (_vc.getRowCount()-1);
_i4 = (int) (0) ;
for (;_i4 <= limit148 ;_i4 = _i4 + step148 ) {
 //BA.debugLineNum = 410;BA.debugLine="vc.Position = i4";
_vc.setPosition(_i4);
 //BA.debugLineNum = 413;BA.debugLine="Starter.skmt.ExecNonQuery($\"insert into VENTAS(";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("insert into VENTAS(V_FECHA, V_CLIENTE, V_CLI_ORIG, V_PRODID, V_CANT, V_RECHAZO, V_PRECIO) select REP_FECHA, REP_CLIENTE, REP_CLI_ORIG, REP_PRODID, REP_CANT, REP_RECHAZO, REP_PRECIO from REPARTO where REP_CLIENTE = '"+__c.SmartStringFormatter("",(Object)(_vc.GetString("REP_CLIENTE")))+"' and REP_CLI_ORIG = '"+__c.SmartStringFormatter("",(Object)(_vc.GetString("REP_CLI_ORIG")))+"' and REP_PRODID = '"+__c.SmartStringFormatter("",(Object)(_vc.GetString("REP_PRODID")))+"' and REP_RECHAZO = '0' and REP_CANT > 0"));
 }
};
 };
 //BA.debugLineNum = 416;BA.debugLine="Starter.ENVIA_ULTIMA_GPS";
_starter._envia_ultima_gps /*String*/ ();
 //BA.debugLineNum = 421;BA.debugLine="Dim entMap As Map = Subs.traeEntregados";
_entmap = new anywheresoftware.b4a.objects.collections.Map();
_entmap = _subs._traeentregados /*anywheresoftware.b4a.objects.collections.Map*/ (ba);
 //BA.debugLineNum = 422;BA.debugLine="Dim rechMap As Map = Subs.traeRechazados";
_rechmap = new anywheresoftware.b4a.objects.collections.Map();
_rechmap = _subs._traerechazados /*anywheresoftware.b4a.objects.collections.Map*/ (ba);
 //BA.debugLineNum = 423;BA.debugLine="Dim vendMap As Map = Subs.traeVendidos";
_vendmap = new anywheresoftware.b4a.objects.collections.Map();
_vendmap = _subs._traevendidos /*anywheresoftware.b4a.objects.collections.Map*/ (ba);
 //BA.debugLineNum = 424;BA.debugLine="l_aLiquidar.Text = entMap.Get(\"monto\") + vendMap.";
_l_aliquidar.setText(BA.ObjectToCharSequence((double)(BA.ObjectToNumber(_entmap.Get((Object)("monto"))))+(double)(BA.ObjectToNumber(_vendmap.Get((Object)("monto"))))));
 //BA.debugLineNum = 426;BA.debugLine="Dim cancelrecha As Cursor = Starter.skmt.ExecQuer";
_cancelrecha = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_cancelrecha = (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(HVD_RECHAZOCANT,0), HVD_RECHAZO, CONSECUTIVO FROM HIST_VENTAS")));
 //BA.debugLineNum = 427;BA.debugLine="If cancelrecha.RowCount > 0 Then";
if (_cancelrecha.getRowCount()>0) { 
 //BA.debugLineNum = 428;BA.debugLine="For h54 = 0 To cancelrecha.RowCount - 1";
{
final int step160 = 1;
final int limit160 = (int) (_cancelrecha.getRowCount()-1);
_h54 = (int) (0) ;
for (;_h54 <= limit160 ;_h54 = _h54 + step160 ) {
 //BA.debugLineNum = 429;BA.debugLine="cancelrecha.Position = h54";
_cancelrecha.setPosition(_h54);
 //BA.debugLineNum = 430;BA.debugLine="Starter.skmt.ExecNonQuery2(\"Update HIST_VENTAS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("Update HIST_VENTAS set HVD_RECHAZO = '0'  WHERE CONSECUTIVO = ? and (HVD_RECHAZOCANT = 0 OR HVD_RECHAZOCANT IS NULL)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_cancelrecha.GetString("CONSECUTIVO")}));
 }
};
 };
 //BA.debugLineNum = 433;BA.debugLine="cancelrecha.Close";
_cancelrecha.Close();
 //BA.debugLineNum = 437;BA.debugLine="Private r5 As Cursor = Starter.skmt.ExecQuery($\"s";
_r5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r5 = (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(HVD_COSTO_TOT,0) AS HVD_COSTO_TOT, IFNULL(HVD_CANT,0) AS HVD_CANT, IFNULL(HVD_RECHAZOCANT,0) AS HVD_RECHAZOCANT, HVD_PROID, HVD_CLIENTE, CONSECUTIVO from HIST_VENTAS where HVD_RECHAZO = '1' and BCAJAS = '0' ORDER BY HVD_PROID "))));
 //BA.debugLineNum = 439;BA.debugLine="Private rescant As String = 0";
_rescant = BA.NumberToString(0);
 //BA.debugLineNum = 440;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 441;BA.debugLine="For j4 = 0 To r5.RowCount -1";
{
final int step169 = 1;
final int limit169 = (int) (_r5.getRowCount()-1);
_j4 = (int) (0) ;
for (;_j4 <= limit169 ;_j4 = _j4 + step169 ) {
 //BA.debugLineNum = 442;BA.debugLine="r5.Position = j4";
_r5.setPosition(_j4);
 //BA.debugLineNum = 443;BA.debugLine="Private r6 As Cursor = Starter.skmt.ExecQuery($";
_r6 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r6 = (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(SUM(PE_CANT),0) AS PE_CANT from PEDIDO where PE_CLIENTEOR = '"+__c.SmartStringFormatter("",(Object)(_r5.GetString("HVD_CLIENTE")))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_r5.GetString("HVD_PROID")))+"' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_r5.GetString("CONSECUTIVO")))+"' "))));
 //BA.debugLineNum = 444;BA.debugLine="Dim totalcantped As String";
_totalcantped = "";
 //BA.debugLineNum = 445;BA.debugLine="If r6.RowCount > 0 Then";
if (_r6.getRowCount()>0) { 
 //BA.debugLineNum = 446;BA.debugLine="r6.Position = 0";
_r6.setPosition((int) (0));
 //BA.debugLineNum = 447;BA.debugLine="totalcantped = r6.GetString(\"PE_CANT\")";
_totalcantped = _r6.GetString("PE_CANT");
 }else {
 //BA.debugLineNum = 450;BA.debugLine="totalcantped = 0";
_totalcantped = BA.NumberToString(0);
 };
 //BA.debugLineNum = 453;BA.debugLine="Log(r5.GetString(\"HVD_RECHAZOCANT\") &\" - \"& tot";
__c.LogImpl("514352641",_r5.GetString("HVD_RECHAZOCANT")+" - "+_totalcantped,0);
 //BA.debugLineNum = 454;BA.debugLine="rescant = rescant + ((r5.GetString(\"HVD_COSTO_T";
_rescant = BA.NumberToString((double)(Double.parseDouble(_rescant))+(((double)(Double.parseDouble(_r5.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble((_r5.GetString("HVD_CANT")))))*(((double)(Double.parseDouble(_r5.GetString("HVD_RECHAZOCANT")))-(double)(Double.parseDouble(_totalcantped))))));
 //BA.debugLineNum = 456;BA.debugLine="r6.Close";
_r6.Close();
 }
};
 };
 //BA.debugLineNum = 459;BA.debugLine="If rescant = \"NaN\" Then rescant = 0";
if ((_rescant).equals("NaN")) { 
_rescant = BA.NumberToString(0);};
 //BA.debugLineNum = 460;BA.debugLine="LogColor(rescant,Colors.Red)";
__c.LogImpl("514352648",_rescant,__c.Colors.Red);
 //BA.debugLineNum = 461;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 465;BA.debugLine="Private r5 As Cursor = Starter.skmt.ExecQuery($\"s";
_r5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r5 = (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(HVD_COSTO_TOT,0) AS HVD_COSTO_TOT, IFNULL(HVD_CANT,0) AS HVD_CANT,IFNULL(CANTC,0) AS CANTC, IFNULL(HVD_RECHAZOCANT,0) AS HVD_RECHAZOCANT, HVD_PROID, HVD_CLIENTE, CONSECUTIVO from HIST_VENTAS where HVD_RECHAZO = '1' and BCAJAS = '1' "))));
 //BA.debugLineNum = 469;BA.debugLine="Private rescant2 As Double = 0";
_rescant2 = 0;
 //BA.debugLineNum = 470;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 471;BA.debugLine="For j5 = 0 To r5.RowCount -1";
{
final int step190 = 1;
final int limit190 = (int) (_r5.getRowCount()-1);
_j5 = (int) (0) ;
for (;_j5 <= limit190 ;_j5 = _j5 + step190 ) {
 //BA.debugLineNum = 472;BA.debugLine="r5.Position = j5";
_r5.setPosition(_j5);
 //BA.debugLineNum = 473;BA.debugLine="Private r6 As Cursor = Starter.skmt.ExecQuery($";
_r6 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r6 = (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(SUM(PE_CANT),0) AS PE_CANT from PEDIDO where PE_CLIENTEOR = '"+__c.SmartStringFormatter("",(Object)(_r5.GetString("HVD_CLIENTE")))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_r5.GetString("HVD_PROID")))+"'  AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_r5.GetString("CONSECUTIVO")))+"'"))));
 //BA.debugLineNum = 474;BA.debugLine="r6.Position = 0";
_r6.setPosition((int) (0));
 //BA.debugLineNum = 476;BA.debugLine="rescant2 = rescant2 + ((r5.GetString(\"HVD_COSTO";
_rescant2 = _rescant2+(((double)(Double.parseDouble(_r5.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble((_r5.GetString("CANTC")))))*(((double)(Double.parseDouble(_r5.GetString("HVD_RECHAZOCANT")))-(double)(Double.parseDouble(_r6.GetString("PE_CANT"))))/(double)(double)(Double.parseDouble(_subs._traeconversion /*String*/ (ba,_r5.GetString("HVD_PROID"))))));
 //BA.debugLineNum = 477;BA.debugLine="rescant2 = NumberFormat2(rescant2, 0, 2, 2, Fal";
_rescant2 = (double)(Double.parseDouble(__c.NumberFormat2(_rescant2,(int) (0),(int) (2),(int) (2),__c.False)));
 //BA.debugLineNum = 478;BA.debugLine="r6.Close";
_r6.Close();
 }
};
 };
 //BA.debugLineNum = 481;BA.debugLine="If rescant2 = \"NaN\" Then rescant2 = 0";
if (_rescant2==(double)(Double.parseDouble("NaN"))) { 
_rescant2 = 0;};
 //BA.debugLineNum = 482;BA.debugLine="Log(rescant2)";
__c.LogImpl("514352670",BA.NumberToString(_rescant2),0);
 //BA.debugLineNum = 483;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 488;BA.debugLine="Private r5r As Cursor = Starter.skmt.ExecQuery($\"";
_r5r = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r5r = (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(HVD_COSTO_TOT,0) AS HVD_COSTO_TOT, IFNULL(HVD_CANT,0) AS HVD_CANT, IFNULL(HVD_RECHAZOCANT,0) AS HVD_RECHAZOCANT, HVD_PROID, HVD_CLIENTE, CONSECUTIVO from HIST_VENTAS where HVD_RECHAZO = '1' and BCAJAS = '0' "))));
 //BA.debugLineNum = 490;BA.debugLine="Private rescantr As String = 0";
_rescantr = BA.NumberToString(0);
 //BA.debugLineNum = 491;BA.debugLine="If r5r.RowCount > 0 Then";
if (_r5r.getRowCount()>0) { 
 //BA.debugLineNum = 492;BA.debugLine="For j4r = 0 To r5r.RowCount -1";
{
final int step205 = 1;
final int limit205 = (int) (_r5r.getRowCount()-1);
_j4r = (int) (0) ;
for (;_j4r <= limit205 ;_j4r = _j4r + step205 ) {
 //BA.debugLineNum = 493;BA.debugLine="r5r.Position = j4r";
_r5r.setPosition(_j4r);
 //BA.debugLineNum = 494;BA.debugLine="Private r6r As Cursor = Starter.skmt.ExecQuery(";
_r6r = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r6r = (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(SUM(PE_CANT),0) AS PE_CANT from PEDIDO where PE_CLIENTEOR = '"+__c.SmartStringFormatter("",(Object)(_r5r.GetString("HVD_CLIENTE")))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_r5r.GetString("HVD_PROID")))+"' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_r5r.GetString("CONSECUTIVO")))+"' "))));
 //BA.debugLineNum = 495;BA.debugLine="r6r.Position = 0";
_r6r.setPosition((int) (0));
 //BA.debugLineNum = 498;BA.debugLine="rescantr = rescantr + ((r5r.GetString(\"HVD_COST";
_rescantr = BA.NumberToString((double)(Double.parseDouble(_rescantr))+(((double)(Double.parseDouble(_r5r.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble((_r5r.GetString("HVD_CANT")))))*(double)(Double.parseDouble((_r5r.GetString("HVD_RECHAZOCANT"))))));
 //BA.debugLineNum = 499;BA.debugLine="r6r.Close";
_r6r.Close();
 }
};
 };
 //BA.debugLineNum = 502;BA.debugLine="If rescantr = \"NaN\" Then rescantr = 0";
if ((_rescantr).equals("NaN")) { 
_rescantr = BA.NumberToString(0);};
 //BA.debugLineNum = 504;BA.debugLine="r5r.Close";
_r5r.Close();
 //BA.debugLineNum = 506;BA.debugLine="Log(rescantr)";
__c.LogImpl("514352694",_rescantr,0);
 //BA.debugLineNum = 508;BA.debugLine="Private r5r As Cursor = Starter.skmt.ExecQuery($\"";
_r5r = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r5r = (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(HVD_COSTO_TOT,0) AS HVD_COSTO_TOT, IFNULL(HVD_CANT,0) AS HVD_CANT,IFNULL(CANTC,0) AS CANTC, IFNULL(HVD_RECHAZOCANT,0) AS HVD_RECHAZOCANT, HVD_PROID, HVD_CLIENTE, CONSECUTIVO from HIST_VENTAS where HVD_RECHAZO = '1' and BCAJAS = '1' "))));
 //BA.debugLineNum = 512;BA.debugLine="Private rescant2r As String = 0";
_rescant2r = BA.NumberToString(0);
 //BA.debugLineNum = 513;BA.debugLine="If r5r.RowCount > 0 Then";
if (_r5r.getRowCount()>0) { 
 //BA.debugLineNum = 514;BA.debugLine="For j5r = 0 To r5r.RowCount -1";
{
final int step219 = 1;
final int limit219 = (int) (_r5r.getRowCount()-1);
_j5r = (int) (0) ;
for (;_j5r <= limit219 ;_j5r = _j5r + step219 ) {
 //BA.debugLineNum = 515;BA.debugLine="r5r.Position = j5r";
_r5r.setPosition(_j5r);
 //BA.debugLineNum = 516;BA.debugLine="Private r6r As Cursor = Starter.skmt.ExecQuery(";
_r6r = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r6r = (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(SUM(PE_CANT),0) AS PE_CANT from PEDIDO where PE_CLIENTEOR = '"+__c.SmartStringFormatter("",(Object)(_r5r.GetString("HVD_CLIENTE")))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_r5r.GetString("HVD_PROID")))+"'  AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_r5r.GetString("CONSECUTIVO")))+"'"))));
 //BA.debugLineNum = 517;BA.debugLine="r6r.Position = 0";
_r6r.setPosition((int) (0));
 //BA.debugLineNum = 519;BA.debugLine="rescant2r = rescant2r + ((r5r.GetString(\"HVD_CO";
_rescant2r = BA.NumberToString((double)(Double.parseDouble(_rescant2r))+(((double)(Double.parseDouble(_r5r.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble((_r5r.GetString("CANTC")))))*((double)(Double.parseDouble((_r5r.GetString("HVD_RECHAZOCANT"))))/(double)(double)(Double.parseDouble(_subs._traeconversion /*String*/ (ba,_r5r.GetString("HVD_PROID")))))));
 //BA.debugLineNum = 520;BA.debugLine="r6r.Close";
_r6r.Close();
 }
};
 };
 //BA.debugLineNum = 523;BA.debugLine="If rescant2r = \"NaN\" Then rescant2r = 0";
if ((_rescant2r).equals("NaN")) { 
_rescant2r = BA.NumberToString(0);};
 //BA.debugLineNum = 525;BA.debugLine="r5r.Close";
_r5r.Close();
 //BA.debugLineNum = 526;BA.debugLine="Log(rescant2r)";
__c.LogImpl("514352714",_rescant2r,0);
 //BA.debugLineNum = 527;BA.debugLine="Log(rescant2r+rescantr)";
__c.LogImpl("514352715",BA.NumberToString((double)(Double.parseDouble(_rescant2r))+(double)(Double.parseDouble(_rescantr))),0);
 //BA.debugLineNum = 543;BA.debugLine="Private r55 As Cursor = Starter.skmt.ExecQuery($\"";
_r55 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r55 = (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_COSTO_TOT from HIST_VENTAS where HVD_RECHAZO = '0' and BCAJAS = '0' "))));
 //BA.debugLineNum = 544;BA.debugLine="Private rescant3 As Double";
_rescant3 = 0;
 //BA.debugLineNum = 545;BA.debugLine="If r55.RowCount > 0 Then";
if (_r55.getRowCount()>0) { 
 //BA.debugLineNum = 546;BA.debugLine="For r75 = 0 To r55.RowCount -1";
{
final int step234 = 1;
final int limit234 = (int) (_r55.getRowCount()-1);
_r75 = (int) (0) ;
for (;_r75 <= limit234 ;_r75 = _r75 + step234 ) {
 //BA.debugLineNum = 547;BA.debugLine="r55.Position = r75";
_r55.setPosition(_r75);
 //BA.debugLineNum = 548;BA.debugLine="rescant3 = rescant3 + r55.GetString(\"HVD_COSTO_";
_rescant3 = _rescant3+(double)(Double.parseDouble(_r55.GetString("HVD_COSTO_TOT")));
 //BA.debugLineNum = 549;BA.debugLine="rescant3 = NumberFormat2(rescant3, 0, 2, 2, Fal";
_rescant3 = (double)(Double.parseDouble(__c.NumberFormat2(_rescant3,(int) (0),(int) (2),(int) (2),__c.False)));
 }
};
 };
 //BA.debugLineNum = 553;BA.debugLine="Log(rescant3)";
__c.LogImpl("514352741",BA.NumberToString(_rescant3),0);
 //BA.debugLineNum = 554;BA.debugLine="r55.Close";
_r55.Close();
 //BA.debugLineNum = 559;BA.debugLine="Private r5 As Cursor = Starter.skmt.ExecQuery($\"s";
_r5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r5 = (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(SUM(HVD_COSTO_TOT),0) AS HVD_COSTO_TOT from HIST_VENTAS where HVD_RECHAZO = '0' and BCAJAS = '1' "))));
 //BA.debugLineNum = 560;BA.debugLine="Private rescant4 As Double";
_rescant4 = 0;
 //BA.debugLineNum = 561;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 562;BA.debugLine="r5.Position = 0";
_r5.setPosition((int) (0));
 //BA.debugLineNum = 563;BA.debugLine="rescant4 = r5.GetString(\"HVD_COSTO_TOT\")";
_rescant4 = (double)(Double.parseDouble(_r5.GetString("HVD_COSTO_TOT")));
 };
 //BA.debugLineNum = 565;BA.debugLine="Log(rescant4)";
__c.LogImpl("514352753",BA.NumberToString(_rescant4),0);
 //BA.debugLineNum = 566;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 568;BA.debugLine="Private r5 As Cursor = Starter.skmt.ExecQuery($\"s";
_r5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r5 = (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(SUM(PE_COSTO_TOT),0) AS PE_COSTO_TOT from PEDIDO "))));
 //BA.debugLineNum = 569;BA.debugLine="Private rescant5 As Double";
_rescant5 = 0;
 //BA.debugLineNum = 570;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 571;BA.debugLine="r5.Position = 0";
_r5.setPosition((int) (0));
 //BA.debugLineNum = 572;BA.debugLine="rescant5 = r5.GetString(\"PE_COSTO_TOT\")";
_rescant5 = (double)(Double.parseDouble(_r5.GetString("PE_COSTO_TOT")));
 };
 //BA.debugLineNum = 574;BA.debugLine="Log(rescant5)";
__c.LogImpl("514352762",BA.NumberToString(_rescant5),0);
 //BA.debugLineNum = 575;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 580;BA.debugLine="Private r5 As Cursor = Starter.skmt.ExecQuery($\"s";
_r5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r5 = (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(HVD_COSTO_TOT,0) AS HVD_COSTO_TOT, IFNULL(HVD_CANT,0) AS HVD_CANT, IFNULL(HVD_RECHAZOCANT,0) AS HVD_RECHAZOCANT, HVD_PROID, HVD_CLIENTE, CONSECUTIVO from HIST_VENTAS where HVD_RECHAZO = '1' and BCAJAS = '0' "))));
 //BA.debugLineNum = 581;BA.debugLine="Private rescant6 As Double";
_rescant6 = 0;
 //BA.debugLineNum = 582;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 583;BA.debugLine="For j4 = 0 To r5.RowCount -1";
{
final int step261 = 1;
final int limit261 = (int) (_r5.getRowCount()-1);
_j4 = (int) (0) ;
for (;_j4 <= limit261 ;_j4 = _j4 + step261 ) {
 //BA.debugLineNum = 584;BA.debugLine="r5.Position = j4";
_r5.setPosition(_j4);
 //BA.debugLineNum = 585;BA.debugLine="Private r6 As Cursor = Starter.skmt.ExecQuery($";
_r6 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r6 = (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(SUM(PE_CANT),0) AS PE_CANT from PEDIDO where PE_CLIENTEOR = '"+__c.SmartStringFormatter("",(Object)(_r5.GetString("HVD_CLIENTE")))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_r5.GetString("HVD_PROID")))+"' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_r5.GetString("CONSECUTIVO")))+"' "))));
 //BA.debugLineNum = 586;BA.debugLine="r6.Position = 0";
_r6.setPosition((int) (0));
 //BA.debugLineNum = 589;BA.debugLine="rescant6 = rescant6 + ((r5.GetString(\"HVD_COSTO";
_rescant6 = _rescant6+(((double)(Double.parseDouble(_r5.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble((_r5.GetString("HVD_CANT")))))*((double)(Double.parseDouble(_r5.GetString("HVD_CANT")))-(double)(Double.parseDouble(_r5.GetString("HVD_RECHAZOCANT")))));
 //BA.debugLineNum = 591;BA.debugLine="r6.Close";
_r6.Close();
 }
};
 };
 //BA.debugLineNum = 594;BA.debugLine="If rescant6 = \"NaN\" Then rescant6 = 0";
if (_rescant6==(double)(Double.parseDouble("NaN"))) { 
_rescant6 = 0;};
 //BA.debugLineNum = 595;BA.debugLine="LogColor(rescant6,Colors.Red)";
__c.LogImpl("514352783",BA.NumberToString(_rescant6),__c.Colors.Red);
 //BA.debugLineNum = 596;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 598;BA.debugLine="Private r5 As Cursor = Starter.skmt.ExecQuery($\"s";
_r5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r5 = (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(HVD_COSTO_TOT,0) AS HVD_COSTO_TOT, IFNULL(HVD_CANT,0) AS HVD_CANT,IFNULL(CANTC,0) AS CANTC, IFNULL(HVD_RECHAZOCANT,0) AS HVD_RECHAZOCANT, HVD_PROID, HVD_CLIENTE, CONSECUTIVO from HIST_VENTAS where HVD_RECHAZO = '1' and BCAJAS = '1' "))));
 //BA.debugLineNum = 599;BA.debugLine="Private rescant7 As Double";
_rescant7 = 0;
 //BA.debugLineNum = 600;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 601;BA.debugLine="For j5 = 0 To r5.RowCount -1";
{
final int step275 = 1;
final int limit275 = (int) (_r5.getRowCount()-1);
_j5 = (int) (0) ;
for (;_j5 <= limit275 ;_j5 = _j5 + step275 ) {
 //BA.debugLineNum = 602;BA.debugLine="r5.Position = j5";
_r5.setPosition(_j5);
 //BA.debugLineNum = 603;BA.debugLine="Private r6 As Cursor = Starter.skmt.ExecQuery($";
_r6 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r6 = (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(SUM(PE_CANT),0) AS PE_CANT from PEDIDO where PE_CLIENTEOR = '"+__c.SmartStringFormatter("",(Object)(_r5.GetString("HVD_CLIENTE")))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_r5.GetString("HVD_PROID")))+"'  AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_r5.GetString("CONSECUTIVO")))+"'"))));
 //BA.debugLineNum = 604;BA.debugLine="r6.Position = 0";
_r6.setPosition((int) (0));
 //BA.debugLineNum = 606;BA.debugLine="rescant7 = rescant7 + ((r5.GetString(\"HVD_COSTO";
_rescant7 = _rescant7+(((double)(Double.parseDouble(_r5.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble((_r5.GetString("CANTC")))))*(((double)(Double.parseDouble(_r5.GetString("HVD_CANT")))-(double)(Double.parseDouble(_r5.GetString("HVD_RECHAZOCANT"))))/(double)(double)(Double.parseDouble(_subs._traeconversion /*String*/ (ba,_r5.GetString("HVD_PROID"))))));
 //BA.debugLineNum = 607;BA.debugLine="r6.Close";
_r6.Close();
 }
};
 };
 //BA.debugLineNum = 610;BA.debugLine="If rescant7 = \"NaN\" Then rescant7 = 0";
if (_rescant7==(double)(Double.parseDouble("NaN"))) { 
_rescant7 = 0;};
 //BA.debugLineNum = 611;BA.debugLine="Log(rescant7)";
__c.LogImpl("514352799",BA.NumberToString(_rescant7),0);
 //BA.debugLineNum = 612;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 615;BA.debugLine="Private r55 As Cursor = Starter.skmt.ExecQuery($\"";
_r55 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r55 = (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_COSTO_TOT, HVD_CANT from HIST_VENTAS where HVD_RECHAZO = '0' and BCAJAS = '0' AND HVD_CLIENTE IN (SELECT CAT_CL_CODIGO from kmt_info WHERE gestion = 2)"))));
 //BA.debugLineNum = 616;BA.debugLine="Private rescant10 As Double";
_rescant10 = 0;
 //BA.debugLineNum = 617;BA.debugLine="Private pztotal As Int";
_pztotal = 0;
 //BA.debugLineNum = 618;BA.debugLine="If r55.RowCount > 0 Then";
if (_r55.getRowCount()>0) { 
 //BA.debugLineNum = 619;BA.debugLine="For r75 = 0 To r55.RowCount -1";
{
final int step290 = 1;
final int limit290 = (int) (_r55.getRowCount()-1);
_r75 = (int) (0) ;
for (;_r75 <= limit290 ;_r75 = _r75 + step290 ) {
 //BA.debugLineNum = 620;BA.debugLine="r55.Position = r75";
_r55.setPosition(_r75);
 //BA.debugLineNum = 621;BA.debugLine="rescant10 = rescant10 + r55.GetString(\"HVD_COST";
_rescant10 = _rescant10+(double)(Double.parseDouble(_r55.GetString("HVD_COSTO_TOT")));
 //BA.debugLineNum = 622;BA.debugLine="rescant10 = NumberFormat2(rescant10, 0, 2, 2, F";
_rescant10 = (double)(Double.parseDouble(__c.NumberFormat2(_rescant10,(int) (0),(int) (2),(int) (2),__c.False)));
 //BA.debugLineNum = 623;BA.debugLine="pztotal = pztotal +  r55.GetString(\"HVD_CANT\")";
_pztotal = (int) (_pztotal+(double)(Double.parseDouble(_r55.GetString("HVD_CANT"))));
 }
};
 };
 //BA.debugLineNum = 626;BA.debugLine="Log(rescant10)";
__c.LogImpl("514352814",BA.NumberToString(_rescant10),0);
 //BA.debugLineNum = 627;BA.debugLine="r55.Close";
_r55.Close();
 //BA.debugLineNum = 640;BA.debugLine="Private r5 As Cursor = Starter.skmt.ExecQuery($\"s";
_r5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r5 = (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(SUM(PE_COSTO_TOT),0) AS PE_COSTO_TOT, IFNULL(SUM(PE_CANT),0) AS PE_CANT from PEDIDO "))));
 //BA.debugLineNum = 641;BA.debugLine="Private pztotal2 As Int";
_pztotal2 = 0;
 //BA.debugLineNum = 642;BA.debugLine="Private rescant11 As Double";
_rescant11 = 0;
 //BA.debugLineNum = 643;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 644;BA.debugLine="r5.Position = 0";
_r5.setPosition((int) (0));
 //BA.debugLineNum = 645;BA.debugLine="rescant11 = r5.GetString(\"PE_COSTO_TOT\")";
_rescant11 = (double)(Double.parseDouble(_r5.GetString("PE_COSTO_TOT")));
 //BA.debugLineNum = 646;BA.debugLine="pztotal2 = pztotal2 +  r5.GetString(\"PE_CANT\")";
_pztotal2 = (int) (_pztotal2+(double)(Double.parseDouble(_r5.GetString("PE_CANT"))));
 };
 //BA.debugLineNum = 648;BA.debugLine="Log(rescant11)";
__c.LogImpl("514352836",BA.NumberToString(_rescant11),0);
 //BA.debugLineNum = 649;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 651;BA.debugLine="Private r5 As Cursor = Starter.skmt.ExecQuery($\"s";
_r5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r5 = (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(HVD_COSTO_TOT,0) AS HVD_COSTO_TOT, IFNULL(HVD_CANT,0) AS HVD_CANT, IFNULL(HVD_RECHAZOCANT,0) AS HVD_RECHAZOCANT, HVD_PROID, HVD_CLIENTE, CONSECUTIVO from HIST_VENTAS where HVD_RECHAZO = '1' and BCAJAS = '0'  AND HVD_CLIENTE IN (SELECT CAT_CL_CODIGO from kmt_info WHERE gestion = 2) "))));
 //BA.debugLineNum = 652;BA.debugLine="Private pztotal3 As Int";
_pztotal3 = 0;
 //BA.debugLineNum = 653;BA.debugLine="Private rescant12 As Double";
_rescant12 = 0;
 //BA.debugLineNum = 654;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 655;BA.debugLine="For j4 = 0 To r5.RowCount -1";
{
final int step313 = 1;
final int limit313 = (int) (_r5.getRowCount()-1);
_j4 = (int) (0) ;
for (;_j4 <= limit313 ;_j4 = _j4 + step313 ) {
 //BA.debugLineNum = 656;BA.debugLine="r5.Position = j4";
_r5.setPosition(_j4);
 //BA.debugLineNum = 657;BA.debugLine="Private r6 As Cursor = Starter.skmt.ExecQuery($";
_r6 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r6 = (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(SUM(PE_CANT),0) AS PE_CANT from PEDIDO where PE_CLIENTEOR = '"+__c.SmartStringFormatter("",(Object)(_r5.GetString("HVD_CLIENTE")))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_r5.GetString("HVD_PROID")))+"' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_r5.GetString("CONSECUTIVO")))+"' "))));
 //BA.debugLineNum = 658;BA.debugLine="r6.Position = 0";
_r6.setPosition((int) (0));
 //BA.debugLineNum = 659;BA.debugLine="LogColor(r5.GetString(\"HVD_COSTO_TOT\")&\" / \"& r";
__c.LogImpl("514352847",_r5.GetString("HVD_COSTO_TOT")+" / "+_r5.GetString("HVD_CANT")+" * "+_r5.GetString("HVD_RECHAZOCANT")+" - "+_r6.GetString("PE_CANT"),__c.Colors.Blue);
 //BA.debugLineNum = 660;BA.debugLine="LogColor(r6.GetString(\"PE_CANT\"),Colors.Blue)";
__c.LogImpl("514352848",_r6.GetString("PE_CANT"),__c.Colors.Blue);
 //BA.debugLineNum = 661;BA.debugLine="rescant12 = rescant12 + ((r5.GetString(\"HVD_COS";
_rescant12 = _rescant12+(((double)(Double.parseDouble(_r5.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble((_r5.GetString("HVD_CANT")))))*((double)(Double.parseDouble(_r5.GetString("HVD_CANT")))-(double)(Double.parseDouble(_r5.GetString("HVD_RECHAZOCANT")))));
 //BA.debugLineNum = 662;BA.debugLine="pztotal3 = pztotal3 +  (r5.GetString(\"HVD_CANT\"";
_pztotal3 = (int) (_pztotal3+((double)(Double.parseDouble(_r5.GetString("HVD_CANT")))-(double)(Double.parseDouble(_r5.GetString("HVD_RECHAZOCANT")))));
 //BA.debugLineNum = 663;BA.debugLine="Log(rescant12)";
__c.LogImpl("514352851",BA.NumberToString(_rescant12),0);
 //BA.debugLineNum = 664;BA.debugLine="r6.Close";
_r6.Close();
 }
};
 };
 //BA.debugLineNum = 667;BA.debugLine="If rescant12 = \"NaN\" Then rescant12 = 0";
if (_rescant12==(double)(Double.parseDouble("NaN"))) { 
_rescant12 = 0;};
 //BA.debugLineNum = 668;BA.debugLine="LogColor(rescant12,Colors.Red)";
__c.LogImpl("514352856",BA.NumberToString(_rescant12),__c.Colors.Red);
 //BA.debugLineNum = 669;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 671;BA.debugLine="l_rechazo.text = NumberFormat2((rescant + rescant";
_l_rechazo.setText(BA.ObjectToCharSequence(__c.NumberFormat2(((double)(Double.parseDouble(_rescant))+_rescant2),(int) (0),(int) (2),(int) (2),__c.False)));
 //BA.debugLineNum = 672;BA.debugLine="L_MONTOE.Text = NumberFormat2((rescant3 + rescant";
_l_montoe.setText(BA.ObjectToCharSequence(__c.NumberFormat2((_rescant3+_rescant4+_rescant5+_rescant6+_rescant7),(int) (0),(int) (2),(int) (2),__c.False)));
 //BA.debugLineNum = 675;BA.debugLine="Dim g8 As Cursor = Starter.skmt.ExecQuery(\"SELECT";
_g8 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_g8 = (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(SUM(HVD_COSTO_TOT),0) AS HVD_COSTO_TOT FROM HIST_VENTAS")));
 //BA.debugLineNum = 676;BA.debugLine="g8.Position = 0";
_g8.setPosition((int) (0));
 //BA.debugLineNum = 677;BA.debugLine="Dim g11 As Cursor = Starter.skmt.ExecQuery(\"SELEC";
_g11 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_g11 = (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 count(*) as cuenta FROM kmt_info where gestion <> 0")));
 //BA.debugLineNum = 678;BA.debugLine="g11.Position = 0";
_g11.setPosition((int) (0));
 //BA.debugLineNum = 679;BA.debugLine="Dim g12 As Cursor = Starter.skmt.ExecQuery(\"SELEC";
_g12 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_g12 = (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 count(*) as cuenta FROM kmt_info where gestion = 2")));
 //BA.debugLineNum = 680;BA.debugLine="g12.Position = 0";
_g12.setPosition((int) (0));
 //BA.debugLineNum = 681;BA.debugLine="Dim g13 As Cursor = Starter.skmt.ExecQuery(\"SELEC";
_g13 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_g13 = (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 count(*) as cuenta FROM kmt_info where gestion = 3")));
 //BA.debugLineNum = 682;BA.debugLine="g13.Position = 0";
_g13.setPosition((int) (0));
 //BA.debugLineNum = 684;BA.debugLine="B4XPages.MainPage.monto_entregadoactual  = Number";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._monto_entregadoactual /*String*/  = __c.NumberFormat2((_rescant10+_rescant11+_rescant12),(int) (0),(int) (2),(int) (2),__c.False);
 //BA.debugLineNum = 686;BA.debugLine="B4XPages.MainPage.clientesVisitados = L_MONTOE.Te";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._clientesvisitados /*String*/  = _l_montoe.getText();
 //BA.debugLineNum = 687;BA.debugLine="B4XPages.MainPage.clientesVenta = l_cuantosc.Text";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._clientesventa /*String*/  = _l_cuantosc.getText();
 //BA.debugLineNum = 688;BA.debugLine="B4XPages.MainPage.clientesRechazo = l_cuantosn.Te";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._clientesrechazo /*String*/  = _l_cuantosn.getText();
 //BA.debugLineNum = 689;BA.debugLine="B4XPages.MainPage.clientestotal = l_porvisitar.Te";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._clientestotal /*String*/  = _l_porvisitar.getText();
 //BA.debugLineNum = 690;BA.debugLine="B4XPages.MainPage.montoActual =  Round2(g8.GetStr";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._montoactual /*String*/  = BA.NumberToString(__c.Round2((double)(Double.parseDouble(_g8.GetString("HVD_COSTO_TOT"))),(int) (2)));
 //BA.debugLineNum = 691;BA.debugLine="B4XPages.MainPage.porVisitar = l_ctast.text";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._porvisitar /*String*/  = _l_ctast.getText();
 //BA.debugLineNum = 692;BA.debugLine="B4XPages.MainPage.visitadostotales = g11.GetStrin";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._visitadostotales /*String*/  = _g11.GetString("cuenta");
 //BA.debugLineNum = 694;BA.debugLine="B4XPages.MainPage.entregas = g12.GetString(\"cuent";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._entregas /*String*/  = _g12.GetString("cuenta");
 //BA.debugLineNum = 695;BA.debugLine="B4XPages.MainPage.rechazos = g13.GetString(\"cuent";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._rechazos /*String*/  = _g13.GetString("cuenta");
 //BA.debugLineNum = 696;BA.debugLine="B4XPages.MainPage.montoEntregado = L_MONTOE.text";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._montoentregado /*String*/  = _l_montoe.getText();
 //BA.debugLineNum = 697;BA.debugLine="B4XPages.MainPage.montoRechazado = l_rechazo.text";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._montorechazado /*String*/  = _l_rechazo.getText();
 //BA.debugLineNum = 699;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.serve";
_reqmanager._initialize /*String*/ (ba,this,_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ );
 //BA.debugLineNum = 702;BA.debugLine="If l_ctast.Text = 0 And l_porvisitar.Text <> 0 Th";
if ((_l_ctast.getText()).equals(BA.NumberToString(0)) && (_l_porvisitar.getText()).equals(BA.NumberToString(0)) == false) { 
 //BA.debugLineNum = 703;BA.debugLine="Label9.Visible = True";
_label9.setVisible(__c.True);
 //BA.debugLineNum = 704;BA.debugLine="L_MONTOE.Visible = True";
_l_montoe.setVisible(__c.True);
 //BA.debugLineNum = 713;BA.debugLine="b_venta_emp.Visible = False";
_b_venta_emp.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 715;BA.debugLine="Label9.Visible = False";
_label9.setVisible(__c.False);
 //BA.debugLineNum = 716;BA.debugLine="L_MONTOE.Visible = False";
_l_montoe.setVisible(__c.False);
 //BA.debugLineNum = 717;BA.debugLine="b_venta_emp.Visible = False";
_b_venta_emp.setVisible(__c.False);
 };
 //BA.debugLineNum = 720;BA.debugLine="If l_ruta.Text = 0 Then";
if ((_l_ruta.getText()).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 721;BA.debugLine="b_imp_inventario.Visible = False";
_b_imp_inventario.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 723;BA.debugLine="b_imp_inventario.Visible = True";
_b_imp_inventario.setVisible(__c.True);
 };
 //BA.debugLineNum = 731;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 = 732;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 733;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 734;BA.debugLine="Starter.MAC_IMPRESORA = c.GetString(\"CAT_VA_VALO";
_starter._mac_impresora /*String*/  = _c.GetString("CAT_VA_VALOR");
 };
 //BA.debugLineNum = 736;BA.debugLine="If Starter.MAC_IMPRESORA = \"\" Then Starter.MAC_IM";
if ((_starter._mac_impresora /*String*/ ).equals("")) { 
_starter._mac_impresora /*String*/  = "0";};
 //BA.debugLineNum = 738;BA.debugLine="Printer1.Initialize(Me, \"Printer1\")";
_printer1._initialize /*String*/ (ba,this,"Printer1");
 //BA.debugLineNum = 739;BA.debugLine="If Printer1.IsConnected = False Then";
if (_printer1._isconnected /*boolean*/ ()==__c.False) { 
 }else {
 //BA.debugLineNum = 743;BA.debugLine="Printer1.DisConnect";
_printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 744;BA.debugLine="Printer1.Connect";
_printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 745;BA.debugLine="Log(\"2\")";
__c.LogImpl("514352933","2",0);
 };
 //BA.debugLineNum = 749;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_izca.keymon.lat.c_principal parent) {
this.parent = parent;
}
reparto_izca.keymon.lat.c_principal 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 = 2053;BA.debugLine="If Panel1.visible Then";
if (true) break;

case 1:
//if
this.state = 8;
if (parent._panel1.getVisible()) { 
this.state = 3;
}else if(parent._p_prod.getVisible()) { 
this.state = 5;
}else {
this.state = 7;
}if (true) break;

case 3:
//C
this.state = 8;
 //BA.debugLineNum = 2054;BA.debugLine="Log(\"PANEL1 VISIBLE\")";
parent.__c.LogImpl("515007747","PANEL1 VISIBLE",0);
 //BA.debugLineNum = 2055;BA.debugLine="B_REGRESA_Click";
parent._b_regresa_click();
 if (true) break;

case 5:
//C
this.state = 8;
 //BA.debugLineNum = 2057;BA.debugLine="p_prod.Visible = False";
parent._p_prod.setVisible(parent.__c.False);
 if (true) break;

case 7:
//C
this.state = 8;
 //BA.debugLineNum = 2059;BA.debugLine="B4XPages.ShowPage(\"Login\")";
parent._b4xpages._showpage /*String*/ (ba,"Login");
 if (true) break;

case 8:
//C
this.state = -1;
;
 //BA.debugLineNum = 2062;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 //BA.debugLineNum = 2063;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
 //BA.debugLineNum = 132;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
 //BA.debugLineNum = 133;BA.debugLine="Root = Root1";
_root = _root1;
 //BA.debugLineNum = 135;BA.debugLine="Root.LoadLayout(\"principal\")";
_root.LoadLayout("principal",ba);
 //BA.debugLineNum = 136;BA.debugLine="EJECUTANDO=1";
_ejecutando = BA.NumberToString(1);
 //BA.debugLineNum = 137;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.serve";
_reqmanager._initialize /*String*/ (ba,this,_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ );
 //BA.debugLineNum = 140;BA.debugLine="img2.Visible =False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 141;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 142;BA.debugLine="fecha=DateTime.Date(DateTime.Now)";
_fecha = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 144;BA.debugLine="b=Starter.skmt.ExecQuery(\"Select count(*) as CUAN";
_b = (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 count(*) as CUANTOS from pedido_cliente")));
 //BA.debugLineNum = 145;BA.debugLine="b.Position=0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 146;BA.debugLine="Cuantos = b.GetString(\"CUANTOS\")";
_cuantos = _b.GetString("CUANTOS");
 //BA.debugLineNum = 147;BA.debugLine="d=Starter.skmt.ExecQuery(\"select count(*) as TOTA";
_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 count(*) as TOTAL_VISITAR from kmt_info where gestion = 0 AND  CAT_CL_RUTA <> 1000")));
 //BA.debugLineNum = 148;BA.debugLine="D.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 149;BA.debugLine="b.Close";
_b.Close();
 //BA.debugLineNum = 150;BA.debugLine="e=Starter.skmt.ExecQuery(\"select count(*) as POR_";
_e = (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 count(*) as POR_VISITAR from kmt_info WHERE CAT_CL_RUTA <> 1000")));
 //BA.debugLineNum = 151;BA.debugLine="e.Position=0";
_e.setPosition((int) (0));
 //BA.debugLineNum = 152;BA.debugLine="If Cuantos = 0 Then";
if ((_cuantos).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 153;BA.debugLine="l_aLiquidar.Text = 0";
_l_aliquidar.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 154;BA.debugLine="l_cuantosc.Text = 0";
_l_cuantosc.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 155;BA.debugLine="l_cuantosn.Text = 0";
_l_cuantosn.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 156;BA.debugLine="drop = 0";
_drop = 0;
 //BA.debugLineNum = 157;BA.debugLine="l_montoSalida.Text = 0";
_l_montosalida.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 158;BA.debugLine="efectiva = 0";
_efectiva = 0;
 //BA.debugLineNum = 160;BA.debugLine="l_ctast.Text = d.GetString(\"TOTAL_VISITAR\")";
_l_ctast.setText(BA.ObjectToCharSequence(_d.GetString("TOTAL_VISITAR")));
 //BA.debugLineNum = 161;BA.debugLine="l_porvisitar.Text = e.GetString(\"POR_VISITAR\")";
_l_porvisitar.setText(BA.ObjectToCharSequence(_e.GetString("POR_VISITAR")));
 }else {
 };
 //BA.debugLineNum = 180;BA.debugLine="b=Starter.skmt.ExecQuery(\"select id_almacen from";
_b = (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 id_almacen from CAT_ALMACEN")));
 //BA.debugLineNum = 181;BA.debugLine="If b.RowCount > 0 Then";
if (_b.getRowCount()>0) { 
 //BA.debugLineNum = 183;BA.debugLine="b.Position = 0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 185;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 186;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 187;BA.debugLine="cmd.Name = \"select_coords_almacen_mards\"";
_cmd.Name /*String*/  = "select_coords_almacen_mards";
 //BA.debugLineNum = 188;BA.debugLine="cmd.Parameters = Array As Object(b.GetString(\"ID";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_b.GetString("ID_ALMACEN"))};
 //BA.debugLineNum = 189;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"coords_almacen";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("coords_almacen"));
 };
 //BA.debugLineNum = 191;BA.debugLine="B4XPages.MainPage.usuario=Subs.dameUsuarioDeDB";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._usuario /*String*/  = _subs._dameusuariodedb /*String*/ (ba);
 //BA.debugLineNum = 192;BA.debugLine="btAdmin.Initialize(\"BlueTeeth\")";
_btadmin.Initialize(ba,"BlueTeeth");
 //BA.debugLineNum = 193;BA.debugLine="cmp20.Initialize(\"Printer\")";
_cmp20.Initialize("Printer");
 //BA.debugLineNum = 194;BA.debugLine="End Sub";
return "";
}
public String  _btn_ubicar_ru_click() throws Exception{
 //BA.debugLineNum = 2413;BA.debugLine="Sub Btn_Ubicar_Ru_Click";
 //BA.debugLineNum = 2414;BA.debugLine="If b_check.Visible = True Then";
if (_b_check.getVisible()==__c.True) { 
 //BA.debugLineNum = 2415;BA.debugLine="MsgboxAsync(\"Favor de hacer el checklist.\",\"Aten";
__c.MsgboxAsync(BA.ObjectToCharSequence("Favor de hacer el checklist."),BA.ObjectToCharSequence("Atención"),ba);
 }else {
 //BA.debugLineNum = 2418;BA.debugLine="StartActivity(MAPA_RUTAS)";
__c.StartActivity(ba,(Object)(_mapa_rutas.getObject()));
 };
 //BA.debugLineNum = 2420;BA.debugLine="End Sub";
return "";
}
public String  _busca_click() throws Exception{
 //BA.debugLineNum = 2090;BA.debugLine="Sub BUSCA_Click";
 //BA.debugLineNum = 2091;BA.debugLine="If b_check.Visible = True Then";
if (_b_check.getVisible()==__c.True) { 
 //BA.debugLineNum = 2092;BA.debugLine="MsgboxAsync(\"Favor de hacer el checklist.\",\"Aten";
__c.MsgboxAsync(BA.ObjectToCharSequence("Favor de hacer el checklist."),BA.ObjectToCharSequence("Atención"),ba);
 }else {
 //BA.debugLineNum = 2095;BA.debugLine="B4XPages.ShowPage(\"Buscar\")";
_b4xpages._showpage /*String*/ (ba,"Buscar");
 };
 //BA.debugLineNum = 2097;BA.debugLine="End Sub";
return "";
}
public String  _cargar____click() throws Exception{
boolean _pedidodiaanterior = false;
String[] _fecha2 = null;
String[] _fecha3 = null;
String _dia = "";
String _dia2 = "";
 //BA.debugLineNum = 1284;BA.debugLine="Sub cargar____Click";
 //BA.debugLineNum = 1285;BA.debugLine="Dim pedidodiaanterior As Boolean = False";
_pedidodiaanterior = __c.False;
 //BA.debugLineNum = 1286;BA.debugLine="Dim cp As Cursor = Starter.skmt.ExecQuery(\"select";
_cp = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_cp = (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 NOVENTA")));
 //BA.debugLineNum = 1287;BA.debugLine="If cp.RowCount > 0 Then";
if (_cp.getRowCount()>0) { 
 //BA.debugLineNum = 1288;BA.debugLine="cp.Position = 0";
_cp.setPosition((int) (0));
 //BA.debugLineNum = 1289;BA.debugLine="Private fecha As String = cp.GetString(\"NV_FECHA";
_fecha = _cp.GetString("NV_FECHA");
 //BA.debugLineNum = 1290;BA.debugLine="Log(cp.GetString(\"NV_FECHA\"))";
__c.LogImpl("514876678",_cp.GetString("NV_FECHA"),0);
 //BA.debugLineNum = 1291;BA.debugLine="Dim fecha2() As String = Regex.Split(\" \",fecha)";
_fecha2 = __c.Regex.Split(" ",_fecha);
 //BA.debugLineNum = 1292;BA.debugLine="Log(fecha2(0))";
__c.LogImpl("514876680",_fecha2[(int) (0)],0);
 //BA.debugLineNum = 1293;BA.debugLine="Dim fecha3() As String = Regex.Split(\"/\",fecha2(";
_fecha3 = __c.Regex.Split("/",_fecha2[(int) (0)]);
 //BA.debugLineNum = 1294;BA.debugLine="DateTime.DateFormat = \"yyyyMMdd\"";
__c.DateTime.setDateFormat("yyyyMMdd");
 //BA.debugLineNum = 1295;BA.debugLine="DateTime.TimeFormat = \"\"";
__c.DateTime.setTimeFormat("");
 //BA.debugLineNum = 1296;BA.debugLine="Dim dia As String = fecha3(2)&fecha3(0)&fecha3(1";
_dia = _fecha3[(int) (2)]+_fecha3[(int) (0)]+_fecha3[(int) (1)];
 //BA.debugLineNum = 1297;BA.debugLine="Log(dia)";
__c.LogImpl("514876685",_dia,0);
 //BA.debugLineNum = 1298;BA.debugLine="Dim dia2 As String = DateTime.Date(DateTime.Now)";
_dia2 = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 1299;BA.debugLine="Log(dia & \" , \" & dia2)";
__c.LogImpl("514876687",_dia+" , "+_dia2,0);
 //BA.debugLineNum = 1300;BA.debugLine="If dia < dia2 Then";
if ((double)(Double.parseDouble(_dia))<(double)(Double.parseDouble(_dia2))) { 
 //BA.debugLineNum = 1301;BA.debugLine="pedidodiaanterior = True";
_pedidodiaanterior = __c.True;
 };
 };
 //BA.debugLineNum = 1304;BA.debugLine="If Not (pedidodiaanterior) Then";
if (__c.Not(_pedidodiaanterior)) { 
 //BA.debugLineNum = 1305;BA.debugLine="Log(\"CUMPLE\")";
__c.LogImpl("514876693","CUMPLE",0);
 //BA.debugLineNum = 1306;BA.debugLine="EJECUTANDO = 1";
_ejecutando = BA.NumberToString(1);
 //BA.debugLineNum = 1307;BA.debugLine="reqs.Initialize";
_reqs.Initialize();
 //BA.debugLineNum = 1308;BA.debugLine="TOPE = 0";
_tope = (int) (0);
 //BA.debugLineNum = 1309;BA.debugLine="LogColor($\"ReqServer = ${B4XPages.MainPage.serve";
__c.LogImpl("514876697",("ReqServer = "+__c.SmartStringFormatter("",(Object)(_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ ))+""),__c.Colors.Red);
 //BA.debugLineNum = 1310;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.serv";
_reqmanager._initialize /*String*/ (ba,this,_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ );
 //BA.debugLineNum = 1312;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1313;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1314;BA.debugLine="cmd.Name = \"insert_drop_rep_IZCA2\"";
_cmd.Name /*String*/  = "insert_drop_rep_IZCA2";
 //BA.debugLineNum = 1315;BA.debugLine="cmd.Parameters = Array As Object(Subs.dameUsuari";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_subs._dameusuariodedb /*String*/ (ba)),(Object)(_l_ruta.getText()),(Object)(_almacen),(Object)(_l_ctast.getText()),(Object)(_subs._traeentregados /*anywheresoftware.b4a.objects.collections.Map*/ (ba).getObject()),(Object)(_subs._traerechazados /*anywheresoftware.b4a.objects.collections.Map*/ (ba).getObject()),(Object)("CARGA"),(Object)(__c.Application.getVersionName())};
 //BA.debugLineNum = 1316;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_drop\")";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_drop"));
 //BA.debugLineNum = 1319;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from kmt_info\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from kmt_info");
 //BA.debugLineNum = 1320;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cod_resul";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cod_result");
 //BA.debugLineNum = 1321;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from hist_gest";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from hist_gest");
 //BA.debugLineNum = 1322;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CAT_DETAL";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CAT_DETALLES_PAQ");
 //BA.debugLineNum = 1323;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from telefonos";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from telefonos");
 //BA.debugLineNum = 1325;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from PUNTEO_GP";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PUNTEO_GPS");
 //BA.debugLineNum = 1326;BA.debugLine="If l_ruta.Text = \"0\" Then '";
if ((_l_ruta.getText()).equals("0")) { 
 //BA.debugLineNum = 1327;BA.debugLine="Log(\"*********************  No hay ruta, BORRAM";
__c.LogImpl("514876715","*********************  No hay ruta, BORRAMOS TODO",0);
 //BA.debugLineNum = 1328;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cat_guna";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod");
 //BA.debugLineNum = 1329;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cat_guna";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod3");
 //BA.debugLineNum = 1330;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from REPARTO\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from REPARTO");
 //BA.debugLineNum = 1331;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from HIST_VEN";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_VENTAS");
 //BA.debugLineNum = 1332;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from HIST_VEN";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_VENTAS2");
 //BA.debugLineNum = 1333;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from NOVENTA\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from NOVENTA");
 }else {
 //BA.debugLineNum = 1335;BA.debugLine="Log(\"*********************  Hay ruta, NO BORRAM";
__c.LogImpl("514876723","*********************  Hay ruta, NO BORRAMOS TODO",0);
 };
 //BA.debugLineNum = 1339;BA.debugLine="c=Starter.skmt.ExecQuery(\"select usuario from us";
_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 = 1340;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1341;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 1343;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1344;BA.debugLine="cmd.Name = \"select_punteo_mards_re_REPG\"";
_cmd.Name /*String*/  = "select_punteo_mards_re_REPG";
 //BA.debugLineNum = 1345;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text, AL";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen),(Object)(_almacen)};
 //BA.debugLineNum = 1346;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"punteo\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("punteo"));
 //BA.debugLineNum = 1347;BA.debugLine="Log($\"Pedimos Punteo\"$)";
__c.LogImpl("514876735",("Pedimos Punteo"),0);
 //BA.debugLineNum = 1348;BA.debugLine="reqs.Add(\"punteo\")";
_reqs.Add((Object)("punteo"));
 //BA.debugLineNum = 1351;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1352;BA.debugLine="cmd.Name = \"select_almacen_mards_re_REPG\"";
_cmd.Name /*String*/  = "select_almacen_mards_re_REPG";
 //BA.debugLineNum = 1353;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN)";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen)};
 //BA.debugLineNum = 1354;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"gunaprod\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("gunaprod"));
 //BA.debugLineNum = 1355;BA.debugLine="Log($\"Pedimos gunaprod - ${ALMACEN}, ${e_ruta.te";
__c.LogImpl("514876743",("Pedimos gunaprod - "+__c.SmartStringFormatter("",(Object)(_almacen))+", "+__c.SmartStringFormatter("",(Object)(_e_ruta.getText()))+""),0);
 //BA.debugLineNum = 1356;BA.debugLine="reqs.Add(\"gunaprod\")";
_reqs.Add((Object)("gunaprod"));
 //BA.debugLineNum = 1360;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1361;BA.debugLine="cmd.Name = \"select_cliente_mards_re_REPG\"";
_cmd.Name /*String*/  = "select_cliente_mards_re_REPG";
 //BA.debugLineNum = 1362;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text, AL";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen),(Object)(_almacen),(Object)(_e_ruta.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1363;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"kmt_datos\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("kmt_datos"));
 //BA.debugLineNum = 1364;BA.debugLine="Log($\"Pedimos kmt_datos\"$)";
__c.LogImpl("514876752",("Pedimos kmt_datos"),0);
 //BA.debugLineNum = 1365;BA.debugLine="reqs.Add(\"kmt_datos\")";
_reqs.Add((Object)("kmt_datos"));
 //BA.debugLineNum = 1367;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1368;BA.debugLine="cmd.Name = \"select_ventad_mards_re_REPG\"";
_cmd.Name /*String*/  = "select_ventad_mards_re_REPG";
 //BA.debugLineNum = 1369;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text, AL";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1370;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"hist_datos\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("hist_datos"));
 //BA.debugLineNum = 1371;BA.debugLine="Log($\"Pedimos hist_datos\"$)";
__c.LogImpl("514876759",("Pedimos hist_datos"),0);
 //BA.debugLineNum = 1372;BA.debugLine="reqs.Add(\"hist_datos\")";
_reqs.Add((Object)("hist_datos"));
 //BA.debugLineNum = 1389;BA.debugLine="If ALMACEN = \"32\" Then";
if ((_almacen).equals("32")) { 
 //BA.debugLineNum = 1390;BA.debugLine="ALMACEN = \"33\"";
_almacen = "33";
 //BA.debugLineNum = 1391;BA.debugLine="cargo = 2";
_cargo = BA.NumberToString(2);
 //BA.debugLineNum = 1392;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1393;BA.debugLine="cmd.Name = \"select_punteo_mards_re_REPG\"";
_cmd.Name /*String*/  = "select_punteo_mards_re_REPG";
 //BA.debugLineNum = 1394;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text, A";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen),(Object)(_almacen)};
 //BA.debugLineNum = 1395;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"punteo\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("punteo"));
 //BA.debugLineNum = 1396;BA.debugLine="reqs.Add(\"punteo\")";
_reqs.Add((Object)("punteo"));
 //BA.debugLineNum = 1398;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1399;BA.debugLine="cmd.Name = \"select_almacen_mards_re_REPG\"";
_cmd.Name /*String*/  = "select_almacen_mards_re_REPG";
 //BA.debugLineNum = 1400;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN, e_rut";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_e_ruta.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1401;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"gunaprod\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("gunaprod"));
 //BA.debugLineNum = 1402;BA.debugLine="reqs.Add(\"gunaprod\")";
_reqs.Add((Object)("gunaprod"));
 //BA.debugLineNum = 1404;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1405;BA.debugLine="cmd.Name = \"select_cliente_mards_re_REPG\"";
_cmd.Name /*String*/  = "select_cliente_mards_re_REPG";
 //BA.debugLineNum = 1406;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text, A";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen),(Object)(_almacen),(Object)(_e_ruta.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1407;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"kmt_datos\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("kmt_datos"));
 //BA.debugLineNum = 1408;BA.debugLine="reqs.Add(\"kmt_datos\")";
_reqs.Add((Object)("kmt_datos"));
 //BA.debugLineNum = 1410;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1411;BA.debugLine="cmd.Name = \"select_ventad_mards_re_REPG\"";
_cmd.Name /*String*/  = "select_ventad_mards_re_REPG";
 //BA.debugLineNum = 1412;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text, A";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1413;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"hist_datos\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("hist_datos"));
 //BA.debugLineNum = 1414;BA.debugLine="reqs.Add(\"hist_datos\")";
_reqs.Add((Object)("hist_datos"));
 };
 //BA.debugLineNum = 1448;BA.debugLine="D=Starter.skmt.ExecQuery(\"SELECT COUNT(*) AS CUA";
_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 COUNT(*) AS CUANTOS_NOVENTA FROM NOVENTA")));
 //BA.debugLineNum = 1449;BA.debugLine="d.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 1450;BA.debugLine="cuantos_noventa = D.GetString(\"CUANTOS_NOVENTA\")";
_cuantos_noventa = _d.GetString("CUANTOS_NOVENTA");
 //BA.debugLineNum = 1451;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1452;BA.debugLine="cargar.Visible = False";
_cargar.setVisible(__c.False);
 //BA.debugLineNum = 1453;BA.debugLine="Subir.Visible = False";
_subir.setVisible(__c.False);
 //BA.debugLineNum = 1454;BA.debugLine="connecta.Visible = True";
_connecta.setVisible(__c.True);
 //BA.debugLineNum = 1455;BA.debugLine="inv.Visible = False";
_inv.setVisible(__c.False);
 //BA.debugLineNum = 1456;BA.debugLine="ToastMessageShow(\"Se actualizarán los datos, est";
__c.ToastMessageShow(BA.ObjectToCharSequence("Se actualizarán los datos, este proceso podria tardar hasta un minuto, gracias"),__c.True);
 //BA.debugLineNum = 1457;BA.debugLine="ProgressDialogShow2(\"Descargando rutas, espere u";
__c.ProgressDialogShow2(ba,BA.ObjectToCharSequence("Descargando rutas, espere un momento."),__c.False);
 //BA.debugLineNum = 1458;BA.debugLine="If Not(IsConnectedToInternet) Then MsgboxAsync(\"";
if (__c.Not(_isconnectedtointernet())) { 
__c.MsgboxAsync(BA.ObjectToCharSequence("No hay conexión a Internet"),BA.ObjectToCharSequence("Revisa tu conexión"),ba);};
 }else {
 //BA.debugLineNum = 1462;BA.debugLine="Log(\"XXXX\")";
__c.LogImpl("514876850","XXXX",0);
 //BA.debugLineNum = 1463;BA.debugLine="MsgboxAsync(\"Para poder cargar día no puedes ten";
__c.MsgboxAsync(BA.ObjectToCharSequence("Para poder cargar día no puedes tener venta del día anterior. Por favor haz FIN DIA e intenta nuevamente."),BA.ObjectToCharSequence("Atención"),ba);
 };
 //BA.debugLineNum = 1466;BA.debugLine="End Sub";
return "";
}
public String  _cargar_click() throws Exception{
boolean _pedidodiaanterior = false;
String[] _fecha2 = null;
String[] _fecha3 = null;
String _dia = "";
String _dia2 = "";
 //BA.debugLineNum = 1119;BA.debugLine="Sub cargar_Click";
 //BA.debugLineNum = 1120;BA.debugLine="Dim pedidodiaanterior As Boolean = False";
_pedidodiaanterior = __c.False;
 //BA.debugLineNum = 1121;BA.debugLine="Dim cp As Cursor = Starter.skmt.ExecQuery(\"select";
_cp = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_cp = (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 NOVENTA")));
 //BA.debugLineNum = 1122;BA.debugLine="If cp.RowCount > 0 Then";
if (_cp.getRowCount()>0) { 
 //BA.debugLineNum = 1123;BA.debugLine="cp.Position = 0";
_cp.setPosition((int) (0));
 //BA.debugLineNum = 1124;BA.debugLine="Private fecha As String = cp.GetString(\"NV_FECHA";
_fecha = _cp.GetString("NV_FECHA");
 //BA.debugLineNum = 1125;BA.debugLine="Log(cp.GetString(\"NV_FECHA\"))";
__c.LogImpl("514811142",_cp.GetString("NV_FECHA"),0);
 //BA.debugLineNum = 1126;BA.debugLine="Dim fecha2() As String = Regex.Split(\" \",fecha)";
_fecha2 = __c.Regex.Split(" ",_fecha);
 //BA.debugLineNum = 1127;BA.debugLine="Log(fecha2(0))";
__c.LogImpl("514811144",_fecha2[(int) (0)],0);
 //BA.debugLineNum = 1128;BA.debugLine="Dim fecha3() As String = Regex.Split(\"/\",fecha2(";
_fecha3 = __c.Regex.Split("/",_fecha2[(int) (0)]);
 //BA.debugLineNum = 1129;BA.debugLine="DateTime.DateFormat = \"yyyyMMdd\"";
__c.DateTime.setDateFormat("yyyyMMdd");
 //BA.debugLineNum = 1130;BA.debugLine="DateTime.TimeFormat = \"\"";
__c.DateTime.setTimeFormat("");
 //BA.debugLineNum = 1131;BA.debugLine="Dim dia As String = fecha3(2)&fecha3(0)&fecha3(1";
_dia = _fecha3[(int) (2)]+_fecha3[(int) (0)]+_fecha3[(int) (1)];
 //BA.debugLineNum = 1132;BA.debugLine="Log(dia)";
__c.LogImpl("514811149",_dia,0);
 //BA.debugLineNum = 1133;BA.debugLine="Dim dia2 As String = DateTime.Date(DateTime.Now)";
_dia2 = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 1134;BA.debugLine="Log(dia & \" , \" & dia2)";
__c.LogImpl("514811151",_dia+" , "+_dia2,0);
 //BA.debugLineNum = 1135;BA.debugLine="If dia < dia2 Then";
if ((double)(Double.parseDouble(_dia))<(double)(Double.parseDouble(_dia2))) { 
 //BA.debugLineNum = 1136;BA.debugLine="pedidodiaanterior = True";
_pedidodiaanterior = __c.True;
 };
 };
 //BA.debugLineNum = 1139;BA.debugLine="If Not (pedidodiaanterior) Then";
if (__c.Not(_pedidodiaanterior)) { 
 //BA.debugLineNum = 1140;BA.debugLine="P_carga.Visible = True";
_p_carga.setVisible(__c.True);
 //BA.debugLineNum = 1141;BA.debugLine="P_carga.Width = Root.Width";
_p_carga.setWidth(_root.getWidth());
 //BA.debugLineNum = 1142;BA.debugLine="P_carga.Height = Root.Height";
_p_carga.setHeight(_root.getHeight());
 //BA.debugLineNum = 1143;BA.debugLine="l_carga2.Text = \"CARGANDO\"";
_l_carga2.setText(BA.ObjectToCharSequence("CARGANDO"));
 //BA.debugLineNum = 1144;BA.debugLine="L_carga.Text = \"CARGANDO\"";
_l_carga.setText(BA.ObjectToCharSequence("CARGANDO"));
 //BA.debugLineNum = 1145;BA.debugLine="PB_carga.Progress = 0";
_pb_carga.setProgress((int) (0));
 //BA.debugLineNum = 1146;BA.debugLine="PB_carga2.Progress = 0";
_pb_carga2.setProgress((int) (0));
 //BA.debugLineNum = 1147;BA.debugLine="Log(\"CUMPLE\")";
__c.LogImpl("514811164","CUMPLE",0);
 //BA.debugLineNum = 1148;BA.debugLine="EJECUTANDO = 1";
_ejecutando = BA.NumberToString(1);
 //BA.debugLineNum = 1149;BA.debugLine="reqs.Initialize";
_reqs.Initialize();
 //BA.debugLineNum = 1150;BA.debugLine="TOPE = 0";
_tope = (int) (0);
 //BA.debugLineNum = 1151;BA.debugLine="LogColor($\"ReqServer = ${B4XPages.MainPage.serve";
__c.LogImpl("514811168",("ReqServer = "+__c.SmartStringFormatter("",(Object)(_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ ))+""),__c.Colors.Red);
 //BA.debugLineNum = 1152;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.serv";
_reqmanager._initialize /*String*/ (ba,this,_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ );
 //BA.debugLineNum = 1154;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1155;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1156;BA.debugLine="cmd.Name = \"insert_drop_rep_IZCA2\"";
_cmd.Name /*String*/  = "insert_drop_rep_IZCA2";
 //BA.debugLineNum = 1157;BA.debugLine="cmd.Parameters = Array As Object(Subs.dameUsuari";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_subs._dameusuariodedb /*String*/ (ba)),(Object)(_l_ruta.getText()),(Object)(_almacen),(Object)(_l_ctast.getText()),(Object)(_subs._traeentregados /*anywheresoftware.b4a.objects.collections.Map*/ (ba).getObject()),(Object)(_subs._traerechazados /*anywheresoftware.b4a.objects.collections.Map*/ (ba).getObject()),(Object)("CARGA"),(Object)(__c.Application.getVersionName())};
 //BA.debugLineNum = 1158;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_drop\")";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_drop"));
 //BA.debugLineNum = 1161;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from kmt_info\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from kmt_info");
 //BA.debugLineNum = 1162;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cod_resul";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cod_result");
 //BA.debugLineNum = 1163;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from hist_gest";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from hist_gest");
 //BA.debugLineNum = 1164;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CAT_DETAL";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CAT_DETALLES_PAQ");
 //BA.debugLineNum = 1165;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from telefonos";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from telefonos");
 //BA.debugLineNum = 1166;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cat_gunap";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod");
 //BA.debugLineNum = 1167;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cat_gunap";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod3");
 //BA.debugLineNum = 1169;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from PUNTEO_GP";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PUNTEO_GPS");
 //BA.debugLineNum = 1170;BA.debugLine="If l_ruta.Text = \"0\" Then '";
if ((_l_ruta.getText()).equals("0")) { 
 //BA.debugLineNum = 1171;BA.debugLine="Log(\"*********************  No hay ruta, BORRAM";
__c.LogImpl("514811188","*********************  No hay ruta, BORRAMOS TODO",0);
 //BA.debugLineNum = 1172;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from REPARTO\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from REPARTO");
 //BA.debugLineNum = 1173;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from HIST_VEN";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_VENTAS");
 //BA.debugLineNum = 1174;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from HIST_VEN";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_VENTAS2");
 //BA.debugLineNum = 1175;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from NOVENTA\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from NOVENTA");
 //BA.debugLineNum = 1176;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM ABONOSP\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM ABONOSP");
 }else {
 //BA.debugLineNum = 1178;BA.debugLine="Log(\"*********************  Hay ruta, NO BORRAM";
__c.LogImpl("514811195","*********************  Hay ruta, NO BORRAMOS TODO",0);
 };
 //BA.debugLineNum = 1182;BA.debugLine="c=Starter.skmt.ExecQuery(\"select usuario from us";
_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 = 1183;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1184;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 1186;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1187;BA.debugLine="cmd.Name = \"select_punteo_re_REPG_IZCA\"";
_cmd.Name /*String*/  = "select_punteo_re_REPG_IZCA";
 //BA.debugLineNum = 1188;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text, AL";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen),(Object)(_almacen)};
 //BA.debugLineNum = 1189;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"punteo\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("punteo"));
 //BA.debugLineNum = 1190;BA.debugLine="Log($\"Pedimos Punteo\"$)";
__c.LogImpl("514811207",("Pedimos Punteo"),0);
 //BA.debugLineNum = 1191;BA.debugLine="reqs.Add(\"punteo\")";
_reqs.Add((Object)("punteo"));
 //BA.debugLineNum = 1193;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1194;BA.debugLine="cmd.Name = \"select_almacen_IZCA_re_REPG2\"";
_cmd.Name /*String*/  = "select_almacen_IZCA_re_REPG2";
 //BA.debugLineNum = 1195;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN)";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen)};
 //BA.debugLineNum = 1196;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"gunaprod\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("gunaprod"));
 //BA.debugLineNum = 1197;BA.debugLine="Log($\"Pedimos gunaprod - ${ALMACEN}, ${e_ruta.te";
__c.LogImpl("514811214",("Pedimos gunaprod - "+__c.SmartStringFormatter("",(Object)(_almacen))+", "+__c.SmartStringFormatter("",(Object)(_e_ruta.getText()))+""),0);
 //BA.debugLineNum = 1198;BA.debugLine="reqs.Add(\"gunaprod\")";
_reqs.Add((Object)("gunaprod"));
 //BA.debugLineNum = 1205;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1206;BA.debugLine="cmd.Name = \"select_cliente_IZCA_re_REPG\"";
_cmd.Name /*String*/  = "select_cliente_IZCA_re_REPG";
 //BA.debugLineNum = 1207;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text, AL";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen),(Object)(_almacen),(Object)(_e_ruta.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1208;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"kmt_datos\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("kmt_datos"));
 //BA.debugLineNum = 1209;BA.debugLine="Log($\"Pedimos kmt_datos\"$)";
__c.LogImpl("514811226",("Pedimos kmt_datos"),0);
 //BA.debugLineNum = 1210;BA.debugLine="reqs.Add(\"kmt_datos\")";
_reqs.Add((Object)("kmt_datos"));
 //BA.debugLineNum = 1212;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1213;BA.debugLine="cmd.Name = \"select_ventad2_IZCA_re_REPG\"";
_cmd.Name /*String*/  = "select_ventad2_IZCA_re_REPG";
 //BA.debugLineNum = 1214;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text, AL";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1215;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"hist_datos\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("hist_datos"));
 //BA.debugLineNum = 1216;BA.debugLine="Log($\"Pedimos hist_datos\"$)";
__c.LogImpl("514811233",("Pedimos hist_datos"),0);
 //BA.debugLineNum = 1217;BA.debugLine="reqs.Add(\"hist_datos\")";
_reqs.Add((Object)("hist_datos"));
 //BA.debugLineNum = 1219;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1220;BA.debugLine="cmd.Name = \"select_coords_almacen_IZCA\"";
_cmd.Name /*String*/  = "select_coords_almacen_IZCA";
 //BA.debugLineNum = 1221;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN)";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen)};
 //BA.debugLineNum = 1222;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"coords_almacen";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("coords_almacen"));
 //BA.debugLineNum = 1224;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1225;BA.debugLine="cmd.Name = \"select_cat_gunaprod3_IZCA\"";
_cmd.Name /*String*/  = "select_cat_gunaprod3_IZCA";
 //BA.debugLineNum = 1226;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN)";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen)};
 //BA.debugLineNum = 1227;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"gunaprod3\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("gunaprod3"));
 //BA.debugLineNum = 1264;BA.debugLine="D=Starter.skmt.ExecQuery(\"SELECT COUNT(*) AS CUA";
_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 COUNT(*) AS CUANTOS_NOVENTA FROM NOVENTA")));
 //BA.debugLineNum = 1265;BA.debugLine="d.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 1266;BA.debugLine="cuantos_noventa = D.GetString(\"CUANTOS_NOVENTA\")";
_cuantos_noventa = _d.GetString("CUANTOS_NOVENTA");
 //BA.debugLineNum = 1267;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1268;BA.debugLine="cargar.Visible = False";
_cargar.setVisible(__c.False);
 //BA.debugLineNum = 1269;BA.debugLine="Subir.Visible = False";
_subir.setVisible(__c.False);
 //BA.debugLineNum = 1270;BA.debugLine="connecta.Visible = True";
_connecta.setVisible(__c.True);
 //BA.debugLineNum = 1271;BA.debugLine="inv.Visible = False";
_inv.setVisible(__c.False);
 //BA.debugLineNum = 1272;BA.debugLine="ToastMessageShow(\"Se actualizarán los datos, est";
__c.ToastMessageShow(BA.ObjectToCharSequence("Se actualizarán los datos, este proceso podria tardar hasta un minuto, gracias"),__c.True);
 //BA.debugLineNum = 1274;BA.debugLine="If Not(IsConnectedToInternet) Then MsgboxAsync(\"";
if (__c.Not(_isconnectedtointernet())) { 
__c.MsgboxAsync(BA.ObjectToCharSequence("No hay conexión a Internet"),BA.ObjectToCharSequence("Revisa tu conexión"),ba);};
 }else {
 //BA.debugLineNum = 1278;BA.debugLine="Log(\"XXXX\")";
__c.LogImpl("514811295","XXXX",0);
 //BA.debugLineNum = 1279;BA.debugLine="MsgboxAsync(\"Para poder cargar día no puedes ten";
__c.MsgboxAsync(BA.ObjectToCharSequence("Para poder cargar día no puedes tener venta del día anterior. Por favor haz FIN DIA e intenta nuevamente."),BA.ObjectToCharSequence("Atención"),ba);
 };
 //BA.debugLineNum = 1282;BA.debugLine="End Sub";
return "";
}
public String  _checachek() throws Exception{
 //BA.debugLineNum = 751;BA.debugLine="Sub checachek";
 //BA.debugLineNum = 752;BA.debugLine="b = Starter.skmt.ExecQuery(\"SELECT CHECADO FROM";
_b = (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 CHECADO FROM CHECADO_CHECK")));
 //BA.debugLineNum = 753;BA.debugLine="If b.RowCount > 0 Then";
if (_b.getRowCount()>0) { 
 //BA.debugLineNum = 754;BA.debugLine="b.Position = 0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 755;BA.debugLine="If b.GetString(\"CHECADO\") = 0 Then";
if ((_b.GetString("CHECADO")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 756;BA.debugLine="b_check.Visible = True";
_b_check.setVisible(__c.True);
 }else if((_b.GetString("CHECADO")).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 758;BA.debugLine="b_check.Visible =False";
_b_check.setVisible(__c.False);
 };
 //BA.debugLineNum = 760;BA.debugLine="b.Close";
_b.Close();
 };
 //BA.debugLineNum = 762;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 reqManager As DBRequestManager";
_reqmanager = new reparto_izca.keymon.lat.dbrequestmanager();
 //BA.debugLineNum = 5;BA.debugLine="Dim conectado As String";
_conectado = "";
 //BA.debugLineNum = 6;BA.debugLine="Dim t1 As Timer";
_t1 = new anywheresoftware.b4a.objects.Timer();
 //BA.debugLineNum = 7;BA.debugLine="Dim sb As StringBuilder";
_sb = new anywheresoftware.b4a.keywords.StringBuilderWrapper();
 //BA.debugLineNum = 8;BA.debugLine="Dim PHONE As Phone";
_phone = new anywheresoftware.b4a.phone.Phone();
 //BA.debugLineNum = 9;BA.debugLine="Dim trabajar As Button";
_trabajar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 10;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 11;BA.debugLine="Dim d As Cursor";
_d = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 12;BA.debugLine="Dim b As Cursor";
_b = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 13;BA.debugLine="Dim e As Cursor";
_e = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 14;BA.debugLine="Dim f As Cursor";
_f = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 15;BA.debugLine="Dim f1 As Cursor";
_f1 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 16;BA.debugLine="Dim f2 As Cursor";
_f2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 17;BA.debugLine="Dim f3 As Cursor";
_f3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 18;BA.debugLine="Dim F4 As Cursor";
_f4 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 19;BA.debugLine="Dim lv As ListView";
_lv = new anywheresoftware.b4a.objects.ListViewWrapper();
 //BA.debugLineNum = 20;BA.debugLine="Dim cargar As Button";
_cargar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 21;BA.debugLine="Dim pendiente As Button";
_pendiente = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 22;BA.debugLine="Dim foto1() As Byte";
_foto1 = new byte[(int) (0)];
;
 //BA.debugLineNum = 23;BA.debugLine="Dim usuario As String";
_usuario = "";
 //BA.debugLineNum = 24;BA.debugLine="Dim connecta As Button";
_connecta = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 25;BA.debugLine="Dim conn As String";
_conn = "";
 //BA.debugLineNum = 26;BA.debugLine="Dim Subir As Button";
_subir = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 27;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 28;BA.debugLine="Dim TOPE As Int";
_tope = 0;
 //BA.debugLineNum = 29;BA.debugLine="Dim COUNT_CLIE As Int";
_count_clie = 0;
 //BA.debugLineNum = 30;BA.debugLine="Dim fecha As String";
_fecha = "";
 //BA.debugLineNum = 31;BA.debugLine="Dim drop As Double";
_drop = 0;
 //BA.debugLineNum = 32;BA.debugLine="Dim efectiva As Double";
_efectiva = 0;
 //BA.debugLineNum = 33;BA.debugLine="Dim L As Cursor";
_l = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 34;BA.debugLine="Dim l_aLiquidar As Label";
_l_aliquidar = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 35;BA.debugLine="Dim l_cuantosc As Label";
_l_cuantosc = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 36;BA.debugLine="Dim l_montoSalida As Label";
_l_montosalida = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 38;BA.debugLine="Dim l_ctast As Label";
_l_ctast = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 39;BA.debugLine="Dim BUSCA As Button";
_busca = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 40;BA.debugLine="Dim Cuantos As String";
_cuantos = "";
 //BA.debugLineNum = 41;BA.debugLine="Dim l_cuantosn As Label";
_l_cuantosn = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 42;BA.debugLine="Dim e_ruta As EditText";
_e_ruta = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 43;BA.debugLine="Dim l_porvisitar As Label";
_l_porvisitar = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 44;BA.debugLine="Dim b_mapa As Button";
_b_mapa = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 45;BA.debugLine="Dim l_ruta As Label";
_l_ruta = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 46;BA.debugLine="Dim ALMACEN As String";
_almacen = "";
 //BA.debugLineNum = 47;BA.debugLine="Private img2 As ImageView";
_img2 = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 48;BA.debugLine="Dim Listo1 As String";
_listo1 = "";
 //BA.debugLineNum = 49;BA.debugLine="Dim Listo2 As String";
_listo2 = "";
 //BA.debugLineNum = 50;BA.debugLine="Dim Listo3 As String";
_listo3 = "";
 //BA.debugLineNum = 51;BA.debugLine="Dim Listo4 As String";
_listo4 = "";
 //BA.debugLineNum = 52;BA.debugLine="Dim Listo5 As String";
_listo5 = "";
 //BA.debugLineNum = 53;BA.debugLine="Dim EJECUTANDO As String";
_ejecutando = "";
 //BA.debugLineNum = 54;BA.debugLine="Dim RES As String";
_res = "";
 //BA.debugLineNum = 55;BA.debugLine="Dim inve As String";
_inve = "";
 //BA.debugLineNum = 56;BA.debugLine="Dim cuantos_pedidosc As String";
_cuantos_pedidosc = "";
 //BA.debugLineNum = 57;BA.debugLine="Dim cuantos_pedido As String";
_cuantos_pedido = "";
 //BA.debugLineNum = 58;BA.debugLine="Dim cuantos_noventa As String";
_cuantos_noventa = "";
 //BA.debugLineNum = 59;BA.debugLine="Dim datos_iguales As String";
_datos_iguales = "";
 //BA.debugLineNum = 60;BA.debugLine="Dim p As PhoneId";
_p = new anywheresoftware.b4a.phone.Phone.PhoneId();
 //BA.debugLineNum = 61;BA.debugLine="Dim imei As String";
_imei = "";
 //BA.debugLineNum = 63;BA.debugLine="Private inv As Button";
_inv = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 65;BA.debugLine="Private L_MONTOE As Label";
_l_montoe = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 66;BA.debugLine="Private B_CLIEPROD As Button";
_b_clieprod = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 67;BA.debugLine="Private ListView1 As ListView";
_listview1 = new anywheresoftware.b4a.objects.ListViewWrapper();
 //BA.debugLineNum = 68;BA.debugLine="Private B_REGRESA As Button";
_b_regresa = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 69;BA.debugLine="Private Panel1 As Panel";
_panel1 = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 70;BA.debugLine="Dim ESTATUS As String";
_estatus = "";
 //BA.debugLineNum = 71;BA.debugLine="Dim batterystatus(11) As Int";
_batterystatus = new int[(int) (11)];
;
 //BA.debugLineNum = 72;BA.debugLine="Private bu As BatteryUtilities";
_bu = new reparto_izca.keymon.lat.batteryutilities();
 //BA.debugLineNum = 73;BA.debugLine="Dim RUTA_T As String";
_ruta_t = "";
 //BA.debugLineNum = 74;BA.debugLine="Dim reqs As List";
_reqs = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 76;BA.debugLine="Private Btn_Ubicar_Ru As Button";
_btn_ubicar_ru = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 77;BA.debugLine="Dim cargo As String";
_cargo = "";
 //BA.debugLineNum = 78;BA.debugLine="Private p_principal As Panel";
_p_principal = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 79;BA.debugLine="Dim ime As IME";
_ime = new anywheresoftware.b4a.objects.IME();
 //BA.debugLineNum = 80;BA.debugLine="Private b_tabulador As Button";
_b_tabulador = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 82;BA.debugLine="Private l_rutasP As Label";
_l_rutasp = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 83;BA.debugLine="Private l_rechazo As Label";
_l_rechazo = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 84;BA.debugLine="Private Label9 As Label";
_label9 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 85;BA.debugLine="Dim cp As Cursor";
_cp = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 86;BA.debugLine="Private b_check As Button";
_b_check = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 87;BA.debugLine="Private b_rechazos As Button";
_b_rechazos = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 88;BA.debugLine="Private p_prod As Panel";
_p_prod = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 89;BA.debugLine="Private b_regreso As Button";
_b_regreso = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 90;BA.debugLine="Private lv_prod_Prin As ListView";
_lv_prod_prin = new anywheresoftware.b4a.objects.ListViewWrapper();
 //BA.debugLineNum = 91;BA.debugLine="Private b_venta_emp As Button";
_b_venta_emp = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 94;BA.debugLine="Dim t8 As Timer";
_t8 = new anywheresoftware.b4a.objects.Timer();
 //BA.debugLineNum = 95;BA.debugLine="Private B_carga As Button";
_b_carga = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 96;BA.debugLine="Private P_carga As Panel";
_p_carga = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 97;BA.debugLine="Private L_carga As Label";
_l_carga = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 98;BA.debugLine="Private PB_carga As ProgressBar";
_pb_carga = new anywheresoftware.b4a.objects.ProgressBarWrapper();
 //BA.debugLineNum = 99;BA.debugLine="Private PB_carga2 As ProgressBar";
_pb_carga2 = new anywheresoftware.b4a.objects.ProgressBarWrapper();
 //BA.debugLineNum = 100;BA.debugLine="Private l_carga2 As Label";
_l_carga2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 103;BA.debugLine="Dim btAdmin As BluetoothAdmin";
_btadmin = new anywheresoftware.b4a.objects.Serial.BluetoothAdmin();
 //BA.debugLineNum = 104;BA.debugLine="Dim cmp20 As Serial";
_cmp20 = new anywheresoftware.b4a.objects.Serial();
 //BA.debugLineNum = 105;BA.debugLine="Dim printer As TextWriter";
_printer = new anywheresoftware.b4a.objects.streams.File.TextWriterWrapper();
 //BA.debugLineNum = 106;BA.debugLine="Dim TAMANO As Int";
_tamano = 0;
 //BA.debugLineNum = 107;BA.debugLine="Dim ESPACIO As Int";
_espacio = 0;
 //BA.debugLineNum = 108;BA.debugLine="Dim BLANCO As String";
_blanco = "";
 //BA.debugLineNum = 109;BA.debugLine="Dim Printer1 As EscPosPrinter";
_printer1 = new reparto_izca.keymon.lat.escposprinter();
 //BA.debugLineNum = 110;BA.debugLine="Dim impresoraConectada As Boolean = False";
_impresoraconectada = __c.False;
 //BA.debugLineNum = 111;BA.debugLine="Dim errorImpresora As Int = 0";
_errorimpresora = (int) (0);
 //BA.debugLineNum = 112;BA.debugLine="Private inventario As ImageView";
_inventario = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 113;BA.debugLine="Dim PASA_IMP As String";
_pasa_imp = "";
 //BA.debugLineNum = 114;BA.debugLine="Private b_imp_inventario As Button";
_b_imp_inventario = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 116;BA.debugLine="Dim s As Cursor";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 117;BA.debugLine="Private PrinterIsReady As Boolean = False";
_printerisready = __c.False;
 //BA.debugLineNum = 118;BA.debugLine="Private LastConnectionAttempt As Long = 0";
_lastconnectionattempt = (long) (0);
 //BA.debugLineNum = 119;BA.debugLine="Private b_impresion_rec As Button";
_b_impresion_rec = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 120;BA.debugLine="Private L_clientes_visit As Label";
_l_clientes_visit = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 121;BA.debugLine="Private l_clientes_recha As Label";
_l_clientes_recha = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 122;BA.debugLine="Private l_clientes_visitados As Label";
_l_clientes_visitados = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 123;BA.debugLine="Private l_numtickets As Label";
_l_numtickets = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 124;BA.debugLine="End Sub";
return "";
}
public String  _connecta_click() throws Exception{
 //BA.debugLineNum = 2065;BA.debugLine="Sub connecta_Click";
 //BA.debugLineNum = 2066;BA.debugLine="LogColor($\"ReqServer = ${B4XPages.MainPage.server";
__c.LogImpl("515073281",("ReqServer = "+__c.SmartStringFormatter("",(Object)(_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ ))+""),__c.Colors.Red);
 //BA.debugLineNum = 2067;BA.debugLine="If Not(IsConnectedToInternet) Then MsgboxAsync(\"N";
if (__c.Not(_isconnectedtointernet())) { 
__c.MsgboxAsync(BA.ObjectToCharSequence("No hay conexión a conexión a Internet"),BA.ObjectToCharSequence("Revisa tu conexión"),ba);};
 //BA.debugLineNum = 2068;BA.debugLine="If e_ruta.Text <> \"\" Then";
if ((_e_ruta.getText()).equals("") == false) { 
 //BA.debugLineNum = 2069;BA.debugLine="imei = \"\" 'p.GetDeviceId";
_imei = "";
 //BA.debugLineNum = 2070;BA.debugLine="conn = \"1\"";
_conn = "1";
 //BA.debugLineNum = 2071;BA.debugLine="ime.HideKeyboard";
_ime.HideKeyboard(ba);
 //BA.debugLineNum = 2072;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 2073;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 2074;BA.debugLine="cmd.Name = \"select_version_IZCA\"";
_cmd.Name /*String*/  = "select_version_IZCA";
 //BA.debugLineNum = 2075;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"version\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("version"));
 //BA.debugLineNum = 2076;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 2077;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 2078;BA.debugLine="cmd.Name = \"select_ruta_re_REPG_IZCA2\"";
_cmd.Name /*String*/  = "select_ruta_re_REPG_IZCA2";
 //BA.debugLineNum = 2079;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN, e_ruta";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_e_ruta.getText()),(Object)(_usuario)};
 //BA.debugLineNum = 2081;BA.debugLine="Log($\"${ALMACEN}, ${e_ruta.text}, ${usuario}\"$)";
__c.LogImpl("515073296",(""+__c.SmartStringFormatter("",(Object)(_almacen))+", "+__c.SmartStringFormatter("",(Object)(_e_ruta.getText()))+", "+__c.SmartStringFormatter("",(Object)(_usuario))+""),0);
 //BA.debugLineNum = 2082;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"ruta\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("ruta"));
 //BA.debugLineNum = 2083;BA.debugLine="ToastMessageShow(\"Validando Conexión.\" , True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Validando Conexión."),__c.True);
 //BA.debugLineNum = 2084;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM RUTAA\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM RUTAA");
 //BA.debugLineNum = 2085;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO RUTAA(RU";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO RUTAA(RUTAA) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_e_ruta.getText())}));
 //BA.debugLineNum = 2086;BA.debugLine="B4XPages.MainPage.rutaPreventa = e_ruta.TEXT";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._rutapreventa /*String*/  = _e_ruta.getText();
 };
 //BA.debugLineNum = 2088;BA.debugLine="End Sub";
return "";
}
public String  _e_ruta_enterpressed() throws Exception{
 //BA.debugLineNum = 2104;BA.debugLine="Sub e_ruta_EnterPressed";
 //BA.debugLineNum = 2105;BA.debugLine="If e_ruta.Text = \"FIN DIA\" Then";
if ((_e_ruta.getText()).equals("FIN DIA")) { 
 //BA.debugLineNum = 2106;BA.debugLine="RES =  Msgbox2(\"Seguro que desea hacer el cierre";
_res = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Seguro que desea hacer el cierre todos los datos se borraran?"),BA.ObjectToCharSequence("Cierre"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
 //BA.debugLineNum = 2107;BA.debugLine="If RES = DialogResponse.POSITIVE Then";
if ((_res).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
 //BA.debugLineNum = 2109;BA.debugLine="e_ruta.Text = \"\"";
_e_ruta.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 2110;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from PICK_CIE";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PICK_CIEGO");
 //BA.debugLineNum = 2111;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from pedido_c";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente");
 //BA.debugLineNum = 2112;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from PAGARES\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PAGARES");
 //BA.debugLineNum = 2113;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CHECADO_";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CHECADO_CHECK");
 //BA.debugLineNum = 2114;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CHECKLIS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CHECKLIST2");
 //BA.debugLineNum = 2115;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from pedido\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido");
 //BA.debugLineNum = 2116;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from noventa\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from noventa");
 //BA.debugLineNum = 2117;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from clie_act";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from clie_act");
 //BA.debugLineNum = 2118;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from kmt_info";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from kmt_info");
 //BA.debugLineNum = 2119;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cat_guna";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod");
 //BA.debugLineNum = 2120;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cat_guna";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod3");
 //BA.debugLineNum = 2121;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CAT_DETA";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CAT_DETALLES_PAQ");
 //BA.debugLineNum = 2122;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from HIST_VEN";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_VENTAS");
 //BA.debugLineNum = 2123;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from REPARTO\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from REPARTO");
 //BA.debugLineNum = 2124;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM TABULADO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM TABULADOR_MONEDAS");
 //BA.debugLineNum = 2125;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM TABULADO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM TABULADOR_BILLETES");
 //BA.debugLineNum = 2126;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM RUTAA\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM RUTAA");
 //BA.debugLineNum = 2127;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM ABONOSP\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM ABONOSP");
 //BA.debugLineNum = 2128;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM ABONOS\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM ABONOS");
 //BA.debugLineNum = 2129;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM BLOCKENV";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM BLOCKENVIO");
 //BA.debugLineNum = 2130;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 };
 //BA.debugLineNum = 2133;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from waypoints";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from waypoints");
 };
 //BA.debugLineNum = 2135;BA.debugLine="End Sub";
return "";
}
public String  _envioinfo() throws Exception{
int _i = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _r = null;
int _rx = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _o = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _pa = null;
int _pag = 0;
String[] _fechaenvio = null;
String[] _fechaenvio1 = null;
String _fechaano = "";
String _fechareal = "";
String[] _fechacap = null;
String _fechacapano = "";
String _fechacapreal = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _ab = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c58 = null;
String _fechapre = "";
int _restarechazos = 0;
double _costorechazos = 0;
String[] _fechatabulador = null;
String _fechatabulador3 = "";
 //BA.debugLineNum = 819;BA.debugLine="Sub envioinfo";
 //BA.debugLineNum = 824;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT NV_CLIENTE,NV_";
_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 NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON, NV_FOTO, NV_REPROGRAMAR FROM NOVENTA")));
 //BA.debugLineNum = 825;BA.debugLine="D=Starter.skmt.ExecQuery(\"SELECT COUNT(*) AS CUAN";
_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 COUNT(*) AS CUANTOS_NOVENTA FROM NOVENTA")));
 //BA.debugLineNum = 826;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 827;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 = 828;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 829;BA.debugLine="foto1 = c.GetBlob(\"NV_FOTO\")";
_foto1 = _c.GetBlob("NV_FOTO");
 //BA.debugLineNum = 830;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 831;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 832;BA.debugLine="cmd.Name = \"insert_reparto_REPG_IZCA\"";
_cmd.Name /*String*/  = "insert_reparto_REPG_IZCA";
 //BA.debugLineNum = 833;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"N";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_c.GetString("NV_CLIENTE")),(Object)(_c.GetString("NV_FECHA")),(Object)(_c.GetString("NV_USER")),(Object)(_c.GetString("NV_MOTIVO")),(Object)(_c.GetString("NV_COMM")),(Object)(_c.GetString("NV_LAT")),(Object)(_c.GetString("NV_LON")),(Object)(_almacen),(Object)(_l_ruta.getText()),(Object)(_c.GetString("NV_REPROGRAMAR"))};
 //BA.debugLineNum = 834;BA.debugLine="reqManager.ExecuteCommand(cmd ,  \"inst_noventa_";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_noventa_"));
 }
};
 //BA.debugLineNum = 836;BA.debugLine="c.Close";
_c.Close();
 };
 //BA.debugLineNum = 838;BA.debugLine="d.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 839;BA.debugLine="cuantos_noventa = D.GetString(\"CUANTOS_NOVENTA\")";
_cuantos_noventa = _d.GetString("CUANTOS_NOVENTA");
 //BA.debugLineNum = 840;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 843;BA.debugLine="Dim r As Cursor =Starter.skmt.ExecQuery(\"select *";
_r = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r = (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 noventa where nv_reprogramar = 1")));
 //BA.debugLineNum = 844;BA.debugLine="If r.RowCount > 0 Then";
if (_r.getRowCount()>0) { 
 //BA.debugLineNum = 845;BA.debugLine="For rx = 0 To r.RowCount - 1";
{
final int step20 = 1;
final int limit20 = (int) (_r.getRowCount()-1);
_rx = (int) (0) ;
for (;_rx <= limit20 ;_rx = _rx + step20 ) {
 //BA.debugLineNum = 846;BA.debugLine="r.Position = rx";
_r.setPosition(_rx);
 //BA.debugLineNum = 847;BA.debugLine="Dim o As Cursor = Starter.skmt.ExecQuery2(\"sele";
_o = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_o = (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 HVD_FECHA, CAT_CL_RUTA FROM HIST_VENTAS INNER JOIN kmt_info on HVD_CLIENTE = cat_cl_codigo WHERE HVD_CLIENTE = ?",new String[]{_r.GetString("NV_CLIENTE")})));
 //BA.debugLineNum = 848;BA.debugLine="If o.RowCount > 0 Then";
if (_o.getRowCount()>0) { 
 //BA.debugLineNum = 849;BA.debugLine="o.Position = 0";
_o.setPosition((int) (0));
 //BA.debugLineNum = 850;BA.debugLine="Log(\"Enviamos reprogramados: \" & r.RowCount)";
__c.LogImpl("514745631","Enviamos reprogramados: "+BA.NumberToString(_r.getRowCount()),0);
 //BA.debugLineNum = 852;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 853;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 854;BA.debugLine="cmd.Name = \"insert_reparto_reprogramar3_IZCA\"";
_cmd.Name /*String*/  = "insert_reparto_reprogramar3_IZCA";
 //BA.debugLineNum = 855;BA.debugLine="cmd.Parameters = Array As Object(r.GetString(\"";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_r.GetString("NV_CLIENTE")),(Object)(_r.GetString("NV_REPROGRAMAR")),(Object)(_o.GetString("HVD_FECHA")),(Object)(_o.GetString("CAT_CL_RUTA")),(Object)(_almacen)};
 //BA.debugLineNum = 856;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_reprogram";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("ins_reprogramar"));
 };
 }
};
 };
 //BA.debugLineNum = 860;BA.debugLine="r.Close";
_r.Close();
 //BA.debugLineNum = 863;BA.debugLine="Dim pa As Cursor =Starter.skmt.ExecQuery(\"select";
_pa = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_pa = (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")));
 //BA.debugLineNum = 864;BA.debugLine="If pa.RowCount > 0 Then";
if (_pa.getRowCount()>0) { 
 //BA.debugLineNum = 865;BA.debugLine="For pag = 0 To pa.RowCount - 1";
{
final int step37 = 1;
final int limit37 = (int) (_pa.getRowCount()-1);
_pag = (int) (0) ;
for (;_pag <= limit37 ;_pag = _pag + step37 ) {
 //BA.debugLineNum = 866;BA.debugLine="pa.Position = pag";
_pa.setPosition(_pag);
 //BA.debugLineNum = 867;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 868;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 869;BA.debugLine="cmd.Name = \"insert_reparto_PAGARES_IZCA2\"";
_cmd.Name /*String*/  = "insert_reparto_PAGARES_IZCA2";
 //BA.debugLineNum = 870;BA.debugLine="Dim fechaenvio() As String";
_fechaenvio = new String[(int) (0)];
java.util.Arrays.fill(_fechaenvio,"");
 //BA.debugLineNum = 871;BA.debugLine="fechaenvio = Regex.Split(\" \",pa.GetString(\"PA_F";
_fechaenvio = __c.Regex.Split(" ",_pa.GetString("PA_FECHA_PREV"));
 //BA.debugLineNum = 873;BA.debugLine="Dim fechaenvio1() As String";
_fechaenvio1 = new String[(int) (0)];
java.util.Arrays.fill(_fechaenvio1,"");
 //BA.debugLineNum = 874;BA.debugLine="fechaenvio1 = Regex.Split(\"/\",fechaenvio(0))";
_fechaenvio1 = __c.Regex.Split("/",_fechaenvio[(int) (0)]);
 //BA.debugLineNum = 875;BA.debugLine="Dim fechaano As String = fechaenvio1(2).SubStri";
_fechaano = _fechaenvio1[(int) (2)].substring((int) (2));
 //BA.debugLineNum = 876;BA.debugLine="Dim fechareal As String = fechaenvio1(0)&\"/\"&fe";
_fechareal = _fechaenvio1[(int) (0)]+"/"+_fechaenvio1[(int) (1)]+"/"+_fechaano;
 //BA.debugLineNum = 879;BA.debugLine="Dim fechacap() As String";
_fechacap = new String[(int) (0)];
java.util.Arrays.fill(_fechacap,"");
 //BA.debugLineNum = 880;BA.debugLine="fechacap = Regex.Split(\"/\",pa.GetString(\"PA_CAP";
_fechacap = __c.Regex.Split("/",_pa.GetString("PA_CAPTURA"));
 //BA.debugLineNum = 881;BA.debugLine="Dim fechacapano As String = fechacap(2).SubStri";
_fechacapano = _fechacap[(int) (2)].substring((int) (2));
 //BA.debugLineNum = 882;BA.debugLine="Dim fechacapreal As String = fechacap(0)&\"/\"&fe";
_fechacapreal = _fechacap[(int) (0)]+"/"+_fechacap[(int) (1)]+"/"+_fechacapano;
 //BA.debugLineNum = 884;BA.debugLine="cmd.Parameters = Array As Object(pa.GetString(\"";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_pa.GetString("PA_CLIENTE")),(Object)(_pa.GetString("PA_MONTO")),(Object)(_fechacapreal),(Object)(_pa.GetString("PA_ALMACEN")),(Object)(_pa.GetString("PA_RUTAPREV")),(Object)(_pa.GetString("PA_RUTA_REP")),(Object)(_fechareal),(Object)(_pa.GetString("PA_USUARIO"))};
 //BA.debugLineNum = 885;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_pagares\")";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("ins_pagares"));
 }
};
 };
 //BA.debugLineNum = 888;BA.debugLine="pa.Close";
_pa.Close();
 //BA.debugLineNum = 891;BA.debugLine="Dim ab As Cursor = Starter.skmt.ExecQuery($\"SELEC";
_ab = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_ab = (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 ABONOS where a_enviado is null"))));
 //BA.debugLineNum = 892;BA.debugLine="Log(ab.RowCount)";
__c.LogImpl("514745673",BA.NumberToString(_ab.getRowCount()),0);
 //BA.debugLineNum = 893;BA.debugLine="If ab.RowCount > 0 Then";
if (_ab.getRowCount()>0) { 
 //BA.debugLineNum = 894;BA.debugLine="For i=0 To ab.RowCount -1";
{
final int step60 = 1;
final int limit60 = (int) (_ab.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit60 ;_i = _i + step60 ) {
 //BA.debugLineNum = 895;BA.debugLine="ab.Position = i";
_ab.setPosition(_i);
 //BA.debugLineNum = 897;BA.debugLine="Dim c58 As Cursor = Starter.skmt.ExecQuery($\"SE";
_c58 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c58 = (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 HIST_VENTAS"))));
 //BA.debugLineNum = 898;BA.debugLine="If c58.RowCount > 0 Then";
if (_c58.getRowCount()>0) { 
 //BA.debugLineNum = 899;BA.debugLine="c58.Position = 0";
_c58.setPosition((int) (0));
 //BA.debugLineNum = 901;BA.debugLine="Private fechapre As String = c58.GetString(\"HV";
_fechapre = _c58.GetString("HVD_FECHA");
 };
 //BA.debugLineNum = 905;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 906;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 907;BA.debugLine="cmd.Name = \"insert_abono_IZCAREP2\"";
_cmd.Name /*String*/  = "insert_abono_IZCAREP2";
 //BA.debugLineNum = 908;BA.debugLine="cmd.Parameters = Array As Object( ab.GetString(";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_ab.GetString("a_usuario")),(Object)(_ab.GetString("a_ruta")),(Object)(_ab.GetString("a_cliente")),(Object)(_ab.GetString("a_abono")),(Object)(_ab.GetString("a_fecha")),(Object)(_almacen),(Object)("REPARTO"),(Object)(_ab.GetString("TIPO_PAGO")),(Object)(_ab.GetString("CONSECUTIVO")),(Object)(_ab.GetString("NUM_TICKET")),(Object)(_ab.GetString("RUTA_REP")),(Object)(_fechapre)};
 //BA.debugLineNum = 909;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"ins_abonosPen";
_reqmanager._executecommand /*String*/ (_cmd,(Object)(("ins_abonosPendientes_"+__c.SmartStringFormatter("",(Object)(_ab.GetString("a_cliente")))+"")));
 //BA.debugLineNum = 910;BA.debugLine="Log($\"ins_abonosPendientes_${ab.GetString(\"a_cl";
__c.LogImpl("514745691",("ins_abonosPendientes_"+__c.SmartStringFormatter("",(Object)(_ab.GetString("a_cliente")))+""),0);
 }
};
 };
 //BA.debugLineNum = 913;BA.debugLine="ab.Close";
_ab.Close();
 //BA.debugLineNum = 916;BA.debugLine="c=Starter.skmt.ExecQuery(\"SELECT * FROM hist_vent";
_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 * FROM hist_ventas WHERE HVD_RECHAZO = 1 ")));
 //BA.debugLineNum = 917;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 918;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step78 = 1;
final int limit78 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit78 ;_i = _i + step78 ) {
 //BA.debugLineNum = 919;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 920;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 921;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 922;BA.debugLine="cmd.Name = \"insert_rep_hist_ventas_REPG2_IZCA\"";
_cmd.Name /*String*/  = "insert_rep_hist_ventas_REPG2_IZCA";
 //BA.debugLineNum = 923;BA.debugLine="Dim restarechazos As Int = c.GetString(\"HVD_CAN";
_restarechazos = (int) ((double)(Double.parseDouble(_c.GetString("HVD_CANT")))-(double)(Double.parseDouble(_c.GetString("HVD_RECHAZOCANT"))));
 //BA.debugLineNum = 924;BA.debugLine="Dim costorechazos As Double= NumberFormat2((C.G";
_costorechazos = (double)(Double.parseDouble(__c.NumberFormat2(((double)(Double.parseDouble(_c.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_c.GetString("HVD_CANT")))),(int) (0),(int) (2),(int) (2),__c.False)));
 //BA.debugLineNum = 925;BA.debugLine="If restarechazos = 0 Then";
if (_restarechazos==0) { 
 //BA.debugLineNum = 926;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_c.GetString("HVD_CLIENTE")),(Object)(_c.GetString("HVD_PRONOMBRE")),(Object)(_c.GetString("HVD_RECHAZOCANT")),(Object)((_costorechazos*(double)(Double.parseDouble(_c.GetString("HVD_RECHAZOCANT"))))),(Object)(_c.GetString("HVD_CODPROMO")),(Object)(_c.GetString("HVD_PROID")),(Object)(_c.GetString("HVD_NUM_TICKET")),(Object)(_c.GetString("HVD_NUM_REGISTRO")),(Object)(1),(Object)(""),(Object)(_almacen),(Object)(_costorechazos)};
 }else {
 //BA.debugLineNum = 929;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_c.GetString("HVD_CLIENTE")),(Object)(_c.GetString("HVD_PRONOMBRE")),(Object)(_c.GetString("HVD_RECHAZOCANT")),(Object)((_costorechazos*(double)(Double.parseDouble(_c.GetString("HVD_RECHAZOCANT"))))),(Object)(_c.GetString("HVD_CODPROMO")),(Object)(_c.GetString("HVD_PROID")),(Object)(_c.GetString("HVD_NUM_TICKET")),(Object)(_c.GetString("HVD_NUM_REGISTRO")),(Object)(""),(Object)(1),(Object)(_almacen),(Object)(_costorechazos)};
 };
 //BA.debugLineNum = 931;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_noventa\")";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_noventa"));
 }
};
 //BA.debugLineNum = 933;BA.debugLine="c.Close";
_c.Close();
 };
 //BA.debugLineNum = 937;BA.debugLine="c=Starter.skmt.ExecQuery(\"SELECT PE_TIPO, PE_RUTA";
_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 PE_TIPO, PE_RUTA, PE_CEDIS, PE_COSTO_TOT, PE_COSTOU, PE_CANT, PE_PRONOMBRE, PE_PROID, PE_CLIENTE, PE_FECHA, PE_USUARIO, PE_CLIENTEOR, PE_CAJAS, PE_BCAJAS, CONSECUTIVO, FECHA_PREV, RUTA_REP, PE_REGALO FROM PEDIDO")));
 //BA.debugLineNum = 938;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 939;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step96 = 1;
final int limit96 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit96 ;_i = _i + step96 ) {
 //BA.debugLineNum = 940;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 941;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 942;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 943;BA.debugLine="cmd.Name = \"insert_pedido_REP_IZCA\"";
_cmd.Name /*String*/  = "insert_pedido_REP_IZCA";
 //BA.debugLineNum = 944;BA.debugLine="cmd.Parameters = Array As Object(c.GetString(\"P";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_c.GetString("PE_TIPO")),(Object)(_c.GetString("PE_RUTA")),(Object)(_c.GetString("PE_CEDIS")),(Object)(_c.GetString("PE_COSTO_TOT")),(Object)(_c.GetString("PE_COSTOU")),(Object)(_c.GetString("PE_CANT")),(Object)(_c.GetString("PE_PRONOMBRE")),(Object)(_c.GetString("PE_PROID")),(Object)(_c.GetString("PE_CLIENTE")),(Object)(_c.GetString("PE_FECHA")),(Object)(_c.GetString("PE_USUARIO")),(Object)(_c.GetString("PE_CLIENTEOR")),(Object)(_c.GetString("PE_CAJAS")),(Object)(_c.GetString("PE_BCAJAS")),(Object)(_c.GetString("CONSECUTIVO")),(Object)(_c.GetString("FECHA_PREV")),(Object)(_c.GetString("RUTA_REP")),(Object)(_c.GetString("PE_REGALO"))};
 //BA.debugLineNum = 945;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_pedido_Inm";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("ins_pedido_Inmtex"));
 }
};
 //BA.debugLineNum = 947;BA.debugLine="c.Close";
_c.Close();
 };
 //BA.debugLineNum = 994;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")));
 //BA.debugLineNum = 995;BA.debugLine="Log($\"REPARTO_Cliente PENDIENTE: ${c.RowCount}\"$)";
__c.LogImpl("514745776",("REPARTO_Cliente PENDIENTE: "+__c.SmartStringFormatter("",(Object)(_c.getRowCount()))+""),0);
 //BA.debugLineNum = 996;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 997;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step109 = 1;
final int limit109 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit109 ;_i = _i + step109 ) {
 //BA.debugLineNum = 998;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 1000;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1001;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1002;BA.debugLine="cmd.Name = \"insert_REPARTO_IZCA\"";
_cmd.Name /*String*/  = "insert_REPARTO_IZCA";
 //BA.debugLineNum = 1003;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 = 1004;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"ins_REPARTOPe";
_reqmanager._executecommand /*String*/ (_cmd,(Object)(("ins_REPARTOPendientes_head_"+__c.SmartStringFormatter("",(Object)(_c.GetString("CLIENTE")))+"")));
 }
};
 };
 //BA.debugLineNum = 1008;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1011;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT VEINTE, DIEZ,";
_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 VEINTE, DIEZ, CINCO, DOS, PESO, CENTAVO, TOTAL FROM TABULADOR_MONEDAS")));
 //BA.debugLineNum = 1012;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 = 1013;BA.debugLine="b = Starter.skmt.ExecQuery(\"SELECT ID_ALMACEN FRO";
_b = (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 ID_ALMACEN FROM CAT_ALMACEN")));
 //BA.debugLineNum = 1014;BA.debugLine="f = Starter.skmt.ExecQuery(\"SELECT HVD_FECHA FROM";
_f = (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")));
 //BA.debugLineNum = 1015;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 1016;BA.debugLine="b.Position = 0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 1017;BA.debugLine="f.Position = 0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 1018;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 1019;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step127 = 1;
final int limit127 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit127 ;_i = _i + step127 ) {
 //BA.debugLineNum = 1020;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 1021;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1022;BA.debugLine="Dim fechatabulador() As String = Regex.Split(\"";
_fechatabulador = __c.Regex.Split(" ",_f.GetString("HVD_FECHA"));
 //BA.debugLineNum = 1024;BA.debugLine="Dim fechatabulador3 As String = fechatabulador(";
_fechatabulador3 = _fechatabulador[(int) (0)];
 //BA.debugLineNum = 1025;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1026;BA.debugLine="cmd.Name = \"insert_tabulador_monedas_IZCA\"";
_cmd.Name /*String*/  = "insert_tabulador_monedas_IZCA";
 //BA.debugLineNum = 1027;BA.debugLine="cmd.Parameters = Array As Object(d.GetString(\"R";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_d.GetString("RUTAA")),(Object)(_b.GetString("ID_ALMACEN")),(Object)(_c.GetString("VEINTE")),(Object)(_c.GetString("DIEZ")),(Object)(_c.GetString("CINCO")),(Object)(_c.GetString("DOS")),(Object)(_c.GetString("PESO")),(Object)(_c.GetString("CENTAVO")),(Object)(_fechatabulador3)};
 //BA.debugLineNum = 1028;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_tabulador_";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("ins_tabulador_mon"));
 }
};
 //BA.debugLineNum = 1030;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1031;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1032;BA.debugLine="b.Close";
_b.Close();
 //BA.debugLineNum = 1033;BA.debugLine="f.Close";
_f.Close();
 };
 //BA.debugLineNum = 1080;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT MIL, QUINIENTO";
_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 MIL, QUINIENTOS, DOCIENTOS, CIEN, CINCUENTA, VEINTE FROM TABULADOR_BILLETES")));
 //BA.debugLineNum = 1081;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 = 1082;BA.debugLine="b = Starter.skmt.ExecQuery(\"SELECT ID_ALMACEN FRO";
_b = (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 ID_ALMACEN FROM CAT_ALMACEN")));
 //BA.debugLineNum = 1083;BA.debugLine="f = Starter.skmt.ExecQuery(\"SELECT HVD_FECHA FROM";
_f = (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")));
 //BA.debugLineNum = 1084;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 1085;BA.debugLine="b.Position = 0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 1086;BA.debugLine="f.Position = 0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 1087;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 1088;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step150 = 1;
final int limit150 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit150 ;_i = _i + step150 ) {
 //BA.debugLineNum = 1089;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 1090;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1095;BA.debugLine="Dim fechatabulador() As String = Regex.Split(\"";
_fechatabulador = __c.Regex.Split(" ",_f.GetString("HVD_FECHA"));
 //BA.debugLineNum = 1097;BA.debugLine="Dim fechatabulador3 As String = fechatabulador(";
_fechatabulador3 = _fechatabulador[(int) (0)];
 //BA.debugLineNum = 1099;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1100;BA.debugLine="cmd.Name = \"insert_tabulador_billetes_IZCA\"";
_cmd.Name /*String*/  = "insert_tabulador_billetes_IZCA";
 //BA.debugLineNum = 1101;BA.debugLine="cmd.Parameters = Array As Object(b.GetString(\"I";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_b.GetString("ID_ALMACEN")),(Object)(_d.GetString("RUTAA")),(Object)(_c.GetString("MIL")),(Object)(_c.GetString("QUINIENTOS")),(Object)(_c.GetString("DOCIENTOS")),(Object)(_c.GetString("CIEN")),(Object)(_c.GetString("CINCUENTA")),(Object)(_c.GetString("VEINTE")),(Object)(_fechatabulador3)};
 //BA.debugLineNum = 1102;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_tabulador_";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("ins_tabulador_bill"));
 }
};
 //BA.debugLineNum = 1104;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1105;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1106;BA.debugLine="b.Close";
_b.Close();
 //BA.debugLineNum = 1107;BA.debugLine="f.Close";
_f.Close();
 };
 //BA.debugLineNum = 1111;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1112;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1113;BA.debugLine="cmd.Name = \"insert_drop_rep_IZCA2\"";
_cmd.Name /*String*/  = "insert_drop_rep_IZCA2";
 //BA.debugLineNum = 1114;BA.debugLine="cmd.Parameters = Array As Object(Subs.dameUsuario";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_subs._dameusuariodedb /*String*/ (ba)),(Object)(_l_ruta.getText()),(Object)(_almacen),(Object)(_l_ctast.getText()),(Object)(_subs._traeentregados /*anywheresoftware.b4a.objects.collections.Map*/ (ba).getObject()),(Object)(_subs._traerechazados /*anywheresoftware.b4a.objects.collections.Map*/ (ba).getObject()),(Object)("ENVIO"),(Object)(__c.Application.getVersionName())};
 //BA.debugLineNum = 1115;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_drop\")";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_drop"));
 //BA.debugLineNum = 1116;BA.debugLine="ToastMessageShow(\"Se Actualizaran los datos, Este";
__c.ToastMessageShow(BA.ObjectToCharSequence("Se Actualizaran los datos, Este proceso podria tardar hasta un minuto, gracias "+_l_ruta.getText()),__c.True);
 //BA.debugLineNum = 1117;BA.debugLine="End Sub";
return "";
}
public Object  _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
 //BA.debugLineNum = 127;BA.debugLine="Public Sub Initialize As Object";
 //BA.debugLineNum = 128;BA.debugLine="Return Me";
if (true) return this;
 //BA.debugLineNum = 129;BA.debugLine="End Sub";
return null;
}
public String  _inv_click() throws Exception{
 //BA.debugLineNum = 2137;BA.debugLine="Sub inv_Click";
 //BA.debugLineNum = 2138;BA.debugLine="ToastMessageShow(\"Se Actualizaran los datos, Este";
__c.ToastMessageShow(BA.ObjectToCharSequence("Se Actualizaran los datos, Este proceso podria tardar hasta un minuto, gracias"),__c.True);
 //BA.debugLineNum = 2139;BA.debugLine="End Sub";
return "";
}
public boolean  _isconnectedtointernet() throws Exception{
anywheresoftware.b4a.agraham.reflection.Reflection _r = null;
 //BA.debugLineNum = 764;BA.debugLine="Sub IsConnectedToInternet As Boolean 'ignore";
 //BA.debugLineNum = 765;BA.debugLine="Dim r As Reflector";
_r = new anywheresoftware.b4a.agraham.reflection.Reflection();
 //BA.debugLineNum = 766;BA.debugLine="r.Target = r.GetContext";
_r.Target = (Object)(_r.GetContext(ba));
 //BA.debugLineNum = 767;BA.debugLine="r.Target = r.RunMethod2(\"getSystemService\", \"conn";
_r.Target = _r.RunMethod2("getSystemService","connectivity","java.lang.String");
 //BA.debugLineNum = 768;BA.debugLine="r.Target = r.RunMethod(\"getActiveNetworkInfo\")";
_r.Target = _r.RunMethod("getActiveNetworkInfo");
 //BA.debugLineNum = 769;BA.debugLine="If r.Target <> Null Then";
if (_r.Target!= null) { 
 //BA.debugLineNum = 770;BA.debugLine="Return r.RunMethod(\"isConnectedOrConnecting\")";
if (true) return BA.ObjectToBoolean(_r.RunMethod("isConnectedOrConnecting"));
 };
 //BA.debugLineNum = 772;BA.debugLine="Return False";
if (true) return __c.False;
 //BA.debugLineNum = 773;BA.debugLine="End Sub";
return false;
}
public String  _jobdone(reparto_izca.keymon.lat.httpjob _job) throws Exception{
reparto_izca.keymon.lat.dbrequestmanager._dbresult _result = null;
Object[] _records = null;
String _cat_cl_codigo = "";
String _cat_cl_ruta = "";
String _cat_cl_nombre = "";
String _cat_cl_atiende1 = "";
String _cat_cl_atiente2 = "";
String _cat_cl_telefono = "";
String _cat_cl_email = "";
String _cat_cl_calle = "";
String _cat_cl_noext = "";
String _cat_cl_noint = "";
String _cat_cl_calle1 = "";
String _cat_cl_calle2 = "";
String _cat_cl_colonia = "";
String _cat_cl_muni = "";
String _cat_cl_edo = "";
String _cat_cl_cp = "";
String _cat_cl_long = "";
String _cat_cl_lat = "";
String _cat_cl_bcredito = "";
String _nota = "";
String _cliente = "";
String _saldo_pendiente = "";
String _detalle = "";
String _conteo_cat = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _clientes = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _detalleventa = null;
String _cat_gp_id = "";
String _cat_gp_nombre = "";
String _cat_gp_imp1 = "";
String _cat_gp_imp2 = "";
String _cat_gp_precio = "";
String _cat_gp_clasif = "";
String _cat_gp_sts = "";
String _cat_gp_tipo = "";
String _cat_gp_subtipo = "";
byte[] _cat_gp_img = null;
int _cat_gp_almacen = 0;
int _cat_gp_tipoprod = 0;
int _cat_gp_iniciativa = 0;
float _cat_dp_precio4 = 0f;
int _cat_dp_conversion1 = 0;
String _conversion = "";
String _precioconver = "";
String _cat_dp_almacen = "";
String _cat_dp_id = "";
String _cat_dp_idprod = "";
String _cat_dp_tipo = "";
String _cat_dp_pzas = "";
String _cat_dp_usuario = "";
String _cat_dp_fecha = "";
String _cat_dp_regalo = "";
String _cat_dp_clasif = "";
String _cat_dp_precio = "";
String _cat_dp_precio_simptos = "";
String _hvd_estatus = "";
String _hv_cliente = "";
String _hv_long = "";
String _hv_lat = "";
int _consecutivo = 0;
String _hvd_cliente = "";
String _hvd_pronombre = "";
String _hvd_cant = "";
String _hvd_costo_tot = "";
String _hvd_fecha = "";
String _hvd_codpromo = "";
String _hvd_proid = "";
String _hvd_num_ticket = "";
String _hvd_num_registro = "";
String _hvd_rechazo = "";
String _bcajas = "";
String _cantc = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _tc = null;
String _cat_va_descripcion = "";
String _cat_va_valor = "";
String _tmp_monto_pagare = "";
String _tmp_cliente = "";
int _cuantosp = 0;
int _cuantosc = 0;
int _cuantosn = 0;
String _cat_ve_version = "";
String _valido = "";
double _lat = 0;
double _lon = 0;
String _k = "";
 //BA.debugLineNum = 1468;BA.debugLine="Sub JobDone(Job As HttpJob)";
 //BA.debugLineNum = 1470;BA.debugLine="If Job.Success = False Then";
if (_job._success /*boolean*/ ==__c.False) { 
 //BA.debugLineNum = 1471;BA.debugLine="LogColor(\"** \" & Job.Tag & \" Error: \" & Job.Erro";
__c.LogImpl("514942211","** "+BA.ObjectToString(_job._tag /*Object*/ )+" Error: "+_job._errormessage /*String*/ ,__c.Colors.Red);
 }else {
 //BA.debugLineNum = 1474;BA.debugLine="LogColor(\"JobDone: '\" & reqManager.HandleJob(Job";
__c.LogImpl("514942214","JobDone: '"+BA.ObjectToString(_reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job).Tag /*Object*/ )+"' - Registros: "+BA.NumberToString(_reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job).Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),__c.Colors.Green);
 //BA.debugLineNum = 1475;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1476;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1477;BA.debugLine="If result.Tag = \"kmt_datos\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("kmt_datos"))) { 
 //BA.debugLineNum = 1478;BA.debugLine="If reqs.IndexOf(\"kmt_datos\") > -1 Then";
if (_reqs.IndexOf((Object)("kmt_datos"))>-1) { 
 //BA.debugLineNum = 1479;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"kmt_datos\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("kmt_datos")));
 };
 //BA.debugLineNum = 1482;BA.debugLine="Starter.skmt.BeginTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .BeginTransaction();
 //BA.debugLineNum = 1484;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group12 = _result.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 = 1485;BA.debugLine="Dim CAT_CL_CODIGO As String = records(result.";
_cat_cl_codigo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_CODIGO"))))]);
 //BA.debugLineNum = 1486;BA.debugLine="Dim CAT_CL_RUTA As String = records(result.Co";
_cat_cl_ruta = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_RUTA"))))]);
 //BA.debugLineNum = 1487;BA.debugLine="Dim CAT_CL_NOMBRE As String = records(result.";
_cat_cl_nombre = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_NOMBRE"))))]);
 //BA.debugLineNum = 1488;BA.debugLine="Dim CAT_CL_ATIENDE1 As String = records(resul";
_cat_cl_atiende1 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_ATIENDE1"))))]);
 //BA.debugLineNum = 1489;BA.debugLine="Dim CAT_CL_ATIENTE2 As String = records(resul";
_cat_cl_atiente2 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_ATIENTE2"))))]);
 //BA.debugLineNum = 1490;BA.debugLine="Dim CAT_CL_TELEFONO As String = records(resul";
_cat_cl_telefono = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_TELEFONO"))))]);
 //BA.debugLineNum = 1491;BA.debugLine="Dim CAT_CL_EMAIL As String = records(result.C";
_cat_cl_email = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_EMAIL"))))]);
 //BA.debugLineNum = 1492;BA.debugLine="Dim CAT_CL_CALLE As String = records(result.C";
_cat_cl_calle = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_CALLE"))))]);
 //BA.debugLineNum = 1493;BA.debugLine="Dim CAT_CL_NOEXT As String = records(result.C";
_cat_cl_noext = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_NOEXT"))))]);
 //BA.debugLineNum = 1494;BA.debugLine="Dim CAT_CL_NOINT As String = records(result.C";
_cat_cl_noint = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_NOINT"))))]);
 //BA.debugLineNum = 1495;BA.debugLine="Dim CAT_CL_CALLE1 As String = records(result.";
_cat_cl_calle1 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_CALLE1"))))]);
 //BA.debugLineNum = 1496;BA.debugLine="Dim CAT_CL_CALLE2 As String = records(result.";
_cat_cl_calle2 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_CALLE2"))))]);
 //BA.debugLineNum = 1497;BA.debugLine="Dim CAT_CL_COLONIA As String = records(result";
_cat_cl_colonia = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_COLONIA"))))]);
 //BA.debugLineNum = 1498;BA.debugLine="Dim CAT_CL_MUNI As String = records(result.Co";
_cat_cl_muni = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_MUNI"))))]);
 //BA.debugLineNum = 1499;BA.debugLine="Dim CAT_CL_EDO As String = records(result.Col";
_cat_cl_edo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_EDO"))))]);
 //BA.debugLineNum = 1500;BA.debugLine="Dim CAT_CL_CP As String = records(result.Colu";
_cat_cl_cp = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_CP"))))]);
 //BA.debugLineNum = 1501;BA.debugLine="Dim CAT_CL_LONG As String = records(result.Co";
_cat_cl_long = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_LONG"))))]);
 //BA.debugLineNum = 1502;BA.debugLine="Dim CAT_CL_LAT As String = records(result.Col";
_cat_cl_lat = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_LAT"))))]);
 //BA.debugLineNum = 1503;BA.debugLine="Dim CAT_CL_BCREDITO As String = records(resul";
_cat_cl_bcredito = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_BCREDITO"))))]);
 //BA.debugLineNum = 1506;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO kmt_i";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO kmt_info(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, gestion) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,0)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_cl_codigo),(Object)(_cat_cl_ruta),(Object)(_cat_cl_nombre),(Object)(_cat_cl_atiende1),(Object)(_cat_cl_atiente2),(Object)(_cat_cl_telefono),(Object)(_cat_cl_email),(Object)(_cat_cl_calle),(Object)(_cat_cl_noext),(Object)(_cat_cl_noint),(Object)(_cat_cl_calle1),(Object)(_cat_cl_calle2),(Object)(_cat_cl_colonia),(Object)(_cat_cl_muni),(Object)(_cat_cl_edo),(Object)(_cat_cl_cp),(Object)(_cat_cl_long),(Object)(_cat_cl_lat),(Object)(_cat_cl_bcredito)}));
 }
};
 //BA.debugLineNum = 1510;BA.debugLine="Starter.skmt.TransactionSuccessful";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .TransactionSuccessful();
 //BA.debugLineNum = 1511;BA.debugLine="Starter.skmt.EndTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .EndTransaction();
 //BA.debugLineNum = 1512;BA.debugLine="Listo1 = 1";
_listo1 = BA.NumberToString(1);
 //BA.debugLineNum = 1513;BA.debugLine="If Listo1 = 1  And Listo3 = 1  Then";
if ((_listo1).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1514;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 1515;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1516;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1517;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 };
 //BA.debugLineNum = 1521;BA.debugLine="t8.Initialize(\"t8\", 20000) ' 1000 = 1 second";
_t8.Initialize(ba,"t8",(long) (20000));
 //BA.debugLineNum = 1522;BA.debugLine="t8.Enabled = True";
_t8.setEnabled(__c.True);
 };
 };
 //BA.debugLineNum = 1527;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1528;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1529;BA.debugLine="If result.Tag = \"select_abonosp\" Then 'query ta";
if ((_result.Tag /*Object*/ ).equals((Object)("select_abonosp"))) { 
 //BA.debugLineNum = 1530;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group50 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen50 = group50.getSize()
;int index50 = 0;
;
for (; index50 < groupLen50;index50++){
_records = (Object[])(group50.Get(index50));
 //BA.debugLineNum = 1531;BA.debugLine="Dim NOTA As String = records(result.Columns.G";
_nota = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("NOTA"))))]);
 //BA.debugLineNum = 1532;BA.debugLine="Dim CLIENTE As String = records(result.Column";
_cliente = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CLIENTE"))))]);
 //BA.debugLineNum = 1533;BA.debugLine="Dim SALDO_PENDIENTE As String = records(resul";
_saldo_pendiente = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("SALDO_PENDIENTE"))))]);
 //BA.debugLineNum = 1535;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO ABONO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO ABONOSP(NOTA,CLIENTE,SALDO_PENDIENTE) VALUES (?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_nota),(Object)(_cliente),(Object)(_saldo_pendiente)}));
 }
};
 };
 };
 //BA.debugLineNum = 1540;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1541;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1542;BA.debugLine="If result.Tag = \"CONTEO_DATOS\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("CONTEO_DATOS"))) { 
 //BA.debugLineNum = 1543;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group61 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen61 = group61.getSize()
;int index61 = 0;
;
for (; index61 < groupLen61;index61++){
_records = (Object[])(group61.Get(index61));
 //BA.debugLineNum = 1544;BA.debugLine="Dim DETALLE As String = records(result.Column";
_detalle = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("DETALE"))))]);
 //BA.debugLineNum = 1545;BA.debugLine="Dim CONTEO_CAT As String = records(result.Col";
_conteo_cat = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CONTEO_CAT"))))]);
 }
};
 //BA.debugLineNum = 1550;BA.debugLine="Dim clientes As Cursor = Starter.skmt.ExecQuer";
_clientes = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_clientes = (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 count(*) as clientes from kmt_info")));
 //BA.debugLineNum = 1551;BA.debugLine="clientes.Position = 0";
_clientes.setPosition((int) (0));
 //BA.debugLineNum = 1553;BA.debugLine="Dim detalleventa As Cursor = Starter.skmt.Exec";
_detalleventa = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_detalleventa = (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 count(*) as detalle from hist_ventas")));
 //BA.debugLineNum = 1554;BA.debugLine="detalleventa.Position = 0";
_detalleventa.setPosition((int) (0));
 //BA.debugLineNum = 1556;BA.debugLine="Log(CONTEO_CAT)";
__c.LogImpl("514942296",_conteo_cat,0);
 //BA.debugLineNum = 1557;BA.debugLine="Log(clientes.GetString(\"clientes\"))";
__c.LogImpl("514942297",_clientes.GetString("clientes"),0);
 //BA.debugLineNum = 1558;BA.debugLine="If clientes.GetString(\"clientes\") = CONTEO_CAT";
if ((_clientes.GetString("clientes")).equals(_conteo_cat)) { 
 //BA.debugLineNum = 1559;BA.debugLine="PB_carga2.Progress = 100";
_pb_carga2.setProgress((int) (100));
 //BA.debugLineNum = 1560;BA.debugLine="l_carga2.Text = \"LISTO\"";
_l_carga2.setText(BA.ObjectToCharSequence("LISTO"));
 }else {
 };
 //BA.debugLineNum = 1565;BA.debugLine="Log(DETALLE)";
__c.LogImpl("514942305",_detalle,0);
 //BA.debugLineNum = 1566;BA.debugLine="Log(detalleventa.GetString(\"detalle\"))";
__c.LogImpl("514942306",_detalleventa.GetString("detalle"),0);
 //BA.debugLineNum = 1567;BA.debugLine="If detalleventa.GetString(\"detalle\") = DETALLE";
if ((_detalleventa.GetString("detalle")).equals(_detalle)) { 
 //BA.debugLineNum = 1568;BA.debugLine="PB_carga.Progress = 100";
_pb_carga.setProgress((int) (100));
 //BA.debugLineNum = 1569;BA.debugLine="L_carga.Text = \"LISTO\"";
_l_carga.setText(BA.ObjectToCharSequence("LISTO"));
 }else {
 };
 //BA.debugLineNum = 1574;BA.debugLine="clientes.Close";
_clientes.Close();
 //BA.debugLineNum = 1575;BA.debugLine="detalleventa.Close";
_detalleventa.Close();
 };
 };
 //BA.debugLineNum = 1581;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1582;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1583;BA.debugLine="If result.Tag = \"gunaprod3\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("gunaprod3"))) { 
 //BA.debugLineNum = 1584;BA.debugLine="If reqs.IndexOf(\"gunaprod3\") > -1 Then";
if (_reqs.IndexOf((Object)("gunaprod3"))>-1) { 
 //BA.debugLineNum = 1585;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"gunaprod3\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("gunaprod3")));
 //BA.debugLineNum = 1586;BA.debugLine="Log(reqs.Size)";
__c.LogImpl("514942326",BA.NumberToString(_reqs.getSize()),0);
 };
 //BA.debugLineNum = 1588;BA.debugLine="Starter.skmt.BeginTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .BeginTransaction();
 //BA.debugLineNum = 1589;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group95 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen95 = group95.getSize()
;int index95 = 0;
;
for (; index95 < groupLen95;index95++){
_records = (Object[])(group95.Get(index95));
 //BA.debugLineNum = 1590;BA.debugLine="Dim CAT_GP_ID As String = records(result.Colu";
_cat_gp_id = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_ID"))))]);
 //BA.debugLineNum = 1591;BA.debugLine="Dim CAT_GP_NOMBRE As String = records(result.";
_cat_gp_nombre = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_NOMBRE"))))]);
 //BA.debugLineNum = 1592;BA.debugLine="Dim CAT_GP_IMP1 As String = records(result.Co";
_cat_gp_imp1 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_IMP1"))))]);
 //BA.debugLineNum = 1593;BA.debugLine="Dim CAT_GP_IMP2 As String = records(result.Co";
_cat_gp_imp2 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_IMP2"))))]);
 //BA.debugLineNum = 1594;BA.debugLine="Dim CAT_GP_PRECIO As String = records(result.";
_cat_gp_precio = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_PRECIO"))))]);
 //BA.debugLineNum = 1595;BA.debugLine="Dim CAT_GP_CLASIF As String = records(result.";
_cat_gp_clasif = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_CLASIF"))))]);
 //BA.debugLineNum = 1596;BA.debugLine="Dim CAT_GP_STS As String = records(result.Col";
_cat_gp_sts = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_STS"))))]);
 //BA.debugLineNum = 1597;BA.debugLine="Dim CAT_GP_TIPO As String = records(result.Co";
_cat_gp_tipo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_TIPO"))))]);
 //BA.debugLineNum = 1598;BA.debugLine="Dim CAT_GP_SUBTIPO As String = records(result";
_cat_gp_subtipo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_SUBTIPO"))))]);
 //BA.debugLineNum = 1599;BA.debugLine="Dim CAT_GP_IMG() As Byte = records(result.Col";
_cat_gp_img = (byte[])(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_IMG"))))]);
 //BA.debugLineNum = 1600;BA.debugLine="Dim CAT_GP_ALMACEN As Int = records(result.Co";
_cat_gp_almacen = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_ALMACEN"))))]));
 //BA.debugLineNum = 1602;BA.debugLine="Dim CAT_GP_TIPOPROD As Int = records(result.C";
_cat_gp_tipoprod = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_TIPOPROD"))))]));
 //BA.debugLineNum = 1603;BA.debugLine="Dim CAT_GP_INICIATIVA As Int = records(result";
_cat_gp_iniciativa = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_INICIATIVA"))))]));
 //BA.debugLineNum = 1604;BA.debugLine="Dim CAT_DP_PRECIO4 As Float = records(result.";
_cat_dp_precio4 = (float)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_PRECIO4"))))]));
 //BA.debugLineNum = 1605;BA.debugLine="Dim CAT_DP_CONVERSION1 As Int = records(resul";
_cat_dp_conversion1 = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_CONVERSION1"))))]));
 //BA.debugLineNum = 1609;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO CAT_G";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_GUNAPROD3(CAT_GP_ID,CAT_GP_NOMBRE,CAT_GP_IMP1,CAT_GP_IMP2,CAT_GP_PRECIO,CAT_GP_CLASIF,CAT_GP_STS,CAT_GP_TIPO,CAT_GP_SUBTIPO,CAT_GP_IMG,CAT_GP_ALMACEN,CAT_GP_TIPOPROD,CAT_GP_INICIATIVA,CAT_DP_PRECIO4,CAT_DP_CONVERSION1) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_gp_id),(Object)(_cat_gp_nombre),(Object)(_cat_gp_imp1),(Object)(_cat_gp_imp2),(Object)(_cat_gp_precio),(Object)(_cat_gp_clasif),(Object)(_cat_gp_sts),(Object)(_cat_gp_tipo),(Object)(_cat_gp_subtipo),(Object)(_cat_gp_img),(Object)(_cat_gp_almacen),(Object)(_cat_gp_tipoprod),(Object)(_cat_gp_iniciativa),(Object)(_cat_dp_precio4),(Object)(_cat_dp_conversion1)}));
 }
};
 //BA.debugLineNum = 1611;BA.debugLine="Starter.skmt.TransactionSuccessful";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .TransactionSuccessful();
 //BA.debugLineNum = 1612;BA.debugLine="Starter.skmt.EndTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .EndTransaction();
 //BA.debugLineNum = 1613;BA.debugLine="Listo2=1";
_listo2 = BA.NumberToString(1);
 //BA.debugLineNum = 1614;BA.debugLine="If Listo1 = 1 And Listo2 =1 And Listo3 = 1 And";
if ((_listo1).equals(BA.NumberToString(1)) && (_listo2).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1)) && (_listo4).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1615;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 1616;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1617;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1618;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 1623;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1624;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1625;BA.debugLine="If result.Tag = \"gunaprod\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("gunaprod"))) { 
 //BA.debugLineNum = 1626;BA.debugLine="Log(\"Entramos a GUNA_PROD<--------------------";
__c.LogImpl("514942366","Entramos a GUNA_PROD<---------------------------------",0);
 //BA.debugLineNum = 1627;BA.debugLine="If reqs.IndexOf(\"gunaprod\") > -1 Then";
if (_reqs.IndexOf((Object)("gunaprod"))>-1) { 
 //BA.debugLineNum = 1628;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"gunaprod\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("gunaprod")));
 //BA.debugLineNum = 1629;BA.debugLine="Log(reqs.Size)";
__c.LogImpl("514942369",BA.NumberToString(_reqs.getSize()),0);
 };
 //BA.debugLineNum = 1631;BA.debugLine="Starter.skmt.BeginTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .BeginTransaction();
 //BA.debugLineNum = 1632;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group133 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen133 = group133.getSize()
;int index133 = 0;
;
for (; index133 < groupLen133;index133++){
_records = (Object[])(group133.Get(index133));
 //BA.debugLineNum = 1633;BA.debugLine="Dim CAT_GP_ID As String = records(result.Colu";
_cat_gp_id = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_ID"))))]);
 //BA.debugLineNum = 1634;BA.debugLine="Dim CAT_GP_NOMBRE As String = records(result.";
_cat_gp_nombre = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_NOMBRE"))))]);
 //BA.debugLineNum = 1635;BA.debugLine="Dim CAT_GP_IMP1 As String = records(result.Co";
_cat_gp_imp1 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_IMP1"))))]);
 //BA.debugLineNum = 1636;BA.debugLine="Dim CAT_GP_IMP2 As String = records(result.Co";
_cat_gp_imp2 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_IMP2"))))]);
 //BA.debugLineNum = 1637;BA.debugLine="Dim CAT_GP_PRECIO As String = records(result.";
_cat_gp_precio = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_PRECIO"))))]);
 //BA.debugLineNum = 1638;BA.debugLine="Dim CAT_GP_CLASIF As String = records(result.";
_cat_gp_clasif = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_CLASIF"))))]);
 //BA.debugLineNum = 1639;BA.debugLine="Dim CAT_GP_STS As String = records(result.Col";
_cat_gp_sts = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_STS"))))]);
 //BA.debugLineNum = 1640;BA.debugLine="Dim CAT_GP_TIPO As String = records(result.Co";
_cat_gp_tipo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_TIPO"))))]);
 //BA.debugLineNum = 1641;BA.debugLine="Dim CAT_GP_SUBTIPO As String = records(result";
_cat_gp_subtipo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_SUBTIPO"))))]);
 //BA.debugLineNum = 1642;BA.debugLine="Dim CONVERSION As String = 0'records(result.C";
_conversion = BA.NumberToString(0);
 //BA.debugLineNum = 1643;BA.debugLine="Dim PRECIOCONVER As String = 0' records(resul";
_precioconver = BA.NumberToString(0);
 //BA.debugLineNum = 1644;BA.debugLine="Dim CAT_GP_IMG() As Byte = records(result.Col";
_cat_gp_img = (byte[])(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_IMG"))))]);
 //BA.debugLineNum = 1649;BA.debugLine="Log(CAT_GP_NOMBRE & \"<-----------------------";
__c.LogImpl("514942389",_cat_gp_nombre+"<-------------------------------------",0);
 //BA.debugLineNum = 1650;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO CAT_G";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_GUNAPROD(CAT_GP_ID,CAT_GP_NOMBRE,CAT_GP_IMP1,CAT_GP_IMP2,CAT_GP_PRECIO,CAT_GP_CLASIF,CAT_GP_STS,CAT_GP_TIPO,CAT_GP_SUBTIPO,CAT_GP_IMG,CAT_GP_ALMACEN,CONVERSION,PRECIOCONVER) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_gp_id),(Object)(_cat_gp_nombre),(Object)(_cat_gp_imp1),(Object)(_cat_gp_imp2),(Object)(_cat_gp_precio),(Object)(_cat_gp_clasif),(Object)(_cat_gp_sts),(Object)(_cat_gp_tipo),(Object)(_cat_gp_subtipo),(Object)(_cat_gp_img),(Object)(0),(Object)(_conversion),(Object)(_precioconver)}));
 }
};
 //BA.debugLineNum = 1652;BA.debugLine="Starter.skmt.TransactionSuccessful";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .TransactionSuccessful();
 //BA.debugLineNum = 1653;BA.debugLine="Starter.skmt.EndTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .EndTransaction();
 //BA.debugLineNum = 1654;BA.debugLine="Listo2=1";
_listo2 = BA.NumberToString(1);
 //BA.debugLineNum = 1655;BA.debugLine="If Listo1 = 1 And Listo2 =1 And Listo3 = 1 And";
if ((_listo1).equals(BA.NumberToString(1)) && (_listo2).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1)) && (_listo4).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1656;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 1657;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1658;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1659;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 1664;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1665;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1666;BA.debugLine="If result.Tag = \"gunaprodp\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("gunaprodp"))) { 
 //BA.debugLineNum = 1667;BA.debugLine="If reqs.IndexOf(\"gunaprodp\") > -1 Then";
if (_reqs.IndexOf((Object)("gunaprodp"))>-1) { 
 //BA.debugLineNum = 1668;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"gunaprodp\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("gunaprodp")));
 //BA.debugLineNum = 1669;BA.debugLine="Log(reqs.Size)";
__c.LogImpl("514942409",BA.NumberToString(_reqs.getSize()),0);
 };
 //BA.debugLineNum = 1671;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group167 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen167 = group167.getSize()
;int index167 = 0;
;
for (; index167 < groupLen167;index167++){
_records = (Object[])(group167.Get(index167));
 //BA.debugLineNum = 1672;BA.debugLine="Dim CAT_GP_ID As String = records(result.Colu";
_cat_gp_id = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_ID"))))]);
 //BA.debugLineNum = 1673;BA.debugLine="Dim CAT_GP_NOMBRE As String = records(result.";
_cat_gp_nombre = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_NOMBRE"))))]);
 //BA.debugLineNum = 1674;BA.debugLine="Dim CAT_GP_IMP1 As String = records(result.Co";
_cat_gp_imp1 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_IMP1"))))]);
 //BA.debugLineNum = 1675;BA.debugLine="Dim CAT_GP_IMP2 As String = records(result.Co";
_cat_gp_imp2 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_IMP2"))))]);
 //BA.debugLineNum = 1676;BA.debugLine="Dim CAT_GP_PRECIO As String = records(result.";
_cat_gp_precio = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_PRECIO"))))]);
 //BA.debugLineNum = 1677;BA.debugLine="Dim CAT_GP_CLASIF As String = records(result.";
_cat_gp_clasif = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_CLASIF"))))]);
 //BA.debugLineNum = 1678;BA.debugLine="Dim CAT_GP_STS As String = records(result.Col";
_cat_gp_sts = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_STS"))))]);
 //BA.debugLineNum = 1679;BA.debugLine="Dim CAT_GP_TIPO As String = records(result.Co";
_cat_gp_tipo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_TIPO"))))]);
 //BA.debugLineNum = 1680;BA.debugLine="Dim CAT_GP_SUBTIPO As String = records(result";
_cat_gp_subtipo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_SUBTIPO"))))]);
 //BA.debugLineNum = 1681;BA.debugLine="Dim CAT_GP_IMG() As Byte = records(result.Col";
_cat_gp_img = (byte[])(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_IMG"))))]);
 //BA.debugLineNum = 1684;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO CAT_G";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_GUNAPROD(CAT_GP_ID,CAT_GP_NOMBRE,CAT_GP_IMP1,CAT_GP_IMP2,CAT_GP_PRECIO,CAT_GP_CLASIF,CAT_GP_STS,CAT_GP_TIPO,CAT_GP_SUBTIPO,CAT_GP_IMG,CAT_GP_ALMACEN) VALUES (?,?,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_gp_id),(Object)(_cat_gp_nombre),(Object)(_cat_gp_imp1),(Object)(_cat_gp_imp2),(Object)(_cat_gp_precio),(Object)(_cat_gp_clasif),(Object)(_cat_gp_sts),(Object)(_cat_gp_tipo),(Object)(_cat_gp_subtipo),(Object)(_cat_gp_img),(Object)(0)}));
 }
};
 //BA.debugLineNum = 1686;BA.debugLine="Listo4=1";
_listo4 = BA.NumberToString(1);
 //BA.debugLineNum = 1687;BA.debugLine="If Listo1 = 1 And Listo2 =1 And Listo3 = 1 And";
if ((_listo1).equals(BA.NumberToString(1)) && (_listo2).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1)) && (_listo4).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1688;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 1689;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1690;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1691;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 }else if((_listo4).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1)) && (_inve).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1693;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 1694;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1695;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1696;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 1701;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1702;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1703;BA.debugLine="If result.Tag = \"detallepaq\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("detallepaq"))) { 
 //BA.debugLineNum = 1704;BA.debugLine="If reqs.IndexOf(\"detallepaq\") > -1 Then";
if (_reqs.IndexOf((Object)("detallepaq"))>-1) { 
 //BA.debugLineNum = 1705;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"detallepaq\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("detallepaq")));
 //BA.debugLineNum = 1706;BA.debugLine="Log(reqs.Size)";
__c.LogImpl("514942446",BA.NumberToString(_reqs.getSize()),0);
 };
 //BA.debugLineNum = 1708;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group201 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen201 = group201.getSize()
;int index201 = 0;
;
for (; index201 < groupLen201;index201++){
_records = (Object[])(group201.Get(index201));
 //BA.debugLineNum = 1709;BA.debugLine="Dim CAT_DP_ALMACEN  As String = records(resul";
_cat_dp_almacen = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_ALMACEN"))))]);
 //BA.debugLineNum = 1710;BA.debugLine="Dim CAT_DP_ID As String = records(result.Colu";
_cat_dp_id = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_ID"))))]);
 //BA.debugLineNum = 1711;BA.debugLine="Dim CAT_DP_IDPROD As String = records(result.";
_cat_dp_idprod = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_IDPROD"))))]);
 //BA.debugLineNum = 1712;BA.debugLine="Dim CAT_DP_TIPO As String = records(result.Co";
_cat_dp_tipo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_TIPO"))))]);
 //BA.debugLineNum = 1713;BA.debugLine="Dim CAT_DP_PZAS As String = records(result.Co";
_cat_dp_pzas = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_PZAS"))))]);
 //BA.debugLineNum = 1714;BA.debugLine="Dim CAT_DP_USUARIO  As String = records(resul";
_cat_dp_usuario = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_USUARIO"))))]);
 //BA.debugLineNum = 1715;BA.debugLine="Dim CAT_DP_FECHA As String = records(result.C";
_cat_dp_fecha = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_FECHA"))))]);
 //BA.debugLineNum = 1716;BA.debugLine="Dim CAT_DP_REGALO  As String = records(result";
_cat_dp_regalo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_REGALO"))))]);
 //BA.debugLineNum = 1717;BA.debugLine="Dim CAT_DP_CLASIF  As String = records(result";
_cat_dp_clasif = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_CLASIF"))))]);
 //BA.debugLineNum = 1718;BA.debugLine="Dim CAT_DP_PRECIO As String = records(result.";
_cat_dp_precio = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_PRECIO"))))]);
 //BA.debugLineNum = 1719;BA.debugLine="Dim CAT_DP_PRECIO_SIMPTOS As String = records";
_cat_dp_precio_simptos = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_PRECIO_SIMPTOS"))))]);
 //BA.debugLineNum = 1721;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO CAT_D";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_DETALLES_PAQ(CAT_DP_ALMACEN,CAT_DP_ID,CAT_DP_IDPROD,CAT_DP_TIPO,CAT_DP_PZAS,CAT_DP_USUARIO,CAT_DP_FECHA,CAT_DP_REGALO,CAT_DP_CLASIF,CAT_DP_PRECIO,CAT_DP_PRECIO_SIMPTOS) VALUES (?,?,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_dp_almacen),(Object)(_cat_dp_id),(Object)(_cat_dp_idprod),(Object)(_cat_dp_tipo),(Object)(_cat_dp_pzas),(Object)(_cat_dp_usuario),(Object)(_cat_dp_fecha),(Object)(_cat_dp_regalo),(Object)(_cat_dp_clasif),(Object)(_cat_dp_precio),(Object)(_cat_dp_precio_simptos)}));
 }
};
 //BA.debugLineNum = 1723;BA.debugLine="Listo3 =1";
_listo3 = BA.NumberToString(1);
 //BA.debugLineNum = 1724;BA.debugLine="If Listo1 = 1 And Listo2 = 1 And Listo3 = 1 An";
if ((_listo1).equals(BA.NumberToString(1)) && (_listo2).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1)) && (_listo4).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1725;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 1726;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1727;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1728;BA.debugLine="EJECUTANDO = 0";
_ejecutando = BA.NumberToString(0);
 }else if((_listo4).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1)) && (_inve).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1730;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 1731;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1732;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1733;BA.debugLine="EJECUTANDO = 0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 1738;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1739;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1740;BA.debugLine="If result.Tag = \"estatus\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("estatus"))) { 
 //BA.debugLineNum = 1741;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group232 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen232 = group232.getSize()
;int index232 = 0;
;
for (; index232 < groupLen232;index232++){
_records = (Object[])(group232.Get(index232));
 //BA.debugLineNum = 1742;BA.debugLine="Dim hvd_estatus As String = records(result.Co";
_hvd_estatus = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_ESTATUS"))))]);
 //BA.debugLineNum = 1743;BA.debugLine="If hvd_estatus = \"Liquidado\" Then";
if ((_hvd_estatus).equals("Liquidado")) { 
 //BA.debugLineNum = 1745;BA.debugLine="MsgboxAsync(\"La venta ya fue liquidada\",\"Ate";
__c.MsgboxAsync(BA.ObjectToCharSequence("La venta ya fue liquidada"),BA.ObjectToCharSequence("Atención"),ba);
 }else {
 //BA.debugLineNum = 1747;BA.debugLine="envioinfo";
_envioinfo();
 };
 }
};
 };
 };
 //BA.debugLineNum = 1753;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1754;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1755;BA.debugLine="If result.Tag = \"punteo\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("punteo"))) { 
 //BA.debugLineNum = 1756;BA.debugLine="If reqs.IndexOf(\"punteo\") > -1 Then";
if (_reqs.IndexOf((Object)("punteo"))>-1) { 
 //BA.debugLineNum = 1757;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"punteo\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("punteo")));
 };
 //BA.debugLineNum = 1760;BA.debugLine="If reqs.IndexOf(\"punteo\") > 0 Then";
if (_reqs.IndexOf((Object)("punteo"))>0) { 
 //BA.debugLineNum = 1761;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"punteo\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("punteo")));
 //BA.debugLineNum = 1762;BA.debugLine="Log(reqs.Size)";
__c.LogImpl("514942502",BA.NumberToString(_reqs.getSize()),0);
 };
 //BA.debugLineNum = 1764;BA.debugLine="Starter.skmt.BeginTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .BeginTransaction();
 //BA.debugLineNum = 1765;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group253 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen253 = group253.getSize()
;int index253 = 0;
;
for (; index253 < groupLen253;index253++){
_records = (Object[])(group253.Get(index253));
 //BA.debugLineNum = 1766;BA.debugLine="Dim HV_CLIENTE As String = records(result.Col";
_hv_cliente = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HV_CLIENTE"))))]);
 //BA.debugLineNum = 1767;BA.debugLine="Dim HV_LONG As String = records(result.Column";
_hv_long = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HV_LONG"))))]);
 //BA.debugLineNum = 1768;BA.debugLine="Dim HV_LAT As String = records(result.Columns";
_hv_lat = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HV_LAT"))))]);
 //BA.debugLineNum = 1770;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO PUNTE";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PUNTEO_GPS(HV_CLIENTE, HV_LONG, HV_LAT) VALUES (?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_hv_cliente),(Object)(_hv_long),(Object)(_hv_lat)}));
 }
};
 //BA.debugLineNum = 1772;BA.debugLine="Starter.skmt.TransactionSuccessful";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .TransactionSuccessful();
 //BA.debugLineNum = 1773;BA.debugLine="Starter.skmt.EndTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .EndTransaction();
 };
 };
 //BA.debugLineNum = 1777;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1778;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1779;BA.debugLine="If result.Tag = \"hist_datos\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("hist_datos"))) { 
 //BA.debugLineNum = 1780;BA.debugLine="If reqs.IndexOf(\"hist_datos\") > -1 Then";
if (_reqs.IndexOf((Object)("hist_datos"))>-1) { 
 //BA.debugLineNum = 1781;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"hist_datos\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("hist_datos")));
 };
 //BA.debugLineNum = 1784;BA.debugLine="Log(l_ruta.text)";
__c.LogImpl("514942524",_l_ruta.getText(),0);
 //BA.debugLineNum = 1785;BA.debugLine="Log($\"********  Insertamos HV - ${result.Rows.";
__c.LogImpl("514942525",("********  Insertamos HV - "+__c.SmartStringFormatter("",(Object)(_result.Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()))+""),0);
 //BA.debugLineNum = 1786;BA.debugLine="Starter.skmt.BeginTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .BeginTransaction();
 //BA.debugLineNum = 1787;BA.debugLine="Dim consecutivo  As Int= 0";
_consecutivo = (int) (0);
 //BA.debugLineNum = 1788;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group273 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen273 = group273.getSize()
;int index273 = 0;
;
for (; index273 < groupLen273;index273++){
_records = (Object[])(group273.Get(index273));
 //BA.debugLineNum = 1789;BA.debugLine="Dim HVD_CLIENTE As String = records(result.Co";
_hvd_cliente = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_CLIENTE"))))]);
 //BA.debugLineNum = 1790;BA.debugLine="Dim HVD_PRONOMBRE As String = records(result.";
_hvd_pronombre = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_PRONOMBRE"))))]);
 //BA.debugLineNum = 1791;BA.debugLine="Dim HVD_CANT As String = records(result.Colum";
_hvd_cant = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_CANT"))))]);
 //BA.debugLineNum = 1792;BA.debugLine="Dim HVD_COSTO_TOT As String = records(result.";
_hvd_costo_tot = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_COSTO_TOT"))))]);
 //BA.debugLineNum = 1793;BA.debugLine="Dim HVD_FECHA As String = records(result.Colu";
_hvd_fecha = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_FECHA"))))]);
 //BA.debugLineNum = 1794;BA.debugLine="Dim HVD_CODPROMO As String = records(result.C";
_hvd_codpromo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_CODPROMO"))))]);
 //BA.debugLineNum = 1795;BA.debugLine="Dim HVD_PROID As String = records(result.Colu";
_hvd_proid = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_PROID"))))]);
 //BA.debugLineNum = 1796;BA.debugLine="Dim HVD_NUM_TICKET As String = records(result";
_hvd_num_ticket = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_NUM_TICKET"))))]);
 //BA.debugLineNum = 1797;BA.debugLine="Dim HVD_NUM_REGISTRO As String = records(resu";
_hvd_num_registro = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_NUM_REGISTRO"))))]);
 //BA.debugLineNum = 1798;BA.debugLine="Dim HVD_RECHAZO As String = records(result.Co";
_hvd_rechazo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_RECHAZO"))))]);
 //BA.debugLineNum = 1800;BA.debugLine="Dim bcajas As String = 0 ' records(result.Col";
_bcajas = BA.NumberToString(0);
 //BA.debugLineNum = 1801;BA.debugLine="Dim cantc As String = 0 'records(result.Colum";
_cantc = BA.NumberToString(0);
 //BA.debugLineNum = 1803;BA.debugLine="consecutivo = consecutivo +1";
_consecutivo = (int) (_consecutivo+1);
 //BA.debugLineNum = 1804;BA.debugLine="Log(HVD_PRONOMBRE & \", \" & HVD_CANT & \", \" &H";
__c.LogImpl("514942544",_hvd_pronombre+", "+_hvd_cant+", "+_hvd_cliente,0);
 //BA.debugLineNum = 1805;BA.debugLine="If l_ruta.Text = \"0\" Then 'Si no hay ruta car";
if ((_l_ruta.getText()).equals("0")) { 
 //BA.debugLineNum = 1806;BA.debugLine="Log(\"No hay ruta, guardamos todos\")";
__c.LogImpl("514942546","No hay ruta, guardamos todos",0);
 //BA.debugLineNum = 1807;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO HIST";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO HIST_VENTAS(HVD_CLIENTE, HVD_PRONOMBRE, HVD_CANT,HVD_COSTO_TOT, HVD_FECHA, HVD_CODPROMO, HVD_PROID,HVD_NUM_TICKET, HVD_NUM_REGISTRO, HVD_RECHAZO, HVD_ESTATUS, HVD_PARCIAL, BCAJAS,CANTC,CONSECUTIVO,BCAJAS_OR,CANTC_OR) VALUES (?,?,?,?,?,?,?,?,?,?,0,0,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_hvd_cliente),(Object)(_hvd_pronombre),(Object)(_hvd_cant),(Object)(_hvd_costo_tot),(Object)(_hvd_fecha),(Object)(_hvd_codpromo),(Object)(_hvd_proid),(Object)(_hvd_num_ticket),(Object)(_hvd_num_registro),(Object)(_hvd_rechazo),(Object)(_bcajas),(Object)(_cantc),(Object)(_consecutivo),(Object)(_bcajas),(Object)(_cantc)}));
 //BA.debugLineNum = 1808;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO HIST";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO HIST_VENTAS2(HVD_CLIENTE,HVD_PRONOMBRE,HVD_CANT,HVD_COSTO_TOT, HVD_FECHA, HVD_CODPROMO, HVD_PROID,HVD_NUM_TICKET, HVD_NUM_REGISTRO, HVD_RECHAZO, HVD_ESTATUS, HVD_PARCIAL) VALUES (?,?,?,?,?,?,?,?,?,?,0,0)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_hvd_cliente),(Object)(_hvd_pronombre),(Object)(_hvd_cant),(Object)(_hvd_costo_tot),(Object)(_hvd_fecha),(Object)(_hvd_codpromo),(Object)(_hvd_proid),(Object)(_hvd_num_ticket),(Object)(_hvd_num_registro),(Object)(_hvd_rechazo)}));
 }else {
 //BA.debugLineNum = 1811;BA.debugLine="Private tc As Cursor = Starter.skmt.ExecQuer";
_tc = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_tc = (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_CLIENTE from HIST_VENTAS where HVD_CLIENTE = '"+__c.SmartStringFormatter("",(Object)(_hvd_cliente))+"' and HVD_PROID = '"+__c.SmartStringFormatter("",(Object)(_hvd_proid))+"' AND HVD_CANT = '"+__c.SmartStringFormatter("",(Object)(_hvd_cant))+"' AND HVD_CODPROMO = '"+__c.SmartStringFormatter("",(Object)(_hvd_codpromo))+"' "))));
 //BA.debugLineNum = 1812;BA.debugLine="If tc.RowCount = 0 Then";
if (_tc.getRowCount()==0) { 
 //BA.debugLineNum = 1813;BA.debugLine="Log($\"Guardamos ${HVD_CLIENTE}\"$)";
__c.LogImpl("514942553",("Guardamos "+__c.SmartStringFormatter("",(Object)(_hvd_cliente))+""),0);
 //BA.debugLineNum = 1814;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO HIS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO HIST_VENTAS(HVD_CLIENTE,HVD_PRONOMBRE,HVD_CANT,HVD_COSTO_TOT, HVD_FECHA, HVD_CODPROMO, HVD_PROID,HVD_NUM_TICKET, HVD_NUM_REGISTRO, HVD_RECHAZO, HVD_ESTATUS, HVD_PARCIAL, BCAJAS,CANTC,CONSECUTIVO,BCAJAS_OR,CANTC_OR) VALUES (?,?,?,?,?,?,?,?,?,?,0,0,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_hvd_cliente),(Object)(_hvd_pronombre),(Object)(_hvd_cant),(Object)(_hvd_costo_tot),(Object)(_hvd_fecha),(Object)(_hvd_codpromo),(Object)(_hvd_proid),(Object)(_hvd_num_ticket),(Object)(_hvd_num_registro),(Object)(_hvd_rechazo),(Object)(_bcajas),(Object)(_cantc),(Object)(_consecutivo),(Object)(_bcajas),(Object)(_cantc)}));
 //BA.debugLineNum = 1815;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO HIS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO HIST_VENTAS2(HVD_CLIENTE,HVD_PRONOMBRE,HVD_CANT,HVD_COSTO_TOT, HVD_FECHA, HVD_CODPROMO, HVD_PROID,HVD_NUM_TICKET, HVD_NUM_REGISTRO, HVD_RECHAZO, HVD_ESTATUS, HVD_PARCIAL) VALUES (?,?,?,?,?,?,?,?,?,?,0,0)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_hvd_cliente),(Object)(_hvd_pronombre),(Object)(_hvd_cant),(Object)(_hvd_costo_tot),(Object)(_hvd_fecha),(Object)(_hvd_codpromo),(Object)(_hvd_proid),(Object)(_hvd_num_ticket),(Object)(_hvd_num_registro),(Object)(_hvd_rechazo)}));
 };
 };
 }
};
 //BA.debugLineNum = 1819;BA.debugLine="Starter.skmt.TransactionSuccessful";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .TransactionSuccessful();
 //BA.debugLineNum = 1820;BA.debugLine="Starter.skmt.EndTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .EndTransaction();
 //BA.debugLineNum = 1821;BA.debugLine="Log($\"********  Terminamos HV - ${result.Rows.";
__c.LogImpl("514942561",("********  Terminamos HV - "+__c.SmartStringFormatter("",(Object)(_result.Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()))+""),0);
 //BA.debugLineNum = 1835;BA.debugLine="Listo3 =1";
_listo3 = BA.NumberToString(1);
 //BA.debugLineNum = 1836;BA.debugLine="If Listo1 = 1  And Listo3 = 1  Then";
if ((_listo1).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1837;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 1838;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1839;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1840;BA.debugLine="EJECUTANDO = 0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 1846;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1847;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1848;BA.debugLine="If result.Tag = \"variables\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("variables"))) { 
 //BA.debugLineNum = 1849;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group316 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen316 = group316.getSize()
;int index316 = 0;
;
for (; index316 < groupLen316;index316++){
_records = (Object[])(group316.Get(index316));
 //BA.debugLineNum = 1850;BA.debugLine="Dim Cat_Va_Descripcion As String = records(re";
_cat_va_descripcion = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_VA_DESCRIPCION"))))]);
 //BA.debugLineNum = 1851;BA.debugLine="Dim Cat_Va_Valor As String = records(result.C";
_cat_va_valor = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_VA_VALOR"))))]);
 //BA.debugLineNum = 1853;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO CAT_V";
_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)(_cat_va_descripcion),(Object)(_cat_va_valor)}));
 }
};
 };
 };
 //BA.debugLineNum = 1859;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1860;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1861;BA.debugLine="If result.Tag = \"PAGARES\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("PAGARES"))) { 
 //BA.debugLineNum = 1862;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group326 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen326 = group326.getSize()
;int index326 = 0;
;
for (; index326 < groupLen326;index326++){
_records = (Object[])(group326.Get(index326));
 //BA.debugLineNum = 1864;BA.debugLine="Dim TMP_MONTO_PAGARE As String = records(resu";
_tmp_monto_pagare = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("TMP_MONTO_PAGARE"))))]);
 //BA.debugLineNum = 1865;BA.debugLine="Dim TMP_CLIENTE As String = records(result.Co";
_tmp_cliente = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("TMP_CLIENTE"))))]);
 //BA.debugLineNum = 1867;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO PAGAR";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PAGARES(TMP_MONTO_PAGARE, TMP_CLIENTE) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_tmp_monto_pagare),(Object)(_tmp_cliente)}));
 }
};
 };
 };
 //BA.debugLineNum = 1872;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1873;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1874;BA.debugLine="If result.Tag = \"valida_pedido\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("valida_pedido"))) { 
 //BA.debugLineNum = 1875;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group336 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen336 = group336.getSize()
;int index336 = 0;
;
for (; index336 < groupLen336;index336++){
_records = (Object[])(group336.Get(index336));
 //BA.debugLineNum = 1876;BA.debugLine="Dim CUANTOSP As Int = records(result.Columns.";
_cuantosp = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CUANTOSP"))))]));
 //BA.debugLineNum = 1877;BA.debugLine="If cuantos_pedido = CUANTOSP Then";
if ((_cuantos_pedido).equals(BA.NumberToString(_cuantosp))) { 
 //BA.debugLineNum = 1879;BA.debugLine="datos_iguales = \"ok\"";
_datos_iguales = "ok";
 }else {
 //BA.debugLineNum = 1881;BA.debugLine="ToastMessageShow(\"No se cargo bien la info P";
__c.ToastMessageShow(BA.ObjectToCharSequence("No se cargo bien la info P. Sync Nuevamente"+BA.NumberToString(_cuantosp)+" "+_cuantos_pedido),__c.True);
 };
 }
};
 };
 };
 //BA.debugLineNum = 1889;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1890;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1891;BA.debugLine="If result.Tag = \"valida_pedidoc\" Then 'query ta";
if ((_result.Tag /*Object*/ ).equals((Object)("valida_pedidoc"))) { 
 //BA.debugLineNum = 1892;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group349 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen349 = group349.getSize()
;int index349 = 0;
;
for (; index349 < groupLen349;index349++){
_records = (Object[])(group349.Get(index349));
 //BA.debugLineNum = 1893;BA.debugLine="Dim CUANTOSC As Int = records(result.Columns.";
_cuantosc = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CUANTOSC"))))]));
 //BA.debugLineNum = 1894;BA.debugLine="If cuantos_pedidosc = CUANTOSC Then";
if ((_cuantos_pedidosc).equals(BA.NumberToString(_cuantosc))) { 
 //BA.debugLineNum = 1896;BA.debugLine="datos_iguales = \"ok\"";
_datos_iguales = "ok";
 }else {
 //BA.debugLineNum = 1898;BA.debugLine="ToastMessageShow(\"No se cargo bien la info C";
__c.ToastMessageShow(BA.ObjectToCharSequence("No se cargo bien la info C. Sync Nuevamente"+BA.NumberToString(_cuantosc)+" "+_cuantos_pedidosc),__c.True);
 };
 }
};
 };
 };
 //BA.debugLineNum = 1904;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1905;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1906;BA.debugLine="If result.Tag = \"valida_noventa\" Then 'query ta";
if ((_result.Tag /*Object*/ ).equals((Object)("valida_noventa"))) { 
 //BA.debugLineNum = 1907;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group362 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen362 = group362.getSize()
;int index362 = 0;
;
for (; index362 < groupLen362;index362++){
_records = (Object[])(group362.Get(index362));
 //BA.debugLineNum = 1908;BA.debugLine="Dim CUANTOSN As Int = records(result.Columns.";
_cuantosn = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CUANTOSN"))))]));
 //BA.debugLineNum = 1909;BA.debugLine="If cuantos_noventa = CUANTOSN Then";
if ((_cuantos_noventa).equals(BA.NumberToString(_cuantosn))) { 
 //BA.debugLineNum = 1911;BA.debugLine="datos_iguales = \"ok\"";
_datos_iguales = "ok";
 }else {
 //BA.debugLineNum = 1913;BA.debugLine="ToastMessageShow(\"No se cargo bien la info N";
__c.ToastMessageShow(BA.ObjectToCharSequence("No se cargo bien la info N. Sync Nuevamente"+BA.NumberToString(_cuantosn)+" "+_cuantos_noventa),__c.True);
 };
 }
};
 };
 };
 //BA.debugLineNum = 1919;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1920;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1921;BA.debugLine="If result.Tag = \"insert_pedido\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("insert_pedido"))) { 
 //BA.debugLineNum = 1922;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 };
 };
 //BA.debugLineNum = 1926;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1927;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1928;BA.debugLine="If result.Tag = \"version\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("version"))) { 
 //BA.debugLineNum = 1929;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group381 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen381 = group381.getSize()
;int index381 = 0;
;
for (; index381 < groupLen381;index381++){
_records = (Object[])(group381.Get(index381));
 //BA.debugLineNum = 1930;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from VERSIO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from VERSION");
 //BA.debugLineNum = 1931;BA.debugLine="Dim CAT_VE_VERSION As String = records(result";
_cat_ve_version = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_VE_VERSION"))))]);
 //BA.debugLineNum = 1933;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO VERSI";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO VERSION(NOVERSION) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_ve_version)}));
 }
};
 };
 };
 //BA.debugLineNum = 1938;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1939;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1940;BA.debugLine="If result.Tag = \"count_cli\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("count_cli"))) { 
 //BA.debugLineNum = 1941;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group391 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen391 = group391.getSize()
;int index391 = 0;
;
for (; index391 < groupLen391;index391++){
_records = (Object[])(group391.Get(index391));
 //BA.debugLineNum = 1942;BA.debugLine="COUNT_CLIE = records(result.Columns.Get(\"COUN";
_count_clie = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("COUNT_CLIE"))))]));
 }
};
 };
 };
 //BA.debugLineNum = 1947;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1948;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1949;BA.debugLine="If result.Tag = \"ruta\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("ruta"))) { 
 //BA.debugLineNum = 1950;BA.debugLine="If reqs.IndexOf(\"ruta\") > -1 Then";
if (_reqs.IndexOf((Object)("ruta"))>-1) { 
 //BA.debugLineNum = 1951;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"ruta\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("ruta")));
 //BA.debugLineNum = 1952;BA.debugLine="Log(reqs.Size)";
__c.LogImpl("514942692",BA.NumberToString(_reqs.getSize()),0);
 };
 //BA.debugLineNum = 1954;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group403 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen403 = group403.getSize()
;int index403 = 0;
;
for (; index403 < groupLen403;index403++){
_records = (Object[])(group403.Get(index403));
 //BA.debugLineNum = 1955;BA.debugLine="Dim VALIDO As String = records(result.Columns";
_valido = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("VALIDO"))))]);
 //BA.debugLineNum = 1957;BA.debugLine="If VALIDO = \"OK\" Then";
if ((_valido).equals("OK")) { 
 //BA.debugLineNum = 1958;BA.debugLine="If l_ctast.Text = \"0\" Then";
if ((_l_ctast.getText()).equals("0")) { 
 //BA.debugLineNum = 1959;BA.debugLine="Subir.Visible = True";
_subir.setVisible(__c.True);
 }else if((_l_ctast.getText()).equals("0") == false) { 
 //BA.debugLineNum = 1961;BA.debugLine="Subir.Visible = False";
_subir.setVisible(__c.False);
 };
 //BA.debugLineNum = 1963;BA.debugLine="cargar.Visible = True";
_cargar.setVisible(__c.True);
 //BA.debugLineNum = 1964;BA.debugLine="If Subs.dameUsuarioDeDB = \"ROOT\" Then Subir.";
if ((_subs._dameusuariodedb /*String*/ (ba)).equals("ROOT")) { 
_subir.setVisible(__c.True);};
 //BA.debugLineNum = 1965;BA.debugLine="connecta.Visible = False";
_connecta.setVisible(__c.False);
 //BA.debugLineNum = 1966;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM RUTAA";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM RUTAA");
 //BA.debugLineNum = 1968;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO RUTA";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO RUTAA(RUTAA) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_e_ruta.getText())}));
 //BA.debugLineNum = 1969;BA.debugLine="B4XPages.MainPage.rutaPreventa = e_ruta.TEXT";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._rutapreventa /*String*/  = _e_ruta.getText();
 //BA.debugLineNum = 1970;BA.debugLine="If conn = \"1\" Then";
if ((_conn).equals("1")) { 
 //BA.debugLineNum = 1971;BA.debugLine="ToastMessageShow(\"Existe Conexión con el Se";
__c.ToastMessageShow(BA.ObjectToCharSequence("Existe Conexión con el Servidor."),__c.True);
 };
 }else {
 //BA.debugLineNum = 1974;BA.debugLine="MsgboxAsync(\"La ruta no esta asignada a este";
__c.MsgboxAsync(BA.ObjectToCharSequence("La ruta no esta asignada a este usuario"),BA.ObjectToCharSequence("Atención"),ba);
 //BA.debugLineNum = 1975;BA.debugLine="cargar.Visible = False";
_cargar.setVisible(__c.False);
 //BA.debugLineNum = 1976;BA.debugLine="Subir.Visible = False";
_subir.setVisible(__c.False);
 //BA.debugLineNum = 1977;BA.debugLine="inv.Visible = False";
_inv.setVisible(__c.False);
 //BA.debugLineNum = 1978;BA.debugLine="connecta.Visible = False";
_connecta.setVisible(__c.False);
 };
 }
};
 };
 };
 //BA.debugLineNum = 1984;BA.debugLine="If Job.JobName = \"DBRequest\" Then 'Traemos las c";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1985;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1986;BA.debugLine="If result.Tag = \"coords_almacen\" Then 'query ta";
if ((_result.Tag /*Object*/ ).equals((Object)("coords_almacen"))) { 
 //BA.debugLineNum = 1987;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group433 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen433 = group433.getSize()
;int index433 = 0;
;
for (; index433 < groupLen433;index433++){
_records = (Object[])(group433.Get(index433));
 //BA.debugLineNum = 1988;BA.debugLine="Log(\"Coordenadas del almacen: \" & records(res";
__c.LogImpl("514942728","Coordenadas del almacen: "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_AL_LATITUD"))))])+","+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_AL_LONGITUD"))))]),0);
 //BA.debugLineNum = 1989;BA.debugLine="Private lat, lon As Double";
_lat = 0;
_lon = 0;
 //BA.debugLineNum = 1990;BA.debugLine="lat = 0.0";
_lat = 0.0;
 //BA.debugLineNum = 1991;BA.debugLine="lon = 0.0";
_lon = 0.0;
 //BA.debugLineNum = 1992;BA.debugLine="If IsNumber(records(result.Columns.Get(\"CAT_A";
if (__c.IsNumber(BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_AL_LATITUD"))))])) && __c.IsNumber(BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_AL_LONGITUD"))))]))) { 
 //BA.debugLineNum = 1993;BA.debugLine="lat = records(result.Columns.Get(\"CAT_AL_LAT";
_lat = (double)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_AL_LATITUD"))))]));
 //BA.debugLineNum = 1994;BA.debugLine="lon = records(result.Columns.Get(\"CAT_AL_LON";
_lon = (double)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_AL_LONGITUD"))))]));
 };
 //BA.debugLineNum = 1996;BA.debugLine="Starter.cedisLocation.Latitude = lat";
_starter._cedislocation /*anywheresoftware.b4a.gps.LocationWrapper*/ .setLatitude(_lat);
 //BA.debugLineNum = 1997;BA.debugLine="Starter.cedisLocation.Longitude = lon";
_starter._cedislocation /*anywheresoftware.b4a.gps.LocationWrapper*/ .setLongitude(_lon);
 //BA.debugLineNum = 1998;BA.debugLine="Starter.skmt.ExecNonQuery2(\"delete from CAT_V";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("COORDS_ALMACEN")}));
 //BA.debugLineNum = 1999;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO CAT_V";
_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)("COORDS_ALMACEN"),(Object)(BA.NumberToString(_lon)+","+BA.NumberToString(_lat))}));
 }
};
 };
 };
 //BA.debugLineNum = 2005;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2006;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2007;BA.debugLine="If result.Tag = \"ins_reparto\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("ins_reparto"))) { 
 //BA.debugLineNum = 2008;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group452 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen452 = group452.getSize()
;int index452 = 0;
;
for (; index452 < groupLen452;index452++){
_records = (Object[])(group452.Get(index452));
 //BA.debugLineNum = 2009;BA.debugLine="For Each k As String In result.Columns.Keys";
{
final anywheresoftware.b4a.BA.IterableList group453 = _result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen453 = group453.getSize()
;int index453 = 0;
;
for (; index453 < groupLen453;index453++){
_k = BA.ObjectToString(group453.Get(index453));
 //BA.debugLineNum = 2010;BA.debugLine="Log(k & \": \" & records(result.Columns.Get(k)";
__c.LogImpl("514942750",_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
 }
};
 }
};
 };
 };
 //BA.debugLineNum = 2016;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2017;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2018;BA.debugLine="If result.Tag = \"ins_rechazos\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("ins_rechazos"))) { 
 //BA.debugLineNum = 2019;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group462 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen462 = group462.getSize()
;int index462 = 0;
;
for (; index462 < groupLen462;index462++){
_records = (Object[])(group462.Get(index462));
 //BA.debugLineNum = 2020;BA.debugLine="For Each k As String In result.Columns.Keys";
{
final anywheresoftware.b4a.BA.IterableList group463 = _result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen463 = group463.getSize()
;int index463 = 0;
;
for (; index463 < groupLen463;index463++){
_k = BA.ObjectToString(group463.Get(index463));
 //BA.debugLineNum = 2021;BA.debugLine="Log(k & \": \" & records(result.Columns.Get(k)";
__c.LogImpl("514942761",_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
 }
};
 }
};
 };
 };
 //BA.debugLineNum = 2026;BA.debugLine="Job.Release";
_job._release /*String*/ ();
 };
 //BA.debugLineNum = 2029;BA.debugLine="If reqs.Size = 0 Then";
if (_reqs.getSize()==0) { 
 //BA.debugLineNum = 2035;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT COUNT(*) AS 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 COUNT(*) AS CUANTOS FROM CHECADO_CHECK")));
 //BA.debugLineNum = 2036;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 2037;BA.debugLine="If c.GetString(\"CUANTOS\") = 0 Then";
if ((_c.GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 2038;BA.debugLine="Starter.skmt.ExecNonQuery2(\"insert into CHECADO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into CHECADO_CHECK (CHECADO) VALUES(?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{"0"}));
 }else if((_c.GetString("CUANTOS")).equals(BA.NumberToString(1))) { 
 };
 //BA.debugLineNum = 2043;BA.debugLine="c.Close";
_c.Close();
 };
 //BA.debugLineNum = 2049;BA.debugLine="End Sub";
return "";
}
public String  _listview1_itemclick(int _position,Object _value) throws Exception{
String[] _clieasing = null;
 //BA.debugLineNum = 2437;BA.debugLine="Private Sub ListView1_ItemClick (Position As Int,";
 //BA.debugLineNum = 2438;BA.debugLine="Log(Value)";
__c.LogImpl("515794177",BA.ObjectToString(_value),0);
 //BA.debugLineNum = 2440;BA.debugLine="Dim clieasing() As String = Regex.Split(\" \", Valu";
_clieasing = __c.Regex.Split(" ",BA.ObjectToString(_value));
 //BA.debugLineNum = 2441;BA.debugLine="Log(clieasing(0))";
__c.LogImpl("515794180",_clieasing[(int) (0)],0);
 //BA.debugLineNum = 2443;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CUENTAA\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CUENTAA");
 //BA.debugLineNum = 2444;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO CUENTAA V";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_clieasing[(int) (0)])}));
 //BA.debugLineNum = 2445;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 //BA.debugLineNum = 2446;BA.debugLine="Panel1.Visible = False";
_panel1.setVisible(__c.False);
 //BA.debugLineNum = 2447;BA.debugLine="End Sub";
return "";
}
public String  _p_carga_click() throws Exception{
 //BA.debugLineNum = 2559;BA.debugLine="Private Sub P_carga_Click";
 //BA.debugLineNum = 2561;BA.debugLine="End Sub";
return "";
}
public String  _p_prod_click() throws Exception{
 //BA.debugLineNum = 2509;BA.debugLine="Private Sub p_prod_Click";
 //BA.debugLineNum = 2511;BA.debugLine="End Sub";
return "";
}
public String  _printer_connected(boolean _success) throws Exception{
 //BA.debugLineNum = 2700;BA.debugLine="Sub Printer_Connected (Success As Boolean)";
 //BA.debugLineNum = 2701;BA.debugLine="If Success Then";
if (_success) { 
 //BA.debugLineNum = 2703;BA.debugLine="PASA_IMP = \"1\"";
_pasa_imp = "1";
 }else {
 //BA.debugLineNum = 2706;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 = 2707;BA.debugLine="StartPrinter";
_startprinter();
 };
 };
 //BA.debugLineNum = 2710;BA.debugLine="End Sub";
return "";
}
public String  _printer1_connected(boolean _success) throws Exception{
 //BA.debugLineNum = 2675;BA.debugLine="Sub Printer1_Connected (Success As Boolean)";
 //BA.debugLineNum = 2677;BA.debugLine="If Success Then";
if (_success) { 
 //BA.debugLineNum = 2678;BA.debugLine="ToastMessageShow(\"Impresora conectada\", False)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Impresora conectada"),__c.False);
 //BA.debugLineNum = 2679;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 = 2680;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 = 2683;BA.debugLine="impresoraConectada = True";
_impresoraconectada = __c.True;
 }else {
 //BA.debugLineNum = 2687;BA.debugLine="LogColor(\"Error conectando la impresora\", Colors";
__c.LogImpl("516318476","Error conectando la impresora",__c.Colors.Red);
 //BA.debugLineNum = 2688;BA.debugLine="errorImpresora = errorImpresora + 1";
_errorimpresora = (int) (_errorimpresora+1);
 //BA.debugLineNum = 2689;BA.debugLine="If errorImpresora > 1 Then";
if (_errorimpresora>1) { 
 //BA.debugLineNum = 2690;BA.debugLine="Starter.MAC_IMPRESORA = \"0\"";
_starter._mac_impresora /*String*/  = "0";
 //BA.debugLineNum = 2691;BA.debugLine="errorImpresora = 0";
_errorimpresora = (int) (0);
 };
 };
 //BA.debugLineNum = 2694;BA.debugLine="End Sub";
return "";
}
public String  _printer1_error() throws Exception{
 //BA.debugLineNum = 2696;BA.debugLine="Sub Printer1_Error";
 //BA.debugLineNum = 2697;BA.debugLine="Log(\"error printer\")";
__c.LogImpl("516384001","error printer",0);
 //BA.debugLineNum = 2698;BA.debugLine="End Sub";
return "";
}
public String  _startprinter() throws Exception{
anywheresoftware.b4a.objects.collections.Map _paireddevices = null;
anywheresoftware.b4a.objects.collections.List _l1 = null;
int _resimp = 0;
int _i = 0;
 //BA.debugLineNum = 2712;BA.debugLine="Sub StartPrinter";
 //BA.debugLineNum = 2713;BA.debugLine="Dim PairedDevices As Map";
_paireddevices = new anywheresoftware.b4a.objects.collections.Map();
 //BA.debugLineNum = 2714;BA.debugLine="Dim L1 As List";
_l1 = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 2715;BA.debugLine="Dim resimp As Int";
_resimp = 0;
 //BA.debugLineNum = 2716;BA.debugLine="ToastMessageShow(\"Printing.....\",True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Printing....."),__c.True);
 //BA.debugLineNum = 2717;BA.debugLine="PairedDevices.Initialize";
_paireddevices.Initialize();
 //BA.debugLineNum = 2718;BA.debugLine="Try";
try { //BA.debugLineNum = 2719;BA.debugLine="PairedDevices = cmp20.GetPairedDevices";
_paireddevices = _cmp20.GetPairedDevices();
 } 
       catch (Exception e9) {
			ba.setLastException(e9); //BA.debugLineNum = 2721;BA.debugLine="Msgbox(\"Getting Paired Devices\",\"Printer Error\")";
__c.Msgbox(BA.ObjectToCharSequence("Getting Paired Devices"),BA.ObjectToCharSequence("Printer Error"),ba);
 //BA.debugLineNum = 2722;BA.debugLine="printer.Close";
_printer.Close();
 //BA.debugLineNum = 2723;BA.debugLine="cmp20.Disconnect";
_cmp20.Disconnect();
 };
 //BA.debugLineNum = 2726;BA.debugLine="If PairedDevices.Size = 0 Then";
if (_paireddevices.getSize()==0) { 
 //BA.debugLineNum = 2727;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 = 2728;BA.debugLine="Return";
if (true) return "";
 };
 //BA.debugLineNum = 2731;BA.debugLine="If PairedDevices.Size = 1 Then";
if (_paireddevices.getSize()==1) { 
 //BA.debugLineNum = 2732;BA.debugLine="Try";
try { //BA.debugLineNum = 2733;BA.debugLine="cmp20.Connect(PairedDevices.Get(PairedDevices.G";
_cmp20.Connect(ba,BA.ObjectToString(_paireddevices.Get(_paireddevices.GetKeyAt((int) (0)))));
 } 
       catch (Exception e21) {
			ba.setLastException(e21); //BA.debugLineNum = 2735;BA.debugLine="Msgbox(\"Connecting\",\"Printer Error\") 'ignore";
__c.Msgbox(BA.ObjectToCharSequence("Connecting"),BA.ObjectToCharSequence("Printer Error"),ba);
 //BA.debugLineNum = 2736;BA.debugLine="printer.Close";
_printer.Close();
 //BA.debugLineNum = 2737;BA.debugLine="cmp20.Disconnect";
_cmp20.Disconnect();
 };
 }else {
 //BA.debugLineNum = 2740;BA.debugLine="L1.Initialize";
_l1.Initialize();
 //BA.debugLineNum = 2741;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 = 2742;BA.debugLine="L1.Add(PairedDevices.GetKeyAt(i))";
_l1.Add(_paireddevices.GetKeyAt(_i));
 }
};
 //BA.debugLineNum = 2744;BA.debugLine="resimp = InputList(L1, \"Choose device\", -1) 'ign";
_resimp = __c.InputList(_l1,BA.ObjectToCharSequence("Choose device"),(int) (-1),ba);
 //BA.debugLineNum = 2745;BA.debugLine="If resimp <> DialogResponse.CANCEL Then";
if (_resimp!=__c.DialogResponse.CANCEL) { 
 //BA.debugLineNum = 2746;BA.debugLine="cmp20.Connect(PairedDevices.Get(L1.Get(resimp))";
_cmp20.Connect(ba,BA.ObjectToString(_paireddevices.Get(_l1.Get(_resimp))));
 };
 };
 //BA.debugLineNum = 2749;BA.debugLine="End Sub";
return "";
}
public String  _subir_click() throws Exception{
 //BA.debugLineNum = 797;BA.debugLine="Sub Subir_Click";
 //BA.debugLineNum = 798;BA.debugLine="If Not(IsConnectedToInternet) Then MsgboxAsync(\"N";
if (__c.Not(_isconnectedtointernet())) { 
__c.MsgboxAsync(BA.ObjectToCharSequence("No hay conexión a conexión a Internet"),BA.ObjectToCharSequence("Revisa tu conexión"),ba);};
 //BA.debugLineNum = 799;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 = 800;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 801;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 802;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 804;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT * FROM BLOCKEN";
_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 * FROM BLOCKENVIO")));
 //BA.debugLineNum = 805;BA.debugLine="If c.RowCount = 0 Then";
if (_c.getRowCount()==0) { 
 //BA.debugLineNum = 806;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO BLOCKENV";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO BLOCKENVIO(ENVIADO) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(1)}));
 //BA.debugLineNum = 807;BA.debugLine="envioinfo";
_envioinfo();
 }else {
 //BA.debugLineNum = 809;BA.debugLine="envioinfo";
_envioinfo();
 };
 //BA.debugLineNum = 811;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 817;BA.debugLine="End Sub";
return "";
}
public String  _t1_tick() throws Exception{
 //BA.debugLineNum = 2141;BA.debugLine="Sub t1_tick";
 //BA.debugLineNum = 2142;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 2143;BA.debugLine="cmd.Name = \"select_cuantos_pedido\"";
_cmd.Name /*String*/  = "select_cuantos_pedido";
 //BA.debugLineNum = 2144;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN,l_ruta.t";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_l_ruta.getText())};
 //BA.debugLineNum = 2145;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"valida_pedido\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("valida_pedido"));
 //BA.debugLineNum = 2147;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 2148;BA.debugLine="cmd.Name = \"select_cuantos_noventa_mards\"";
_cmd.Name /*String*/  = "select_cuantos_noventa_mards";
 //BA.debugLineNum = 2149;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN,l_ruta.t";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_l_ruta.getText())};
 //BA.debugLineNum = 2150;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"valida_noventa\"";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("valida_noventa"));
 //BA.debugLineNum = 2152;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 2153;BA.debugLine="cmd.Name = \"select_cuantos_pedidoc\"";
_cmd.Name /*String*/  = "select_cuantos_pedidoc";
 //BA.debugLineNum = 2154;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN,l_ruta.t";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_l_ruta.getText())};
 //BA.debugLineNum = 2155;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"valida_pedidoc\"";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("valida_pedidoc"));
 //BA.debugLineNum = 2156;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 2157;BA.debugLine="t1.Enabled = False";
_t1.setEnabled(__c.False);
 //BA.debugLineNum = 2158;BA.debugLine="End Sub";
return "";
}
public String  _t8_tick() throws Exception{
 //BA.debugLineNum = 2547;BA.debugLine="Sub t8_tick";
 //BA.debugLineNum = 2548;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 2549;BA.debugLine="cmd.Name = \"select_conteo_izca\"";
_cmd.Name /*String*/  = "select_conteo_izca";
 //BA.debugLineNum = 2550;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text, ALM";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 2551;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"CONTEO_DATOS\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("CONTEO_DATOS"));
 //BA.debugLineNum = 2552;BA.debugLine="l_carga2.Text = \"VALIDANDO\"";
_l_carga2.setText(BA.ObjectToCharSequence("VALIDANDO"));
 //BA.debugLineNum = 2553;BA.debugLine="L_carga.Text = \"VALIDANDO\"";
_l_carga.setText(BA.ObjectToCharSequence("VALIDANDO"));
 //BA.debugLineNum = 2554;BA.debugLine="PB_carga.Progress = 50";
_pb_carga.setProgress((int) (50));
 //BA.debugLineNum = 2555;BA.debugLine="PB_carga2.Progress = 50";
_pb_carga2.setProgress((int) (50));
 //BA.debugLineNum = 2556;BA.debugLine="t8.Enabled = False";
_t8.setEnabled(__c.False);
 //BA.debugLineNum = 2557;BA.debugLine="End Sub";
return "";
}
public String  _to_number_vb(Object _valor) throws Exception{
int _valstring = 0;
String _valstring2 = "";
 //BA.debugLineNum = 775;BA.debugLine="Sub to_number_vb (valor As Object) As String";
 //BA.debugLineNum = 776;BA.debugLine="Dim valstring As Int";
_valstring = 0;
 //BA.debugLineNum = 777;BA.debugLine="Dim valstring2 As String = valor";
_valstring2 = BA.ObjectToString(_valor);
 //BA.debugLineNum = 778;BA.debugLine="valstring2.Replace(\":\",\"\")";
_valstring2.replace(":","");
 //BA.debugLineNum = 779;BA.debugLine="Try";
try { //BA.debugLineNum = 780;BA.debugLine="valstring =valstring2.Replace(\":\",\"\")";
_valstring = (int)(Double.parseDouble(_valstring2.replace(":","")));
 //BA.debugLineNum = 781;BA.debugLine="Return valstring";
if (true) return BA.NumberToString(_valstring);
 } 
       catch (Exception e8) {
			ba.setLastException(e8); //BA.debugLineNum = 783;BA.debugLine="Return 0";
if (true) return BA.NumberToString(0);
 };
 //BA.debugLineNum = 785;BA.debugLine="End Sub";
return "";
}
public String  _trabajar_click() throws Exception{
 //BA.debugLineNum = 787;BA.debugLine="Sub trabajar_Click";
 //BA.debugLineNum = 788;BA.debugLine="If b_check.Visible = True Then";
if (_b_check.getVisible()==__c.True) { 
 //BA.debugLineNum = 789;BA.debugLine="MsgboxAsync(\"Favor de hacer el checklist.\",\"Atenc";
__c.MsgboxAsync(BA.ObjectToCharSequence("Favor de hacer el checklist."),BA.ObjectToCharSequence("Atención"),ba);
 }else {
 //BA.debugLineNum = 792;BA.debugLine="B4XPages.ShowPage(\"Clientes\")";
_b4xpages._showpage /*String*/ (ba,"Clientes");
 };
 //BA.debugLineNum = 795;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, "JOBDONE"))
	return _jobdone((reparto_izca.keymon.lat.httpjob) args[0]);
return BA.SubDelegator.SubNotFound;
}
}
