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 _a = 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 String _paso1 = "";
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 anywheresoftware.b4a.objects.PanelWrapper _p_ciego = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_pc_env = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_terpc = null;
public b4a.example3.customlistview _clv_pick_ciego = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_pick_ciego = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_pick_ciego = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_pick_ciego = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_cant_pcik = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_pagarescobrados = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_pagaresnuevos = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_montoaliquidar = null;
public anywheresoftware.b4a.objects.LabelWrapper _label21 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_comodin = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_validacion = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_cancelarcodigo = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_aceptar = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_codigo = 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_aceptar_click() throws Exception{
 //BA.debugLineNum = 3884;BA.debugLine="Private Sub b_aceptar_Click";
 //BA.debugLineNum = 3885;BA.debugLine="If et_codigo.Text <> \"\" Then";
if ((_et_codigo.getText()).equals("") == false) { 
 //BA.debugLineNum = 3887;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 3888;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 3889;BA.debugLine="cmd.Name = \"select_PASS_IZCA_REPG\"";
_cmd.Name /*String*/  = "select_PASS_IZCA_REPG";
 //BA.debugLineNum = 3890;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN)";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen)};
 //BA.debugLineNum = 3891;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"contra\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("contra"));
 };
 //BA.debugLineNum = 3894;BA.debugLine="End Sub";
return "";
}
public String  _b_cancelarcodigo_click() throws Exception{
 //BA.debugLineNum = 3896;BA.debugLine="Private Sub b_cancelarcodigo_Click";
 //BA.debugLineNum = 3897;BA.debugLine="p_validacion.Visible = False";
_p_validacion.setVisible(__c.False);
 //BA.debugLineNum = 3898;BA.debugLine="et_codigo.Text = \"\"";
_et_codigo.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 3899;BA.debugLine="End Sub";
return "";
}
public String  _b_carga_click() throws Exception{
anywheresoftware.b4a.sql.SQL.CursorWrapper _checagestion = null;
 //BA.debugLineNum = 3088;BA.debugLine="Private Sub B_carga_Click";
 //BA.debugLineNum = 3089;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 = 3090;BA.debugLine="P_carga.Visible = False";
_p_carga.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 3092;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 = 3093;BA.debugLine="If checagestion.RowCount = 0 Then";
if (_checagestion.getRowCount()==0) { 
 //BA.debugLineNum = 3094;BA.debugLine="P_carga.Visible = False";
_p_carga.setVisible(__c.False);
 //BA.debugLineNum = 3095;BA.debugLine="e_ruta.Text = \"\"";
_e_ruta.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 3096;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from PICK_CIE";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PICK_CIEGO");
 //BA.debugLineNum = 3097;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from pedido_c";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente");
 //BA.debugLineNum = 3098;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from PAGARES\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PAGARES");
 //BA.debugLineNum = 3099;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CHECADO_";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CHECADO_CHECK");
 //BA.debugLineNum = 3100;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CHECKLIS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CHECKLIST2");
 //BA.debugLineNum = 3101;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from pedido\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido");
 //BA.debugLineNum = 3102;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from noventa\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from noventa");
 //BA.debugLineNum = 3103;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from clie_act";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from clie_act");
 //BA.debugLineNum = 3104;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from kmt_info";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from kmt_info");
 //BA.debugLineNum = 3105;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cat_guna";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod");
 //BA.debugLineNum = 3106;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cat_guna";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod3");
 //BA.debugLineNum = 3107;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CAT_DETA";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CAT_DETALLES_PAQ");
 //BA.debugLineNum = 3108;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from HIST_VEN";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_VENTAS");
 //BA.debugLineNum = 3109;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from REPARTO\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from REPARTO");
 //BA.debugLineNum = 3110;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM TABULADO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM TABULADOR_MONEDAS");
 //BA.debugLineNum = 3111;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM TABULADO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM TABULADOR_BILLETES");
 //BA.debugLineNum = 3112;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM RUTAA\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM RUTAA");
 //BA.debugLineNum = 3113;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM ABONOSP\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM ABONOSP");
 //BA.debugLineNum = 3114;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM ABONOS\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM ABONOS");
 //BA.debugLineNum = 3115;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM BLOCKENV";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM BLOCKENVIO");
 //BA.debugLineNum = 3116;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 3117;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 = 3119;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 = 3120;BA.debugLine="P_carga.Visible = False";
_p_carga.setVisible(__c.False);
 };
 };
 //BA.debugLineNum = 3123;BA.debugLine="End Sub";
