package reparto_medicomed.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_medicomed.keymon.lat.c_principal");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", reparto_medicomed.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_medicomed.keymon.lat.dbrequestmanager _reqmanager = null;
public String _conectado = "";
public anywheresoftware.b4a.objects.Timer _t1 = null;
public anywheresoftware.b4a.keywords.StringBuilderWrapper _sb = null;
public anywheresoftware.b4a.phone.Phone _phone = null;
public anywheresoftware.b4a.objects.ButtonWrapper _trabajar = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _d = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _b = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _e = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _f = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _f1 = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _f2 = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _f3 = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _f4 = null;
public anywheresoftware.b4a.objects.ListViewWrapper _lv = null;
public anywheresoftware.b4a.objects.ButtonWrapper _cargar = null;
public anywheresoftware.b4a.objects.ButtonWrapper _pendiente = null;
public byte[] _foto1 = null;
public String _usuario = "";
public anywheresoftware.b4a.objects.ButtonWrapper _connecta = null;
public String _conn = "";
public anywheresoftware.b4a.objects.ButtonWrapper _subir = null;
public reparto_medicomed.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_medicomed.keymon.lat.batteryutilities _bu = null;
public String _ruta_t = "";
public anywheresoftware.b4a.objects.collections.List _reqs = null;
public anywheresoftware.b4a.objects.ButtonWrapper _btn_ubicar_ru = null;
public String _cargo = "";
public anywheresoftware.b4a.objects.PanelWrapper _p_principal = null;
public anywheresoftware.b4a.objects.IME _ime = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_tabulador = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_rutasp = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_rechazo = null;
public anywheresoftware.b4a.objects.LabelWrapper _label9 = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _cp = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_check = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_rechazos = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_prod = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_regreso = null;
public anywheresoftware.b4a.objects.ListViewWrapper _lv_prod_prin = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_venta_emp = null;
public int _successfulrequests = 0;
public int _totalregistros = 0;
public int _totalregistrostotales = 0;
public int _todosrequest = 0;
public anywheresoftware.b4a.objects.PanelWrapper _penvioinfo = null;
public anywheresoftware.b4a.objects.ButtonWrapper _benvioinfo = null;
public anywheresoftware.b4a.objects.ProgressBarWrapper _pbenvioinfo = null;
public anywheresoftware.b4a.objects.LabelWrapper _lenviainfo = null;
public anywheresoftware.b4a.objects.LabelWrapper _lversionname = null;
public b4a.example.dateutils _dateutils = null;
public reparto_medicomed.keymon.lat.main _main = null;
public reparto_medicomed.keymon.lat.appupdater _appupdater = null;
public reparto_medicomed.keymon.lat.foto _foto = null;
public reparto_medicomed.keymon.lat.mapa_cliente _mapa_cliente = null;
public reparto_medicomed.keymon.lat.mapa_rutas _mapa_rutas = null;
public reparto_medicomed.keymon.lat.starter _starter = null;
public reparto_medicomed.keymon.lat.subs _subs = null;
public reparto_medicomed.keymon.lat.tracker _tracker = null;
public reparto_medicomed.keymon.lat.newinst2 _newinst2 = null;
public reparto_medicomed.keymon.lat.b4xpages _b4xpages = null;
public reparto_medicomed.keymon.lat.b4xcollections _b4xcollections = null;
public reparto_medicomed.keymon.lat.httputils2service _httputils2service = null;
public reparto_medicomed.keymon.lat.xuiviewsutils _xuiviewsutils = null;
public String  _b_check_click() throws Exception{
 //BA.debugLineNum = 2044;BA.debugLine="Private Sub b_check_Click";
 //BA.debugLineNum = 2046;BA.debugLine="B4XPages.ShowPage(\"checklist\")";
_b4xpages._showpage /*String*/ (ba,"checklist");
 //BA.debugLineNum = 2048;BA.debugLine="End Sub";
return "";
}
public String  _b_clieprod_click() throws Exception{
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
int _i = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc = null;
String _cuenta0 = "";
String _arti = "";
int _a = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc2 = null;
String _cuenta1 = "";
String _arti1 = "";
int _h = 0;
float _preu = 0f;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc3 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc4 = null;
String _cuenta2 = "";
String _arti2 = "";
int _k = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc5 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c4 = null;
String _cuenta3 = "";
String _arti3 = "";
int _x = 0;
String _totalmonto = "";
String _totalcantidad = "";
 //BA.debugLineNum = 1788;BA.debugLine="Sub B_CLIEPROD_Click";
 //BA.debugLineNum = 1789;BA.debugLine="If b_check.Visible = True Then";
if (_b_check.getVisible()==__c.True) { 
 //BA.debugLineNum = 1790;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 = 1792;BA.debugLine="BUSCA.Visible = False";
_busca.setVisible(__c.False);
 //BA.debugLineNum = 1793;BA.debugLine="connecta.Visible = False";
_connecta.setVisible(__c.False);
 //BA.debugLineNum = 1794;BA.debugLine="trabajar.Visible = False";
_trabajar.setVisible(__c.False);
 //BA.debugLineNum = 1795;BA.debugLine="B_CLIEPROD.Visible = False";
_b_clieprod.setVisible(__c.False);
 //BA.debugLineNum = 1796;BA.debugLine="Panel1.Visible = True";
_panel1.setVisible(__c.True);
 //BA.debugLineNum = 1797;BA.debugLine="Panel1.BringToFront";
_panel1.BringToFront();
 //BA.debugLineNum = 1798;BA.debugLine="Btn_Ubicar_Ru.Visible=False";
_btn_ubicar_ru.setVisible(__c.False);
 //BA.debugLineNum = 1799;BA.debugLine="c=Starter.skmt.ExecQuery(\"select * from kmt_info";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select * from kmt_info WHERE gestion <> 0 order by HORAENT")));
 //BA.debugLineNum = 1800;BA.debugLine="Subs.SetDivider(ListView1, Colors.LightGray, 2)";
_subs._setdivider /*String*/ (ba,_listview1,__c.Colors.LightGray,(int) (2));
 //BA.debugLineNum = 1801;BA.debugLine="ListView1.Clear";
_listview1.Clear();
 //BA.debugLineNum = 1802;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 1803;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = _listview1.getTwoLinesLayout().Label;
 //BA.debugLineNum = 1804;BA.debugLine="label1.TextSize = 10";
_label1.setTextSize((float) (10));
 //BA.debugLineNum = 1805;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 1806;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 1807;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = _listview1.getTwoLinesLayout().SecondLabel;
 //BA.debugLineNum = 1808;BA.debugLine="label2.TextSize = 10";
_label2.setTextSize((float) (10));
 //BA.debugLineNum = 1809;BA.debugLine="label2.TextColor = Colors.Black";
_label2.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 1811;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 1812;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step23 = 1;
final int limit23 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit23 ;_i = _i + step23 ) {
 //BA.debugLineNum = 1813;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 1814;BA.debugLine="If c.GetString(\"gestion\") = \"2\" Then";
if ((_c.GetString("gestion")).equals("2")) { 
 //BA.debugLineNum = 1815;BA.debugLine="ESTATUS = \"ENTREGADO\"";
_estatus = "ENTREGADO";
 //BA.debugLineNum = 1816;BA.debugLine="Log(\"entrega\")";
__c.LogImpl("014811164","entrega",0);
 }else if((_c.GetString("gestion")).equals("3")) { 
 //BA.debugLineNum = 1818;BA.debugLine="Log(\"no entrega\")";
__c.LogImpl("014811166","no entrega",0);
 //BA.debugLineNum = 1819;BA.debugLine="ESTATUS = \"RECHAZADO\"";
_estatus = "RECHAZADO";
 }else {
 //BA.debugLineNum = 1821;BA.debugLine="ESTATUS = \"SIN ESTATUS\"";
_estatus = "SIN ESTATUS";
 };
 //BA.debugLineNum = 1826;BA.debugLine="If ESTATUS = \"ENTREGADO\" Then";
if ((_estatus).equals("ENTREGADO")) { 
 //BA.debugLineNum = 1827;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 = 1829;BA.debugLine="Private cuenta0 As String = 0";
_cuenta0 = BA.NumberToString(0);
 //BA.debugLineNum = 1830;BA.debugLine="Private arti As String = 0";
_arti = BA.NumberToString(0);
 //BA.debugLineNum = 1831;BA.debugLine="If vc.RowCount > 0 Then";
if (_vc.getRowCount()>0) { 
 //BA.debugLineNum = 1832;BA.debugLine="For a = 0 To vc.RowCount - 1";
{
final int step39 = 1;
final int limit39 = (int) (_vc.getRowCount()-1);
_a = (int) (0) ;
for (;_a <= limit39 ;_a = _a + step39 ) {
 //BA.debugLineNum = 1833;BA.debugLine="vc.Position = a";
_vc.setPosition(_a);
 //BA.debugLineNum = 1835;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 = 1836;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 = 1841;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 = 1842;BA.debugLine="Private Cuenta1 As String = 0";
_cuenta1 = BA.NumberToString(0);
 //BA.debugLineNum = 1843;BA.debugLine="Private arti1 As String = 0";
_arti1 = BA.NumberToString(0);
 //BA.debugLineNum = 1844;BA.debugLine="If vc2.RowCount > 0 Then";
if (_vc2.getRowCount()>0) { 
 //BA.debugLineNum = 1845;BA.debugLine="For h = 0 To vc2.RowCount - 1";
{
final int step49 = 1;
final int limit49 = (int) (_vc2.getRowCount()-1);
_h = (int) (0) ;
for (;_h <= limit49 ;_h = _h + step49 ) {
 //BA.debugLineNum = 1846;BA.debugLine="vc2.Position = h";
_vc2.setPosition(_h);
 //BA.debugLineNum = 1847;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 = 1848;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 = 1849;BA.debugLine="If vc3.RowCount > 0 Then";
if (_vc3.getRowCount()>0) { 
 //BA.debugLineNum = 1850;BA.debugLine="vc3.Position = 0";
_vc3.setPosition((int) (0));
 //BA.debugLineNum = 1851;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 = 1852;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 = 1858;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 = 1859;BA.debugLine="Private Cuenta2 As String = 0";
_cuenta2 = BA.NumberToString(0);
 //BA.debugLineNum = 1860;BA.debugLine="Private arti2 As String = 0";
_arti2 = BA.NumberToString(0);
 //BA.debugLineNum = 1861;BA.debugLine="If vc4.RowCount > 0 Then";
if (_vc4.getRowCount()>0) { 
 //BA.debugLineNum = 1863;BA.debugLine="For k = 0 To vc4.RowCount - 1";
{
final int step64 = 1;
final int limit64 = (int) (_vc4.getRowCount()-1);
_k = (int) (0) ;
for (;_k <= limit64 ;_k = _k + step64 ) {
 //BA.debugLineNum = 1864;BA.debugLine="vc4.Position = k";
_vc4.setPosition(_k);
 //BA.debugLineNum = 1865;BA.debugLine="If vc4.GetString(\"HVD_PROID\") <> vc4.GetStr";
if ((_vc4.GetString("HVD_PROID")).equals(_vc4.GetString("HVD_CODPROMO")) == false) { 
 //BA.debugLineNum = 1866;BA.debugLine="If vc4.GetString(\"HVD_RECHAZO\") = 0 Then";
if ((_vc4.GetString("HVD_RECHAZO")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 1867;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 = 1868;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 = 1870;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 = 1871;BA.debugLine="If vc5.RowCount > 0 Then";
if (_vc5.getRowCount()>0) { 
 //BA.debugLineNum = 1872;BA.debugLine="vc5.Position= 0";
_vc5.setPosition((int) (0));
 //BA.debugLineNum = 1874;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 = 1875;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 = 1884;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 = 1885;BA.debugLine="Private Cuenta3 As String = 0";
_cuenta3 = BA.NumberToString(0);
 //BA.debugLineNum = 1886;BA.debugLine="Private arti3 As String = 0";
_arti3 = BA.NumberToString(0);
 //BA.debugLineNum = 1887;BA.debugLine="If c4.RowCount > 0 Then";
if (_c4.getRowCount()>0) { 
 //BA.debugLineNum = 1888;BA.debugLine="For x = 0 To c4.RowCount -1";
{
final int step85 = 1;
final int limit85 = (int) (_c4.getRowCount()-1);
_x = (int) (0) ;
for (;_x <= limit85 ;_x = _x + step85 ) {
 //BA.debugLineNum = 1889;BA.debugLine="c4.Position = x";
_c4.setPosition(_x);
 //BA.debugLineNum = 1890;BA.debugLine="arti3 = arti3 + c4.GetString(\"PE_CANT\")";
_arti3 = BA.NumberToString((double)(Double.parseDouble(_arti3))+(double)(Double.parseDouble(_c4.GetString("PE_CANT"))));
 //BA.debugLineNum = 1891;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 = 1896;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 = 1897;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 = 1899;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 = 1900;BA.debugLine="Log(\"si entre2\")";
__c.LogImpl("014811248","si entre2",0);
 }else if((_estatus).equals("RECHAZADO")) { 
 //BA.debugLineNum = 1904;BA.debugLine="Private vc As Cursor = Starter.skmt.ExecQuery";
_vc = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select HVD_PROID, HVD_CANT, IFNULL(HVD_RECHAZOCANT, 0) AS HVD_RECHAZOCANT, CAT_GP_PRECIO, HVD_COSTO_TOT from HIST_VENTAS LEFT JOIN CAT_GUNAPROD ON CAT_GP_ID = HVD_PROID where BCAJAS = 0 and HVD_CODPROMO ='"+__c.SmartStringFormatter("",(Object)(_subs._traealmacen /*String*/ (ba)))+"' and HVD_CLIENTE = '"+__c.SmartStringFormatter("",(Object)(_c.GetString("CAT_CL_CODIGO")))+"'"))));
 //BA.debugLineNum = 1906;BA.debugLine="Private cuenta0 As String = 0";
_cuenta0 = BA.NumberToString(0);
 //BA.debugLineNum = 1907;BA.debugLine="Private arti As String = 0";
_arti = BA.NumberToString(0);
 //BA.debugLineNum = 1908;BA.debugLine="If vc.RowCount > 0 Then";
if (_vc.getRowCount()>0) { 
 //BA.debugLineNum = 1909;BA.debugLine="For a = 0 To vc.RowCount - 1";
{
final int step100 = 1;
final int limit100 = (int) (_vc.getRowCount()-1);
_a = (int) (0) ;
for (;_a <= limit100 ;_a = _a + step100 ) {
 //BA.debugLineNum = 1910;BA.debugLine="vc.Position = a";
_vc.setPosition(_a);
 //BA.debugLineNum = 1911;BA.debugLine="Dim preu As Float = NumberFormat2(vc.GetStr";
_preu = (float)(Double.parseDouble(__c.NumberFormat2((double)(Double.parseDouble(_vc.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_vc.GetString("HVD_CANT"))),(int) (0),(int) (2),(int) (2),__c.False)));
 //BA.debugLineNum = 1913;BA.debugLine="arti = arti + (vc.GetString(\"HVD_RECHAZOCAN";
_arti = BA.NumberToString((double)(Double.parseDouble(_arti))+(double)(Double.parseDouble((_vc.GetString("HVD_RECHAZOCANT")))));
 //BA.debugLineNum = 1914;BA.debugLine="cuenta0 = cuenta0 + ((vc.GetString(\"HVD_REC";
_cuenta0 = BA.NumberToString((double)(Double.parseDouble(_cuenta0))+((double)(Double.parseDouble((_vc.GetString("HVD_RECHAZOCANT"))))*_preu));
 }
};
 };
 //BA.debugLineNum = 1919;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 = 1920;BA.debugLine="Private Cuenta1 As String = 0";
_cuenta1 = BA.NumberToString(0);
 //BA.debugLineNum = 1921;BA.debugLine="Private arti1 As String = 0";
_arti1 = BA.NumberToString(0);
 //BA.debugLineNum = 1922;BA.debugLine="If vc2.RowCount > 0 Then";
if (_vc2.getRowCount()>0) { 
 //BA.debugLineNum = 1923;BA.debugLine="For h = 0 To vc2.RowCount - 1";
{
final int step111 = 1;
final int limit111 = (int) (_vc2.getRowCount()-1);
_h = (int) (0) ;
for (;_h <= limit111 ;_h = _h + step111 ) {
 //BA.debugLineNum = 1924;BA.debugLine="vc2.Position = h";
_vc2.setPosition(_h);
 //BA.debugLineNum = 1925;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 = 1926;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 = 1927;BA.debugLine="If vc3.RowCount > 0 Then";
if (_vc3.getRowCount()>0) { 
 //BA.debugLineNum = 1928;BA.debugLine="vc3.Position = 0";
_vc3.setPosition((int) (0));
 //BA.debugLineNum = 1929;BA.debugLine="Cuenta1 = Cuenta1 + ((vc2.GetString(\"HVD_R";
_cuenta1 = BA.NumberToString((double)(Double.parseDouble(_cuenta1))+(((double)(Double.parseDouble(_vc2.GetString("HVD_RECHAZOCANT")))/(double)(double)(Double.parseDouble(_vc3.GetString("CONVERSION"))))*_preu));
 //BA.debugLineNum = 1930;BA.debugLine="arti1 = arti1 + (vc2.GetString(\"HVD_RECHAZ";
_arti1 = BA.NumberToString((double)(Double.parseDouble(_arti1))+(double)(Double.parseDouble((_vc2.GetString("HVD_RECHAZOCANT")))));
 };
 }
};
 };
 //BA.debugLineNum = 1936;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 = 1937;BA.debugLine="Private Cuenta2 As String = 0";
_cuenta2 = BA.NumberToString(0);
 //BA.debugLineNum = 1938;BA.debugLine="Private arti2 As String = 0";
_arti2 = BA.NumberToString(0);
 //BA.debugLineNum = 1939;BA.debugLine="If vc4.RowCount > 0 Then";
if (_vc4.getRowCount()>0) { 
 //BA.debugLineNum = 1941;BA.debugLine="For k = 0 To vc4.RowCount - 1";
{
final int step126 = 1;
final int limit126 = (int) (_vc4.getRowCount()-1);
_k = (int) (0) ;
for (;_k <= limit126 ;_k = _k + step126 ) {
 //BA.debugLineNum = 1942;BA.debugLine="vc4.Position = k";
_vc4.setPosition(_k);
 //BA.debugLineNum = 1943;BA.debugLine="If vc4.GetString(\"HVD_PROID\") <> vc4.GetStr";
if ((_vc4.GetString("HVD_PROID")).equals(_vc4.GetString("HVD_CODPROMO")) == false) { 
 //BA.debugLineNum = 1944;BA.debugLine="If vc4.GetString(\"HVD_RECHAZO\") = 0 Then";
if ((_vc4.GetString("HVD_RECHAZO")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 1945;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 = 1946;BA.debugLine="arti2 = arti2 + vc4.GetString(\"HVD_RECHAZ";
_arti2 = BA.NumberToString((double)(Double.parseDouble(_arti2))+(double)(Double.parseDouble(_vc4.GetString("HVD_RECHAZOCANT"))));
 }else {
 //BA.debugLineNum = 1948;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 = 1949;BA.debugLine="If vc5.RowCount > 0 Then";
if (_vc5.getRowCount()>0) { 
 //BA.debugLineNum = 1950;BA.debugLine="vc5.Position= 0";
_vc5.setPosition((int) (0));
 //BA.debugLineNum = 1952;BA.debugLine="Cuenta2 = Cuenta2 +(( vc4.GetString(\"HVD";
_cuenta2 = BA.NumberToString((double)(Double.parseDouble(_cuenta2))+((double)(Double.parseDouble((_vc4.GetString("HVD_RECHAZOCANT"))))*(double)(Double.parseDouble(_vc5.GetString("CAT_GP_PRECIO")))));
 //BA.debugLineNum = 1953;BA.debugLine="arti2 = arti2 +(vc4.GetString(\"HVD_RECHA";
_arti2 = BA.NumberToString((double)(Double.parseDouble(_arti2))+(double)(Double.parseDouble((_vc4.GetString("HVD_RECHAZOCANT")))));
 };
 };
 };
 }
};
 };
 //BA.debugLineNum = 1962;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 = 1963;BA.debugLine="Private Cuenta3 As String = 0";
_cuenta3 = BA.NumberToString(0);
 //BA.debugLineNum = 1964;BA.debugLine="Private arti3 As String = 0";
_arti3 = BA.NumberToString(0);
 //BA.debugLineNum = 1965;BA.debugLine="If c4.RowCount > 0 Then";
if (_c4.getRowCount()>0) { 
 //BA.debugLineNum = 1966;BA.debugLine="For x = 0 To c4.RowCount -1";
{
final int step147 = 1;
final int limit147 = (int) (_c4.getRowCount()-1);
_x = (int) (0) ;
for (;_x <= limit147 ;_x = _x + step147 ) {
 //BA.debugLineNum = 1967;BA.debugLine="c4.Position = x";
_c4.setPosition(_x);
 //BA.debugLineNum = 1968;BA.debugLine="arti3 = arti3 + c4.GetString(\"PE_CANT\")";
_arti3 = BA.NumberToString((double)(Double.parseDouble(_arti3))+(double)(Double.parseDouble(_c4.GetString("PE_CANT"))));
 //BA.debugLineNum = 1969;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 = 1974;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 = 1975;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 = 1977;BA.debugLine="Log(\"si entre\")";
__c.LogImpl("014811325","si entre",0);
 //BA.debugLineNum = 1978;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 = 2013;BA.debugLine="End Sub";
return "";
}
public String  _b_mapa_click() throws Exception{
 //BA.debugLineNum = 1732;BA.debugLine="Sub b_mapa_Click";
 //BA.debugLineNum = 1734;BA.debugLine="B4XPages.ShowPage(\"mapas\")";
_b4xpages._showpage /*String*/ (ba,"mapas");
 //BA.debugLineNum = 1735;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 = 2061;BA.debugLine="Private Sub b_rechazos_Click";
 //BA.debugLineNum = 2062;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 2063;BA.debugLine="label1 = lv_prod_Prin.SingleLineLayout.Label";
_label1 = _lv_prod_prin.getSingleLineLayout().Label;
 //BA.debugLineNum = 2064;BA.debugLine="label1.TextSize = 14";
_label1.setTextSize((float) (14));
 //BA.debugLineNum = 2065;BA.debugLine="p_prod.Width = Root.Width";
_p_prod.setWidth(_root.getWidth());
 //BA.debugLineNum = 2066;BA.debugLine="p_prod.Height = Root.Height";
_p_prod.setHeight(_root.getHeight());
 //BA.debugLineNum = 2067;BA.debugLine="b_regreso.Left = (p_prod.Width - b_regreso.Width)";
_b_regreso.setLeft((int) ((_p_prod.getWidth()-_b_regreso.getWidth())/(double)2));
 //BA.debugLineNum = 2068;BA.debugLine="b_regreso.Top = p_prod.Height - b_regreso.Height";
_b_regreso.setTop((int) (_p_prod.getHeight()-_b_regreso.getHeight()));
 //BA.debugLineNum = 2070;BA.debugLine="p_prod.Visible = True";
_p_prod.setVisible(__c.True);
 //BA.debugLineNum = 2071;BA.debugLine="p_prod.BringToFront";
_p_prod.BringToFront();
 //BA.debugLineNum = 2076;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 = 2078;BA.debugLine="lv_prod_Prin.SingleLineLayout.Label.TextColor = C";
_lv_prod_prin.getSingleLineLayout().Label.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 2079;BA.debugLine="lv_prod_Prin.Clear";
_lv_prod_prin.Clear();
 //BA.debugLineNum = 2080;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 2081;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step14 = 1;
final int limit14 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit14 ;_i = _i + step14 ) {
 //BA.debugLineNum = 2082;BA.debugLine="c.Position = i";
_c.setPosition(_i);
 //BA.debugLineNum = 2083;BA.debugLine="Dim itemText As String";
_itemtext = "";
 //BA.debugLineNum = 2085;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 = 2086;BA.debugLine="Private resta As String = 0";
_resta = BA.NumberToString(0);
 //BA.debugLineNum = 2088;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
 //BA.debugLineNum = 2089;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
 //BA.debugLineNum = 2090;BA.debugLine="resta =  c3.GetString(\"PE_CANT\")";
_resta = _c3.GetString("PE_CANT");
 }else {
 //BA.debugLineNum = 2092;BA.debugLine="resta = 0";
_resta = BA.NumberToString(0);
 };
 //BA.debugLineNum = 2094;BA.debugLine="If ( c.GetInt(\"HVD_RECHAZOCANT\") - resta) <= 0";
if ((_c.GetInt("HVD_RECHAZOCANT")-(double)(Double.parseDouble(_resta)))<=0) { 
 }else {
 //BA.debugLineNum = 2097;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 = 2098;BA.debugLine="lv_prod_Prin.AddSingleLine(itemText)";
_lv_prod_prin.AddSingleLine(BA.ObjectToCharSequence(_itemtext));
 };
 }
};
 }else {
 //BA.debugLineNum = 2104;BA.debugLine="lv_prod_Prin.AddSingleLine(\"No hay datos disponi";
_lv_prod_prin.AddSingleLine(BA.ObjectToCharSequence("No hay datos disponibles."));
 };
 //BA.debugLineNum = 2106;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 2107;BA.debugLine="End Sub";
return "";
}
public String  _b_regresa_click() throws Exception{
 //BA.debugLineNum = 2015;BA.debugLine="Sub B_REGRESA_Click";
 //BA.debugLineNum = 2016;BA.debugLine="Log(\"B_REGRESA_Click\")";
__c.LogImpl("014876673","B_REGRESA_Click",0);
 //BA.debugLineNum = 2017;BA.debugLine="BUSCA.Visible = False";
_busca.setVisible(__c.False);
 //BA.debugLineNum = 2018;BA.debugLine="connecta.Visible = True";
_connecta.setVisible(__c.True);
 //BA.debugLineNum = 2019;BA.debugLine="trabajar.Visible = True";
_trabajar.setVisible(__c.True);
 //BA.debugLineNum = 2020;BA.debugLine="B_CLIEPROD.Visible = True";
_b_clieprod.setVisible(__c.True);
 //BA.debugLineNum = 2021;BA.debugLine="Panel1.Visible = False";
_panel1.setVisible(__c.False);
 //BA.debugLineNum = 2022;BA.debugLine="Btn_Ubicar_Ru.Visible=True";
_btn_ubicar_ru.setVisible(__c.True);
 //BA.debugLineNum = 2023;BA.debugLine="End Sub";
return "";
}
public String  _b_regreso_click() throws Exception{
 //BA.debugLineNum = 2109;BA.debugLine="Private Sub b_regreso_Click";
 //BA.debugLineNum = 2110;BA.debugLine="p_prod.Visible = False";
_p_prod.setVisible(__c.False);
 //BA.debugLineNum = 2111;BA.debugLine="End Sub";
return "";
}
public String  _b_tabulador_click() throws Exception{
 //BA.debugLineNum = 2036;BA.debugLine="Private Sub b_tabulador_Click";
 //BA.debugLineNum = 2037;BA.debugLine="If b_check.Visible = True Then";
if (_b_check.getVisible()==__c.True) { 
 //BA.debugLineNum = 2038;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 = 2040;BA.debugLine="B4XPages.ShowPage(\"tabulador\")";
_b4xpages._showpage /*String*/ (ba,"tabulador");
 };
 //BA.debugLineNum = 2042;BA.debugLine="End Sub";
return "";
}
public String  _b_venta_emp_click() throws Exception{
 //BA.debugLineNum = 2117;BA.debugLine="Private Sub b_venta_emp_Click";
 //BA.debugLineNum = 2118;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CUENTAA\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CUENTAA");
 //BA.debugLineNum = 2119;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO CUENTAA V";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("63403")}));
 //BA.debugLineNum = 2120;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 //BA.debugLineNum = 2121;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear() throws Exception{
int _i = 0;
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;
 //BA.debugLineNum = 171;BA.debugLine="Sub B4XPage_Appear";
 //BA.debugLineNum = 173;BA.debugLine="lVersionName.Text = \"Version: \" & Application.Ver";
_lversionname.setText(BA.ObjectToCharSequence("Version: "+__c.Application.getVersionName()));
 //BA.debugLineNum = 174;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 = 175;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 176;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 = 178;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 = 179;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 180;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 = 183;BA.debugLine="b_check.visible = False";
_b_check.setVisible(__c.False);
 //BA.debugLineNum = 184;BA.debugLine="Subs.centraPanel(p_principal, Root.Width)";
_subs._centrapanel /*String*/ (ba,_p_principal,_root.getWidth());
 //BA.debugLineNum = 197;BA.debugLine="If EJECUTANDO = 0 Then";
if ((_ejecutando).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 198;BA.debugLine="Listo1 = 0";
_listo1 = BA.NumberToString(0);
 //BA.debugLineNum = 199;BA.debugLine="Listo2 = 0";
_listo2 = BA.NumberToString(0);
 //BA.debugLineNum = 200;BA.debugLine="Listo3 = 0";
_listo3 = BA.NumberToString(0);
 //BA.debugLineNum = 201;BA.debugLine="Listo4 = 0";
_listo4 = BA.NumberToString(0);
 //BA.debugLineNum = 202;BA.debugLine="Listo5 = 0";
_listo5 = BA.NumberToString(0);
 //BA.debugLineNum = 203;BA.debugLine="inve = 0";
_inve = BA.NumberToString(0);
 //BA.debugLineNum = 204;BA.debugLine="img2.Visible =False";
_img2.setVisible(__c.False);
 };
 //BA.debugLineNum = 206;BA.debugLine="l_ruta.Text = 0";
_l_ruta.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 207;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 = 208;BA.debugLine="If f.RowCount > 0 Then";
if (_f.getRowCount()>0) { 
 //BA.debugLineNum = 209;BA.debugLine="f.Position = 0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 210;BA.debugLine="l_ruta.Text = f.GetString(\"RUTAA\")";
_l_ruta.setText(BA.ObjectToCharSequence(_f.GetString("RUTAA")));
 };
 //BA.debugLineNum = 212;BA.debugLine="f.Close";
_f.Close();
 //BA.debugLineNum = 213;BA.debugLine="If l_ruta.Text = 0 Then";
if ((_l_ruta.getText()).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 214;BA.debugLine="l_ruta.Text = 0";
_l_ruta.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 215;BA.debugLine="l_rutasP.Text = 0";
_l_rutasp.setText(BA.ObjectToCharSequence(0));
 }else {
 //BA.debugLineNum = 217;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 = 219;BA.debugLine="l_rutasP.Text = \"\"";
_l_rutasp.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 220;BA.debugLine="For i = 0 To f.RowCount - 1";
{
final int step34 = 1;
final int limit34 = (int) (_f.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit34 ;_i = _i + step34 ) {
 //BA.debugLineNum = 221;BA.debugLine="f.Position = i";
_f.setPosition(_i);
 //BA.debugLineNum = 222;BA.debugLine="If i = 0 Then";
if (_i==0) { 
 //BA.debugLineNum = 223;BA.debugLine="l_rutasP.Text = f.GetString(\"CAT_CL_RUTA\")";
_l_rutasp.setText(BA.ObjectToCharSequence(_f.GetString("CAT_CL_RUTA")));
 }else {
 //BA.debugLineNum = 225;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 = 228;BA.debugLine="f.Close";
_f.Close();
 };
 //BA.debugLineNum = 230;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 231;BA.debugLine="fecha=DateTime.Date(DateTime.Now)";
_fecha = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 232;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 = 233;BA.debugLine="b.Position=0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 234;BA.debugLine="If b.RowCount > 0 Then Cuantos = b.GetString(\"CUA";
if (_b.getRowCount()>0) { 
_cuantos = _b.GetString("CUANTOS");};
 //BA.debugLineNum = 235;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 = 236;BA.debugLine="D.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 237;BA.debugLine="b.Close";
_b.Close();
 //BA.debugLineNum = 238;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 = 239;BA.debugLine="e.Position=0";
_e.setPosition((int) (0));
 //BA.debugLineNum = 250;BA.debugLine="cargar.Visible = False";
_cargar.setVisible(__c.False);
 //BA.debugLineNum = 251;BA.debugLine="Subir.Visible = False";
_subir.setVisible(__c.False);
 //BA.debugLineNum = 252;BA.debugLine="connecta.Visible = True";
_connecta.setVisible(__c.True);
 //BA.debugLineNum = 254;BA.debugLine="If Cuantos = 0 Then";
if ((_cuantos).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 255;BA.debugLine="l_aLiquidar.Text = 0";
_l_aliquidar.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 256;BA.debugLine="l_cuantosc.Text = 0";
_l_cuantosc.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 257;BA.debugLine="l_cuantosn.Text = 0";
_l_cuantosn.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 258;BA.debugLine="drop = 0";
_drop = 0;
 //BA.debugLineNum = 259;BA.debugLine="l_montoSalida.Text = 0";
_l_montosalida.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 260;BA.debugLine="efectiva = 0";
_efectiva = 0;
 //BA.debugLineNum = 263;BA.debugLine="L_MONTOE.Text = 0";
_l_montoe.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 264;BA.debugLine="l_ctast.Text = 0";
_l_ctast.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 265;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 = 266;BA.debugLine="l_porvisitar.Text = 0";
_l_porvisitar.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 267;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 = 268;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 269;BA.debugLine="e.Close";
_e.Close();
 }else {
 //BA.debugLineNum = 271;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 = 272;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 = 273;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 = 275;BA.debugLine="b=Starter.skmt.ExecQuery(\"select count(DISTINCT";
_b = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(DISTINCT NV_CLIENTE) as CUANTOS from noventa where nv_motivo <> 'ENTREGA' and NV_CLIENTE <> 63403")));
 //BA.debugLineNum = 277;BA.debugLine="L=Starter.skmt.ExecQuery(\"select count(DISTINCT";
_l = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(DISTINCT NV_CLIENTE) as CLIENTES_DIA from noventa where nv_motivo = 'ENTREGA' and NV_CLIENTE <> 63403")));
 //BA.debugLineNum = 278;BA.debugLine="f2.Position=0";
_f2.setPosition((int) (0));
 //BA.debugLineNum = 281;BA.debugLine="Private MONTO_REC_DIA = 0";
_monto_rec_dia = BA.NumberToString(0);
 //BA.debugLineNum = 282;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 = 293;BA.debugLine="C.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 294;BA.debugLine="b.Position = 0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 295;BA.debugLine="L.Position = 0";
_l.setPosition((int) (0));
 //BA.debugLineNum = 296;BA.debugLine="f1.Position = 0";
_f1.setPosition((int) (0));
 //BA.debugLineNum = 297;BA.debugLine="l_aLiquidar.Text = 0";
_l_aliquidar.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 298;BA.debugLine="If f1.RowCount > 0 Then l_aLiquidar.Text = to_nu";
if (_f1.getRowCount()>0) { 
_l_aliquidar.setText(BA.ObjectToCharSequence(_to_number_vb((Object)(_f1.GetString("MONTO_TOTAL_DIA")))));};
 //BA.debugLineNum = 299;BA.debugLine="L_MONTOE.Text = 0";
_l_montoe.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 301;BA.debugLine="l_cuantosc.Text = 0";
_l_cuantosc.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 302;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 = 303;BA.debugLine="l_cuantosn.Text = 0";
_l_cuantosn.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 304;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 = 306;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 = 308;BA.debugLine="l_ctast.Text = 0";
_l_ctast.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 309;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 = 310;BA.debugLine="l_porvisitar.Text = 0";
_l_porvisitar.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 311;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 = 312;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 313;BA.debugLine="b.Close";
_b.Close();
 //BA.debugLineNum = 324;BA.debugLine="c.Close";
_c.Close();
 };
 //BA.debugLineNum = 326;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 = 327;BA.debugLine="C.Position =0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 328;BA.debugLine="ALMACEN = 0";
_almacen = BA.NumberToString(0);
 //BA.debugLineNum = 329;BA.debugLine="If C.RowCount > 0 Then ALMACEN = C.GetString(\"ID_";
if (_c.getRowCount()>0) { 
_almacen = _c.GetString("ID_ALMACEN");};
 //BA.debugLineNum = 330;BA.debugLine="B4XPages.MainPage.almacen = ALMACEN";
_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._almacen /*String*/  = _almacen;
 //BA.debugLineNum = 331;BA.debugLine="C.Close";
_c.Close();
 //BA.debugLineNum = 332;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 = 334;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 335;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step108 = 1;
final int limit108 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit108 ;_i = _i + step108 ) {
 //BA.debugLineNum = 336;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 337;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_medicomed.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 338;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 339;BA.debugLine="cmd.Name = \"insert_gps_actual_REP\"";
_cmd.Name /*String*/  = "insert_gps_actual_REP";
 //BA.debugLineNum = 340;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 = 344;BA.debugLine="bu.Initialize";
_bu._initialize /*String*/ (ba);
 //BA.debugLineNum = 345;BA.debugLine="batterystatus = bu.BatteryInformation";
_batterystatus = _bu._getbatteryinformation /*int[]*/ ();
 //BA.debugLineNum = 347;BA.debugLine="B4XPages.MainPage.batt = batterystatus(0)";
_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._batt /*int*/  = _batterystatus[(int) (0)];
 //BA.debugLineNum = 348;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 = 349;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 350;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 351;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 352;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 = 353;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 354;BA.debugLine="RUTA_T = 0";
_ruta_t = BA.NumberToString(0);
 //BA.debugLineNum = 355;BA.debugLine="If c.RowCount > 0 Then RUTA_T = c.GetString(\"RUTA";
if (_c.getRowCount()>0) { 
_ruta_t = _c.GetString("RUTAA");};
 //BA.debugLineNum = 356;BA.debugLine="B4XPages.MainPage.rutaPreventa = RUTA_T";
_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._rutapreventa /*String*/  = _ruta_t;
 //BA.debugLineNum = 357;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 358;BA.debugLine="reqs.Initialize";
_reqs.Initialize();
 //BA.debugLineNum = 360;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 = 362;BA.debugLine="If rc.RowCount > 0 Then";
if (_rc.getRowCount()>0) { 
 //BA.debugLineNum = 363;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from RECHAZOS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from RECHAZOS"));
 //BA.debugLineNum = 364;BA.debugLine="For i3=0 To rc.RowCount -1 'Copiamos los rechazo";
{
final int step133 = 1;
final int limit133 = (int) (_rc.getRowCount()-1);
_i3 = (int) (0) ;
for (;_i3 <= limit133 ;_i3 = _i3 + step133 ) {
 //BA.debugLineNum = 365;BA.debugLine="rc.Position = i3";
_rc.setPosition(_i3);
 //BA.debugLineNum = 368;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 = 371;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 = 373;BA.debugLine="If vc.RowCount > 0 Then";
if (_vc.getRowCount()>0) { 
 //BA.debugLineNum = 374;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from VENTAS\"$";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from VENTAS"));
 //BA.debugLineNum = 375;BA.debugLine="For i4=0 To vc.RowCount -1 'Copiamos las ventas";
{
final int step141 = 1;
final int limit141 = (int) (_vc.getRowCount()-1);
_i4 = (int) (0) ;
for (;_i4 <= limit141 ;_i4 = _i4 + step141 ) {
 //BA.debugLineNum = 376;BA.debugLine="vc.Position = i4";
_vc.setPosition(_i4);
 //BA.debugLineNum = 379;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 = 382;BA.debugLine="Starter.ENVIA_ULTIMA_GPS";
_starter._envia_ultima_gps /*String*/ ();
 //BA.debugLineNum = 387;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 = 388;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 = 389;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 = 390;BA.debugLine="l_aLiquidar.Text = entMap.Get(\"monto\") + vendMap.";
_l_aliquidar.setText(BA.ObjectToCharSequence((double)(BA.ObjectToNumber(_entmap.Get((Object)("monto"))))+(double)(BA.ObjectToNumber(_vendmap.Get((Object)("monto"))))));
 //BA.debugLineNum = 392;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 = 393;BA.debugLine="If cancelrecha.RowCount > 0 Then";
if (_cancelrecha.getRowCount()>0) { 
 //BA.debugLineNum = 394;BA.debugLine="For h54 = 0 To cancelrecha.RowCount - 1";
{
final int step153 = 1;
final int limit153 = (int) (_cancelrecha.getRowCount()-1);
_h54 = (int) (0) ;
for (;_h54 <= limit153 ;_h54 = _h54 + step153 ) {
 //BA.debugLineNum = 395;BA.debugLine="cancelrecha.Position = h54";
_cancelrecha.setPosition(_h54);
 //BA.debugLineNum = 396;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 = 399;BA.debugLine="cancelrecha.Close";
_cancelrecha.Close();
 //BA.debugLineNum = 403;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 = 405;BA.debugLine="Private rescant As String = 0";
_rescant = BA.NumberToString(0);
 //BA.debugLineNum = 406;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 407;BA.debugLine="For j4 = 0 To r5.RowCount -1";
{
final int step162 = 1;
final int limit162 = (int) (_r5.getRowCount()-1);
_j4 = (int) (0) ;
for (;_j4 <= limit162 ;_j4 = _j4 + step162 ) {
 //BA.debugLineNum = 408;BA.debugLine="r5.Position = j4";
_r5.setPosition(_j4);
 //BA.debugLineNum = 409;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 = 410;BA.debugLine="Dim totalcantped As String";
_totalcantped = "";
 //BA.debugLineNum = 411;BA.debugLine="If r6.RowCount > 0 Then";
if (_r6.getRowCount()>0) { 
 //BA.debugLineNum = 412;BA.debugLine="r6.Position = 0";
_r6.setPosition((int) (0));
 //BA.debugLineNum = 413;BA.debugLine="totalcantped = r6.GetString(\"PE_CANT\")";
_totalcantped = _r6.GetString("PE_CANT");
 }else {
 //BA.debugLineNum = 416;BA.debugLine="totalcantped = 0";
_totalcantped = BA.NumberToString(0);
 };
 //BA.debugLineNum = 419;BA.debugLine="Log(r5.GetString(\"HVD_RECHAZOCANT\") &\" - \"& tot";
__c.LogImpl("013697272",_r5.GetString("HVD_RECHAZOCANT")+" - "+_totalcantped,0);
 //BA.debugLineNum = 420;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 = 422;BA.debugLine="r6.Close";
_r6.Close();
 }
};
 };
 //BA.debugLineNum = 425;BA.debugLine="If rescant = \"NaN\" Then rescant = 0";
if ((_rescant).equals("NaN")) { 
_rescant = BA.NumberToString(0);};
 //BA.debugLineNum = 426;BA.debugLine="LogColor(rescant,Colors.Red)";
__c.LogImpl("013697279",_rescant,__c.Colors.Red);
 //BA.debugLineNum = 427;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 431;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 = 435;BA.debugLine="Private rescant2 As Double = 0";
_rescant2 = 0;
 //BA.debugLineNum = 436;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 437;BA.debugLine="For j5 = 0 To r5.RowCount -1";
{
final int step183 = 1;
final int limit183 = (int) (_r5.getRowCount()-1);
_j5 = (int) (0) ;
for (;_j5 <= limit183 ;_j5 = _j5 + step183 ) {
 //BA.debugLineNum = 438;BA.debugLine="r5.Position = j5";
_r5.setPosition(_j5);
 //BA.debugLineNum = 439;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 = 440;BA.debugLine="r6.Position = 0";
_r6.setPosition((int) (0));
 //BA.debugLineNum = 442;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 = 443;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 = 444;BA.debugLine="r6.Close";
_r6.Close();
 }
};
 };
 //BA.debugLineNum = 447;BA.debugLine="If rescant2 = \"NaN\" Then rescant2 = 0";
if (_rescant2==(double)(Double.parseDouble("NaN"))) { 
_rescant2 = 0;};
 //BA.debugLineNum = 448;BA.debugLine="Log(rescant2)";
__c.LogImpl("013697301",BA.NumberToString(_rescant2),0);
 //BA.debugLineNum = 449;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 454;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 = 456;BA.debugLine="Private rescantr As String = 0";
_rescantr = BA.NumberToString(0);
 //BA.debugLineNum = 457;BA.debugLine="If r5r.RowCount > 0 Then";
if (_r5r.getRowCount()>0) { 
 //BA.debugLineNum = 458;BA.debugLine="For j4r = 0 To r5r.RowCount -1";
{
final int step198 = 1;
final int limit198 = (int) (_r5r.getRowCount()-1);
_j4r = (int) (0) ;
for (;_j4r <= limit198 ;_j4r = _j4r + step198 ) {
 //BA.debugLineNum = 459;BA.debugLine="r5r.Position = j4r";
_r5r.setPosition(_j4r);
 //BA.debugLineNum = 460;BA.debugLine="Private r6r As Cursor = Starter.skmt.ExecQuery(";
_r6r = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r6r = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select IFNULL(SUM(PE_CANT),0) AS PE_CANT from PEDIDO where PE_CLIENTEOR = '"+__c.SmartStringFormatter("",(Object)(_r5r.GetString("HVD_CLIENTE")))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_r5r.GetString("HVD_PROID")))+"' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_r5r.GetString("CONSECUTIVO")))+"' "))));
 //BA.debugLineNum = 461;BA.debugLine="r6r.Position = 0";
_r6r.setPosition((int) (0));
 //BA.debugLineNum = 464;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 = 465;BA.debugLine="r6r.Close";
_r6r.Close();
 }
};
 };
 //BA.debugLineNum = 468;BA.debugLine="If rescantr = \"NaN\" Then rescantr = 0";
if ((_rescantr).equals("NaN")) { 
_rescantr = BA.NumberToString(0);};
 //BA.debugLineNum = 470;BA.debugLine="r5r.Close";
_r5r.Close();
 //BA.debugLineNum = 472;BA.debugLine="Log(rescantr)";
__c.LogImpl("013697325",_rescantr,0);
 //BA.debugLineNum = 474;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 = 478;BA.debugLine="Private rescant2r As String = 0";
_rescant2r = BA.NumberToString(0);
 //BA.debugLineNum = 479;BA.debugLine="If r5r.RowCount > 0 Then";
if (_r5r.getRowCount()>0) { 
 //BA.debugLineNum = 480;BA.debugLine="For j5r = 0 To r5r.RowCount -1";
{
final int step212 = 1;
final int limit212 = (int) (_r5r.getRowCount()-1);
_j5r = (int) (0) ;
for (;_j5r <= limit212 ;_j5r = _j5r + step212 ) {
 //BA.debugLineNum = 481;BA.debugLine="r5r.Position = j5r";
_r5r.setPosition(_j5r);
 //BA.debugLineNum = 482;BA.debugLine="Private r6r As Cursor = Starter.skmt.ExecQuery(";
_r6r = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r6r = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select IFNULL(SUM(PE_CANT),0) AS PE_CANT from PEDIDO where PE_CLIENTEOR = '"+__c.SmartStringFormatter("",(Object)(_r5r.GetString("HVD_CLIENTE")))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_r5r.GetString("HVD_PROID")))+"'  AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_r5r.GetString("CONSECUTIVO")))+"'"))));
 //BA.debugLineNum = 483;BA.debugLine="r6r.Position = 0";
_r6r.setPosition((int) (0));
 //BA.debugLineNum = 485;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 = 486;BA.debugLine="r6r.Close";
_r6r.Close();
 }
};
 };
 //BA.debugLineNum = 489;BA.debugLine="If rescant2r = \"NaN\" Then rescant2r = 0";
if ((_rescant2r).equals("NaN")) { 
_rescant2r = BA.NumberToString(0);};
 //BA.debugLineNum = 491;BA.debugLine="r5r.Close";
_r5r.Close();
 //BA.debugLineNum = 492;BA.debugLine="Log(rescant2r)";
__c.LogImpl("013697345",_rescant2r,0);
 //BA.debugLineNum = 493;BA.debugLine="Log(rescant2r+rescantr)";
__c.LogImpl("013697346",BA.NumberToString((double)(Double.parseDouble(_rescant2r))+(double)(Double.parseDouble(_rescantr))),0);
 //BA.debugLineNum = 509;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 = 510;BA.debugLine="Private rescant3 As Double";
_rescant3 = 0;
 //BA.debugLineNum = 511;BA.debugLine="If r55.RowCount > 0 Then";
if (_r55.getRowCount()>0) { 
 //BA.debugLineNum = 512;BA.debugLine="For r75 = 0 To r55.RowCount -1";
{
final int step227 = 1;
final int limit227 = (int) (_r55.getRowCount()-1);
_r75 = (int) (0) ;
for (;_r75 <= limit227 ;_r75 = _r75 + step227 ) {
 //BA.debugLineNum = 513;BA.debugLine="r55.Position = r75";
_r55.setPosition(_r75);
 //BA.debugLineNum = 514;BA.debugLine="rescant3 = rescant3 + r55.GetString(\"HVD_COSTO_";
_rescant3 = _rescant3+(double)(Double.parseDouble(_r55.GetString("HVD_COSTO_TOT")));
 //BA.debugLineNum = 515;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 = 519;BA.debugLine="Log(rescant3)";
__c.LogImpl("013697372",BA.NumberToString(_rescant3),0);
 //BA.debugLineNum = 520;BA.debugLine="r55.Close";
_r55.Close();
 //BA.debugLineNum = 525;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 = 526;BA.debugLine="Private rescant4 As Double";
_rescant4 = 0;
 //BA.debugLineNum = 527;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 528;BA.debugLine="r5.Position = 0";
_r5.setPosition((int) (0));
 //BA.debugLineNum = 529;BA.debugLine="rescant4 = r5.GetString(\"HVD_COSTO_TOT\")";
_rescant4 = (double)(Double.parseDouble(_r5.GetString("HVD_COSTO_TOT")));
 };
 //BA.debugLineNum = 531;BA.debugLine="Log(rescant4)";
__c.LogImpl("013697384",BA.NumberToString(_rescant4),0);
 //BA.debugLineNum = 532;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 534;BA.debugLine="Private r5 As Cursor = Starter.skmt.ExecQuery($\"s";
_r5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_r5 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select IFNULL(SUM(PE_COSTO_TOT),0) AS PE_COSTO_TOT from PEDIDO "))));
 //BA.debugLineNum = 535;BA.debugLine="Private rescant5 As Double";
_rescant5 = 0;
 //BA.debugLineNum = 536;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 537;BA.debugLine="r5.Position = 0";
_r5.setPosition((int) (0));
 //BA.debugLineNum = 538;BA.debugLine="rescant5 = r5.GetString(\"PE_COSTO_TOT\")";
_rescant5 = (double)(Double.parseDouble(_r5.GetString("PE_COSTO_TOT")));
 };
 //BA.debugLineNum = 540;BA.debugLine="Log(rescant5)";
__c.LogImpl("013697393",BA.NumberToString(_rescant5),0);
 //BA.debugLineNum = 541;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 546;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 = 547;BA.debugLine="Private rescant6 As Double";
_rescant6 = 0;
 //BA.debugLineNum = 548;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 549;BA.debugLine="For j4 = 0 To r5.RowCount -1";
{
final int step254 = 1;
final int limit254 = (int) (_r5.getRowCount()-1);
_j4 = (int) (0) ;
for (;_j4 <= limit254 ;_j4 = _j4 + step254 ) {
 //BA.debugLineNum = 550;BA.debugLine="r5.Position = j4";
_r5.setPosition(_j4);
 //BA.debugLineNum = 551;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 = 552;BA.debugLine="r6.Position = 0";
_r6.setPosition((int) (0));
 //BA.debugLineNum = 555;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 = 557;BA.debugLine="r6.Close";
_r6.Close();
 }
};
 };
 //BA.debugLineNum = 560;BA.debugLine="If rescant6 = \"NaN\" Then rescant6 = 0";
if (_rescant6==(double)(Double.parseDouble("NaN"))) { 
_rescant6 = 0;};
 //BA.debugLineNum = 561;BA.debugLine="LogColor(rescant6,Colors.Red)";
__c.LogImpl("013697414",BA.NumberToString(_rescant6),__c.Colors.Red);
 //BA.debugLineNum = 562;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 564;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 = 565;BA.debugLine="Private rescant7 As Double";
_rescant7 = 0;
 //BA.debugLineNum = 566;BA.debugLine="If r5.RowCount > 0 Then";
if (_r5.getRowCount()>0) { 
 //BA.debugLineNum = 567;BA.debugLine="For j5 = 0 To r5.RowCount -1";
{
final int step268 = 1;
final int limit268 = (int) (_r5.getRowCount()-1);
_j5 = (int) (0) ;
for (;_j5 <= limit268 ;_j5 = _j5 + step268 ) {
 //BA.debugLineNum = 568;BA.debugLine="r5.Position = j5";
_r5.setPosition(_j5);
 //BA.debugLineNum = 569;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 = 570;BA.debugLine="r6.Position = 0";
_r6.setPosition((int) (0));
 //BA.debugLineNum = 572;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 = 573;BA.debugLine="r6.Close";
_r6.Close();
 }
};
 };
 //BA.debugLineNum = 576;BA.debugLine="If rescant7 = \"NaN\" Then rescant7 = 0";
if (_rescant7==(double)(Double.parseDouble("NaN"))) { 
_rescant7 = 0;};
 //BA.debugLineNum = 577;BA.debugLine="Log(rescant7)";
__c.LogImpl("013697430",BA.NumberToString(_rescant7),0);
 //BA.debugLineNum = 578;BA.debugLine="r5.Close";
_r5.Close();
 //BA.debugLineNum = 581;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 = 582;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 = 585;BA.debugLine="B4XPages.MainPage.clientesVisitados = L_MONTOE.Te";
_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._clientesvisitados /*String*/  = _l_montoe.getText();
 //BA.debugLineNum = 586;BA.debugLine="B4XPages.MainPage.clientesVenta = l_cuantosc.Text";
_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._clientesventa /*String*/  = _l_cuantosc.getText();
 //BA.debugLineNum = 587;BA.debugLine="B4XPages.MainPage.clientesRechazo = l_cuantosn.Te";
_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._clientesrechazo /*String*/  = _l_cuantosn.getText();
 //BA.debugLineNum = 588;BA.debugLine="B4XPages.MainPage.clientestotal = l_porvisitar.Te";
_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._clientestotal /*String*/  = _l_porvisitar.getText();
 //BA.debugLineNum = 589;BA.debugLine="B4XPages.MainPage.montoActual = Round2(l_montoSal";
_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._montoactual /*String*/  = BA.NumberToString(__c.Round2((double)(Double.parseDouble(_l_montosalida.getText()))-(double)(BA.ObjectToNumber(_rechmap.Get((Object)("monto")))),(int) (2)));
 //BA.debugLineNum = 590;BA.debugLine="B4XPages.MainPage.porVisitar = l_ctast.text";
_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._porvisitar /*String*/  = _l_ctast.getText();
 //BA.debugLineNum = 591;BA.debugLine="B4XPages.MainPage.entregas = l_cuantosc.text";
_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._entregas /*String*/  = _l_cuantosc.getText();
 //BA.debugLineNum = 592;BA.debugLine="B4XPages.MainPage.rechazos = l_cuantosn.text";
_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._rechazos /*String*/  = _l_cuantosn.getText();
 //BA.debugLineNum = 593;BA.debugLine="B4XPages.MainPage.montoEntregado = L_MONTOE.text";
_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._montoentregado /*String*/  = _l_montoe.getText();
 //BA.debugLineNum = 594;BA.debugLine="B4XPages.MainPage.montoRechazado = l_rechazo.text";
_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._montorechazado /*String*/  = _l_rechazo.getText();
 //BA.debugLineNum = 596;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.serve";
_reqmanager._initialize /*String*/ (ba,this,_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ );
 //BA.debugLineNum = 599;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 = 600;BA.debugLine="Label9.Visible = True";
_label9.setVisible(__c.True);
 //BA.debugLineNum = 601;BA.debugLine="L_MONTOE.Visible = True";
_l_montoe.setVisible(__c.True);
 //BA.debugLineNum = 604;BA.debugLine="c=Starter.skmt.ExecQuery(\"select * from HIST_VEN";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select * from HIST_VENTAS WHERE hvd_rechazo <> 2 and HVD_RECHAZOCANT > 0 order by HVD_CODPROMO desc, HVD_PRONOMBRE asc")));
 //BA.debugLineNum = 605;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 606;BA.debugLine="b_venta_emp.Visible = True";
_b_venta_emp.setVisible(__c.True);
 }else {
 //BA.debugLineNum = 608;BA.debugLine="b_venta_emp.Visible = False";
_b_venta_emp.setVisible(__c.False);
 };
 }else {
 //BA.debugLineNum = 611;BA.debugLine="Label9.Visible = False";
_label9.setVisible(__c.False);
 //BA.debugLineNum = 612;BA.debugLine="L_MONTOE.Visible = False";
_l_montoe.setVisible(__c.False);
 //BA.debugLineNum = 613;BA.debugLine="b_venta_emp.Visible = False";
_b_venta_emp.setVisible(__c.False);
 };
 //BA.debugLineNum = 625;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_medicomed.keymon.lat.c_principal parent) {
this.parent = parent;
}
reparto_medicomed.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 = 1685;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_prod.getVisible()) { 
this.state = 5;
}else if(parent._penvioinfo.getVisible()) { 
this.state = 7;
}else {
this.state = 9;
}if (true) break;

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

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

case 7:
//C
this.state = 10;
 //BA.debugLineNum = 1691;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 if (true) break;

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

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

            }
        }
    }
}
public String  _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
 //BA.debugLineNum = 109;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
 //BA.debugLineNum = 110;BA.debugLine="Root = Root1";
_root = _root1;
 //BA.debugLineNum = 112;BA.debugLine="Root.LoadLayout(\"principal\")";
_root.LoadLayout("principal",ba);
 //BA.debugLineNum = 113;BA.debugLine="EJECUTANDO=1";
_ejecutando = BA.NumberToString(1);
 //BA.debugLineNum = 114;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.serve";
_reqmanager._initialize /*String*/ (ba,this,_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ );
 //BA.debugLineNum = 117;BA.debugLine="img2.Visible =False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 118;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 119;BA.debugLine="fecha=DateTime.Date(DateTime.Now)";
_fecha = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 121;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 = 122;BA.debugLine="b.Position=0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 123;BA.debugLine="Cuantos = b.GetString(\"CUANTOS\")";
_cuantos = _b.GetString("CUANTOS");
 //BA.debugLineNum = 124;BA.debugLine="d=Starter.skmt.ExecQuery(\"select DISTINCT count(*";
_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 DISTINCT count(*) as TOTAL_VISITAR from kmt_info where gestion = 0 AND  CAT_CL_RUTA <> 1000")));
 //BA.debugLineNum = 125;BA.debugLine="D.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 126;BA.debugLine="b.Close";
_b.Close();
 //BA.debugLineNum = 127;BA.debugLine="e=Starter.skmt.ExecQuery(\"select DISTINCT count(*";
_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 DISTINCT count(*) as POR_VISITAR from kmt_info WHERE CAT_CL_RUTA <> 1000")));
 //BA.debugLineNum = 128;BA.debugLine="e.Position=0";
_e.setPosition((int) (0));
 //BA.debugLineNum = 129;BA.debugLine="If Cuantos = 0 Then";
if ((_cuantos).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 130;BA.debugLine="l_aLiquidar.Text = 0";
_l_aliquidar.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 131;BA.debugLine="l_cuantosc.Text = 0";
_l_cuantosc.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 132;BA.debugLine="l_cuantosn.Text = 0";
_l_cuantosn.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 133;BA.debugLine="drop = 0";
_drop = 0;
 //BA.debugLineNum = 134;BA.debugLine="l_montoSalida.Text = 0";
_l_montosalida.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 135;BA.debugLine="efectiva = 0";
_efectiva = 0;
 //BA.debugLineNum = 137;BA.debugLine="l_ctast.Text = d.GetString(\"TOTAL_VISITAR\")";
_l_ctast.setText(BA.ObjectToCharSequence(_d.GetString("TOTAL_VISITAR")));
 //BA.debugLineNum = 138;BA.debugLine="l_porvisitar.Text = e.GetString(\"POR_VISITAR\")";
_l_porvisitar.setText(BA.ObjectToCharSequence(_e.GetString("POR_VISITAR")));
 }else {
 };
 //BA.debugLineNum = 157;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 = 158;BA.debugLine="If b.RowCount > 0 Then";
if (_b.getRowCount()>0) { 
 //BA.debugLineNum = 160;BA.debugLine="b.Position = 0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 162;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_medicomed.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 163;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 164;BA.debugLine="cmd.Name = \"select_coords_almacen_MEDICOMEDv2\"";
_cmd.Name /*String*/  = "select_coords_almacen_MEDICOMEDv2";
 //BA.debugLineNum = 165;BA.debugLine="cmd.Parameters = Array As Object(b.GetString(\"ID";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_b.GetString("ID_ALMACEN"))};
 //BA.debugLineNum = 166;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"coords_almacen";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("coords_almacen"));
 };
 //BA.debugLineNum = 168;BA.debugLine="B4XPages.MainPage.usuario=Subs.dameUsuarioDeDB";
_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._usuario /*String*/  = _subs._dameusuariodedb /*String*/ (ba);
 //BA.debugLineNum = 169;BA.debugLine="End Sub";
return "";
}
public String  _benvioinfo_click() throws Exception{
 //BA.debugLineNum = 1678;BA.debugLine="Private Sub bEnvioInfo_Click";
 //BA.debugLineNum = 1679;BA.debugLine="bEnvioInfo.Enabled = False";
_benvioinfo.setEnabled(__c.False);
 //BA.debugLineNum = 1680;BA.debugLine="pEnvioInfo.Visible = False";
_penvioinfo.setVisible(__c.False);
 //BA.debugLineNum = 1681;BA.debugLine="End Sub";
return "";
}
public String  _btn_ubicar_ru_click() throws Exception{
 //BA.debugLineNum = 2026;BA.debugLine="Sub Btn_Ubicar_Ru_Click";
 //BA.debugLineNum = 2027;BA.debugLine="If b_check.Visible = True Then";
if (_b_check.getVisible()==__c.True) { 
 //BA.debugLineNum = 2028;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 = 2031;BA.debugLine="StartActivity(MAPA_RUTAS)";
__c.StartActivity(ba,(Object)(_mapa_rutas.getObject()));
 };
 //BA.debugLineNum = 2033;BA.debugLine="End Sub";
return "";
}
public String  _busca_click() throws Exception{
 //BA.debugLineNum = 1723;BA.debugLine="Sub BUSCA_Click";
 //BA.debugLineNum = 1724;BA.debugLine="If b_check.Visible = True Then";
if (_b_check.getVisible()==__c.True) { 
 //BA.debugLineNum = 1725;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 = 1728;BA.debugLine="B4XPages.ShowPage(\"Buscar\")";
_b4xpages._showpage /*String*/ (ba,"Buscar");
 };
 //BA.debugLineNum = 1730;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 = 973;BA.debugLine="Sub cargar_Click";
 //BA.debugLineNum = 974;BA.debugLine="Dim pedidodiaanterior As Boolean = False";
_pedidodiaanterior = __c.False;
 //BA.debugLineNum = 975;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 = 976;BA.debugLine="If cp.RowCount > 0 Then";
if (_cp.getRowCount()>0) { 
 //BA.debugLineNum = 977;BA.debugLine="cp.Position = 0";
_cp.setPosition((int) (0));
 //BA.debugLineNum = 978;BA.debugLine="Private fecha As String = cp.GetString(\"NV_FECHA";
_fecha = _cp.GetString("NV_FECHA");
 //BA.debugLineNum = 979;BA.debugLine="Log(cp.GetString(\"NV_FECHA\"))";
__c.LogImpl("014155782",_cp.GetString("NV_FECHA"),0);
 //BA.debugLineNum = 980;BA.debugLine="Dim fecha2() As String = Regex.Split(\" \",fecha)";
_fecha2 = __c.Regex.Split(" ",_fecha);
 //BA.debugLineNum = 981;BA.debugLine="Log(fecha2(0))";
__c.LogImpl("014155784",_fecha2[(int) (0)],0);
 //BA.debugLineNum = 982;BA.debugLine="Dim fecha3() As String = Regex.Split(\"/\",fecha2(";
_fecha3 = __c.Regex.Split("/",_fecha2[(int) (0)]);
 //BA.debugLineNum = 983;BA.debugLine="DateTime.DateFormat = \"yyyyMMdd\"";
__c.DateTime.setDateFormat("yyyyMMdd");
 //BA.debugLineNum = 984;BA.debugLine="DateTime.TimeFormat = \"\"";
__c.DateTime.setTimeFormat("");
 //BA.debugLineNum = 985;BA.debugLine="Dim dia As String = fecha3(2)&fecha3(0)&fecha3(1";
_dia = _fecha3[(int) (2)]+_fecha3[(int) (0)]+_fecha3[(int) (1)];
 //BA.debugLineNum = 986;BA.debugLine="Log(dia)";
__c.LogImpl("014155789",_dia,0);
 //BA.debugLineNum = 987;BA.debugLine="Dim dia2 As String = DateTime.Date(DateTime.Now)";
_dia2 = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 988;BA.debugLine="Log(dia & \" , \" & dia2)";
__c.LogImpl("014155791",_dia+" , "+_dia2,0);
 //BA.debugLineNum = 989;BA.debugLine="If dia < dia2 Then";
if ((double)(Double.parseDouble(_dia))<(double)(Double.parseDouble(_dia2))) { 
 //BA.debugLineNum = 990;BA.debugLine="pedidodiaanterior = True";
_pedidodiaanterior = __c.True;
 };
 };
 //BA.debugLineNum = 993;BA.debugLine="If Not (pedidodiaanterior) Then";
if (__c.Not(_pedidodiaanterior)) { 
 //BA.debugLineNum = 994;BA.debugLine="Log(\"CUMPLE\")";
__c.LogImpl("014155797","CUMPLE",0);
 //BA.debugLineNum = 995;BA.debugLine="EJECUTANDO = 1";
_ejecutando = BA.NumberToString(1);
 //BA.debugLineNum = 996;BA.debugLine="reqs.Initialize";
_reqs.Initialize();
 //BA.debugLineNum = 997;BA.debugLine="TOPE = 0";
_tope = (int) (0);
 //BA.debugLineNum = 998;BA.debugLine="LogColor($\"ReqServer = ${B4XPages.MainPage.serve";
__c.LogImpl("014155801",("ReqServer = "+__c.SmartStringFormatter("",(Object)(_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ ))+""),__c.Colors.Red);
 //BA.debugLineNum = 999;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.serv";
_reqmanager._initialize /*String*/ (ba,this,_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ );
 //BA.debugLineNum = 1001;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_medicomed.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1002;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1003;BA.debugLine="cmd.Name = \"insert_drop_rep_MEDICOMEDv22\"";
_cmd.Name /*String*/  = "insert_drop_rep_MEDICOMEDv22";
 //BA.debugLineNum = 1004;BA.debugLine="cmd.Parameters = Array As Object(Subs.dameUsuari";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_subs._dameusuariodedb /*String*/ (ba)),(Object)(_l_ruta.getText()),(Object)(_almacen),(Object)(_l_ctast.getText()),(Object)(_subs._traeentregados /*anywheresoftware.b4a.objects.collections.Map*/ (ba).getObject()),(Object)(_subs._traerechazados /*anywheresoftware.b4a.objects.collections.Map*/ (ba).getObject()),(Object)("CARGA"),(Object)(__c.Application.getVersionName())};
 //BA.debugLineNum = 1005;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_drop\")";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_drop"));
 //BA.debugLineNum = 1008;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from kmt_info\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from kmt_info");
 //BA.debugLineNum = 1009;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cod_resul";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cod_result");
 //BA.debugLineNum = 1010;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from hist_gest";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from hist_gest");
 //BA.debugLineNum = 1011;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CAT_DETAL";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CAT_DETALLES_PAQ");
 //BA.debugLineNum = 1012;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from telefonos";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from telefonos");
 //BA.debugLineNum = 1014;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from PUNTEO_GP";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PUNTEO_GPS");
 //BA.debugLineNum = 1015;BA.debugLine="If l_ruta.Text = \"0\" Then '";
if ((_l_ruta.getText()).equals("0")) { 
 //BA.debugLineNum = 1016;BA.debugLine="Log(\"*********************  No hay ruta, BORRAM";
__c.LogImpl("014155819","*********************  No hay ruta, BORRAMOS TODO",0);
 //BA.debugLineNum = 1017;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cat_guna";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod");
 //BA.debugLineNum = 1018;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cat_guna";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod3");
 //BA.debugLineNum = 1019;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from REPARTO\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from REPARTO");
 //BA.debugLineNum = 1020;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from HIST_VEN";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_VENTAS");
 //BA.debugLineNum = 1021;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from HIST_VEN";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_VENTAS2");
 //BA.debugLineNum = 1022;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from NOVENTA\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from NOVENTA");
 }else {
 //BA.debugLineNum = 1024;BA.debugLine="Log(\"*********************  Hay ruta, NO BORRAM";
__c.LogImpl("014155827","*********************  Hay ruta, NO BORRAMOS TODO",0);
 };
 //BA.debugLineNum = 1028;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 = 1029;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1030;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 1032;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1033;BA.debugLine="cmd.Name = \"select_punteo_MEDICOMEDv2_re_REPG\"";
_cmd.Name /*String*/  = "select_punteo_MEDICOMEDv2_re_REPG";
 //BA.debugLineNum = 1034;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 = 1035;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"punteo\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("punteo"));
 //BA.debugLineNum = 1036;BA.debugLine="Log($\"Pedimos Punteo\"$)";
__c.LogImpl("014155839",("Pedimos Punteo"),0);
 //BA.debugLineNum = 1037;BA.debugLine="reqs.Add(\"punteo\")";
_reqs.Add((Object)("punteo"));
 //BA.debugLineNum = 1040;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1041;BA.debugLine="cmd.Name = \"select_almacen_MEDICOMEDv2_re_REPG\"";
_cmd.Name /*String*/  = "select_almacen_MEDICOMEDv2_re_REPG";
 //BA.debugLineNum = 1042;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN)";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen)};
 //BA.debugLineNum = 1043;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"gunaprod\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("gunaprod"));
 //BA.debugLineNum = 1044;BA.debugLine="Log($\"Pedimos gunaprod - ${ALMACEN}, ${e_ruta.t";
__c.LogImpl("014155847",("Pedimos gunaprod - "+__c.SmartStringFormatter("",(Object)(_almacen))+", "+__c.SmartStringFormatter("",(Object)(_e_ruta.getText()))+""),0);
 //BA.debugLineNum = 1045;BA.debugLine="reqs.Add(\"gunaprod\")";
_reqs.Add((Object)("gunaprod"));
 //BA.debugLineNum = 1049;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1050;BA.debugLine="cmd.Name = \"select_cliente_MEDICOMEDv2_re_REPG\"";
_cmd.Name /*String*/  = "select_cliente_MEDICOMEDv2_re_REPG";
 //BA.debugLineNum = 1051;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 = 1052;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"kmt_datos\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("kmt_datos"));
 //BA.debugLineNum = 1053;BA.debugLine="Log($\"Pedimos kmt_datos\"$)";
__c.LogImpl("014155856",("Pedimos kmt_datos"),0);
 //BA.debugLineNum = 1054;BA.debugLine="reqs.Add(\"kmt_datos\")";
_reqs.Add((Object)("kmt_datos"));
 //BA.debugLineNum = 1056;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1057;BA.debugLine="cmd.Name = \"select_ventad_MEDICOMEDv2_re_REPG\"";
_cmd.Name /*String*/  = "select_ventad_MEDICOMEDv2_re_REPG";
 //BA.debugLineNum = 1058;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text, AL";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1059;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"hist_datos\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("hist_datos"));
 //BA.debugLineNum = 1060;BA.debugLine="Log($\"Pedimos hist_datos\"$)";
__c.LogImpl("014155863",("Pedimos hist_datos"),0);
 //BA.debugLineNum = 1061;BA.debugLine="reqs.Add(\"hist_datos\")";
_reqs.Add((Object)("hist_datos"));
 //BA.debugLineNum = 1063;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1064;BA.debugLine="cmd.Name = \"select_coords_almacen_MEDICOMEDv2\"";
_cmd.Name /*String*/  = "select_coords_almacen_MEDICOMEDv2";
 //BA.debugLineNum = 1065;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN)";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen)};
 //BA.debugLineNum = 1066;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"coords_almacen";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("coords_almacen"));
 //BA.debugLineNum = 1068;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1069;BA.debugLine="cmd.Name = \"select_cat_gunaprod3_MEDICOMEDv2\"";
_cmd.Name /*String*/  = "select_cat_gunaprod3_MEDICOMEDv2";
 //BA.debugLineNum = 1070;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN)";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen)};
 //BA.debugLineNum = 1071;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"gunaprod3\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("gunaprod3"));
 //BA.debugLineNum = 1073;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1074;BA.debugLine="cmd.Name = \"select_pagares_MEDICOMEDv2\"";
_cmd.Name /*String*/  = "select_pagares_MEDICOMEDv2";
 //BA.debugLineNum = 1075;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text,ALM";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1076;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"PAGARES\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("PAGARES"));
 //BA.debugLineNum = 1108;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 = 1109;BA.debugLine="d.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 1110;BA.debugLine="cuantos_noventa = D.GetString(\"CUANTOS_NOVENTA\")";
_cuantos_noventa = _d.GetString("CUANTOS_NOVENTA");
 //BA.debugLineNum = 1111;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1112;BA.debugLine="cargar.Visible = False";
_cargar.setVisible(__c.False);
 //BA.debugLineNum = 1113;BA.debugLine="Subir.Visible = False";
_subir.setVisible(__c.False);
 //BA.debugLineNum = 1114;BA.debugLine="connecta.Visible = True";
_connecta.setVisible(__c.True);
 //BA.debugLineNum = 1115;BA.debugLine="inv.Visible = False";
_inv.setVisible(__c.False);
 //BA.debugLineNum = 1116;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 = 1117;BA.debugLine="ProgressDialogShow2(\"Descargando rutas, espere u";
__c.ProgressDialogShow2(ba,BA.ObjectToCharSequence("Descargando rutas, espere un momento."),__c.False);
 //BA.debugLineNum = 1118;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 = 1122;BA.debugLine="Log(\"XXXX\")";
__c.LogImpl("014155925","XXXX",0);
 //BA.debugLineNum = 1123;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 = 1126;BA.debugLine="End Sub";
return "";
}
public String  _checachek() throws Exception{
 //BA.debugLineNum = 627;BA.debugLine="Sub checachek";
 //BA.debugLineNum = 628;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 = 629;BA.debugLine="If b.RowCount > 0 Then";
if (_b.getRowCount()>0) { 
 //BA.debugLineNum = 630;BA.debugLine="b.Position = 0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 631;BA.debugLine="If b.GetString(\"CHECADO\") = 0 Then";
if ((_b.GetString("CHECADO")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 632;BA.debugLine="b_check.Visible = True";
_b_check.setVisible(__c.True);
 }else if((_b.GetString("CHECADO")).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 634;BA.debugLine="b_check.Visible =False";
_b_check.setVisible(__c.False);
 };
 //BA.debugLineNum = 636;BA.debugLine="b.Close";
_b.Close();
 };
 //BA.debugLineNum = 638;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_medicomed.keymon.lat.dbrequestmanager();
 //BA.debugLineNum = 5;BA.debugLine="Dim conectado As String";
_conectado = "";
 //BA.debugLineNum = 6;BA.debugLine="Dim t1 As Timer";
_t1 = new anywheresoftware.b4a.objects.Timer();
 //BA.debugLineNum = 7;BA.debugLine="Dim sb As StringBuilder";
_sb = new anywheresoftware.b4a.keywords.StringBuilderWrapper();
 //BA.debugLineNum = 8;BA.debugLine="Dim PHONE As Phone";
_phone = new anywheresoftware.b4a.phone.Phone();
 //BA.debugLineNum = 9;BA.debugLine="Dim trabajar As Button";
_trabajar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 10;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 11;BA.debugLine="Dim d As Cursor";
_d = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 12;BA.debugLine="Dim b As Cursor";
_b = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 13;BA.debugLine="Dim e As Cursor";
_e = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 14;BA.debugLine="Dim f As Cursor";
_f = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 15;BA.debugLine="Dim f1 As Cursor";
_f1 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 16;BA.debugLine="Dim f2 As Cursor";
_f2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 17;BA.debugLine="Dim f3 As Cursor";
_f3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 18;BA.debugLine="Dim F4 As Cursor";
_f4 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 19;BA.debugLine="Dim lv As ListView";
_lv = new anywheresoftware.b4a.objects.ListViewWrapper();
 //BA.debugLineNum = 20;BA.debugLine="Dim cargar As Button";
_cargar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 21;BA.debugLine="Dim pendiente As Button";
_pendiente = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 22;BA.debugLine="Dim foto1() As Byte";
_foto1 = new byte[(int) (0)];
;
 //BA.debugLineNum = 23;BA.debugLine="Dim usuario As String";
_usuario = "";
 //BA.debugLineNum = 24;BA.debugLine="Dim connecta As Button";
_connecta = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 25;BA.debugLine="Dim conn As String";
_conn = "";
 //BA.debugLineNum = 26;BA.debugLine="Dim Subir As Button";
_subir = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 27;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_medicomed.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_medicomed.keymon.lat.batteryutilities();
 //BA.debugLineNum = 73;BA.debugLine="Dim RUTA_T As String";
_ruta_t = "";
 //BA.debugLineNum = 74;BA.debugLine="Dim reqs As List";
_reqs = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 76;BA.debugLine="Private Btn_Ubicar_Ru As Button";
_btn_ubicar_ru = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 77;BA.debugLine="Dim cargo As String";
_cargo = "";
 //BA.debugLineNum = 78;BA.debugLine="Private p_principal As Panel";
_p_principal = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 79;BA.debugLine="Dim ime As IME";
_ime = new anywheresoftware.b4a.objects.IME();
 //BA.debugLineNum = 80;BA.debugLine="Private b_tabulador As Button";
_b_tabulador = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 82;BA.debugLine="Private l_rutasP As Label";
_l_rutasp = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 83;BA.debugLine="Private l_rechazo As Label";
_l_rechazo = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 84;BA.debugLine="Private Label9 As Label";
_label9 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 85;BA.debugLine="Dim cp As Cursor";
_cp = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 86;BA.debugLine="Private b_check As Button";
_b_check = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 87;BA.debugLine="Private b_rechazos As Button";
_b_rechazos = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 88;BA.debugLine="Private p_prod As Panel";
_p_prod = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 89;BA.debugLine="Private b_regreso As Button";
_b_regreso = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 90;BA.debugLine="Private lv_prod_Prin As ListView";
_lv_prod_prin = new anywheresoftware.b4a.objects.ListViewWrapper();
 //BA.debugLineNum = 91;BA.debugLine="Private b_venta_emp As Button";
_b_venta_emp = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 92;BA.debugLine="Dim successfulRequests As Int = 0";
_successfulrequests = (int) (0);
 //BA.debugLineNum = 93;BA.debugLine="Dim totalRegistros As Int = 0";
_totalregistros = (int) (0);
 //BA.debugLineNum = 94;BA.debugLine="Dim totalRegistrosTotales As Int = 0";
_totalregistrostotales = (int) (0);
 //BA.debugLineNum = 95;BA.debugLine="Dim todosRequest As Int = 0";
_todosrequest = (int) (0);
 //BA.debugLineNum = 96;BA.debugLine="Private pEnvioInfo As Panel";
_penvioinfo = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 97;BA.debugLine="Private bEnvioInfo As Button";
_benvioinfo = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 98;BA.debugLine="Private pbEnvioInfo As ProgressBar";
_pbenvioinfo = new anywheresoftware.b4a.objects.ProgressBarWrapper();
 //BA.debugLineNum = 99;BA.debugLine="Private lEnviaInfo As Label";
_lenviainfo = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 100;BA.debugLine="Private lVersionName As Label";
_lversionname = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 101;BA.debugLine="End Sub";
return "";
}
public String  _connecta_click() throws Exception{
 //BA.debugLineNum = 1699;BA.debugLine="Sub connecta_Click";
 //BA.debugLineNum = 1700;BA.debugLine="LogColor($\"ReqServer = ${B4XPages.MainPage.server";
__c.LogImpl("014417921",("ReqServer = "+__c.SmartStringFormatter("",(Object)(_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ ))+""),__c.Colors.Red);
 //BA.debugLineNum = 1701;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 = 1702;BA.debugLine="If e_ruta.Text <> \"\" Then";
if ((_e_ruta.getText()).equals("") == false) { 
 //BA.debugLineNum = 1703;BA.debugLine="imei = \"\" 'p.GetDeviceId";
_imei = "";
 //BA.debugLineNum = 1704;BA.debugLine="conn = \"1\"";
_conn = "1";
 //BA.debugLineNum = 1705;BA.debugLine="ime.HideKeyboard";
_ime.HideKeyboard(ba);
 //BA.debugLineNum = 1706;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_medicomed.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1710;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_medicomed.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1711;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1712;BA.debugLine="cmd.Name = \"select_ruta_re_REPG_MEDICOMEDv27\"";
_cmd.Name /*String*/  = "select_ruta_re_REPG_MEDICOMEDv27";
 //BA.debugLineNum = 1713;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN, e_ruta";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_e_ruta.getText()),(Object)(_imei)};
 //BA.debugLineNum = 1715;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"ruta\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("ruta"));
 //BA.debugLineNum = 1716;BA.debugLine="ToastMessageShow(\"Validando Conexión.\" , True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Validando Conexión."),__c.True);
 //BA.debugLineNum = 1717;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM RUTAA\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM RUTAA");
 //BA.debugLineNum = 1718;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 = 1719;BA.debugLine="B4XPages.MainPage.rutaPreventa = e_ruta.TEXT";
_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._rutapreventa /*String*/  = _e_ruta.getText();
 };
 //BA.debugLineNum = 1721;BA.debugLine="End Sub";
return "";
}
public String  _e_ruta_enterpressed() throws Exception{
 //BA.debugLineNum = 1737;BA.debugLine="Sub e_ruta_EnterPressed";
 //BA.debugLineNum = 1738;BA.debugLine="If e_ruta.Text = \"FIN DIA\" Then";
if ((_e_ruta.getText()).equals("FIN DIA")) { 
 //BA.debugLineNum = 1739;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 = 1740;BA.debugLine="If RES = DialogResponse.POSITIVE Then";
if ((_res).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
 //BA.debugLineNum = 1741;BA.debugLine="e_ruta.Text = \"\"";
_e_ruta.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 1742;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from PICK_CIE";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PICK_CIEGO");
 //BA.debugLineNum = 1743;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from pedido_c";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente");
 //BA.debugLineNum = 1744;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CHECADO_";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CHECADO_CHECK");
 //BA.debugLineNum = 1745;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CHECKLIS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CHECKLIST2");
 //BA.debugLineNum = 1746;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from pedido\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido");
 //BA.debugLineNum = 1747;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from noventa\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from noventa");
 //BA.debugLineNum = 1748;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from clie_act";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from clie_act");
 //BA.debugLineNum = 1749;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from kmt_info";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from kmt_info");
 //BA.debugLineNum = 1750;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cat_guna";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod");
 //BA.debugLineNum = 1751;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from cat_guna";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod3");
 //BA.debugLineNum = 1752;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CAT_DETA";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CAT_DETALLES_PAQ");
 //BA.debugLineNum = 1753;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from HIST_VEN";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_VENTAS");
 //BA.debugLineNum = 1754;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from REPARTO\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from REPARTO");
 //BA.debugLineNum = 1755;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM TABULADO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM TABULADOR_MONEDAS");
 //BA.debugLineNum = 1756;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM TABULADO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM TABULADOR_BILLETES");
 //BA.debugLineNum = 1757;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM RUTAA\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM RUTAA");
 //BA.debugLineNum = 1758;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 };
 //BA.debugLineNum = 1761;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from waypoints";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from waypoints");
 };
 //BA.debugLineNum = 1763;BA.debugLine="End Sub";
return "";
}
public void  _envioinfo() throws Exception{
ResumableSub_envioinfo rsub = new ResumableSub_envioinfo(this);
rsub.resume(ba, null);
}
public static class ResumableSub_envioinfo extends BA.ResumableSub {
public ResumableSub_envioinfo(reparto_medicomed.keymon.lat.c_principal parent) {
this.parent = parent;
}
reparto_medicomed.keymon.lat.c_principal parent;
int _i = 0;
String _folio = "";
String[] _fechatabulador = null;
String[] _fechatabulador2 = null;
String _fechatabulador3 = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _d4 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _d5 = null;
String _restacant = "";
String[] _fecha1 = null;
String[] _fecha2 = null;
String _fecha3 = "";
String[] _hora = null;
String _sdate = "";
String _stime = "";
int step12;
int limit12;
int step28;
int limit28;
int step45;
int limit45;
int step62;
int limit62;
int step79;
int limit79;
int step95;
int limit95;
int step117;
int limit117;
int step139;
int limit139;
int step189;
int limit189;

@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 = 697;BA.debugLine="successfulRequests = 0";
parent._successfulrequests = (int) (0);
 //BA.debugLineNum = 698;BA.debugLine="totalRegistros = 0";
parent._totalregistros = (int) (0);
 //BA.debugLineNum = 699;BA.debugLine="totalRegistrosTotales = 0";
parent._totalregistrostotales = (int) (0);
 //BA.debugLineNum = 700;BA.debugLine="todosRequest = -1";
parent._todosrequest = (int) (-1);
 //BA.debugLineNum = 701;BA.debugLine="bEnvioInfo.Enabled = False";
parent._benvioinfo.setEnabled(parent.__c.False);
 //BA.debugLineNum = 727;BA.debugLine="c=Starter.skmt.ExecQuery(\"SELECT HVD_CLIENTE,HVD_";
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_CLIENTE,HVD_PRONOMBRE,HVD_CANT,HVD_COSTO_TOT, HVD_FECHA, HVD_CODPROMO, HVD_PROID, HVD_NUM_TICKET, HVD_NUM_REGISTRO, HVD_RECHAZO, HVD_PARCIAL FROM hist_ventas WHERE HVD_RECHAZO = 1 OR HVD_PARCIAL = 1")));
 //BA.debugLineNum = 728;BA.debugLine="If c.RowCount>0 Then";
if (true) break;

case 1:
//if
this.state = 8;
if (parent._c.getRowCount()>0) { 
this.state = 3;
}if (true) break;

case 3:
//C
this.state = 4;
 //BA.debugLineNum = 729;BA.debugLine="Log($\"Procesando HIST_VENTAS (rechazos/parciales";
parent.__c.LogImpl("014090273",("Procesando HIST_VENTAS (rechazos/parciales): "+parent.__c.SmartStringFormatter("",(Object)(parent._c.getRowCount()))+" registros"),0);
 //BA.debugLineNum = 730;BA.debugLine="totalRegistros = totalRegistros + c.RowCount";
parent._totalregistros = (int) (parent._totalregistros+parent._c.getRowCount());
 //BA.debugLineNum = 731;BA.debugLine="totalRegistrosTotales = totalRegistrosTotales +";
parent._totalregistrostotales = (int) (parent._totalregistrostotales+parent._c.getRowCount());
 //BA.debugLineNum = 732;BA.debugLine="Log($\"Total acumulado: ${totalRegistros}\"$)";
parent.__c.LogImpl("014090276",("Total acumulado: "+parent.__c.SmartStringFormatter("",(Object)(parent._totalregistros))+""),0);
 //BA.debugLineNum = 734;BA.debugLine="For i=0 To c.RowCount -1";
if (true) break;

case 4:
//for
this.state = 7;
step12 = 1;
limit12 = (int) (parent._c.getRowCount()-1);
_i = (int) (0) ;
this.state = 79;
if (true) break;

case 79:
//C
this.state = 7;
if ((step12 > 0 && _i <= limit12) || (step12 < 0 && _i >= limit12)) this.state = 6;
if (true) break;

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

case 6:
//C
this.state = 80;
 //BA.debugLineNum = 735;BA.debugLine="c.Position=i";
parent._c.setPosition(_i);
 //BA.debugLineNum = 736;BA.debugLine="Dim cmd As DBCommand";
parent._cmd = new reparto_medicomed.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 737;BA.debugLine="cmd.Initialize";
parent._cmd.Initialize();
 //BA.debugLineNum = 738;BA.debugLine="cmd.Name = \"insert_rep_hist_ventas_MEDICOMEDv2_";
parent._cmd.Name /*String*/  = "insert_rep_hist_ventas_MEDICOMEDv2_REPG";
 //BA.debugLineNum = 739;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"H";
parent._cmd.Parameters /*Object[]*/  = new Object[]{(Object)(parent._c.GetString("HVD_CLIENTE")),(Object)(parent._c.GetString("HVD_PRONOMBRE")),(Object)(parent._c.GetString("HVD_CANT")),(Object)(parent._c.GetString("HVD_COSTO_TOT")),(Object)(parent._c.GetString("HVD_CODPROMO")),(Object)(parent._c.GetString("HVD_PROID")),(Object)(parent._c.GetString("HVD_NUM_TICKET")),(Object)(parent._c.GetString("HVD_NUM_REGISTRO")),(Object)(parent._c.GetString("HVD_RECHAZO")),(Object)(parent._c.GetString("HVD_PARCIAL")),(Object)(parent._almacen)};
 //BA.debugLineNum = 740;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_noventa\")";
parent._reqmanager._executecommand /*String*/ (parent._cmd,(Object)("inst_noventa"));
 if (true) break;
if (true) break;

case 7:
//C
this.state = 8;
;
 //BA.debugLineNum = 742;BA.debugLine="c.Close";
parent._c.Close();
 if (true) break;

case 8:
//C
this.state = 9;
;
 //BA.debugLineNum = 746;BA.debugLine="c=Starter.skmt.ExecQuery(\"SELECT PE_TIPO, PE_RUTA";
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 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 = 747;BA.debugLine="If c.RowCount>0 Then";
if (true) break;

case 9:
//if
this.state = 16;
if (parent._c.getRowCount()>0) { 
this.state = 11;
}if (true) break;

case 11:
//C
this.state = 12;
 //BA.debugLineNum = 748;BA.debugLine="Log($\"Procesando PEDIDO: ${c.RowCount} registros";
parent.__c.LogImpl("014090292",("Procesando PEDIDO: "+parent.__c.SmartStringFormatter("",(Object)(parent._c.getRowCount()))+" registros"),0);
 //BA.debugLineNum = 749;BA.debugLine="totalRegistros = totalRegistros + c.RowCount";
parent._totalregistros = (int) (parent._totalregistros+parent._c.getRowCount());
 //BA.debugLineNum = 750;BA.debugLine="totalRegistrosTotales = totalRegistrosTotales +";
parent._totalregistrostotales = (int) (parent._totalregistrostotales+parent._c.getRowCount());
 //BA.debugLineNum = 751;BA.debugLine="Log($\"Total acumulado: ${totalRegistros}\"$)";
parent.__c.LogImpl("014090295",("Total acumulado: "+parent.__c.SmartStringFormatter("",(Object)(parent._totalregistros))+""),0);
 //BA.debugLineNum = 753;BA.debugLine="For i=0 To c.RowCount -1";
if (true) break;

case 12:
//for
this.state = 15;
step28 = 1;
limit28 = (int) (parent._c.getRowCount()-1);
_i = (int) (0) ;
this.state = 81;
if (true) break;

case 81:
//C
this.state = 15;
if ((step28 > 0 && _i <= limit28) || (step28 < 0 && _i >= limit28)) this.state = 14;
if (true) break;

case 82:
//C
this.state = 81;
_i = ((int)(0 + _i + step28)) ;
if (true) break;

case 14:
//C
this.state = 82;
 //BA.debugLineNum = 754;BA.debugLine="c.Position=i";
parent._c.setPosition(_i);
 //BA.debugLineNum = 755;BA.debugLine="Dim cmd As DBCommand";
parent._cmd = new reparto_medicomed.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 756;BA.debugLine="cmd.Initialize";
parent._cmd.Initialize();
 //BA.debugLineNum = 757;BA.debugLine="cmd.Name = \"insert_pedido_REP_MEDICOMEDv2\"";
parent._cmd.Name /*String*/  = "insert_pedido_REP_MEDICOMEDv2";
 //BA.debugLineNum = 758;BA.debugLine="cmd.Parameters = Array As Object(c.GetString(\"P";
parent._cmd.Parameters /*Object[]*/  = new Object[]{(Object)(parent._c.GetString("PE_TIPO")),(Object)(parent._c.GetString("PE_RUTA")),(Object)(parent._c.GetString("PE_CEDIS")),(Object)(parent._c.GetString("PE_COSTO_TOT")),(Object)(parent._c.GetString("PE_COSTOU")),(Object)(parent._c.GetString("PE_CANT")),(Object)(parent._c.GetString("PE_PRONOMBRE")),(Object)(parent._c.GetString("PE_PROID")),(Object)(parent._c.GetString("PE_CLIENTE")),(Object)(parent._c.GetString("PE_FECHA")),(Object)(parent._c.GetString("PE_USUARIO")),(Object)(parent._c.GetString("PE_CLIENTEOR")),(Object)(parent._c.GetString("PE_CAJAS")),(Object)(parent._c.GetString("PE_BCAJAS")),(Object)(parent._c.GetString("CONSECUTIVO")),(Object)(parent._c.GetString("FECHA_PREV")),(Object)(parent._c.GetString("RUTA_REP")),(Object)(parent._c.GetString("PE_REGALO"))};
 //BA.debugLineNum = 759;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_pedido_MAZ";
parent._reqmanager._executecommand /*String*/ (parent._cmd,(Object)("ins_pedido_MAZAPA"));
 if (true) break;
if (true) break;

case 15:
//C
this.state = 16;
;
 //BA.debugLineNum = 761;BA.debugLine="c.Close";
parent._c.Close();
 if (true) break;

case 16:
//C
this.state = 17;
;
 //BA.debugLineNum = 765;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT * from reparto";
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 * from reparto")));
 //BA.debugLineNum = 766;BA.debugLine="If c.RowCount > 0 Then";
if (true) break;

case 17:
//if
this.state = 24;
if (parent._c.getRowCount()>0) { 
this.state = 19;
}if (true) break;

case 19:
//C
this.state = 20;
 //BA.debugLineNum = 767;BA.debugLine="Log($\"Procesando REPARTO: ${c.RowCount} registro";
parent.__c.LogImpl("014090311",("Procesando REPARTO: "+parent.__c.SmartStringFormatter("",(Object)(parent._c.getRowCount()))+" registros"),0);
 //BA.debugLineNum = 768;BA.debugLine="totalRegistros = totalRegistros + c.RowCount";
parent._totalregistros = (int) (parent._totalregistros+parent._c.getRowCount());
 //BA.debugLineNum = 769;BA.debugLine="totalRegistrosTotales = totalRegistrosTotales +";
parent._totalregistrostotales = (int) (parent._totalregistrostotales+parent._c.getRowCount());
 //BA.debugLineNum = 770;BA.debugLine="Log($\"Total acumulado: ${totalRegistros}\"$)";
parent.__c.LogImpl("014090314",("Total acumulado: "+parent.__c.SmartStringFormatter("",(Object)(parent._totalregistros))+""),0);
 //BA.debugLineNum = 772;BA.debugLine="Private folio As String = Subs.hmsKMT";
_folio = parent._subs._hmskmt /*String*/ (ba);
 //BA.debugLineNum = 773;BA.debugLine="For i=0 To c.RowCount -1";
if (true) break;

case 20:
//for
this.state = 23;
step45 = 1;
limit45 = (int) (parent._c.getRowCount()-1);
_i = (int) (0) ;
this.state = 83;
if (true) break;

case 83:
//C
this.state = 23;
if ((step45 > 0 && _i <= limit45) || (step45 < 0 && _i >= limit45)) this.state = 22;
if (true) break;

case 84:
//C
this.state = 83;
_i = ((int)(0 + _i + step45)) ;
if (true) break;

case 22:
//C
this.state = 84;
 //BA.debugLineNum = 774;BA.debugLine="c.Position=i";
parent._c.setPosition(_i);
 //BA.debugLineNum = 775;BA.debugLine="Dim cmd As DBCommand";
parent._cmd = new reparto_medicomed.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 776;BA.debugLine="cmd.Initialize";
parent._cmd.Initialize();
 //BA.debugLineNum = 777;BA.debugLine="cmd.Name = \"insertReparto_MEDICOMEDv2\"";
parent._cmd.Name /*String*/  = "insertReparto_MEDICOMEDv2";
 //BA.debugLineNum = 778;BA.debugLine="cmd.Parameters = Array As Object(folio, C.GetSt";
parent._cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_folio),(Object)(parent._c.GetString("REP_FECHA")),(Object)(parent._c.GetString("REP_CLIENTE")),(Object)(parent._c.GetString("REP_CLI_ORIG")),(Object)(parent._c.GetString("REP_PRODID")),(Object)(parent._c.GetString("REP_PRONOMBRE")),(Object)(parent._c.GetString("REP_PRODREGISTRO")),(Object)(parent._c.GetString("REP_CANT")),(Object)(parent._c.GetString("REP_PRECIO")),(Object)(parent._c.GetString("REP_COSTO_TOT")),(Object)(parent._c.GetString("REP_RECHAZO")),(Object)(parent._almacen),(Object)(parent._l_ruta.getText())};
 //BA.debugLineNum = 779;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_reparto\")";
parent._reqmanager._executecommand /*String*/ (parent._cmd,(Object)("ins_reparto"));
 if (true) break;
if (true) break;

case 23:
//C
this.state = 24;
;
 //BA.debugLineNum = 781;BA.debugLine="c.Close";
parent._c.Close();
 if (true) break;

case 24:
//C
this.state = 25;
;
 //BA.debugLineNum = 785;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT * from rechazo";
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 * from rechazos")));
 //BA.debugLineNum = 786;BA.debugLine="If c.RowCount > 0 Then";
if (true) break;

case 25:
//if
this.state = 32;
if (parent._c.getRowCount()>0) { 
this.state = 27;
}if (true) break;

case 27:
//C
this.state = 28;
 //BA.debugLineNum = 787;BA.debugLine="Log($\"Procesando RECHAZOS: ${c.RowCount} registr";
parent.__c.LogImpl("014090331",("Procesando RECHAZOS: "+parent.__c.SmartStringFormatter("",(Object)(parent._c.getRowCount()))+" registros"),0);
 //BA.debugLineNum = 788;BA.debugLine="totalRegistros = totalRegistros + c.RowCount";
parent._totalregistros = (int) (parent._totalregistros+parent._c.getRowCount());
 //BA.debugLineNum = 789;BA.debugLine="totalRegistrosTotales = totalRegistrosTotales +";
parent._totalregistrostotales = (int) (parent._totalregistrostotales+parent._c.getRowCount());
 //BA.debugLineNum = 790;BA.debugLine="Log($\"Total acumulado: ${totalRegistros}\"$)";
parent.__c.LogImpl("014090334",("Total acumulado: "+parent.__c.SmartStringFormatter("",(Object)(parent._totalregistros))+""),0);
 //BA.debugLineNum = 792;BA.debugLine="Private folio As String = Subs.hmsKMT";
_folio = parent._subs._hmskmt /*String*/ (ba);
 //BA.debugLineNum = 793;BA.debugLine="For i=0 To c.RowCount -1";
if (true) break;

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

case 85:
//C
this.state = 31;
if ((step62 > 0 && _i <= limit62) || (step62 < 0 && _i >= limit62)) this.state = 30;
if (true) break;

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

case 30:
//C
this.state = 86;
 //BA.debugLineNum = 794;BA.debugLine="c.Position=i";
parent._c.setPosition(_i);
 //BA.debugLineNum = 795;BA.debugLine="Dim cmd As DBCommand";
parent._cmd = new reparto_medicomed.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 796;BA.debugLine="cmd.Initialize";
parent._cmd.Initialize();
 //BA.debugLineNum = 797;BA.debugLine="cmd.Name = \"insertRechazos_MEDICOMEDv2\"";
parent._cmd.Name /*String*/  = "insertRechazos_MEDICOMEDv2";
 //BA.debugLineNum = 798;BA.debugLine="cmd.Parameters = Array As Object(folio, C.GetSt";
parent._cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_folio),(Object)(parent._c.GetString("R_FECHA")),(Object)(parent._c.GetString("R_CLIENTE")),(Object)(parent._c.GetString("R_CLI_ORIG")),(Object)(parent._c.GetString("R_PRODID")),(Object)(parent._c.GetString("R_CANT")),(Object)(parent._c.GetString("R_RECHAZO")),(Object)(parent._almacen),(Object)(parent._l_ruta.getText())};
 //BA.debugLineNum = 799;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_rechazos\")";
parent._reqmanager._executecommand /*String*/ (parent._cmd,(Object)("ins_rechazos"));
 if (true) break;
if (true) break;

case 31:
//C
this.state = 32;
;
 //BA.debugLineNum = 801;BA.debugLine="c.Close";
parent._c.Close();
 if (true) break;

case 32:
//C
this.state = 33;
;
 //BA.debugLineNum = 805;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT * from ventas\"";
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 * from ventas")));
 //BA.debugLineNum = 806;BA.debugLine="If c.RowCount > 0 Then";
if (true) break;

case 33:
//if
this.state = 40;
if (parent._c.getRowCount()>0) { 
this.state = 35;
}if (true) break;

case 35:
//C
this.state = 36;
 //BA.debugLineNum = 807;BA.debugLine="Log($\"Procesando VENTAS: ${c.RowCount} registros";
parent.__c.LogImpl("014090351",("Procesando VENTAS: "+parent.__c.SmartStringFormatter("",(Object)(parent._c.getRowCount()))+" registros"),0);
 //BA.debugLineNum = 808;BA.debugLine="totalRegistros = totalRegistros + c.RowCount";
parent._totalregistros = (int) (parent._totalregistros+parent._c.getRowCount());
 //BA.debugLineNum = 809;BA.debugLine="totalRegistrosTotales = totalRegistrosTotales +";
parent._totalregistrostotales = (int) (parent._totalregistrostotales+parent._c.getRowCount());
 //BA.debugLineNum = 810;BA.debugLine="Log($\"Total acumulado: ${totalRegistros}\"$)";
parent.__c.LogImpl("014090354",("Total acumulado: "+parent.__c.SmartStringFormatter("",(Object)(parent._totalregistros))+""),0);
 //BA.debugLineNum = 812;BA.debugLine="Private folio As String = Subs.hmsKMT";
_folio = parent._subs._hmskmt /*String*/ (ba);
 //BA.debugLineNum = 813;BA.debugLine="For i=0 To c.RowCount -1";
if (true) break;

case 36:
//for
this.state = 39;
step79 = 1;
limit79 = (int) (parent._c.getRowCount()-1);
_i = (int) (0) ;
this.state = 87;
if (true) break;

case 87:
//C
this.state = 39;
if ((step79 > 0 && _i <= limit79) || (step79 < 0 && _i >= limit79)) this.state = 38;
if (true) break;

case 88:
//C
this.state = 87;
_i = ((int)(0 + _i + step79)) ;
if (true) break;

case 38:
//C
this.state = 88;
 //BA.debugLineNum = 814;BA.debugLine="c.Position=i";
parent._c.setPosition(_i);
 //BA.debugLineNum = 815;BA.debugLine="Dim cmd As DBCommand";
parent._cmd = new reparto_medicomed.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 816;BA.debugLine="cmd.Initialize";
parent._cmd.Initialize();
 //BA.debugLineNum = 817;BA.debugLine="cmd.Name = \"insertVentas_MEDICOMEDv2\"";
parent._cmd.Name /*String*/  = "insertVentas_MEDICOMEDv2";
 //BA.debugLineNum = 818;BA.debugLine="cmd.Parameters = Array As Object(folio, C.GetSt";
parent._cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_folio),(Object)(parent._c.GetString("V_FECHA")),(Object)(parent._c.GetString("V_CLIENTE")),(Object)(parent._c.GetString("V_CLI_ORIG")),(Object)(parent._c.GetString("V_PRODID")),(Object)(parent._c.GetString("V_CANT")),(Object)(parent._c.GetString("V_RECHAZO")),(Object)(parent._almacen),(Object)(parent._l_ruta.getText())};
 //BA.debugLineNum = 819;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_ventas\")";
parent._reqmanager._executecommand /*String*/ (parent._cmd,(Object)("ins_ventas"));
 if (true) break;
if (true) break;

case 39:
//C
this.state = 40;
;
 //BA.debugLineNum = 821;BA.debugLine="c.Close";
parent._c.Close();
 if (true) break;

case 40:
//C
this.state = 41;
;
 //BA.debugLineNum = 825;BA.debugLine="c=Starter.skmt.ExecQuery(\"SELECT CLIENTE, USUARIO";
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 CLIENTE, USUARIO, FECHA_PUNTEO, LATITUD, LONGITUD, ALMACEN, RUTA_REPARTO, RUTA_PREV, FECHA_PREVENTA, MOTIVO, COMENTARIO,TIPO FROM REPARTO_GEO")));
 //BA.debugLineNum = 826;BA.debugLine="If c.RowCount>0 Then";
if (true) break;

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

case 43:
//C
this.state = 44;
 //BA.debugLineNum = 827;BA.debugLine="Log($\"Procesando REPARTO_GEO: ${c.RowCount} regi";
parent.__c.LogImpl("014090371",("Procesando REPARTO_GEO: "+parent.__c.SmartStringFormatter("",(Object)(parent._c.getRowCount()))+" registros"),0);
 //BA.debugLineNum = 828;BA.debugLine="totalRegistros = totalRegistros + c.RowCount";
parent._totalregistros = (int) (parent._totalregistros+parent._c.getRowCount());
 //BA.debugLineNum = 829;BA.debugLine="totalRegistrosTotales = totalRegistrosTotales +";
parent._totalregistrostotales = (int) (parent._totalregistrostotales+parent._c.getRowCount());
 //BA.debugLineNum = 830;BA.debugLine="Log($\"Total acumulado: ${totalRegistros}\"$)";
parent.__c.LogImpl("014090374",("Total acumulado: "+parent.__c.SmartStringFormatter("",(Object)(parent._totalregistros))+""),0);
 //BA.debugLineNum = 832;BA.debugLine="For i=0 To c.RowCount -1";
if (true) break;

case 44:
//for
this.state = 47;
step95 = 1;
limit95 = (int) (parent._c.getRowCount()-1);
_i = (int) (0) ;
this.state = 89;
if (true) break;

case 89:
//C
this.state = 47;
if ((step95 > 0 && _i <= limit95) || (step95 < 0 && _i >= limit95)) this.state = 46;
if (true) break;

case 90:
//C
this.state = 89;
_i = ((int)(0 + _i + step95)) ;
if (true) break;

case 46:
//C
this.state = 90;
 //BA.debugLineNum = 833;BA.debugLine="c.Position=i";
parent._c.setPosition(_i);
 //BA.debugLineNum = 834;BA.debugLine="Dim cmd As DBCommand";
parent._cmd = new reparto_medicomed.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 835;BA.debugLine="cmd.Initialize";
parent._cmd.Initialize();
 //BA.debugLineNum = 836;BA.debugLine="cmd.Name = \"insert_REPARTO_MEDICOMEDv2\"";
parent._cmd.Name /*String*/  = "insert_REPARTO_MEDICOMEDv2";
 //BA.debugLineNum = 837;BA.debugLine="cmd.Parameters = Array As Object(c.GetString(\"C";
parent._cmd.Parameters /*Object[]*/  = new Object[]{(Object)(parent._c.GetString("CLIENTE")),(Object)(parent._c.GetString("USUARIO")),(Object)(parent._c.GetString("FECHA_PUNTEO")),(Object)(parent._c.GetString("LATITUD")),(Object)(parent._c.GetString("LONGITUD")),(Object)(parent._c.GetString("ALMACEN")),(Object)(parent._c.GetString("RUTA_REPARTO")),(Object)(parent._c.GetString("RUTA_PREV")),(Object)(parent._c.GetString("FECHA_PREVENTA")),(Object)(parent._c.GetString("MOTIVO")),(Object)(parent._c.GetString("COMENTARIO")),(Object)(parent._c.GetString("TIPO"))};
 //BA.debugLineNum = 838;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"ins_REPARTOPe";
parent._reqmanager._executecommand /*String*/ (parent._cmd,(Object)(("ins_REPARTOPendientes_head_"+parent.__c.SmartStringFormatter("",(Object)(parent._c.GetString("CLIENTE")))+"")));
 if (true) break;
if (true) break;

case 47:
//C
this.state = 48;
;
 if (true) break;

case 48:
//C
this.state = 49;
;
 //BA.debugLineNum = 841;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 844;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT VEINTE, DIEZ,";
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 VEINTE, DIEZ, CINCO, DOS, PESO, CENTAVO, TOTAL FROM TABULADOR_MONEDAS")));
 //BA.debugLineNum = 845;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT RUTAA FROM RUT";
parent._d = (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 RUTAA FROM RUTAA")));
 //BA.debugLineNum = 846;BA.debugLine="b = Starter.skmt.ExecQuery(\"SELECT ID_ALMACEN FRO";
parent._b = (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 ID_ALMACEN FROM CAT_ALMACEN")));
 //BA.debugLineNum = 847;BA.debugLine="f = Starter.skmt.ExecQuery(\"SELECT HVD_FECHA FROM";
parent._f = (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_FECHA FROM HIST_VENTAS")));
 //BA.debugLineNum = 848;BA.debugLine="d.Position = 0";
parent._d.setPosition((int) (0));
 //BA.debugLineNum = 849;BA.debugLine="b.Position = 0";
parent._b.setPosition((int) (0));
 //BA.debugLineNum = 850;BA.debugLine="f.Position = 0";
parent._f.setPosition((int) (0));
 //BA.debugLineNum = 851;BA.debugLine="If c.RowCount > 0 Then";
if (true) break;

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

case 51:
//C
this.state = 52;
 //BA.debugLineNum = 852;BA.debugLine="Log($\"Procesando TABULADOR_MONEDAS: ${c.RowCount";
parent.__c.LogImpl("014090396",("Procesando TABULADOR_MONEDAS: "+parent.__c.SmartStringFormatter("",(Object)(parent._c.getRowCount()))+" registros"),0);
 //BA.debugLineNum = 853;BA.debugLine="totalRegistros = totalRegistros + c.RowCount";
parent._totalregistros = (int) (parent._totalregistros+parent._c.getRowCount());
 //BA.debugLineNum = 854;BA.debugLine="totalRegistrosTotales = totalRegistrosTotales +";
parent._totalregistrostotales = (int) (parent._totalregistrostotales+parent._c.getRowCount());
 //BA.debugLineNum = 855;BA.debugLine="Log($\"Total acumulado: ${totalRegistros}\"$)";
parent.__c.LogImpl("014090399",("Total acumulado: "+parent.__c.SmartStringFormatter("",(Object)(parent._totalregistros))+""),0);
 //BA.debugLineNum = 857;BA.debugLine="For i = 0 To c.RowCount - 1";
if (true) break;

case 52:
//for
this.state = 55;
step117 = 1;
limit117 = (int) (parent._c.getRowCount()-1);
_i = (int) (0) ;
this.state = 91;
if (true) break;

case 91:
//C
this.state = 55;
if ((step117 > 0 && _i <= limit117) || (step117 < 0 && _i >= limit117)) this.state = 54;
if (true) break;

case 92:
//C
this.state = 91;
_i = ((int)(0 + _i + step117)) ;
if (true) break;

case 54:
//C
this.state = 92;
 //BA.debugLineNum = 858;BA.debugLine="c.Position=i";
parent._c.setPosition(_i);
 //BA.debugLineNum = 859;BA.debugLine="Dim cmd As DBCommand";
parent._cmd = new reparto_medicomed.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 860;BA.debugLine="Dim fechatabulador() As String = Regex.Split(\"";
_fechatabulador = parent.__c.Regex.Split(" ",parent._f.GetString("HVD_FECHA"));
 //BA.debugLineNum = 861;BA.debugLine="Dim fechatabulador2() As String = Regex.Split(\"";
_fechatabulador2 = parent.__c.Regex.Split("-",_fechatabulador[(int) (0)]);
 //BA.debugLineNum = 862;BA.debugLine="Dim fechatabulador3 As String = fechatabulador2";
_fechatabulador3 = _fechatabulador2[(int) (1)]+"/"+_fechatabulador2[(int) (2)]+"/"+_fechatabulador2[(int) (0)];
 //BA.debugLineNum = 863;BA.debugLine="cmd.Initialize";
parent._cmd.Initialize();
 //BA.debugLineNum = 864;BA.debugLine="cmd.Name = \"insert_tabulador_monedas_MEDICOMEDv";
parent._cmd.Name /*String*/  = "insert_tabulador_monedas_MEDICOMEDv2";
 //BA.debugLineNum = 865;BA.debugLine="cmd.Parameters = Array As Object(d.GetString(\"R";
parent._cmd.Parameters /*Object[]*/  = new Object[]{(Object)(parent._d.GetString("RUTAA")),(Object)(parent._b.GetString("ID_ALMACEN")),(Object)(parent._c.GetString("VEINTE")),(Object)(parent._c.GetString("DIEZ")),(Object)(parent._c.GetString("CINCO")),(Object)(parent._c.GetString("DOS")),(Object)(parent._c.GetString("PESO")),(Object)(parent._c.GetString("CENTAVO")),(Object)(_fechatabulador3)};
 //BA.debugLineNum = 866;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_tabulador_";
parent._reqmanager._executecommand /*String*/ (parent._cmd,(Object)("ins_tabulador_mon"));
 if (true) break;
if (true) break;

case 55:
//C
this.state = 56;
;
 //BA.debugLineNum = 868;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 869;BA.debugLine="d.Close";
parent._d.Close();
 //BA.debugLineNum = 870;BA.debugLine="b.Close";
parent._b.Close();
 //BA.debugLineNum = 871;BA.debugLine="f.Close";
parent._f.Close();
 if (true) break;

case 56:
//C
this.state = 57;
;
 //BA.debugLineNum = 875;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT IFNULL(HVD_REC";
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 IFNULL(HVD_RECHAZOCANT,0) AS HVD_RECHAZOCANT, HVD_RUTA, HVD_CLIENTE, HVD_PROID, HVD_FECHA, HVD_CODPROMO, HVD_NUM_TICKET, HVD_CANT, CONSECUTIVO, BCAJAS, CANTC FROM HIST_VENTAS")));
 //BA.debugLineNum = 876;BA.debugLine="If c.RowCount > 0 Then";
if (true) break;

case 57:
//if
this.state = 70;
if (parent._c.getRowCount()>0) { 
this.state = 59;
}if (true) break;

case 59:
//C
this.state = 60;
 //BA.debugLineNum = 877;BA.debugLine="Log($\"Procesando HIST_VENTAS (actualización): ${";
parent.__c.LogImpl("014090421",("Procesando HIST_VENTAS (actualización): "+parent.__c.SmartStringFormatter("",(Object)(parent._c.getRowCount()))+" registros"),0);
 //BA.debugLineNum = 878;BA.debugLine="totalRegistros = totalRegistros + c.RowCount";
parent._totalregistros = (int) (parent._totalregistros+parent._c.getRowCount());
 //BA.debugLineNum = 879;BA.debugLine="totalRegistrosTotales = totalRegistrosTotales +";
parent._totalregistrostotales = (int) (parent._totalregistrostotales+parent._c.getRowCount());
 //BA.debugLineNum = 880;BA.debugLine="Log($\"Total acumulado: ${totalRegistros}\"$)";
parent.__c.LogImpl("014090424",("Total acumulado: "+parent.__c.SmartStringFormatter("",(Object)(parent._totalregistros))+""),0);
 //BA.debugLineNum = 882;BA.debugLine="For i=0 To c.RowCount -1";
if (true) break;

case 60:
//for
this.state = 69;
step139 = 1;
limit139 = (int) (parent._c.getRowCount()-1);
_i = (int) (0) ;
this.state = 93;
if (true) break;

case 93:
//C
this.state = 69;
if ((step139 > 0 && _i <= limit139) || (step139 < 0 && _i >= limit139)) this.state = 62;
if (true) break;

case 94:
//C
this.state = 93;
_i = ((int)(0 + _i + step139)) ;
if (true) break;

case 62:
//C
this.state = 63;
 //BA.debugLineNum = 883;BA.debugLine="c.Position = i";
parent._c.setPosition(_i);
 //BA.debugLineNum = 884;BA.debugLine="Log(c.GetString(\"HVD_CLIENTE\"))";
parent.__c.LogImpl("014090428",parent._c.GetString("HVD_CLIENTE"),0);
 //BA.debugLineNum = 885;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)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("SELECT CAT_CL_RUTA FROM kmt_info WHERE CAT_CL_CODIGO = '"+parent.__c.SmartStringFormatter("",(Object)(parent._c.GetString("HVD_CLIENTE")))+"'"))));
 //BA.debugLineNum = 886;BA.debugLine="d4.Position = 0";
_d4.setPosition((int) (0));
 //BA.debugLineNum = 887;BA.debugLine="Log(d4.GetString(\"CAT_CL_RUTA\"))";
parent.__c.LogImpl("014090431",_d4.GetString("CAT_CL_RUTA"),0);
 //BA.debugLineNum = 888;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)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("SELECT IFNULL(Sum(PE_CANT),0) AS PE_CANT FROM PEDIDO WHERE PE_CLIENTEOR = '"+parent.__c.SmartStringFormatter("",(Object)(parent._c.GetString("HVD_CLIENTE")))+"' AND PE_PROID = '"+parent.__c.SmartStringFormatter("",(Object)(parent._c.GetString("HVD_PROID")))+"' AND CONSECUTIVO = '"+parent.__c.SmartStringFormatter("",(Object)(parent._c.GetString("CONSECUTIVO")))+"'"))));
 //BA.debugLineNum = 889;BA.debugLine="d5.Position = 0";
_d5.setPosition((int) (0));
 //BA.debugLineNum = 890;BA.debugLine="Private restacant As String = d5.GetString(\"PE_";
_restacant = _d5.GetString("PE_CANT");
 //BA.debugLineNum = 891;BA.debugLine="d5.Close";
_d5.Close();
 //BA.debugLineNum = 893;BA.debugLine="Dim fecha1() As String = Regex.Split(\" \", c.Get";
_fecha1 = parent.__c.Regex.Split(" ",parent._c.GetString("HVD_FECHA"));
 //BA.debugLineNum = 894;BA.debugLine="Dim fecha2() As String = Regex.Split(\"-\", fecha";
_fecha2 = parent.__c.Regex.Split("-",_fecha1[(int) (0)]);
 //BA.debugLineNum = 895;BA.debugLine="Dim fecha3 As String = fecha2(2)&\"/\"&fecha2(1)&";
_fecha3 = _fecha2[(int) (2)]+"/"+_fecha2[(int) (1)]+"/"+_fecha2[(int) (0)];
 //BA.debugLineNum = 896;BA.debugLine="Log(fecha3)";
parent.__c.LogImpl("014090440",_fecha3,0);
 //BA.debugLineNum = 897;BA.debugLine="Dim hora() As String = Regex.Split(\"\\.\", fecha1";
_hora = parent.__c.Regex.Split("\\.",_fecha1[(int) (1)]);
 //BA.debugLineNum = 898;BA.debugLine="Log(hora(0))";
parent.__c.LogImpl("014090442",_hora[(int) (0)],0);
 //BA.debugLineNum = 900;BA.debugLine="Dim sDate, sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 901;BA.debugLine="DateTime.DateFormat = \"dd/MM/yyyy\"";
parent.__c.DateTime.setDateFormat("dd/MM/yyyy");
 //BA.debugLineNum = 902;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
parent.__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 903;BA.debugLine="sDate = DateTime.Date(DateTime.Now)";
_sdate = parent.__c.DateTime.Date(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 904;BA.debugLine="sTime = DateTime.Time(DateTime.Now)";
_stime = parent.__c.DateTime.Time(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 905;BA.debugLine="If c.GetString(\"HVD_RECHAZOCANT\") <> \"0\" Then";
if (true) break;

case 63:
//if
this.state = 68;
if ((parent._c.GetString("HVD_RECHAZOCANT")).equals("0") == false) { 
this.state = 65;
}else {
this.state = 67;
}if (true) break;

case 65:
//C
this.state = 68;
 //BA.debugLineNum = 906;BA.debugLine="Log((c.GetString(\"HVD_RECHAZOCANT\")-restacant)";
parent.__c.LogImpl("014090450",BA.NumberToString(((double)(Double.parseDouble(parent._c.GetString("HVD_RECHAZOCANT")))-(double)(Double.parseDouble(_restacant)))),0);
 //BA.debugLineNum = 907;BA.debugLine="cmd.Initialize";
parent._cmd.Initialize();
 //BA.debugLineNum = 908;BA.debugLine="cmd.Name = \"update_HVD_MEDICOMEDv2rep2\"";
parent._cmd.Name /*String*/  = "update_HVD_MEDICOMEDv2rep2";
 //BA.debugLineNum = 909;BA.debugLine="cmd.Parameters = Array As String(c.GetString(\"";
parent._cmd.Parameters /*Object[]*/  = (Object[])(new String[]{parent._c.GetString("HVD_RECHAZOCANT"),parent._c.GetString("BCAJAS"),parent._c.GetString("CANTC"),_sdate+" "+_stime,BA.NumberToString(1),parent._c.GetString("HVD_CLIENTE"),parent._c.GetString("HVD_PROID"),_fecha3+" "+_hora[(int) (0)],parent._c.GetString("HVD_RUTA"),parent._almacen,parent._l_ruta.getText(),parent._c.GetString("HVD_CODPROMO"),parent._c.GetString("HVD_NUM_TICKET"),parent._c.GetString("HVD_CANT")});
 //BA.debugLineNum = 910;BA.debugLine="reqManager.ExecuteCommand(cmd, \"update_hvd\")";
parent._reqmanager._executecommand /*String*/ (parent._cmd,(Object)("update_hvd"));
 if (true) break;

case 67:
//C
this.state = 68;
 //BA.debugLineNum = 912;BA.debugLine="cmd.Initialize";
parent._cmd.Initialize();
 //BA.debugLineNum = 913;BA.debugLine="cmd.Name = \"update_HVD_MEDICOMEDv2rep2\"";
parent._cmd.Name /*String*/  = "update_HVD_MEDICOMEDv2rep2";
 //BA.debugLineNum = 914;BA.debugLine="Log( c.GetString(\"CANTC\")& c.GetString(\"HVD_CL";
parent.__c.LogImpl("014090458",parent._c.GetString("CANTC")+parent._c.GetString("HVD_CLIENTE")+parent._c.GetString("HVD_PROID")+_fecha3+" "+_hora[(int) (0)]+_d4.GetString("CAT_CL_RUTA")+parent._almacen+parent._l_ruta.getText()+parent._c.GetString("HVD_CODPROMO")+parent._c.GetString("HVD_NUM_TICKET")+parent._c.GetString("HVD_CANT"),0);
 //BA.debugLineNum = 915;BA.debugLine="cmd.Parameters = Array As String(\"\",c.GetStrin";
parent._cmd.Parameters /*Object[]*/  = (Object[])(new String[]{"",parent._c.GetString("BCAJAS"),parent._c.GetString("CANTC"),"","",parent._c.GetString("HVD_CLIENTE"),parent._c.GetString("HVD_PROID"),_fecha3+" "+_hora[(int) (0)],parent._c.GetString("HVD_RUTA"),parent._almacen,parent._l_ruta.getText(),parent._c.GetString("HVD_CODPROMO"),parent._c.GetString("HVD_NUM_TICKET"),parent._c.GetString("HVD_CANT")});
 //BA.debugLineNum = 916;BA.debugLine="reqManager.ExecuteCommand(cmd, \"update_hvd\")";
parent._reqmanager._executecommand /*String*/ (parent._cmd,(Object)("update_hvd"));
 if (true) break;

case 68:
//C
this.state = 94;
;
 //BA.debugLineNum = 918;BA.debugLine="d4.Close";
_d4.Close();
 if (true) break;
if (true) break;

case 69:
//C
this.state = 70;
;
 if (true) break;

case 70:
//C
this.state = 71;
;
 //BA.debugLineNum = 921;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 924;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT MIL, QUINIENTO";
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 MIL, QUINIENTOS, DOCIENTOS, CIEN, CINCUENTA, VEINTE FROM TABULADOR_BILLETES")));
 //BA.debugLineNum = 925;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT RUTAA FROM RUT";
parent._d = (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 RUTAA FROM RUTAA")));
 //BA.debugLineNum = 926;BA.debugLine="b = Starter.skmt.ExecQuery(\"SELECT ID_ALMACEN FRO";
parent._b = (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 ID_ALMACEN FROM CAT_ALMACEN")));
 //BA.debugLineNum = 927;BA.debugLine="f = Starter.skmt.ExecQuery(\"SELECT HVD_FECHA FROM";
parent._f = (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_FECHA FROM HIST_VENTAS")));
 //BA.debugLineNum = 928;BA.debugLine="d.Position = 0";
parent._d.setPosition((int) (0));
 //BA.debugLineNum = 929;BA.debugLine="b.Position = 0";
parent._b.setPosition((int) (0));
 //BA.debugLineNum = 930;BA.debugLine="f.Position = 0";
parent._f.setPosition((int) (0));
 //BA.debugLineNum = 931;BA.debugLine="If c.RowCount > 0 Then";
if (true) break;

case 71:
//if
this.state = 78;
if (parent._c.getRowCount()>0) { 
this.state = 73;
}if (true) break;

case 73:
//C
this.state = 74;
 //BA.debugLineNum = 932;BA.debugLine="Log($\"Procesando TABULADOR_BILLETES: ${c.RowCoun";
parent.__c.LogImpl("014090476",("Procesando TABULADOR_BILLETES: "+parent.__c.SmartStringFormatter("",(Object)(parent._c.getRowCount()))+" registros"),0);
 //BA.debugLineNum = 933;BA.debugLine="totalRegistros = totalRegistros + c.RowCount";
parent._totalregistros = (int) (parent._totalregistros+parent._c.getRowCount());
 //BA.debugLineNum = 934;BA.debugLine="totalRegistrosTotales = totalRegistrosTotales +";
parent._totalregistrostotales = (int) (parent._totalregistrostotales+parent._c.getRowCount());
 //BA.debugLineNum = 935;BA.debugLine="Log($\"Total acumulado: ${totalRegistros}\"$)";
parent.__c.LogImpl("014090479",("Total acumulado: "+parent.__c.SmartStringFormatter("",(Object)(parent._totalregistros))+""),0);
 //BA.debugLineNum = 937;BA.debugLine="For i = 0 To c.RowCount - 1";
if (true) break;

case 74:
//for
this.state = 77;
step189 = 1;
limit189 = (int) (parent._c.getRowCount()-1);
_i = (int) (0) ;
this.state = 95;
if (true) break;

case 95:
//C
this.state = 77;
if ((step189 > 0 && _i <= limit189) || (step189 < 0 && _i >= limit189)) this.state = 76;
if (true) break;

case 96:
//C
this.state = 95;
_i = ((int)(0 + _i + step189)) ;
if (true) break;

case 76:
//C
this.state = 96;
 //BA.debugLineNum = 938;BA.debugLine="c.Position=i";
parent._c.setPosition(_i);
 //BA.debugLineNum = 939;BA.debugLine="Dim cmd As DBCommand";
parent._cmd = new reparto_medicomed.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 940;BA.debugLine="Dim fechatabulador() As String = Regex.Split(\"";
_fechatabulador = parent.__c.Regex.Split(" ",parent._f.GetString("HVD_FECHA"));
 //BA.debugLineNum = 941;BA.debugLine="Dim fechatabulador2() As String = Regex.Split(\"";
_fechatabulador2 = parent.__c.Regex.Split("-",_fechatabulador[(int) (0)]);
 //BA.debugLineNum = 942;BA.debugLine="Dim fechatabulador3 As String = fechatabulador2";
_fechatabulador3 = _fechatabulador2[(int) (1)]+"/"+_fechatabulador2[(int) (2)]+"/"+_fechatabulador2[(int) (0)];
 //BA.debugLineNum = 943;BA.debugLine="cmd.Initialize";
parent._cmd.Initialize();
 //BA.debugLineNum = 944;BA.debugLine="cmd.Name = \"insert_tabulador_billetes_MEDICOMED";
parent._cmd.Name /*String*/  = "insert_tabulador_billetes_MEDICOMEDv2";
 //BA.debugLineNum = 945;BA.debugLine="cmd.Parameters = Array As Object(b.GetString(\"I";
parent._cmd.Parameters /*Object[]*/  = new Object[]{(Object)(parent._b.GetString("ID_ALMACEN")),(Object)(parent._d.GetString("RUTAA")),(Object)(parent._c.GetString("MIL")),(Object)(parent._c.GetString("QUINIENTOS")),(Object)(parent._c.GetString("DOCIENTOS")),(Object)(parent._c.GetString("CIEN")),(Object)(parent._c.GetString("CINCUENTA")),(Object)(parent._c.GetString("VEINTE")),(Object)(_fechatabulador3)};
 //BA.debugLineNum = 946;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_tabulador_";
parent._reqmanager._executecommand /*String*/ (parent._cmd,(Object)("ins_tabulador_bill"));
 if (true) break;
if (true) break;

case 77:
//C
this.state = 78;
;
 //BA.debugLineNum = 948;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 949;BA.debugLine="d.Close";
parent._d.Close();
 //BA.debugLineNum = 950;BA.debugLine="b.Close";
parent._b.Close();
 //BA.debugLineNum = 951;BA.debugLine="f.Close";
parent._f.Close();
 if (true) break;

case 78:
//C
this.state = -1;
;
 //BA.debugLineNum = 955;BA.debugLine="Dim cmd As DBCommand";
parent._cmd = new reparto_medicomed.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 956;BA.debugLine="cmd.Initialize";
parent._cmd.Initialize();
 //BA.debugLineNum = 957;BA.debugLine="cmd.Name = \"insert_drop_rep_MEDICOMEDv22\"";
parent._cmd.Name /*String*/  = "insert_drop_rep_MEDICOMEDv22";
 //BA.debugLineNum = 958;BA.debugLine="cmd.Parameters = Array As Object(Subs.dameUsuario";
parent._cmd.Parameters /*Object[]*/  = new Object[]{(Object)(parent._subs._dameusuariodedb /*String*/ (ba)),(Object)(parent._l_ruta.getText()),(Object)(parent._almacen),(Object)(parent._l_ctast.getText()),(Object)(parent._subs._traeentregados /*anywheresoftware.b4a.objects.collections.Map*/ (ba).getObject()),(Object)(parent._subs._traerechazados /*anywheresoftware.b4a.objects.collections.Map*/ (ba).getObject()),(Object)("ENVIO"),(Object)(parent.__c.Application.getVersionName())};
 //BA.debugLineNum = 959;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_drop\")";
parent._reqmanager._executecommand /*String*/ (parent._cmd,(Object)("inst_drop"));
 //BA.debugLineNum = 961;BA.debugLine="Log($\"PROCESO COMPLETADO - TOTAL DE REGISTROS PRO";
parent.__c.LogImpl("014090505",("PROCESO COMPLETADO - TOTAL DE REGISTROS PROCESADOS: "+parent.__c.SmartStringFormatter("",(Object)(parent._totalregistros))+""),0);
 //BA.debugLineNum = 962;BA.debugLine="ToastMessageShow(\"Se Actualizaron los datos, Este";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Se Actualizaron los datos, Este proceso podria tardar hasta un minuto, gracias "+parent._l_ruta.getText()),parent.__c.True);
 //BA.debugLineNum = 964;BA.debugLine="Wait For AllRequestsComplete ' Espera a que todos";
parent.__c.WaitFor("allrequestscomplete", ba, this, null);
this.state = 97;
return;
case 97:
//C
this.state = -1;
;
 //BA.debugLineNum = 966;BA.debugLine="Log($\"Total registros procesados: ${totalRegistro";
parent.__c.LogImpl("014090510",("Total registros procesados: "+parent.__c.SmartStringFormatter("",(Object)(parent._totalregistros))+""),0);
 //BA.debugLineNum = 967;BA.debugLine="Log($\"Requests exitosos: ${successfulRequests}\"$)";
parent.__c.LogImpl("014090511",("Requests exitosos: "+parent.__c.SmartStringFormatter("",(Object)(parent._successfulrequests))+""),0);
 //BA.debugLineNum = 968;BA.debugLine="LogColor(\"Esto es totalRegistrosTotales: ---->\" &";
parent.__c.LogImpl("014090512","Esto es totalRegistrosTotales: ---->"+BA.NumberToString(parent._totalregistrostotales),parent.__c.Colors.Red);
 //BA.debugLineNum = 971;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public void  _allrequestscomplete() throws Exception{
}
public Object  _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
 //BA.debugLineNum = 104;BA.debugLine="Public Sub Initialize As Object";
 //BA.debugLineNum = 105;BA.debugLine="Return Me";
if (true) return this;
 //BA.debugLineNum = 106;BA.debugLine="End Sub";
return null;
}
public String  _inv_click() throws Exception{
 //BA.debugLineNum = 1765;BA.debugLine="Sub inv_Click";
 //BA.debugLineNum = 1766;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 = 1767;BA.debugLine="End Sub";
return "";
}
public boolean  _isconnectedtointernet() throws Exception{
anywheresoftware.b4a.agraham.reflection.Reflection _r = null;
 //BA.debugLineNum = 640;BA.debugLine="Sub IsConnectedToInternet As Boolean 'ignore";
 //BA.debugLineNum = 641;BA.debugLine="Dim r As Reflector";
_r = new anywheresoftware.b4a.agraham.reflection.Reflection();
 //BA.debugLineNum = 642;BA.debugLine="r.Target = r.GetContext";
_r.Target = (Object)(_r.GetContext(ba));
 //BA.debugLineNum = 643;BA.debugLine="r.Target = r.RunMethod2(\"getSystemService\", \"conn";
_r.Target = _r.RunMethod2("getSystemService","connectivity","java.lang.String");
 //BA.debugLineNum = 644;BA.debugLine="r.Target = r.RunMethod(\"getActiveNetworkInfo\")";
_r.Target = _r.RunMethod("getActiveNetworkInfo");
 //BA.debugLineNum = 645;BA.debugLine="If r.Target <> Null Then";
if (_r.Target!= null) { 
 //BA.debugLineNum = 646;BA.debugLine="Return r.RunMethod(\"isConnectedOrConnecting\")";
if (true) return BA.ObjectToBoolean(_r.RunMethod("isConnectedOrConnecting"));
 };
 //BA.debugLineNum = 648;BA.debugLine="Return False";
if (true) return __c.False;
 //BA.debugLineNum = 649;BA.debugLine="End Sub";
return false;
}
public String  _jobdone(reparto_medicomed.keymon.lat.httpjob _job) throws Exception{
reparto_medicomed.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 _cat_cl_secuencia = "";
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;
int _cat_dp_cant_min_venta = 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_placa = "";
String _bcajas = "";
String _cantc = "";
String _hvd_ruta = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _tc = null;
String _cat_va_descripcion = "";
String _cat_va_valor = "";
String _tmp_monto_pagare = "";
String _tmp_cliente = "";
int _cuantosp = 0;
int _cuantosc = 0;
int _cuantosn = 0;
String _cat_ve_version = "";
String _valido = "";
double _lat = 0;
double _lon = 0;
String _k = "";
 //BA.debugLineNum = 1128;BA.debugLine="Sub JobDone(Job As HttpJob)";
 //BA.debugLineNum = 1130;BA.debugLine="Log(todosRequest)";
__c.LogImpl("014221314",BA.NumberToString(_todosrequest),0);
 //BA.debugLineNum = 1131;BA.debugLine="todosRequest = todosRequest +1";
_todosrequest = (int) (_todosrequest+1);
 //BA.debugLineNum = 1132;BA.debugLine="Log(todosRequest)";
__c.LogImpl("014221316",BA.NumberToString(_todosrequest),0);
 //BA.debugLineNum = 1133;BA.debugLine="If Job.Success = False Then";
if (_job._success /*boolean*/ ==__c.False) { 
 //BA.debugLineNum = 1134;BA.debugLine="LogColor(\"** \" & Job.Tag & \" Error: \" & Job.Erro";
__c.LogImpl("014221318","** "+BA.ObjectToString(_job._tag /*Object*/ )+" Error: "+_job._errormessage /*String*/ ,__c.Colors.Red);
 }else {
 //BA.debugLineNum = 1137;BA.debugLine="LogColor(\"Esto es totalRegistros: \" & totalRegis";
__c.LogImpl("014221321","Esto es totalRegistros: "+BA.NumberToString(_totalregistros),__c.Colors.Red);
 //BA.debugLineNum = 1138;BA.debugLine="successfulRequests = successfulRequests + 1";
_successfulrequests = (int) (_successfulrequests+1);
 //BA.debugLineNum = 1139;BA.debugLine="totalRegistros = totalRegistros - 1";
_totalregistros = (int) (_totalregistros-1);
 //BA.debugLineNum = 1140;BA.debugLine="Log(\"Esto es successfulRequests: \" & successfulR";
__c.LogImpl("014221324","Esto es successfulRequests: "+BA.NumberToString(_successfulrequests),0);
 //BA.debugLineNum = 1141;BA.debugLine="LogColor(\"JobDone: '\" & reqManager.HandleJob(Job";
__c.LogImpl("014221325","JobDone: '"+BA.ObjectToString(_reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job).Tag /*Object*/ )+"' - Registros: "+BA.NumberToString(_reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job).Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),__c.Colors.Green);
 //BA.debugLineNum = 1142;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1143;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1144;BA.debugLine="If result.Tag = \"kmt_datos\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("kmt_datos"))) { 
 //BA.debugLineNum = 1145;BA.debugLine="If reqs.IndexOf(\"kmt_datos\") > -1 Then";
if (_reqs.IndexOf((Object)("kmt_datos"))>-1) { 
 //BA.debugLineNum = 1146;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"kmt_datos\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("kmt_datos")));
 };
 //BA.debugLineNum = 1149;BA.debugLine="Starter.skmt.BeginTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .BeginTransaction();
 //BA.debugLineNum = 1151;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group19 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen19 = group19.getSize()
;int index19 = 0;
;
for (; index19 < groupLen19;index19++){
_records = (Object[])(group19.Get(index19));
 //BA.debugLineNum = 1152;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 = 1153;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 = 1154;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 = 1155;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 = 1156;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 = 1157;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 = 1158;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 = 1159;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 = 1160;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 = 1161;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 = 1162;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 = 1163;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 = 1164;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 = 1165;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 = 1166;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 = 1167;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 = 1168;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 = 1169;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 = 1170;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 = 1171;BA.debugLine="Dim CAT_CL_SECUENCIA As String = records(resu";
_cat_cl_secuencia = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_SECUENCIA"))))]);
 //BA.debugLineNum = 1173;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,SECUENCIA) 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),(Object)(_cat_cl_secuencia)}));
 }
};
 //BA.debugLineNum = 1175;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)("VENTA RECHAZO"),(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 = 1177;BA.debugLine="Starter.skmt.TransactionSuccessful";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .TransactionSuccessful();
 //BA.debugLineNum = 1178;BA.debugLine="Starter.skmt.EndTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .EndTransaction();
 //BA.debugLineNum = 1179;BA.debugLine="Listo1 = 1";
_listo1 = BA.NumberToString(1);
 //BA.debugLineNum = 1180;BA.debugLine="If Listo1 = 1  And Listo3 = 1  Then";
if ((_listo1).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1181;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 1182;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1183;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1184;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 1189;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1190;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1191;BA.debugLine="If result.Tag = \"gunaprod3\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("gunaprod3"))) { 
 //BA.debugLineNum = 1192;BA.debugLine="If reqs.IndexOf(\"gunaprod3\") > -1 Then";
if (_reqs.IndexOf((Object)("gunaprod3"))>-1) { 
 //BA.debugLineNum = 1193;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"gunaprod3\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("gunaprod3")));
 //BA.debugLineNum = 1194;BA.debugLine="Log(reqs.Size)";
__c.LogImpl("014221378",BA.NumberToString(_reqs.getSize()),0);
 };
 //BA.debugLineNum = 1196;BA.debugLine="Starter.skmt.BeginTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .BeginTransaction();
 //BA.debugLineNum = 1197;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group62 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen62 = group62.getSize()
;int index62 = 0;
;
for (; index62 < groupLen62;index62++){
_records = (Object[])(group62.Get(index62));
 //BA.debugLineNum = 1198;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 = 1199;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 = 1200;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 = 1201;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 = 1202;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 = 1203;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 = 1204;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 = 1205;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 = 1206;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 = 1207;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 = 1208;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 = 1210;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 = 1211;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 = 1212;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 = 1213;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 = 1214;BA.debugLine="Dim CAT_DP_CANT_MIN_VENTA As Int = 1";
_cat_dp_cant_min_venta = (int) (1);
 //BA.debugLineNum = 1217;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)(_cat_gp_almacen)}));
 //BA.debugLineNum = 1218;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,CAT_DP_CANT_MIN_VENTA) 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),(Object)(_cat_dp_cant_min_venta)}));
 }
};
 //BA.debugLineNum = 1220;BA.debugLine="Starter.skmt.TransactionSuccessful";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .TransactionSuccessful();
 //BA.debugLineNum = 1221;BA.debugLine="Starter.skmt.EndTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .EndTransaction();
 //BA.debugLineNum = 1222;BA.debugLine="Listo2=1";
_listo2 = BA.NumberToString(1);
 //BA.debugLineNum = 1223;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 = 1224;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 1225;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1226;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1227;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 1232;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1233;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1234;BA.debugLine="If result.Tag = \"gunaprod\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("gunaprod"))) { 
 //BA.debugLineNum = 1235;BA.debugLine="If reqs.IndexOf(\"gunaprod\") > -1 Then";
if (_reqs.IndexOf((Object)("gunaprod"))>-1) { 
 //BA.debugLineNum = 1236;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"gunaprod\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("gunaprod")));
 //BA.debugLineNum = 1237;BA.debugLine="Log(reqs.Size)";
__c.LogImpl("014221421",BA.NumberToString(_reqs.getSize()),0);
 };
 //BA.debugLineNum = 1239;BA.debugLine="Starter.skmt.BeginTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .BeginTransaction();
 //BA.debugLineNum = 1240;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group101 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen101 = group101.getSize()
;int index101 = 0;
;
for (; index101 < groupLen101;index101++){
_records = (Object[])(group101.Get(index101));
 //BA.debugLineNum = 1241;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 = 1242;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 = 1243;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 = 1244;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 = 1245;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 = 1246;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 = 1247;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 = 1248;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 = 1249;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 = 1250;BA.debugLine="Dim CONVERSION As String = records(result.Col";
_conversion = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_CONVERSION1"))))]);
 //BA.debugLineNum = 1251;BA.debugLine="Dim PRECIOCONVER As String = records(result.C";
_precioconver = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_PRECIO4"))))]);
 //BA.debugLineNum = 1252;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 = 1255;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)(_cat_gp_almacen)}));
 //BA.debugLineNum = 1257;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 = 1259;BA.debugLine="Starter.skmt.TransactionSuccessful";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .TransactionSuccessful();
 //BA.debugLineNum = 1260;BA.debugLine="Starter.skmt.EndTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .EndTransaction();
 //BA.debugLineNum = 1261;BA.debugLine="Listo2=1";
_listo2 = BA.NumberToString(1);
 //BA.debugLineNum = 1262;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 = 1263;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 1264;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1265;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1266;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 1271;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1272;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1273;BA.debugLine="If result.Tag = \"gunaprodp\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("gunaprodp"))) { 
 //BA.debugLineNum = 1274;BA.debugLine="If reqs.IndexOf(\"gunaprodp\") > -1 Then";
if (_reqs.IndexOf((Object)("gunaprodp"))>-1) { 
 //BA.debugLineNum = 1275;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"gunaprodp\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("gunaprodp")));
 //BA.debugLineNum = 1276;BA.debugLine="Log(reqs.Size)";
__c.LogImpl("014221460",BA.NumberToString(_reqs.getSize()),0);
 };
 //BA.debugLineNum = 1278;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group135 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen135 = group135.getSize()
;int index135 = 0;
;
for (; index135 < groupLen135;index135++){
_records = (Object[])(group135.Get(index135));
 //BA.debugLineNum = 1279;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 = 1280;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 = 1281;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 = 1282;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 = 1283;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 = 1284;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 = 1285;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 = 1286;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 = 1287;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 = 1288;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 = 1291;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 = 1293;BA.debugLine="Listo4=1";
_listo4 = BA.NumberToString(1);
 //BA.debugLineNum = 1294;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 = 1295;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 1296;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1297;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1298;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 = 1300;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 1301;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1302;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1303;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 1308;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1309;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1310;BA.debugLine="If result.Tag = \"detallepaq\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("detallepaq"))) { 
 //BA.debugLineNum = 1311;BA.debugLine="If reqs.IndexOf(\"detallepaq\") > -1 Then";
if (_reqs.IndexOf((Object)("detallepaq"))>-1) { 
 //BA.debugLineNum = 1312;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"detallepaq\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("detallepaq")));
 //BA.debugLineNum = 1313;BA.debugLine="Log(reqs.Size)";
__c.LogImpl("014221497",BA.NumberToString(_reqs.getSize()),0);
 };
 //BA.debugLineNum = 1315;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group169 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen169 = group169.getSize()
;int index169 = 0;
;
for (; index169 < groupLen169;index169++){
_records = (Object[])(group169.Get(index169));
 //BA.debugLineNum = 1316;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 = 1317;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 = 1318;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 = 1319;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 = 1320;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 = 1321;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 = 1322;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 = 1323;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 = 1324;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 = 1325;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 = 1326;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 = 1328;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 = 1330;BA.debugLine="Listo3 =1";
_listo3 = BA.NumberToString(1);
 //BA.debugLineNum = 1331;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 = 1332;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 1333;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1334;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1335;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 = 1337;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 1338;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1339;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1340;BA.debugLine="EJECUTANDO = 0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 1345;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1346;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1347;BA.debugLine="If result.Tag = \"estatus\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("estatus"))) { 
 //BA.debugLineNum = 1348;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group200 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen200 = group200.getSize()
;int index200 = 0;
;
for (; index200 < groupLen200;index200++){
_records = (Object[])(group200.Get(index200));
 //BA.debugLineNum = 1349;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 = 1350;BA.debugLine="If hvd_estatus = \"Liquidado\" Then";
if ((_hvd_estatus).equals("Liquidado")) { 
 //BA.debugLineNum = 1352;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 = 1354;BA.debugLine="envioinfo";
_envioinfo();
 };
 }
};
 };
 };
 //BA.debugLineNum = 1360;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1361;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1362;BA.debugLine="If result.Tag = \"punteo\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("punteo"))) { 
 //BA.debugLineNum = 1363;BA.debugLine="If reqs.IndexOf(\"punteo\") > -1 Then";
if (_reqs.IndexOf((Object)("punteo"))>-1) { 
 //BA.debugLineNum = 1364;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"punteo\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("punteo")));
 };
 //BA.debugLineNum = 1367;BA.debugLine="If reqs.IndexOf(\"punteo\") > 0 Then";
if (_reqs.IndexOf((Object)("punteo"))>0) { 
 //BA.debugLineNum = 1368;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"punteo\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("punteo")));
 //BA.debugLineNum = 1369;BA.debugLine="Log(reqs.Size)";
__c.LogImpl("014221553",BA.NumberToString(_reqs.getSize()),0);
 };
 //BA.debugLineNum = 1371;BA.debugLine="Starter.skmt.BeginTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .BeginTransaction();
 //BA.debugLineNum = 1372;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group221 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen221 = group221.getSize()
;int index221 = 0;
;
for (; index221 < groupLen221;index221++){
_records = (Object[])(group221.Get(index221));
 //BA.debugLineNum = 1373;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 = 1374;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 = 1375;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 = 1377;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 = 1379;BA.debugLine="Starter.skmt.TransactionSuccessful";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .TransactionSuccessful();
 //BA.debugLineNum = 1380;BA.debugLine="Starter.skmt.EndTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .EndTransaction();
 };
 };
 //BA.debugLineNum = 1384;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1385;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1386;BA.debugLine="If result.Tag = \"hist_datos\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("hist_datos"))) { 
 //BA.debugLineNum = 1387;BA.debugLine="If reqs.IndexOf(\"hist_datos\") > -1 Then";
if (_reqs.IndexOf((Object)("hist_datos"))>-1) { 
 //BA.debugLineNum = 1388;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"hist_datos\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("hist_datos")));
 };
 //BA.debugLineNum = 1391;BA.debugLine="Log(l_ruta.text)";
__c.LogImpl("014221575",_l_ruta.getText(),0);
 //BA.debugLineNum = 1392;BA.debugLine="Log($\"********  Insertamos HV - ${result.Rows.";
__c.LogImpl("014221576",("********  Insertamos HV - "+__c.SmartStringFormatter("",(Object)(_result.Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()))+""),0);
 //BA.debugLineNum = 1393;BA.debugLine="Starter.skmt.BeginTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .BeginTransaction();
 //BA.debugLineNum = 1394;BA.debugLine="Dim consecutivo  As Int= 0";
_consecutivo = (int) (0);
 //BA.debugLineNum = 1395;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group241 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen241 = group241.getSize()
;int index241 = 0;
;
for (; index241 < groupLen241;index241++){
_records = (Object[])(group241.Get(index241));
 //BA.debugLineNum = 1396;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 = 1397;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 = 1398;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 = 1399;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 = 1400;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 = 1401;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 = 1402;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 = 1403;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 = 1404;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 = 1405;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 = 1406;BA.debugLine="Dim HVD_PLACA As String = records(result.Colu";
_hvd_placa = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_PLACA"))))]);
 //BA.debugLineNum = 1407;BA.debugLine="Dim bcajas As String = records(result.Columns";
_bcajas = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_BCAJAS"))))]);
 //BA.debugLineNum = 1408;BA.debugLine="Dim cantc As String = records(result.Columns.";
_cantc = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_CANTC"))))]);
 //BA.debugLineNum = 1409;BA.debugLine="Dim HVD_RUTA As String = records(result.Colum";
_hvd_ruta = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_RUTA"))))]);
 //BA.debugLineNum = 1411;BA.debugLine="consecutivo = consecutivo +1";
_consecutivo = (int) (_consecutivo+1);
 //BA.debugLineNum = 1412;BA.debugLine="If l_ruta.Text = \"0\" Then 'Si no hay ruta car";
if ((_l_ruta.getText()).equals("0")) { 
 //BA.debugLineNum = 1413;BA.debugLine="Log(\"No hay ruta, guardamos todos\")";
__c.LogImpl("014221597","No hay ruta, guardamos todos",0);
 //BA.debugLineNum = 1414;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, PLACA,BCAJAS,CANTC,CONSECUTIVO,BCAJAS_OR,CANTC_OR, HVD_RUTA) 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)(_hvd_placa),(Object)(_bcajas),(Object)(_cantc),(Object)(_consecutivo),(Object)(_bcajas),(Object)(_cantc),(Object)(_hvd_ruta)}));
 //BA.debugLineNum = 1415;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 = 1418;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))+"'"))));
 //BA.debugLineNum = 1419;BA.debugLine="If tc.RowCount = 0 Then";
if (_tc.getRowCount()==0) { 
 //BA.debugLineNum = 1420;BA.debugLine="Log($\"Guardamos ${HVD_CLIENTE}\"$)";
__c.LogImpl("014221604",("Guardamos "+__c.SmartStringFormatter("",(Object)(_hvd_cliente))+""),0);
 //BA.debugLineNum = 1421;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, PLACA,BCAJAS,CANTC,CONSECUTIVO,BCAJAS_OR,CANTC_OR, HVD_RUTA) 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)(_hvd_placa),(Object)(_bcajas),(Object)(_cantc),(Object)(_consecutivo),(Object)(_bcajas),(Object)(_cantc),(Object)(_hvd_ruta)}));
 //BA.debugLineNum = 1422;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 = 1426;BA.debugLine="Starter.skmt.TransactionSuccessful";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .TransactionSuccessful();
 //BA.debugLineNum = 1427;BA.debugLine="Starter.skmt.EndTransaction";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .EndTransaction();
 //BA.debugLineNum = 1428;BA.debugLine="Log($\"********  Terminamos HV - ${result.Rows.";
__c.LogImpl("014221612",("********  Terminamos HV - "+__c.SmartStringFormatter("",(Object)(_result.Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()))+""),0);
 //BA.debugLineNum = 1442;BA.debugLine="Listo3 =1";
_listo3 = BA.NumberToString(1);
 //BA.debugLineNum = 1443;BA.debugLine="If Listo1 = 1  And Listo3 = 1  Then";
if ((_listo1).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1444;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 //BA.debugLineNum = 1445;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1446;BA.debugLine="img2.Visible = False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1447;BA.debugLine="EJECUTANDO = 0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 1452;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1453;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1454;BA.debugLine="If result.Tag = \"variables\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("variables"))) { 
 //BA.debugLineNum = 1455;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group285 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen285 = group285.getSize()
;int index285 = 0;
;
for (; index285 < groupLen285;index285++){
_records = (Object[])(group285.Get(index285));
 //BA.debugLineNum = 1456;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 = 1457;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 = 1459;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 = 1465;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1466;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1467;BA.debugLine="If result.Tag = \"PAGARES\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("PAGARES"))) { 
 //BA.debugLineNum = 1468;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group295 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen295 = group295.getSize()
;int index295 = 0;
;
for (; index295 < groupLen295;index295++){
_records = (Object[])(group295.Get(index295));
 //BA.debugLineNum = 1470;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 = 1471;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 = 1473;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 = 1478;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1479;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1480;BA.debugLine="If result.Tag = \"valida_pedido\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("valida_pedido"))) { 
 //BA.debugLineNum = 1481;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group305 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen305 = group305.getSize()
;int index305 = 0;
;
for (; index305 < groupLen305;index305++){
_records = (Object[])(group305.Get(index305));
 //BA.debugLineNum = 1482;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 = 1483;BA.debugLine="If cuantos_pedido = CUANTOSP Then";
if ((_cuantos_pedido).equals(BA.NumberToString(_cuantosp))) { 
 //BA.debugLineNum = 1485;BA.debugLine="datos_iguales = \"ok\"";
_datos_iguales = "ok";
 }else {
 //BA.debugLineNum = 1487;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 = 1495;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1496;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1497;BA.debugLine="If result.Tag = \"valida_pedidoc\" Then 'query ta";
if ((_result.Tag /*Object*/ ).equals((Object)("valida_pedidoc"))) { 
 //BA.debugLineNum = 1498;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group318 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen318 = group318.getSize()
;int index318 = 0;
;
for (; index318 < groupLen318;index318++){
_records = (Object[])(group318.Get(index318));
 //BA.debugLineNum = 1499;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 = 1500;BA.debugLine="If cuantos_pedidosc = CUANTOSC Then";
if ((_cuantos_pedidosc).equals(BA.NumberToString(_cuantosc))) { 
 //BA.debugLineNum = 1502;BA.debugLine="datos_iguales = \"ok\"";
_datos_iguales = "ok";
 }else {
 //BA.debugLineNum = 1504;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 = 1510;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1511;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1512;BA.debugLine="If result.Tag = \"valida_noventa\" Then 'query ta";
if ((_result.Tag /*Object*/ ).equals((Object)("valida_noventa"))) { 
 //BA.debugLineNum = 1513;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group331 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen331 = group331.getSize()
;int index331 = 0;
;
for (; index331 < groupLen331;index331++){
_records = (Object[])(group331.Get(index331));
 //BA.debugLineNum = 1514;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 = 1515;BA.debugLine="If cuantos_noventa = CUANTOSN Then";
if ((_cuantos_noventa).equals(BA.NumberToString(_cuantosn))) { 
 //BA.debugLineNum = 1517;BA.debugLine="datos_iguales = \"ok\"";
_datos_iguales = "ok";
 }else {
 //BA.debugLineNum = 1519;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 = 1525;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1526;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1527;BA.debugLine="If result.Tag = \"insert_pedido\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("insert_pedido"))) { 
 //BA.debugLineNum = 1528;BA.debugLine="ToastMessageShow(\"Datos Actualizados.\" , True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Datos Actualizados."),__c.True);
 };
 };
 //BA.debugLineNum = 1532;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1533;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1534;BA.debugLine="If result.Tag = \"version\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("version"))) { 
 //BA.debugLineNum = 1535;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group350 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen350 = group350.getSize()
;int index350 = 0;
;
for (; index350 < groupLen350;index350++){
_records = (Object[])(group350.Get(index350));
 //BA.debugLineNum = 1536;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from VERSIO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from VERSION");
 //BA.debugLineNum = 1537;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 = 1539;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 = 1544;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1545;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1546;BA.debugLine="If result.Tag = \"count_cli\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("count_cli"))) { 
 //BA.debugLineNum = 1547;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group360 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen360 = group360.getSize()
;int index360 = 0;
;
for (; index360 < groupLen360;index360++){
_records = (Object[])(group360.Get(index360));
 //BA.debugLineNum = 1548;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 = 1553;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1554;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1555;BA.debugLine="If result.Tag = \"ruta\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("ruta"))) { 
 //BA.debugLineNum = 1556;BA.debugLine="If reqs.IndexOf(\"ruta\") > -1 Then";
if (_reqs.IndexOf((Object)("ruta"))>-1) { 
 //BA.debugLineNum = 1557;BA.debugLine="reqs.RemoveAt(reqs.IndexOf(\"ruta\"))";
_reqs.RemoveAt(_reqs.IndexOf((Object)("ruta")));
 //BA.debugLineNum = 1558;BA.debugLine="Log(reqs.Size)";
__c.LogImpl("014221742",BA.NumberToString(_reqs.getSize()),0);
 };
 //BA.debugLineNum = 1560;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group372 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen372 = group372.getSize()
;int index372 = 0;
;
for (; index372 < groupLen372;index372++){
_records = (Object[])(group372.Get(index372));
 //BA.debugLineNum = 1561;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 = 1563;BA.debugLine="If VALIDO = \"OK\" Then";
if ((_valido).equals("OK")) { 
 //BA.debugLineNum = 1564;BA.debugLine="If l_ctast.Text = \"0\" Then";
if ((_l_ctast.getText()).equals("0")) { 
 //BA.debugLineNum = 1565;BA.debugLine="Subir.Visible = True";
_subir.setVisible(__c.True);
 }else if((_l_ctast.getText()).equals("0") == false) { 
 //BA.debugLineNum = 1567;BA.debugLine="Subir.Visible = False";
_subir.setVisible(__c.False);
 };
 //BA.debugLineNum = 1569;BA.debugLine="cargar.Visible = True";
_cargar.setVisible(__c.True);
 //BA.debugLineNum = 1570;BA.debugLine="If Subs.dameUsuarioDeDB = \"ROOT\" Then Subir.";
if ((_subs._dameusuariodedb /*String*/ (ba)).equals("ROOT")) { 
_subir.setVisible(__c.True);};
 //BA.debugLineNum = 1571;BA.debugLine="connecta.Visible = False";
_connecta.setVisible(__c.False);
 //BA.debugLineNum = 1572;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM RUTAA";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM RUTAA");
 //BA.debugLineNum = 1574;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 = 1575;BA.debugLine="B4XPages.MainPage.rutaPreventa = e_ruta.TEXT";
_b4xpages._mainpage /*reparto_medicomed.keymon.lat.b4xmainpage*/ (ba)._rutapreventa /*String*/  = _e_ruta.getText();
 //BA.debugLineNum = 1576;BA.debugLine="If conn = \"1\" Then";
if ((_conn).equals("1")) { 
 //BA.debugLineNum = 1577;BA.debugLine="ToastMessageShow(\"Existe Conexión con el Se";
__c.ToastMessageShow(BA.ObjectToCharSequence("Existe Conexión con el Servidor."),__c.True);
 };
 }else {
 //BA.debugLineNum = 1580;BA.debugLine="cargar.Visible = False";
_cargar.setVisible(__c.False);
 //BA.debugLineNum = 1581;BA.debugLine="Subir.Visible = False";
_subir.setVisible(__c.False);
 //BA.debugLineNum = 1582;BA.debugLine="inv.Visible = False";
_inv.setVisible(__c.False);
 //BA.debugLineNum = 1583;BA.debugLine="connecta.Visible = False";
_connecta.setVisible(__c.False);
 };
 }
};
 };
 };
 //BA.debugLineNum = 1589;BA.debugLine="If Job.JobName = \"DBRequest\" Then 'Traemos las c";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1590;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1591;BA.debugLine="If result.Tag = \"coords_almacen\" Then 'query ta";
if ((_result.Tag /*Object*/ ).equals((Object)("coords_almacen"))) { 
 //BA.debugLineNum = 1592;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group401 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen401 = group401.getSize()
;int index401 = 0;
;
for (; index401 < groupLen401;index401++){
_records = (Object[])(group401.Get(index401));
 //BA.debugLineNum = 1593;BA.debugLine="Log(\"Coordenadas del almacen: \" & records(res";
__c.LogImpl("014221777","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 = 1594;BA.debugLine="Private lat, lon As Double";
_lat = 0;
_lon = 0;
 //BA.debugLineNum = 1595;BA.debugLine="lat = 0.0";
_lat = 0.0;
 //BA.debugLineNum = 1596;BA.debugLine="lon = 0.0";
_lon = 0.0;
 //BA.debugLineNum = 1597;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 = 1598;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 = 1599;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 = 1601;BA.debugLine="Starter.cedisLocation.Latitude = lat";
_starter._cedislocation /*anywheresoftware.b4a.gps.LocationWrapper*/ .setLatitude(_lat);
 //BA.debugLineNum = 1602;BA.debugLine="Starter.cedisLocation.Longitude = lon";
_starter._cedislocation /*anywheresoftware.b4a.gps.LocationWrapper*/ .setLongitude(_lon);
 //BA.debugLineNum = 1603;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 = 1604;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 = 1610;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1611;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1612;BA.debugLine="If result.Tag = \"ins_reparto\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("ins_reparto"))) { 
 //BA.debugLineNum = 1613;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group420 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen420 = group420.getSize()
;int index420 = 0;
;
for (; index420 < groupLen420;index420++){
_records = (Object[])(group420.Get(index420));
 //BA.debugLineNum = 1614;BA.debugLine="For Each k As String In result.Columns.Keys";
{
final anywheresoftware.b4a.BA.IterableList group421 = _result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen421 = group421.getSize()
;int index421 = 0;
;
for (; index421 < groupLen421;index421++){
_k = BA.ObjectToString(group421.Get(index421));
 //BA.debugLineNum = 1615;BA.debugLine="Log(k & \": \" & records(result.Columns.Get(k)";
__c.LogImpl("014221799",_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
 }
};
 }
};
 };
 };
 //BA.debugLineNum = 1621;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1622;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*reparto_medicomed.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1623;BA.debugLine="If result.Tag = \"ins_rechazos\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("ins_rechazos"))) { 
 //BA.debugLineNum = 1624;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group430 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen430 = group430.getSize()
;int index430 = 0;
;
for (; index430 < groupLen430;index430++){
_records = (Object[])(group430.Get(index430));
 //BA.debugLineNum = 1625;BA.debugLine="For Each k As String In result.Columns.Keys";
{
final anywheresoftware.b4a.BA.IterableList group431 = _result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen431 = group431.getSize()
;int index431 = 0;
;
for (; index431 < groupLen431;index431++){
_k = BA.ObjectToString(group431.Get(index431));
 //BA.debugLineNum = 1626;BA.debugLine="Log(k & \": \" & records(result.Columns.Get(k)";
__c.LogImpl("014221810",_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
 }
};
 }
};
 };
 };
 //BA.debugLineNum = 1631;BA.debugLine="Job.Release";
_job._release /*String*/ ();
 };
 //BA.debugLineNum = 1633;BA.debugLine="Job.Release";
_job._release /*String*/ ();
 //BA.debugLineNum = 1634;BA.debugLine="If reqs.Size = 0 Then";
if (_reqs.getSize()==0) { 
 //BA.debugLineNum = 1638;BA.debugLine="ProgressDialogHide";
__c.ProgressDialogHide();
 //BA.debugLineNum = 1640;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 = 1641;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1642;BA.debugLine="If c.GetString(\"CUANTOS\") = 0 Then";
if ((_c.GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 1643;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 = 1648;BA.debugLine="c.Close";
_c.Close();
 };
 //BA.debugLineNum = 1652;BA.debugLine="Log(\"--------------------------------------------";
__c.LogImpl("014221836","---------------------------------------------------",0);
 //BA.debugLineNum = 1653;BA.debugLine="Log(totalRegistrosTotales)";
__c.LogImpl("014221837",BA.NumberToString(_totalregistrostotales),0);
 //BA.debugLineNum = 1654;BA.debugLine="Log(successfulRequests)";
__c.LogImpl("014221838",BA.NumberToString(_successfulrequests),0);
 //BA.debugLineNum = 1655;BA.debugLine="Log(todosRequest)";
__c.LogImpl("014221839",BA.NumberToString(_todosrequest),0);
 //BA.debugLineNum = 1656;BA.debugLine="Log(NumberFormat2(((todosRequest/ totalRegistrosT";
__c.LogImpl("014221840",__c.NumberFormat2(((_todosrequest/(double)_totalregistrostotales)*100),(int) (1),(int) (0),(int) (0),__c.False),0);
 //BA.debugLineNum = 1658;BA.debugLine="If totalRegistrosTotales > 0 Then";
if (_totalregistrostotales>0) { 
 //BA.debugLineNum = 1659;BA.debugLine="pbEnvioInfo.Progress = NumberFormat2(((todosRequ";
_pbenvioinfo.setProgress((int)(Double.parseDouble(__c.NumberFormat2(((_todosrequest/(double)_totalregistrostotales)*100),(int) (1),(int) (0),(int) (0),__c.False))));
 //BA.debugLineNum = 1661;BA.debugLine="If pbEnvioInfo.Progress >= 100 Then";
if (_pbenvioinfo.getProgress()>=100) { 
 //BA.debugLineNum = 1662;BA.debugLine="lEnviaInfo.Text = \"Informacion Enviada \"& CRLF";
_lenviainfo.setText(BA.ObjectToCharSequence("Informacion Enviada "+__c.CRLF+"%100"));
 }else {
 //BA.debugLineNum = 1664;BA.debugLine="lEnviaInfo.Text = \"Enviando Informacion:   %\" &";
_lenviainfo.setText(BA.ObjectToCharSequence("Enviando Informacion:   %"+BA.NumberToString(_pbenvioinfo.getProgress())));
 };
 };
 //BA.debugLineNum = 1667;BA.debugLine="Log(\"--------------------------------------------";
__c.LogImpl("014221851","---------------------------------------------------",0);
 //BA.debugLineNum = 1668;BA.debugLine="Log(todosRequest >= totalRegistrosTotales)";
__c.LogImpl("014221852",BA.ObjectToString(_todosrequest>=_totalregistrostotales),0);
 //BA.debugLineNum = 1670;BA.debugLine="If todosRequest < totalRegistrosTotales Then";
if (_todosrequest<_totalregistrostotales) { 
 }else {
 //BA.debugLineNum = 1673;BA.debugLine="bEnvioInfo.Enabled = True";
_benvioinfo.setEnabled(__c.True);
 };
 //BA.debugLineNum = 1676;BA.debugLine="End Sub";
return "";
}
public String  _listview1_itemclick(int _position,Object _value) throws Exception{
String[] _clieasing = null;
 //BA.debugLineNum = 2050;BA.debugLine="Private Sub ListView1_ItemClick (Position As Int,";
 //BA.debugLineNum = 2051;BA.debugLine="Log(Value)";
__c.LogImpl("015138817",BA.ObjectToString(_value),0);
 //BA.debugLineNum = 2053;BA.debugLine="Dim clieasing() As String = Regex.Split(\" \", Valu";
_clieasing = __c.Regex.Split(" ",BA.ObjectToString(_value));
 //BA.debugLineNum = 2054;BA.debugLine="Log(clieasing(0))";
__c.LogImpl("015138820",_clieasing[(int) (0)],0);
 //BA.debugLineNum = 2056;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CUENTAA\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CUENTAA");
 //BA.debugLineNum = 2057;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 = 2058;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 //BA.debugLineNum = 2059;BA.debugLine="End Sub";
return "";
}
public String  _p_prod_click() throws Exception{
 //BA.debugLineNum = 2113;BA.debugLine="Private Sub p_prod_Click";
 //BA.debugLineNum = 2115;BA.debugLine="End Sub";
return "";
}
public String  _penvioinfo_click() throws Exception{
 //BA.debugLineNum = 2123;BA.debugLine="Private Sub pEnvioInfo_Click";
 //BA.debugLineNum = 2125;BA.debugLine="End Sub";
return "";
}
public String  _subir_click() throws Exception{
 //BA.debugLineNum = 673;BA.debugLine="Sub Subir_Click";
 //BA.debugLineNum = 674;BA.debugLine="pEnvioInfo.Width = Root.Width";
_penvioinfo.setWidth(_root.getWidth());
 //BA.debugLineNum = 675;BA.debugLine="pEnvioInfo.Height = Root.Height";
_penvioinfo.setHeight(_root.getHeight());
 //BA.debugLineNum = 676;BA.debugLine="pEnvioInfo.Left = 0";
_penvioinfo.setLeft((int) (0));
 //BA.debugLineNum = 677;BA.debugLine="pEnvioInfo.Visible = True";
_penvioinfo.setVisible(__c.True);
 //BA.debugLineNum = 678;BA.debugLine="pbEnvioInfo.Width = Root.Width * 0.7";
_pbenvioinfo.setWidth((int) (_root.getWidth()*0.7));
 //BA.debugLineNum = 679;BA.debugLine="pbEnvioInfo.Left = Round(Root.Width/2)-(pbEnvioIn";
_pbenvioinfo.setLeft((int) (__c.Round(_root.getWidth()/(double)2)-(_pbenvioinfo.getWidth()/(double)2)));
 //BA.debugLineNum = 680;BA.debugLine="Subs.centraBoton(bEnvioInfo, pEnvioInfo.Width)";
_subs._centraboton /*String*/ (ba,_benvioinfo,_penvioinfo.getWidth());
 //BA.debugLineNum = 681;BA.debugLine="Subs.centraEtiqueta(lEnviaInfo, pEnvioInfo.Width)";
_subs._centraetiqueta /*String*/ (ba,_lenviainfo,_penvioinfo.getWidth());
 //BA.debugLineNum = 683;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 = 684;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 = 685;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 686;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 687;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 690;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 691;BA.debugLine="cmd.Name = \"select_estatus_MEDICOMEDv2\"";
_cmd.Name /*String*/  = "select_estatus_MEDICOMEDv2";
 //BA.debugLineNum = 692;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN,e_ruta.t";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_e_ruta.getText())};
 //BA.debugLineNum = 693;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"estatus\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("estatus"));
 //BA.debugLineNum = 694;BA.debugLine="End Sub";
return "";
}
public String  _t1_tick() throws Exception{
 //BA.debugLineNum = 1769;BA.debugLine="Sub t1_tick";
 //BA.debugLineNum = 1770;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1771;BA.debugLine="cmd.Name = \"select_cuantos_pedido_MEDICOMEDv2\"";
_cmd.Name /*String*/  = "select_cuantos_pedido_MEDICOMEDv2";
 //BA.debugLineNum = 1772;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN,l_ruta.t";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_l_ruta.getText())};
 //BA.debugLineNum = 1773;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"valida_pedido\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("valida_pedido"));
 //BA.debugLineNum = 1775;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1776;BA.debugLine="cmd.Name = \"select_cuantos_noventa_MEDICOMEDv2\"";
_cmd.Name /*String*/  = "select_cuantos_noventa_MEDICOMEDv2";
 //BA.debugLineNum = 1777;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN,l_ruta.t";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_l_ruta.getText())};
 //BA.debugLineNum = 1778;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"valida_noventa\"";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("valida_noventa"));
 //BA.debugLineNum = 1780;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1781;BA.debugLine="cmd.Name = \"select_cuantos_pedidoc_MEDICOMEDv2\"";
_cmd.Name /*String*/  = "select_cuantos_pedidoc_MEDICOMEDv2";
 //BA.debugLineNum = 1782;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN,l_ruta.t";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_l_ruta.getText())};
 //BA.debugLineNum = 1783;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"valida_pedidoc\"";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("valida_pedidoc"));
 //BA.debugLineNum = 1784;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1785;BA.debugLine="t1.Enabled = False";
_t1.setEnabled(__c.False);
 //BA.debugLineNum = 1786;BA.debugLine="End Sub";
return "";
}
public String  _to_number_vb(Object _valor) throws Exception{
int _valstring = 0;
String _valstring2 = "";
 //BA.debugLineNum = 651;BA.debugLine="Sub to_number_vb (valor As Object) As String";
 //BA.debugLineNum = 652;BA.debugLine="Dim valstring As Int";
_valstring = 0;
 //BA.debugLineNum = 653;BA.debugLine="Dim valstring2 As String = valor";
_valstring2 = BA.ObjectToString(_valor);
 //BA.debugLineNum = 654;BA.debugLine="valstring2.Replace(\":\",\"\")";
_valstring2.replace(":","");
 //BA.debugLineNum = 655;BA.debugLine="Try";
try { //BA.debugLineNum = 656;BA.debugLine="valstring =valstring2.Replace(\":\",\"\")";
_valstring = (int)(Double.parseDouble(_valstring2.replace(":","")));
 //BA.debugLineNum = 657;BA.debugLine="Return valstring";
if (true) return BA.NumberToString(_valstring);
 } 
       catch (Exception e8) {
			ba.setLastException(e8); //BA.debugLineNum = 659;BA.debugLine="Return 0";
if (true) return BA.NumberToString(0);
 };
 //BA.debugLineNum = 661;BA.debugLine="End Sub";
return "";
}
public String  _trabajar_click() throws Exception{
 //BA.debugLineNum = 663;BA.debugLine="Sub trabajar_Click";
 //BA.debugLineNum = 664;BA.debugLine="If b_check.Visible = True Then";
if (_b_check.getVisible()==__c.True) { 
 //BA.debugLineNum = 665;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 = 668;BA.debugLine="B4XPages.ShowPage(\"Clientes\")";
_b4xpages._showpage /*String*/ (ba,"Clientes");
 };
 //BA.debugLineNum = 671;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_medicomed.keymon.lat.httpjob) args[0]);
return BA.SubDelegator.SubNotFound;
}
}