return "";
}
public String  _b_check_click() throws Exception{
 //BA.debugLineNum = 2954;BA.debugLine="Private Sub b_check_Click";
 //BA.debugLineNum = 2956;BA.debugLine="B4XPages.ShowPage(\"checklist\")";
_b4xpages._showpage /*String*/ (ba,"checklist");
 //BA.debugLineNum = 2958;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 _hjf = 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 = 2683;BA.debugLine="Sub B_CLIEPROD_Click";
 //BA.debugLineNum = 2684;BA.debugLine="If b_check.Visible = True Then";
if (_b_check.getVisible()==__c.True) { 
 //BA.debugLineNum = 2685;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 = 2687;BA.debugLine="BUSCA.Visible = True";
_busca.setVisible(__c.True);
 //BA.debugLineNum = 2688;BA.debugLine="connecta.Visible = False";
_connecta.setVisible(__c.False);
 //BA.debugLineNum = 2689;BA.debugLine="trabajar.Visible = True";
_trabajar.setVisible(__c.True);
 //BA.debugLineNum = 2690;BA.debugLine="B_CLIEPROD.Visible = True";
_b_clieprod.setVisible(__c.True);
 //BA.debugLineNum = 2691;BA.debugLine="Panel1.Visible = True";
_panel1.setVisible(__c.True);
 //BA.debugLineNum = 2692;BA.debugLine="Panel1.BringToFront";
_panel1.BringToFront();
 //BA.debugLineNum = 2693;BA.debugLine="Panel1.Width = Root.Width";
_panel1.setWidth(_root.getWidth());
 //BA.debugLineNum = 2694;BA.debugLine="Panel1.Height = Root.Height";
_panel1.setHeight(_root.getHeight());
 //BA.debugLineNum = 2695;BA.debugLine="B_REGRESA.Top = Panel1.Height - B_REGRESA.Height";
_b_regresa.setTop((int) (_panel1.getHeight()-_b_regresa.getHeight()));
 //BA.debugLineNum = 2696;BA.debugLine="Btn_Ubicar_Ru.Visible=True";
_btn_ubicar_ru.setVisible(__c.True);
 //BA.debugLineNum = 2698;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 = 2699;BA.debugLine="ch.Position = 0";
_ch.setPosition((int) (0));
 //BA.debugLineNum = 2700;BA.debugLine="L_clientes_visit.Text = ch.GetInt(\"visit\")";
_l_clientes_visit.setText(BA.ObjectToCharSequence(_ch.GetInt("visit")));
 //BA.debugLineNum = 2702;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 = 2703;BA.debugLine="ch1.Position = 0";
_ch1.setPosition((int) (0));
 //BA.debugLineNum = 2704;BA.debugLine="l_clientes_recha.Text = ch1.GetInt(\"rechazo\")";
_l_clientes_recha.setText(BA.ObjectToCharSequence(_ch1.GetInt("rechazo")));
 //BA.debugLineNum = 2705;BA.debugLine="l_clientes_visitados.Text = ch1.GetInt(\"rechazo\"";
_l_clientes_visitados.setText(BA.ObjectToCharSequence(_ch1.GetInt("rechazo")+_ch.GetInt("visit")));
 //BA.debugLineNum = 2707;BA.debugLine="c=Starter.skmt.ExecQuery(\"select distinct(CAT_CL_";
_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 distinct(CAT_CL_CODIGO), GESTION, CAT_CL_NOMBRE from kmt_info WHERE gestion <> 0 order by HORAENT")));
 //BA.debugLineNum = 2708;BA.debugLine="Subs.SetDivider(ListView1, Colors.LightGray, 2)";
_subs._setdivider /*String*/ (ba,_listview1,__c.Colors.LightGray,(int) (2));
 //BA.debugLineNum = 2709;BA.debugLine="ListView1.Clear";
_listview1.Clear();
 //BA.debugLineNum = 2710;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 2711;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = _listview1.getTwoLinesLayout().Label;
 //BA.debugLineNum = 2712;BA.debugLine="label1.TextSize = 16";
_label1.setTextSize((float) (16));
 //BA.debugLineNum = 2713;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 2714;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 2715;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = _listview1.getTwoLinesLayout().SecondLabel;
 //BA.debugLineNum = 2716;BA.debugLine="label2.TextSize = 16";
_label2.setTextSize((float) (16));
 //BA.debugLineNum = 2717;BA.debugLine="label2.TextColor = Colors.Black";
_label2.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 2719;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 2720;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 = 2721;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 2722;BA.debugLine="If c.GetString(\"gestion\") = \"2\" Then";
if ((_c.GetString("gestion")).equals("2")) { 
 //BA.debugLineNum = 2723;BA.debugLine="ESTATUS = \"ENTREGADO\"";
_estatus = "ENTREGADO";
 //BA.debugLineNum = 2724;BA.debugLine="Log(\"entrega\")";
__c.LogImpl("153542953","entrega",0);
 }else if((_c.GetString("gestion")).equals("3")) { 
 //BA.debugLineNum = 2726;BA.debugLine="Log(\"no entrega\")";
__c.LogImpl("153542955","no entrega",0);
 //BA.debugLineNum = 2727;BA.debugLine="ESTATUS = \"RECHAZADO\"";
_estatus = "RECHAZADO";
 }else {
 //BA.debugLineNum = 2729;BA.debugLine="ESTATUS = \"SIN ESTATUS\"";
_estatus = "SIN ESTATUS";
 };
 //BA.debugLineNum = 2734;BA.debugLine="If ESTATUS = \"ENTREGADO\" Then";
if ((_estatus).equals("ENTREGADO")) { 
 //BA.debugLineNum = 2735;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 = 2737;BA.debugLine="Private cuenta0 As String = 0";
_cuenta0 = BA.NumberToString(0);
 //BA.debugLineNum = 2738;BA.debugLine="Private arti As String = 0";
_arti = BA.NumberToString(0);
 //BA.debugLineNum = 2739;BA.debugLine="If vc.RowCount > 0 Then";
if (_vc.getRowCount()>0) { 
 //BA.debugLineNum = 2740;BA.debugLine="For hjf = 0 To vc.RowCount - 1";
{
final int step49 = 1;
final int limit49 = (int) (_vc.getRowCount()-1);
_hjf = (int) (0) ;
for (;_hjf <= limit49 ;_hjf = _hjf + step49 ) {
 //BA.debugLineNum = 2741;BA.debugLine="vc.Position = hjf";
_vc.setPosition(_hjf);
 //BA.debugLineNum = 2743;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 = 2744;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 = 2749;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 = 2750;BA.debugLine="Private Cuenta1 As String = 0";
_cuenta1 = BA.NumberToString(0);
 //BA.debugLineNum = 2751;BA.debugLine="Private arti1 As String = 0";
_arti1 = BA.NumberToString(0);
 //BA.debugLineNum = 2752;BA.debugLine="If vc2.RowCount > 0 Then";
if (_vc2.getRowCount()>0) { 
 //BA.debugLineNum = 2753;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 = 2754;BA.debugLine="vc2.Position = h";
_vc2.setPosition(_h);
 //BA.debugLineNum = 2755;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 = 2756;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 = 2757;BA.debugLine="If vc3.RowCount > 0 Then";
if (_vc3.getRowCount()>0) { 
 //BA.debugLineNum = 2758;BA.debugLine="vc3.Position = 0";
_vc3.setPosition((int) (0));
 //BA.debugLineNum = 2759;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 = 2760;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 = 2766;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 = 2767;BA.debugLine="Private Cuenta2 As String = 0";
_cuenta2 = BA.NumberToString(0);
 //BA.debugLineNum = 2768;BA.debugLine="Private arti2 As String = 0";
_arti2 = BA.NumberToString(0);
 //BA.debugLineNum = 2769;BA.debugLine="If vc4.RowCount > 0 Then";
if (_vc4.getRowCount()>0) { 
 //BA.debugLineNum = 2771;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 = 2772;BA.debugLine="vc4.Position = k";
_vc4.setPosition(_k);
 //BA.debugLineNum = 2773;BA.debugLine="If vc4.GetString(\"HVD_PROID\") <> vc4.GetStr";
if ((_vc4.GetString("HVD_PROID")).equals(_vc4.GetString("HVD_CODPROMO")) == false) { 
 //BA.debugLineNum = 2774;BA.debugLine="If vc4.GetString(\"HVD_RECHAZO\") = 0 Then";
if ((_vc4.GetString("HVD_RECHAZO")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 2775;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 = 2776;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 = 2778;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 = 2779;BA.debugLine="If vc5.RowCount > 0 Then";
if (_vc5.getRowCount()>0) { 
 //BA.debugLineNum = 2780;BA.debugLine="vc5.Position= 0";
_vc5.setPosition((int) (0));
 //BA.debugLineNum = 2782;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 = 2783;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 = 2792;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 = 2793;BA.debugLine="Private Cuenta3 As String = 0";
_cuenta3 = BA.NumberToString(0);
 //BA.debugLineNum = 2794;BA.debugLine="Private arti3 As String = 0";
_arti3 = BA.NumberToString(0);
 //BA.debugLineNum = 2795;BA.debugLine="If c4.RowCount > 0 Then";
if (_c4.getRowCount()>0) { 
 //BA.debugLineNum = 2796;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 = 2797;BA.debugLine="c4.Position = x";
_c4.setPosition(_x);
 //BA.debugLineNum = 2798;BA.debugLine="arti3 = arti3 + c4.GetString(\"PE_CANT\")";
_arti3 = BA.NumberToString((double)(Double.parseDouble(_arti3))+(double)(Double.parseDouble(_c4.GetString("PE_CANT"))));
 //BA.debugLineNum = 2799;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 = 2804;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 = 2805;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 = 2807;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 = 2808;BA.debugLine="Log(\"si entre2\")";
__c.LogImpl("153543037","si entre2",0);
 }else if((_estatus).equals("RECHAZADO")) { 
 //BA.debugLineNum = 2812;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 SUM(HVD_COSTO_TOT) AS HVD_COSTO_TOT, SUM(HVD_CANT) AS HVD_CANT from HIST_VENTAS WHERE HVD_CLIENTE = '"+__c.SmartStringFormatter("",(Object)(_c.GetString("CAT_CL_CODIGO")))+"' AND HVD_CODPROMO "))));
 //BA.debugLineNum = 2814;BA.debugLine="Private cuenta0 As String = 0";
_cuenta0 = BA.NumberToString(0);
 //BA.debugLineNum = 2815;BA.debugLine="Private arti As String = 0";
_arti = BA.NumberToString(0);
 //BA.debugLineNum = 2816;BA.debugLine="If vc.RowCount > 0 Then";
if (_vc.getRowCount()>0) { 
 //BA.debugLineNum = 2817;BA.debugLine="For hjf = 0 To vc.RowCount - 1";
{
final int step110 = 1;
final int limit110 = (int) (_vc.getRowCount()-1);
_hjf = (int) (0) ;
for (;_hjf <= limit110 ;_hjf = _hjf + step110 ) {
 //BA.debugLineNum = 2818;BA.debugLine="vc.Position = hjf";
_vc.setPosition(_hjf);
 //BA.debugLineNum = 2821;BA.debugLine="arti = (vc.GetString(\"HVD_CANT\"))";
_arti = (_vc.GetString("HVD_CANT"));
 //BA.debugLineNum = 2822;BA.debugLine="cuenta0 = cuenta0 + ((vc.GetString(\"HVD_COS";
_cuenta0 = BA.NumberToString((double)(Double.parseDouble(_cuenta0))+(double)(Double.parseDouble(((_vc.GetString("HVD_COSTO_TOT"))))));
 }
};
 };
 //BA.debugLineNum = 2825;BA.debugLine="Log(cuenta0)";
__c.LogImpl("153543054",_cuenta0,0);
 //BA.debugLineNum = 2882;BA.debugLine="Private TOTALMONTO As String = cuenta0";
_totalmonto = _cuenta0;
 //BA.debugLineNum = 2883;BA.debugLine="Private TOTALcantidad As String = arti";
_totalcantidad = _arti;
 //BA.debugLineNum = 2885;BA.debugLine="Log(\"si entre\")";
__c.LogImpl("153543114","si entre",0);
 //BA.debugLineNum = 2886;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 = 2923;BA.debugLine="End Sub";
return "";
}
public String  _b_comodin_click() throws Exception{
 //BA.debugLineNum = 3878;BA.debugLine="Private Sub b_comodin_Click";
 //BA.debugLineNum = 3879;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CUENTAA\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CUENTAA");
 //BA.debugLineNum = 3880;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)("100000")}));
 //BA.debugLineNum = 3881;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 //BA.debugLineNum = 3882;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 = 3307;BA.debugLine="ProgressDialogShow(\"Imprimiendo, un momento ...\")";
parent.__c.ProgressDialogShow(ba,BA.ObjectToCharSequence("Imprimiendo, un momento ..."));
 //BA.debugLineNum = 3308;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 3309;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 = 3311;BA.debugLine="Printer1.Connect";
parent._printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 3312;BA.debugLine="Private cont As Int = 0";
_cont = (int) (0);
 //BA.debugLineNum = 3313;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 = 3314;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 57;
return;
case 57:
//C
this.state = 7;
;
 //BA.debugLineNum = 3315;BA.debugLine="cont = cont + 1";
_cont = (int) (_cont+1);
 //BA.debugLineNum = 3316;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 = 3317;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 = 3319;BA.debugLine="Sleep(500)";
parent.__c.Sleep(ba,this,(int) (500));
this.state = 58;
return;
case 58:
//C
this.state = 38;
;
 //BA.debugLineNum = 3320;BA.debugLine="impresoraConectada = False";
parent._impresoraconectada = parent.__c.False;
 if (true) break;

case 21:
//C
this.state = 22;
 //BA.debugLineNum = 3323;BA.debugLine="Printer1.Connect";
parent._printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 3324;BA.debugLine="Private cont As Int = 0";
_cont = (int) (0);
 //BA.debugLineNum = 3325;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 = 3326;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 59;
return;
case 59:
//C
this.state = 25;
;
 //BA.debugLineNum = 3327;BA.debugLine="cont = cont + 1";
_cont = (int) (_cont+1);
 //BA.debugLineNum = 3328;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 = 3329;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 = 3331;BA.debugLine="Sleep(500)";
parent.__c.Sleep(ba,this,(int) (500));
this.state = 60;
return;
case 60:
//C
this.state = 38;
;
 //BA.debugLineNum = 3332;BA.debugLine="impresoraConectada = False";
parent._impresoraconectada = parent.__c.False;
 if (true) break;

case 38:
//C
this.state = 39;
;
 //BA.debugLineNum = 3335;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 3336;BA.debugLine="ESPACIO = 28";
parent._espacio = (int) (28);
 //BA.debugLineNum = 3337;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 3338;BA.debugLine="Dim bmp As Bitmap";
_bmp = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper();
 //BA.debugLineNum = 3339;BA.debugLine="Printer1.Justify= 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 3340;BA.debugLine="bmp.InitializeResize(File.DirAssets, \"inventarios";
_bmp.InitializeResize(parent.__c.File.getDirAssets(),"inventarios.jpg",(int) (92),(int) (92),parent.__c.True);
 //BA.debugLineNum = 3341;BA.debugLine="Dim myimage As AnImage = Printer1.ImageToBWIMage(";
_myimage = parent._printer1._imagetobwimage /*reparto_izca.keymon.lat.escposprinter._animage*/ (_bmp);
 //BA.debugLineNum = 3342;BA.debugLine="myimage = Printer1.DitherImage2D(myimage, 128)";
_myimage = parent._printer1._ditherimage2d /*reparto_izca.keymon.lat.escposprinter._animage*/ (_myimage,(int) (128));
 //BA.debugLineNum = 3343;BA.debugLine="myimage= Printer1.PackImage(myimage)";
_myimage = parent._printer1._packimage /*reparto_izca.keymon.lat.escposprinter._animage*/ (_myimage);
 //BA.debugLineNum = 3344;BA.debugLine="Printer1.WriteString(CRLF) ' nudge the printer to";
parent._printer1._writestring /*String*/ (parent.__c.CRLF);
 //BA.debugLineNum = 3345;BA.debugLine="Printer1.WriteString(CRLF) ' nudge the printer to";
parent._printer1._writestring /*String*/ (parent.__c.CRLF);
 //BA.debugLineNum = 3346;BA.debugLine="Printer1.WriteString(Printer1.REVERSE)";
parent._printer1._writestring /*String*/ (parent._printer1._reverse /*String*/ );
 //BA.debugLineNum = 3347;BA.debugLine="Printer1.PrintImage(myimage)";
parent._printer1._printimage /*int*/ (_myimage);
 //BA.debugLineNum = 3348;BA.debugLine="Printer1.WriteString(Printer1.UNREVERSE)";
parent._printer1._writestring /*String*/ (parent._printer1._unreverse /*String*/ );
 //BA.debugLineNum = 3349;BA.debugLine="Printer1.WriteString(\" \" & CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 3350;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 = 3351;BA.debugLine="lv_prod_Prin.SingleLineLayout.Label.TextColor = C";
parent._lv_prod_prin.getSingleLineLayout().Label.setTextColor(parent.__c.Colors.White);
 //BA.debugLineNum = 3352;BA.debugLine="lv_prod_Prin.Clear";
parent._lv_prod_prin.Clear();
 //BA.debugLineNum = 3353;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 3354;BA.debugLine="Dim sDate, sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 3355;BA.debugLine="DateTime.DateFormat = \"dd/MM/yyyy\"";
parent.__c.DateTime.setDateFormat("dd/MM/yyyy");
 //BA.debugLineNum = 3356;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
parent.__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 3357;BA.debugLine="sDate = DateTime.Date(DateTime.Now)";
_sdate = parent.__c.DateTime.Date(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 3358;BA.debugLine="sTime = DateTime.Time(DateTime.Now)";
_stime = parent.__c.DateTime.Time(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 3359;BA.debugLine="Printer1.WriteString(\"Fecha: \" &sDate & CRLF)";
parent._printer1._writestring /*String*/ ("Fecha: "+_sdate+parent.__c.CRLF);
 //BA.debugLineNum = 3360;BA.debugLine="Printer1.WriteString(\"Hora: \" &sTime & CRLF)";
parent._printer1._writestring /*String*/ ("Hora: "+_stime+parent.__c.CRLF);
 //BA.debugLineNum = 3361;BA.debugLine="Printer1.WriteString(\"Ruta: \" & l_ruta.Text & CRL";
parent._printer1._writestring /*String*/ ("Ruta: "+parent._l_ruta.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 3362;BA.debugLine="Printer1.WriteString(\"Usuario: \" & Subs.dameUsuar";
parent._printer1._writestring /*String*/ ("Usuario: "+parent._subs._dameusuariodedb /*String*/ (ba)+parent.__c.CRLF);
 //BA.debugLineNum = 3364;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("--------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 3365;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 = 3366;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 = 3367;BA.debugLine="c.Position = i";
parent._c.setPosition(_i);
 //BA.debugLineNum = 3369;BA.debugLine="Printer1.WriteString(\"-----------INVENTARIO----";
parent._printer1._writestring /*String*/ ("-----------INVENTARIO-----------"+parent.__c.CRLF);
 //BA.debugLineNum = 3370;BA.debugLine="Printer1.WriteString(\"-------------------------";
parent._printer1._writestring /*String*/ ("--------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 3371;BA.debugLine="Printer1.WriteString(\"Cant.      Producto\" &  C";
parent._printer1._writestring /*String*/ ("Cant.      Producto"+parent.__c.CRLF);
 //BA.debugLineNum = 3372;BA.debugLine="Printer1.WriteString(\"-------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 3373;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 = 3374;BA.debugLine="c.Position=i";
parent._c.setPosition(_i);
 //BA.debugLineNum = 3377;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 3378;BA.debugLine="Printer1.WriteString( (c.GetString(\"HVD_CANT\")";
parent._printer1._writestring /*String*/ ((parent._c.GetString("HVD_CANT"))+"- ");
 //BA.debugLineNum = 3379;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 3380;BA.debugLine="Dim firstChar As String = c.GetString(\"HVD_PRO";
_firstchar = parent._c.GetString("HVD_PRONOMBRE").substring((int) (0),(int) (1));
 //BA.debugLineNum = 3381;BA.debugLine="Dim productoinven As String";
_productoinven = "";
 //BA.debugLineNum = 3384;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 = 3386;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 = 3389;BA.debugLine="productoinven = c.GetString(\"HVD_PRONOMBRE\")";
_productoinven = parent._c.GetString("HVD_PRONOMBRE");
 if (true) break;

case 53:
//C
this.state = 64;
;
 //BA.debugLineNum = 3393;BA.debugLine="Printer1.WriteString(productoinven)";
parent._printer1._writestring /*String*/ (_productoinven);
 //BA.debugLineNum = 3394;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 3395;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 = 3402;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 3404;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 = 3405;BA.debugLine="sumainv.Position = 0";
_sumainv.setPosition((int) (0));
 //BA.debugLineNum = 3407;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 3408;BA.debugLine="Printer1.WriteString(\"Total piezas: \" & sumainv.G";
parent._printer1._writestring /*String*/ ("Total piezas: "+_sumainv.GetString("CANTIDAD")+parent.__c.CRLF);
 //BA.debugLineNum = 3409;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 3410;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 3411;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 3412;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 3413;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 3414;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 3415;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 65;
return;
case 65:
//C
this.state = -1;
;
 //BA.debugLineNum = 3416;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 3417;BA.debugLine="ProgressDialogHide";
parent.__c.ProgressDialogHide();
 //BA.debugLineNum = 3418;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 = 3422;BA.debugLine="Dim totalentrega As Int";
_totalentrega = 0;
 //BA.debugLineNum = 3423;BA.debugLine="Dim totalrechazo As Int";
_totalrechazo = 0;
 //BA.debugLineNum = 3424;BA.debugLine="Dim totalpiezas As Int";
_totalpiezas = 0;
 //BA.debugLineNum = 3425;BA.debugLine="Dim sDate, sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 3426;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 = 3427;BA.debugLine="c.Position=0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 3428;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
parent._usuario = parent._c.GetString("USUARIO");
 //BA.debugLineNum = 3430;BA.debugLine="DateTime.DateFormat = \"dd/MM/yyyy\"";
parent.__c.DateTime.setDateFormat("dd/MM/yyyy");
 //BA.debugLineNum = 3431;BA.debugLine="DateTime.TimeFormat=\"HH:mm:ss\"";
parent.__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 3432;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = parent.__c.DateTime.Date(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 3433;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = parent.__c.DateTime.Time(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 3434;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 3440;BA.debugLine="ProgressDialogShow(\"Imprimiendo, un momento ...\")";
parent.__c.ProgressDialogShow(ba,BA.ObjectToCharSequence("Imprimiendo, un momento ..."));
 //BA.debugLineNum = 3441;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 3442;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 = 3444;BA.debugLine="Printer1.Connect";
parent._printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 3445;BA.debugLine="Private cont As Int = 0";
_cont = (int) (0);
 //BA.debugLineNum = 3446;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 = 3447;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 53;
return;
case 53:
//C
this.state = 7;
;
 //BA.debugLineNum = 3449;BA.debugLine="cont = cont + 1";
_cont = (int) (_cont+1);
 //BA.debugLineNum = 3450;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 = 3451;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 = 3453;BA.debugLine="Sleep(500)";
parent.__c.Sleep(ba,this,(int) (500));
this.state = 54;
return;
case 54:
//C
this.state = 38;
;
 //BA.debugLineNum = 3454;BA.debugLine="impresoraConectada = False";
parent._impresoraconectada = parent.__c.False;
 if (true) break;

case 21:
//C
this.state = 22;
 //BA.debugLineNum = 3457;BA.debugLine="Printer1.Connect";
parent._printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 3458;BA.debugLine="Private cont As Int = 0";
_cont = (int) (0);
 //BA.debugLineNum = 3459;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 = 3460;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 55;
return;
case 55:
//C
this.state = 25;
;
 //BA.debugLineNum = 3462;BA.debugLine="cont = cont + 1";
_cont = (int) (_cont+1);
 //BA.debugLineNum = 3463;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 = 3464;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 = 3466;BA.debugLine="Sleep(500)";
parent.__c.Sleep(ba,this,(int) (500));
this.state = 56;
return;
case 56:
//C
this.state = 38;
;
 //BA.debugLineNum = 3467;BA.debugLine="impresoraConectada = False";
parent._impresoraconectada = parent.__c.False;
 if (true) break;

case 38:
//C
this.state = 39;
;
 //BA.debugLineNum = 3470;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 3471;BA.debugLine="ESPACIO = 28";
parent._espacio = (int) (28);
 //BA.debugLineNum = 3472;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 3474;BA.debugLine="Printer1.WriteString(\"Izca Distribuciones\" &  CRL";
parent._printer1._writestring /*String*/ ("Izca Distribuciones"+parent.__c.CRLF);
 //BA.debugLineNum = 3475;BA.debugLine="Printer1.WriteString(sDate & \" \" &sTime &  CRLF)";
parent._printer1._writestring /*String*/ (_sdate+" "+_stime+parent.__c.CRLF);
 //BA.debugLineNum = 3477;BA.debugLine="Printer1.WriteString(\"------------ENTREGA--------";
parent._printer1._writestring /*String*/ ("------------ENTREGA-----------"+parent.__c.CRLF);
 //BA.debugLineNum = 3478;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 = 3479;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 = 3480;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 = 3481;BA.debugLine="c.Position = i";
parent._c.setPosition(_i);
 //BA.debugLineNum = 3484;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 = 3485;BA.debugLine="Private resta As String = 0";
_resta = BA.NumberToString(0);
 //BA.debugLineNum = 3487;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 = 3488;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
 //BA.debugLineNum = 3489;BA.debugLine="resta =  c3.GetString(\"PE_CANT\")";
_resta = _c3.GetString("PE_CANT");
 if (true) break;

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

case 50:
//C
this.state = 58;
;
 //BA.debugLineNum = 3493;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 3494;BA.debugLine="Printer1.WriteString(c.GetString(\"HVD_PRONOMBRE";
parent._printer1._writestring /*String*/ (parent._c.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 3495;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 3496;BA.debugLine="Printer1.WriteString(\"TP: \"& c.GetInt(\"HVD_CANT";
parent._printer1._writestring /*String*/ ("TP: "+BA.NumberToString(parent._c.GetInt("HVD_CANT"))+"  ");
 //BA.debugLineNum = 3497;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 3498;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 = 3499;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 3500;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 = 3501;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 3502;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 3504;BA.debugLine="totalentrega = totalentrega + c.GetInt(\"total\")";
_totalentrega = (int) (_totalentrega+parent._c.GetInt("total")+(double)(Double.parseDouble(_resta)));
 //BA.debugLineNum = 3505;BA.debugLine="totalrechazo = totalrechazo + c.GetInt(\"HVD_REC";
_totalrechazo = (int) (_totalrechazo+parent._c.GetInt("HVD_RECHAZOCANT")-(double)(Double.parseDouble(_resta)));
 //BA.debugLineNum = 3506;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 = 3511;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 3512;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 3513;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 3514;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 3516;BA.debugLine="Printer1.WriteString(\"Total Piezas:  \"& totalpiez";
parent._printer1._writestring /*String*/ ("Total Piezas:  "+BA.NumberToString(_totalpiezas)+parent.__c.CRLF);
 //BA.debugLineNum = 3517;BA.debugLine="Printer1.WriteString(\"Total Entrega:  \"& totalent";
parent._printer1._writestring /*String*/ ("Total Entrega:  "+BA.NumberToString(_totalentrega)+parent.__c.CRLF);
 //BA.debugLineNum = 3518;BA.debugLine="Printer1.WriteString(\"Total Rechazo:  \"& totalrec";
parent._printer1._writestring /*String*/ ("Total Rechazo:  "+BA.NumberToString(_totalrechazo)+parent.__c.CRLF);
 //BA.debugLineNum = 3521;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 3522;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 3523;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 3524;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 3525;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 3526;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 59;
return;
case 59:
//C
this.state = -1;
;
 //BA.debugLineNum = 3527;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 3529;BA.debugLine="ProgressDialogHide";
parent.__c.ProgressDialogHide();
 //BA.debugLineNum = 3530;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b_mapa_click() throws Exception{
 //BA.debugLineNum = 2621;BA.debugLine="Sub b_mapa_Click";
 //BA.debugLineNum = 2623;BA.debugLine="B4XPages.ShowPage(\"mapas\")";
_b4xpages._showpage /*String*/ (ba,"mapas");
 //BA.debugLineNum = 2624;BA.debugLine="End Sub";
return "";
}
public String  _b_pc_env_click() throws Exception{
String _sdate = "";
String _stime = "";
int _i = 0;
anywheresoftware.b4a.objects.B4XViewWrapper _itempanel = null;
anywheresoftware.b4a.objects.B4XViewWrapper _innerpanel = null;
anywheresoftware.b4a.objects.B4XViewWrapper _edittext = null;
String _inputtext = "";
anywheresoftware.b4a.objects.B4XViewWrapper _labelcant = null;
String _cantidadrestar = "";
anywheresoftware.b4a.objects.B4XViewWrapper _idlabel = null;
String _idtext = "";
String[] _idparts = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _k = null;
String[] _fechatabulador = null;
String _fechatabulador3 = "";
int _restado = 0;
 //BA.debugLineNum = 3770;BA.debugLine="Private Sub B_PC_ENV_Click";
 //BA.debugLineNum = 3771;BA.debugLine="Dim sDate, sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 3772;BA.debugLine="DateTime.DateFormat = \"dd/MM/yyyy\"";
__c.DateTime.setDateFormat("dd/MM/yyyy");
 //BA.debugLineNum = 3773;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 3774;BA.debugLine="sDate = DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 3775;BA.debugLine="sTime = DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 3778;BA.debugLine="For i = 0 To CLV_PICK_CIEGO.Size - 1";
{
final int step6 = 1;
final int limit6 = (int) (_clv_pick_ciego._getsize()-1);
_i = (int) (0) ;
for (;_i <= limit6 ;_i = _i + step6 ) {
 //BA.debugLineNum = 3780;BA.debugLine="Dim itemPanel As B4XView = CLV_PICK_CIEGO.GetPan";
_itempanel = new anywheresoftware.b4a.objects.B4XViewWrapper();
_itempanel = _clv_pick_ciego._getpanel(_i);
 //BA.debugLineNum = 3781;BA.debugLine="Dim innerPanel As B4XView = itemPanel.GetView(0)";
_innerpanel = new anywheresoftware.b4a.objects.B4XViewWrapper();
_innerpanel = _itempanel.GetView((int) (0));
 //BA.debugLineNum = 3782;BA.debugLine="Dim editText As B4XView = innerPanel.GetView(1)";
_edittext = new anywheresoftware.b4a.objects.B4XViewWrapper();
_edittext = _innerpanel.GetView((int) (1));
 //BA.debugLineNum = 3783;BA.debugLine="Dim inputText As String = editText.As(EditText).";
_inputtext = ((anywheresoftware.b4a.objects.EditTextWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.EditTextWrapper(), (android.widget.EditText)(_edittext.getObject()))).getText();
 //BA.debugLineNum = 3784;BA.debugLine="Dim labelcant As B4XView = innerPanel.GetView(2)";
_labelcant = new anywheresoftware.b4a.objects.B4XViewWrapper();
_labelcant = _innerpanel.GetView((int) (2));
 //BA.debugLineNum = 3785;BA.debugLine="Dim cantidadrestar As String = labelcant.As(Labe";
_cantidadrestar = ((anywheresoftware.b4a.objects.LabelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.LabelWrapper(), (android.widget.TextView)(_labelcant.getObject()))).getText();
 //BA.debugLineNum = 3788;BA.debugLine="If Regex.IsMatch(\"^[0]+$\", inputText) Or inputTe";
if (__c.Regex.IsMatch("^[0]+$",_inputtext) || (_inputtext).equals("")) { 
 //BA.debugLineNum = 3789;BA.debugLine="inputText = \"0\"";
_inputtext = "0";
 };
 //BA.debugLineNum = 3793;BA.debugLine="Dim idLabel As B4XView = innerPanel.GetView(0)";
_idlabel = new anywheresoftware.b4a.objects.B4XViewWrapper();
_idlabel = _innerpanel.GetView((int) (0));
 //BA.debugLineNum = 3794;BA.debugLine="Dim idText As String = idLabel.As(Label).Text";
_idtext = ((anywheresoftware.b4a.objects.LabelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.LabelWrapper(), (android.widget.TextView)(_idlabel.getObject()))).getText();
 //BA.debugLineNum = 3795;BA.debugLine="Dim idParts() As String = Regex.Split(CRLF, idTe";
_idparts = __c.Regex.Split(__c.CRLF,_idtext);
 //BA.debugLineNum = 3797;BA.debugLine="f=Starter.skmt.ExecQuery(\"select RUTAA from RUTA";
_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 = 3798;BA.debugLine="f.Position=0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 3800;BA.debugLine="a=Starter.skmt.ExecQuery(\"select ID_ALMACEN from";
_a = (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 = 3801;BA.debugLine="If a.RowCount>0 Then";
if (_a.getRowCount()>0) { 
 //BA.debugLineNum = 3802;BA.debugLine="a.Position=0";
_a.setPosition((int) (0));
 };
 //BA.debugLineNum = 3804;BA.debugLine="Dim k As Cursor = Starter.skmt.ExecQuery(\"SELECT";
_k = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_k = (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 = 3805;BA.debugLine="k.Position = 0";
_k.setPosition((int) (0));
 //BA.debugLineNum = 3806;BA.debugLine="Dim fechatabulador() As String = Regex.Split(\" \"";
_fechatabulador = __c.Regex.Split(" ",_k.GetString("HVD_FECHA"));
 //BA.debugLineNum = 3808;BA.debugLine="Dim fechatabulador3 As String = fechatabulador(0";
_fechatabulador3 = _fechatabulador[(int) (0)];
 //BA.debugLineNum = 3809;BA.debugLine="k.Close";
_k.Close();
 //BA.debugLineNum = 3810;BA.debugLine="If inputText <> \"\" Then";
if ((_inputtext).equals("") == false) { 
 //BA.debugLineNum = 3811;BA.debugLine="Log(idParts(0))";
__c.LogImpl("154853673",_idparts[(int) (0)],0);
 //BA.debugLineNum = 3812;BA.debugLine="Log(cantidadrestar)";
__c.LogImpl("154853674",_cantidadrestar,0);
 //BA.debugLineNum = 3813;BA.debugLine="Log(inputText)";
__c.LogImpl("154853675",_inputtext,0);
 //BA.debugLineNum = 3814;BA.debugLine="Dim restado As Int = cantidadrestar - inputText";
_restado = (int) ((double)(Double.parseDouble(_cantidadrestar))-(double)(Double.parseDouble(_inputtext)));
 //BA.debugLineNum = 3815;BA.debugLine="Log(cantidadrestar - inputText)";
__c.LogImpl("154853677",BA.NumberToString((double)(Double.parseDouble(_cantidadrestar))-(double)(Double.parseDouble(_inputtext))),0);
 //BA.debugLineNum = 3816;BA.debugLine="c = Starter.skmt.ExecQuery2(\"SELECT * FROM PICK";
_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 * FROM PICK_CIEGO where PC_ID_PROD = ?",new String[]{_idparts[(int) (0)]})));
 //BA.debugLineNum = 3817;BA.debugLine="If c.RowCount = 0 Then";
if (_c.getRowCount()==0) { 
 //BA.debugLineNum = 3821;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO PICK_C";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PICK_CIEGO(PC_ID_PROD, PC_NOM_PROD, PC_CANT, PC_ALMACEN, PC_RUTA, PC_FECHA, RESTA) VALUES(?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_idparts[(int) (0)],_idparts[(int) (1)],_inputtext,_a.GetString("ID_ALMACEN"),_f.GetString("RUTAA"),_fechatabulador3+" "+_stime,BA.NumberToString(_restado)}));
 }else {
 //BA.debugLineNum = 3826;BA.debugLine="Starter.skmt.ExecNonQuery2(\"Update PICK_CIEGO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("Update PICK_CIEGO set PC_CANT = ?, RESTA = ?  WHERE PC_ID_PROD = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_inputtext,BA.NumberToString(_restado),_idparts[(int) (0)]}));
 };
 };
 //BA.debugLineNum = 3830;BA.debugLine="f.Close";
_f.Close();
 //BA.debugLineNum = 3831;BA.debugLine="a.Close";
_a.Close();
 //BA.debugLineNum = 3832;BA.debugLine="Log(\"Processed item \" & i)";
__c.LogImpl("154853694","Processed item "+BA.NumberToString(_i),0);
 }
};
 //BA.debugLineNum = 3835;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 = 2972;BA.debugLine="Private Sub b_rechazos_Click";
 //BA.debugLineNum = 2973;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 2974;BA.debugLine="label1 = lv_prod_Prin.SingleLineLayout.Label";
_label1 = _lv_prod_prin.getSingleLineLayout().Label;
 //BA.debugLineNum = 2975;BA.debugLine="label1.TextSize = 14";
_label1.setTextSize((float) (14));
 //BA.debugLineNum = 2976;BA.debugLine="p_prod.Width = Root.Width";
_p_prod.setWidth(_root.getWidth());
 //BA.debugLineNum = 2977;BA.debugLine="p_prod.Height = Root.Height";
_p_prod.setHeight(_root.getHeight());
 //BA.debugLineNum = 2980;BA.debugLine="b_regreso.Top = p_prod.Height - b_regreso.Height";
_b_regreso.setTop((int) (_p_prod.getHeight()-_b_regreso.getHeight()));
 //BA.debugLineNum = 2981;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 = 2983;BA.debugLine="p_prod.Visible = True";
_p_prod.setVisible(__c.True);
 //BA.debugLineNum = 2984;BA.debugLine="p_prod.BringToFront";
_p_prod.BringToFront();
 //BA.debugLineNum = 2986;BA.debugLine="If l_ctast.Text = \"0\" Then";
if ((_l_ctast.getText()).equals("0")) { 
 //BA.debugLineNum = 2987;BA.debugLine="b_impresion_rec.Enabled = True";
_b_impresion_rec.setEnabled(__c.True);
 }else if((_l_ctast.getText()).equals("0") == false) { 
 //BA.debugLineNum = 2989;BA.debugLine="b_impresion_rec.Enabled = False";
_b_impresion_rec.setEnabled(__c.False);
 };
 //BA.debugLineNum = 2993;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 = 2995;BA.debugLine="lv_prod_Prin.SingleLineLayout.Label.TextColor = C";
_lv_prod_prin.getSingleLineLayout().Label.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 2996;BA.debugLine="lv_prod_Prin.Clear";
_lv_prod_prin.Clear();
 //BA.debugLineNum = 2997;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 2998;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 = 2999;BA.debugLine="c.Position = i";
_c.setPosition(_i);
 //BA.debugLineNum = 3000;BA.debugLine="Dim itemText As String";
_itemtext = "";
 //BA.debugLineNum = 3002;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 = 3003;BA.debugLine="Private resta As String = 0";
_resta = BA.NumberToString(0);
 //BA.debugLineNum = 3005;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
 //BA.debugLineNum = 3006;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
 //BA.debugLineNum = 3007;BA.debugLine="resta =  c3.GetString(\"PE_CANT\")";
_resta = _c3.GetString("PE_CANT");
 }else {
 //BA.debugLineNum = 3009;BA.debugLine="resta = 0";
_resta = BA.NumberToString(0);
 };
 //BA.debugLineNum = 3011;BA.debugLine="If ( c.GetInt(\"HVD_RECHAZOCANT\") - resta) <= 0";
if ((_c.GetInt("HVD_RECHAZOCANT")-(double)(Double.parseDouble(_resta)))<=0) { 
 }else {
 //BA.debugLineNum = 3014;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 = 3015;BA.debugLine="lv_prod_Prin.AddSingleLine(itemText)";
_lv_prod_prin.AddSingleLine(BA.ObjectToCharSequence(_itemtext));
 };
 }
};
 }else {
 //BA.debugLineNum = 3021;BA.debugLine="lv_prod_Prin.AddSingleLine(\"No hay datos disponi";
_lv_prod_prin.AddSingleLine(BA.ObjectToCharSequence("No hay datos disponibles."));
 };
 //BA.debugLineNum = 3023;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 3026;BA.debugLine="End Sub";
return "";
}
public String  _b_regresa_click() throws Exception{
 //BA.debugLineNum = 2925;BA.debugLine="Sub B_REGRESA_Click";
 //BA.debugLineNum = 2926;BA.debugLine="Log(\"B_REGRESA_Click\")";
__c.LogImpl("153608449","B_REGRESA_Click",0);
 //BA.debugLineNum = 2927;BA.debugLine="BUSCA.Visible = False";
_busca.setVisible(__c.False);
 //BA.debugLineNum = 2928;BA.debugLine="connecta.Visible = True";
_connecta.setVisible(__c.True);
 //BA.debugLineNum = 2929;BA.debugLine="trabajar.Visible = True";
_trabajar.setVisible(__c.True);
 //BA.debugLineNum = 2930;BA.debugLine="B_CLIEPROD.Visible = True";
_b_clieprod.setVisible(__c.True);
 //BA.debugLineNum = 2931;BA.debugLine="Panel1.Visible = False";
_panel1.setVisible(__c.False);
 //BA.debugLineNum = 2932;BA.debugLine="Btn_Ubicar_Ru.Visible=True";
_btn_ubicar_ru.setVisible(__c.True);
 //BA.debugLineNum = 2933;BA.debugLine="End Sub";
return "";
}
public String  _b_regreso_click() throws Exception{
 //BA.debugLineNum = 3028;BA.debugLine="Private Sub b_regreso_Click";
 //BA.debugLineNum = 3029;BA.debugLine="p_prod.Visible = False";
_p_prod.setVisible(__c.False);
 //BA.debugLineNum = 3030;BA.debugLine="End Sub";
return "";
}
public String  _b_tabulador_click() throws Exception{
 //BA.debugLineNum = 2946;BA.debugLine="Private Sub b_tabulador_Click";
 //BA.debugLineNum = 2947;BA.debugLine="If b_check.Visible = True Then";
if (_b_check.getVisible()==__c.True) { 
 //BA.debugLineNum = 2948;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 = 2950;BA.debugLine="B4XPages.ShowPage(\"tabulador\")";
_b4xpages._showpage /*String*/ (ba,"tabulador");
 };
 //BA.debugLineNum = 2952;BA.debugLine="End Sub";
return "";
}
public String  _b_terpc_click() throws Exception{
String _sdate = "";
String _stime = "";
int _consecutivo = 0;
int _i = 0;
anywheresoftware.b4a.objects.B4XViewWrapper _itempanel = null;
anywheresoftware.b4a.objects.B4XViewWrapper _innerpanel = null;
anywheresoftware.b4a.objects.B4XViewWrapper _edittext = null;
String _inputtext = "";
anywheresoftware.b4a.objects.B4XViewWrapper _labelcant = null;
String _cantidadrestar = "";
anywheresoftware.b4a.objects.B4XViewWrapper _idlabel = null;
String _idtext = "";
String[] _idparts = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _k = null;
String[] _fechatabulador = null;
String _fechatabulador3 = "";
int _restado = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _preciocat = null;
String _preciofull = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _faltantes = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _restadoanterior = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _sobrantes = null;
 //BA.debugLineNum = 3534;BA.debugLine="Private Sub b_terpc_Click";
 //BA.debugLineNum = 3536;BA.debugLine="Dim sDate, sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 3537;BA.debugLine="DateTime.DateFormat = \"dd/MM/yyyy\"";
__c.DateTime.setDateFormat("dd/MM/yyyy");
 //BA.debugLineNum = 3538;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 3539;BA.debugLine="sDate = DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 3540;BA.debugLine="sTime = DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 3542;BA.debugLine="Dim consecutivo As Int = 1000";
_consecutivo = (int) (1000);
 //BA.debugLineNum = 3543;BA.debugLine="For i = 0 To CLV_PICK_CIEGO.Size - 1";
{
final int step7 = 1;
final int limit7 = (int) (_clv_pick_ciego._getsize()-1);
_i = (int) (0) ;
for (;_i <= limit7 ;_i = _i + step7 ) {
 //BA.debugLineNum = 3545;BA.debugLine="Dim itemPanel As B4XView = CLV_PICK_CIEGO.GetPan";
_itempanel = new anywheresoftware.b4a.objects.B4XViewWrapper();
_itempanel = _clv_pick_ciego._getpanel(_i);
 //BA.debugLineNum = 3546;BA.debugLine="Dim innerPanel As B4XView = itemPanel.GetView(0)";
_innerpanel = new anywheresoftware.b4a.objects.B4XViewWrapper();
_innerpanel = _itempanel.GetView((int) (0));
 //BA.debugLineNum = 3547;BA.debugLine="Dim editText As B4XView = innerPanel.GetView(1)";
_edittext = new anywheresoftware.b4a.objects.B4XViewWrapper();
_edittext = _innerpanel.GetView((int) (1));
 //BA.debugLineNum = 3548;BA.debugLine="Dim inputText As String = editText.As(EditText).";
_inputtext = ((anywheresoftware.b4a.objects.EditTextWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.EditTextWrapper(), (android.widget.EditText)(_edittext.getObject()))).getText();
 //BA.debugLineNum = 3549;BA.debugLine="Dim labelcant As B4XView = innerPanel.GetView(2)";
_labelcant = new anywheresoftware.b4a.objects.B4XViewWrapper();
_labelcant = _innerpanel.GetView((int) (2));
 //BA.debugLineNum = 3550;BA.debugLine="Dim cantidadrestar As String = labelcant.As(Labe";
_cantidadrestar = ((anywheresoftware.b4a.objects.LabelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.LabelWrapper(), (android.widget.TextView)(_labelcant.getObject()))).getText();
 //BA.debugLineNum = 3553;BA.debugLine="If Regex.IsMatch(\"^[0]+$\", inputText) Or inputTe";
if (__c.Regex.IsMatch("^[0]+$",_inputtext) || (_inputtext).equals("")) { 
 //BA.debugLineNum = 3554;BA.debugLine="inputText = \"0\"";
_inputtext = "0";
 };
 //BA.debugLineNum = 3558;BA.debugLine="Dim idLabel As B4XView = innerPanel.GetView(0)";
_idlabel = new anywheresoftware.b4a.objects.B4XViewWrapper();
_idlabel = _innerpanel.GetView((int) (0));
 //BA.debugLineNum = 3559;BA.debugLine="Dim idText As String = idLabel.As(Label).Text";
_idtext = ((anywheresoftware.b4a.objects.LabelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.LabelWrapper(), (android.widget.TextView)(_idlabel.getObject()))).getText();
 //BA.debugLineNum = 3560;BA.debugLine="Dim idParts() As String = Regex.Split(CRLF, idTe";
_idparts = __c.Regex.Split(__c.CRLF,_idtext);
 //BA.debugLineNum = 3562;BA.debugLine="f=Starter.skmt.ExecQuery(\"select RUTAA from RUTA";
_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 = 3563;BA.debugLine="f.Position=0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 3565;BA.debugLine="a=Starter.skmt.ExecQuery(\"select ID_ALMACEN from";
_a = (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 = 3566;BA.debugLine="If a.RowCount>0 Then";
if (_a.getRowCount()>0) { 
 //BA.debugLineNum = 3567;BA.debugLine="a.Position=0";
_a.setPosition((int) (0));
 };
 //BA.debugLineNum = 3569;BA.debugLine="Dim k As Cursor = Starter.skmt.ExecQuery(\"SELECT";
_k = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_k = (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 = 3570;BA.debugLine="k.Position = 0";
_k.setPosition((int) (0));
 //BA.debugLineNum = 3571;BA.debugLine="Dim fechatabulador() As String = Regex.Split(\" \"";
_fechatabulador = __c.Regex.Split(" ",_k.GetString("HVD_FECHA"));
 //BA.debugLineNum = 3573;BA.debugLine="Dim fechatabulador3 As String = fechatabulador(0";
_fechatabulador3 = _fechatabulador[(int) (0)];
 //BA.debugLineNum = 3574;BA.debugLine="k.Close";
_k.Close();
 //BA.debugLineNum = 3575;BA.debugLine="If inputText <> \"\" And inputText <> 0 Then";
if ((_inputtext).equals("") == false && (_inputtext).equals(BA.NumberToString(0)) == false) { 
 //BA.debugLineNum = 3576;BA.debugLine="Log(\"IMPUT DIFERENTE DE CERO\")";
__c.LogImpl("154788138","IMPUT DIFERENTE DE CERO",0);
 //BA.debugLineNum = 3577;BA.debugLine="Log(idParts(0))";
__c.LogImpl("154788139",_idparts[(int) (0)],0);
 //BA.debugLineNum = 3578;BA.debugLine="Log(cantidadrestar)";
__c.LogImpl("154788140",_cantidadrestar,0);
 //BA.debugLineNum = 3579;BA.debugLine="Log(inputText)";
__c.LogImpl("154788141",_inputtext,0);
 //BA.debugLineNum = 3580;BA.debugLine="Dim restado As Int = cantidadrestar - inputText";
_restado = (int) ((double)(Double.parseDouble(_cantidadrestar))-(double)(Double.parseDouble(_inputtext)));
 //BA.debugLineNum = 3581;BA.debugLine="Log(cantidadrestar - inputText)";
__c.LogImpl("154788143",BA.NumberToString((double)(Double.parseDouble(_cantidadrestar))-(double)(Double.parseDouble(_inputtext))),0);
 //BA.debugLineNum = 3582;BA.debugLine="c = Starter.skmt.ExecQuery2(\"SELECT * FROM PICK";
_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 * FROM PICK_CIEGO where PC_ID_PROD = ?",new String[]{_idparts[(int) (0)]})));
 //BA.debugLineNum = 3584;BA.debugLine="If c.RowCount = 0 Then";
if (_c.getRowCount()==0) { 
 //BA.debugLineNum = 3589;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO PICK_C";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PICK_CIEGO(PC_ID_PROD, PC_NOM_PROD, PC_CANT, PC_ALMACEN, PC_RUTA, PC_FECHA, RESTA) VALUES(?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_idparts[(int) (0)],_idparts[(int) (1)],_inputtext,_a.GetString("ID_ALMACEN"),_f.GetString("RUTAA"),_fechatabulador3+" "+_stime,BA.NumberToString(_restado)}));
 //BA.debugLineNum = 3590;BA.debugLine="If restado > 0 And inputText <> 0 Then";
if (_restado>0 && (_inputtext).equals(BA.NumberToString(0)) == false) { 
 //BA.debugLineNum = 3592;BA.debugLine="Dim preciocat As Cursor = Starter.skmt.ExecQu";
_preciocat = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_preciocat = (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(CAT_GP_PRECIO,0) AS CAT_GP_PRECIO from CAT_GUNAPROD WHERE CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"'"))));
 //BA.debugLineNum = 3593;BA.debugLine="If preciocat.RowCount > 0 Then";
if (_preciocat.getRowCount()>0) { 
 //BA.debugLineNum = 3594;BA.debugLine="preciocat.Position = 0";
_preciocat.setPosition((int) (0));
 //BA.debugLineNum = 3595;BA.debugLine="Dim preciofull As String = preciocat.GetStri";
_preciofull = _preciocat.GetString("CAT_GP_PRECIO");
 };
 //BA.debugLineNum = 3597;BA.debugLine="preciocat.Close";
_preciocat.Close();
 //BA.debugLineNum = 3598;BA.debugLine="Log(\"MAYOR A CERO\")";
__c.LogImpl("154788160","MAYOR A CERO",0);
 //BA.debugLineNum = 3599;BA.debugLine="consecutivo = consecutivo + 1";
_consecutivo = (int) (_consecutivo+1);
 //BA.debugLineNum = 3600;BA.debugLine="Dim faltantes As Cursor = Starter.skmt.ExecQu";
_faltantes = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_faltantes = (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 PEDIDO WHERE PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"' AND PE_TIPO = 'FALTANTE'"))));
 //BA.debugLineNum = 3601;BA.debugLine="If faltantes.RowCount > 0 Then";
if (_faltantes.getRowCount()>0) { 
 //BA.debugLineNum = 3602;BA.debugLine="faltantes.Position = 0";
_faltantes.setPosition((int) (0));
 //BA.debugLineNum = 3603;BA.debugLine="Starter.skmt.ExecNonQuery($\"update PEDIDO se";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update PEDIDO set PE_CANT = '"+__c.SmartStringFormatter("",(Object)(_restado))+"', PE_COSTO_TOT= '"+__c.SmartStringFormatter("",(Object)(_restado))+"'*'"+__c.SmartStringFormatter("",(Object)(_preciofull))+"', PE_TIPO = 'FALTANTE' WHERE PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"' and PE_CLIENTE = '63403' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_faltantes.GetString("CONSECUTIVO")))+"'"));
 }else {
 //BA.debugLineNum = 3605;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO PEDI";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PEDIDO(PE_PROID,PE_PRONOMBRE,PE_CANT,PE_CLIENTEOR,PE_CLIENTE,PE_COSTOU,PE_COSTO_TOT,PE_CAJAS,PE_BCAJAS,CONSECUTIVO,PE_RUTA, PE_TIPO,PE_CEDIS,PE_FECHA,PE_USUARIO,FECHA_PREV,RUTA_REP,PE_REGALO) VALUES (?,?,?,?,?,?,?,0,0,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_idparts[(int) (0)],_idparts[(int) (1)],BA.NumberToString(_restado),"",_subs._traecliente /*String*/ (ba),_preciofull,BA.NumberToString(((double)(Double.parseDouble(_preciofull))*_restado)),BA.NumberToString(_consecutivo),BA.NumberToString(1000),"FALTANTE",_subs._traealmacen /*String*/ (ba),_sdate+" "+_stime,_subs._traeusuario /*String*/ (ba),_subs._traefechaprev /*String*/ (ba),_subs._traerutareparto /*String*/ (ba),BA.NumberToString(0)}));
 };
 }else if(_restado<0 && (_inputtext).equals(BA.NumberToString(0)) == false) { 
 //BA.debugLineNum = 3609;BA.debugLine="Dim preciocat As Cursor = Starter.skmt.ExecQu";
_preciocat = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_preciocat = (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(CAT_GP_PRECIO,0) AS CAT_GP_PRECIO from CAT_GUNAPROD WHERE CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"'"))));
 //BA.debugLineNum = 3610;BA.debugLine="If preciocat.RowCount > 0 Then";
if (_preciocat.getRowCount()>0) { 
 //BA.debugLineNum = 3611;BA.debugLine="preciocat.Position = 0";
_preciocat.setPosition((int) (0));
 //BA.debugLineNum = 3612;BA.debugLine="Dim preciofull As String = preciocat.GetStri";
_preciofull = _preciocat.GetString("CAT_GP_PRECIO");
 };
 //BA.debugLineNum = 3614;BA.debugLine="preciocat.Close";
_preciocat.Close();
 //BA.debugLineNum = 3615;BA.debugLine="Log(\"MENOR A CERO\")";
__c.LogImpl("154788177","MENOR A CERO",0);
 //BA.debugLineNum = 3616;BA.debugLine="consecutivo = consecutivo + 1";
_consecutivo = (int) (_consecutivo+1);
 //BA.debugLineNum = 3617;BA.debugLine="Dim faltantes As Cursor = Starter.skmt.ExecQu";
_faltantes = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_faltantes = (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 PEDIDO WHERE PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"' AND PE_TIPO = 'FALTANTE'"))));
 //BA.debugLineNum = 3618;BA.debugLine="If faltantes.RowCount > 0 Then";
if (_faltantes.getRowCount()>0) { 
 //BA.debugLineNum = 3619;BA.debugLine="faltantes.Position = 0";
_faltantes.setPosition((int) (0));
 //BA.debugLineNum = 3620;BA.debugLine="Starter.skmt.ExecNonQuery($\"update PEDIDO se";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update PEDIDO set PE_CANT = '"+__c.SmartStringFormatter("",(Object)((-1*_restado)))+"', PE_COSTO_TOT= "+__c.SmartStringFormatter("",(Object)((-1*_restado)))+"*"+__c.SmartStringFormatter("",(Object)(_preciofull))+", PE_TIPO = 'SOBRANTE' WHERE PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"' and PE_CLIENTE = '63403' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_faltantes.GetString("CONSECUTIVO")))+"'"));
 }else {
 //BA.debugLineNum = 3622;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO PEDI";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PEDIDO(PE_PROID,PE_PRONOMBRE,PE_CANT,PE_CLIENTEOR,PE_CLIENTE,PE_COSTOU,PE_COSTO_TOT,PE_CAJAS,PE_BCAJAS,CONSECUTIVO,PE_RUTA, PE_TIPO,PE_CEDIS,PE_FECHA,PE_USUARIO,FECHA_PREV,RUTA_REP,PE_REGALO) VALUES (?,?,?,?,?,?,?,0,0,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_idparts[(int) (0)],_idparts[(int) (1)],BA.NumberToString((-1*_restado)),"",_subs._traecliente /*String*/ (ba),_preciofull,BA.NumberToString((-1*((double)(Double.parseDouble(_preciofull))*_restado))),BA.NumberToString(_consecutivo),BA.NumberToString(1000),"SOBRANTE",_subs._traealmacen /*String*/ (ba),_sdate+" "+_stime,_subs._traeusuario /*String*/ (ba),_subs._traefechaprev /*String*/ (ba),_subs._traerutareparto /*String*/ (ba),BA.NumberToString(0)}));
 };
 };
 }else {
 //BA.debugLineNum = 3628;BA.debugLine="Dim restadoanterior As Cursor = Starter.skmt.E";
_restadoanterior = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_restadoanterior = (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 RESTA from PICK_CIEGO WHERE PC_ID_PROD = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"'"))));
 //BA.debugLineNum = 3629;BA.debugLine="restadoanterior.Position = 0";
_restadoanterior.setPosition((int) (0));
 //BA.debugLineNum = 3632;BA.debugLine="If restadoanterior.GetInt(\"RESTA\") > 0 And res";
if (_restadoanterior.GetInt("RESTA")>0 && _restadoanterior.GetInt("RESTA")!=_restado) { 
 //BA.debugLineNum = 3635;BA.debugLine="Dim faltantes As Cursor = Starter.skmt.ExecQu";
_faltantes = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_faltantes = (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 PEDIDO WHERE PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"' AND PE_TIPO = 'FALTANTE'"))));
 //BA.debugLineNum = 3637;BA.debugLine="If faltantes.RowCount > 0 Then";
if (_faltantes.getRowCount()>0) { 
 //BA.debugLineNum = 3638;BA.debugLine="faltantes.Position = 0";
_faltantes.setPosition((int) (0));
 //BA.debugLineNum = 3639;BA.debugLine="Dim preciocat As Cursor = Starter.skmt.ExecQ";
_preciocat = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_preciocat = (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(CAT_GP_PRECIO,0) AS CAT_GP_PRECIO from CAT_GUNAPROD WHERE CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"'"))));
 //BA.debugLineNum = 3640;BA.debugLine="If preciocat.RowCount > 0 Then";
if (_preciocat.getRowCount()>0) { 
 //BA.debugLineNum = 3641;BA.debugLine="preciocat.Position = 0";
_preciocat.setPosition((int) (0));
 //BA.debugLineNum = 3642;BA.debugLine="Dim preciofull As String = preciocat.GetStr";
_preciofull = _preciocat.GetString("CAT_GP_PRECIO");
 };
 //BA.debugLineNum = 3644;BA.debugLine="preciocat.Close";
_preciocat.Close();
 //BA.debugLineNum = 3646;BA.debugLine="Log(\"MAYOR A CERO UPDATE\")";
__c.LogImpl("154788208","MAYOR A CERO UPDATE",0);
 //BA.debugLineNum = 3647;BA.debugLine="Starter.skmt.ExecNonQuery2(\"Update PICK_CIEG";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("Update PICK_CIEGO set PC_CANT = ?, RESTA = ?  WHERE PC_ID_PROD = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_inputtext,BA.NumberToString(_restado),_idparts[(int) (0)]}));
 //BA.debugLineNum = 3648;BA.debugLine="If restado > 0 Then";
if (_restado>0) { 
 //BA.debugLineNum = 3649;BA.debugLine="Log(\"AQUI ES FALTANTE\")";
__c.LogImpl("154788211","AQUI ES FALTANTE",0);
 //BA.debugLineNum = 3651;BA.debugLine="Starter.skmt.ExecNonQuery($\"update PEDIDO s";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update PEDIDO set PE_CANT = '"+__c.SmartStringFormatter("",(Object)(_restado))+"', PE_COSTO_TOT= '"+__c.SmartStringFormatter("",(Object)(_restado))+"'*'"+__c.SmartStringFormatter("",(Object)(_preciofull))+"', PE_TIPO = 'FALTANTE' WHERE PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"' and PE_CLIENTE = '63403' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_faltantes.GetString("CONSECUTIVO")))+"'"));
 }else if(_restado<0) { 
 //BA.debugLineNum = 3653;BA.debugLine="Log(\"AQUI ES SOBRANTE\")";
__c.LogImpl("154788215","AQUI ES SOBRANTE",0);
 //BA.debugLineNum = 3655;BA.debugLine="Starter.skmt.ExecNonQuery($\"update PEDIDO s";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update PEDIDO set PE_CANT = '"+__c.SmartStringFormatter("",(Object)((-1*_restado)))+"', PE_COSTO_TOT= "+__c.SmartStringFormatter("",(Object)((-1*_restado)))+"*"+__c.SmartStringFormatter("",(Object)(_preciofull))+", PE_TIPO = 'SOBRANTE' WHERE PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"' and PE_CLIENTE = '63403' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_faltantes.GetString("CONSECUTIVO")))+"'"));
 }else if(_restado==0) { 
 //BA.debugLineNum = 3657;BA.debugLine="Log(\"AQUI ES SOBRANTE\")";
__c.LogImpl("154788219","AQUI ES SOBRANTE",0);
 //BA.debugLineNum = 3658;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from PED";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from PEDIDO where PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"' and PE_CLIENTE = '63403' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_faltantes.GetString("CONSECUTIVO")))+"'"));
 };
 };
 }else if(_restadoanterior.GetInt("RESTA")<0 && _restadoanterior.GetInt("RESTA")!=_restado) { 
 //BA.debugLineNum = 3664;BA.debugLine="Log(\"es sobrante\")";
__c.LogImpl("154788226","es sobrante",0);
 //BA.debugLineNum = 3665;BA.debugLine="Dim sobrantes As Cursor = Starter.skmt.ExecQu";
_sobrantes = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_sobrantes = (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 PEDIDO WHERE PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"' AND PE_TIPO = 'SOBRANTE'"))));
 //BA.debugLineNum = 3666;BA.debugLine="If sobrantes.RowCount > 0 Then";
if (_sobrantes.getRowCount()>0) { 
 //BA.debugLineNum = 3667;BA.debugLine="sobrantes.Position = 0";
_sobrantes.setPosition((int) (0));
 //BA.debugLineNum = 3669;BA.debugLine="Dim preciocat As Cursor = Starter.skmt.ExecQ";
_preciocat = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_preciocat = (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(CAT_GP_PRECIO,0) AS CAT_GP_PRECIO from CAT_GUNAPROD WHERE CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"'"))));
 //BA.debugLineNum = 3670;BA.debugLine="If preciocat.RowCount > 0 Then";
if (_preciocat.getRowCount()>0) { 
 //BA.debugLineNum = 3671;BA.debugLine="preciocat.Position = 0";
_preciocat.setPosition((int) (0));
 //BA.debugLineNum = 3672;BA.debugLine="Dim preciofull As String = preciocat.GetStr";
_preciofull = _preciocat.GetString("CAT_GP_PRECIO");
 };
 //BA.debugLineNum = 3674;BA.debugLine="preciocat.Close";
_preciocat.Close();
 //BA.debugLineNum = 3676;BA.debugLine="Log(\"MENOR A CERO UPDATE\")";
__c.LogImpl("154788238","MENOR A CERO UPDATE",0);
 //BA.debugLineNum = 3677;BA.debugLine="Starter.skmt.ExecNonQuery2(\"Update PICK_CIEG";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("Update PICK_CIEGO set PC_CANT = ?, RESTA = ?  WHERE PC_ID_PROD = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_inputtext,BA.NumberToString(_restado),_idparts[(int) (0)]}));
 //BA.debugLineNum = 3678;BA.debugLine="If restado > 0 Then";
if (_restado>0) { 
 //BA.debugLineNum = 3681;BA.debugLine="Starter.skmt.ExecNonQuery($\"update PEDIDO s";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update PEDIDO set PE_CANT = '"+__c.SmartStringFormatter("",(Object)(_restado))+"', PE_COSTO_TOT= '"+__c.SmartStringFormatter("",(Object)(_restado))+"'*'"+__c.SmartStringFormatter("",(Object)(_preciofull))+"', PE_TIPO = 'FALTANTE' WHERE PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"' and PE_CLIENTE = '63403' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_sobrantes.GetString("CONSECUTIVO")))+"'"));
 }else if(_restado<0) { 
 //BA.debugLineNum = 3685;BA.debugLine="Starter.skmt.ExecNonQuery($\"update PEDIDO s";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update PEDIDO set PE_CANT = '"+__c.SmartStringFormatter("",(Object)(-1*_restado))+"', PE_COSTO_TOT= '"+__c.SmartStringFormatter("",(Object)(-1*_restado))+"'*'"+__c.SmartStringFormatter("",(Object)(_preciofull))+"', PE_TIPO = 'SOBRANTE' WHERE PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"' and PE_CLIENTE = '63403' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_sobrantes.GetString("CONSECUTIVO")))+"'"));
 }else if(_restado==0) { 
 //BA.debugLineNum = 3687;BA.debugLine="Log(\"a eliminar\")";
__c.LogImpl("154788249","a eliminar",0);
 //BA.debugLineNum = 3688;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from PED";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from PEDIDO where PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"' and PE_CLIENTE = '63403' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_sobrantes.GetString("CONSECUTIVO")))+"'"));
 };
 };
 }else if(_restadoanterior.GetInt("RESTA")==0 && _restadoanterior.GetInt("RESTA")!=_restado) { 
 //BA.debugLineNum = 3693;BA.debugLine="Starter.skmt.ExecNonQuery2(\"Update PICK_CIEGO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("Update PICK_CIEGO set PC_CANT = ?, RESTA = ?  WHERE PC_ID_PROD = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_inputtext,BA.NumberToString(_restado),_idparts[(int) (0)]}));
 //BA.debugLineNum = 3694;BA.debugLine="If restado > 0 And inputText <> 0 Then";
if (_restado>0 && (_inputtext).equals(BA.NumberToString(0)) == false) { 
 //BA.debugLineNum = 3696;BA.debugLine="Dim preciocat As Cursor = Starter.skmt.ExecQ";
_preciocat = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_preciocat = (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(CAT_GP_PRECIO,0) AS CAT_GP_PRECIO from CAT_GUNAPROD WHERE CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"'"))));
 //BA.debugLineNum = 3697;BA.debugLine="If preciocat.RowCount > 0 Then";
if (_preciocat.getRowCount()>0) { 
 //BA.debugLineNum = 3698;BA.debugLine="preciocat.Position = 0";
_preciocat.setPosition((int) (0));
 //BA.debugLineNum = 3699;BA.debugLine="Dim preciofull As String = preciocat.GetStr";
_preciofull = _preciocat.GetString("CAT_GP_PRECIO");
 };
 //BA.debugLineNum = 3701;BA.debugLine="preciocat.Close";
_preciocat.Close();
 //BA.debugLineNum = 3702;BA.debugLine="Log(\"MAYOR A CERO\")";
__c.LogImpl("154788264","MAYOR A CERO",0);
 //BA.debugLineNum = 3703;BA.debugLine="consecutivo = consecutivo + 1";
_consecutivo = (int) (_consecutivo+1);
 //BA.debugLineNum = 3704;BA.debugLine="Dim faltantes As Cursor = Starter.skmt.ExecQ";
_faltantes = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_faltantes = (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 PEDIDO WHERE PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"' AND PE_TIPO = 'FALTANTE'"))));
 //BA.debugLineNum = 3705;BA.debugLine="If faltantes.RowCount > 0 Then";
if (_faltantes.getRowCount()>0) { 
 //BA.debugLineNum = 3706;BA.debugLine="faltantes.Position = 0";
_faltantes.setPosition((int) (0));
 //BA.debugLineNum = 3707;BA.debugLine="Starter.skmt.ExecNonQuery($\"update PEDIDO s";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update PEDIDO set PE_CANT = '"+__c.SmartStringFormatter("",(Object)(_restado))+"', PE_COSTO_TOT= '"+__c.SmartStringFormatter("",(Object)(_restado))+"'*'"+__c.SmartStringFormatter("",(Object)(_preciofull))+"', PE_TIPO = 'FALTANTE' WHERE PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"' and PE_CLIENTE = '63403' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_faltantes.GetString("CONSECUTIVO")))+"'"));
 }else {
 //BA.debugLineNum = 3709;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO PED";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PEDIDO(PE_PROID,PE_PRONOMBRE,PE_CANT,PE_CLIENTEOR,PE_CLIENTE,PE_COSTOU,PE_COSTO_TOT,PE_CAJAS,PE_BCAJAS,CONSECUTIVO,PE_RUTA, PE_TIPO,PE_CEDIS,PE_FECHA,PE_USUARIO,FECHA_PREV,RUTA_REP,PE_REGALO) VALUES (?,?,?,?,?,?,?,0,0,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_idparts[(int) (0)],_idparts[(int) (1)],BA.NumberToString(_restado),"",_subs._traecliente /*String*/ (ba),_preciofull,BA.NumberToString(((double)(Double.parseDouble(_preciofull))*_restado)),BA.NumberToString(_consecutivo),BA.NumberToString(1000),"FALTANTE",_subs._traealmacen /*String*/ (ba),_sdate+" "+_stime,_subs._traeusuario /*String*/ (ba),_subs._traefechaprev /*String*/ (ba),_subs._traerutareparto /*String*/ (ba),BA.NumberToString(0)}));
 };
 }else if(_restado<0 && (_inputtext).equals(BA.NumberToString(0)) == false) { 
 //BA.debugLineNum = 3713;BA.debugLine="Dim preciocat As Cursor = Starter.skmt.ExecQ";
_preciocat = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_preciocat = (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(CAT_GP_PRECIO,0) AS CAT_GP_PRECIO from CAT_GUNAPROD WHERE CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"'"))));
 //BA.debugLineNum = 3714;BA.debugLine="If preciocat.RowCount > 0 Then";
if (_preciocat.getRowCount()>0) { 
 //BA.debugLineNum = 3715;BA.debugLine="preciocat.Position = 0";
_preciocat.setPosition((int) (0));
 //BA.debugLineNum = 3716;BA.debugLine="Dim preciofull As String = preciocat.GetStr";
_preciofull = _preciocat.GetString("CAT_GP_PRECIO");
 };
 //BA.debugLineNum = 3718;BA.debugLine="preciocat.Close";
_preciocat.Close();
 //BA.debugLineNum = 3719;BA.debugLine="Log(\"MENOR A CERO\")";
__c.LogImpl("154788281","MENOR A CERO",0);
 //BA.debugLineNum = 3720;BA.debugLine="consecutivo = consecutivo + 1";
_consecutivo = (int) (_consecutivo+1);
 //BA.debugLineNum = 3721;BA.debugLine="Dim faltantes As Cursor = Starter.skmt.ExecQ";
_faltantes = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_faltantes = (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 PEDIDO WHERE PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"' AND PE_TIPO = 'FALTANTE'"))));
 //BA.debugLineNum = 3722;BA.debugLine="If faltantes.RowCount > 0 Then";
if (_faltantes.getRowCount()>0) { 
 //BA.debugLineNum = 3723;BA.debugLine="faltantes.Position = 0";
_faltantes.setPosition((int) (0));
 //BA.debugLineNum = 3724;BA.debugLine="Starter.skmt.ExecNonQuery($\"update PEDIDO s";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update PEDIDO set PE_CANT = '"+__c.SmartStringFormatter("",(Object)((-1*_restado)))+"', PE_COSTO_TOT= "+__c.SmartStringFormatter("",(Object)((-1*_restado)))+"*"+__c.SmartStringFormatter("",(Object)(_preciofull))+", PE_TIPO = 'SOBRANTE' WHERE PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"' and PE_CLIENTE = '63403' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_faltantes.GetString("CONSECUTIVO")))+"'"));
 }else {
 //BA.debugLineNum = 3726;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO PED";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PEDIDO(PE_PROID,PE_PRONOMBRE,PE_CANT,PE_CLIENTEOR,PE_CLIENTE,PE_COSTOU,PE_COSTO_TOT,PE_CAJAS,PE_BCAJAS,CONSECUTIVO,PE_RUTA, PE_TIPO,PE_CEDIS,PE_FECHA,PE_USUARIO,FECHA_PREV,RUTA_REP,PE_REGALO) VALUES (?,?,?,?,?,?,?,0,0,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_idparts[(int) (0)],_idparts[(int) (1)],BA.NumberToString((-1*_restado)),"",_subs._traecliente /*String*/ (ba),_preciofull,BA.NumberToString((-1*((double)(Double.parseDouble(_preciofull))*_restado))),BA.NumberToString(_consecutivo),BA.NumberToString(1000),"SOBRANTE",_subs._traealmacen /*String*/ (ba),_sdate+" "+_stime,_subs._traeusuario /*String*/ (ba),_subs._traefechaprev /*String*/ (ba),_subs._traerutareparto /*String*/ (ba),BA.NumberToString(0)}));
 };
 };
 }else if(_restadoanterior.GetInt("RESTA")==0 && _restado==0) { 
 //BA.debugLineNum = 3730;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from PEDID";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from PEDIDO where PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"' and PE_CLIENTE = '63403' AND PE_TIPO NOT IN ('DANADO') "));
 };
 };
 }else if((_inputtext).equals("") || (_inputtext).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 3734;BA.debugLine="Log(\"IMPUT IGUAL DE CERO\")";
__c.LogImpl("154788296","IMPUT IGUAL DE CERO",0);
 //BA.debugLineNum = 3735;BA.debugLine="Log(idParts(0))";
__c.LogImpl("154788297",_idparts[(int) (0)],0);
 //BA.debugLineNum = 3736;BA.debugLine="Log(cantidadrestar)";
__c.LogImpl("154788298",_cantidadrestar,0);
 //BA.debugLineNum = 3737;BA.debugLine="Log(inputText)";
__c.LogImpl("154788299",_inputtext,0);
 //BA.debugLineNum = 3738;BA.debugLine="Dim restado As Int = cantidadrestar - inputText";
_restado = (int) ((double)(Double.parseDouble(_cantidadrestar))-(double)(Double.parseDouble(_inputtext)));
 //BA.debugLineNum = 3739;BA.debugLine="Log(cantidadrestar - inputText)";
__c.LogImpl("154788301",BA.NumberToString((double)(Double.parseDouble(_cantidadrestar))-(double)(Double.parseDouble(_inputtext))),0);
 //BA.debugLineNum = 3740;BA.debugLine="Dim faltantes As Cursor = Starter.skmt.ExecQuer";
_faltantes = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_faltantes = (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 * FROM PICK_CIEGO where PC_ID_PROD = ?",new String[]{_idparts[(int) (0)]})));
 //BA.debugLineNum = 3741;BA.debugLine="If faltantes.RowCount > 0 Then";
if (_faltantes.getRowCount()>0) { 
 //BA.debugLineNum = 3742;BA.debugLine="faltantes.Position = 0";
_faltantes.setPosition((int) (0));
 //BA.debugLineNum = 3743;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from PICK_C";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from PICK_CIEGO where  PC_ID_PROD = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"'"));
 };
 //BA.debugLineNum = 3746;BA.debugLine="Dim sobrantes As Cursor = Starter.skmt.ExecQuer";
_sobrantes = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_sobrantes = (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 PEDIDO WHERE PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"' and PE_CLIENTE = '63403'"))));
 //BA.debugLineNum = 3747;BA.debugLine="If sobrantes.RowCount > 0 Then";
if (_sobrantes.getRowCount()>0) { 
 //BA.debugLineNum = 3748;BA.debugLine="sobrantes.Position = 0";
_sobrantes.setPosition((int) (0));
 //BA.debugLineNum = 3749;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from PEDIDO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from PEDIDO where PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"' and PE_CLIENTE = '63403' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_sobrantes.GetString("CONSECUTIVO")))+"'"));
 };
 //BA.debugLineNum = 3752;BA.debugLine="Dim preciocat As Cursor = Starter.skmt.ExecQuer";
_preciocat = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_preciocat = (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(CAT_GP_PRECIO,0) AS CAT_GP_PRECIO from CAT_GUNAPROD WHERE CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_idparts[(int) (0)]))+"'"))));
 //BA.debugLineNum = 3753;BA.debugLine="If preciocat.RowCount > 0 Then";
if (_preciocat.getRowCount()>0) { 
 //BA.debugLineNum = 3754;BA.debugLine="preciocat.Position = 0";
_preciocat.setPosition((int) (0));
 //BA.debugLineNum = 3755;BA.debugLine="Dim preciofull As String = preciocat.GetString";
_preciofull = _preciocat.GetString("CAT_GP_PRECIO");
 };
 //BA.debugLineNum = 3757;BA.debugLine="preciocat.Close";
_preciocat.Close();
 //BA.debugLineNum = 3758;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO PEDIDO(";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PEDIDO(PE_PROID,PE_PRONOMBRE,PE_CANT,PE_CLIENTEOR,PE_CLIENTE,PE_COSTOU,PE_COSTO_TOT,PE_CAJAS,PE_BCAJAS,CONSECUTIVO,PE_RUTA, PE_TIPO,PE_CEDIS,PE_FECHA,PE_USUARIO,FECHA_PREV,RUTA_REP,PE_REGALO) VALUES (?,?,?,?,?,?,?,0,0,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_idparts[(int) (0)],_idparts[(int) (1)],BA.NumberToString(_restado),"",_subs._traecliente /*String*/ (ba),_preciofull,BA.NumberToString(((double)(Double.parseDouble(_preciofull))*_restado)),BA.NumberToString(_consecutivo),BA.NumberToString(1000),"FALTANTE",_subs._traealmacen /*String*/ (ba),_sdate+" "+_stime,_subs._traeusuario /*String*/ (ba),_subs._traefechaprev /*String*/ (ba),_subs._traerutareparto /*String*/ (ba),BA.NumberToString(0)}));
 };
 //BA.debugLineNum = 3761;BA.debugLine="f.Close";
_f.Close();
 //BA.debugLineNum = 3762;BA.debugLine="a.Close";
_a.Close();
 //BA.debugLineNum = 3763;BA.debugLine="Log(\"Processed item \" & i)";
__c.LogImpl("154788325","Processed item "+BA.NumberToString(_i),0);
 }
};
 //BA.debugLineNum = 3766;BA.debugLine="P_CIEGO.Visible = False";
_p_ciego.setVisible(__c.False);
 //BA.debugLineNum = 3767;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 //BA.debugLineNum = 3768;BA.debugLine="End Sub";
return "";
}
public String  _b_venta_emp_click() throws Exception{
 //BA.debugLineNum = 3036;BA.debugLine="Private Sub b_venta_emp_Click";
 //BA.debugLineNum = 3038;BA.debugLine="p_validacion.Visible = True";
_p_validacion.setVisible(__c.True);
 //BA.debugLineNum = 3039;BA.debugLine="p_validacion.Width = Root.Width";
_p_validacion.setWidth(_root.getWidth());
 //BA.debugLineNum = 3040;BA.debugLine="p_validacion.Height = Root.Height";
_p_validacion.setHeight(_root.getHeight());
 //BA.debugLineNum = 3042;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 _restafaltante = null;
double _rescant8 = 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;
anywheresoftware.b4a.sql.SQL.CursorWrapper _pagarescobrados = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _pagaresnuevos = null;
 //BA.debugLineNum = 213;BA.debugLine="Sub B4XPage_Appear";
 //BA.debugLineNum = 215;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 = 216;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 217;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 = 220;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 = 221;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 222;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 = 224;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 = 225;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 226;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 = 229;BA.debugLine="b_check.visible = False";
_b_check.setVisible(__c.False);
 //BA.debugLineNum = 230;BA.debugLine="Subs.centraPanel(p_principal, Root.Width)";
_subs._centrapanel /*String*/ (ba,_p_principal,_root.getWidth());
 //BA.debugLineNum = 243;BA.debugLine="If EJECUTANDO = 0 Then";
if ((_ejecutando).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 244;BA.debugLine="Listo1 = 0";
_listo1 = BA.NumberToString(0);
 //BA.debugLineNum = 245;BA.debugLine="Listo2 = 0";
_listo2 = BA.NumberToString(0);
 //BA.debugLineNum = 246;BA.debugLine="Listo3 = 0";
_listo3 = BA.NumberToString(0);
 //BA.debugLineNum = 247;BA.debugLine="Listo4 = 0";
_listo4 = BA.NumberToString(0);
 //BA.debugLineNum = 248;BA.debugLine="Listo5 = 0";
_listo5 = BA.NumberToString(0);
 //BA.debugLineNum = 249;BA.debugLine="inve = 0";
_inve = BA.NumberToString(0);
 //BA.debugLineNum = 250;BA.debugLine="img2.Visible =False";
_img2.setVisible(__c.False);
 };
 //BA.debugLineNum = 252;BA.debugLine="l_ruta.Text = 0";
_l_ruta.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 253;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 = 254;BA.debugLine="If f.RowCount > 0 Then";
if (_f.getRowCount()>0) { 
 //BA.debugLineNum = 255;BA.debugLine="f.Position = 0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 256;BA.debugLine="l_ruta.Text = f.GetString(\"RUTAA\")";
_l_ruta.setText(BA.ObjectToCharSequence(_f.GetString("RUTAA")));
 };
 //BA.debugLineNum = 258;BA.debugLine="f.Close";
_f.Close();
 //BA.debugLineNum = 259;BA.debugLine="If l_ruta.Text = 0 Then";
if ((_l_ruta.getText()).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 260;BA.debugLine="l_ruta.Text = 0";
_l_ruta.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 261;BA.debugLine="l_rutasP.Text = 0";
_l_rutasp.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 262;BA.debugLine="l_numtickets.Text = 0";
_l_numtickets.setText(BA.ObjectToCharSequence(0));
 }else {
 //BA.debugLineNum = 264;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 = 266;BA.debugLine="l_rutasP.Text = \"\"";
_l_rutasp.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 267;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 = 268;BA.debugLine="f.Position = i";
_f.setPosition(_i);
 //BA.debugLineNum = 269;BA.debugLine="If i = 0 Then";
if (_i==0) { 
 //BA.debugLineNum = 270;BA.debugLine="l_rutasP.Text = f.GetString(\"CAT_CL_RUTA\")";
_l_rutasp.setText(BA.ObjectToCharSequence(_f.GetString("CAT_CL_RUTA")));
 }else {
 //BA.debugLineNum = 272;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 = 275;BA.debugLine="f.Close";
_f.Close();
 //BA.debugLineNum = 277;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 = 278;BA.debugLine="numticks.Position = 0";
_numticks.setPosition((int) (0));
 //BA.debugLineNum = 279;BA.debugLine="l_numtickets.Text = numticks.GetInt(\"TICKET\")";
_l_numtickets.setText(BA.ObjectToCharSequence(_numticks.GetInt("TICKET")));
 };
 //BA.debugLineNum = 281;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 282;BA.debugLine="fecha=DateTime.Date(DateTime.Now)";
_fecha = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 283;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 = 284;BA.debugLine="b.Position=0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 285;BA.debugLine="If b.RowCount > 0 Then Cuantos = b.GetString(\"CUA";
if (_b.getRowCount()>0) { 
_cuantos = _b.GetString("CUANTOS");};
 //BA.debugLineNum = 286;BA.debugLine="d=Starter.skmt.ExecQuery(\"select count(distinct(C";
_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(distinct(CAT_CL_CODIGO)) as TOTAL_VISITAR from kmt_info where gestion = 0 AND CAT_CL_RUTA <> 1000")));
 //BA.debugLineNum = 287;BA.debugLine="D.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 288;BA.debugLine="b.Close";
_b.Close();
 //BA.debugLineNum = 289;BA.debugLine="e=Starter.skmt.ExecQuery(\"select count(distinct(C";
_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(distinct(CAT_CL_CODIGO)) as POR_VISITAR from kmt_info WHERE CAT_CL_RUTA <> 1000")));
 //BA.debugLineNum = 290;BA.debugLine="e.Position=0";
_e.setPosition((int) (0));
 //BA.debugLineNum = 301;BA.debugLine="cargar.Visible = False";
_cargar.setVisible(__c.False);
 //BA.debugLineNum = 302;BA.debugLine="Subir.Visible = False";
_subir.setVisible(__c.False);
 //BA.debugLineNum = 303;BA.debugLine="connecta.Visible = True";
_connecta.setVisible(__c.True);
 //BA.debugLineNum = 305;BA.debugLine="If Cuantos = 0 Then";
if ((_cuantos).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 307;BA.debugLine="l_cuantosc.Text = 0";
_l_cuantosc.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 308;BA.debugLine="l_cuantosn.Text = 0";
_l_cuantosn.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 309;BA.debugLine="drop = 0";
_drop = 0;
 //BA.debugLineNum = 310;BA.debugLine="l_montoSalida.Text = 0";
_l_montosalida.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 311;BA.debugLine="efectiva = 0";
_efectiva = 0;
 //BA.debugLineNum = 314;BA.debugLine="L_MONTOE.Text = 0";
_l_montoe.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 315;BA.debugLine="l_ctast.Text = 0";
_l_ctast.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 316;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 = 317;BA.debugLine="l_porvisitar.Text = 0";
_l_porvisitar.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 318;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 = 319;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 320;BA.debugLine="e.Close";
_e.Close();
 }else {
 //BA.debugLineNum = 322;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 = 323;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 = 324;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 = 326;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 NOT IN ('63403', '100000')")));
 //BA.debugLineNum = 328;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 NOT IN ('63403', '100000')")));
 //BA.debugLineNum = 329;BA.debugLine="f2.Position=0";
_f2.setPosition((int) (0));
 //BA.debugLineNum = 332;BA.debugLine="Private MONTO_REC_DIA = 0";
_monto_rec_dia = BA.NumberToString(0);
 //BA.debugLineNum = 333;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 = 344;BA.debugLine="C.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 345;BA.debugLine="b.Position = 0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 346;BA.debugLine="L.Position = 0";
_l.setPosition((int) (0));
 //BA.debugLineNum = 347;BA.debugLine="f1.Position = 0";
_f1.setPosition((int) (0));
 //BA.debugLineNum = 350;BA.debugLine="L_MONTOE.Text = 0";
_l_montoe.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 352;BA.debugLine="l_cuantosc.Text = 0";
_l_cuantosc.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 353;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 = 354;BA.debugLine="l_cuantosn.Text = 0";
_l_cuantosn.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 355;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 = 357;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 = 359;BA.debugLine="l_ctast.Text = 0";
_l_ctast.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 360;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 = 361;BA.debugLine="l_porvisitar.Text = 0";
_l_porvisitar.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 362;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 = 363;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 364;BA.debugLine="b.Close";
_b.Close();
 //BA.debugLineNum = 375;BA.debugLine="c.Close";
_c.Close();
 };
 //BA.debugLineNum = 377;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 = 378;BA.debugLine="C.Position =0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 379;BA.debugLine="ALMACEN = 0";
_almacen = BA.NumberToString(0);
 //BA.debugLineNum = 380;BA.debugLine="If C.RowCount > 0 Then ALMACEN = C.GetString(\"ID_";
if (_c.getRowCount()>0) { 
_almacen = _c.GetString("ID_ALMACEN");};
 //BA.debugLineNum = 381;BA.debugLine="B4XPages.MainPage.almacen = ALMACEN";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._almacen /*String*/  = _almacen;
 //BA.debugLineNum = 382;BA.debugLine="C.Close";
_c.Close();
 //BA.debugLineNum = 383;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 = 385;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 386;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step112 = 1;
final int limit112 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit112 ;_i = _i + step112 ) {
 //BA.debugLineNum = 387;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 388;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 389;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 390;BA.debugLine="cmd.Name = \"insert_gps_actual_REP\"";
_cmd.Name /*String*/  = "insert_gps_actual_REP";
 //BA.debugLineNum = 391;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 = 395;BA.debugLine="bu.Initialize";
_bu._initialize /*String*/ (ba);
 //BA.debugLineNum = 396;BA.debugLine="batterystatus = bu.BatteryInformation";
_batterystatus = _bu._getbatteryinformation /*int[]*/ ();
 //BA.debugLineNum = 398;BA.debugLine="B4XPages.MainPage.batt = batterystatus(0)";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._batt /*int*/  = _batterystatus[(int) (0)];
 //BA.debugLineNum = 399;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 = 400;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 401;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 402;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 403;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 = 404;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 405;BA.debugLine="RUTA_T = 0";
_ruta_t = BA.NumberToString(0);
 //BA.debugLineNum = 406;BA.debugLine="If c.RowCount > 0 Then RUTA_T = c.GetString(\"RUTA";
if (_c.getRowCount()>0) { 
_ruta_t = _c.GetString("RUTAA");};
 //BA.debugLineNum = 407;BA.debugLine="B4XPages.MainPage.rutaPreventa = RUTA_T";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._rutapreventa /*String*/  = _ruta_t;
 //BA.debugLineNum = 408;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 409;BA.debugLine="reqs.Initialize";
_reqs.Initialize();
 //BA.debugLineNum = 411;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 = 413;BA.debugLine="If rc.RowCount > 0 Then";
if (_rc.getRowCount()>0) { 
 //BA.debugLineNum = 414;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from RECHAZOS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from RECHAZOS"));
 //BA.debugLineNum = 415;BA.debugLine="For i3=0 To rc.RowCount -1 'Copiamos los rechazo";
{
final int step137 = 1;
final int limit137 = (int) (_rc.getRowCount()-1);
_i3 = (int) (0) ;
for (;_i3 <= limit137 ;_i3 = _i3 + step137 ) {
 //BA.debugLineNum = 416;BA.debugLine="rc.Position = i3";
_rc.setPosition(_i3);
 //BA.debugLineNum = 419;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 = 422;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 = 424;BA.debugLine="If vc.RowCount > 0 Then";
if (_vc.getRowCount()>0) { 
 //BA.debugLineNum = 425;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from VENTAS\"$";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from VENTAS"));
 //BA.debugLineNum = 426;BA.debugLine="For i4=0 To vc.RowCount -1 'Copiamos las ventas";
{
final int step145 = 1;
final int limit145 = (int) (_vc.getRowCount()-1);
_i4 = (int) (0) ;
for (;_i4 <= limit145 ;_i4 = _i4 + step145 ) {
 //BA.debugLineNum = 427;BA.debugLine="vc.Position = i4";
_vc.setPosition(_i4);
 //BA.debugLineNum = 430;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 = 433;BA.debugLine="Starter.ENVIA_ULTIMA_GPS";
_starter._envia_ultima_gps /*String*/ ();
 //BA.debugLineNum = 438;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 = 439;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 = 440;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 = 443;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 = 444;BA.debugLine="If cancelrecha.RowCount > 0 Then";
if (_cancelrecha.getRowCount()>0) { 
 //BA.debugLineNum = 445;BA.debugLine="For h54 = 0 To cancelrecha.RowCount - 1";
{
final int step156 = 1;
final int limit156 = (int) (_cancelrecha.getRowCount()-1);
_h54 = (int) (0) ;
for (;_h54 <= limit156 ;_h54 = _h54 + step156 ) {
 //BA.debugLineNum = 446;BA.debugLine="cancelrecha.Position = h54";
_cancelrecha.setPosition(_h54);
 //BA.debugLineNum = 447;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 = 450;BA.debugLine="cancelrecha.Close";
_cancelrecha.Close();
 //BA.debugLineNum = 454;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 = 456;BA.debugLine="Private rescant As String = 0";
_rescant = BA.NumberToString(0);
 //BA.debugLineNum = 457;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 458;BA.debugLine="For j4 = 0 To r5.RowCount -1";
{
final int step165 = 1;
final int limit165 = (int) (_r5.getRowCount()-1);
_j4 = (int) (0) ;
for (;_j4 <= limit165 ;_j4 = _j4 + step165 ) {
 //BA.debugLineNum = 459;BA.debugLine="r5.Position = j4";
_r5.setPosition(_j4);
 //BA.debugLineNum = 460;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")))+"' AND PE_TIPO NOT IN ('DANADO','FALTANTE','SOBRANTE')"))));
 //BA.debugLineNum = 461;BA.debugLine="Dim totalcantped As String";
_totalcantped = "";
 //BA.debugLineNum = 462;BA.debugLine="If r6.RowCount > 0 Then";
if (_r6.getRowCount()>0) { 
 //BA.debugLineNum = 463;BA.debugLine="r6.Position = 0";
_r6.setPosition((int) (0));
 //BA.debugLineNum = 464;BA.debugLine="totalcantped = r6.GetString(\"PE_CANT\")";
_totalcantped = _r6.GetString("PE_CANT");
 }else {
 //BA.debugLineNum = 467;BA.debugLine="totalcantped = 0";
_totalcantped = BA.NumberToString(0);
 };
 //BA.debugLineNum = 470;BA.debugLine="Log(r5.GetString(\"HVD_RECHAZOCANT\") &\" - \"& tot";
__c.LogImpl("152363521",_r5.GetString("HVD_RECHAZOCANT")+" - "+_totalcantped,0);
 //BA.debugLineNum = 471;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 = 473;BA.debugLine="r6.Close";
_r6.Close();
 }
};
 };
 //BA.debugLineNum = 476;BA.debugLine="If rescant = \"NaN\" Then rescant = 0";
if ((_rescant).equals("NaN")) { 
_rescant = BA.NumberToString(0);};
 //BA.debugLineNum = 477;BA.debugLine="LogColor(rescant,Colors.Red)";
__c.LogImpl("152363528",_rescant,__c.Colors.Red);
 //BA.debugLineNum = 478;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 482;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 = 486;BA.debugLine="Private rescant2 As Double = 0";
_rescant2 = 0;
 //BA.debugLineNum = 487;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 488;BA.debugLine="For j5 = 0 To r5.RowCount -1";
{
final int step186 = 1;
final int limit186 = (int) (_r5.getRowCount()-1);
_j5 = (int) (0) ;
for (;_j5 <= limit186 ;_j5 = _j5 + step186 ) {
 //BA.debugLineNum = 489;BA.debugLine="r5.Position = j5";
_r5.setPosition(_j5);
 //BA.debugLineNum = 490;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")))+"' AND PE_TIPO NOT IN ('DANADO','FALTANTE','SOBRANTE')"))));
 //BA.debugLineNum = 491;BA.debugLine="r6.Position = 0";
_r6.setPosition((int) (0));
 //BA.debugLineNum = 493;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 = 494;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 = 495;BA.debugLine="r6.Close";
_r6.Close();
 }
};
 };
 //BA.debugLineNum = 498;BA.debugLine="If rescant2 = \"NaN\" Then rescant2 = 0";
if (_rescant2==(double)(Double.parseDouble("NaN"))) { 
_rescant2 = 0;};
 //BA.debugLineNum = 499;BA.debugLine="Log(rescant2)";
__c.LogImpl("152363550",BA.NumberToString(_rescant2),0);
 //BA.debugLineNum = 500;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 505;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 = 507;BA.debugLine="Private rescantr As String = 0";
_rescantr = BA.NumberToString(0);
 //BA.debugLineNum = 508;BA.debugLine="If r5r.RowCount > 0 Then";
if (_r5r.getRowCount()>0) { 
 //BA.debugLineNum = 509;BA.debugLine="For j4r = 0 To r5r.RowCount -1";
{
final int step201 = 1;
final int limit201 = (int) (_r5r.getRowCount()-1);
_j4r = (int) (0) ;
for (;_j4r <= limit201 ;_j4r = _j4r + step201 ) {
 //BA.debugLineNum = 510;BA.debugLine="r5r.Position = j4r";
_r5r.setPosition(_j4r);
 //BA.debugLineNum = 511;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")))+"' AND PE_TIPO NOT IN ('DANADO','FALTANTE','SOBRANTE') "))));
 //BA.debugLineNum = 512;BA.debugLine="r6r.Position = 0";
_r6r.setPosition((int) (0));
 //BA.debugLineNum = 515;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 = 516;BA.debugLine="r6r.Close";
_r6r.Close();
 }
};
 };
 //BA.debugLineNum = 519;BA.debugLine="If rescantr = \"NaN\" Then rescantr = 0";
if ((_rescantr).equals("NaN")) { 
_rescantr = BA.NumberToString(0);};
 //BA.debugLineNum = 521;BA.debugLine="r5r.Close";
_r5r.Close();
 //BA.debugLineNum = 523;BA.debugLine="Log(rescantr)";
__c.LogImpl("152363574",_rescantr,0);
 //BA.debugLineNum = 525;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 = 529;BA.debugLine="Private rescant2r As String = 0";
_rescant2r = BA.NumberToString(0);
 //BA.debugLineNum = 530;BA.debugLine="If r5r.RowCount > 0 Then";
if (_r5r.getRowCount()>0) { 
 //BA.debugLineNum = 531;BA.debugLine="For j5r = 0 To r5r.RowCount -1";
{
final int step215 = 1;
final int limit215 = (int) (_r5r.getRowCount()-1);
_j5r = (int) (0) ;
for (;_j5r <= limit215 ;_j5r = _j5r + step215 ) {
 //BA.debugLineNum = 532;BA.debugLine="r5r.Position = j5r";
_r5r.setPosition(_j5r);
 //BA.debugLineNum = 533;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")))+"' AND PE_TIPO NOT IN ('DANADO','FALTANTE','SOBRANTE')"))));
 //BA.debugLineNum = 534;BA.debugLine="r6r.Position = 0";
_r6r.setPosition((int) (0));
 //BA.debugLineNum = 536;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 = 537;BA.debugLine="r6r.Close";
_r6r.Close();
 }
};
 };
 //BA.debugLineNum = 540;BA.debugLine="If rescant2r = \"NaN\" Then rescant2r = 0";
if ((_rescant2r).equals("NaN")) { 
_rescant2r = BA.NumberToString(0);};
 //BA.debugLineNum = 542;BA.debugLine="r5r.Close";
_r5r.Close();
 //BA.debugLineNum = 543;BA.debugLine="Log(rescant2r)";
__c.LogImpl("152363594",_rescant2r,0);
 //BA.debugLineNum = 544;BA.debugLine="Log(rescant2r+rescantr)";
__c.LogImpl("152363595",BA.NumberToString((double)(Double.parseDouble(_rescant2r))+(double)(Double.parseDouble(_rescantr))),0);
 //BA.debugLineNum = 560;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 = 561;BA.debugLine="Private rescant3 As Double";
_rescant3 = 0;
 //BA.debugLineNum = 562;BA.debugLine="If r55.RowCount > 0 Then";
if (_r55.getRowCount()>0) { 
 //BA.debugLineNum = 563;BA.debugLine="For r75 = 0 To r55.RowCount -1";
{
final int step230 = 1;
final int limit230 = (int) (_r55.getRowCount()-1);
_r75 = (int) (0) ;
for (;_r75 <= limit230 ;_r75 = _r75 + step230 ) {
 //BA.debugLineNum = 564;BA.debugLine="r55.Position = r75";
_r55.setPosition(_r75);
 //BA.debugLineNum = 565;BA.debugLine="rescant3 = rescant3 + r55.GetString(\"HVD_COSTO_";
_rescant3 = _rescant3+(double)(Double.parseDouble(_r55.GetString("HVD_COSTO_TOT")));
 //BA.debugLineNum = 566;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 = 570;BA.debugLine="Log(rescant3)";
__c.LogImpl("152363621",BA.NumberToString(_rescant3),0);
 //BA.debugLineNum = 571;BA.debugLine="r55.Close";
_r55.Close();
 //BA.debugLineNum = 576;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 = 577;BA.debugLine="Private rescant4 As Double";
_rescant4 = 0;
 //BA.debugLineNum = 578;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 579;BA.debugLine="r5.Position = 0";
_r5.setPosition((int) (0));
 //BA.debugLineNum = 580;BA.debugLine="rescant4 = r5.GetString(\"HVD_COSTO_TOT\")";
_rescant4 = (double)(Double.parseDouble(_r5.GetString("HVD_COSTO_TOT")));
 };
 //BA.debugLineNum = 582;BA.debugLine="Log(rescant4)";
__c.LogImpl("152363633",BA.NumberToString(_rescant4),0);
 //BA.debugLineNum = 583;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 585;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 WHERE PE_TIPO <> 'SOBRANTE' "))));
 //BA.debugLineNum = 586;BA.debugLine="Private rescant5 As Double";
_rescant5 = 0;
 //BA.debugLineNum = 587;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 588;BA.debugLine="r5.Position = 0";
_r5.setPosition((int) (0));
 //BA.debugLineNum = 589;BA.debugLine="rescant5 = r5.GetString(\"PE_COSTO_TOT\")";
_rescant5 = (double)(Double.parseDouble(_r5.GetString("PE_COSTO_TOT")));
 };
 //BA.debugLineNum = 591;BA.debugLine="Log(rescant5)";
__c.LogImpl("152363642",BA.NumberToString(_rescant5),0);
 //BA.debugLineNum = 592;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 597;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 = 598;BA.debugLine="Private rescant6 As Double";
_rescant6 = 0;
 //BA.debugLineNum = 599;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 600;BA.debugLine="For j4 = 0 To r5.RowCount -1";
{
final int step257 = 1;
final int limit257 = (int) (_r5.getRowCount()-1);
_j4 = (int) (0) ;
for (;_j4 <= limit257 ;_j4 = _j4 + step257 ) {
 //BA.debugLineNum = 601;BA.debugLine="r5.Position = j4";
_r5.setPosition(_j4);
 //BA.debugLineNum = 602;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")))+"' AND PE_TIPO NOT IN ('DANADO','FALTANTE','SOBRANTE')"))));
 //BA.debugLineNum = 603;BA.debugLine="r6.Position = 0";
_r6.setPosition((int) (0));
 //BA.debugLineNum = 606;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 = 608;BA.debugLine="r6.Close";
_r6.Close();
 }
};
 };
 //BA.debugLineNum = 611;BA.debugLine="If rescant6 = \"NaN\" Then rescant6 = 0";
if (_rescant6==(double)(Double.parseDouble("NaN"))) { 
_rescant6 = 0;};
 //BA.debugLineNum = 612;BA.debugLine="LogColor(rescant6,Colors.Red)";
__c.LogImpl("152363663",BA.NumberToString(_rescant6),__c.Colors.Red);
 //BA.debugLineNum = 613;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 615;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 = 616;BA.debugLine="Private rescant7 As Double";
_rescant7 = 0;
 //BA.debugLineNum = 617;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 618;BA.debugLine="For j5 = 0 To r5.RowCount -1";
{
final int step271 = 1;
final int limit271 = (int) (_r5.getRowCount()-1);
_j5 = (int) (0) ;
for (;_j5 <= limit271 ;_j5 = _j5 + step271 ) {
 //BA.debugLineNum = 619;BA.debugLine="r5.Position = j5";
_r5.setPosition(_j5);
 //BA.debugLineNum = 620;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")))+"' PE_TIPO NOT IN ('DANADO','FALTANTE','SOBRANTE')"))));
 //BA.debugLineNum = 621;BA.debugLine="r6.Position = 0";
_r6.setPosition((int) (0));
 //BA.debugLineNum = 623;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 = 624;BA.debugLine="r6.Close";
_r6.Close();
 }
};
 };
 //BA.debugLineNum = 627;BA.debugLine="If rescant7 = \"NaN\" Then rescant7 = 0";
if (_rescant7==(double)(Double.parseDouble("NaN"))) { 
_rescant7 = 0;};
 //BA.debugLineNum = 628;BA.debugLine="Log(rescant7)";
__c.LogImpl("152363679",BA.NumberToString(_rescant7),0);
 //BA.debugLineNum = 629;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 632;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 = 633;BA.debugLine="Private rescant10 As Double";
_rescant10 = 0;
 //BA.debugLineNum = 634;BA.debugLine="Private pztotal As Int";
_pztotal = 0;
 //BA.debugLineNum = 635;BA.debugLine="If r55.RowCount > 0 Then";
if (_r55.getRowCount()>0) { 
 //BA.debugLineNum = 636;BA.debugLine="For r75 = 0 To r55.RowCount -1";
{
final int step286 = 1;
final int limit286 = (int) (_r55.getRowCount()-1);
_r75 = (int) (0) ;
for (;_r75 <= limit286 ;_r75 = _r75 + step286 ) {
 //BA.debugLineNum = 637;BA.debugLine="r55.Position = r75";
_r55.setPosition(_r75);
 //BA.debugLineNum = 638;BA.debugLine="rescant10 = rescant10 + r55.GetString(\"HVD_COST";
_rescant10 = _rescant10+(double)(Double.parseDouble(_r55.GetString("HVD_COSTO_TOT")));
 //BA.debugLineNum = 639;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 = 640;BA.debugLine="pztotal = pztotal +  r55.GetString(\"HVD_CANT\")";
_pztotal = (int) (_pztotal+(double)(Double.parseDouble(_r55.GetString("HVD_CANT"))));
 }
};
 };
 //BA.debugLineNum = 643;BA.debugLine="Log(rescant10)";
__c.LogImpl("152363694",BA.NumberToString(_rescant10),0);
 //BA.debugLineNum = 644;BA.debugLine="r55.Close";
_r55.Close();
 //BA.debugLineNum = 657;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 = 658;BA.debugLine="Private pztotal2 As Int";
_pztotal2 = 0;
 //BA.debugLineNum = 659;BA.debugLine="Private rescant11 As Double";
_rescant11 = 0;
 //BA.debugLineNum = 660;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 661;BA.debugLine="r5.Position = 0";
_r5.setPosition((int) (0));
 //BA.debugLineNum = 662;BA.debugLine="rescant11 = r5.GetString(\"PE_COSTO_TOT\")";
_rescant11 = (double)(Double.parseDouble(_r5.GetString("PE_COSTO_TOT")));
 //BA.debugLineNum = 663;BA.debugLine="pztotal2 = pztotal2 +  r5.GetString(\"PE_CANT\")";
_pztotal2 = (int) (_pztotal2+(double)(Double.parseDouble(_r5.GetString("PE_CANT"))));
 };
 //BA.debugLineNum = 665;BA.debugLine="Log(rescant11)";
__c.LogImpl("152363716",BA.NumberToString(_rescant11),0);
 //BA.debugLineNum = 666;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 668;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 = 669;BA.debugLine="Private pztotal3 As Int";
_pztotal3 = 0;
 //BA.debugLineNum = 670;BA.debugLine="Private rescant12 As Double";
_rescant12 = 0;
 //BA.debugLineNum = 671;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 672;BA.debugLine="For j4 = 0 To r5.RowCount -1";
{
final int step309 = 1;
final int limit309 = (int) (_r5.getRowCount()-1);
_j4 = (int) (0) ;
for (;_j4 <= limit309 ;_j4 = _j4 + step309 ) {
 //BA.debugLineNum = 673;BA.debugLine="r5.Position = j4";
_r5.setPosition(_j4);
 //BA.debugLineNum = 674;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 = 675;BA.debugLine="r6.Position = 0";
_r6.setPosition((int) (0));
 //BA.debugLineNum = 676;BA.debugLine="LogColor(r5.GetString(\"HVD_COSTO_TOT\")&\" / \"& r";
__c.LogImpl("152363727",_r5.GetString("HVD_COSTO_TOT")+" / "+_r5.GetString("HVD_CANT")+" * "+_r5.GetString("HVD_RECHAZOCANT")+" - "+_r6.GetString("PE_CANT"),__c.Colors.Blue);
 //BA.debugLineNum = 677;BA.debugLine="LogColor(r6.GetString(\"PE_CANT\"),Colors.Blue)";
__c.LogImpl("152363728",_r6.GetString("PE_CANT"),__c.Colors.Blue);
 //BA.debugLineNum = 678;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 = 679;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 = 680;BA.debugLine="Log(rescant12)";
__c.LogImpl("152363731",BA.NumberToString(_rescant12),0);
 //BA.debugLineNum = 681;BA.debugLine="r6.Close";
_r6.Close();
 }
};
 };
 //BA.debugLineNum = 684;BA.debugLine="If rescant12 = \"NaN\" Then rescant12 = 0";
if (_rescant12==(double)(Double.parseDouble("NaN"))) { 
_rescant12 = 0;};
 //BA.debugLineNum = 685;BA.debugLine="LogColor(rescant12,Colors.Red)";
__c.LogImpl("152363736",BA.NumberToString(_rescant12),__c.Colors.Red);
 //BA.debugLineNum = 686;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 689;BA.debugLine="Private restafaltante As Cursor = Starter.skmt.Ex";
_restafaltante = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_restafaltante = (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 where PE_CLIENTEOR = '' AND PE_TIPO = 'FALTANTE'"))));
 //BA.debugLineNum = 691;BA.debugLine="Private rescant8 As Double = 0";
_rescant8 = 0;
 //BA.debugLineNum = 693;BA.debugLine="If restafaltante.RowCount > 0 Then";
if (_restafaltante.getRowCount()>0) { 
 //BA.debugLineNum = 694;BA.debugLine="restafaltante.Position = 0";
_restafaltante.setPosition((int) (0));
 //BA.debugLineNum = 695;BA.debugLine="rescant8 = NumberFormat2(restafaltante.GetDouble";
_rescant8 = (double)(Double.parseDouble(__c.NumberFormat2(_restafaltante.GetDouble("PE_COSTO_TOT"),(int) (0),(int) (2),(int) (2),__c.False)));
 };
 //BA.debugLineNum = 697;BA.debugLine="If rescant8 = \"NaN\" Then rescant8 = 0";
if (_rescant8==(double)(Double.parseDouble("NaN"))) { 
_rescant8 = 0;};
 //BA.debugLineNum = 698;BA.debugLine="Log(rescant8)";
__c.LogImpl("152363749",BA.NumberToString(_rescant8),0);
 //BA.debugLineNum = 699;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 701;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 = 702;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 = 703;BA.debugLine="Log((rescant3 &\"   +   \"& rescant4 &\"   +   \"& re";
__c.LogImpl("152363754",(BA.NumberToString(_rescant3)+"   +   "+BA.NumberToString(_rescant4)+"   +   "+BA.NumberToString(_rescant5)+"   +   "+BA.NumberToString(_rescant6)+"   +   "+BA.NumberToString(_rescant7)),0);
 //BA.debugLineNum = 706;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 = 707;BA.debugLine="g8.Position = 0";
_g8.setPosition((int) (0));
 //BA.debugLineNum = 708;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 = 709;BA.debugLine="g11.Position = 0";
_g11.setPosition((int) (0));
 //BA.debugLineNum = 710;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 = 711;BA.debugLine="g12.Position = 0";
_g12.setPosition((int) (0));
 //BA.debugLineNum = 712;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 = 713;BA.debugLine="g13.Position = 0";
_g13.setPosition((int) (0));
 //BA.debugLineNum = 715;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 = 717;BA.debugLine="B4XPages.MainPage.clientesVisitados = L_MONTOE.Te";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._clientesvisitados /*String*/  = _l_montoe.getText();
 //BA.debugLineNum = 718;BA.debugLine="B4XPages.MainPage.clientesVenta = l_cuantosc.Text";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._clientesventa /*String*/  = _l_cuantosc.getText();
 //BA.debugLineNum = 719;BA.debugLine="B4XPages.MainPage.clientesRechazo = l_cuantosn.Te";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._clientesrechazo /*String*/  = _l_cuantosn.getText();
 //BA.debugLineNum = 720;BA.debugLine="B4XPages.MainPage.clientestotal = l_porvisitar.Te";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._clientestotal /*String*/  = _l_porvisitar.getText();
 //BA.debugLineNum = 721;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 = 722;BA.debugLine="B4XPages.MainPage.porVisitar = l_ctast.text";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._porvisitar /*String*/  = _l_ctast.getText();
 //BA.debugLineNum = 723;BA.debugLine="B4XPages.MainPage.visitadostotales = g11.GetStrin";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._visitadostotales /*String*/  = _g11.GetString("cuenta");
 //BA.debugLineNum = 725;BA.debugLine="B4XPages.MainPage.entregas = g12.GetString(\"cuent";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._entregas /*String*/  = _g12.GetString("cuenta");
 //BA.debugLineNum = 726;BA.debugLine="B4XPages.MainPage.rechazos = g13.GetString(\"cuent";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._rechazos /*String*/  = _g13.GetString("cuenta");
 //BA.debugLineNum = 727;BA.debugLine="B4XPages.MainPage.montoEntregado = L_MONTOE.text";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._montoentregado /*String*/  = _l_montoe.getText();
 //BA.debugLineNum = 728;BA.debugLine="B4XPages.MainPage.montoRechazado = l_rechazo.text";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._montorechazado /*String*/  = _l_rechazo.getText();
 //BA.debugLineNum = 730;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 = 733;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 = 734;BA.debugLine="Label9.Visible = True";
_label9.setVisible(__c.True);
 //BA.debugLineNum = 735;BA.debugLine="L_MONTOE.Visible = True";
_l_montoe.setVisible(__c.True);
 //BA.debugLineNum = 736;BA.debugLine="l_montoaliquidar.Visible = True";
_l_montoaliquidar.setVisible(__c.True);
 //BA.debugLineNum = 737;BA.debugLine="Label21.Visible = True";
_label21.setVisible(__c.True);
 //BA.debugLineNum = 745;BA.debugLine="b_venta_emp.Visible = True";
_b_venta_emp.setVisible(__c.True);
 //BA.debugLineNum = 746;BA.debugLine="b_comodin.Visible = True";
_b_comodin.setVisible(__c.True);
 }else {
 //BA.debugLineNum = 748;BA.debugLine="Label21.Visible = False";
_label21.setVisible(__c.False);
 //BA.debugLineNum = 749;BA.debugLine="l_montoaliquidar.Visible = False";
_l_montoaliquidar.setVisible(__c.False);
 //BA.debugLineNum = 750;BA.debugLine="Label9.Visible = False  '''' PRUEBAS MOVER A TRU";
_label9.setVisible(__c.False);
 //BA.debugLineNum = 751;BA.debugLine="L_MONTOE.Visible = False";
_l_montoe.setVisible(__c.False);
 //BA.debugLineNum = 752;BA.debugLine="b_venta_emp.Visible = False '''' PRUEBAS MOVER A";
_b_venta_emp.setVisible(__c.False);
 //BA.debugLineNum = 753;BA.debugLine="b_comodin.Visible = False";
_b_comodin.setVisible(__c.False);
 };
 //BA.debugLineNum = 756;BA.debugLine="If l_ruta.Text = 0 Then";
if ((_l_ruta.getText()).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 757;BA.debugLine="b_imp_inventario.Visible = False";
_b_imp_inventario.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 759;BA.debugLine="b_imp_inventario.Visible = True";
_b_imp_inventario.setVisible(__c.True);
 };
 //BA.debugLineNum = 767;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 = 768;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 769;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 770;BA.debugLine="Starter.MAC_IMPRESORA = c.GetString(\"CAT_VA_VALO";
_starter._mac_impresora /*String*/  = _c.GetString("CAT_VA_VALOR");
 };
 //BA.debugLineNum = 772;BA.debugLine="If Starter.MAC_IMPRESORA = \"\" Then Starter.MAC_IM";
if ((_starter._mac_impresora /*String*/ ).equals("")) { 
_starter._mac_impresora /*String*/  = "0";};
 //BA.debugLineNum = 774;BA.debugLine="Printer1.Initialize(Me, \"Printer1\")";
_printer1._initialize /*String*/ (ba,this,"Printer1");
 //BA.debugLineNum = 775;BA.debugLine="If Printer1.IsConnected = False Then";
if (_printer1._isconnected /*boolean*/ ()==__c.False) { 
 }else {
 //BA.debugLineNum = 779;BA.debugLine="Printer1.DisConnect";
_printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 780;BA.debugLine="Printer1.Connect";
_printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 781;BA.debugLine="Log(\"2\")";
__c.LogImpl("152363832","2",0);
 };
 //BA.debugLineNum = 784;BA.debugLine="Dim pagarescobrados As Cursor = Starter.skmt.Exec";
_pagarescobrados = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_pagarescobrados = (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(a_abono),0) as a_abono FROM ABONOS")));
 //BA.debugLineNum = 785;BA.debugLine="pagarescobrados.Position = 0";
_pagarescobrados.setPosition((int) (0));
 //BA.debugLineNum = 786;BA.debugLine="l_pagarescobrados.Text = NumberFormat2(pagarescob";
_l_pagarescobrados.setText(BA.ObjectToCharSequence(__c.NumberFormat2(_pagarescobrados.GetDouble("a_abono"),(int) (0),(int) (2),(int) (2),__c.False)));
 //BA.debugLineNum = 787;BA.debugLine="pagarescobrados.Close";
_pagarescobrados.Close();
 //BA.debugLineNum = 789;BA.debugLine="Dim pagaresnuevos As Cursor = Starter.skmt.ExecQu";
_pagaresnuevos = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_pagaresnuevos = (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(PA_MONTO),0) as PA_MONTO FROM PAGARES")));
 //BA.debugLineNum = 790;BA.debugLine="pagaresnuevos.Position = 0";
_pagaresnuevos.setPosition((int) (0));
 //BA.debugLineNum = 791;BA.debugLine="l_pagaresnuevos.Text = NumberFormat2(pagaresnuevo";
_l_pagaresnuevos.setText(BA.ObjectToCharSequence(__c.NumberFormat2(_pagaresnuevos.GetDouble("PA_MONTO"),(int) (0),(int) (2),(int) (2),__c.False)));
 //BA.debugLineNum = 792;BA.debugLine="pagaresnuevos.Close";
_pagaresnuevos.Close();
 //BA.debugLineNum = 794;BA.debugLine="l_montoaliquidar.Text = NumberFormat2((l_pagaresc";
_l_montoaliquidar.setText(BA.ObjectToCharSequence(__c.NumberFormat2(((double)(Double.parseDouble(_l_pagarescobrados.getText()))+(double)(Double.parseDouble(_l_montoe.getText()))-(double)(Double.parseDouble(_l_pagaresnuevos.getText()))),(int) (0),(int) (2),(int) (2),__c.False)));
 //BA.debugLineNum = 797;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 = 2571;BA.debugLine="If Panel1.visible Then";
if (true) break;

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

case 3:
//C
this.state = 10;
 //BA.debugLineNum = 2572;BA.debugLine="Log(\"PANEL1 VISIBLE\")";
parent.__c.LogImpl("153084163","PANEL1 VISIBLE",0);
 //BA.debugLineNum = 2573;BA.debugLine="B_REGRESA_Click";
parent._b_regresa_click();
 if (true) break;

case 5:
//C
this.state = 10;
 //BA.debugLineNum = 2575;BA.debugLine="P_CIEGO.Visible = False";
parent._p_ciego.setVisible(parent.__c.False);
 if (true) break;

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

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

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

            }
        }
    }
}
public String  _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
 //BA.debugLineNum = 149;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
 //BA.debugLineNum = 150;BA.debugLine="Root = Root1";
_root = _root1;
 //BA.debugLineNum = 152;BA.debugLine="Root.LoadLayout(\"principal\")";
_root.LoadLayout("principal",ba);
 //BA.debugLineNum = 153;BA.debugLine="EJECUTANDO=1";
_ejecutando = BA.NumberToString(1);
 //BA.debugLineNum = 154;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 = 157;BA.debugLine="img2.Visible =False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 158;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 159;BA.debugLine="fecha=DateTime.Date(DateTime.Now)";
_fecha = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 161;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 = 162;BA.debugLine="b.Position=0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 163;BA.debugLine="Cuantos = b.GetString(\"CUANTOS\")";
_cuantos = _b.GetString("CUANTOS");
 //BA.debugLineNum = 164;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 = 165;BA.debugLine="D.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 166;BA.debugLine="b.Close";
_b.Close();
 //BA.debugLineNum = 167;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 = 168;BA.debugLine="e.Position=0";
_e.setPosition((int) (0));
 //BA.debugLineNum = 169;BA.debugLine="If Cuantos = 0 Then";
if ((_cuantos).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 171;BA.debugLine="l_cuantosc.Text = 0";
_l_cuantosc.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 172;BA.debugLine="l_cuantosn.Text = 0";
_l_cuantosn.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 173;BA.debugLine="drop = 0";
_drop = 0;
 //BA.debugLineNum = 174;BA.debugLine="l_montoSalida.Text = 0";
_l_montosalida.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 175;BA.debugLine="efectiva = 0";
_efectiva = 0;
 //BA.debugLineNum = 177;BA.debugLine="l_ctast.Text = d.GetString(\"TOTAL_VISITAR\")";
_l_ctast.setText(BA.ObjectToCharSequence(_d.GetString("TOTAL_VISITAR")));
 //BA.debugLineNum = 178;BA.debugLine="l_porvisitar.Text = e.GetString(\"POR_VISITAR\")";
_l_porvisitar.setText(BA.ObjectToCharSequence(_e.GetString("POR_VISITAR")));
 }else {
 };
 //BA.debugLineNum = 197;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 = 198;BA.debugLine="If b.RowCount > 0 Then";
if (_b.getRowCount()>0) { 
 //BA.debugLineNum = 200;BA.debugLine="b.Position = 0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 202;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 203;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 204;BA.debugLine="cmd.Name = \"select_coords_almacen_mards\"";
_cmd.Name /*String*/  = "select_coords_almacen_mards";
 //BA.debugLineNum = 205;BA.debugLine="cmd.Parameters = Array As Object(b.GetString(\"ID";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_b.GetString("ID_ALMACEN"))};
 //BA.debugLineNum = 206;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"coords_almacen";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("coords_almacen"));
 };
 //BA.debugLineNum = 208;BA.debugLine="B4XPages.MainPage.usuario=Subs.dameUsuarioDeDB";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._usuario /*String*/  = _subs._dameusuariodedb /*String*/ (ba);
 //BA.debugLineNum = 209;BA.debugLine="btAdmin.Initialize(\"BlueTeeth\")";
_btadmin.Initialize(ba,"BlueTeeth");
 //BA.debugLineNum = 210;BA.debugLine="cmp20.Initialize(\"Printer\")";
_cmp20.Initialize("Printer");
 //BA.debugLineNum = 211;BA.debugLine="End Sub";
return "";
}
public String  _btn_ubicar_ru_click() throws Exception{
 //BA.debugLineNum = 2936;BA.debugLine="Sub Btn_Ubicar_Ru_Click";
 //BA.debugLineNum = 2937;BA.debugLine="If b_check.Visible = True Then";
if (_b_check.getVisible()==__c.True) { 
 //BA.debugLineNum = 2938;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 = 2941;BA.debugLine="StartActivity(MAPA_RUTAS)";
__c.StartActivity(ba,(Object)(_mapa_rutas.getObject()));
 };
 //BA.debugLineNum = 2943;BA.debugLine="End Sub";
return "";
}
public String  _busca_click() throws Exception{
 //BA.debugLineNum = 2612;BA.debugLine="Sub BUSCA_Click";
 //BA.debugLineNum = 2613;BA.debugLine="If b_check.Visible = True Then";
if (_b_check.getVisible()==__c.True) { 
 //BA.debugLineNum = 2614;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 = 2617;BA.debugLine="B4XPages.ShowPage(\"Buscar\")";
_b4xpages._showpage /*String*/ (ba,"Buscar");
 };
 //BA.debugLineNum = 2619;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 = 1640;BA.debugLine="Sub cargar____Click";
 //BA.debugLineNum = 1641;BA.debugLine="Dim pedidodiaanterior As Boolean = False";
_pedidodiaanterior = __c.False;
 //BA.debugLineNum = 1642;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 = 1643;BA.debugLine="If cp.RowCount > 0 Then";
if (_cp.getRowCount()>0) { 
 //BA.debugLineNum = 1644;BA.debugLine="cp.Position = 0";
_cp.setPosition((int) (0));
 //BA.debugLineNum = 1645;BA.debugLine="Private fecha As String = cp.GetString(\"NV_FECHA";
_fecha = _cp.GetString("NV_FECHA");
 //BA.debugLineNum = 1646;BA.debugLine="Log(cp.GetString(\"NV_FECHA\"))";
__c.LogImpl("152953094",_cp.GetString("NV_FECHA"),0);
 //BA.debugLineNum = 1647;BA.debugLine="Dim fecha2() As String = Regex.Split(\" \",fecha)";
_fecha2 = __c.Regex.Split(" ",_fecha);
 //BA.debugLineNum = 1648;BA.debugLine="Log(fecha2(0))";
__c.LogImpl("152953096",_fecha2[(int) (0)],0);
 //BA.debugLineNum = 1649;BA.debugLine="Dim fecha3() As String = Regex.Split(\"/\",fecha2(";
_fecha3 = __c.Regex.Split("/",_fecha2[(int) (0)]);
 //BA.debugLineNum = 1650;BA.debugLine="DateTime.DateFormat = \"yyyyMMdd\"";
__c.DateTime.setDateFormat("yyyyMMdd");
 //BA.debugLineNum = 1651;BA.debugLine="DateTime.TimeFormat = \"\"";
__c.DateTime.setTimeFormat("");
 //BA.debugLineNum = 1652;BA.debugLine="Dim dia As String = fecha3(2)&fecha3(0)&fecha3(1";
_dia = _fecha3[(int) (2)]+_fecha3[(int) (0)]+_fecha3[(int) (1)];
 //BA.debugLineNum = 1653;BA.debugLine="Log(dia)";
__c.LogImpl("152953101",_dia,0);
 //BA.debugLineNum = 1654;BA.debugLine="Dim dia2 As String = DateTime.Date(DateTime.Now)";
_dia2 = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 1655;BA.debugLine="Log(dia & \" , \" & dia2)";
__c.LogImpl("152953103",_dia+" , "+_dia2,0);
 //BA.debugLineNum = 1656;BA.debugLine="If dia < dia2 Then";
if ((double)(Double.parseDouble(_dia))<(double)(Double.parseDouble(_dia2))) { 
 //BA.debugLineNum = 1657;BA.debugLine="pedidodiaanterior = True";
_pedidodiaanterior = __c.True;
 };
 };
 //BA.debugLineNum = 1660;BA.debugLine="If Not (pedidodiaanterior) Then";
if (__c.Not(_pedidodiaanterior)) { 
 //BA.debugLineNum = 1661;BA.debugLine="Log(\"CUMPLE\")";
__c.LogImpl("152953109","CUMPLE",0);
 //BA.debugLineNum = 1662;BA.debugLine="EJECUTANDO = 1";
_ejecutando = BA.NumberToString(1);
 //BA.debugLineNum = 1663;BA.debugLine="reqs.Initialize";
_reqs.Initialize();
 //BA.debugLineNum = 1664;BA.debugLine="TOPE = 0";
_tope = (int) (0);
 //BA.debugLineNum = 1665;BA.debugLine="LogColor($\"ReqServer = ${B4XPages.MainPage.serve";
__c.LogImpl("152953113",("ReqServer = "+__c.SmartStringFormatter("",(Object)(_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ ))+""),__c.Colors.Red);
 //BA.debugLineNum = 1666;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 = 1668;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1669;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1670;BA.debugLine="cmd.Name = \"insert_drop_rep_IZCA2\"";
_cmd.Name /*String*/  = "insert_drop_rep_IZCA2";
 //BA.debugLineNum = 1671;BA.debugLine="cmd.Parameters = Array As Object(Subs.dameUsuari";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_subs._dameusuariodedb /*String*/ (ba)),(Object)(_e_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 = 1672;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_drop\")";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_drop"));
 //BA.debugLineNum = 1675;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from kmt_info\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from kmt_info");
 //BA.debugLineNum = 1676;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cod_resul";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cod_result");
 //BA.debugLineNum = 1677;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from hist_gest";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from hist_gest");
 //BA.debugLineNum = 1678;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CAT_DETAL";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CAT_DETALLES_PAQ");
 //BA.debugLineNum = 1679;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from telefonos";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from telefonos");
 //BA.debugLineNum = 1681;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from PUNTEO_GP";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PUNTEO_GPS");
 //BA.debugLineNum = 1682;BA.debugLine="If l_ruta.Text = \"0\" Then '";
if ((_l_ruta.getText()).equals("0")) { 
 //BA.debugLineNum = 1683;BA.debugLine="Log(\"*********************  No hay ruta, BORRAM";
__c.LogImpl("152953131","*********************  No hay ruta, BORRAMOS TODO",0);
 //BA.debugLineNum = 1684;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cat_guna";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod");
 //BA.debugLineNum = 1685;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cat_guna";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod3");
 //BA.debugLineNum = 1686;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from REPARTO\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from REPARTO");
 //BA.debugLineNum = 1687;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from HIST_VEN";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_VENTAS");
 //BA.debugLineNum = 1688;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from HIST_VEN";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_VENTAS2");
 //BA.debugLineNum = 1689;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from NOVENTA\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from NOVENTA");
 }else {
 //BA.debugLineNum = 1691;BA.debugLine="Log(\"*********************  Hay ruta, NO BORRAM";
__c.LogImpl("152953139","*********************  Hay ruta, NO BORRAMOS TODO",0);
 };
 //BA.debugLineNum = 1695;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 = 1696;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1697;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 1699;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1700;BA.debugLine="cmd.Name = \"select_punteo_mards_re_REPG\"";
_cmd.Name /*String*/  = "select_punteo_mards_re_REPG";
 //BA.debugLineNum = 1701;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 = 1702;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"punteo\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("punteo"));
 //BA.debugLineNum = 1703;BA.debugLine="Log($\"Pedimos Punteo\"$)";
__c.LogImpl("152953151",("Pedimos Punteo"),0);
 //BA.debugLineNum = 1704;BA.debugLine="reqs.Add(\"punteo\")";
_reqs.Add((Object)("punteo"));
 //BA.debugLineNum = 1707;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1708;BA.debugLine="cmd.Name = \"select_almacen_mards_re_REPG\"";
_cmd.Name /*String*/  = "select_almacen_mards_re_REPG";
 //BA.debugLineNum = 1709;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN)";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen)};
 //BA.debugLineNum = 1710;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"gunaprod\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("gunaprod"));
 //BA.debugLineNum = 1711;BA.debugLine="Log($\"Pedimos gunaprod - ${ALMACEN}, ${e_ruta.te";
__c.LogImpl("152953159",("Pedimos gunaprod - "+__c.SmartStringFormatter("",(Object)(_almacen))+", "+__c.SmartStringFormatter("",(Object)(_e_ruta.getText()))+""),0);
 //BA.debugLineNum = 1712;BA.debugLine="reqs.Add(\"gunaprod\")";
_reqs.Add((Object)("gunaprod"));
 //BA.debugLineNum = 1716;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1717;BA.debugLine="cmd.Name = \"select_cliente_mards_re_REPG\"";
_cmd.Name /*String*/  = "select_cliente_mards_re_REPG";
 //BA.debugLineNum = 1718;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 = 1719;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"kmt_datos\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("kmt_datos"));
 //BA.debugLineNum = 1720;BA.debugLine="Log($\"Pedimos kmt_datos\"$)";
__c.LogImpl("152953168",("Pedimos kmt_datos"),0);
 //BA.debugLineNum = 1721;BA.debugLine="reqs.Add(\"kmt_datos\")";
_reqs.Add((Object)("kmt_datos"));
 //BA.debugLineNum = 1723;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1724;BA.debugLine="cmd.Name = \"select_ventad_mards_re_REPG\"";
_cmd.Name /*String*/  = "select_ventad_mards_re_REPG";
 //BA.debugLineNum = 1725;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text, AL";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1726;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"hist_datos\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("hist_datos"));
 //BA.debugLineNum = 1727;BA.debugLine="Log($\"Pedimos hist_datos\"$)";
__c.LogImpl("152953175",("Pedimos hist_datos"),0);
 //BA.debugLineNum = 1728;BA.debugLine="reqs.Add(\"hist_datos\")";
_reqs.Add((Object)("hist_datos"));
 //BA.debugLineNum = 1745;BA.debugLine="If ALMACEN = \"32\" Then";
if ((_almacen).equals("32")) { 
 //BA.debugLineNum = 1746;BA.debugLine="ALMACEN = \"33\"";
_almacen = "33";
 //BA.debugLineNum = 1747;BA.debugLine="cargo = 2";
_cargo = BA.NumberToString(2);
 //BA.debugLineNum = 1748;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1749;BA.debugLine="cmd.Name = \"select_punteo_mards_re_REPG\"";
_cmd.Name /*String*/  = "select_punteo_mards_re_REPG";
 //BA.debugLineNum = 1750;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 = 1751;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"punteo\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("punteo"));
 //BA.debugLineNum = 1752;BA.debugLine="reqs.Add(\"punteo\")";
_reqs.Add((Object)("punteo"));
 //BA.debugLineNum = 1754;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1755;BA.debugLine="cmd.Name = \"select_almacen_mards_re_REPG\"";
_cmd.Name /*String*/  = "select_almacen_mards_re_REPG";
 //BA.debugLineNum = 1756;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 = 1757;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"gunaprod\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("gunaprod"));
 //BA.debugLineNum = 1758;BA.debugLine="reqs.Add(\"gunaprod\")";
_reqs.Add((Object)("gunaprod"));
 //BA.debugLineNum = 1760;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1761;BA.debugLine="cmd.Name = \"select_cliente_mards_re_REPG\"";
_cmd.Name /*String*/  = "select_cliente_mards_re_REPG";
 //BA.debugLineNum = 1762;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 = 1763;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"kmt_datos\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("kmt_datos"));
 //BA.debugLineNum = 1764;BA.debugLine="reqs.Add(\"kmt_datos\")";
_reqs.Add((Object)("kmt_datos"));
 //BA.debugLineNum = 1766;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1767;BA.debugLine="cmd.Name = \"select_ventad_mards_re_REPG\"";
_cmd.Name /*String*/  = "select_ventad_mards_re_REPG";
 //BA.debugLineNum = 1768;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text, A";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1769;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"hist_datos\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("hist_datos"));
 //BA.debugLineNum = 1770;BA.debugLine="reqs.Add(\"hist_datos\")";
_reqs.Add((Object)("hist_datos"));
 };
 //BA.debugLineNum = 1804;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 = 1805;BA.debugLine="d.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 1806;BA.debugLine="cuantos_noventa = D.GetString(\"CUANTOS_NOVENTA\")";
_cuantos_noventa = _d.GetString("CUANTOS_NOVENTA");
 //BA.debugLineNum = 1807;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1808;BA.debugLine="cargar.Visible = False";
_cargar.setVisible(__c.False);
 //BA.debugLineNum = 1809;BA.debugLine="Subir.Visible = False";
_subir.setVisible(__c.False);
 //BA.debugLineNum = 1810;BA.debugLine="connecta.Visible = True";
_connecta.setVisible(__c.True);
 //BA.debugLineNum = 1811;BA.debugLine="inv.Visible = False";
_inv.setVisible(__c.False);
 //BA.debugLineNum = 1812;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 = 1813;BA.debugLine="ProgressDialogShow2(\"Descargando rutas, espere u";
__c.ProgressDialogShow2(ba,BA.ObjectToCharSequence("Descargando rutas, espere un momento."),__c.False);
 //BA.debugLineNum = 1814;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 = 1818;BA.debugLine="Log(\"XXXX\")";
__c.LogImpl("152953266","XXXX",0);
 //BA.debugLineNum = 1819;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 = 1822;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 = 1467;BA.debugLine="Sub cargar_Click";
 //BA.debugLineNum = 1468;BA.debugLine="Dim pedidodiaanterior As Boolean = False";
_pedidodiaanterior = __c.False;
 //BA.debugLineNum = 1469;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 = 1470;BA.debugLine="If cp.RowCount > 0 Then";
if (_cp.getRowCount()>0) { 
 //BA.debugLineNum = 1471;BA.debugLine="cp.Position = 0";
_cp.setPosition((int) (0));
 //BA.debugLineNum = 1472;BA.debugLine="Private fecha As String = cp.GetString(\"NV_FECHA";
_fecha = _cp.GetString("NV_FECHA");
 //BA.debugLineNum = 1473;BA.debugLine="Log(cp.GetString(\"NV_FECHA\"))";
__c.LogImpl("152887558",_cp.GetString("NV_FECHA"),0);
 //BA.debugLineNum = 1474;BA.debugLine="Dim fecha2() As String = Regex.Split(\" \",fecha)";
_fecha2 = __c.Regex.Split(" ",_fecha);
 //BA.debugLineNum = 1475;BA.debugLine="Log(fecha2(0))";
__c.LogImpl("152887560",_fecha2[(int) (0)],0);
 //BA.debugLineNum = 1476;BA.debugLine="Dim fecha3() As String = Regex.Split(\"/\",fecha2(";
_fecha3 = __c.Regex.Split("/",_fecha2[(int) (0)]);
 //BA.debugLineNum = 1477;BA.debugLine="DateTime.DateFormat = \"yyyyMMdd\"";
__c.DateTime.setDateFormat("yyyyMMdd");
 //BA.debugLineNum = 1478;BA.debugLine="DateTime.TimeFormat = \"\"";
__c.DateTime.setTimeFormat("");
 //BA.debugLineNum = 1479;BA.debugLine="Dim dia As String = fecha3(2)&fecha3(0)&fecha3(1";
_dia = _fecha3[(int) (2)]+_fecha3[(int) (0)]+_fecha3[(int) (1)];
 //BA.debugLineNum = 1480;BA.debugLine="Log(dia)";
__c.LogImpl("152887565",_dia,0);
 //BA.debugLineNum = 1481;BA.debugLine="Dim dia2 As String = DateTime.Date(DateTime.Now)";
_dia2 = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 1482;BA.debugLine="Log(dia & \" , \" & dia2)";
__c.LogImpl("152887567",_dia+" , "+_dia2,0);
 //BA.debugLineNum = 1483;BA.debugLine="If dia < dia2 Then";
if ((double)(Double.parseDouble(_dia))<(double)(Double.parseDouble(_dia2))) { 
 //BA.debugLineNum = 1484;BA.debugLine="pedidodiaanterior = True";
_pedidodiaanterior = __c.True;
 };
 };
 //BA.debugLineNum = 1487;BA.debugLine="If Not (pedidodiaanterior) Then";
if (__c.Not(_pedidodiaanterior)) { 
 //BA.debugLineNum = 1488;BA.debugLine="P_carga.Visible = True";
_p_carga.setVisible(__c.True);
 //BA.debugLineNum = 1489;BA.debugLine="P_carga.Width = Root.Width";
_p_carga.setWidth(_root.getWidth());
 //BA.debugLineNum = 1490;BA.debugLine="P_carga.Height = Root.Height";
_p_carga.setHeight(_root.getHeight());
 //BA.debugLineNum = 1491;BA.debugLine="l_carga2.Text = \"CARGANDO\"";
_l_carga2.setText(BA.ObjectToCharSequence("CARGANDO"));
 //BA.debugLineNum = 1492;BA.debugLine="L_carga.Text = \"CARGANDO\"";
_l_carga.setText(BA.ObjectToCharSequence("CARGANDO"));
 //BA.debugLineNum = 1493;BA.debugLine="PB_carga.Progress = 0";
_pb_carga.setProgress((int) (0));
 //BA.debugLineNum = 1494;BA.debugLine="PB_carga2.Progress = 0";
_pb_carga2.setProgress((int) (0));
 //BA.debugLineNum = 1495;BA.debugLine="Log(\"CUMPLE\")";
__c.LogImpl("152887580","CUMPLE",0);
 //BA.debugLineNum = 1496;BA.debugLine="EJECUTANDO = 1";
_ejecutando = BA.NumberToString(1);
 //BA.debugLineNum = 1497;BA.debugLine="reqs.Initialize";
_reqs.Initialize();
 //BA.debugLineNum = 1498;BA.debugLine="TOPE = 0";
_tope = (int) (0);
 //BA.debugLineNum = 1499;BA.debugLine="LogColor($\"ReqServer = ${B4XPages.MainPage.serve";
__c.LogImpl("152887584",("ReqServer = "+__c.SmartStringFormatter("",(Object)(_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ ))+""),__c.Colors.Red);
 //BA.debugLineNum = 1500;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 = 1502;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1503;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1504;BA.debugLine="cmd.Name = \"insert_drop_rep_IZCA2\"";
_cmd.Name /*String*/  = "insert_drop_rep_IZCA2";
 //BA.debugLineNum = 1505;BA.debugLine="cmd.Parameters = Array As Object(Subs.dameUsuari";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_subs._dameusuariodedb /*String*/ (ba)),(Object)(_e_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 = 1506;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_drop\")";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_drop"));
 //BA.debugLineNum = 1509;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from kmt_info\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from kmt_info");
 //BA.debugLineNum = 1510;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cod_resul";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cod_result");
 //BA.debugLineNum = 1511;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from hist_gest";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from hist_gest");
 //BA.debugLineNum = 1512;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CAT_DETAL";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CAT_DETALLES_PAQ");
 //BA.debugLineNum = 1513;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from telefonos";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from telefonos");
 //BA.debugLineNum = 1514;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cat_gunap";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod");
 //BA.debugLineNum = 1515;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cat_gunap";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod3");
 //BA.debugLineNum = 1517;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from PUNTEO_GP";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PUNTEO_GPS");
 //BA.debugLineNum = 1518;BA.debugLine="If l_ruta.Text = \"0\" Then '";
if ((_l_ruta.getText()).equals("0")) { 
 //BA.debugLineNum = 1519;BA.debugLine="Log(\"*********************  No hay ruta, BORRAM";
__c.LogImpl("152887604","*********************  No hay ruta, BORRAMOS TODO",0);
 //BA.debugLineNum = 1520;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from REPARTO\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from REPARTO");
 //BA.debugLineNum = 1521;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from HIST_VEN";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_VENTAS");
 //BA.debugLineNum = 1522;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from HIST_VEN";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_VENTAS2");
 //BA.debugLineNum = 1523;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from NOVENTA\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from NOVENTA");
 //BA.debugLineNum = 1524;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM ABONOSP\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM ABONOSP");
 }else {
 //BA.debugLineNum = 1526;BA.debugLine="Log(\"*********************  Hay ruta, NO BORRAM";
__c.LogImpl("152887611","*********************  Hay ruta, NO BORRAMOS TODO",0);
 };
 //BA.debugLineNum = 1530;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 = 1531;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1532;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 1534;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1535;BA.debugLine="cmd.Name = \"select_punteo_re_REPG_IZCA\"";
_cmd.Name /*String*/  = "select_punteo_re_REPG_IZCA";
 //BA.debugLineNum = 1536;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 = 1537;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"punteo\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("punteo"));
 //BA.debugLineNum = 1538;BA.debugLine="Log($\"Pedimos Punteo\"$)";
__c.LogImpl("152887623",("Pedimos Punteo"),0);
 //BA.debugLineNum = 1539;BA.debugLine="reqs.Add(\"punteo\")";
_reqs.Add((Object)("punteo"));
 //BA.debugLineNum = 1541;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1542;BA.debugLine="cmd.Name = \"select_almacen_IZCA_re_REPG2\"";
_cmd.Name /*String*/  = "select_almacen_IZCA_re_REPG2";
 //BA.debugLineNum = 1543;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN)";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen)};
 //BA.debugLineNum = 1544;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"gunaprod\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("gunaprod"));
 //BA.debugLineNum = 1545;BA.debugLine="Log($\"Pedimos gunaprod - ${ALMACEN}, ${e_ruta.te";
__c.LogImpl("152887630",("Pedimos gunaprod - "+__c.SmartStringFormatter("",(Object)(_almacen))+", "+__c.SmartStringFormatter("",(Object)(_e_ruta.getText()))+""),0);
 //BA.debugLineNum = 1546;BA.debugLine="reqs.Add(\"gunaprod\")";
_reqs.Add((Object)("gunaprod"));
 //BA.debugLineNum = 1548;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1549;BA.debugLine="cmd.Name = \"select_abonosp_IZCAREP2\"";
_cmd.Name /*String*/  = "select_abonosp_IZCAREP2";
 //BA.debugLineNum = 1550;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN, e_ruta";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_e_ruta.getText())};
 //BA.debugLineNum = 1551;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"select_abonosp";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("select_abonosp"));
 //BA.debugLineNum = 1561;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1562;BA.debugLine="cmd.Name = \"select_cliente_IZCA_re_REPG4\"";
_cmd.Name /*String*/  = "select_cliente_IZCA_re_REPG4";
 //BA.debugLineNum = 1563;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),(Object)(_e_ruta.getText()),(Object)(_almacen),(Object)(_e_ruta.getText()),(Object)(_almacen),(Object)(_almacen)};
 //BA.debugLineNum = 1564;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"kmt_datos\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("kmt_datos"));
 //BA.debugLineNum = 1565;BA.debugLine="Log($\"Pedimos kmt_datos\"$)";
__c.LogImpl("152887650",("Pedimos kmt_datos"),0);
 //BA.debugLineNum = 1566;BA.debugLine="reqs.Add(\"kmt_datos\")";
_reqs.Add((Object)("kmt_datos"));
 //BA.debugLineNum = 1568;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1569;BA.debugLine="cmd.Name = \"select_ventad3_IZCA_re_REPG\"";
_cmd.Name /*String*/  = "select_ventad3_IZCA_re_REPG";
 //BA.debugLineNum = 1570;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text, AL";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen),(Object)(_e_ruta.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1571;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"hist_datos\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("hist_datos"));
 //BA.debugLineNum = 1572;BA.debugLine="Log($\"Pedimos hist_datos\"$)";
__c.LogImpl("152887657",("Pedimos hist_datos"),0);
 //BA.debugLineNum = 1573;BA.debugLine="reqs.Add(\"hist_datos\")";
_reqs.Add((Object)("hist_datos"));
 //BA.debugLineNum = 1575;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1576;BA.debugLine="cmd.Name = \"select_coords_almacen_IZCA\"";
_cmd.Name /*String*/  = "select_coords_almacen_IZCA";
 //BA.debugLineNum = 1577;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN)";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen)};
 //BA.debugLineNum = 1578;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"coords_almacen";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("coords_almacen"));
 //BA.debugLineNum = 1580;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1581;BA.debugLine="cmd.Name = \"select_cat_gunaprod3_IZCA\"";
_cmd.Name /*String*/  = "select_cat_gunaprod3_IZCA";
 //BA.debugLineNum = 1582;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN)";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen)};
 //BA.debugLineNum = 1583;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"gunaprod3\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("gunaprod3"));
 //BA.debugLineNum = 1620;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 = 1621;BA.debugLine="d.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 1622;BA.debugLine="cuantos_noventa = D.GetString(\"CUANTOS_NOVENTA\")";
_cuantos_noventa = _d.GetString("CUANTOS_NOVENTA");
 //BA.debugLineNum = 1623;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1624;BA.debugLine="cargar.Visible = False";
_cargar.setVisible(__c.False);
 //BA.debugLineNum = 1625;BA.debugLine="Subir.Visible = False";
_subir.setVisible(__c.False);
 //BA.debugLineNum = 1626;BA.debugLine="connecta.Visible = True";
_connecta.setVisible(__c.True);
 //BA.debugLineNum = 1627;BA.debugLine="inv.Visible = False";
_inv.setVisible(__c.False);
 //BA.debugLineNum = 1628;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 = 1630;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 = 1634;BA.debugLine="Log(\"XXXX\")";
__c.LogImpl("152887719","XXXX",0);
 //BA.debugLineNum = 1635;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 = 1638;BA.debugLine="End Sub";
return "";
}
public String  _checachek() throws Exception{
 //BA.debugLineNum = 799;BA.debugLine="Sub checachek";
 //BA.debugLineNum = 800;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 = 801;BA.debugLine="If b.RowCount > 0 Then";
if (_b.getRowCount()>0) { 
 //BA.debugLineNum = 802;BA.debugLine="b.Position = 0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 803;BA.debugLine="If b.GetString(\"CHECADO\") = 0 Then";
if ((_b.GetString("CHECADO")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 804;BA.debugLine="b_check.Visible = True";
_b_check.setVisible(__c.True);
 }else if((_b.GetString("CHECADO")).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 806;BA.debugLine="b_check.Visible =False";
_b_check.setVisible(__c.False);
 };
 //BA.debugLineNum = 808;BA.debugLine="b.Close";
_b.Close();
 };
 //BA.debugLineNum = 810;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, a As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_a = 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 = 81;BA.debugLine="Dim paso1 As String";
_paso1 = "";
 //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="Private P_CIEGO As Panel";
_p_ciego = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 125;BA.debugLine="Private B_PC_ENV As Button";
_b_pc_env = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 126;BA.debugLine="Private b_terpc As Button";
_b_terpc = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 127;BA.debugLine="Private CLV_PICK_CIEGO As CustomListView";
_clv_pick_ciego = new b4a.example3.customlistview();
 //BA.debugLineNum = 128;BA.debugLine="Private L_PICK_CIEGO As Label";
_l_pick_ciego = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 129;BA.debugLine="Private ET_PICK_CIEGO As EditText";
_et_pick_ciego = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 130;BA.debugLine="Private P_PICK_CIEGO As Panel";
_p_pick_ciego = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 131;BA.debugLine="Private L_CANT_PCIK As Label";
_l_cant_pcik = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 132;BA.debugLine="Private l_pagarescobrados As Label";
_l_pagarescobrados = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 133;BA.debugLine="Private l_pagaresnuevos As Label";
_l_pagaresnuevos = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 134;BA.debugLine="Private l_montoaliquidar As Label";
_l_montoaliquidar = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 135;BA.debugLine="Private Label21 As Label";
_label21 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 136;BA.debugLine="Private b_comodin As Button";
_b_comodin = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 137;BA.debugLine="Private p_validacion As Panel";
_p_validacion = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 138;BA.debugLine="Private b_cancelarcodigo As Button";
_b_cancelarcodigo = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 139;BA.debugLine="Private b_aceptar As Button";
_b_aceptar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 140;BA.debugLine="Private et_codigo As EditText";
_et_codigo = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 141;BA.debugLine="End Sub";
return "";
}
public String  _connecta_click() throws Exception{
 //BA.debugLineNum = 2585;BA.debugLine="Sub connecta_Click";
 //BA.debugLineNum = 2586;BA.debugLine="LogColor($\"ReqServer = ${B4XPages.MainPage.server";
__c.LogImpl("153149697",("ReqServer = "+__c.SmartStringFormatter("",(Object)(_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ ))+""),__c.Colors.Red);
 //BA.debugLineNum = 2587;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 = 2588;BA.debugLine="If e_ruta.Text <> \"\" Then";
if ((_e_ruta.getText()).equals("") == false) { 
 //BA.debugLineNum = 2589;BA.debugLine="imei = \"\" 'p.GetDeviceId";
_imei = "";
 //BA.debugLineNum = 2590;BA.debugLine="conn = \"1\"";
_conn = "1";
 //BA.debugLineNum = 2591;BA.debugLine="ime.HideKeyboard";
_ime.HideKeyboard(ba);
 //BA.debugLineNum = 2592;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 2593;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 2594;BA.debugLine="cmd.Name = \"select_version_IZCA\"";
_cmd.Name /*String*/  = "select_version_IZCA";
 //BA.debugLineNum = 2595;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"version\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("version"));
 //BA.debugLineNum = 2596;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 2597;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 2600;BA.debugLine="cmd.Name = \"select_ruta_re_REPG_IZCA4\"";
_cmd.Name /*String*/  = "select_ruta_re_REPG_IZCA4";
 //BA.debugLineNum = 2601;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 = 2602;BA.debugLine="Log($\"${ALMACEN}, ${e_ruta.text}, ${usuario}\"$)";
__c.LogImpl("153149713",(""+__c.SmartStringFormatter("",(Object)(_almacen))+", "+__c.SmartStringFormatter("",(Object)(_e_ruta.getText()))+", "+__c.SmartStringFormatter("",(Object)(_usuario))+""),0);
 //BA.debugLineNum = 2603;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"ruta\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("ruta"));
 //BA.debugLineNum = 2605;BA.debugLine="ToastMessageShow(\"Validando Conexión.\" , True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Validando Conexión."),__c.True);
 //BA.debugLineNum = 2606;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM RUTAA\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM RUTAA");
 //BA.debugLineNum = 2607;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 = 2608;BA.debugLine="B4XPages.MainPage.rutaPreventa = e_ruta.TEXT";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._rutapreventa /*String*/  = _e_ruta.getText();
 };
 //BA.debugLineNum = 2610;BA.debugLine="End Sub";
return "";
}
public String  _connecta_longclick() throws Exception{
 //BA.debugLineNum = 3874;BA.debugLine="Private Sub connecta_LongClick";
 //BA.debugLineNum = 3875;BA.debugLine="imp_LIQUIDACION";
_imp_liquidacion();
 //BA.debugLineNum = 3876;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.objects.PanelWrapper  _createlistitem(String _id_prod,String _prod,String _cant,String _cantreal) throws Exception{
anywheresoftware.b4a.objects.B4XViewWrapper _pa = null;
 //BA.debugLineNum = 3841;BA.debugLine="Sub CreateListItem(Id_prod As String, Prod As Stri";
 //BA.debugLineNum = 3842;BA.debugLine="Dim pa As B4XView = xui.CreatePanel(\"\")";
_pa = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pa = _xui.CreatePanel(ba,"");
 //BA.debugLineNum = 3843;BA.debugLine="pa.SetLayoutAnimated(0, 0, 0, 1, 10)";
_pa.SetLayoutAnimated((int) (0),(int) (0),(int) (0),(int) (1),(int) (10));
 //BA.debugLineNum = 3844;BA.debugLine="pa.LoadLayout(\"PANEL_PICK_CIEGO\")";
_pa.LoadLayout("PANEL_PICK_CIEGO",ba);
 //BA.debugLineNum = 3845;BA.debugLine="pa.Height = 55dip";
_pa.setHeight(__c.DipToCurrent((int) (55)));
 //BA.debugLineNum = 3846;BA.debugLine="pa.Width = 298dip";
_pa.setWidth(__c.DipToCurrent((int) (298)));
 //BA.debugLineNum = 3848;BA.debugLine="L_PICK_CIEGO.Text = Id_prod &  CRLF & Prod";
_l_pick_ciego.setText(BA.ObjectToCharSequence(_id_prod+__c.CRLF+_prod));
 //BA.debugLineNum = 3849;BA.debugLine="L_PICK_CIEGO.TextSize = 12";
_l_pick_ciego.setTextSize((float) (12));
 //BA.debugLineNum = 3850;BA.debugLine="L_PICK_CIEGO.Gravity = Bit.Or(Gravity.CENTER_VERT";
_l_pick_ciego.setGravity(__c.Bit.Or(__c.Gravity.CENTER_VERTICAL,__c.Gravity.CENTER_HORIZONTAL));
 //BA.debugLineNum = 3851;BA.debugLine="ET_PICK_CIEGO.Text = cant";
_et_pick_ciego.setText(BA.ObjectToCharSequence(_cant));
 //BA.debugLineNum = 3852;BA.debugLine="L_CANT_PCIK.Text = cantreal";
_l_cant_pcik.setText(BA.ObjectToCharSequence(_cantreal));
 //BA.debugLineNum = 3855;BA.debugLine="Return pa";
if (true) return (anywheresoftware.b4a.objects.PanelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.PanelWrapper(), (android.view.ViewGroup)(_pa.getObject()));
 //BA.debugLineNum = 3856;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4a.objects.PanelWrapper  _createlistitem2(String _id_prod,String _prod,String _cantreal) throws Exception{
anywheresoftware.b4a.objects.B4XViewWrapper _pa = null;
 //BA.debugLineNum = 3858;BA.debugLine="Sub CreateListItem2(Id_prod As String, Prod As Str";
 //BA.debugLineNum = 3859;BA.debugLine="Dim pa As B4XView = xui.CreatePanel(\"\")";
_pa = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pa = _xui.CreatePanel(ba,"");
 //BA.debugLineNum = 3860;BA.debugLine="pa.SetLayoutAnimated(0, 0, 0, 1, 10)";
_pa.SetLayoutAnimated((int) (0),(int) (0),(int) (0),(int) (1),(int) (10));
 //BA.debugLineNum = 3861;BA.debugLine="pa.LoadLayout(\"PANEL_PICK_CIEGO\")";
_pa.LoadLayout("PANEL_PICK_CIEGO",ba);
 //BA.debugLineNum = 3862;BA.debugLine="pa.Height = 55dip";
_pa.setHeight(__c.DipToCurrent((int) (55)));
 //BA.debugLineNum = 3863;BA.debugLine="pa.Width = 298dip";
_pa.setWidth(__c.DipToCurrent((int) (298)));
 //BA.debugLineNum = 3865;BA.debugLine="L_PICK_CIEGO.Text = Id_prod &  CRLF & Prod";
_l_pick_ciego.setText(BA.ObjectToCharSequence(_id_prod+__c.CRLF+_prod));
 //BA.debugLineNum = 3866;BA.debugLine="L_PICK_CIEGO.TextSize = 12";
_l_pick_ciego.setTextSize((float) (12));
 //BA.debugLineNum = 3867;BA.debugLine="L_PICK_CIEGO.Gravity = Bit.Or(Gravity.CENTER_VERT";
_l_pick_ciego.setGravity(__c.Bit.Or(__c.Gravity.CENTER_VERTICAL,__c.Gravity.CENTER_HORIZONTAL));
 //BA.debugLineNum = 3868;BA.debugLine="L_CANT_PCIK.Text = cantreal";
_l_cant_pcik.setText(BA.ObjectToCharSequence(_cantreal));
 //BA.debugLineNum = 3871;BA.debugLine="Return pa";
if (true) return (anywheresoftware.b4a.objects.PanelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.PanelWrapper(), (android.view.ViewGroup)(_pa.getObject()));
 //BA.debugLineNum = 3872;BA.debugLine="End Sub";
return null;
}
public String  _e_ruta_enterpressed() throws Exception{
 //BA.debugLineNum = 2626;BA.debugLine="Sub e_ruta_EnterPressed";
 //BA.debugLineNum = 2627;BA.debugLine="If e_ruta.Text = \"FIN DIA\" Then";
if ((_e_ruta.getText()).equals("FIN DIA")) { 
 //BA.debugLineNum = 2628;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 = 2629;BA.debugLine="If RES = DialogResponse.POSITIVE Then";
if ((_res).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
 //BA.debugLineNum = 2631;BA.debugLine="e_ruta.Text = \"\"";
_e_ruta.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 2632;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from PICK_CIE";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PICK_CIEGO");
 //BA.debugLineNum = 2633;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from REPARTO_";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from REPARTO_GEO");
 //BA.debugLineNum = 2634;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from pedido_c";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente");
 //BA.debugLineNum = 2635;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from PAGARES\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PAGARES");
 //BA.debugLineNum = 2636;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CHECADO_";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CHECADO_CHECK");
 //BA.debugLineNum = 2637;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CHECKLIS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CHECKLIST2");
 //BA.debugLineNum = 2638;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from pedido\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido");
 //BA.debugLineNum = 2639;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from noventa\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from noventa");
 //BA.debugLineNum = 2640;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from clie_act";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from clie_act");
 //BA.debugLineNum = 2641;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from kmt_info";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from kmt_info");
 //BA.debugLineNum = 2642;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cat_guna";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod");
 //BA.debugLineNum = 2643;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cat_guna";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod3");
 //BA.debugLineNum = 2644;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CAT_DETA";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CAT_DETALLES_PAQ");
 //BA.debugLineNum = 2645;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from HIST_VEN";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_VENTAS");
 //BA.debugLineNum = 2646;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from REPARTO\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from REPARTO");
 //BA.debugLineNum = 2647;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM TABULADO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM TABULADOR_MONEDAS");
 //BA.debugLineNum = 2648;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM TABULADO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM TABULADOR_BILLETES");
 //BA.debugLineNum = 2649;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM RUTAA\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM RUTAA");
 //BA.debugLineNum = 2650;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM ABONOSP\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM ABONOSP");
 //BA.debugLineNum = 2651;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM ABONOS\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM ABONOS");
 //BA.debugLineNum = 2652;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM BLOCKENV";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM BLOCKENVIO");
 //BA.debugLineNum = 2653;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 };
 //BA.debugLineNum = 2656;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from waypoints";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from waypoints");
 };
 //BA.debugLineNum = 2658;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[] _fechacap = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _ab = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _ab1 = null;
String[] _fechatabulador = null;
String _fechatabulador3 = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _d4 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _d5 = null;
String _restacant = "";
String[] _fecha1 = null;
String _fecha3 = "";
String _hora = "";
String _sdate = "";
String _stime = "";
 //BA.debugLineNum = 1071;BA.debugLine="Sub envioinfo";
 //BA.debugLineNum = 1076;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 = 1077;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 = 1078;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 1079;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 = 1080;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 1081;BA.debugLine="foto1 = c.GetBlob(\"NV_FOTO\")";
_foto1 = _c.GetBlob("NV_FOTO");
 //BA.debugLineNum = 1082;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1083;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1084;BA.debugLine="cmd.Name = \"insert_reparto_REPG_IZCA\"";
_cmd.Name /*String*/  = "insert_reparto_REPG_IZCA";
 //BA.debugLineNum = 1085;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 = 1086;BA.debugLine="reqManager.ExecuteCommand(cmd ,  \"inst_noventa_";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_noventa_"));
 }
};
 //BA.debugLineNum = 1088;BA.debugLine="c.Close";
_c.Close();
 };
 //BA.debugLineNum = 1090;BA.debugLine="d.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 1091;BA.debugLine="cuantos_noventa = D.GetString(\"CUANTOS_NOVENTA\")";
_cuantos_noventa = _d.GetString("CUANTOS_NOVENTA");
 //BA.debugLineNum = 1092;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1095;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 = 1096;BA.debugLine="If r.RowCount > 0 Then";
if (_r.getRowCount()>0) { 
 //BA.debugLineNum = 1097;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 = 1098;BA.debugLine="r.Position = rx";
_r.setPosition(_rx);
 //BA.debugLineNum = 1099;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 = 1100;BA.debugLine="If o.RowCount > 0 Then";
if (_o.getRowCount()>0) { 
 //BA.debugLineNum = 1101;BA.debugLine="o.Position = 0";
_o.setPosition((int) (0));
 //BA.debugLineNum = 1102;BA.debugLine="Log(\"Enviamos reprogramados: \" & r.RowCount)";
__c.LogImpl("152822047","Enviamos reprogramados: "+BA.NumberToString(_r.getRowCount()),0);
 //BA.debugLineNum = 1104;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1105;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1106;BA.debugLine="cmd.Name = \"insert_reparto_reprogramar3_IZCA\"";
_cmd.Name /*String*/  = "insert_reparto_reprogramar3_IZCA";
 //BA.debugLineNum = 1107;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 = 1108;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_reprogram";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("ins_reprogramar"));
 };
 }
};
 };
 //BA.debugLineNum = 1112;BA.debugLine="r.Close";
_r.Close();
 //BA.debugLineNum = 1169;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 PA_ALMACEN,PA_RUTA_REP,PA_RUTAPREV,PA_FECHA_PREV,PA_CAPTURA,PA_MONTO,PA_USUARIO,PA_CLIENTE from PAGARES")));
 //BA.debugLineNum = 1170;BA.debugLine="If pa.RowCount > 0 Then";
if (_pa.getRowCount()>0) { 
 //BA.debugLineNum = 1171;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 = 1172;BA.debugLine="pa.Position = pag";
_pa.setPosition(_pag);
 //BA.debugLineNum = 1173;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1174;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1175;BA.debugLine="cmd.Name = \"insert_reparto_PAGARES_IZCA_VN\"";
_cmd.Name /*String*/  = "insert_reparto_PAGARES_IZCA_VN";
 //BA.debugLineNum = 1176;BA.debugLine="Dim fechaenvio() As String";
_fechaenvio = new String[(int) (0)];
java.util.Arrays.fill(_fechaenvio,"");
 //BA.debugLineNum = 1177;BA.debugLine="fechaenvio = Regex.Split(\" \",pa.GetString(\"PA_F";
_fechaenvio = __c.Regex.Split(" ",_pa.GetString("PA_FECHA_PREV"));
 //BA.debugLineNum = 1184;BA.debugLine="Dim fechacap() As String";
_fechacap = new String[(int) (0)];
java.util.Arrays.fill(_fechacap,"");
 //BA.debugLineNum = 1185;BA.debugLine="fechacap = Regex.Split(\"/\",pa.GetString(\"PA_CAP";
_fechacap = __c.Regex.Split("/",_pa.GetString("PA_CAPTURA"));
 //BA.debugLineNum = 1191;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)(_fechaenvio[(int) (0)]),(Object)(_pa.GetString("PA_ALMACEN")),(Object)(_pa.GetString("PA_RUTAPREV")),(Object)(_pa.GetString("PA_RUTA_REP")),(Object)(_pa.GetString("PA_CAPTURA")),(Object)(_pa.GetString("PA_USUARIO")),(Object)("")};
 //BA.debugLineNum = 1193;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_pagares\")";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("ins_pagares"));
 }
};
 };
 //BA.debugLineNum = 1196;BA.debugLine="pa.Close";
_pa.Close();
 //BA.debugLineNum = 1199;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 = 1200;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 1201;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 and a_tipoabono IS NULL"))));
 //BA.debugLineNum = 1202;BA.debugLine="Log(ab.RowCount)";
__c.LogImpl("152822147",BA.NumberToString(_ab.getRowCount()),0);
 //BA.debugLineNum = 1203;BA.debugLine="If ab.RowCount > 0 Then";
if (_ab.getRowCount()>0) { 
 //BA.debugLineNum = 1204;BA.debugLine="For i=0 To ab.RowCount -1";
{
final int step56 = 1;
final int limit56 = (int) (_ab.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit56 ;_i = _i + step56 ) {
 //BA.debugLineNum = 1205;BA.debugLine="ab.Position = i";
_ab.setPosition(_i);
 //BA.debugLineNum = 1207;BA.debugLine="Dim ab1 As Cursor = Starter.skmt.ExecQuery($\"SE";
_ab1 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_ab1 = (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 a_abono from ABONOS where a_cliente = '"+__c.SmartStringFormatter("",(Object)(_ab.GetString("a_cliente")))+"' and a_tipoabono IS NULL"))));
 //BA.debugLineNum = 1208;BA.debugLine="ab1.Position = 0";
_ab1.setPosition((int) (0));
 //BA.debugLineNum = 1210;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1211;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1212;BA.debugLine="cmd.Name = \"insert_abono_REP_IZCA_VN2\"";
_cmd.Name /*String*/  = "insert_abono_REP_IZCA_VN2";
 //BA.debugLineNum = 1213;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)(_d.GetString("RUTAA")),(Object)(""),(Object)(_ab.GetString("TIPO_PAGO")),(Object)(_ab.GetString("a_ticket")),(Object)(_ab.GetString("a_numpago"))};
 //BA.debugLineNum = 1214;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"ins_abonosPen";
_reqmanager._executecommand /*String*/ (_cmd,(Object)(("ins_abonosPendientes_"+__c.SmartStringFormatter("",(Object)(_ab.GetString("a_cliente")))+"")));
 //BA.debugLineNum = 1215;BA.debugLine="ab1.Close";
_ab1.Close();
 //BA.debugLineNum = 1216;BA.debugLine="Log($\"ins_abonosPendientes_${ab.GetString(\"a_cl";
__c.LogImpl("152822161",("ins_abonosPendientes_"+__c.SmartStringFormatter("",(Object)(_ab.GetString("a_cliente")))+""),0);
 }
};
 };
 //BA.debugLineNum = 1219;BA.debugLine="ab.Close";
_ab.Close();
 //BA.debugLineNum = 1220;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1224;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 = 1225;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 1226;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 and a_tipoabono IS NOT NULL"))));
 //BA.debugLineNum = 1227;BA.debugLine="Log(ab.RowCount)";
__c.LogImpl("152822172",BA.NumberToString(_ab.getRowCount()),0);
 //BA.debugLineNum = 1228;BA.debugLine="If ab.RowCount > 0 Then";
if (_ab.getRowCount()>0) { 
 //BA.debugLineNum = 1229;BA.debugLine="For i=0 To ab.RowCount -1";
{
final int step76 = 1;
final int limit76 = (int) (_ab.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit76 ;_i = _i + step76 ) {
 //BA.debugLineNum = 1230;BA.debugLine="ab.Position = i";
_ab.setPosition(_i);
 //BA.debugLineNum = 1232;BA.debugLine="Dim ab1 As Cursor = Starter.skmt.ExecQuery($\"SE";
_ab1 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_ab1 = (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 a_abono from ABONOS where a_cliente = '"+__c.SmartStringFormatter("",(Object)(_ab.GetString("a_cliente")))+"' and a_tipoabono IS NOT NULL"))));
 //BA.debugLineNum = 1233;BA.debugLine="ab1.Position = 0";
_ab1.setPosition((int) (0));
 //BA.debugLineNum = 1235;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1236;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1237;BA.debugLine="cmd.Name = \"insert_abono_REP_IZCA_VN2\"";
_cmd.Name /*String*/  = "insert_abono_REP_IZCA_VN2";
 //BA.debugLineNum = 1238;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)(_d.GetString("RUTAA")),(Object)("1"),(Object)(_ab.GetString("TIPO_PAGO")),(Object)(_ab.GetString("a_ticket")),(Object)(_ab.GetString("a_numpago"))};
 //BA.debugLineNum = 1239;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"ins_abonosPen";
_reqmanager._executecommand /*String*/ (_cmd,(Object)(("ins_abonosPendientes_"+__c.SmartStringFormatter("",(Object)(_ab.GetString("a_cliente")))+"")));
 //BA.debugLineNum = 1240;BA.debugLine="ab1.Close";
_ab1.Close();
 //BA.debugLineNum = 1241;BA.debugLine="Log($\"ins_abonosPendientes_${ab.GetString(\"a_cl";
__c.LogImpl("152822186",("ins_abonosPendientes_"+__c.SmartStringFormatter("",(Object)(_ab.GetString("a_cliente")))+""),0);
 }
};
 };
 //BA.debugLineNum = 1244;BA.debugLine="ab.Close";
_ab.Close();
 //BA.debugLineNum = 1245;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1269;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 = 1270;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 1271;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step93 = 1;
final int limit93 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit93 ;_i = _i + step93 ) {
 //BA.debugLineNum = 1272;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 1273;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1274;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1275;BA.debugLine="cmd.Name = \"insert_pedido_REP_IZCA\"";
_cmd.Name /*String*/  = "insert_pedido_REP_IZCA";
 //BA.debugLineNum = 1276;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 = 1277;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_pedido_Inm";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("ins_pedido_Inmtex"));
 }
};
 //BA.debugLineNum = 1279;BA.debugLine="c.Close";
_c.Close();
 };
 //BA.debugLineNum = 1343;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT PC_ID_PROD, PC";
_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 PC_ID_PROD, PC_ALMACEN, PC_RUTA, PC_FECHA FROM PICK_CIEGO")));
 //BA.debugLineNum = 1344;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 1345;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step105 = 1;
final int limit105 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit105 ;_i = _i + step105 ) {
 //BA.debugLineNum = 1346;BA.debugLine="c.Position = i";
_c.setPosition(_i);
 //BA.debugLineNum = 1347;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1348;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1349;BA.debugLine="cmd.Name = \"select_HIST_PICKCIEGO_IZCA\" '";
_cmd.Name /*String*/  = "select_HIST_PICKCIEGO_IZCA";
 //BA.debugLineNum = 1350;BA.debugLine="cmd.Parameters = Array As Object(c.GetString(\"P";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_c.GetString("PC_ID_PROD")),(Object)(_c.GetString("PC_ALMACEN")),(Object)(_c.GetString("PC_RUTA")),(Object)(_c.GetString("PC_FECHA")),(Object)("REPARTO")};
 //BA.debugLineNum = 1351;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, $\"PICK_C_${c.G";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)(("PICK_C_"+__c.SmartStringFormatter("",(Object)(_c.GetString("PC_ID_PROD")))+"")));
 }
};
 };
 //BA.debugLineNum = 1354;BA.debugLine="c.close";
_c.Close();
 //BA.debugLineNum = 1357;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 = 1358;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 = 1359;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 = 1360;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 = 1361;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 1362;BA.debugLine="b.Position = 0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 1363;BA.debugLine="f.Position = 0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 1364;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 1365;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step123 = 1;
final int limit123 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit123 ;_i = _i + step123 ) {
 //BA.debugLineNum = 1366;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 1367;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1368;BA.debugLine="Dim fechatabulador() As String = Regex.Split(\"";
_fechatabulador = __c.Regex.Split(" ",_f.GetString("HVD_FECHA"));
 //BA.debugLineNum = 1370;BA.debugLine="Dim fechatabulador3 As String = fechatabulador(";
_fechatabulador3 = _fechatabulador[(int) (0)];
 //BA.debugLineNum = 1371;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1372;BA.debugLine="cmd.Name = \"insert_tabulador_monedas_IZCA\"";
_cmd.Name /*String*/  = "insert_tabulador_monedas_IZCA";
 //BA.debugLineNum = 1373;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 = 1374;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_tabulador_";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("ins_tabulador_mon"));
 }
};
 //BA.debugLineNum = 1376;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1377;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1378;BA.debugLine="b.Close";
_b.Close();
 //BA.debugLineNum = 1379;BA.debugLine="f.Close";
_f.Close();
 };
 //BA.debugLineNum = 1382;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT IFNULL(HVD_REC";
_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 IFNULL(HVD_RECHAZOCANT,0) AS HVD_RECHAZOCANT, HVD_CLIENTE, HVD_PROID, HVD_FECHA, HVD_CODPROMO, HVD_NUM_TICKET, HVD_CANT, CONSECUTIVO, BCAJAS, CANTC FROM HIST_VENTAS")));
 //BA.debugLineNum = 1383;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 1384;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step140 = 1;
final int limit140 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit140 ;_i = _i + step140 ) {
 //BA.debugLineNum = 1385;BA.debugLine="c.Position = i";
_c.setPosition(_i);
 //BA.debugLineNum = 1386;BA.debugLine="Log(c.GetString(\"HVD_CLIENTE\"))";
__c.LogImpl("152822331",_c.GetString("HVD_CLIENTE"),0);
 //BA.debugLineNum = 1387;BA.debugLine="Private d4 As Cursor = Starter.skmt.ExecQuery($";
_d4 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_d4 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("SELECT CAT_CL_RUTA FROM kmt_info WHERE CAT_CL_CODIGO = '"+__c.SmartStringFormatter("",(Object)(_c.GetString("HVD_CLIENTE")))+"'"))));
 //BA.debugLineNum = 1388;BA.debugLine="d4.Position = 0";
_d4.setPosition((int) (0));
 //BA.debugLineNum = 1389;BA.debugLine="Log(d4.GetString(\"CAT_CL_RUTA\"))";
__c.LogImpl("152822334",_d4.GetString("CAT_CL_RUTA"),0);
 //BA.debugLineNum = 1390;BA.debugLine="Private d5 As Cursor =  Starter.skmt.ExecQuery(";
_d5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_d5 = (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)(_c.GetString("HVD_CLIENTE")))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_c.GetString("HVD_PROID")))+"' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_c.GetString("CONSECUTIVO")))+"' and PE_TIPO NOT IN ('DANADO','FALTANTE','SOBRANTE') "))));
 //BA.debugLineNum = 1391;BA.debugLine="d5.Position = 0";
_d5.setPosition((int) (0));
 //BA.debugLineNum = 1392;BA.debugLine="Private restacant As String = d5.GetString(\"PE_";
_restacant = _d5.GetString("PE_CANT");
 //BA.debugLineNum = 1393;BA.debugLine="d5.Close";
_d5.Close();
 //BA.debugLineNum = 1395;BA.debugLine="Dim fecha1() As String = Regex.Split(\" \", c.Get";
_fecha1 = __c.Regex.Split(" ",_c.GetString("HVD_FECHA"));
 //BA.debugLineNum = 1397;BA.debugLine="Dim fecha3 As String = fecha1(0)";
_fecha3 = _fecha1[(int) (0)];
 //BA.debugLineNum = 1398;BA.debugLine="Log(fecha3)";
__c.LogImpl("152822343",_fecha3,0);
 //BA.debugLineNum = 1399;BA.debugLine="Dim hora As String = fecha1(1)";
_hora = _fecha1[(int) (1)];
 //BA.debugLineNum = 1402;BA.debugLine="Dim sDate, sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 1403;BA.debugLine="DateTime.DateFormat = \"dd/MM/yyyy\"";
__c.DateTime.setDateFormat("dd/MM/yyyy");
 //BA.debugLineNum = 1404;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 1405;BA.debugLine="sDate = DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 1406;BA.debugLine="sTime = DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 1407;BA.debugLine="If c.GetString(\"HVD_RECHAZOCANT\") <> \"0\" Then";
if ((_c.GetString("HVD_RECHAZOCANT")).equals("0") == false) { 
 //BA.debugLineNum = 1408;BA.debugLine="Log((c.GetString(\"HVD_RECHAZOCANT\")-restacant)";
__c.LogImpl("152822353",BA.NumberToString(((double)(Double.parseDouble(_c.GetString("HVD_RECHAZOCANT")))-(double)(Double.parseDouble(_restacant)))),0);
 //BA.debugLineNum = 1409;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1410;BA.debugLine="cmd.Name = \"update_HVD_izcarep2\"";
_cmd.Name /*String*/  = "update_HVD_izcarep2";
 //BA.debugLineNum = 1411;BA.debugLine="cmd.Parameters = Array As String(c.GetString(\"";
_cmd.Parameters /*Object[]*/  = (Object[])(new String[]{_c.GetString("HVD_RECHAZOCANT"),_sdate+" "+_stime,BA.NumberToString(1),_c.GetString("HVD_CLIENTE"),_c.GetString("HVD_PROID"),_fecha3+" "+_hora,_d4.GetString("CAT_CL_RUTA"),_almacen,_l_ruta.getText(),_c.GetString("HVD_CODPROMO"),_c.GetString("HVD_NUM_TICKET"),_c.GetString("HVD_CANT")});
 //BA.debugLineNum = 1412;BA.debugLine="reqManager.ExecuteCommand(cmd, \"update_hvd\")";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("update_hvd"));
 }else {
 //BA.debugLineNum = 1414;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1415;BA.debugLine="cmd.Name = \"update_HVD_izcarep2\"";
_cmd.Name /*String*/  = "update_HVD_izcarep2";
 //BA.debugLineNum = 1416;BA.debugLine="Log( c.GetString(\"CANTC\")& c.GetString(\"HVD_CL";
__c.LogImpl("152822361",_c.GetString("CANTC")+_c.GetString("HVD_CLIENTE")+_c.GetString("HVD_PROID")+_fecha3+" "+_hora+_d4.GetString("CAT_CL_RUTA")+_almacen+_l_ruta.getText()+_c.GetString("HVD_CODPROMO")+_c.GetString("HVD_NUM_TICKET")+_c.GetString("HVD_CANT"),0);
 //BA.debugLineNum = 1417;BA.debugLine="cmd.Parameters = Array As String(\"\",\"\",\"\", c.G";
_cmd.Parameters /*Object[]*/  = (Object[])(new String[]{"","","",_c.GetString("HVD_CLIENTE"),_c.GetString("HVD_PROID"),_fecha3+" "+_hora,_d4.GetString("CAT_CL_RUTA"),_almacen,_l_ruta.getText(),_c.GetString("HVD_CODPROMO"),_c.GetString("HVD_NUM_TICKET"),_c.GetString("HVD_CANT")});
 //BA.debugLineNum = 1418;BA.debugLine="reqManager.ExecuteCommand(cmd, \"update_hvd\")";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("update_hvd"));
 };
 //BA.debugLineNum = 1420;BA.debugLine="d4.Close";
_d4.Close();
 }
};
 };
 //BA.debugLineNum = 1423;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1426;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 = 1427;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 = 1428;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 = 1429;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 = 1430;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 1431;BA.debugLine="b.Position = 0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 1432;BA.debugLine="f.Position = 0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 1433;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 1434;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step184 = 1;
final int limit184 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit184 ;_i = _i + step184 ) {
 //BA.debugLineNum = 1435;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 1436;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1441;BA.debugLine="Dim fechatabulador() As String = Regex.Split(\"";
_fechatabulador = __c.Regex.Split(" ",_f.GetString("HVD_FECHA"));
 //BA.debugLineNum = 1443;BA.debugLine="Dim fechatabulador3 As String = fechatabulador(";
_fechatabulador3 = _fechatabulador[(int) (0)];
 //BA.debugLineNum = 1445;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1446;BA.debugLine="cmd.Name = \"insert_tabulador_billetes_IZCA\"";
_cmd.Name /*String*/  = "insert_tabulador_billetes_IZCA";
 //BA.debugLineNum = 1447;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 = 1448;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_tabulador_";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("ins_tabulador_bill"));
 }
};
 //BA.debugLineNum = 1450;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1451;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1452;BA.debugLine="b.Close";
_b.Close();
 //BA.debugLineNum = 1453;BA.debugLine="f.Close";
_f.Close();
 };
 //BA.debugLineNum = 1457;BA.debugLine="imp_LIQUIDACION";
_imp_liquidacion();
 //BA.debugLineNum = 1459;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1460;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1461;BA.debugLine="cmd.Name = \"insert_drop_rep_IZCA2\"";
_cmd.Name /*String*/  = "insert_drop_rep_IZCA2";
 //BA.debugLineNum = 1462;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 = 1463;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_drop\")";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_drop"));
 //BA.debugLineNum = 1464;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 = 1465;BA.debugLine="End Sub";
return "";
}
public void  _imp_liquidacion() throws Exception{
ResumableSub_imp_LIQUIDACION rsub = new ResumableSub_imp_LIQUIDACION(this);
rsub.resume(ba, null);
}
public static class ResumableSub_imp_LIQUIDACION extends BA.ResumableSub {
public ResumableSub_imp_LIQUIDACION(reparto_izca.keymon.lat.c_principal parent) {
this.parent = parent;
}
reparto_izca.keymon.lat.c_principal parent;
int _cont = 0;
String _sdate = "";
String _stime = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _abonoscreditos = null;
int _g = 0;
int _j = 0;
int _resultado = 0;
int step49;
int limit49;
int step53;
int limit53;
int step75;
int limit75;
int step79;
int limit79;

@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 = 935;BA.debugLine="ProgressDialogShow(\"Imprimiendo, un momento ...\")";
parent.__c.ProgressDialogShow(ba,BA.ObjectToCharSequence("Imprimiendo, un momento ..."));
 //BA.debugLineNum = 936;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 937;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 = 939;BA.debugLine="Printer1.Connect";
parent._printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 940;BA.debugLine="Private cont As Int = 0";
_cont = (int) (0);
 //BA.debugLineNum = 941;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 = 942;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 69;
return;
case 69:
//C
this.state = 7;
;
 //BA.debugLineNum = 943;BA.debugLine="cont = cont + 1";
_cont = (int) (_cont+1);
 //BA.debugLineNum = 944;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 = 945;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 = 947;BA.debugLine="Sleep(500)";
parent.__c.Sleep(ba,this,(int) (500));
this.state = 70;
return;
case 70:
//C
this.state = 38;
;
 //BA.debugLineNum = 948;BA.debugLine="impresoraConectada = False";
parent._impresoraconectada = parent.__c.False;
 if (true) break;

case 21:
//C
this.state = 22;
 //BA.debugLineNum = 951;BA.debugLine="Printer1.Connect";
parent._printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 952;BA.debugLine="Private cont As Int = 0";
_cont = (int) (0);
 //BA.debugLineNum = 953;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 = 954;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 71;
return;
case 71:
//C
this.state = 25;
;
 //BA.debugLineNum = 955;BA.debugLine="cont = cont + 1";
_cont = (int) (_cont+1);
 //BA.debugLineNum = 956;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 = 957;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 = 959;BA.debugLine="Sleep(500)";
parent.__c.Sleep(ba,this,(int) (500));
this.state = 72;
return;
case 72:
//C
this.state = 38;
;
 //BA.debugLineNum = 960;BA.debugLine="impresoraConectada = False";
parent._impresoraconectada = parent.__c.False;
 if (true) break;

case 38:
//C
this.state = 39;
;
 //BA.debugLineNum = 963;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 964;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 965;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 966;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 967;BA.debugLine="Dim sDate, sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 968;BA.debugLine="DateTime.DateFormat = \"dd/MM/yyyy\"";
parent.__c.DateTime.setDateFormat("dd/MM/yyyy");
 //BA.debugLineNum = 969;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
parent.__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 970;BA.debugLine="sDate = DateTime.Date(DateTime.Now)";
_sdate = parent.__c.DateTime.Date(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 971;BA.debugLine="sTime = DateTime.Time(DateTime.Now)";
_stime = parent.__c.DateTime.Time(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 972;BA.debugLine="Printer1.WriteString(\"Fecha: \" &sDate & CRLF)";
parent._printer1._writestring /*String*/ ("Fecha: "+_sdate+parent.__c.CRLF);
 //BA.debugLineNum = 973;BA.debugLine="Printer1.WriteString(\"Hora: \" &sTime & CRLF)";
parent._printer1._writestring /*String*/ ("Hora: "+_stime+parent.__c.CRLF);
 //BA.debugLineNum = 974;BA.debugLine="Printer1.WriteString(\"Ruta: \" & l_ruta.Text & CRL";
parent._printer1._writestring /*String*/ ("Ruta: "+parent._l_ruta.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 975;BA.debugLine="Printer1.WriteString(\"Usuario: \" & Subs.dameUsuar";
parent._printer1._writestring /*String*/ ("Usuario: "+parent._subs._dameusuariodedb /*String*/ (ba)+parent.__c.CRLF);
 //BA.debugLineNum = 976;BA.debugLine="Printer1.WriteString(\"----------LIQUIDACION------";
parent._printer1._writestring /*String*/ ("----------LIQUIDACION----------"+parent.__c.CRLF);
 //BA.debugLineNum = 977;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("--------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 979;BA.debugLine="Printer1.WriteString(\"Monto entregado: $\" & L_MON";
parent._printer1._writestring /*String*/ ("Monto entregado: $"+parent._l_montoe.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 980;BA.debugLine="Printer1.WriteString(\"Monto rechazado: $\" & l_rec";
parent._printer1._writestring /*String*/ ("Monto rechazado: $"+parent._l_rechazo.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 981;BA.debugLine="Printer1.WriteString(\"Pagares cobrados: $\" & l_pa";
parent._printer1._writestring /*String*/ ("Pagares cobrados: $"+parent._l_pagarescobrados.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 983;BA.debugLine="If l_pagarescobrados.Text > 0 Then";
if (true) break;

case 39:
//if
this.state = 50;
if ((double)(Double.parseDouble(parent._l_pagarescobrados.getText()))>0) { 
this.state = 41;
}if (true) break;

case 41:
//C
this.state = 42;
 //BA.debugLineNum = 984;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("--------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 985;BA.debugLine="Printer1.WriteString(\"   Cliente             Abo";
parent._printer1._writestring /*String*/ ("   Cliente             Abono"+parent.__c.CRLF);
 //BA.debugLineNum = 986;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("--------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 988;BA.debugLine="Dim abonoscreditos As Cursor = Starter.skmt.Exec";
_abonoscreditos = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_abonoscreditos = (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 a_abono, length(a_abono) as L_abono ,  length(a_cliente) as L_cliente , a_cliente FROM ABONOS ORDER BY a_cliente")));
 //BA.debugLineNum = 989;BA.debugLine="For g = 0 To abonoscreditos.RowCount -1";
if (true) break;

case 42:
//for
this.state = 49;
step49 = 1;
limit49 = (int) (_abonoscreditos.getRowCount()-1);
_g = (int) (0) ;
this.state = 73;
if (true) break;

case 73:
//C
this.state = 49;
if ((step49 > 0 && _g <= limit49) || (step49 < 0 && _g >= limit49)) this.state = 44;
if (true) break;

case 74:
//C
this.state = 73;
_g = ((int)(0 + _g + step49)) ;
if (true) break;

case 44:
//C
this.state = 45;
 //BA.debugLineNum = 990;BA.debugLine="abonoscreditos.Position = g";
_abonoscreditos.setPosition(_g);
 //BA.debugLineNum = 992;BA.debugLine="TAMANO = abonoscreditos.GetInt(\"L_abono\") + TAM";
parent._tamano = (int) (_abonoscreditos.GetInt("L_abono")+parent._tamano);
 //BA.debugLineNum = 993;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 995;BA.debugLine="For j =0 To ESPACIO -1";
if (true) break;

case 45:
//for
this.state = 48;
step53 = 1;
limit53 = (int) (parent._espacio-1);
_j = (int) (0) ;
this.state = 75;
if (true) break;

case 75:
//C
this.state = 48;
if ((step53 > 0 && _j <= limit53) || (step53 < 0 && _j >= limit53)) this.state = 47;
if (true) break;

case 76:
//C
this.state = 75;
_j = ((int)(0 + _j + step53)) ;
if (true) break;

case 47:
//C
this.state = 76;
 //BA.debugLineNum = 996;BA.debugLine="BLANCO = \" \" & BLANCO";
parent._blanco = " "+parent._blanco;
 if (true) break;
if (true) break;

case 48:
//C
this.state = 74;
;
 //BA.debugLineNum = 998;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 999;BA.debugLine="Printer1.WriteString( abonoscreditos.GetString(";
parent._printer1._writestring /*String*/ (_abonoscreditos.GetString("a_cliente")+parent._blanco);
 //BA.debugLineNum = 1000;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 1001;BA.debugLine="Printer1.WriteString( abonoscreditos.GetString(";
parent._printer1._writestring /*String*/ (_abonoscreditos.GetString("a_abono"));
 //BA.debugLineNum = 1002;BA.debugLine="Printer1.WriteString( CRLF)";
parent._printer1._writestring /*String*/ (parent.__c.CRLF);
 //BA.debugLineNum = 1003;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 1004;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 1005;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 1006;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 if (true) break;
if (true) break;

case 49:
//C
this.state = 50;
;
 //BA.debugLineNum = 1008;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("--------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 1009;BA.debugLine="Printer1.WriteString( CRLF)";
parent._printer1._writestring /*String*/ (parent.__c.CRLF);
 if (true) break;

case 50:
//C
this.state = 51;
;
 //BA.debugLineNum = 1011;BA.debugLine="Printer1.WriteString(\"Pagares nuevos: $\" & l_paga";
parent._printer1._writestring /*String*/ ("Pagares nuevos: $"+parent._l_pagaresnuevos.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 1013;BA.debugLine="If l_pagaresnuevos.Text > 0 Then";
if (true) break;

case 51:
//if
this.state = 62;
if ((double)(Double.parseDouble(parent._l_pagaresnuevos.getText()))>0) { 
this.state = 53;
}if (true) break;

case 53:
//C
this.state = 54;
 //BA.debugLineNum = 1014;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("--------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 1015;BA.debugLine="Printer1.WriteString(\"   Cliente             Pag";
parent._printer1._writestring /*String*/ ("   Cliente             Pagare"+parent.__c.CRLF);
 //BA.debugLineNum = 1016;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("--------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 1018;BA.debugLine="Dim abonoscreditos As Cursor = Starter.skmt.Exec";
_abonoscreditos = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_abonoscreditos = (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 PA_MONTO, length(PA_MONTO) as L_PA_MONTO ,  length(PA_CLIENTE) as L_cliente , PA_CLIENTE FROM PAGARES ORDER BY PA_CLIENTE")));
 //BA.debugLineNum = 1019;BA.debugLine="For g = 0 To abonoscreditos.RowCount -1";
if (true) break;

case 54:
//for
this.state = 61;
step75 = 1;
limit75 = (int) (_abonoscreditos.getRowCount()-1);
_g = (int) (0) ;
this.state = 77;
if (true) break;

case 77:
//C
this.state = 61;
if ((step75 > 0 && _g <= limit75) || (step75 < 0 && _g >= limit75)) this.state = 56;
if (true) break;

case 78:
//C
this.state = 77;
_g = ((int)(0 + _g + step75)) ;
if (true) break;

case 56:
//C
this.state = 57;
 //BA.debugLineNum = 1020;BA.debugLine="abonoscreditos.Position = g";
_abonoscreditos.setPosition(_g);
 //BA.debugLineNum = 1022;BA.debugLine="TAMANO = abonoscreditos.GetInt(\"L_PA_MONTO\") +";
parent._tamano = (int) (_abonoscreditos.GetInt("L_PA_MONTO")+parent._tamano);
 //BA.debugLineNum = 1023;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 1025;BA.debugLine="For j =0 To ESPACIO -1";
if (true) break;

case 57:
//for
this.state = 60;
step79 = 1;
limit79 = (int) (parent._espacio-1);
_j = (int) (0) ;
this.state = 79;
if (true) break;

case 79:
//C
this.state = 60;
if ((step79 > 0 && _j <= limit79) || (step79 < 0 && _j >= limit79)) this.state = 59;
if (true) break;

case 80:
//C
this.state = 79;
_j = ((int)(0 + _j + step79)) ;
if (true) break;

case 59:
//C
this.state = 80;
 //BA.debugLineNum = 1026;BA.debugLine="BLANCO = \" \" & BLANCO";
parent._blanco = " "+parent._blanco;
 if (true) break;
if (true) break;

case 60:
//C
this.state = 78;
;
 //BA.debugLineNum = 1028;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 1029;BA.debugLine="Printer1.WriteString( abonoscreditos.GetString(";
parent._printer1._writestring /*String*/ (_abonoscreditos.GetString("PA_CLIENTE")+parent._blanco);
 //BA.debugLineNum = 1030;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 1031;BA.debugLine="Printer1.WriteString( abonoscreditos.GetString(";
parent._printer1._writestring /*String*/ (_abonoscreditos.GetString("PA_MONTO"));
 //BA.debugLineNum = 1032;BA.debugLine="Printer1.WriteString( CRLF)";
parent._printer1._writestring /*String*/ (parent.__c.CRLF);
 //BA.debugLineNum = 1033;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 1034;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 1035;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 1036;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 if (true) break;
if (true) break;

case 61:
//C
this.state = 62;
;
 //BA.debugLineNum = 1038;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("--------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 1039;BA.debugLine="Printer1.WriteString( CRLF)";
parent._printer1._writestring /*String*/ (parent.__c.CRLF);
 if (true) break;

case 62:
//C
this.state = 63;
;
 //BA.debugLineNum = 1041;BA.debugLine="Printer1.WriteString(\"Monto a liquidar: $\" & l_mo";
parent._printer1._writestring /*String*/ ("Monto a liquidar: $"+parent._l_montoaliquidar.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 1050;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 1051;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 1052;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1053;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1054;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1055;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1056;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 81;
return;
case 81:
//C
this.state = 63;
;
 //BA.debugLineNum = 1057;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 1058;BA.debugLine="ProgressDialogHide";
parent.__c.ProgressDialogHide();
 //BA.debugLineNum = 1061;BA.debugLine="Msgbox2Async(\"Deseas imprimir de nuevo el ticket?";
parent.__c.Msgbox2Async(BA.ObjectToCharSequence("Deseas imprimir de nuevo el ticket?"),BA.ObjectToCharSequence("ATENCION"),"SI","","NO",parent.__c.LoadBitmap(parent.__c.File.getDirAssets(),"alert2.png"),ba,parent.__c.False);
 //BA.debugLineNum = 1062;BA.debugLine="Wait For Msgbox_Result (resultado As Int)";
parent.__c.WaitFor("msgbox_result", ba, this, null);
this.state = 82;
return;
case 82:
//C
this.state = 63;
_resultado = (Integer) result[0];
;
 //BA.debugLineNum = 1063;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
if (true) break;

case 63:
//if
this.state = 68;
if (_resultado==parent.__c.DialogResponse.POSITIVE) { 
this.state = 65;
}else {
this.state = 67;
}if (true) break;

case 65:
//C
this.state = 68;
 //BA.debugLineNum = 1064;BA.debugLine="imp_LIQUIDACION";
parent._imp_liquidacion();
 if (true) break;

case 67:
//C
this.state = 68;
 if (true) break;

case 68:
//C
this.state = -1;
;
 //BA.debugLineNum = 1068;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public void  _msgbox_result(int _resultado) throws Exception{
}
public Object  _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
 //BA.debugLineNum = 144;BA.debugLine="Public Sub Initialize As Object";
 //BA.debugLineNum = 145;BA.debugLine="Return Me";
if (true) return this;
 //BA.debugLineNum = 146;BA.debugLine="End Sub";
return null;
}
public String  _inv_click() throws Exception{
 //BA.debugLineNum = 2660;BA.debugLine="Sub inv_Click";
 //BA.debugLineNum = 2661;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 = 2662;BA.debugLine="End Sub";
return "";
}
public boolean  _isconnectedtointernet() throws Exception{
anywheresoftware.b4a.agraham.reflection.Reflection _r = null;
 //BA.debugLineNum = 812;BA.debugLine="Sub IsConnectedToInternet As Boolean 'ignore";
 //BA.debugLineNum = 813;BA.debugLine="Dim r As Reflector";
_r = new anywheresoftware.b4a.agraham.reflection.Reflection();
 //BA.debugLineNum = 814;BA.debugLine="r.Target = r.GetContext";
_r.Target = (Object)(_r.GetContext(ba));
 //BA.debugLineNum = 815;BA.debugLine="r.Target = r.RunMethod2(\"getSystemService\", \"conn";
_r.Target = _r.RunMethod2("getSystemService","connectivity","java.lang.String");
 //BA.debugLineNum = 816;BA.debugLine="r.Target = r.RunMethod(\"getActiveNetworkInfo\")";
_r.Target = _r.RunMethod("getActiveNetworkInfo");
 //BA.debugLineNum = 817;BA.debugLine="If r.Target <> Null Then";
if (_r.Target!= null) { 
 //BA.debugLineNum = 818;BA.debugLine="Return r.RunMethod(\"isConnectedOrConnecting\")";
if (true) return BA.ObjectToBoolean(_r.RunMethod("isConnectedOrConnecting"));
 };
 //BA.debugLineNum = 820;BA.debugLine="Return False";
if (true) return __c.False;
 //BA.debugLineNum = 821;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 _id = "";
String _cuenta = "";
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 _hvd_bcredito = "";
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 _name = "";
String _k = "";
int _i = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c3 = null;
String _resta = "";
 //BA.debugLineNum = 1824;BA.debugLine="Sub JobDone(Job As HttpJob)";
 //BA.debugLineNum = 1826;BA.debugLine="If Job.Success = False Then";
if (_job._success /*boolean*/ ==__c.False) { 
 //BA.debugLineNum = 1827;BA.debugLine="LogColor(\"** \" & Job.Tag & \" Error: \" & Job.Erro";
__c.LogImpl("153018627","** "+BA.ObjectToString(_job._tag /*Object*/ )+" Error: "+_job._errormessage /*String*/ ,__c.Colors.Red);
 }else {
 //BA.debugLineNum = 1830;BA.debugLine="LogColor(\"JobDone: '\" & reqManager.HandleJob(Job";
__c.LogImpl("153018630","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 = 1831;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1832;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1833;BA.debugLine="If result.Tag = \"kmt_datos\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("kmt_datos"))) { 
 //BA.debugLineNum = 1834;BA.debugLine="If reqs.IndexOf(\"kmt_datos\") > -1 Then";
if (_reqs.IndexOf((Object)("kmt_datos"))>-1) { 
 //BA.debugLineNum = 1835;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"kmt_datos\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("kmt_datos")));
 };
 //BA.debugLineNum = 1838;BA.debugLine="Starter.skmt.BeginTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .BeginTransaction();
 //BA.debugLineNum = 1840;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 = 1841;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 = 1842;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 = 1843;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 = 1844;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 = 1845;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 = 1846;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 = 1847;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 = 1848;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 = 1849;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 = 1850;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 = 1851;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 = 1852;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 = 1853;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 = 1854;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 = 1855;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 = 1856;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 = 1857;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 = 1858;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 = 1859;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 = 1862;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 = 1864;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO kmt_in";
_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,SECUENCIA) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,0,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(63403),(Object)(1000),(Object)("PRODUCTO DAÑADO"),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)("-98.8357694"),(Object)("19.6906052"),(Object)("0"),(Object)("1")}));
 //BA.debugLineNum = 1865;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO kmt_in";
_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,SECUENCIA) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,0,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(100000),(Object)(1000),(Object)("CLIENTE COMODIN"),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)("-98.8357694"),(Object)("19.6906052"),(Object)("0"),(Object)("1")}));
 //BA.debugLineNum = 1867;BA.debugLine="Starter.skmt.TransactionSuccessful";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .TransactionSuccessful();
 //BA.debugLineNum = 1868;BA.debugLine="Starter.skmt.EndTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .EndTransaction();
 //BA.debugLineNum = 1869;BA.debugLine="Listo1 = 1";
_listo1 = BA.NumberToString(1);
 //BA.debugLineNum = 1870;BA.debugLine="If Listo1 = 1  And Listo3 = 1  Then";
if ((_listo1).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1871;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 1872;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1873;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1874;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 };
 //BA.debugLineNum = 1878;BA.debugLine="t8.Initialize(\"t8\", 20000) ' 1000 = 1 second";
_t8.Initialize(ba,"t8",(long) (20000));
 //BA.debugLineNum = 1879;BA.debugLine="t8.Enabled = True";
_t8.setEnabled(__c.True);
 };
 };
 //BA.debugLineNum = 1884;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1885;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1886;BA.debugLine="If result.Tag = \"select_abonosp\" Then 'query ta";
if ((_result.Tag /*Object*/ ).equals((Object)("select_abonosp"))) { 
 //BA.debugLineNum = 1887;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM ABONOSP";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM ABONOSP");
 //BA.debugLineNum = 1888;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group53 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen53 = group53.getSize()
;int index53 = 0;
;
for (; index53 < groupLen53;index53++){
_records = (Object[])(group53.Get(index53));
 //BA.debugLineNum = 1889;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 = 1890;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 = 1891;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 = 1893;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 = 1898;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1899;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1900;BA.debugLine="If result.Tag = \"CONTEO_DATOS\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("CONTEO_DATOS"))) { 
 //BA.debugLineNum = 1901;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group64 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen64 = group64.getSize()
;int index64 = 0;
;
for (; index64 < groupLen64;index64++){
_records = (Object[])(group64.Get(index64));
 //BA.debugLineNum = 1902;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 = 1903;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 = 1908;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 WHERE CAT_CL_CODIGO NOT IN ('63403','100000') ")));
 //BA.debugLineNum = 1909;BA.debugLine="clientes.Position = 0";
_clientes.setPosition((int) (0));
 //BA.debugLineNum = 1911;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 = 1912;BA.debugLine="detalleventa.Position = 0";
_detalleventa.setPosition((int) (0));
 //BA.debugLineNum = 1914;BA.debugLine="Log(CONTEO_CAT)";
__c.LogImpl("153018714",_conteo_cat,0);
 //BA.debugLineNum = 1915;BA.debugLine="Log(clientes.GetString(\"clientes\"))";
__c.LogImpl("153018715",_clientes.GetString("clientes"),0);
 //BA.debugLineNum = 1916;BA.debugLine="If clientes.GetString(\"clientes\") = CONTEO_CAT";
if ((_clientes.GetString("clientes")).equals(_conteo_cat)) { 
 //BA.debugLineNum = 1917;BA.debugLine="PB_carga2.Progress = 100";
_pb_carga2.setProgress((int) (100));
 //BA.debugLineNum = 1918;BA.debugLine="l_carga2.Text = \"LISTO\"";
_l_carga2.setText(BA.ObjectToCharSequence("LISTO"));
 }else {
 };
 //BA.debugLineNum = 1923;BA.debugLine="Log(DETALLE)";
__c.LogImpl("153018723",_detalle,0);
 //BA.debugLineNum = 1924;BA.debugLine="Log(detalleventa.GetString(\"detalle\"))";
__c.LogImpl("153018724",_detalleventa.GetString("detalle"),0);
 //BA.debugLineNum = 1925;BA.debugLine="If detalleventa.GetString(\"detalle\") = DETALLE";
if ((_detalleventa.GetString("detalle")).equals(_detalle)) { 
 //BA.debugLineNum = 1926;BA.debugLine="PB_carga.Progress = 100";
_pb_carga.setProgress((int) (100));
 //BA.debugLineNum = 1927;BA.debugLine="L_carga.Text = \"LISTO\"";
_l_carga.setText(BA.ObjectToCharSequence("LISTO"));
 }else {
 };
 //BA.debugLineNum = 1932;BA.debugLine="clientes.Close";
_clientes.Close();
 //BA.debugLineNum = 1933;BA.debugLine="detalleventa.Close";
_detalleventa.Close();
 };
 };
 //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.As(String).IndexOf(\"PICK_C_\") > -";
if ((BA.ObjectToString(_result.Tag /*Object*/ )).indexOf("PICK_C_")>-1) { 
 //BA.debugLineNum = 1942;BA.debugLine="Private id As String= result.Tag";
_id = BA.ObjectToString(_result.Tag /*Object*/ );
 //BA.debugLineNum = 1943;BA.debugLine="id = id.SubString(id.IndexOf(\"_\")+3)";
_id = _id.substring((int) (_id.indexOf("_")+3));
 //BA.debugLineNum = 1944;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 = 1945;BA.debugLine="Dim CUENTA As String = records(result.Columns";
_cuenta = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CUENTA"))))]);
 //BA.debugLineNum = 1946;BA.debugLine="Log(CUENTA)";
__c.LogImpl("153018746",_cuenta,0);
 //BA.debugLineNum = 1947;BA.debugLine="Log(id)";
__c.LogImpl("153018747",_id,0);
 //BA.debugLineNum = 1948;BA.debugLine="If CUENTA = 0 Then";
if ((_cuenta).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 1949;BA.debugLine="c = Starter.skmt.ExecQuery2(\"SELECT * FROM P";
_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 * FROM PICK_CIEGO WHERE PC_ID_PROD = ?",new String[]{_id})));
 //BA.debugLineNum = 1950;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 1952;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1953;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1954;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1955;BA.debugLine="cmd.Name = \"insert_PICKCIEGO_IZCA\"";
_cmd.Name /*String*/  = "insert_PICKCIEGO_IZCA";
 //BA.debugLineNum = 1956;BA.debugLine="cmd.Parameters = Array As Object(c.GetStrin";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_c.GetString("PC_ID_PROD")),(Object)(_c.GetString("PC_NOM_PROD")),(Object)(_c.GetString("PC_CANT")),(Object)(_c.GetString("PC_ALMACEN")),(Object)(_c.GetString("PC_RUTA")),(Object)(_c.GetString("PC_FECHA")),(Object)("REPARTO")};
 //BA.debugLineNum = 1957;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_PC\")";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("ins_PC"));
 };
 //BA.debugLineNum = 1960;BA.debugLine="c.Close";
_c.Close();
 }else if((double)(Double.parseDouble(_cuenta))>0) { 
 //BA.debugLineNum = 1962;BA.debugLine="c = Starter.skmt.ExecQuery2(\"SELECT * FROM P";
_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 * FROM PICK_CIEGO WHERE PC_ID_PROD= ?",new String[]{_id})));
 //BA.debugLineNum = 1963;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 1965;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1966;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_izca.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1967;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1968;BA.debugLine="cmd.Name = \"update_PICKCIEGO_IZCA\"";
_cmd.Name /*String*/  = "update_PICKCIEGO_IZCA";
 //BA.debugLineNum = 1969;BA.debugLine="Log(\"FECHA\" & c.GetString(\"PC_FECHA\"))";
__c.LogImpl("153018769","FECHA"+_c.GetString("PC_FECHA"),0);
 //BA.debugLineNum = 1970;BA.debugLine="cmd.Parameters = Array As Object(c.GetStrin";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_c.GetString("PC_CANT")),(Object)(_c.GetString("PC_ID_PROD")),(Object)(_c.GetString("PC_ALMACEN")),(Object)(_c.GetString("PC_RUTA")),(Object)(_c.GetString("PC_FECHA")),(Object)("REPARTO")};
 //BA.debugLineNum = 1971;BA.debugLine="reqManager.ExecuteCommand(cmd, \"update_PC\")";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("update_PC"));
 };
 //BA.debugLineNum = 1974;BA.debugLine="c.Close";
_c.Close();
 };
 }
};
 };
 };
 //BA.debugLineNum = 1982;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1983;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1984;BA.debugLine="If result.Tag = \"gunaprod3\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("gunaprod3"))) { 
 //BA.debugLineNum = 1985;BA.debugLine="If reqs.IndexOf(\"gunaprod3\") > -1 Then";
if (_reqs.IndexOf((Object)("gunaprod3"))>-1) { 
 //BA.debugLineNum = 1986;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"gunaprod3\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("gunaprod3")));
 //BA.debugLineNum = 1987;BA.debugLine="Log(reqs.Size)";
__c.LogImpl("153018787",BA.NumberToString(_reqs.getSize()),0);
 };
 //BA.debugLineNum = 1989;BA.debugLine="Starter.skmt.BeginTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .BeginTransaction();
 //BA.debugLineNum = 1990;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group134 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen134 = group134.getSize()
;int index134 = 0;
;
for (; index134 < groupLen134;index134++){
_records = (Object[])(group134.Get(index134));
 //BA.debugLineNum = 1991;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 = 1992;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 = 1993;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 = 1994;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 = 1995;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 = 1996;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 = 1997;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 = 1998;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 = 1999;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 = 2000;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 = 2001;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 = 2003;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 = 2004;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 = 2005;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 = 2006;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 = 2010;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 = 2012;BA.debugLine="Starter.skmt.TransactionSuccessful";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .TransactionSuccessful();
 //BA.debugLineNum = 2013;BA.debugLine="Starter.skmt.EndTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .EndTransaction();
 //BA.debugLineNum = 2014;BA.debugLine="Listo2=1";
_listo2 = BA.NumberToString(1);
 //BA.debugLineNum = 2015;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 = 2016;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 2017;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 2018;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 2019;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 2024;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2025;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2026;BA.debugLine="If result.Tag = \"gunaprod\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("gunaprod"))) { 
 //BA.debugLineNum = 2027;BA.debugLine="Log(\"Entramos a GUNA_PROD<--------------------";
__c.LogImpl("153018827","Entramos a GUNA_PROD<---------------------------------",0);
 //BA.debugLineNum = 2028;BA.debugLine="If reqs.IndexOf(\"gunaprod\") > -1 Then";
if (_reqs.IndexOf((Object)("gunaprod"))>-1) { 
 //BA.debugLineNum = 2029;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"gunaprod\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("gunaprod")));
 //BA.debugLineNum = 2030;BA.debugLine="Log(reqs.Size)";
__c.LogImpl("153018830",BA.NumberToString(_reqs.getSize()),0);
 };
 //BA.debugLineNum = 2032;BA.debugLine="Starter.skmt.BeginTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .BeginTransaction();
 //BA.debugLineNum = 2033;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group172 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen172 = group172.getSize()
;int index172 = 0;
;
for (; index172 < groupLen172;index172++){
_records = (Object[])(group172.Get(index172));
 //BA.debugLineNum = 2034;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 = 2035;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 = 2036;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 = 2037;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 = 2038;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 = 2039;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 = 2040;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 = 2041;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 = 2042;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 = 2043;BA.debugLine="Dim CONVERSION As String = 0'records(result.C";
_conversion = BA.NumberToString(0);
 //BA.debugLineNum = 2044;BA.debugLine="Dim PRECIOCONVER As String = 0' records(resul";
_precioconver = BA.NumberToString(0);
 //BA.debugLineNum = 2045;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 = 2050;BA.debugLine="Log(CAT_GP_NOMBRE & \"<-----------------------";
__c.LogImpl("153018850",_cat_gp_nombre+"<-------------------------------------",0);
 //BA.debugLineNum = 2051;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 = 2053;BA.debugLine="Starter.skmt.TransactionSuccessful";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .TransactionSuccessful();
 //BA.debugLineNum = 2054;BA.debugLine="Starter.skmt.EndTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .EndTransaction();
 //BA.debugLineNum = 2055;BA.debugLine="Listo2=1";
_listo2 = BA.NumberToString(1);
 //BA.debugLineNum = 2056;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 = 2057;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 2058;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 2059;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 2060;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 2065;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2066;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2067;BA.debugLine="If result.Tag = \"gunaprodp\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("gunaprodp"))) { 
 //BA.debugLineNum = 2068;BA.debugLine="If reqs.IndexOf(\"gunaprodp\") > -1 Then";
if (_reqs.IndexOf((Object)("gunaprodp"))>-1) { 
 //BA.debugLineNum = 2069;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"gunaprodp\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("gunaprodp")));
 //BA.debugLineNum = 2070;BA.debugLine="Log(reqs.Size)";
__c.LogImpl("153018870",BA.NumberToString(_reqs.getSize()),0);
 };
 //BA.debugLineNum = 2072;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group206 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen206 = group206.getSize()
;int index206 = 0;
;
for (; index206 < groupLen206;index206++){
_records = (Object[])(group206.Get(index206));
 //BA.debugLineNum = 2073;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 = 2074;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 = 2075;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 = 2076;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 = 2077;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 = 2078;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 = 2079;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 = 2080;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 = 2081;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 = 2082;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 = 2085;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 = 2087;BA.debugLine="Listo4=1";
_listo4 = BA.NumberToString(1);
 //BA.debugLineNum = 2088;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 = 2089;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 2090;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 2091;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 2092;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 = 2094;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 2095;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 2096;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 2097;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 2102;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2103;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2104;BA.debugLine="If result.Tag = \"detallepaq\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("detallepaq"))) { 
 //BA.debugLineNum = 2105;BA.debugLine="If reqs.IndexOf(\"detallepaq\") > -1 Then";
if (_reqs.IndexOf((Object)("detallepaq"))>-1) { 
 //BA.debugLineNum = 2106;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"detallepaq\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("detallepaq")));
 //BA.debugLineNum = 2107;BA.debugLine="Log(reqs.Size)";
__c.LogImpl("153018907",BA.NumberToString(_reqs.getSize()),0);
 };
 //BA.debugLineNum = 2109;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group240 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen240 = group240.getSize()
;int index240 = 0;
;
for (; index240 < groupLen240;index240++){
_records = (Object[])(group240.Get(index240));
 //BA.debugLineNum = 2110;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 = 2111;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 = 2112;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 = 2113;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 = 2114;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 = 2115;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 = 2116;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 = 2117;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 = 2118;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 = 2119;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 = 2120;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 = 2122;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 = 2124;BA.debugLine="Listo3 =1";
_listo3 = BA.NumberToString(1);
 //BA.debugLineNum = 2125;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 = 2126;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 2127;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 2128;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 2129;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 = 2131;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 2132;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 2133;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 2134;BA.debugLine="EJECUTANDO = 0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 2139;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2140;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2141;BA.debugLine="If result.Tag = \"estatus\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("estatus"))) { 
 //BA.debugLineNum = 2142;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group271 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen271 = group271.getSize()
;int index271 = 0;
;
for (; index271 < groupLen271;index271++){
_records = (Object[])(group271.Get(index271));
 //BA.debugLineNum = 2143;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 = 2144;BA.debugLine="If hvd_estatus = \"Liquidado\" Then";
if ((_hvd_estatus).equals("Liquidado")) { 
 //BA.debugLineNum = 2146;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 = 2148;BA.debugLine="envioinfo";
_envioinfo();
 };
 }
};
 };
 };
 //BA.debugLineNum = 2154;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2155;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2156;BA.debugLine="If result.Tag = \"punteo\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("punteo"))) { 
 //BA.debugLineNum = 2157;BA.debugLine="If reqs.IndexOf(\"punteo\") > -1 Then";
if (_reqs.IndexOf((Object)("punteo"))>-1) { 
 //BA.debugLineNum = 2158;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"punteo\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("punteo")));
 };
 //BA.debugLineNum = 2161;BA.debugLine="If reqs.IndexOf(\"punteo\") > 0 Then";
if (_reqs.IndexOf((Object)("punteo"))>0) { 
 //BA.debugLineNum = 2162;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"punteo\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("punteo")));
 //BA.debugLineNum = 2163;BA.debugLine="Log(reqs.Size)";
__c.LogImpl("153018963",BA.NumberToString(_reqs.getSize()),0);
 };
 //BA.debugLineNum = 2165;BA.debugLine="Starter.skmt.BeginTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .BeginTransaction();
 //BA.debugLineNum = 2166;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group292 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen292 = group292.getSize()
;int index292 = 0;
;
for (; index292 < groupLen292;index292++){
_records = (Object[])(group292.Get(index292));
 //BA.debugLineNum = 2167;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 = 2168;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 = 2169;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 = 2171;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 = 2173;BA.debugLine="Starter.skmt.TransactionSuccessful";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .TransactionSuccessful();
 //BA.debugLineNum = 2174;BA.debugLine="Starter.skmt.EndTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .EndTransaction();
 };
 };
 //BA.debugLineNum = 2178;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2179;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2180;BA.debugLine="If result.Tag = \"hist_datos\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("hist_datos"))) { 
 //BA.debugLineNum = 2181;BA.debugLine="If reqs.IndexOf(\"hist_datos\") > -1 Then";
if (_reqs.IndexOf((Object)("hist_datos"))>-1) { 
 //BA.debugLineNum = 2182;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"hist_datos\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("hist_datos")));
 };
 //BA.debugLineNum = 2185;BA.debugLine="Log(l_ruta.text)";
__c.LogImpl("153018985",_l_ruta.getText(),0);
 //BA.debugLineNum = 2186;BA.debugLine="Log($\"********  Insertamos HV - ${result.Rows.";
__c.LogImpl("153018986",("********  Insertamos HV - "+__c.SmartStringFormatter("",(Object)(_result.Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()))+""),0);
 //BA.debugLineNum = 2187;BA.debugLine="Starter.skmt.BeginTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .BeginTransaction();
 //BA.debugLineNum = 2188;BA.debugLine="Dim consecutivo  As Int= 0";
_consecutivo = (int) (0);
 //BA.debugLineNum = 2189;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group312 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen312 = group312.getSize()
;int index312 = 0;
;
for (; index312 < groupLen312;index312++){
_records = (Object[])(group312.Get(index312));
 //BA.debugLineNum = 2190;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 = 2191;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 = 2192;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 = 2193;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 = 2194;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 = 2195;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 = 2196;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 = 2197;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 = 2198;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 = 2199;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 = 2200;BA.debugLine="Dim HVD_BCREDITO As String = records(result.C";
_hvd_bcredito = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_BCREDITO"))))]);
 //BA.debugLineNum = 2202;BA.debugLine="Dim bcajas As String = 0 ' records(result.Col";
_bcajas = BA.NumberToString(0);
 //BA.debugLineNum = 2203;BA.debugLine="Dim cantc As String = 0 'records(result.Colum";
_cantc = BA.NumberToString(0);
 //BA.debugLineNum = 2205;BA.debugLine="consecutivo = consecutivo +1";
_consecutivo = (int) (_consecutivo+1);
 //BA.debugLineNum = 2206;BA.debugLine="Log(HVD_PRONOMBRE & \", \" & HVD_CANT & \", \" &H";
__c.LogImpl("153019006",_hvd_pronombre+", "+_hvd_cant+", "+_hvd_cliente,0);
 //BA.debugLineNum = 2207;BA.debugLine="If l_ruta.Text = \"0\" Then 'Si no hay ruta car";
if ((_l_ruta.getText()).equals("0")) { 
 //BA.debugLineNum = 2208;BA.debugLine="Log(\"No hay ruta, guardamos todos\")";
__c.LogImpl("153019008","No hay ruta, guardamos todos",0);
 //BA.debugLineNum = 2209;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,HVD_BCREDITO) 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),(Object)(_hvd_bcredito)}));
 //BA.debugLineNum = 2210;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 = 2213;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 = 2214;BA.debugLine="If tc.RowCount = 0 Then";
if (_tc.getRowCount()==0) { 
 //BA.debugLineNum = 2215;BA.debugLine="Log($\"Guardamos ${HVD_CLIENTE}\"$)";
__c.LogImpl("153019015",("Guardamos "+__c.SmartStringFormatter("",(Object)(_hvd_cliente))+""),0);
 //BA.debugLineNum = 2216;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,HVD_BCREDITO) 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),(Object)(_hvd_bcredito)}));
 //BA.debugLineNum = 2217;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 = 2221;BA.debugLine="Starter.skmt.TransactionSuccessful";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .TransactionSuccessful();
 //BA.debugLineNum = 2222;BA.debugLine="Starter.skmt.EndTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .EndTransaction();
 //BA.debugLineNum = 2223;BA.debugLine="Log($\"********  Terminamos HV - ${result.Rows.";
__c.LogImpl("153019023",("********  Terminamos HV - "+__c.SmartStringFormatter("",(Object)(_result.Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()))+""),0);
 //BA.debugLineNum = 2237;BA.debugLine="Listo3 =1";
_listo3 = BA.NumberToString(1);
 //BA.debugLineNum = 2238;BA.debugLine="If Listo1 = 1  And Listo3 = 1  Then";
if ((_listo1).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 2239;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 2240;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 2241;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 2242;BA.debugLine="EJECUTANDO = 0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 2248;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2249;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2250;BA.debugLine="If result.Tag = \"variables\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("variables"))) { 
 //BA.debugLineNum = 2251;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group356 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen356 = group356.getSize()
;int index356 = 0;
;
for (; index356 < groupLen356;index356++){
_records = (Object[])(group356.Get(index356));
 //BA.debugLineNum = 2252;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 = 2253;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 = 2255;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 = 2261;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2262;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2263;BA.debugLine="If result.Tag = \"PAGARES\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("PAGARES"))) { 
 //BA.debugLineNum = 2264;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group366 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen366 = group366.getSize()
;int index366 = 0;
;
for (; index366 < groupLen366;index366++){
_records = (Object[])(group366.Get(index366));
 //BA.debugLineNum = 2266;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 = 2267;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 = 2269;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 = 2274;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2275;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2276;BA.debugLine="If result.Tag = \"valida_pedido\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("valida_pedido"))) { 
 //BA.debugLineNum = 2277;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group376 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen376 = group376.getSize()
;int index376 = 0;
;
for (; index376 < groupLen376;index376++){
_records = (Object[])(group376.Get(index376));
 //BA.debugLineNum = 2278;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 = 2279;BA.debugLine="If cuantos_pedido = CUANTOSP Then";
if ((_cuantos_pedido).equals(BA.NumberToString(_cuantosp))) { 
 //BA.debugLineNum = 2281;BA.debugLine="datos_iguales = \"ok\"";
_datos_iguales = "ok";
 }else {
 //BA.debugLineNum = 2283;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 = 2291;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2292;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2293;BA.debugLine="If result.Tag = \"valida_pedidoc\" Then 'query ta";
if ((_result.Tag /*Object*/ ).equals((Object)("valida_pedidoc"))) { 
 //BA.debugLineNum = 2294;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group389 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen389 = group389.getSize()
;int index389 = 0;
;
for (; index389 < groupLen389;index389++){
_records = (Object[])(group389.Get(index389));
 //BA.debugLineNum = 2295;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 = 2296;BA.debugLine="If cuantos_pedidosc = CUANTOSC Then";
if ((_cuantos_pedidosc).equals(BA.NumberToString(_cuantosc))) { 
 //BA.debugLineNum = 2298;BA.debugLine="datos_iguales = \"ok\"";
_datos_iguales = "ok";
 }else {
 //BA.debugLineNum = 2300;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 = 2306;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2307;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2308;BA.debugLine="If result.Tag = \"valida_noventa\" Then 'query ta";
if ((_result.Tag /*Object*/ ).equals((Object)("valida_noventa"))) { 
 //BA.debugLineNum = 2309;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group402 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen402 = group402.getSize()
;int index402 = 0;
;
for (; index402 < groupLen402;index402++){
_records = (Object[])(group402.Get(index402));
 //BA.debugLineNum = 2310;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 = 2311;BA.debugLine="If cuantos_noventa = CUANTOSN Then";
if ((_cuantos_noventa).equals(BA.NumberToString(_cuantosn))) { 
 //BA.debugLineNum = 2313;BA.debugLine="datos_iguales = \"ok\"";
_datos_iguales = "ok";
 }else {
 //BA.debugLineNum = 2315;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 = 2321;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2322;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2323;BA.debugLine="If result.Tag = \"insert_pedido\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("insert_pedido"))) { 
 //BA.debugLineNum = 2324;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 };
 };
 //BA.debugLineNum = 2328;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2329;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2330;BA.debugLine="If result.Tag = \"version\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("version"))) { 
 //BA.debugLineNum = 2331;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group421 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen421 = group421.getSize()
;int index421 = 0;
;
for (; index421 < groupLen421;index421++){
_records = (Object[])(group421.Get(index421));
 //BA.debugLineNum = 2332;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from VERSIO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from VERSION");
 //BA.debugLineNum = 2333;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 = 2335;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 = 2340;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2341;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2342;BA.debugLine="If result.Tag = \"count_cli\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("count_cli"))) { 
 //BA.debugLineNum = 2343;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group431 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen431 = group431.getSize()
;int index431 = 0;
;
for (; index431 < groupLen431;index431++){
_records = (Object[])(group431.Get(index431));
 //BA.debugLineNum = 2344;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 = 2349;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2350;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2351;BA.debugLine="If result.Tag = \"ruta\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("ruta"))) { 
 //BA.debugLineNum = 2352;BA.debugLine="If reqs.IndexOf(\"ruta\") > -1 Then";
if (_reqs.IndexOf((Object)("ruta"))>-1) { 
 //BA.debugLineNum = 2353;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"ruta\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("ruta")));
 //BA.debugLineNum = 2354;BA.debugLine="Log(reqs.Size)";
__c.LogImpl("153019154",BA.NumberToString(_reqs.getSize()),0);
 };
 //BA.debugLineNum = 2356;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group443 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen443 = group443.getSize()
;int index443 = 0;
;
for (; index443 < groupLen443;index443++){
_records = (Object[])(group443.Get(index443));
 //BA.debugLineNum = 2357;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 = 2359;BA.debugLine="If VALIDO = \"OK\" Then";
if ((_valido).equals("OK")) { 
 //BA.debugLineNum = 2360;BA.debugLine="If l_ctast.Text = \"0\" Then";
if ((_l_ctast.getText()).equals("0")) { 
 //BA.debugLineNum = 2361;BA.debugLine="Subir.Visible = True";
_subir.setVisible(__c.True);
 }else if((_l_ctast.getText()).equals("0") == false) { 
 //BA.debugLineNum = 2363;BA.debugLine="Subir.Visible = False";
_subir.setVisible(__c.False);
 };
 //BA.debugLineNum = 2365;BA.debugLine="cargar.Visible = True";
_cargar.setVisible(__c.True);
 //BA.debugLineNum = 2366;BA.debugLine="If Subs.dameUsuarioDeDB = \"ROOT\" Then";
if ((_subs._dameusuariodedb /*String*/ (ba)).equals("ROOT")) { 
 //BA.debugLineNum = 2367;BA.debugLine="Subir.Visible = True";
_subir.setVisible(__c.True);
 };
 //BA.debugLineNum = 2369;BA.debugLine="connecta.Visible = False";
_connecta.setVisible(__c.False);
 //BA.debugLineNum = 2370;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM RUTAA";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM RUTAA");
 //BA.debugLineNum = 2373;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 = 2375;BA.debugLine="B4XPages.MainPage.rutaPreventa = e_ruta.TEXT";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._rutapreventa /*String*/  = _e_ruta.getText();
 //BA.debugLineNum = 2377;BA.debugLine="If conn = \"1\" Then";
if ((_conn).equals("1")) { 
 //BA.debugLineNum = 2378;BA.debugLine="ToastMessageShow(\"Existe Conexión con el Se";
__c.ToastMessageShow(BA.ObjectToCharSequence("Existe Conexión con el Servidor."),__c.True);
 };
 }else {
 //BA.debugLineNum = 2381;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 = 2382;BA.debugLine="cargar.Visible = False";
_cargar.setVisible(__c.False);
 //BA.debugLineNum = 2383;BA.debugLine="Subir.Visible = False";
_subir.setVisible(__c.False);
 //BA.debugLineNum = 2384;BA.debugLine="inv.Visible = False";
_inv.setVisible(__c.False);
 //BA.debugLineNum = 2385;BA.debugLine="connecta.Visible = False";
_connecta.setVisible(__c.False);
 };
 }
};
 };
 };
 //BA.debugLineNum = 2391;BA.debugLine="If Job.JobName = \"DBRequest\" Then 'Traemos las c";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2392;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2393;BA.debugLine="If result.Tag = \"coords_almacen\" Then 'query ta";
if ((_result.Tag /*Object*/ ).equals((Object)("coords_almacen"))) { 
 //BA.debugLineNum = 2394;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group475 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen475 = group475.getSize()
;int index475 = 0;
;
for (; index475 < groupLen475;index475++){
_records = (Object[])(group475.Get(index475));
 //BA.debugLineNum = 2395;BA.debugLine="Log(\"Coordenadas del almacen: \" & records(res";
__c.LogImpl("153019195","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 = 2396;BA.debugLine="Private lat, lon As Double";
_lat = 0;
_lon = 0;
 //BA.debugLineNum = 2397;BA.debugLine="lat = 0.0";
_lat = 0.0;
 //BA.debugLineNum = 2398;BA.debugLine="lon = 0.0";
_lon = 0.0;
 //BA.debugLineNum = 2399;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 = 2400;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 = 2401;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 = 2403;BA.debugLine="Starter.cedisLocation.Latitude = lat";
_starter._cedislocation /*anywheresoftware.b4a.gps.LocationWrapper*/ .setLatitude(_lat);
 //BA.debugLineNum = 2404;BA.debugLine="Starter.cedisLocation.Longitude = lon";
_starter._cedislocation /*anywheresoftware.b4a.gps.LocationWrapper*/ .setLongitude(_lon);
 //BA.debugLineNum = 2405;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 = 2406;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 = 2412;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2413;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2414;BA.debugLine="If result.Tag = \"contra\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("contra"))) { 
 //BA.debugLineNum = 2415;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group494 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen494 = group494.getSize()
;int index494 = 0;
;
for (; index494 < groupLen494;index494++){
_records = (Object[])(group494.Get(index494));
 //BA.debugLineNum = 2416;BA.debugLine="Dim name As String = records(result.Columns.G";
_name = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CONTRA"))))]);
 }
};
 //BA.debugLineNum = 2419;BA.debugLine="paso1 = 1";
_paso1 = BA.NumberToString(1);
 };
 };
 //BA.debugLineNum = 2423;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2424;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2425;BA.debugLine="If result.Tag = \"ins_reparto\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("ins_reparto"))) { 
 //BA.debugLineNum = 2426;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group503 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen503 = group503.getSize()
;int index503 = 0;
;
for (; index503 < groupLen503;index503++){
_records = (Object[])(group503.Get(index503));
 //BA.debugLineNum = 2427;BA.debugLine="For Each k As String In result.Columns.Keys";
{
final anywheresoftware.b4a.BA.IterableList group504 = _result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen504 = group504.getSize()
;int index504 = 0;
;
for (; index504 < groupLen504;index504++){
_k = BA.ObjectToString(group504.Get(index504));
 //BA.debugLineNum = 2428;BA.debugLine="Log(k & \": \" & records(result.Columns.Get(k)";
__c.LogImpl("153019228",_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
 }
};
 }
};
 };
 };
 //BA.debugLineNum = 2434;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2435;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2436;BA.debugLine="If result.Tag = \"ins_rechazos\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("ins_rechazos"))) { 
 //BA.debugLineNum = 2437;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group513 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen513 = group513.getSize()
;int index513 = 0;
;
for (; index513 < groupLen513;index513++){
_records = (Object[])(group513.Get(index513));
 //BA.debugLineNum = 2438;BA.debugLine="For Each k As String In result.Columns.Keys";
{
final anywheresoftware.b4a.BA.IterableList group514 = _result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen514 = group514.getSize()
;int index514 = 0;
;
for (; index514 < groupLen514;index514++){
_k = BA.ObjectToString(group514.Get(index514));
 //BA.debugLineNum = 2439;BA.debugLine="Log(k & \": \" & records(result.Columns.Get(k)";
__c.LogImpl("153019239",_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
 }
};
 }
};
 };
 };
 //BA.debugLineNum = 2444;BA.debugLine="Job.Release";
_job._release /*String*/ ();
 };
 //BA.debugLineNum = 2450;BA.debugLine="If paso1 = 1 Then";
if ((_paso1).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 2453;BA.debugLine="If name = \"OK\"&et_codigo.Text Then";
if ((_name).equals("OK"+_et_codigo.getText())) { 
 //BA.debugLineNum = 2454;BA.debugLine="p_validacion.Visible = False";
_p_validacion.setVisible(__c.False);
 //BA.debugLineNum = 2455;BA.debugLine="et_codigo.Text = \"\"";
_et_codigo.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 2456;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CUENTAA\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CUENTAA");
 //BA.debugLineNum = 2457;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO CUENTAA";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("63403")}));
 //BA.debugLineNum = 2459;BA.debugLine="Subs.panelVisible(P_CIEGO,0,0)";
_subs._panelvisible /*String*/ (ba,_p_ciego,(int) (0),(int) (0));
 //BA.debugLineNum = 2460;BA.debugLine="P_CIEGO.Width = Root.Width";
_p_ciego.setWidth(_root.getWidth());
 //BA.debugLineNum = 2461;BA.debugLine="P_CIEGO.Height = Root.Height";
_p_ciego.setHeight(_root.getHeight());
 //BA.debugLineNum = 2463;BA.debugLine="CLV_PICK_CIEGO.Clear";
_clv_pick_ciego._clear();
 //BA.debugLineNum = 2465;BA.debugLine="Private c As Cursor = Starter.skmt.ExecQuery(\"se";
_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, ifnull(PC_CANT,0) AS PC_CAN from HIST_VENTAS INNER JOIN PICK_CIEGO ON PC_ID_PROD = HVD_PROID WHERE hvd_rechazo <> 2 and HVD_RECHAZOCANT > 0 and  HVD_PRONOMBRE <> 'Cobranza Pendiente' GROUP BY HVD_PROID order by HVD_PRONOMBRE asc")));
 //BA.debugLineNum = 2466;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 2469;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step534 = 1;
final int limit534 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit534 ;_i = _i + step534 ) {
 //BA.debugLineNum = 2470;BA.debugLine="c.Position = i";
_c.setPosition(_i);
 //BA.debugLineNum = 2473;BA.debugLine="Private c3 As Cursor=Starter.skmt.ExecQuery($\"";
_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")))+"' and PE_TIPO NOT IN ('DANADO','FALTANTE','SOBRANTE')"))));
 //BA.debugLineNum = 2474;BA.debugLine="Private resta As String = 0";
_resta = BA.NumberToString(0);
 //BA.debugLineNum = 2476;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
 //BA.debugLineNum = 2477;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
 //BA.debugLineNum = 2478;BA.debugLine="resta =  c3.GetString(\"PE_CANT\")";
_resta = _c3.GetString("PE_CANT");
 }else {
 //BA.debugLineNum = 2480;BA.debugLine="resta = 0";
_resta = BA.NumberToString(0);
 };
 //BA.debugLineNum = 2482;BA.debugLine="If ( c.GetInt(\"HVD_RECHAZOCANT\") - resta) <= 0";
if ((_c.GetInt("HVD_RECHAZOCANT")-(double)(Double.parseDouble(_resta)))<=0) { 
 }else {
 //BA.debugLineNum = 2485;BA.debugLine="CLV_PICK_CIEGO.Add(CreateListItem(c.GetString";
_clv_pick_ciego._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_createlistitem(_c.GetString("HVD_PROID"),_c.GetString("HVD_PRONOMBRE"),_c.GetString("PC_CAN"),BA.NumberToString((_c.GetInt("HVD_RECHAZOCANT")-(double)(Double.parseDouble(_resta))))).getObject())),(Object)(_i));
 };
 }
};
 //BA.debugLineNum = 2491;BA.debugLine="d = Starter.skmt.ExecQuery(\"select HVD_PRONOMBR";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select HVD_PRONOMBRE, IFNULL(SUM(HVD_RECHAZOCANT), 0) AS HVD_RECHAZOCANT, HVD_PROID from HIST_VENTAS WHERE hvd_rechazo <> 2 and HVD_RECHAZOCANT > 0  and HVD_PROID NOT IN (SELECT PC_ID_PROD FROM PICK_CIEGO)  and HVD_PRONOMBRE <> 'Cobranza Pendiente' GROUP BY HVD_PROID order by HVD_PRONOMBRE asc")));
 //BA.debugLineNum = 2493;BA.debugLine="For i = 0 To d.RowCount - 1";
{
final int step550 = 1;
final int limit550 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit550 ;_i = _i + step550 ) {
 //BA.debugLineNum = 2494;BA.debugLine="d.Position = i";
_d.setPosition(_i);
 //BA.debugLineNum = 2497;BA.debugLine="Private c3 As Cursor=Starter.skmt.ExecQuery($\"";
_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)(_d.GetString("HVD_PROID")))+"' and PE_TIPO NOT IN ('DANADO','FALTANTE','SOBRANTE')"))));
 //BA.debugLineNum = 2498;BA.debugLine="Private resta As String = 0";
_resta = BA.NumberToString(0);
 //BA.debugLineNum = 2500;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
 //BA.debugLineNum = 2501;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
 //BA.debugLineNum = 2502;BA.debugLine="resta =  c3.GetString(\"PE_CANT\")";
_resta = _c3.GetString("PE_CANT");
 }else {
 //BA.debugLineNum = 2504;BA.debugLine="resta = 0";
_resta = BA.NumberToString(0);
 };
 //BA.debugLineNum = 2506;BA.debugLine="If ( d.GetInt(\"HVD_RECHAZOCANT\") - resta) <= 0";
if ((_d.GetInt("HVD_RECHAZOCANT")-(double)(Double.parseDouble(_resta)))<=0) { 
 }else {
 //BA.debugLineNum = 2509;BA.debugLine="CLV_PICK_CIEGO.Add(CreateListItem2(d.GetStrin";
_clv_pick_ciego._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_createlistitem2(_d.GetString("HVD_PROID"),_d.GetString("HVD_PRONOMBRE"),BA.NumberToString((_d.GetInt("HVD_RECHAZOCANT")-(double)(Double.parseDouble(_resta))))).getObject())),(Object)(_i));
 };
 }
};
 }else if(_c.getRowCount()==0) { 
 //BA.debugLineNum = 2516;BA.debugLine="d = Starter.skmt.ExecQuery(\"select HVD_PRONOMBR";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select HVD_PRONOMBRE, IFNULL(SUM(HVD_RECHAZOCANT), 0) AS HVD_RECHAZOCANT, HVD_PROID from HIST_VENTAS WHERE hvd_rechazo <> 2 and HVD_RECHAZOCANT > 0 and HVD_PRONOMBRE <> 'Cobranza Pendiente' GROUP BY HVD_PROID order by HVD_PRONOMBRE asc")));
 //BA.debugLineNum = 2518;BA.debugLine="For i = 0 To d.RowCount - 1";
{
final int step567 = 1;
final int limit567 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit567 ;_i = _i + step567 ) {
 //BA.debugLineNum = 2519;BA.debugLine="d.Position = i";
_d.setPosition(_i);
 //BA.debugLineNum = 2522;BA.debugLine="Private c3 As Cursor=Starter.skmt.ExecQuery($\"";
_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)(_d.GetString("HVD_PROID")))+"'and PE_TIPO NOT IN ('DANADO','FALTANTE','SOBRANTE')"))));
 //BA.debugLineNum = 2523;BA.debugLine="Private resta As String = 0";
_resta = BA.NumberToString(0);
 //BA.debugLineNum = 2525;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
 //BA.debugLineNum = 2526;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
 //BA.debugLineNum = 2527;BA.debugLine="resta =  c3.GetString(\"PE_CANT\")";
_resta = _c3.GetString("PE_CANT");
 }else {
 //BA.debugLineNum = 2529;BA.debugLine="resta = 0";
_resta = BA.NumberToString(0);
 };
 //BA.debugLineNum = 2531;BA.debugLine="If ( d.GetInt(\"HVD_RECHAZOCANT\") - resta) <= 0";
if ((_d.GetInt("HVD_RECHAZOCANT")-(double)(Double.parseDouble(_resta)))<=0) { 
 }else {
 //BA.debugLineNum = 2534;BA.debugLine="CLV_PICK_CIEGO.Add(CreateListItem2(d.GetStrin";
_clv_pick_ciego._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_createlistitem2(_d.GetString("HVD_PROID"),_d.GetString("HVD_PRONOMBRE"),BA.NumberToString((_d.GetInt("HVD_RECHAZOCANT")-(double)(Double.parseDouble(_resta))))).getObject())),(Object)(_i));
 };
 }
};
 };
 //BA.debugLineNum = 2540;BA.debugLine="paso1 = 0";
_paso1 = BA.NumberToString(0);
 }else {
 //BA.debugLineNum = 2542;BA.debugLine="et_codigo.Text = \"\"";
_et_codigo.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 2543;BA.debugLine="Msgbox(\"Password No valido\",\"Atención\") 'ignore";
__c.Msgbox(BA.ObjectToCharSequence("Password No valido"),BA.ObjectToCharSequence("Atención"),ba);
 };
 };
 //BA.debugLineNum = 2547;BA.debugLine="If reqs.Size = 0 Then";
if (_reqs.getSize()==0) { 
 //BA.debugLineNum = 2553;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 = 2554;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 2555;BA.debugLine="If c.GetString(\"CUANTOS\") = 0 Then";
if ((_c.GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 2556;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 = 2561;BA.debugLine="c.Close";
_c.Close();
 };
 //BA.debugLineNum = 2567;BA.debugLine="End Sub";
return "";
}
public String  _listview1_itemclick(int _position,Object _value) throws Exception{
String[] _clieasing = null;
 //BA.debugLineNum = 2960;BA.debugLine="Private Sub ListView1_ItemClick (Position As Int,";
 //BA.debugLineNum = 2961;BA.debugLine="Log(Value)";
__c.LogImpl("153870593",BA.ObjectToString(_value),0);
 //BA.debugLineNum = 2963;BA.debugLine="Dim clieasing() As String = Regex.Split(\" \", Valu";
_clieasing = __c.Regex.Split(" ",BA.ObjectToString(_value));
 //BA.debugLineNum = 2964;BA.debugLine="Log(clieasing(0))";
__c.LogImpl("153870596",_clieasing[(int) (0)],0);
 //BA.debugLineNum = 2966;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CUENTAA\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CUENTAA");
 //BA.debugLineNum = 2967;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 = 2968;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 //BA.debugLineNum = 2969;BA.debugLine="Panel1.Visible = False";
_panel1.setVisible(__c.False);
 //BA.debugLineNum = 2970;BA.debugLine="End Sub";
return "";
}
public String  _p_carga_click() throws Exception{
 //BA.debugLineNum = 3084;BA.debugLine="Private Sub P_carga_Click";
 //BA.debugLineNum = 3086;BA.debugLine="End Sub";
return "";
}
public String  _p_ciego_click() throws Exception{
 //BA.debugLineNum = 3837;BA.debugLine="Private Sub P_CIEGO_Click";
 //BA.debugLineNum = 3839;BA.debugLine="End Sub";
return "";
}
public String  _p_prod_click() throws Exception{
 //BA.debugLineNum = 3032;BA.debugLine="Private Sub p_prod_Click";
 //BA.debugLineNum = 3034;BA.debugLine="End Sub";
return "";
}
public String  _p_validacion_click() throws Exception{
 //BA.debugLineNum = 3901;BA.debugLine="Private Sub p_validacion_Click";
 //BA.debugLineNum = 3903;BA.debugLine="End Sub";
return "";
}
public String  _printer_connected(boolean _success) throws Exception{
 //BA.debugLineNum = 3225;BA.debugLine="Sub Printer_Connected (Success As Boolean)";
 //BA.debugLineNum = 3226;BA.debugLine="If Success Then";
if (_success) { 
 //BA.debugLineNum = 3228;BA.debugLine="PASA_IMP = \"1\"";
_pasa_imp = "1";
 }else {
 //BA.debugLineNum = 3231;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 = 3232;BA.debugLine="StartPrinter";
_startprinter();
 };
 };
 //BA.debugLineNum = 3235;BA.debugLine="End Sub";
return "";
}
public String  _printer1_connected(boolean _success) throws Exception{
 //BA.debugLineNum = 3200;BA.debugLine="Sub Printer1_Connected (Success As Boolean)";
 //BA.debugLineNum = 3202;BA.debugLine="If Success Then";
if (_success) { 
 //BA.debugLineNum = 3203;BA.debugLine="ToastMessageShow(\"Impresora conectada\", False)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Impresora conectada"),__c.False);
 //BA.debugLineNum = 3204;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 = 3205;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 = 3208;BA.debugLine="impresoraConectada = True";
_impresoraconectada = __c.True;
 }else {
 //BA.debugLineNum = 3212;BA.debugLine="LogColor(\"Error conectando la impresora\", Colors";
__c.LogImpl("154394892","Error conectando la impresora",__c.Colors.Red);
 //BA.debugLineNum = 3213;BA.debugLine="errorImpresora = errorImpresora + 1";
_errorimpresora = (int) (_errorimpresora+1);
 //BA.debugLineNum = 3214;BA.debugLine="If errorImpresora > 1 Then";
if (_errorimpresora>1) { 
 //BA.debugLineNum = 3215;BA.debugLine="Starter.MAC_IMPRESORA = \"0\"";
_starter._mac_impresora /*String*/  = "0";
 //BA.debugLineNum = 3216;BA.debugLine="errorImpresora = 0";
_errorimpresora = (int) (0);
 };
 };
 //BA.debugLineNum = 3219;BA.debugLine="End Sub";
return "";
}
public String  _printer1_error() throws Exception{
 //BA.debugLineNum = 3221;BA.debugLine="Sub Printer1_Error";
 //BA.debugLineNum = 3222;BA.debugLine="Log(\"error printer\")";
__c.LogImpl("154460417","error printer",0);
 //BA.debugLineNum = 3223;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 = 3237;BA.debugLine="Sub StartPrinter";
 //BA.debugLineNum = 3238;BA.debugLine="Dim PairedDevices As Map";
_paireddevices = new anywheresoftware.b4a.objects.collections.Map();
 //BA.debugLineNum = 3239;BA.debugLine="Dim L1 As List";
_l1 = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 3240;BA.debugLine="Dim resimp As Int";
_resimp = 0;
 //BA.debugLineNum = 3241;BA.debugLine="ToastMessageShow(\"Printing.....\",True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Printing....."),__c.True);
 //BA.debugLineNum = 3242;BA.debugLine="PairedDevices.Initialize";
_paireddevices.Initialize();
 //BA.debugLineNum = 3243;BA.debugLine="Try";
try { //BA.debugLineNum = 3244;BA.debugLine="PairedDevices = cmp20.GetPairedDevices";
_paireddevices = _cmp20.GetPairedDevices();
 } 
       catch (Exception e9) {
			ba.setLastException(e9); //BA.debugLineNum = 3246;BA.debugLine="Msgbox(\"Getting Paired Devices\",\"Printer Error\")";
__c.Msgbox(BA.ObjectToCharSequence("Getting Paired Devices"),BA.ObjectToCharSequence("Printer Error"),ba);
 //BA.debugLineNum = 3247;BA.debugLine="printer.Close";
_printer.Close();
 //BA.debugLineNum = 3248;BA.debugLine="cmp20.Disconnect";
_cmp20.Disconnect();
 };
 //BA.debugLineNum = 3251;BA.debugLine="If PairedDevices.Size = 0 Then";
if (_paireddevices.getSize()==0) { 
 //BA.debugLineNum = 3252;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 = 3253;BA.debugLine="Return";
if (true) return "";
 };
 //BA.debugLineNum = 3256;BA.debugLine="If PairedDevices.Size = 1 Then";
if (_paireddevices.getSize()==1) { 
 //BA.debugLineNum = 3257;BA.debugLine="Try";
try { //BA.debugLineNum = 3258;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 = 3260;BA.debugLine="Msgbox(\"Connecting\",\"Printer Error\") 'ignore";
__c.Msgbox(BA.ObjectToCharSequence("Connecting"),BA.ObjectToCharSequence("Printer Error"),ba);
 //BA.debugLineNum = 3261;BA.debugLine="printer.Close";
_printer.Close();
 //BA.debugLineNum = 3262;BA.debugLine="cmp20.Disconnect";
_cmp20.Disconnect();
 };
 }else {
 //BA.debugLineNum = 3265;BA.debugLine="L1.Initialize";
_l1.Initialize();
 //BA.debugLineNum = 3266;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 = 3267;BA.debugLine="L1.Add(PairedDevices.GetKeyAt(i))";
_l1.Add(_paireddevices.GetKeyAt(_i));
 }
};
 //BA.debugLineNum = 3269;BA.debugLine="resimp = InputList(L1, \"Choose device\", -1) 'ign";
_resimp = __c.InputList(_l1,BA.ObjectToCharSequence("Choose device"),(int) (-1),ba);
 //BA.debugLineNum = 3270;BA.debugLine="If resimp <> DialogResponse.CANCEL Then";
if (_resimp!=__c.DialogResponse.CANCEL) { 
 //BA.debugLineNum = 3271;BA.debugLine="cmp20.Connect(PairedDevices.Get(L1.Get(resimp))";
_cmp20.Connect(ba,BA.ObjectToString(_paireddevices.Get(_l1.Get(_resimp))));
 };
 };
 //BA.debugLineNum = 3274;BA.debugLine="End Sub";
return "";
}
public String  _subir_click() throws Exception{
anywheresoftware.b4a.sql.SQL.CursorWrapper _cg = null;
int _banderarechazo = 0;
int _i = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c3 = null;
String _resta = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _pickciego = null;
 //BA.debugLineNum = 845;BA.debugLine="Sub Subir_Click";
 //BA.debugLineNum = 847;BA.debugLine="Private cg As Cursor = Starter.skmt.ExecQuery(\"se";
_cg = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_cg = (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 and HVD_PRONOMBRE <> 'Cobranza Pendiente' GROUP BY HVD_PROID order by HVD_PRONOMBRE asc")));
 //BA.debugLineNum = 850;BA.debugLine="If cg.RowCount > 0 Then";
if (_cg.getRowCount()>0) { 
 //BA.debugLineNum = 851;BA.debugLine="Dim banderarechazo As Int = 0";
_banderarechazo = (int) (0);
 //BA.debugLineNum = 853;BA.debugLine="For i = 0 To cg.RowCount - 1";
{
final int step4 = 1;
final int limit4 = (int) (_cg.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit4 ;_i = _i + step4 ) {
 //BA.debugLineNum = 854;BA.debugLine="cg.Position = i";
_cg.setPosition(_i);
 //BA.debugLineNum = 857;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)(_cg.GetString("HVD_PROID")))+"' "))));
 //BA.debugLineNum = 858;BA.debugLine="Private resta As String = 0";
_resta = BA.NumberToString(0);
 //BA.debugLineNum = 860;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
 //BA.debugLineNum = 861;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
 //BA.debugLineNum = 862;BA.debugLine="resta =  c3.GetString(\"PE_CANT\")";
_resta = _c3.GetString("PE_CANT");
 }else {
 //BA.debugLineNum = 864;BA.debugLine="resta = 0";
_resta = BA.NumberToString(0);
 };
 //BA.debugLineNum = 867;BA.debugLine="If ( cg.GetInt(\"HVD_RECHAZOCANT\") - resta) <= 0";
if ((_cg.GetInt("HVD_RECHAZOCANT")-(double)(Double.parseDouble(_resta)))<=0) { 
 }else {
 //BA.debugLineNum = 870;BA.debugLine="banderarechazo = banderarechazo + 1";
_banderarechazo = (int) (_banderarechazo+1);
 };
 }
};
 //BA.debugLineNum = 874;BA.debugLine="If banderarechazo = 0 Then";
if (_banderarechazo==0) { 
 //BA.debugLineNum = 875;BA.debugLine="If Not(IsConnectedToInternet) Then MsgboxAsync(";
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 = 876;BA.debugLine="c=Starter.skmt.ExecQuery(\"select usuario from u";
_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 = 877;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 878;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 879;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 881;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT * FROM BLOCK";
_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 = 882;BA.debugLine="If c.RowCount = 0 Then";
if (_c.getRowCount()==0) { 
 //BA.debugLineNum = 883;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO BLOCKE";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO BLOCKENVIO(ENVIADO) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(1)}));
 //BA.debugLineNum = 884;BA.debugLine="envioinfo";
_envioinfo();
 }else {
 //BA.debugLineNum = 886;BA.debugLine="envioinfo";
_envioinfo();
 };
 //BA.debugLineNum = 888;BA.debugLine="c.Close";
_c.Close();
 }else {
 //BA.debugLineNum = 890;BA.debugLine="Dim pickciego As Cursor = Starter.skmt.ExecQuer";
_pickciego = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_pickciego = (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 PICK_CIEGO")));
 //BA.debugLineNum = 891;BA.debugLine="If pickciego.RowCount > 0 Then";
if (_pickciego.getRowCount()>0) { 
 //BA.debugLineNum = 892;BA.debugLine="If Not(IsConnectedToInternet) Then MsgboxAsync";
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 = 893;BA.debugLine="c=Starter.skmt.ExecQuery(\"select usuario 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 usuario from usuarioa")));
 //BA.debugLineNum = 894;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 895;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 896;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 898;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT * FROM BLOC";
_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 = 899;BA.debugLine="If c.RowCount = 0 Then";
if (_c.getRowCount()==0) { 
 //BA.debugLineNum = 900;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO BLOCK";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO BLOCKENVIO(ENVIADO) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(1)}));
 //BA.debugLineNum = 901;BA.debugLine="envioinfo";
_envioinfo();
 }else {
 //BA.debugLineNum = 903;BA.debugLine="envioinfo";
_envioinfo();
 };
 //BA.debugLineNum = 905;BA.debugLine="c.Close";
_c.Close();
 }else {
 //BA.debugLineNum = 907;BA.debugLine="MsgboxAsync(\"Para realizar el envio se necesit";
__c.MsgboxAsync(BA.ObjectToCharSequence("Para realizar el envio se necesita realizar la incidencia de recibo."),BA.ObjectToCharSequence("Atención"),ba);
 };
 };
 }else {
 //BA.debugLineNum = 912;BA.debugLine="If Not(IsConnectedToInternet) Then MsgboxAsync(";
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 = 913;BA.debugLine="c=Starter.skmt.ExecQuery(\"select usuario from u";
_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 = 914;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 915;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 916;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 918;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT * FROM BLOCK";
_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 = 919;BA.debugLine="If c.RowCount = 0 Then";
if (_c.getRowCount()==0) { 
 //BA.debugLineNum = 920;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO BLOCKE";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO BLOCKENVIO(ENVIADO) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(1)}));
 //BA.debugLineNum = 921;BA.debugLine="envioinfo";
_envioinfo();
 }else {
 //BA.debugLineNum = 923;BA.debugLine="envioinfo";
_envioinfo();
 };
 //BA.debugLineNum = 925;BA.debugLine="c.Close";
_c.Close();
 };
 //BA.debugLineNum = 927;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 931;BA.debugLine="End Sub";
return "";
}
public String  _t1_tick() throws Exception{
 //BA.debugLineNum = 2664;BA.debugLine="Sub t1_tick";
 //BA.debugLineNum = 2665;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 2666;BA.debugLine="cmd.Name = \"select_cuantos_pedido\"";
_cmd.Name /*String*/  = "select_cuantos_pedido";
 //BA.debugLineNum = 2667;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN,l_ruta.t";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_l_ruta.getText())};
 //BA.debugLineNum = 2668;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"valida_pedido\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("valida_pedido"));
 //BA.debugLineNum = 2670;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 2671;BA.debugLine="cmd.Name = \"select_cuantos_noventa_mards\"";
_cmd.Name /*String*/  = "select_cuantos_noventa_mards";
 //BA.debugLineNum = 2672;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN,l_ruta.t";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_l_ruta.getText())};
 //BA.debugLineNum = 2673;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"valida_noventa\"";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("valida_noventa"));
 //BA.debugLineNum = 2675;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 2676;BA.debugLine="cmd.Name = \"select_cuantos_pedidoc\"";
_cmd.Name /*String*/  = "select_cuantos_pedidoc";
 //BA.debugLineNum = 2677;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN,l_ruta.t";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_l_ruta.getText())};
 //BA.debugLineNum = 2678;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"valida_pedidoc\"";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("valida_pedidoc"));
 //BA.debugLineNum = 2679;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 2680;BA.debugLine="t1.Enabled = False";
_t1.setEnabled(__c.False);
 //BA.debugLineNum = 2681;BA.debugLine="End Sub";
return "";
}
public String  _t8_tick() throws Exception{
 //BA.debugLineNum = 3072;BA.debugLine="Sub t8_tick";
 //BA.debugLineNum = 3073;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 3074;BA.debugLine="cmd.Name = \"select_conteo_izca2\"";
_cmd.Name /*String*/  = "select_conteo_izca2";
 //BA.debugLineNum = 3075;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text, ALM";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 3076;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"CONTEO_DATOS\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("CONTEO_DATOS"));
 //BA.debugLineNum = 3077;BA.debugLine="l_carga2.Text = \"VALIDANDO\"";
_l_carga2.setText(BA.ObjectToCharSequence("VALIDANDO"));
 //BA.debugLineNum = 3078;BA.debugLine="L_carga.Text = \"VALIDANDO\"";
_l_carga.setText(BA.ObjectToCharSequence("VALIDANDO"));
 //BA.debugLineNum = 3079;BA.debugLine="PB_carga.Progress = 50";
_pb_carga.setProgress((int) (50));
 //BA.debugLineNum = 3080;BA.debugLine="PB_carga2.Progress = 50";
_pb_carga2.setProgress((int) (50));
 //BA.debugLineNum = 3081;BA.debugLine="t8.Enabled = False";
_t8.setEnabled(__c.False);
 //BA.debugLineNum = 3082;BA.debugLine="End Sub";
return "";
}
public String  _to_number_vb(Object _valor) throws Exception{
int _valstring = 0;
String _valstring2 = "";
 //BA.debugLineNum = 823;BA.debugLine="Sub to_number_vb (valor As Object) As String";
 //BA.debugLineNum = 824;BA.debugLine="Dim valstring As Int";
_valstring = 0;
 //BA.debugLineNum = 825;BA.debugLine="Dim valstring2 As String = valor";
_valstring2 = BA.ObjectToString(_valor);
 //BA.debugLineNum = 826;BA.debugLine="valstring2.Replace(\":\",\"\")";
_valstring2.replace(":","");
 //BA.debugLineNum = 827;BA.debugLine="Try";
try { //BA.debugLineNum = 828;BA.debugLine="valstring =valstring2.Replace(\":\",\"\")";
_valstring = (int)(Double.parseDouble(_valstring2.replace(":","")));
 //BA.debugLineNum = 829;BA.debugLine="Return valstring";
if (true) return BA.NumberToString(_valstring);
 } 
       catch (Exception e8) {
			ba.setLastException(e8); //BA.debugLineNum = 831;BA.debugLine="Return 0";
if (true) return BA.NumberToString(0);
 };
 //BA.debugLineNum = 833;BA.debugLine="End Sub";
return "";
}
public String  _trabajar_click() throws Exception{
 //BA.debugLineNum = 835;BA.debugLine="Sub trabajar_Click";
 //BA.debugLineNum = 836;BA.debugLine="If b_check.Visible = True Then";
if (_b_check.getVisible()==__c.True) { 
 //BA.debugLineNum = 837;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 = 840;BA.debugLine="B4XPages.ShowPage(\"Clientes\")";
_b4xpages._showpage /*String*/ (ba,"Clientes");
 };
 //BA.debugLineNum = 843;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;
}
}
