package reparto_izca.keymon.lat;


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

public class c_cliente extends B4AClass.ImplB4AClass implements BA.SubDelegator{
    private static java.util.HashMap<String, java.lang.reflect.Method> htSubs;
    private void innerInitialize(BA _ba) throws Exception {
        if (ba == null) {
            ba = new BA(_ba, this, htSubs, "reparto_izca.keymon.lat.c_cliente");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", reparto_izca.keymon.lat.c_cliente.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _root = null;
public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null;
public anywheresoftware.b4a.gps.GPS _g = null;
public String _clie_id = "";
public String _sdate = "";
public String _stime = "";
public String _usuario = "";
public String _cuenta = "";
public anywheresoftware.b4a.objects.Serial.BluetoothAdmin _btadmin = null;
public anywheresoftware.b4a.objects.Serial _cmp20 = null;
public anywheresoftware.b4a.objects.streams.File.TextWriterWrapper _printer = null;
public anywheresoftware.b4a.objects.collections.Map _paireddevices = null;
public anywheresoftware.b4a.objects.collections.List _l = null;
public int _tamano = 0;
public int _espacio = 0;
public String _blanco = "";
public boolean _impresoraconectada = false;
public String _longitud = "";
public String _latitud = "";
public String _nombre = "";
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _s = null;
public anywheresoftware.b4a.objects.ListViewWrapper _listview1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_cuenta = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_nombre = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_calle = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_numero = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_nint = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_edo = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_pob = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_col = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_cp = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_zona = null;
public anywheresoftware.b4a.objects.ButtonWrapper _gest = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_saldotot = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_saldooper = null;
public reparto_izca.keymon.lat.dbrequestmanager _reqmanager = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_noentrega = null;
public anywheresoftware.b4a.objects.LabelWrapper _label10 = null;
public anywheresoftware.b4a.objects.LabelWrapper _label11 = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _d = null;
public anywheresoftware.b4a.objects.IME _ime = null;
public anywheresoftware.b4a.objects.ButtonWrapper _tar = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_qr = null;
public anywheresoftware.b4a.objects.ButtonWrapper _bt_qr = null;
public reparto_izca.keymon.lat.escposprinter _printer1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_comm = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_actdte = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_usuario = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_resultado = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_entre1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_entre2 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_atiende = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_atiende2 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _datos = null;
public anywheresoftware.b4a.objects.ButtonWrapper _guardar = null;
public anywheresoftware.b4a.objects.ButtonWrapper _nuevo = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_total = null;
public anywheresoftware.b4a.objects.ButtonWrapper _hist = null;
public String _pasa_imp = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_imp = null;
public String _total_cliente = "";
public String _credito = "";
public anywheresoftware.b4a.objects.PanelWrapper _p_principal = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_paso2 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_cant = null;
public int _errorimpresora = 0;
public int _banderaimp = 0;
public anywheresoftware.b4a.objects.LabelWrapper _l_credi = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_pagare = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_montopag = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_efectivo = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_montoefec = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_credito = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_acred = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_cancred = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_montoacredito = null;
public anywheresoftware.b4a.objects.LabelWrapper _label16 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_limite = null;
public String _almacen = "";
public String _fechaprev = "";
public String _rutaprev = "";
public String _rutarep = "";
public String _montopagare = "";
public anywheresoftware.b4a.objects.PanelWrapper _p_abono = null;
public b4a.example3.customlistview _clv_abonos = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_abono = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_cancelar = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_abono = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_montoabonostotal = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _h = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _j = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _b = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _f = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_folio = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_saldo = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_cxc = null;
public reparto_izca.keymon.lat.b4xcombobox _cb_tipopago = null;
public String _itemselect = "";
public b4a.example.dateutils _dateutils = null;
public reparto_izca.keymon.lat.main _main = null;
public reparto_izca.keymon.lat.appupdater _appupdater = null;
public reparto_izca.keymon.lat.foto _foto = null;
public reparto_izca.keymon.lat.mapa_cliente _mapa_cliente = null;
public reparto_izca.keymon.lat.mapa_rutas _mapa_rutas = null;
public reparto_izca.keymon.lat.starter _starter = null;
public reparto_izca.keymon.lat.subs _subs = null;
public reparto_izca.keymon.lat.tracker _tracker = null;
public reparto_izca.keymon.lat.newinst2 _newinst2 = null;
public reparto_izca.keymon.lat.b4xpages _b4xpages = null;
public reparto_izca.keymon.lat.b4xcollections _b4xcollections = null;
public reparto_izca.keymon.lat.httputils2service _httputils2service = null;
public reparto_izca.keymon.lat.xuiviewsutils _xuiviewsutils = null;
public String  _activity_pause(boolean _userclosed) throws Exception{
 //BA.debugLineNum = 341;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
 //BA.debugLineNum = 343;BA.debugLine="End Sub";
return "";
}
public void  _b_abono_click() throws Exception{
ResumableSub_b_abono_Click rsub = new ResumableSub_b_abono_Click(this);
rsub.resume(ba, null);
}
public static class ResumableSub_b_abono_Click extends BA.ResumableSub {
public ResumableSub_b_abono_Click(reparto_izca.keymon.lat.c_cliente parent) {
this.parent = parent;
}
reparto_izca.keymon.lat.c_cliente parent;
anywheresoftware.b4a.sql.SQL.CursorWrapper _con = null;
int _consecutivo = 0;
int _i = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _d5 = null;
int _resultado = 0;
int step10;
int limit10;

@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 = 1265;BA.debugLine="If et_abono.Text <> \"\" Then";
if (true) break;

case 1:
//if
this.state = 28;
if ((parent._et_abono.getText()).equals("") == false) { 
this.state = 3;
}if (true) break;

case 3:
//C
this.state = 4;
 //BA.debugLineNum = 1266;BA.debugLine="If et_abono.text > l_montoabonostotal.text Then";
if (true) break;

case 4:
//if
this.state = 27;
if ((double)(Double.parseDouble(parent._et_abono.getText()))>(double)(Double.parseDouble(parent._l_montoabonostotal.getText()))) { 
this.state = 6;
}else {
this.state = 8;
}if (true) break;

case 6:
//C
this.state = 27;
 //BA.debugLineNum = 1267;BA.debugLine="MsgboxAsync(\"El monto a abonar no puede ser may";
parent.__c.MsgboxAsync(BA.ObjectToCharSequence("El monto a abonar no puede ser mayor que el monto total"),BA.ObjectToCharSequence("Atención"),ba);
 if (true) break;

case 8:
//C
this.state = 9;
 //BA.debugLineNum = 1269;BA.debugLine="If et_abono.Text <> \"\" And et_abono.Text > 0 Th";
if (true) break;

case 9:
//if
this.state = 26;
if ((parent._et_abono.getText()).equals("") == false && (double)(Double.parseDouble(parent._et_abono.getText()))>0) { 
this.state = 11;
}if (true) break;

case 11:
//C
this.state = 12;
 //BA.debugLineNum = 1270;BA.debugLine="If itemselect <> \"SELECCIONA UNA OPCION\" Then";
if (true) break;

case 12:
//if
this.state = 25;
if ((parent._itemselect).equals("SELECCIONA UNA OPCION") == false) { 
this.state = 14;
}else {
this.state = 24;
}if (true) break;

case 14:
//C
this.state = 15;
 //BA.debugLineNum = 1280;BA.debugLine="Dim con As Cursor = Starter.skmt.ExecQuery(\"S";
_con = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_con = (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 ABONOS WHERE a_cliente in (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 1281;BA.debugLine="Private consecutivo As Int = con.RowCount +1";
_consecutivo = (int) (_con.getRowCount()+1);
 //BA.debugLineNum = 1283;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT NOTA, SALD";
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 NOTA, SALDO_PENDIENTE FROM ABONOSP WHERE CLIENTE in (SELECT CUENTA FROM CUENTAA) AND SALDO_PENDIENTE <> 0")));
 //BA.debugLineNum = 1285;BA.debugLine="For i = 0 To d.RowCount - 1";
if (true) break;

case 15:
//for
this.state = 18;
step10 = 1;
limit10 = (int) (parent._d.getRowCount()-1);
_i = (int) (0) ;
this.state = 29;
if (true) break;

case 29:
//C
this.state = 18;
if ((step10 > 0 && _i <= limit10) || (step10 < 0 && _i >= limit10)) this.state = 17;
if (true) break;

case 30:
//C
this.state = 29;
_i = ((int)(0 + _i + step10)) ;
if (true) break;

case 17:
//C
this.state = 30;
 //BA.debugLineNum = 1286;BA.debugLine="d.Position = i";
parent._d.setPosition(_i);
 //BA.debugLineNum = 1287;BA.debugLine="Log(d.GetString(\"NOTA\"))";
parent.__c.LogImpl("59895960",parent._d.GetString("NOTA"),0);
 //BA.debugLineNum = 1288;BA.debugLine="Log(d.GetString(\"SALDO_PENDIENTE\"))";
parent.__c.LogImpl("59895961",parent._d.GetString("SALDO_PENDIENTE"),0);
 if (true) break;
if (true) break;

case 18:
//C
this.state = 19;
;
 //BA.debugLineNum = 1293;BA.debugLine="Dim d5 As Cursor= Starter.skmt.ExecQuery(\"SEL";
_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 RUTAA FROM RUTAA")));
 //BA.debugLineNum = 1295;BA.debugLine="d5.Position = 0";
_d5.setPosition((int) (0));
 //BA.debugLineNum = 1301;BA.debugLine="Msgbox2Async($\"¿Seguro que quieres realizar u";
parent.__c.Msgbox2Async(BA.ObjectToCharSequence(("¿Seguro que quieres realizar un abono de $"+parent.__c.SmartStringFormatter("",(Object)(parent._et_abono.getText()))+" para este cliente?")),BA.ObjectToCharSequence("Guardar Abono"),"Guardar","Cancelar","",(anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper(), (android.graphics.Bitmap)(parent.__c.Null)),ba,parent.__c.True);
 //BA.debugLineNum = 1302;BA.debugLine="Wait For Msgbox_Result (resultado As Int)";
parent.__c.WaitFor("msgbox_result", ba, this, null);
this.state = 31;
return;
case 31:
//C
this.state = 19;
_resultado = (Integer) result[0];
;
 //BA.debugLineNum = 1303;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
if (true) break;

case 19:
//if
this.state = 22;
if (_resultado==parent.__c.DialogResponse.POSITIVE) { 
this.state = 21;
}if (true) break;

case 21:
//C
this.state = 22;
 //BA.debugLineNum = 1304;BA.debugLine="p_abono.Visible = False";
parent._p_abono.setVisible(parent.__c.False);
 //BA.debugLineNum = 1305;BA.debugLine="Starter.skmt.ExecNonQuery($\"INSERT INTO ABON";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("INSERT INTO ABONOS(a_usuario, a_ruta, a_cliente, a_abono, a_fecha, TIPO_PAGO, CONSECUTIVO, NUM_TICKET, RUTA_REP) VALUES ('"+parent.__c.SmartStringFormatter("",(Object)(parent._subs._traeusuariodebd /*String*/ (ba)))+"', '"+parent.__c.SmartStringFormatter("",(Object)(parent._subs._traeruta /*String*/ (ba,parent._subs._traecliente /*String*/ (ba))))+"', '"+parent.__c.SmartStringFormatter("",(Object)(parent._subs._traecliente /*String*/ (ba)))+"' ,'"+parent.__c.SmartStringFormatter("",(Object)(parent._et_abono.getText()))+"', '"+parent.__c.SmartStringFormatter("",(Object)(parent._subs._fechakmt /*String*/ (ba,BA.NumberToString(parent.__c.DateTime.getNow()))))+"', '"+parent.__c.SmartStringFormatter("",(Object)(parent._itemselect))+"', '"+parent.__c.SmartStringFormatter("",(Object)(_consecutivo))+"', '"+parent.__c.SmartStringFormatter("",(Object)(parent._d.GetString("NOTA")))+"' , '"+parent.__c.SmartStringFormatter("",(Object)(_d5.GetString("RUTAA")))+"')"));
 //BA.debugLineNum = 1306;BA.debugLine="ToastMessageShow(\"Abono guardado\", False)";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Abono guardado"),parent.__c.False);
 if (true) break;

case 22:
//C
this.state = 25;
;
 //BA.debugLineNum = 1322;BA.debugLine="d.Close";
parent._d.Close();
 //BA.debugLineNum = 1323;BA.debugLine="d5.Close";
_d5.Close();
 if (true) break;

case 24:
//C
this.state = 25;
 //BA.debugLineNum = 1325;BA.debugLine="MsgboxAsync(\"Por favor selecciona un metodo d";
parent.__c.MsgboxAsync(BA.ObjectToCharSequence("Por favor selecciona un metodo de pago"),BA.ObjectToCharSequence("Atención"),ba);
 if (true) break;

case 25:
//C
this.state = 26;
;
 if (true) break;

case 26:
//C
this.state = 27;
;
 if (true) break;

case 27:
//C
this.state = 28;
;
 if (true) break;

case 28:
//C
this.state = -1;
;
 //BA.debugLineNum = 1330;BA.debugLine="ime.HideKeyboard";
parent._ime.HideKeyboard(ba);
 //BA.debugLineNum = 1331;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public void  _msgbox_result(int _resultado) throws Exception{
}
public String  _b_acred_click() throws Exception{
 //BA.debugLineNum = 994;BA.debugLine="Private Sub b_acred_Click";
 //BA.debugLineNum = 995;BA.debugLine="If et_montoacredito.Text > l_total.Text Then";
if ((double)(Double.parseDouble(_et_montoacredito.getText()))>(double)(Double.parseDouble(_l_total.getText()))) { 
 //BA.debugLineNum = 996;BA.debugLine="MsgboxAsync(\"El monto del pagare no puede ser ma";
__c.MsgboxAsync(BA.ObjectToCharSequence("El monto del pagare no puede ser mayor a la venta"),BA.ObjectToCharSequence("Atención"),ba);
 }else {
 //BA.debugLineNum = 998;BA.debugLine="DateTime.DateFormat = \"dd/MM/yyyy\"";
__c.DateTime.setDateFormat("dd/MM/yyyy");
 //BA.debugLineNum = 999;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 1000;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 1001;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 1003;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CUENTA from cue";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CUENTA from cuentaa")));
 //BA.debugLineNum = 1004;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1005;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
_cuenta = _c.GetString("CUENTA");
 //BA.debugLineNum = 1006;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1008;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 = 1009;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1010;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 1011;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1013;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 = 1014;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1015;BA.debugLine="almacen = c.GetString(\"ID_ALMACEN\")";
_almacen = _c.GetString("ID_ALMACEN");
 //BA.debugLineNum = 1016;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1018;BA.debugLine="c=Starter.skmt.ExecQuery(\"select HVD_FECHA 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 HVD_FECHA from HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 1019;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1020;BA.debugLine="fechaprev = c.GetString(\"HVD_FECHA\")";
_fechaprev = _c.GetString("HVD_FECHA");
 //BA.debugLineNum = 1021;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1023;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CAT_CL_RUTA fro";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_RUTA from kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 1024;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1025;BA.debugLine="rutaprev = c.GetString(\"CAT_CL_RUTA\")";
_rutaprev = _c.GetString("CAT_CL_RUTA");
 //BA.debugLineNum = 1026;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1028;BA.debugLine="c=Starter.skmt.ExecQuery(\"select RUTAA from RUTA";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select RUTAA from RUTAA")));
 //BA.debugLineNum = 1029;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1030;BA.debugLine="rutarep = c.GetString(\"RUTAA\")";
_rutarep = _c.GetString("RUTAA");
 //BA.debugLineNum = 1031;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1032;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO  PAGARES";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO  PAGARES (PA_ALMACEN, PA_RUTA_REP, PA_RUTAPREV, PA_FECHA_PREV, PA_CAPTURA, PA_MONTO, PA_USUARIO, PA_CLIENTE) VALUES(?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_almacen),(Object)(_rutarep),(Object)(_rutaprev),(Object)(_fechaprev),(Object)((_sdate)),(Object)(_et_montoacredito.getText()),(Object)(_usuario),(Object)(_cuenta)}));
 //BA.debugLineNum = 1033;BA.debugLine="et_montoacredito.Text = \"\"";
_et_montoacredito.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 1034;BA.debugLine="p_credito.Visible = False";
_p_credito.setVisible(__c.False);
 //BA.debugLineNum = 1035;BA.debugLine="Guardado";
_guardado();
 };
 //BA.debugLineNum = 1037;BA.debugLine="End Sub";
return "";
}
public String  _b_cancelar_click() throws Exception{
 //BA.debugLineNum = 1214;BA.debugLine="Private Sub b_cancelar_Click";
 //BA.debugLineNum = 1215;BA.debugLine="et_abono.Text = \"\"";
_et_abono.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 1216;BA.debugLine="p_abono.Visible = False";
_p_abono.setVisible(__c.False);
 //BA.debugLineNum = 1217;BA.debugLine="ime.HideKeyboard";
_ime.HideKeyboard(ba);
 //BA.debugLineNum = 1218;BA.debugLine="End Sub";
return "";
}
public String  _b_cancred_click() throws Exception{
 //BA.debugLineNum = 1039;BA.debugLine="Private Sub b_cancred_Click";
 //BA.debugLineNum = 1040;BA.debugLine="et_montoacredito.Text = \"\"";
_et_montoacredito.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 1041;BA.debugLine="p_credito.Visible = False";
_p_credito.setVisible(__c.False);
 //BA.debugLineNum = 1042;BA.debugLine="End Sub";
return "";
}
public String  _b_cxc_click() throws Exception{
anywheresoftware.b4a.objects.collections.List _items = null;
double _total = 0;
int _i = 0;
 //BA.debugLineNum = 1106;BA.debugLine="Private Sub b_cxc_Click";
 //BA.debugLineNum = 1107;BA.debugLine="h = Starter.skmt.ExecQuery(\"SELECT CUENTA from CU";
_h = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT CUENTA from CUENTAA")));
 //BA.debugLineNum = 1108;BA.debugLine="h.Position = 0";
_h.setPosition((int) (0));
 //BA.debugLineNum = 1109;BA.debugLine="Log(h.GetString(\"CUENTA\"))";
__c.LogImpl("59633795",_h.GetString("CUENTA"),0);
 //BA.debugLineNum = 1112;BA.debugLine="Dim Items As List";
_items = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 1113;BA.debugLine="Items.Initialize";
_items.Initialize();
 //BA.debugLineNum = 1115;BA.debugLine="Items.Add(\"SELECCIONA UNA OPCION\")";
_items.Add((Object)("SELECCIONA UNA OPCION"));
 //BA.debugLineNum = 1116;BA.debugLine="Items.Add(\"TRANSFERENCIA\")";
_items.Add((Object)("TRANSFERENCIA"));
 //BA.debugLineNum = 1117;BA.debugLine="Items.Add(\"EFECTIVO\")";
_items.Add((Object)("EFECTIVO"));
 //BA.debugLineNum = 1118;BA.debugLine="Items.Add(\"CHEQUE\")";
_items.Add((Object)("CHEQUE"));
 //BA.debugLineNum = 1120;BA.debugLine="cb_tipopago.SetItems(Items)";
_cb_tipopago._setitems /*String*/ (_items);
 //BA.debugLineNum = 1122;BA.debugLine="itemselect= \"SELECCIONA UNA OPCION\"";
_itemselect = "SELECCIONA UNA OPCION";
 //BA.debugLineNum = 1124;BA.debugLine="j = Starter.skmt.ExecQuery2(\"SELECT a_abono FROM";
_j = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT a_abono FROM ABONOS WHERE a_cliente = ?",new String[]{_h.GetString("CUENTA")})));
 //BA.debugLineNum = 1125;BA.debugLine="j.position = 0";
_j.setPosition((int) (0));
 //BA.debugLineNum = 1126;BA.debugLine="Log(j.RowCount)";
__c.LogImpl("59633812",BA.NumberToString(_j.getRowCount()),0);
 //BA.debugLineNum = 1127;BA.debugLine="If j.RowCount = 0 Then";
if (_j.getRowCount()==0) { 
 //BA.debugLineNum = 1128;BA.debugLine="p_abono.Visible = True";
_p_abono.setVisible(__c.True);
 //BA.debugLineNum = 1129;BA.debugLine="p_abono.Height = Root.Height";
_p_abono.setHeight(_root.getHeight());
 //BA.debugLineNum = 1130;BA.debugLine="p_abono.Width = Root.Width";
_p_abono.setWidth(_root.getWidth());
 //BA.debugLineNum = 1131;BA.debugLine="et_abono.text = \"\"";
_et_abono.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 1132;BA.debugLine="Dim total As Double = 0";
_total = 0;
 //BA.debugLineNum = 1133;BA.debugLine="f = Starter.skmt.ExecQuery(\"SELECT CUENTA FROM C";
_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 CUENTA FROM CUENTAA")));
 //BA.debugLineNum = 1134;BA.debugLine="f.Position = 0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 1135;BA.debugLine="d = Starter.skmt.ExecQuery2(\"SELECT NOTA, SALDO_";
_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*/ .ExecQuery2("SELECT NOTA, SALDO_PENDIENTE FROM ABONOSP WHERE CLIENTE = ? AND SALDO_PENDIENTE <> 0",new String[]{_f.GetString("CUENTA")})));
 //BA.debugLineNum = 1136;BA.debugLine="clv_abonos.Clear";
_clv_abonos._clear();
 //BA.debugLineNum = 1137;BA.debugLine="For i = 0 To d.RowCount - 1";
{
final int step25 = 1;
final int limit25 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit25 ;_i = _i + step25 ) {
 //BA.debugLineNum = 1138;BA.debugLine="d.Position = i";
_d.setPosition(_i);
 //BA.debugLineNum = 1139;BA.debugLine="clv_abonos.Add(CreateListItem(d.GetString(\"NOTA";
_clv_abonos._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_createlistitem(_d.GetString("NOTA"),"$ "+_d.GetString("SALDO_PENDIENTE")).getObject())),(Object)(_i));
 //BA.debugLineNum = 1140;BA.debugLine="Log(d.GetString(\"NOTA\"))";
__c.LogImpl("59633826",_d.GetString("NOTA"),0);
 //BA.debugLineNum = 1141;BA.debugLine="Log(d.GetString(\"SALDO_PENDIENTE\"))";
__c.LogImpl("59633827",_d.GetString("SALDO_PENDIENTE"),0);
 //BA.debugLineNum = 1142;BA.debugLine="total = total + d.GetString(\"SALDO_PENDIENTE\")";
_total = _total+(double)(Double.parseDouble(_d.GetString("SALDO_PENDIENTE")));
 //BA.debugLineNum = 1143;BA.debugLine="Log(total)";
__c.LogImpl("59633829",BA.NumberToString(_total),0);
 }
};
 //BA.debugLineNum = 1145;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1146;BA.debugLine="d = Starter.skmt.ExecQuery2(\"SELECT  a_abono FRO";
_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*/ .ExecQuery2("SELECT  a_abono FROM ABONOS WHERE a_cliente = ? ",new String[]{_f.GetString("CUENTA")})));
 //BA.debugLineNum = 1147;BA.debugLine="If d.RowCount > 0 Then";
if (_d.getRowCount()>0) { 
 //BA.debugLineNum = 1148;BA.debugLine="For i = 0 To d.RowCount - 1";
{
final int step36 = 1;
final int limit36 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit36 ;_i = _i + step36 ) {
 //BA.debugLineNum = 1149;BA.debugLine="d.Position = i";
_d.setPosition(_i);
 //BA.debugLineNum = 1150;BA.debugLine="clv_abonos.Add(CreateListItem(\"ABONO\",\"$ \" & d";
_clv_abonos._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_createlistitem("ABONO","$ "+_d.GetString("a_abono")).getObject())),(Object)(_i));
 //BA.debugLineNum = 1151;BA.debugLine="total = total - d.GetString(\"a_abono\")";
_total = _total-(double)(Double.parseDouble(_d.GetString("a_abono")));
 //BA.debugLineNum = 1152;BA.debugLine="Log(total)";
__c.LogImpl("59633838",BA.NumberToString(_total),0);
 }
};
 };
 //BA.debugLineNum = 1155;BA.debugLine="l_montoabonostotal.Text = NumberFormat2(total,0,";
_l_montoabonostotal.setText(BA.ObjectToCharSequence(__c.NumberFormat2(_total,(int) (0),(int) (2),(int) (2),__c.False)));
 //BA.debugLineNum = 1156;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1157;BA.debugLine="f.Close";
_f.Close();
 }else if(_j.getRowCount()>0) { 
 //BA.debugLineNum = 1159;BA.debugLine="p_abono.Visible = True";
_p_abono.setVisible(__c.True);
 //BA.debugLineNum = 1160;BA.debugLine="p_abono.Height = Root.Height";
_p_abono.setHeight(_root.getHeight());
 //BA.debugLineNum = 1161;BA.debugLine="p_abono.Width = Root.Width";
_p_abono.setWidth(_root.getWidth());
 //BA.debugLineNum = 1162;BA.debugLine="et_abono.text = \"\"";
_et_abono.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 1163;BA.debugLine="Dim total As Double = 0";
_total = 0;
 //BA.debugLineNum = 1164;BA.debugLine="f = Starter.skmt.ExecQuery(\"SELECT CUENTA FROM C";
_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 CUENTA FROM CUENTAA")));
 //BA.debugLineNum = 1165;BA.debugLine="f.Position = 0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 1166;BA.debugLine="d = Starter.skmt.ExecQuery2(\"SELECT NOTA, SALDO_";
_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*/ .ExecQuery2("SELECT NOTA, SALDO_PENDIENTE FROM ABONOSP WHERE CLIENTE = ? AND SALDO_PENDIENTE <> 0",new String[]{_f.GetString("CUENTA")})));
 //BA.debugLineNum = 1167;BA.debugLine="clv_abonos.Clear";
_clv_abonos._clear();
 //BA.debugLineNum = 1168;BA.debugLine="For i = 0 To d.RowCount - 1";
{
final int step56 = 1;
final int limit56 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit56 ;_i = _i + step56 ) {
 //BA.debugLineNum = 1169;BA.debugLine="d.Position = i";
_d.setPosition(_i);
 //BA.debugLineNum = 1170;BA.debugLine="clv_abonos.Add(CreateListItem(d.GetString(\"NOTA";
_clv_abonos._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_createlistitem(_d.GetString("NOTA"),"$ "+_d.GetString("SALDO_PENDIENTE")).getObject())),(Object)(_i));
 //BA.debugLineNum = 1171;BA.debugLine="Log(d.GetString(\"NOTA\"))";
__c.LogImpl("59633857",_d.GetString("NOTA"),0);
 //BA.debugLineNum = 1172;BA.debugLine="Log(d.GetString(\"SALDO_PENDIENTE\"))";
__c.LogImpl("59633858",_d.GetString("SALDO_PENDIENTE"),0);
 //BA.debugLineNum = 1173;BA.debugLine="total = total + d.GetString(\"SALDO_PENDIENTE\")";
_total = _total+(double)(Double.parseDouble(_d.GetString("SALDO_PENDIENTE")));
 //BA.debugLineNum = 1174;BA.debugLine="Log(total)";
__c.LogImpl("59633860",BA.NumberToString(_total),0);
 }
};
 //BA.debugLineNum = 1176;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1177;BA.debugLine="d = Starter.skmt.ExecQuery2(\"SELECT  a_abono FRO";
_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*/ .ExecQuery2("SELECT  a_abono FROM ABONOS WHERE a_cliente = ? ",new String[]{_f.GetString("CUENTA")})));
 //BA.debugLineNum = 1178;BA.debugLine="If d.RowCount > 0 Then";
if (_d.getRowCount()>0) { 
 //BA.debugLineNum = 1179;BA.debugLine="For i = 0 To d.RowCount - 1";
{
final int step67 = 1;
final int limit67 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit67 ;_i = _i + step67 ) {
 //BA.debugLineNum = 1180;BA.debugLine="d.Position = i";
_d.setPosition(_i);
 //BA.debugLineNum = 1181;BA.debugLine="clv_abonos.Add(CreateListItem(\"ABONO\",\"$ \" & d";
_clv_abonos._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_createlistitem("ABONO","$ "+_d.GetString("a_abono")).getObject())),(Object)(_i));
 //BA.debugLineNum = 1182;BA.debugLine="total = total - d.GetString(\"a_abono\")";
_total = _total-(double)(Double.parseDouble(_d.GetString("a_abono")));
 //BA.debugLineNum = 1183;BA.debugLine="Log(total)";
__c.LogImpl("59633869",BA.NumberToString(_total),0);
 }
};
 };
 //BA.debugLineNum = 1186;BA.debugLine="l_montoabonostotal.Text = NumberFormat2(total,0,";
_l_montoabonostotal.setText(BA.ObjectToCharSequence(__c.NumberFormat2(_total,(int) (0),(int) (2),(int) (2),__c.False)));
 //BA.debugLineNum = 1187;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1188;BA.debugLine="f.Close";
_f.Close();
 };
 //BA.debugLineNum = 1191;BA.debugLine="h.Close";
_h.Close();
 //BA.debugLineNum = 1192;BA.debugLine="j.Close";
_j.Close();
 //BA.debugLineNum = 1193;BA.debugLine="End Sub";
return "";
}
public void  _b_imp_click() throws Exception{
ResumableSub_B_IMP_Click rsub = new ResumableSub_B_IMP_Click(this);
rsub.resume(ba, null);
}
public static class ResumableSub_B_IMP_Click extends BA.ResumableSub {
public ResumableSub_B_IMP_Click(reparto_izca.keymon.lat.c_cliente parent) {
this.parent = parent;
}
reparto_izca.keymon.lat.c_cliente parent;
int _cont = 0;
int _i = 0;
String _punit = "";
String _ptot = "";
int _e = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc5 = null;
int _resultado = 0;
int step53;
int limit53;
int step65;
int limit65;
int step88;
int limit88;
int step114;
int limit114;
int step129;
int limit129;
int step154;
int limit154;
int step164;
int limit164;

@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 = 552;BA.debugLine="c=Starter.skmt.ExecQuery(\"select USUARIO from usu";
parent._c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
 //BA.debugLineNum = 553;BA.debugLine="c.Position=0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 554;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
parent._usuario = parent._c.GetString("USUARIO");
 //BA.debugLineNum = 556;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
parent.__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 557;BA.debugLine="DateTime.TimeFormat=\"HH:mm:ss\"";
parent.__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 558;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
parent._sdate = parent.__c.DateTime.Date(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 559;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
parent._stime = parent.__c.DateTime.Time(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 560;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 566;BA.debugLine="ProgressDialogShow(\"Imprimiendo, un momento ...\")";
parent.__c.ProgressDialogShow(ba,BA.ObjectToCharSequence("Imprimiendo, un momento ..."));
 //BA.debugLineNum = 567;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 568;BA.debugLine="If Not(Printer1.IsConnected) Then";
if (true) break;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

case 38:
//C
this.state = 39;
;
 //BA.debugLineNum = 596;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 597;BA.debugLine="ESPACIO = 28";
parent._espacio = (int) (28);
 //BA.debugLineNum = 598;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 615;BA.debugLine="Printer1.WriteString(\"Izca Distribuciones\" &  CRL";
parent._printer1._writestring /*String*/ ("Izca Distribuciones"+parent.__c.CRLF);
 //BA.debugLineNum = 617;BA.debugLine="Printer1.WriteString(sDate &  CRLF)";
parent._printer1._writestring /*String*/ (parent._sdate+parent.__c.CRLF);
 //BA.debugLineNum = 618;BA.debugLine="Printer1.WriteString(sTime &  CRLF)";
parent._printer1._writestring /*String*/ (parent._stime+parent.__c.CRLF);
 //BA.debugLineNum = 619;BA.debugLine="Printer1.WriteString(\"Vendedor:\" & usuario &  CRL";
parent._printer1._writestring /*String*/ ("Vendedor:"+parent._usuario+parent.__c.CRLF);
 //BA.debugLineNum = 620;BA.debugLine="Printer1.WriteString(\"Tienda: \" & La_nombre.Text";
parent._printer1._writestring /*String*/ ("Tienda: "+parent._la_nombre.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 621;BA.debugLine="Printer1.WriteString(\"ID.Cliente: \" &  la_cuenta.";
parent._printer1._writestring /*String*/ ("ID.Cliente: "+parent._la_cuenta.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 622;BA.debugLine="Printer1.WriteString(\"Calle: \" & la_Calle.Text &";
parent._printer1._writestring /*String*/ ("Calle: "+parent._la_calle.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 623;BA.debugLine="Printer1.WriteString(\"Colonia: \" & la_col.Text &";
parent._printer1._writestring /*String*/ ("Colonia: "+parent._la_col.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 627;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 628;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT * FROM HIST_VE";
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 HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 629;BA.debugLine="If c.RowCount > 0 Then";
if (true) break;

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

case 41:
//C
this.state = 42;
 //BA.debugLineNum = 630;BA.debugLine="Printer1.WriteString(\"------------ENTREGA-------";
parent._printer1._writestring /*String*/ ("------------ENTREGA-----------"+parent.__c.CRLF);
 //BA.debugLineNum = 633;BA.debugLine="Printer1.WriteString(\"Cant.      Precio        I";
parent._printer1._writestring /*String*/ ("Cant.      Precio        Importe"+parent.__c.CRLF);
 //BA.debugLineNum = 635;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 637;BA.debugLine="s=Starter.skmt.ExecQuery($\"select HVD_PRONOMBRE,";
parent._s = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select HVD_PRONOMBRE, HVD_CANT, length(HVD_CANT) as L_CANT, HVD_COSTO_TOT, length(HVD_COSTO_TOT) as L_COSTOU,HVD_PROID, HVD_CODPROMO,IFNULL(HVD_RECHAZOCANT,0) AS HVD_RECHAZOCANT, HVD_RECHAZO FROM HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) order by  HVD_PROID"))));
 //BA.debugLineNum = 638;BA.debugLine="If S.RowCount>0 Then";
if (true) break;

case 42:
//if
this.state = 67;
if (parent._s.getRowCount()>0) { 
this.state = 44;
}if (true) break;

case 44:
//C
this.state = 45;
 //BA.debugLineNum = 639;BA.debugLine="For i=0 To S.RowCount -1";
if (true) break;

case 45:
//for
this.state = 66;
step53 = 1;
limit53 = (int) (parent._s.getRowCount()-1);
_i = (int) (0) ;
this.state = 129;
if (true) break;

case 129:
//C
this.state = 66;
if ((step53 > 0 && _i <= limit53) || (step53 < 0 && _i >= limit53)) this.state = 47;
if (true) break;

case 130:
//C
this.state = 129;
_i = ((int)(0 + _i + step53)) ;
if (true) break;

case 47:
//C
this.state = 48;
 //BA.debugLineNum = 640;BA.debugLine="S.Position=i";
parent._s.setPosition(_i);
 //BA.debugLineNum = 641;BA.debugLine="Log(s.GetString(\"HVD_RECHAZO\"))";
parent.__c.LogImpl("58912986",parent._s.GetString("HVD_RECHAZO"),0);
 //BA.debugLineNum = 642;BA.debugLine="If s.GetString(\"HVD_CANT\") - s.GetString(\"HVD_";
if (true) break;

case 48:
//if
this.state = 65;
if ((double)(Double.parseDouble(parent._s.GetString("HVD_CANT")))-(double)(Double.parseDouble(parent._s.GetString("HVD_RECHAZOCANT")))>0) { 
this.state = 50;
}if (true) break;

case 50:
//C
this.state = 51;
 //BA.debugLineNum = 645;BA.debugLine="If s.GetString(\"HVD_CODPROMO\") = Subs.traeAlm";
if (true) break;

case 51:
//if
this.state = 64;
if ((parent._s.GetString("HVD_CODPROMO")).equals(parent._subs._traealmacen /*String*/ (ba))) { 
this.state = 53;
}else if((parent._s.GetString("HVD_RECHAZO")).equals(BA.NumberToString(1))) { 
this.state = 59;
}if (true) break;

case 53:
//C
this.state = 54;
 //BA.debugLineNum = 647;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 648;BA.debugLine="Printer1.WriteString(s.GetString(\"HVD_PRONOM";
parent._printer1._writestring /*String*/ (parent._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 651;BA.debugLine="Dim punit As String = NumberFormat2((s.GETST";
_punit = parent.__c.NumberFormat2(((double)(Double.parseDouble(parent._s.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(parent._s.GetString("HVD_CANT")))),(int) (0),(int) (2),(int) (2),parent.__c.False);
 //BA.debugLineNum = 652;BA.debugLine="TAMANO = punit.Length + TAMANO";
parent._tamano = (int) (_punit.length()+parent._tamano);
 //BA.debugLineNum = 655;BA.debugLine="Private ptot As String = NumberFormat2(( (s.";
_ptot = parent.__c.NumberFormat2((((double)(Double.parseDouble(parent._s.GetString("HVD_CANT")))-(double)(Double.parseDouble(parent._s.GetString("HVD_RECHAZOCANT"))))*(double)(Double.parseDouble(_punit))),(int) (0),(int) (2),(int) (2),parent.__c.False);
 //BA.debugLineNum = 656;BA.debugLine="TAMANO = ptot.Length + TAMANO";
parent._tamano = (int) (_ptot.length()+parent._tamano);
 //BA.debugLineNum = 658;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 660;BA.debugLine="For E=0 To ESPACIO -1";
if (true) break;

case 54:
//for
this.state = 57;
step65 = 1;
limit65 = (int) (parent._espacio-1);
_e = (int) (0) ;
this.state = 131;
if (true) break;

case 131:
//C
this.state = 57;
if ((step65 > 0 && _e <= limit65) || (step65 < 0 && _e >= limit65)) this.state = 56;
if (true) break;

case 132:
//C
this.state = 131;
_e = ((int)(0 + _e + step65)) ;
if (true) break;

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

case 57:
//C
this.state = 64;
;
 //BA.debugLineNum = 663;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 664;BA.debugLine="Printer1.WriteString( (s.GetString(\"HVD_CANT";
parent._printer1._writestring /*String*/ (BA.NumberToString(((double)(Double.parseDouble(parent._s.GetString("HVD_CANT")))-(double)(Double.parseDouble(parent._s.GetString("HVD_RECHAZOCANT")))))+parent._blanco);
 //BA.debugLineNum = 665;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 666;BA.debugLine="Printer1.WriteString( punit & BLANCO)";
parent._printer1._writestring /*String*/ (_punit+parent._blanco);
 //BA.debugLineNum = 667;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 668;BA.debugLine="Printer1.WriteString( ptot &  CRLF )";
parent._printer1._writestring /*String*/ (_ptot+parent.__c.CRLF);
 //BA.debugLineNum = 669;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 670;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 671;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 if (true) break;

case 59:
//C
this.state = 60;
 //BA.debugLineNum = 675;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 676;BA.debugLine="Printer1.WriteString(s.GetString(\"HVD_PRONOM";
parent._printer1._writestring /*String*/ (parent._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 678;BA.debugLine="Private vc5 As Cursor = Starter.skmt.ExecQue";
_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)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select iFNULL(CAT_GP_PRECIO,0) AS CAT_GP_PRECIO from CAT_GUNAPROD where CAT_GP_ID = '"+parent.__c.SmartStringFormatter("",(Object)(parent._s.GetString("HVD_PROID")))+"'"))));
 //BA.debugLineNum = 679;BA.debugLine="vc5.Position = 0";
_vc5.setPosition((int) (0));
 //BA.debugLineNum = 680;BA.debugLine="Dim punit As String = NumberFormat2((vc5.Get";
_punit = parent.__c.NumberFormat2((double)(Double.parseDouble((_vc5.GetString("CAT_GP_PRECIO")))),(int) (0),(int) (2),(int) (2),parent.__c.False);
 //BA.debugLineNum = 681;BA.debugLine="TAMANO = punit.Length + TAMANO";
parent._tamano = (int) (_punit.length()+parent._tamano);
 //BA.debugLineNum = 682;BA.debugLine="vc5.Close";
_vc5.Close();
 //BA.debugLineNum = 684;BA.debugLine="Private ptot As String = NumberFormat2(( (s.";
_ptot = parent.__c.NumberFormat2((((double)(Double.parseDouble(parent._s.GetString("HVD_CANT")))-(double)(Double.parseDouble(parent._s.GetString("HVD_RECHAZOCANT"))))*(double)(Double.parseDouble(_punit))),(int) (0),(int) (2),(int) (2),parent.__c.False);
 //BA.debugLineNum = 685;BA.debugLine="TAMANO = ptot.Length + TAMANO";
parent._tamano = (int) (_ptot.length()+parent._tamano);
 //BA.debugLineNum = 687;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 689;BA.debugLine="For E=0 To ESPACIO -1";
if (true) break;

case 60:
//for
this.state = 63;
step88 = 1;
limit88 = (int) (parent._espacio-1);
_e = (int) (0) ;
this.state = 133;
if (true) break;

case 133:
//C
this.state = 63;
if ((step88 > 0 && _e <= limit88) || (step88 < 0 && _e >= limit88)) this.state = 62;
if (true) break;

case 134:
//C
this.state = 133;
_e = ((int)(0 + _e + step88)) ;
if (true) break;

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

case 63:
//C
this.state = 64;
;
 //BA.debugLineNum = 692;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 693;BA.debugLine="Printer1.WriteString( (s.GetString(\"HVD_CANT";
parent._printer1._writestring /*String*/ (BA.NumberToString(((double)(Double.parseDouble(parent._s.GetString("HVD_CANT")))-(double)(Double.parseDouble(parent._s.GetString("HVD_RECHAZOCANT")))))+parent._blanco);
 //BA.debugLineNum = 694;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 695;BA.debugLine="Printer1.WriteString( punit & BLANCO)";
parent._printer1._writestring /*String*/ (_punit+parent._blanco);
 //BA.debugLineNum = 696;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 697;BA.debugLine="Printer1.WriteString(ptot&  CRLF )";
parent._printer1._writestring /*String*/ (_ptot+parent.__c.CRLF);
 //BA.debugLineNum = 698;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 699;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 700;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 701;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 if (true) break;

case 64:
//C
this.state = 65;
;
 if (true) break;

case 65:
//C
this.state = 130;
;
 if (true) break;
if (true) break;

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

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

case 68:
//C
this.state = 69;
;
 //BA.debugLineNum = 707;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 708;BA.debugLine="s.Close";
parent._s.Close();
 //BA.debugLineNum = 709;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 710;BA.debugLine="s=Starter.skmt.ExecQuery($\"select HVD_PRONOMBRE,";
parent._s = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select HVD_PRONOMBRE, HVD_CANT, length(HVD_CANT) as L_CANT, HVD_COSTO_TOT, length(HVD_COSTO_TOT) as L_COSTOU,HVD_PROID, HVD_CODPROMO,IFNULL(HVD_RECHAZOCANT,0) AS HVD_RECHAZOCANT FROM HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) AND HVD_RECHAZO = 0 AND HVD_CODPROMO <> '"+parent.__c.SmartStringFormatter("",(Object)(parent._subs._traealmacen /*String*/ (ba)))+"' order by  HVD_CODPROMO, ESPROMO DESC, HVD_PROID"))));
 //BA.debugLineNum = 712;BA.debugLine="If S.RowCount>0 Then";
if (true) break;

case 69:
//if
this.state = 96;
if (parent._s.getRowCount()>0) { 
this.state = 71;
}if (true) break;

case 71:
//C
this.state = 72;
 //BA.debugLineNum = 713;BA.debugLine="Printer1.WriteString(\"-------PROMOS ENTREGA-----";
parent._printer1._writestring /*String*/ ("-------PROMOS ENTREGA--------"+parent.__c.CRLF);
 //BA.debugLineNum = 714;BA.debugLine="Printer1.WriteString(\"Cant.      Precio        I";
parent._printer1._writestring /*String*/ ("Cant.      Precio        Importe"+parent.__c.CRLF);
 //BA.debugLineNum = 715;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 717;BA.debugLine="For i=0 To S.RowCount -1";
if (true) break;

case 72:
//for
this.state = 95;
step114 = 1;
limit114 = (int) (parent._s.getRowCount()-1);
_i = (int) (0) ;
this.state = 135;
if (true) break;

case 135:
//C
this.state = 95;
if ((step114 > 0 && _i <= limit114) || (step114 < 0 && _i >= limit114)) this.state = 74;
if (true) break;

case 136:
//C
this.state = 135;
_i = ((int)(0 + _i + step114)) ;
if (true) break;

case 74:
//C
this.state = 75;
 //BA.debugLineNum = 718;BA.debugLine="S.Position=i";
parent._s.setPosition(_i);
 //BA.debugLineNum = 719;BA.debugLine="If s.GetString(\"HVD_CANT\") - s.GetString(\"HVD_R";
if (true) break;

case 75:
//if
this.state = 94;
if ((double)(Double.parseDouble(parent._s.GetString("HVD_CANT")))-(double)(Double.parseDouble(parent._s.GetString("HVD_RECHAZOCANT")))>0) { 
this.state = 77;
}if (true) break;

case 77:
//C
this.state = 78;
 //BA.debugLineNum = 722;BA.debugLine="If s.GetString(\"HVD_CODPROMO\") <> Subs.traeAlm";
if (true) break;

case 78:
//if
this.state = 93;
if ((parent._s.GetString("HVD_CODPROMO")).equals(parent._subs._traealmacen /*String*/ (ba)) == false) { 
this.state = 80;
}else {
this.state = 92;
}if (true) break;

case 80:
//C
this.state = 81;
 //BA.debugLineNum = 724;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 725;BA.debugLine="If s.GetString(\"HVD_CODPROMO\") = s.GetString(";
if (true) break;

case 81:
//if
this.state = 90;
if ((parent._s.GetString("HVD_CODPROMO")).equals(parent._s.GetString("HVD_PROID"))) { 
this.state = 83;
}else {
this.state = 85;
}if (true) break;

case 83:
//C
this.state = 90;
 //BA.debugLineNum = 726;BA.debugLine="Printer1.WriteString(\"* \"&s.GetString(\"HVD_P";
parent._printer1._writestring /*String*/ ("* "+parent._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 if (true) break;

case 85:
//C
this.state = 86;
 //BA.debugLineNum = 728;BA.debugLine="Printer1.WriteString(s.GetString(\"HVD_PRONOM";
parent._printer1._writestring /*String*/ (parent._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 730;BA.debugLine="Dim punit As String =NumberFormat2((s.GETSTR";
_punit = parent.__c.NumberFormat2(((double)(Double.parseDouble(parent._s.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(parent._s.GetString("HVD_CANT")))),(int) (0),(int) (2),(int) (2),parent.__c.False);
 //BA.debugLineNum = 731;BA.debugLine="TAMANO = punit.Length + TAMANO";
parent._tamano = (int) (_punit.length()+parent._tamano);
 //BA.debugLineNum = 734;BA.debugLine="Private ptot As String = NumberFormat2((puni";
_ptot = parent.__c.NumberFormat2(((double)(Double.parseDouble(_punit))*(double)(Double.parseDouble(parent._s.GetString("HVD_CANT")))),(int) (0),(int) (2),(int) (2),parent.__c.False);
 //BA.debugLineNum = 735;BA.debugLine="TAMANO = ptot.Length + TAMANO";
parent._tamano = (int) (_ptot.length()+parent._tamano);
 //BA.debugLineNum = 738;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 739;BA.debugLine="Log(ESPACIO)";
parent.__c.LogImpl("58913084",BA.NumberToString(parent._espacio),0);
 //BA.debugLineNum = 740;BA.debugLine="For E=0 To ESPACIO -1";
if (true) break;

case 86:
//for
this.state = 89;
step129 = 1;
limit129 = (int) (parent._espacio-1);
_e = (int) (0) ;
this.state = 137;
if (true) break;

case 137:
//C
this.state = 89;
if ((step129 > 0 && _e <= limit129) || (step129 < 0 && _e >= limit129)) this.state = 88;
if (true) break;

case 138:
//C
this.state = 137;
_e = ((int)(0 + _e + step129)) ;
if (true) break;

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

case 89:
//C
this.state = 90;
;
 //BA.debugLineNum = 743;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 744;BA.debugLine="Printer1.WriteString( (s.GetString(\"HVD_CANT";
parent._printer1._writestring /*String*/ (BA.NumberToString(((double)(Double.parseDouble(parent._s.GetString("HVD_CANT")))-(double)(Double.parseDouble(parent._s.GetString("HVD_RECHAZOCANT")))))+parent._blanco);
 //BA.debugLineNum = 745;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 746;BA.debugLine="Printer1.WriteString( punit & BLANCO)";
parent._printer1._writestring /*String*/ (_punit+parent._blanco);
 //BA.debugLineNum = 747;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 748;BA.debugLine="Printer1.WriteString(ptot &  CRLF )";
parent._printer1._writestring /*String*/ (_ptot+parent.__c.CRLF);
 //BA.debugLineNum = 749;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 750;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 751;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 752;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 if (true) break;

case 90:
//C
this.state = 93;
;
 if (true) break;

case 92:
//C
this.state = 93;
 if (true) break;

case 93:
//C
this.state = 94;
;
 if (true) break;

case 94:
//C
this.state = 136;
;
 if (true) break;
if (true) break;

case 95:
//C
this.state = 96;
;
 if (true) break;

case 96:
//C
this.state = 97;
;
 //BA.debugLineNum = 764;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 765;BA.debugLine="s=Starter.skmt.ExecQuery($\"select PE_PRONOMBRE, P";
parent._s = (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_PRONOMBRE, PE_CANT, length(PE_CANT) as L_CANT, PE_COSTO_TOT, length(PE_COSTO_TOT) as L_COSTOU,PE_PROID FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa) order BY PE_PROID"))));
 //BA.debugLineNum = 767;BA.debugLine="If S.RowCount>0 Then";
if (true) break;

case 97:
//if
this.state = 108;
if (parent._s.getRowCount()>0) { 
this.state = 99;
}if (true) break;

case 99:
//C
this.state = 100;
 //BA.debugLineNum = 768;BA.debugLine="Printer1.WriteString(\"-----------VENTA----------";
parent._printer1._writestring /*String*/ ("-----------VENTA------------"+parent.__c.CRLF);
 //BA.debugLineNum = 769;BA.debugLine="Printer1.WriteString(\"Cant.      Precio        I";
parent._printer1._writestring /*String*/ ("Cant.      Precio        Importe"+parent.__c.CRLF);
 //BA.debugLineNum = 770;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 772;BA.debugLine="For i=0 To S.RowCount -1";
if (true) break;

case 100:
//for
this.state = 107;
step154 = 1;
limit154 = (int) (parent._s.getRowCount()-1);
_i = (int) (0) ;
this.state = 139;
if (true) break;

case 139:
//C
this.state = 107;
if ((step154 > 0 && _i <= limit154) || (step154 < 0 && _i >= limit154)) this.state = 102;
if (true) break;

case 140:
//C
this.state = 139;
_i = ((int)(0 + _i + step154)) ;
if (true) break;

case 102:
//C
this.state = 103;
 //BA.debugLineNum = 773;BA.debugLine="S.Position=i";
parent._s.setPosition(_i);
 //BA.debugLineNum = 775;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 776;BA.debugLine="Printer1.WriteString(s.GetString(\"PE_PRONOMBRE\"";
parent._printer1._writestring /*String*/ (parent._s.GetString("PE_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 779;BA.debugLine="Dim punit As String =NumberFormat2( (s.GETSTRIN";
_punit = parent.__c.NumberFormat2(((double)(Double.parseDouble(parent._s.GetString("PE_COSTO_TOT")))/(double)(double)(Double.parseDouble(parent._s.GetString("PE_CANT")))),(int) (0),(int) (2),(int) (2),parent.__c.False);
 //BA.debugLineNum = 780;BA.debugLine="TAMANO = punit.Length + TAMANO";
parent._tamano = (int) (_punit.length()+parent._tamano);
 //BA.debugLineNum = 782;BA.debugLine="Private ptot As String = NumberFormat2((punit*s";
_ptot = parent.__c.NumberFormat2(((double)(Double.parseDouble(_punit))*(double)(Double.parseDouble(parent._s.GetString("PE_CANT")))),(int) (0),(int) (2),(int) (2),parent.__c.False);
 //BA.debugLineNum = 783;BA.debugLine="TAMANO = ptot.Length + TAMANO";
parent._tamano = (int) (_ptot.length()+parent._tamano);
 //BA.debugLineNum = 786;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 787;BA.debugLine="Log(ESPACIO)";
parent.__c.LogImpl("58913132",BA.NumberToString(parent._espacio),0);
 //BA.debugLineNum = 788;BA.debugLine="For E=0 To ESPACIO -1";
if (true) break;

case 103:
//for
this.state = 106;
step164 = 1;
limit164 = (int) (parent._espacio-1);
_e = (int) (0) ;
this.state = 141;
if (true) break;

case 141:
//C
this.state = 106;
if ((step164 > 0 && _e <= limit164) || (step164 < 0 && _e >= limit164)) this.state = 105;
if (true) break;

case 142:
//C
this.state = 141;
_e = ((int)(0 + _e + step164)) ;
if (true) break;

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

case 106:
//C
this.state = 140;
;
 //BA.debugLineNum = 791;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 792;BA.debugLine="Printer1.WriteString( s.GetString(\"PE_CANT\") &";
parent._printer1._writestring /*String*/ (parent._s.GetString("PE_CANT")+parent._blanco);
 //BA.debugLineNum = 793;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 794;BA.debugLine="Printer1.WriteString( punit & BLANCO)";
parent._printer1._writestring /*String*/ (_punit+parent._blanco);
 //BA.debugLineNum = 795;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 796;BA.debugLine="Printer1.WriteString(ptot &  CRLF )";
parent._printer1._writestring /*String*/ (_ptot+parent.__c.CRLF);
 //BA.debugLineNum = 797;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 798;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 799;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 800;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 if (true) break;
if (true) break;

case 107:
//C
this.state = 108;
;
 if (true) break;

case 108:
//C
this.state = 109;
;
 //BA.debugLineNum = 804;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 805;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 808;BA.debugLine="Printer1.WriteString(\"Total Articulos:   \" & L_CA";
parent._printer1._writestring /*String*/ ("Total Articulos:   "+parent._l_cant.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 809;BA.debugLine="Printer1.WriteString(\"Total:   $\" & l_total.Text)";
parent._printer1._writestring /*String*/ ("Total:   $"+parent._l_total.getText());
 //BA.debugLineNum = 812;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 813;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 816;BA.debugLine="Printer1.WriteString(\"----ESTE TICKET NO ES UN --";
parent._printer1._writestring /*String*/ ("----ESTE TICKET NO ES UN -----"+parent.__c.CRLF);
 //BA.debugLineNum = 817;BA.debugLine="Printer1.WriteString(\"--COMPROBANTE FISCAL, SOLO";
parent._printer1._writestring /*String*/ ("--COMPROBANTE FISCAL, SOLO ES-"+parent.__c.CRLF);
 //BA.debugLineNum = 818;BA.debugLine="Printer1.WriteString(\"--------INFORMATIVO--------";
parent._printer1._writestring /*String*/ ("--------INFORMATIVO-----------"+parent.__c.CRLF);
 //BA.debugLineNum = 819;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 820;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 821;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 822;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 823;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 143;
return;
case 143:
//C
this.state = 109;
;
 //BA.debugLineNum = 824;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 826;BA.debugLine="ProgressDialogHide";
parent.__c.ProgressDialogHide();
 //BA.debugLineNum = 828;BA.debugLine="If banderaimp = 1 Then";
if (true) break;

case 109:
//if
this.state = 124;
if (parent._banderaimp==1) { 
this.state = 111;
}else if(parent._banderaimp==0) { 
this.state = 119;
}if (true) break;

case 111:
//C
this.state = 112;
 //BA.debugLineNum = 829;BA.debugLine="Msgbox2Async(\"Deseas imprimir de nuevo el ticket";
parent.__c.Msgbox2Async(BA.ObjectToCharSequence("Deseas imprimir de nuevo el ticket?"),BA.ObjectToCharSequence("ATENCION"),"SI","","NO",parent.__c.LoadBitmap(parent.__c.File.getDirAssets(),"alert2.png"),ba,parent.__c.False);
 //BA.debugLineNum = 830;BA.debugLine="Wait For Msgbox_Result (resultado As Int)";
parent.__c.WaitFor("msgbox_result", ba, this, null);
this.state = 144;
return;
case 144:
//C
this.state = 112;
_resultado = (Integer) result[0];
;
 //BA.debugLineNum = 831;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
if (true) break;

case 112:
//if
this.state = 117;
if (_resultado==parent.__c.DialogResponse.POSITIVE) { 
this.state = 114;
}else {
this.state = 116;
}if (true) break;

case 114:
//C
this.state = 117;
 //BA.debugLineNum = 832;BA.debugLine="B_IMP_Click";
parent._b_imp_click();
 if (true) break;

case 116:
//C
this.state = 117;
 //BA.debugLineNum = 834;BA.debugLine="Guardado";
parent._guardado();
 if (true) break;

case 117:
//C
this.state = 124;
;
 if (true) break;

case 119:
//C
this.state = 120;
 //BA.debugLineNum = 840;BA.debugLine="Msgbox2Async(\"Deseas imprimir de nuevo el ticket";
parent.__c.Msgbox2Async(BA.ObjectToCharSequence("Deseas imprimir de nuevo el ticket?"),BA.ObjectToCharSequence("ATENCION"),"SI","","NO",parent.__c.LoadBitmap(parent.__c.File.getDirAssets(),"alert2.png"),ba,parent.__c.False);
 //BA.debugLineNum = 841;BA.debugLine="Wait For Msgbox_Result (resultado As Int)";
parent.__c.WaitFor("msgbox_result", ba, this, null);
this.state = 145;
return;
case 145:
//C
this.state = 120;
_resultado = (Integer) result[0];
;
 //BA.debugLineNum = 842;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
if (true) break;

case 120:
//if
this.state = 123;
if (_resultado==parent.__c.DialogResponse.POSITIVE) { 
this.state = 122;
}if (true) break;

case 122:
//C
this.state = 123;
 //BA.debugLineNum = 843;BA.debugLine="B_IMP_Click";
parent._b_imp_click();
 if (true) break;

case 123:
//C
this.state = 124;
;
 if (true) break;

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

            }
        }
    }
}
public void  _b_imp2_click() throws Exception{
ResumableSub_B_IMP2_Click rsub = new ResumableSub_B_IMP2_Click(this);
rsub.resume(ba, null);
}
public static class ResumableSub_B_IMP2_Click extends BA.ResumableSub {
public ResumableSub_B_IMP2_Click(reparto_izca.keymon.lat.c_cliente parent) {
this.parent = parent;
}
reparto_izca.keymon.lat.c_cliente parent;
int _cont = 0;
int _i = 0;
String _punit = "";
String _ptot = "";
int _e = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc5 = null;
int _resultado = 0;
int step53;
int limit53;
int step65;
int limit65;
int step88;
int limit88;
int step114;
int limit114;
int step131;
int limit131;
int step156;
int limit156;
int step166;
int limit166;

@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 = 1482;BA.debugLine="c=Starter.skmt.ExecQuery(\"select USUARIO from usu";
parent._c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
 //BA.debugLineNum = 1483;BA.debugLine="c.Position=0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 1484;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
parent._usuario = parent._c.GetString("USUARIO");
 //BA.debugLineNum = 1486;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
parent.__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 1487;BA.debugLine="DateTime.TimeFormat=\"HH:mm:ss\"";
parent.__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 1488;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
parent._sdate = parent.__c.DateTime.Date(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 1489;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
parent._stime = parent.__c.DateTime.Time(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 1490;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 1496;BA.debugLine="ProgressDialogShow(\"Imprimiendo, un momento ...\")";
parent.__c.ProgressDialogShow(ba,BA.ObjectToCharSequence("Imprimiendo, un momento ..."));
 //BA.debugLineNum = 1497;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 1498;BA.debugLine="If Not(Printer1.IsConnected) Then";
if (true) break;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

case 38:
//C
this.state = 39;
;
 //BA.debugLineNum = 1526;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 1527;BA.debugLine="ESPACIO = 28";
parent._espacio = (int) (28);
 //BA.debugLineNum = 1528;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 1545;BA.debugLine="Printer1.WriteString(\"Izca Distribuciones\" &  CRL";
parent._printer1._writestring /*String*/ ("Izca Distribuciones"+parent.__c.CRLF);
 //BA.debugLineNum = 1547;BA.debugLine="Printer1.WriteString(sDate &  CRLF)";
parent._printer1._writestring /*String*/ (parent._sdate+parent.__c.CRLF);
 //BA.debugLineNum = 1548;BA.debugLine="Printer1.WriteString(sTime &  CRLF)";
parent._printer1._writestring /*String*/ (parent._stime+parent.__c.CRLF);
 //BA.debugLineNum = 1549;BA.debugLine="Printer1.WriteString(\"Vendedor:\" & usuario &  CRL";
parent._printer1._writestring /*String*/ ("Vendedor:"+parent._usuario+parent.__c.CRLF);
 //BA.debugLineNum = 1550;BA.debugLine="Printer1.WriteString(\"Tienda: \" & La_nombre.Text";
parent._printer1._writestring /*String*/ ("Tienda: "+parent._la_nombre.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 1551;BA.debugLine="Printer1.WriteString(\"ID.Cliente: \" &  la_cuenta.";
parent._printer1._writestring /*String*/ ("ID.Cliente: "+parent._la_cuenta.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 1552;BA.debugLine="Printer1.WriteString(\"Calle: \" & la_Calle.Text &";
parent._printer1._writestring /*String*/ ("Calle: "+parent._la_calle.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 1553;BA.debugLine="Printer1.WriteString(\"Colonia: \" & la_col.Text &";
parent._printer1._writestring /*String*/ ("Colonia: "+parent._la_col.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 1557;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1558;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT * FROM HIST_VE";
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 HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 1559;BA.debugLine="If c.RowCount > 0 Then";
if (true) break;

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

case 41:
//C
this.state = 42;
 //BA.debugLineNum = 1560;BA.debugLine="Printer1.WriteString(\"------------ENTREGA-------";
parent._printer1._writestring /*String*/ ("------------ENTREGA-----------"+parent.__c.CRLF);
 //BA.debugLineNum = 1563;BA.debugLine="Printer1.WriteString(\"Cant.      Precio        I";
parent._printer1._writestring /*String*/ ("Cant.      Precio        Importe"+parent.__c.CRLF);
 //BA.debugLineNum = 1565;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 1567;BA.debugLine="s=Starter.skmt.ExecQuery($\"select HVD_PRONOMBRE,";
parent._s = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select HVD_PRONOMBRE, HVD_CANT, length(HVD_CANT) as L_CANT, HVD_COSTO_TOT, length(HVD_COSTO_TOT) as L_COSTOU,HVD_PROID, HVD_CODPROMO,IFNULL(HVD_RECHAZOCANT,0) AS HVD_RECHAZOCANT, HVD_RECHAZO FROM HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) order by  HVD_PROID"))));
 //BA.debugLineNum = 1568;BA.debugLine="If S.RowCount>0 Then";
if (true) break;

case 42:
//if
this.state = 67;
if (parent._s.getRowCount()>0) { 
this.state = 44;
}if (true) break;

case 44:
//C
this.state = 45;
 //BA.debugLineNum = 1569;BA.debugLine="For i=0 To S.RowCount -1";
if (true) break;

case 45:
//for
this.state = 66;
step53 = 1;
limit53 = (int) (parent._s.getRowCount()-1);
_i = (int) (0) ;
this.state = 129;
if (true) break;

case 129:
//C
this.state = 66;
if ((step53 > 0 && _i <= limit53) || (step53 < 0 && _i >= limit53)) this.state = 47;
if (true) break;

case 130:
//C
this.state = 129;
_i = ((int)(0 + _i + step53)) ;
if (true) break;

case 47:
//C
this.state = 48;
 //BA.debugLineNum = 1570;BA.debugLine="S.Position=i";
parent._s.setPosition(_i);
 //BA.debugLineNum = 1571;BA.debugLine="Log(s.GetString(\"HVD_RECHAZO\"))";
parent.__c.LogImpl("510027220",parent._s.GetString("HVD_RECHAZO"),0);
 //BA.debugLineNum = 1572;BA.debugLine="If s.GetString(\"HVD_CANT\") - s.GetString(\"HVD_";
if (true) break;

case 48:
//if
this.state = 65;
if ((double)(Double.parseDouble(parent._s.GetString("HVD_CANT")))-(double)(Double.parseDouble(parent._s.GetString("HVD_RECHAZOCANT")))>0) { 
this.state = 50;
}if (true) break;

case 50:
//C
this.state = 51;
 //BA.debugLineNum = 1575;BA.debugLine="If s.GetString(\"HVD_CODPROMO\") = Subs.traeAlm";
if (true) break;

case 51:
//if
this.state = 64;
if ((parent._s.GetString("HVD_CODPROMO")).equals(parent._subs._traealmacen /*String*/ (ba))) { 
this.state = 53;
}else if((parent._s.GetString("HVD_RECHAZO")).equals(BA.NumberToString(1))) { 
this.state = 59;
}if (true) break;

case 53:
//C
this.state = 54;
 //BA.debugLineNum = 1577;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 1578;BA.debugLine="Printer1.WriteString(s.GetString(\"HVD_PRONOM";
parent._printer1._writestring /*String*/ (parent._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 1581;BA.debugLine="Dim punit As String = NumberFormat2((s.GETST";
_punit = parent.__c.NumberFormat2(((double)(Double.parseDouble(parent._s.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(parent._s.GetString("HVD_CANT")))),(int) (0),(int) (2),(int) (2),parent.__c.False);
 //BA.debugLineNum = 1582;BA.debugLine="TAMANO = punit.Length + TAMANO";
parent._tamano = (int) (_punit.length()+parent._tamano);
 //BA.debugLineNum = 1585;BA.debugLine="Private ptot As String = NumberFormat2(( (s.";
_ptot = parent.__c.NumberFormat2((((double)(Double.parseDouble(parent._s.GetString("HVD_CANT")))-(double)(Double.parseDouble(parent._s.GetString("HVD_RECHAZOCANT"))))*(double)(Double.parseDouble(_punit))),(int) (0),(int) (2),(int) (2),parent.__c.False);
 //BA.debugLineNum = 1586;BA.debugLine="TAMANO = ptot.Length + TAMANO";
parent._tamano = (int) (_ptot.length()+parent._tamano);
 //BA.debugLineNum = 1588;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 1590;BA.debugLine="For E=0 To ESPACIO -1";
if (true) break;

case 54:
//for
this.state = 57;
step65 = 1;
limit65 = (int) (parent._espacio-1);
_e = (int) (0) ;
this.state = 131;
if (true) break;

case 131:
//C
this.state = 57;
if ((step65 > 0 && _e <= limit65) || (step65 < 0 && _e >= limit65)) this.state = 56;
if (true) break;

case 132:
//C
this.state = 131;
_e = ((int)(0 + _e + step65)) ;
if (true) break;

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

case 57:
//C
this.state = 64;
;
 //BA.debugLineNum = 1593;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 1594;BA.debugLine="Printer1.WriteString( (s.GetString(\"HVD_CANT";
parent._printer1._writestring /*String*/ (BA.NumberToString(((double)(Double.parseDouble(parent._s.GetString("HVD_CANT")))-(double)(Double.parseDouble(parent._s.GetString("HVD_RECHAZOCANT")))))+parent._blanco);
 //BA.debugLineNum = 1595;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 1596;BA.debugLine="Printer1.WriteString( punit & BLANCO)";
parent._printer1._writestring /*String*/ (_punit+parent._blanco);
 //BA.debugLineNum = 1597;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 1598;BA.debugLine="Printer1.WriteString( ptot &  CRLF )";
parent._printer1._writestring /*String*/ (_ptot+parent.__c.CRLF);
 //BA.debugLineNum = 1599;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 1600;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 1601;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 if (true) break;

case 59:
//C
this.state = 60;
 //BA.debugLineNum = 1605;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 1606;BA.debugLine="Printer1.WriteString(s.GetString(\"HVD_PRONOM";
parent._printer1._writestring /*String*/ (parent._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 1608;BA.debugLine="Private vc5 As Cursor = Starter.skmt.ExecQue";
_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)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select iFNULL(CAT_GP_PRECIO,0) AS CAT_GP_PRECIO from CAT_GUNAPROD where CAT_GP_ID = '"+parent.__c.SmartStringFormatter("",(Object)(parent._s.GetString("HVD_PROID")))+"'"))));
 //BA.debugLineNum = 1609;BA.debugLine="vc5.Position = 0";
_vc5.setPosition((int) (0));
 //BA.debugLineNum = 1610;BA.debugLine="Dim punit As String = NumberFormat2((vc5.Get";
_punit = parent.__c.NumberFormat2((double)(Double.parseDouble((_vc5.GetString("CAT_GP_PRECIO")))),(int) (0),(int) (2),(int) (2),parent.__c.False);
 //BA.debugLineNum = 1611;BA.debugLine="TAMANO = punit.Length + TAMANO";
parent._tamano = (int) (_punit.length()+parent._tamano);
 //BA.debugLineNum = 1612;BA.debugLine="vc5.Close";
_vc5.Close();
 //BA.debugLineNum = 1614;BA.debugLine="Private ptot As String = NumberFormat2(( (s.";
_ptot = parent.__c.NumberFormat2((((double)(Double.parseDouble(parent._s.GetString("HVD_CANT")))-(double)(Double.parseDouble(parent._s.GetString("HVD_RECHAZOCANT"))))*(double)(Double.parseDouble(_punit))),(int) (0),(int) (2),(int) (2),parent.__c.False);
 //BA.debugLineNum = 1615;BA.debugLine="TAMANO = ptot.Length + TAMANO";
parent._tamano = (int) (_ptot.length()+parent._tamano);
 //BA.debugLineNum = 1617;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 1619;BA.debugLine="For E=0 To ESPACIO -1";
if (true) break;

case 60:
//for
this.state = 63;
step88 = 1;
limit88 = (int) (parent._espacio-1);
_e = (int) (0) ;
this.state = 133;
if (true) break;

case 133:
//C
this.state = 63;
if ((step88 > 0 && _e <= limit88) || (step88 < 0 && _e >= limit88)) this.state = 62;
if (true) break;

case 134:
//C
this.state = 133;
_e = ((int)(0 + _e + step88)) ;
if (true) break;

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

case 63:
//C
this.state = 64;
;
 //BA.debugLineNum = 1622;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 1623;BA.debugLine="Printer1.WriteString( (s.GetString(\"HVD_CANT";
parent._printer1._writestring /*String*/ (BA.NumberToString(((double)(Double.parseDouble(parent._s.GetString("HVD_CANT")))-(double)(Double.parseDouble(parent._s.GetString("HVD_RECHAZOCANT")))))+parent._blanco);
 //BA.debugLineNum = 1624;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 1625;BA.debugLine="Printer1.WriteString( punit & BLANCO)";
parent._printer1._writestring /*String*/ (_punit+parent._blanco);
 //BA.debugLineNum = 1626;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 1627;BA.debugLine="Printer1.WriteString(ptot&  CRLF )";
parent._printer1._writestring /*String*/ (_ptot+parent.__c.CRLF);
 //BA.debugLineNum = 1628;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 1629;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 1630;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 1631;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 if (true) break;

case 64:
//C
this.state = 65;
;
 if (true) break;

case 65:
//C
this.state = 130;
;
 if (true) break;
if (true) break;

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

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

case 68:
//C
this.state = 69;
;
 //BA.debugLineNum = 1637;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 1638;BA.debugLine="s.Close";
parent._s.Close();
 //BA.debugLineNum = 1639;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1640;BA.debugLine="s=Starter.skmt.ExecQuery($\"select HVD_PRONOMBRE,";
parent._s = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select HVD_PRONOMBRE, HVD_CANT, length(HVD_CANT) as L_CANT, HVD_COSTO_TOT, length(HVD_COSTO_TOT) as L_COSTOU,HVD_PROID, HVD_CODPROMO,IFNULL(HVD_RECHAZOCANT,0) AS HVD_RECHAZOCANT FROM HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) AND HVD_RECHAZO = 0 AND HVD_CODPROMO <> '"+parent.__c.SmartStringFormatter("",(Object)(parent._subs._traealmacen /*String*/ (ba)))+"' order by  HVD_CODPROMO, ESPROMO DESC, HVD_PROID"))));
 //BA.debugLineNum = 1642;BA.debugLine="If S.RowCount>0 Then";
if (true) break;

case 69:
//if
this.state = 96;
if (parent._s.getRowCount()>0) { 
this.state = 71;
}if (true) break;

case 71:
//C
this.state = 72;
 //BA.debugLineNum = 1643;BA.debugLine="Printer1.WriteString(\"-------PROMOS ENTREGA-----";
parent._printer1._writestring /*String*/ ("-------PROMOS ENTREGA--------"+parent.__c.CRLF);
 //BA.debugLineNum = 1644;BA.debugLine="Printer1.WriteString(\"Cant.      Precio        I";
parent._printer1._writestring /*String*/ ("Cant.      Precio        Importe"+parent.__c.CRLF);
 //BA.debugLineNum = 1645;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 1647;BA.debugLine="For i=0 To S.RowCount -1";
if (true) break;

case 72:
//for
this.state = 95;
step114 = 1;
limit114 = (int) (parent._s.getRowCount()-1);
_i = (int) (0) ;
this.state = 135;
if (true) break;

case 135:
//C
this.state = 95;
if ((step114 > 0 && _i <= limit114) || (step114 < 0 && _i >= limit114)) this.state = 74;
if (true) break;

case 136:
//C
this.state = 135;
_i = ((int)(0 + _i + step114)) ;
if (true) break;

case 74:
//C
this.state = 75;
 //BA.debugLineNum = 1648;BA.debugLine="S.Position=i";
parent._s.setPosition(_i);
 //BA.debugLineNum = 1649;BA.debugLine="If s.GetString(\"HVD_CANT\") - s.GetString(\"HVD_R";
if (true) break;

case 75:
//if
this.state = 94;
if ((double)(Double.parseDouble(parent._s.GetString("HVD_CANT")))-(double)(Double.parseDouble(parent._s.GetString("HVD_RECHAZOCANT")))>0) { 
this.state = 77;
}if (true) break;

case 77:
//C
this.state = 78;
 //BA.debugLineNum = 1652;BA.debugLine="If s.GetString(\"HVD_CODPROMO\") <> Subs.traeAlm";
if (true) break;

case 78:
//if
this.state = 93;
if ((parent._s.GetString("HVD_CODPROMO")).equals(parent._subs._traealmacen /*String*/ (ba)) == false) { 
this.state = 80;
}else {
this.state = 92;
}if (true) break;

case 80:
//C
this.state = 81;
 //BA.debugLineNum = 1654;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 1655;BA.debugLine="If s.GetString(\"HVD_CODPROMO\") = s.GetString(";
if (true) break;

case 81:
//if
this.state = 90;
if ((parent._s.GetString("HVD_CODPROMO")).equals(parent._s.GetString("HVD_PROID"))) { 
this.state = 83;
}else {
this.state = 85;
}if (true) break;

case 83:
//C
this.state = 90;
 //BA.debugLineNum = 1656;BA.debugLine="Printer1.WriteString(\"* \"&s.GetString(\"HVD_P";
parent._printer1._writestring /*String*/ ("* "+parent._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 1657;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1658;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 if (true) break;

case 85:
//C
this.state = 86;
 //BA.debugLineNum = 1660;BA.debugLine="Printer1.WriteString(s.GetString(\"HVD_PRONOM";
parent._printer1._writestring /*String*/ (parent._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 1662;BA.debugLine="Dim punit As String =NumberFormat2((s.GETSTR";
_punit = parent.__c.NumberFormat2(((double)(Double.parseDouble(parent._s.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(parent._s.GetString("HVD_CANT")))),(int) (0),(int) (2),(int) (2),parent.__c.False);
 //BA.debugLineNum = 1663;BA.debugLine="TAMANO = punit.Length + TAMANO";
parent._tamano = (int) (_punit.length()+parent._tamano);
 //BA.debugLineNum = 1666;BA.debugLine="Private ptot As String = NumberFormat2((puni";
_ptot = parent.__c.NumberFormat2(((double)(Double.parseDouble(_punit))*(double)(Double.parseDouble(parent._s.GetString("HVD_CANT")))),(int) (0),(int) (2),(int) (2),parent.__c.False);
 //BA.debugLineNum = 1667;BA.debugLine="TAMANO = ptot.Length + TAMANO";
parent._tamano = (int) (_ptot.length()+parent._tamano);
 //BA.debugLineNum = 1670;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 1671;BA.debugLine="Log(ESPACIO)";
parent.__c.LogImpl("510027320",BA.NumberToString(parent._espacio),0);
 //BA.debugLineNum = 1672;BA.debugLine="For E=0 To ESPACIO -1";
if (true) break;

case 86:
//for
this.state = 89;
step131 = 1;
limit131 = (int) (parent._espacio-1);
_e = (int) (0) ;
this.state = 137;
if (true) break;

case 137:
//C
this.state = 89;
if ((step131 > 0 && _e <= limit131) || (step131 < 0 && _e >= limit131)) this.state = 88;
if (true) break;

case 138:
//C
this.state = 137;
_e = ((int)(0 + _e + step131)) ;
if (true) break;

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

case 89:
//C
this.state = 90;
;
 //BA.debugLineNum = 1675;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 1676;BA.debugLine="Printer1.WriteString( (s.GetString(\"HVD_CANT";
parent._printer1._writestring /*String*/ (BA.NumberToString(((double)(Double.parseDouble(parent._s.GetString("HVD_CANT")))-(double)(Double.parseDouble(parent._s.GetString("HVD_RECHAZOCANT")))))+parent._blanco);
 //BA.debugLineNum = 1677;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 1678;BA.debugLine="Printer1.WriteString( punit & BLANCO)";
parent._printer1._writestring /*String*/ (_punit+parent._blanco);
 //BA.debugLineNum = 1679;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 1680;BA.debugLine="Printer1.WriteString(ptot &  CRLF )";
parent._printer1._writestring /*String*/ (_ptot+parent.__c.CRLF);
 //BA.debugLineNum = 1681;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 1682;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 1683;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 1684;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 if (true) break;

case 90:
//C
this.state = 93;
;
 if (true) break;

case 92:
//C
this.state = 93;
 if (true) break;

case 93:
//C
this.state = 94;
;
 if (true) break;

case 94:
//C
this.state = 136;
;
 if (true) break;
if (true) break;

case 95:
//C
this.state = 96;
;
 if (true) break;

case 96:
//C
this.state = 97;
;
 //BA.debugLineNum = 1696;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1697;BA.debugLine="s=Starter.skmt.ExecQuery($\"select PE_PRONOMBRE, P";
parent._s = (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_PRONOMBRE, PE_CANT, length(PE_CANT) as L_CANT, PE_COSTO_TOT, length(PE_COSTO_TOT) as L_COSTOU,PE_PROID FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa) order BY PE_PROID"))));
 //BA.debugLineNum = 1699;BA.debugLine="If S.RowCount>0 Then";
if (true) break;

case 97:
//if
this.state = 108;
if (parent._s.getRowCount()>0) { 
this.state = 99;
}if (true) break;

case 99:
//C
this.state = 100;
 //BA.debugLineNum = 1700;BA.debugLine="Printer1.WriteString(\"-----------VENTA----------";
parent._printer1._writestring /*String*/ ("-----------VENTA------------"+parent.__c.CRLF);
 //BA.debugLineNum = 1701;BA.debugLine="Printer1.WriteString(\"Cant.      Precio        I";
parent._printer1._writestring /*String*/ ("Cant.      Precio        Importe"+parent.__c.CRLF);
 //BA.debugLineNum = 1702;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 1704;BA.debugLine="For i=0 To S.RowCount -1";
if (true) break;

case 100:
//for
this.state = 107;
step156 = 1;
limit156 = (int) (parent._s.getRowCount()-1);
_i = (int) (0) ;
this.state = 139;
if (true) break;

case 139:
//C
this.state = 107;
if ((step156 > 0 && _i <= limit156) || (step156 < 0 && _i >= limit156)) this.state = 102;
if (true) break;

case 140:
//C
this.state = 139;
_i = ((int)(0 + _i + step156)) ;
if (true) break;

case 102:
//C
this.state = 103;
 //BA.debugLineNum = 1705;BA.debugLine="S.Position=i";
parent._s.setPosition(_i);
 //BA.debugLineNum = 1707;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 1708;BA.debugLine="Printer1.WriteString(s.GetString(\"PE_PRONOMBRE\"";
parent._printer1._writestring /*String*/ (parent._s.GetString("PE_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 1711;BA.debugLine="Dim punit As String =NumberFormat2( (s.GETSTRIN";
_punit = parent.__c.NumberFormat2(((double)(Double.parseDouble(parent._s.GetString("PE_COSTO_TOT")))/(double)(double)(Double.parseDouble(parent._s.GetString("PE_CANT")))),(int) (0),(int) (2),(int) (2),parent.__c.False);
 //BA.debugLineNum = 1712;BA.debugLine="TAMANO = punit.Length + TAMANO";
parent._tamano = (int) (_punit.length()+parent._tamano);
 //BA.debugLineNum = 1714;BA.debugLine="Private ptot As String = NumberFormat2((punit*s";
_ptot = parent.__c.NumberFormat2(((double)(Double.parseDouble(_punit))*(double)(Double.parseDouble(parent._s.GetString("PE_CANT")))),(int) (0),(int) (2),(int) (2),parent.__c.False);
 //BA.debugLineNum = 1715;BA.debugLine="TAMANO = ptot.Length + TAMANO";
parent._tamano = (int) (_ptot.length()+parent._tamano);
 //BA.debugLineNum = 1718;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 1719;BA.debugLine="Log(ESPACIO)";
parent.__c.LogImpl("510027368",BA.NumberToString(parent._espacio),0);
 //BA.debugLineNum = 1720;BA.debugLine="For E=0 To ESPACIO -1";
if (true) break;

case 103:
//for
this.state = 106;
step166 = 1;
limit166 = (int) (parent._espacio-1);
_e = (int) (0) ;
this.state = 141;
if (true) break;

case 141:
//C
this.state = 106;
if ((step166 > 0 && _e <= limit166) || (step166 < 0 && _e >= limit166)) this.state = 105;
if (true) break;

case 142:
//C
this.state = 141;
_e = ((int)(0 + _e + step166)) ;
if (true) break;

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

case 106:
//C
this.state = 140;
;
 //BA.debugLineNum = 1723;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 1724;BA.debugLine="Printer1.WriteString( s.GetString(\"PE_CANT\") &";
parent._printer1._writestring /*String*/ (parent._s.GetString("PE_CANT")+parent._blanco);
 //BA.debugLineNum = 1725;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 1726;BA.debugLine="Printer1.WriteString( punit & BLANCO)";
parent._printer1._writestring /*String*/ (_punit+parent._blanco);
 //BA.debugLineNum = 1727;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 1728;BA.debugLine="Printer1.WriteString(ptot &  CRLF )";
parent._printer1._writestring /*String*/ (_ptot+parent.__c.CRLF);
 //BA.debugLineNum = 1729;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 1730;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 1731;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 1732;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 if (true) break;
if (true) break;

case 107:
//C
this.state = 108;
;
 if (true) break;

case 108:
//C
this.state = 109;
;
 //BA.debugLineNum = 1736;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1737;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 1740;BA.debugLine="Printer1.WriteString(\"Total Articulos:   \" & L_CA";
parent._printer1._writestring /*String*/ ("Total Articulos:   "+parent._l_cant.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 1741;BA.debugLine="Printer1.WriteString(\"Total:   $\" & l_total.Text)";
parent._printer1._writestring /*String*/ ("Total:   $"+parent._l_total.getText());
 //BA.debugLineNum = 1744;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1745;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 1748;BA.debugLine="Printer1.WriteString(\"----ESTE TICKET NO ES UN --";
parent._printer1._writestring /*String*/ ("----ESTE TICKET NO ES UN -----"+parent.__c.CRLF);
 //BA.debugLineNum = 1749;BA.debugLine="Printer1.WriteString(\"--COMPROBANTE FISCAL, SOLO";
parent._printer1._writestring /*String*/ ("--COMPROBANTE FISCAL, SOLO ES-"+parent.__c.CRLF);
 //BA.debugLineNum = 1750;BA.debugLine="Printer1.WriteString(\"--------INFORMATIVO--------";
parent._printer1._writestring /*String*/ ("--------INFORMATIVO-----------"+parent.__c.CRLF);
 //BA.debugLineNum = 1751;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 1752;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1753;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1754;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1755;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 143;
return;
case 143:
//C
this.state = 109;
;
 //BA.debugLineNum = 1756;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 1758;BA.debugLine="ProgressDialogHide";
parent.__c.ProgressDialogHide();
 //BA.debugLineNum = 1760;BA.debugLine="If banderaimp = 1 Then";
if (true) break;

case 109:
//if
this.state = 124;
if (parent._banderaimp==1) { 
this.state = 111;
}else if(parent._banderaimp==0) { 
this.state = 119;
}if (true) break;

case 111:
//C
this.state = 112;
 //BA.debugLineNum = 1761;BA.debugLine="Msgbox2Async(\"Deseas imprimir de nuevo el ticket";
parent.__c.Msgbox2Async(BA.ObjectToCharSequence("Deseas imprimir de nuevo el ticket?"),BA.ObjectToCharSequence("ATENCION"),"SI","","NO",parent.__c.LoadBitmap(parent.__c.File.getDirAssets(),"alert2.png"),ba,parent.__c.False);
 //BA.debugLineNum = 1762;BA.debugLine="Wait For Msgbox_Result (resultado As Int)";
parent.__c.WaitFor("msgbox_result", ba, this, null);
this.state = 144;
return;
case 144:
//C
this.state = 112;
_resultado = (Integer) result[0];
;
 //BA.debugLineNum = 1763;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
if (true) break;

case 112:
//if
this.state = 117;
if (_resultado==parent.__c.DialogResponse.POSITIVE) { 
this.state = 114;
}else {
this.state = 116;
}if (true) break;

case 114:
//C
this.state = 117;
 //BA.debugLineNum = 1764;BA.debugLine="B_IMP_Click";
parent._b_imp_click();
 if (true) break;

case 116:
//C
this.state = 117;
 if (true) break;

case 117:
//C
this.state = 124;
;
 if (true) break;

case 119:
//C
this.state = 120;
 //BA.debugLineNum = 1772;BA.debugLine="Msgbox2Async(\"Deseas imprimir de nuevo el ticket";
parent.__c.Msgbox2Async(BA.ObjectToCharSequence("Deseas imprimir de nuevo el ticket?"),BA.ObjectToCharSequence("ATENCION"),"SI","","NO",parent.__c.LoadBitmap(parent.__c.File.getDirAssets(),"alert2.png"),ba,parent.__c.False);
 //BA.debugLineNum = 1773;BA.debugLine="Wait For Msgbox_Result (resultado As Int)";
parent.__c.WaitFor("msgbox_result", ba, this, null);
this.state = 145;
return;
case 145:
//C
this.state = 120;
_resultado = (Integer) result[0];
;
 //BA.debugLineNum = 1774;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
if (true) break;

case 120:
//if
this.state = 123;
if (_resultado==parent.__c.DialogResponse.POSITIVE) { 
this.state = 122;
}if (true) break;

case 122:
//C
this.state = 123;
 //BA.debugLineNum = 1775;BA.debugLine="B_IMP_Click";
parent._b_imp_click();
 if (true) break;

case 123:
//C
this.state = 124;
;
 if (true) break;

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

            }
        }
    }
}
public String  _b_noentrega_click() throws Exception{
 //BA.debugLineNum = 485;BA.debugLine="Sub b_noEntrega_Click";
 //BA.debugLineNum = 487;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT gestion FROM k";
_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 gestion FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 488;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 489;BA.debugLine="If c.GetInt(\"gestion\") = 2 Then";
if (_c.GetInt("gestion")==2) { 
 //BA.debugLineNum = 490;BA.debugLine="MsgboxAsync(\"El cliente ya fue entregado y no se";
__c.MsgboxAsync(BA.ObjectToCharSequence("El cliente ya fue entregado y no se puede realizar modificación"),BA.ObjectToCharSequence("Atención"),ba);
 }else {
 //BA.debugLineNum = 494;BA.debugLine="B4XPages.ShowPage(\"noVenta\")";
_b4xpages._showpage /*String*/ (ba,"noVenta");
 };
 //BA.debugLineNum = 496;BA.debugLine="End Sub";
return "";
}
public String  _b_paso2_click() throws Exception{
 //BA.debugLineNum = 926;BA.debugLine="Sub B_PASO2_Click";
 //BA.debugLineNum = 927;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 928;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 929;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 930;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CUENTA from cuen";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CUENTA from cuentaa")));
 //BA.debugLineNum = 931;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 932;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
_cuenta = _c.GetString("CUENTA");
 //BA.debugLineNum = 933;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 = 934;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 935;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 936;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 937;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM NOVENTA WH";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM NOVENTA WHERE NV_CLIENTE IN (select cuenta from cuentaa)");
 //BA.debugLineNum = 938;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO  NOVENTA";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO  NOVENTA (NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON) VALUES(?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cuenta),(Object)(_sdate+_stime),(Object)(_usuario),(Object)("PASO"),(Object)("PASO ESPERA"),(Object)(_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ )}));
 //BA.debugLineNum = 944;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 //BA.debugLineNum = 946;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear() throws Exception{
anywheresoftware.b4a.objects.collections.Map _cym = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc = null;
String _cuenta0 = "";
String _arti = "";
int _i = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc2 = null;
String _cuenta1 = "";
String _arti1 = "";
float _preu = 0f;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc3 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc4 = null;
String _cuenta2 = "";
String _arti2 = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc5 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c4 = null;
String _cuenta3 = "";
String _arti3 = "";
String _cabonos = "";
 //BA.debugLineNum = 144;BA.debugLine="Sub B4XPage_Appear";
 //BA.debugLineNum = 145;BA.debugLine="banderaimp = 0";
_banderaimp = (int) (0);
 //BA.debugLineNum = 146;BA.debugLine="Subs.centraPanel(p_principal, Root.Width)";
_subs._centrapanel /*String*/ (ba,_p_principal,_root.getWidth());
 //BA.debugLineNum = 147;BA.debugLine="Starter.skmt.Initialize(Starter.ruta,\"kmt.db\", Tr";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .Initialize(_starter._ruta /*String*/ ,"kmt.db",__c.True);
 //BA.debugLineNum = 148;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.SERVE";
_reqmanager._initialize /*String*/ (ba,this,_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ );
 //BA.debugLineNum = 149;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CAT_CL_CODIGO,CA";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_CODIGO,CAT_CL_RUTA,CAT_CL_NOMBRE,CAT_CL_ATIENDE1,CAT_CL_ATIENTE2,CAT_CL_TELEFONO,CAT_CL_EMAIL,CAT_CL_CALLE,CAT_CL_NOEXT,CAT_CL_NOINT,CAT_CL_CALLE1,CAT_CL_CALLE2,CAT_CL_COLONIA,CAT_CL_MUNI,CAT_CL_EDO,CAT_CL_CP,CAT_CL_LONG,CAT_CL_LAT, CAT_CL_BCREDITO  from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
 //BA.debugLineNum = 150;BA.debugLine="s=Starter.skmt.ExecQuery(\"select sum(pe_costo_tot";
_s = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")));
 //BA.debugLineNum = 151;BA.debugLine="s.Position=0";
_s.setPosition((int) (0));
 //BA.debugLineNum = 152;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 153;BA.debugLine="la_cuenta.Text = c.GetString(\"CAT_CL_CODIGO\")";
_la_cuenta.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CODIGO")));
 //BA.debugLineNum = 154;BA.debugLine="La_nombre.Text = c.GetString(\"CAT_CL_NOMBRE\")";
_la_nombre.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_NOMBRE")));
 //BA.debugLineNum = 155;BA.debugLine="NOMBRE = c.GetString(\"CAT_CL_NOMBRE\")";
_nombre = _c.GetString("CAT_CL_NOMBRE");
 //BA.debugLineNum = 156;BA.debugLine="LONGITUD = c.GetString(\"CAT_CL_LONG\")";
_longitud = _c.GetString("CAT_CL_LONG");
 //BA.debugLineNum = 157;BA.debugLine="LATITUD = c.GetString(\"CAT_CL_LAT\")";
_latitud = _c.GetString("CAT_CL_LAT");
 //BA.debugLineNum = 158;BA.debugLine="la_Calle.Text = c.GetString(\"CAT_CL_CALLE\") & c.G";
_la_calle.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE")+_c.GetString("CAT_CL_NOEXT")));
 //BA.debugLineNum = 159;BA.debugLine="la_col.Text = c.GetString(\"CAT_CL_COLONIA\")";
_la_col.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_COLONIA")));
 //BA.debugLineNum = 160;BA.debugLine="la_edo.Text = c.GetString(\"CAT_CL_EDO\")";
_la_edo.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_EDO")));
 //BA.debugLineNum = 161;BA.debugLine="la_cp.Text = c.GetString(\"CAT_CL_CP\")";
_la_cp.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CP")));
 //BA.debugLineNum = 162;BA.debugLine="l_entre1.Text = c.GetString(\"CAT_CL_CALLE1\")";
_l_entre1.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE1")));
 //BA.debugLineNum = 163;BA.debugLine="l_entre2.Text = c.GetString(\"CAT_CL_CALLE2\")";
_l_entre2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE2")));
 //BA.debugLineNum = 164;BA.debugLine="If c.GetString(\"CAT_CL_ATIENDE1\") <> Null And c.G";
if (_c.GetString("CAT_CL_ATIENDE1")!= null && (_c.GetString("CAT_CL_ATIENDE1")).equals("null") == false) { 
 //BA.debugLineNum = 165;BA.debugLine="l_atiende.Text = c.GetString(\"CAT_CL_ATIENDE1\")";
_l_atiende.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENDE1")));
 }else {
 //BA.debugLineNum = 167;BA.debugLine="l_atiende.Text = \" \"";
_l_atiende.setText(BA.ObjectToCharSequence(" "));
 };
 //BA.debugLineNum = 169;BA.debugLine="If c.GetString(\"CAT_CL_ATIENTE2\") <> Null And c.G";
if (_c.GetString("CAT_CL_ATIENTE2")!= null && (_c.GetString("CAT_CL_ATIENTE2")).equals("NULL") == false) { 
 //BA.debugLineNum = 170;BA.debugLine="l_atiende2.Text = c.GetString(\"CAT_CL_ATIENTE2\")";
_l_atiende2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENTE2")));
 }else {
 //BA.debugLineNum = 172;BA.debugLine="l_atiende2.Text = \" \"";
_l_atiende2.setText(BA.ObjectToCharSequence(" "));
 };
 //BA.debugLineNum = 174;BA.debugLine="la_saldotot.Text = c.GetString(\"CAT_CL_TELEFONO\")";
_la_saldotot.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_TELEFONO")));
 //BA.debugLineNum = 175;BA.debugLine="la_saldooper.Text = c.GetString(\"CAT_CL_EMAIL\")";
_la_saldooper.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_EMAIL")));
 //BA.debugLineNum = 177;BA.debugLine="CREDITO = C.GetString(\"CAT_CL_BCREDITO\")";
_credito = _c.GetString("CAT_CL_BCREDITO");
 //BA.debugLineNum = 180;BA.debugLine="Private cym As Map = Subs.traeCantYMonto2(Subs.tr";
_cym = new anywheresoftware.b4a.objects.collections.Map();
_cym = _subs._traecantymonto2 /*anywheresoftware.b4a.objects.collections.Map*/ (ba,_subs._traecliente /*String*/ (ba));
 //BA.debugLineNum = 181;BA.debugLine="L_CANT.Text = cym.Get(\"cantidad\")";
_l_cant.setText(BA.ObjectToCharSequence(_cym.Get((Object)("cantidad"))));
 //BA.debugLineNum = 182;BA.debugLine="l_total.Text = Round2(cym.Get(\"monto\"), 2)";
_l_total.setText(BA.ObjectToCharSequence(__c.Round2((double)(BA.ObjectToNumber(_cym.Get((Object)("monto")))),(int) (2))));
 //BA.debugLineNum = 190;BA.debugLine="Starter.skmt.ExecNonQuery(\"UPDATE HIST_VENTAS set";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE HIST_VENTAS set ESPROMO = 1  where HVD_CODPROMO = HVD_PROID AND HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)");
 //BA.debugLineNum = 191;BA.debugLine="Private vc As Cursor = Starter.skmt.ExecQuery($\"s";
_vc = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select HVD_PROID,HVD_COSTO_TOT, HVD_CANT, IFNULL(HVD_RECHAZOCANT, 0) AS HVD_RECHAZOCANT from HIST_VENTAS where BCAJAS = 0 and HVD_CODPROMO ='"+__c.SmartStringFormatter("",(Object)(_subs._traealmacen /*String*/ (ba)))+"' and HVD_CLIENTE in (select cuenta from cuentaa)"))));
 //BA.debugLineNum = 193;BA.debugLine="Private cuenta0 As String = 0";
_cuenta0 = BA.NumberToString(0);
 //BA.debugLineNum = 194;BA.debugLine="Private arti As String = 0";
_arti = BA.NumberToString(0);
 //BA.debugLineNum = 195;BA.debugLine="If vc.RowCount > 0 Then";
if (_vc.getRowCount()>0) { 
 //BA.debugLineNum = 196;BA.debugLine="For i = 0 To vc.RowCount - 1";
{
final int step41 = 1;
final int limit41 = (int) (_vc.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit41 ;_i = _i + step41 ) {
 //BA.debugLineNum = 197;BA.debugLine="vc.Position = i";
_vc.setPosition(_i);
 //BA.debugLineNum = 200;BA.debugLine="cuenta0 = cuenta0 + ((vc.GetString(\"HVD_CANT\")";
_cuenta0 = BA.NumberToString((double)(Double.parseDouble(_cuenta0))+(((double)(Double.parseDouble(_vc.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc.GetString("HVD_RECHAZOCANT"))))*((double)(Double.parseDouble(_vc.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_vc.GetString("HVD_CANT"))))));
 //BA.debugLineNum = 205;BA.debugLine="arti = arti + (vc.GetString(\"HVD_CANT\") - vc.Ge";
_arti = BA.NumberToString((double)(Double.parseDouble(_arti))+((double)(Double.parseDouble(_vc.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc.GetString("HVD_RECHAZOCANT")))));
 }
};
 };
 //BA.debugLineNum = 211;BA.debugLine="Private vc2 As Cursor = Starter.skmt.ExecQuery(\"s";
_vc2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select HVD_PROID, HVD_CANT, IFNULL(HVD_RECHAZOCANT, 0) AS HVD_RECHAZOCANT, CANTC,HVD_COSTO_TOT from HIST_VENTAS where HVD_CLIENTE in (select cuenta from cuentaa) AND BCAJAS = 1")));
 //BA.debugLineNum = 212;BA.debugLine="Private Cuenta1 As String = 0";
_cuenta1 = BA.NumberToString(0);
 //BA.debugLineNum = 213;BA.debugLine="Private arti1 As String = 0";
_arti1 = BA.NumberToString(0);
 //BA.debugLineNum = 214;BA.debugLine="If vc2.RowCount > 0 Then";
if (_vc2.getRowCount()>0) { 
 //BA.debugLineNum = 215;BA.debugLine="For i = 0 To vc2.RowCount - 1";
{
final int step51 = 1;
final int limit51 = (int) (_vc2.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit51 ;_i = _i + step51 ) {
 //BA.debugLineNum = 216;BA.debugLine="vc2.Position = i";
_vc2.setPosition(_i);
 //BA.debugLineNum = 217;BA.debugLine="Dim preu As Float = NumberFormat2(vc2.GetString";
_preu = (float)(Double.parseDouble(__c.NumberFormat2((double)(Double.parseDouble(_vc2.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_vc2.GetString("CANTC"))),(int) (0),(int) (2),(int) (2),__c.False)));
 //BA.debugLineNum = 218;BA.debugLine="Private vc3 As Cursor = Starter.skmt.ExecQuery(";
_vc3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc3 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select PRECIOCONVER, CONVERSION from CAT_GUNAPROD where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_vc2.GetString("HVD_PROID")))+"'"))));
 //BA.debugLineNum = 219;BA.debugLine="If vc3.RowCount > 0 Then";
if (_vc3.getRowCount()>0) { 
 //BA.debugLineNum = 220;BA.debugLine="vc3.Position = 0";
_vc3.setPosition((int) (0));
 //BA.debugLineNum = 221;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 = 222;BA.debugLine="arti1 = arti1 + (vc2.GetString(\"HVD_CANT\") - v";
_arti1 = BA.NumberToString((double)(Double.parseDouble(_arti1))+((double)(Double.parseDouble(_vc2.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc2.GetString("HVD_RECHAZOCANT")))));
 };
 }
};
 };
 //BA.debugLineNum = 228;BA.debugLine="Private vc4 As Cursor = Starter.skmt.ExecQuery($\"";
_vc4 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc4 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select HVD_PROID,HVD_PRONOMBRE,HVD_COSTO_TOT, HVD_CANT, IFNULL(HVD_RECHAZOCANT, 0) AS HVD_RECHAZOCANT, CANTC,HVD_COSTO_TOT, HVD_RECHAZO, HVD_CODPROMO from HIST_VENTAS where HVD_CLIENTE in (select cuenta from cuentaa) AND BCAJAS = 0 and HVD_CODPROMO <> '"+__c.SmartStringFormatter("",(Object)(_subs._traealmacen /*String*/ (ba)))+"'"))));
 //BA.debugLineNum = 229;BA.debugLine="Private Cuenta2 As String = 0";
_cuenta2 = BA.NumberToString(0);
 //BA.debugLineNum = 230;BA.debugLine="Private arti2 As String = 0";
_arti2 = BA.NumberToString(0);
 //BA.debugLineNum = 231;BA.debugLine="If vc4.RowCount > 0 Then";
if (_vc4.getRowCount()>0) { 
 //BA.debugLineNum = 233;BA.debugLine="For i = 0 To vc4.RowCount - 1";
{
final int step66 = 1;
final int limit66 = (int) (_vc4.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit66 ;_i = _i + step66 ) {
 //BA.debugLineNum = 234;BA.debugLine="vc4.Position = i";
_vc4.setPosition(_i);
 //BA.debugLineNum = 235;BA.debugLine="If vc4.GetString(\"HVD_PROID\") <> vc4.GetString(";
if ((_vc4.GetString("HVD_PROID")).equals(_vc4.GetString("HVD_CODPROMO")) == false) { 
 //BA.debugLineNum = 236;BA.debugLine="If vc4.GetString(\"HVD_RECHAZO\") = 0 Then";
if ((_vc4.GetString("HVD_RECHAZO")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 237;BA.debugLine="Cuenta2 = Cuenta2 + vc4.GetString(\"HVD_COSTO_";
_cuenta2 = BA.NumberToString((double)(Double.parseDouble(_cuenta2))+(double)(Double.parseDouble(_vc4.GetString("HVD_COSTO_TOT"))));
 //BA.debugLineNum = 238;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 = 240;BA.debugLine="Private vc5 As Cursor = Starter.skmt.ExecQuer";
_vc5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc5 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select CAT_GP_PRECIO from CAT_GUNAPROD where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_vc4.GetString("HVD_PROID")))+"'"))));
 //BA.debugLineNum = 241;BA.debugLine="If vc5.RowCount > 0 Then";
if (_vc5.getRowCount()>0) { 
 //BA.debugLineNum = 242;BA.debugLine="vc5.Position= 0";
_vc5.setPosition((int) (0));
 //BA.debugLineNum = 244;BA.debugLine="Cuenta2 = Cuenta2 +((vc4.GetString(\"HVD_CANT";
_cuenta2 = BA.NumberToString((double)(Double.parseDouble(_cuenta2))+(((double)(Double.parseDouble(_vc4.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc4.GetString("HVD_RECHAZOCANT"))))*((double)(Double.parseDouble(_vc4.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_vc4.GetString("HVD_CANT"))))));
 //BA.debugLineNum = 245;BA.debugLine="arti2 = arti2 +(vc4.GetString(\"HVD_CANT\")- v";
_arti2 = BA.NumberToString((double)(Double.parseDouble(_arti2))+((double)(Double.parseDouble(_vc4.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc4.GetString("HVD_RECHAZOCANT")))));
 };
 };
 };
 }
};
 };
 //BA.debugLineNum = 253;BA.debugLine="Subs.centraPanel(p_credito, Root.Width)";
_subs._centrapanel /*String*/ (ba,_p_credito,_root.getWidth());
 //BA.debugLineNum = 254;BA.debugLine="Private c4 As Cursor = Starter.skmt.ExecQuery($\"S";
_c4 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c4 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("SELECT IFNULL(PE_CANT,0) AS PE_CANT, iFNULL(PE_COSTO_TOT,0) AS PE_COSTO_TOT FROM PEDIDO WHERE PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA)"))));
 //BA.debugLineNum = 255;BA.debugLine="Private Cuenta3 As String = 0";
_cuenta3 = BA.NumberToString(0);
 //BA.debugLineNum = 256;BA.debugLine="Private arti3 As String = 0";
_arti3 = BA.NumberToString(0);
 //BA.debugLineNum = 257;BA.debugLine="If c4.RowCount > 0 Then";
if (_c4.getRowCount()>0) { 
 //BA.debugLineNum = 258;BA.debugLine="For i = 0 To c4.RowCount -1";
{
final int step88 = 1;
final int limit88 = (int) (_c4.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit88 ;_i = _i + step88 ) {
 //BA.debugLineNum = 259;BA.debugLine="c4.Position = i";
_c4.setPosition(_i);
 //BA.debugLineNum = 260;BA.debugLine="arti3 = arti3 + c4.GetString(\"PE_CANT\")";
_arti3 = BA.NumberToString((double)(Double.parseDouble(_arti3))+(double)(Double.parseDouble(_c4.GetString("PE_CANT"))));
 //BA.debugLineNum = 261;BA.debugLine="Cuenta3 = Cuenta3 + c4.GetString(\"PE_COSTO_TOT\"";
_cuenta3 = BA.NumberToString((double)(Double.parseDouble(_cuenta3))+(double)(Double.parseDouble(_c4.GetString("PE_COSTO_TOT"))));
 }
};
 };
 //BA.debugLineNum = 264;BA.debugLine="Log(cuenta0)";
__c.LogImpl("58061048",_cuenta0,0);
 //BA.debugLineNum = 265;BA.debugLine="Log(Cuenta1)";
__c.LogImpl("58061049",_cuenta1,0);
 //BA.debugLineNum = 266;BA.debugLine="Log(Cuenta2)";
__c.LogImpl("58061050",_cuenta2,0);
 //BA.debugLineNum = 267;BA.debugLine="Log(Cuenta3)";
__c.LogImpl("58061051",_cuenta3,0);
 //BA.debugLineNum = 269;BA.debugLine="l_total.Text = NumberFormat2((cuenta0 + Cuenta1 +";
_l_total.setText(BA.ObjectToCharSequence(__c.NumberFormat2(((double)(Double.parseDouble(_cuenta0))+(double)(Double.parseDouble(_cuenta1))+(double)(Double.parseDouble(_cuenta2))+(double)(Double.parseDouble(_cuenta3))),(int) (0),(int) (2),(int) (2),__c.True)));
 //BA.debugLineNum = 270;BA.debugLine="L_CANT.Text = NumberFormat2((arti + arti1 +arti2";
_l_cant.setText(BA.ObjectToCharSequence(__c.NumberFormat2(((double)(Double.parseDouble(_arti))+(double)(Double.parseDouble(_arti1))+(double)(Double.parseDouble(_arti2))+(double)(Double.parseDouble(_arti3))),(int) (0),(int) (0),(int) (0),__c.True)));
 //BA.debugLineNum = 275;BA.debugLine="c = Starter.skmt.ExecQuery2(\"select CAT_VA_VALOR";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?",new String[]{"MACIMP"})));
 //BA.debugLineNum = 276;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 277;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 278;BA.debugLine="Starter.MAC_IMPRESORA = c.GetString(\"CAT_VA_VALO";
_starter._mac_impresora /*String*/  = _c.GetString("CAT_VA_VALOR");
 };
 //BA.debugLineNum = 280;BA.debugLine="If Starter.MAC_IMPRESORA = \"\" Then Starter.MAC_IM";
if ((_starter._mac_impresora /*String*/ ).equals("")) { 
_starter._mac_impresora /*String*/  = "0";};
 //BA.debugLineNum = 282;BA.debugLine="Printer1.Initialize(Me, \"Printer1\")";
_printer1._initialize /*String*/ (ba,this,"Printer1");
 //BA.debugLineNum = 284;BA.debugLine="If Printer1.IsConnected = False Then";
if (_printer1._isconnected /*boolean*/ ()==__c.False) { 
 }else {
 //BA.debugLineNum = 288;BA.debugLine="Printer1.DisConnect";
_printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 289;BA.debugLine="Printer1.Connect";
_printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 290;BA.debugLine="Log(\"2\")";
__c.LogImpl("58061074","2",0);
 };
 //BA.debugLineNum = 320;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 = 321;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 322;BA.debugLine="almacen = c.GetString(\"ID_ALMACEN\")";
_almacen = _c.GetString("ID_ALMACEN");
 //BA.debugLineNum = 323;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 326;BA.debugLine="If almacen = \"3\" Or almacen = 3 Or almacen = \"5\"";
if ((_almacen).equals("3") || (_almacen).equals(BA.NumberToString(3)) || (_almacen).equals("5") || (_almacen).equals(BA.NumberToString(5))) { 
 //BA.debugLineNum = 327;BA.debugLine="Tar.Visible = False";
_tar.setVisible(__c.False);
 //BA.debugLineNum = 328;BA.debugLine="Log(\"SI AQUI\")";
__c.LogImpl("58061112","SI AQUI",0);
 //BA.debugLineNum = 329;BA.debugLine="b = Starter.skmt.ExecQuery(\"select COUNT(*) AS C";
_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 CLIENTE FROM ABONOSP WHERE CLIENTE IN (Select CUENTA from cuentaa)")));
 //BA.debugLineNum = 330;BA.debugLine="b.Position = 0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 331;BA.debugLine="Dim cabonos As String = b.GetString(\"CLIENTE\")";
_cabonos = _b.GetString("CLIENTE");
 //BA.debugLineNum = 332;BA.debugLine="If cabonos = 0 Then";
if ((_cabonos).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 333;BA.debugLine="b_cxc.Visible = False";
_b_cxc.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 335;BA.debugLine="b_cxc.Visible = False";
_b_cxc.setVisible(__c.False);
 };
 };
 //BA.debugLineNum = 339;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest() throws Exception{
ResumableSub_B4XPage_CloseRequest rsub = new ResumableSub_B4XPage_CloseRequest(this);
rsub.resume(ba, null);
return (anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.keywords.Common.ResumableSubWrapper(), rsub);
}
public static class ResumableSub_B4XPage_CloseRequest extends BA.ResumableSub {
public ResumableSub_B4XPage_CloseRequest(reparto_izca.keymon.lat.c_cliente parent) {
this.parent = parent;
}
reparto_izca.keymon.lat.c_cliente parent;

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

    while (true) {
        switch (state) {
            case -1:
{
parent.__c.ReturnFromResumableSub(this,null);return;}
case 0:
//C
this.state = 1;
 //BA.debugLineNum = 501;BA.debugLine="If p_credito.Visible Then";
if (true) break;

case 1:
//if
this.state = 6;
if (parent._p_credito.getVisible()) { 
this.state = 3;
}else {
this.state = 5;
}if (true) break;

case 3:
//C
this.state = 6;
 //BA.debugLineNum = 502;BA.debugLine="et_montoacredito.Text = \"\"";
parent._et_montoacredito.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 503;BA.debugLine="p_credito.Visible = False";
parent._p_credito.setVisible(parent.__c.False);
 //BA.debugLineNum = 504;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 if (true) break;

case 5:
//C
this.state = 6;
 //BA.debugLineNum = 506;BA.debugLine="B4XPages.ShowPage(\"Clientes\")";
parent._b4xpages._showpage /*String*/ (ba,"Clientes");
 //BA.debugLineNum = 507;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 if (true) break;

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

            }
        }
    }
}
public String  _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
 //BA.debugLineNum = 105;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
 //BA.debugLineNum = 106;BA.debugLine="Root = Root1";
_root = _root1;
 //BA.debugLineNum = 108;BA.debugLine="g.Initialize(\"GPS\")";
_g.Initialize("GPS");
 //BA.debugLineNum = 110;BA.debugLine="Root.LoadLayout(\"cliente\")";
_root.LoadLayout("cliente",ba);
 //BA.debugLineNum = 111;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CAT_CL_CODIGO, C";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_CODIGO, CAT_CL_RUTA, CAT_CL_NOMBRE, CAT_CL_ATIENDE1, CAT_CL_ATIENTE2, CAT_CL_TELEFONO, CAT_CL_EMAIL, CAT_CL_CALLE, CAT_CL_NOEXT,CAT_CL_NOINT,CAT_CL_CALLE1,CAT_CL_CALLE2,CAT_CL_COLONIA,CAT_CL_MUNI,CAT_CL_EDO,CAT_CL_CP,CAT_CL_LONG,CAT_CL_LAT  from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
 //BA.debugLineNum = 112;BA.debugLine="s=Starter.skmt.ExecQuery(\"select sum(pe_costo_tot";
_s = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")));
 //BA.debugLineNum = 113;BA.debugLine="s.Position=0";
_s.setPosition((int) (0));
 //BA.debugLineNum = 114;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 115;BA.debugLine="la_cuenta.Text = c.GetString(\"CAT_CL_CODIGO\")";
_la_cuenta.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CODIGO")));
 //BA.debugLineNum = 116;BA.debugLine="La_nombre.Text = c.GetString(\"CAT_CL_NOMBRE\")";
_la_nombre.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_NOMBRE")));
 //BA.debugLineNum = 117;BA.debugLine="la_Calle.Text = c.GetString(\"CAT_CL_CALLE\") & c.G";
_la_calle.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE")+_c.GetString("CAT_CL_NOEXT")));
 //BA.debugLineNum = 118;BA.debugLine="la_col.Text = c.GetString(\"CAT_CL_COLONIA\")";
_la_col.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_COLONIA")));
 //BA.debugLineNum = 119;BA.debugLine="la_edo.Text = c.GetString(\"CAT_CL_EDO\")";
_la_edo.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_EDO")));
 //BA.debugLineNum = 120;BA.debugLine="la_cp.Text = c.GetString(\"CAT_CL_CP\")";
_la_cp.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CP")));
 //BA.debugLineNum = 121;BA.debugLine="l_entre1.Text = c.GetString(\"CAT_CL_CALLE1\")";
_l_entre1.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE1")));
 //BA.debugLineNum = 122;BA.debugLine="l_entre2.Text = c.GetString(\"CAT_CL_CALLE2\")";
_l_entre2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE2")));
 //BA.debugLineNum = 123;BA.debugLine="If c.GetString(\"CAT_CL_ATIENDE1\") <> Null And c.G";
if (_c.GetString("CAT_CL_ATIENDE1")!= null && (_c.GetString("CAT_CL_ATIENDE1")).equals("null") == false) { 
 //BA.debugLineNum = 124;BA.debugLine="l_atiende.Text = c.GetString(\"CAT_CL_ATIENDE1\")";
_l_atiende.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENDE1")));
 }else {
 //BA.debugLineNum = 126;BA.debugLine="l_atiende.Text = \" \"";
_l_atiende.setText(BA.ObjectToCharSequence(" "));
 };
 //BA.debugLineNum = 128;BA.debugLine="If c.GetString(\"CAT_CL_ATIENTE2\") <> Null And c.G";
if (_c.GetString("CAT_CL_ATIENTE2")!= null && (_c.GetString("CAT_CL_ATIENTE2")).equals("NULL") == false) { 
 //BA.debugLineNum = 129;BA.debugLine="l_atiende2.Text = c.GetString(\"CAT_CL_ATIENTE2\")";
_l_atiende2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENTE2")));
 //BA.debugLineNum = 130;BA.debugLine="Log(\"|\"&c.GetString(\"CAT_CL_ATIENTE2\")&\"|\")";
__c.LogImpl("57995417","|"+_c.GetString("CAT_CL_ATIENTE2")+"|",0);
 }else {
 //BA.debugLineNum = 132;BA.debugLine="l_atiende2.Text = \" \"";
_l_atiende2.setText(BA.ObjectToCharSequence(" "));
 };
 //BA.debugLineNum = 134;BA.debugLine="la_saldotot.Text = c.GetString(\"CAT_CL_TELEFONO\")";
_la_saldotot.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_TELEFONO")));
 //BA.debugLineNum = 135;BA.debugLine="la_saldooper.Text = c.GetString(\"CAT_CL_EMAIL\")";
_la_saldooper.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_EMAIL")));
 //BA.debugLineNum = 137;BA.debugLine="btAdmin.Initialize(\"BlueTeeth\")";
_btadmin.Initialize(ba,"BlueTeeth");
 //BA.debugLineNum = 138;BA.debugLine="cmp20.Initialize(\"Printer\")";
_cmp20.Initialize("Printer");
 //BA.debugLineNum = 139;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.SERVE";
_reqmanager._initialize /*String*/ (ba,this,_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ );
 //BA.debugLineNum = 140;BA.debugLine="End Sub";
return "";
}
public String  _cb_tipopago_selectedindexchanged(int _index) throws Exception{
 //BA.debugLineNum = 1355;BA.debugLine="Private Sub cb_tipopago_SelectedIndexChanged (Inde";
 //BA.debugLineNum = 1356;BA.debugLine="itemselect = cb_tipopago.SelectedItem";
_itemselect = _cb_tipopago._getselecteditem /*String*/ ();
 //BA.debugLineNum = 1357;BA.debugLine="End Sub";
return "";
}
public String  _class_globals() throws Exception{
 //BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 2;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
 //BA.debugLineNum = 3;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
 //BA.debugLineNum = 4;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
 //BA.debugLineNum = 5;BA.debugLine="Dim clie_id As String";
_clie_id = "";
 //BA.debugLineNum = 6;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 7;BA.debugLine="Dim usuario As String";
_usuario = "";
 //BA.debugLineNum = 8;BA.debugLine="Dim cuenta As String";
_cuenta = "";
 //BA.debugLineNum = 9;BA.debugLine="Dim btAdmin As BluetoothAdmin";
_btadmin = new anywheresoftware.b4a.objects.Serial.BluetoothAdmin();
 //BA.debugLineNum = 10;BA.debugLine="Dim cmp20 As Serial";
_cmp20 = new anywheresoftware.b4a.objects.Serial();
 //BA.debugLineNum = 11;BA.debugLine="Dim printer As TextWriter";
_printer = new anywheresoftware.b4a.objects.streams.File.TextWriterWrapper();
 //BA.debugLineNum = 12;BA.debugLine="Dim PairedDevices As Map";
_paireddevices = new anywheresoftware.b4a.objects.collections.Map();
 //BA.debugLineNum = 13;BA.debugLine="Dim L As List";
_l = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 14;BA.debugLine="Dim TAMANO As Int";
_tamano = 0;
 //BA.debugLineNum = 15;BA.debugLine="Dim ESPACIO As Int";
_espacio = 0;
 //BA.debugLineNum = 16;BA.debugLine="Dim BLANCO As String";
_blanco = "";
 //BA.debugLineNum = 17;BA.debugLine="Dim impresoraConectada As Boolean = False";
_impresoraconectada = __c.False;
 //BA.debugLineNum = 18;BA.debugLine="Dim LONGITUD As String";
_longitud = "";
 //BA.debugLineNum = 19;BA.debugLine="Dim LATITUD As String";
_latitud = "";
 //BA.debugLineNum = 20;BA.debugLine="Dim NOMBRE As String";
_nombre = "";
 //BA.debugLineNum = 21;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 22;BA.debugLine="Dim s As Cursor";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 23;BA.debugLine="Dim ListView1 As ListView";
_listview1 = new anywheresoftware.b4a.objects.ListViewWrapper();
 //BA.debugLineNum = 24;BA.debugLine="Dim la_cuenta As Label";
_la_cuenta = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 25;BA.debugLine="Dim La_nombre As Label";
_la_nombre = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 26;BA.debugLine="Dim la_Calle As Label";
_la_calle = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 27;BA.debugLine="Dim la_numero As Label";
_la_numero = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 28;BA.debugLine="Dim la_nint As Label";
_la_nint = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 29;BA.debugLine="Dim la_edo As Label";
_la_edo = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 30;BA.debugLine="Dim la_pob As Label";
_la_pob = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 31;BA.debugLine="Dim la_col As Label";
_la_col = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 32;BA.debugLine="Dim la_cp As Label";
_la_cp = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 33;BA.debugLine="Dim la_zona As Label";
_la_zona = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 34;BA.debugLine="Dim gest As Button";
_gest = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 35;BA.debugLine="Dim la_saldotot As Label";
_la_saldotot = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 36;BA.debugLine="Dim la_saldooper As Label";
_la_saldooper = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 37;BA.debugLine="Dim reqManager As DBRequestManager";
_reqmanager = new reparto_izca.keymon.lat.dbrequestmanager();
 //BA.debugLineNum = 38;BA.debugLine="Dim b_noEntrega As Button";
_b_noentrega = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 39;BA.debugLine="Dim Label10 As Label";
_label10 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 40;BA.debugLine="Dim Label11 As Label";
_label11 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 41;BA.debugLine="Dim d As Cursor";
_d = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 42;BA.debugLine="Dim ime As IME";
_ime = new anywheresoftware.b4a.objects.IME();
 //BA.debugLineNum = 43;BA.debugLine="Dim Tar As Button";
_tar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 44;BA.debugLine="Private L_QR As Label";
_l_qr = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 45;BA.debugLine="Private BT_QR As Button";
_bt_qr = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 46;BA.debugLine="Dim Printer1 As EscPosPrinter";
_printer1 = new reparto_izca.keymon.lat.escposprinter();
 //BA.debugLineNum = 47;BA.debugLine="Dim la_comm As Label";
_la_comm = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 48;BA.debugLine="Dim la_actdte As Label";
_la_actdte = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 49;BA.debugLine="Dim la_usuario As Label";
_la_usuario = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 50;BA.debugLine="Dim la_resultado As Label";
_la_resultado = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 51;BA.debugLine="Dim l_entre1 As Label";
_l_entre1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 52;BA.debugLine="Dim l_entre2 As Label";
_l_entre2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 53;BA.debugLine="Dim l_atiende As Label";
_l_atiende = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 54;BA.debugLine="Dim l_atiende2 As Label";
_l_atiende2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 55;BA.debugLine="Dim DATOS As Button";
_datos = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 56;BA.debugLine="Dim Guardar As Button";
_guardar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 57;BA.debugLine="Dim NUEVO As Button";
_nuevo = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 58;BA.debugLine="Private l_total As Label";
_l_total = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 59;BA.debugLine="Private HIST As Button";
_hist = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 60;BA.debugLine="Dim PASA_IMP As String";
_pasa_imp = "";
 //BA.debugLineNum = 61;BA.debugLine="Private B_IMP As Button";
_b_imp = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 62;BA.debugLine="Dim total_cliente As String";
_total_cliente = "";
 //BA.debugLineNum = 63;BA.debugLine="Dim CREDITO As String";
_credito = "";
 //BA.debugLineNum = 64;BA.debugLine="Private p_principal As Panel";
_p_principal = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 65;BA.debugLine="Private B_PASO2 As Button";
_b_paso2 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 66;BA.debugLine="Private L_CANT As Label";
_l_cant = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 67;BA.debugLine="Dim errorImpresora As Int = 0";
_errorimpresora = (int) (0);
 //BA.debugLineNum = 68;BA.debugLine="Dim banderaimp As Int";
_banderaimp = 0;
 //BA.debugLineNum = 69;BA.debugLine="Private l_credi As Label";
_l_credi = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 70;BA.debugLine="Private l_pagare As Label";
_l_pagare = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 71;BA.debugLine="Private l_montopag As Label";
_l_montopag = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 72;BA.debugLine="Private l_efectivo As Label";
_l_efectivo = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 73;BA.debugLine="Private l_montoefec As Label";
_l_montoefec = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 74;BA.debugLine="Private p_credito As Panel";
_p_credito = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 75;BA.debugLine="Private b_acred As Button";
_b_acred = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 76;BA.debugLine="Private b_cancred As Button";
_b_cancred = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 77;BA.debugLine="Private et_montoacredito As EditText";
_et_montoacredito = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 78;BA.debugLine="Private Label16 As Label";
_label16 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 79;BA.debugLine="Private l_limite As Label";
_l_limite = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 80;BA.debugLine="Dim almacen As String";
_almacen = "";
 //BA.debugLineNum = 81;BA.debugLine="Dim fechaprev As String";
_fechaprev = "";
 //BA.debugLineNum = 82;BA.debugLine="Dim rutaprev As String";
_rutaprev = "";
 //BA.debugLineNum = 83;BA.debugLine="Dim rutarep As String";
_rutarep = "";
 //BA.debugLineNum = 84;BA.debugLine="Dim montopagare As String";
_montopagare = "";
 //BA.debugLineNum = 85;BA.debugLine="Private p_abono As Panel";
_p_abono = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 86;BA.debugLine="Private clv_abonos As CustomListView";
_clv_abonos = new b4a.example3.customlistview();
 //BA.debugLineNum = 87;BA.debugLine="Private et_abono As EditText";
_et_abono = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 88;BA.debugLine="Private b_cancelar As Button";
_b_cancelar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 89;BA.debugLine="Private b_abono As Button";
_b_abono = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 90;BA.debugLine="Private l_montoabonostotal As Label";
_l_montoabonostotal = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 91;BA.debugLine="Dim h, j,b, f As Cursor";
_h = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_j = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_b = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_f = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 92;BA.debugLine="Private l_folio As Label";
_l_folio = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 93;BA.debugLine="Private l_saldo As Label";
_l_saldo = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 94;BA.debugLine="Private b_cxc As Button";
_b_cxc = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 95;BA.debugLine="Private cb_tipopago As B4XComboBox";
_cb_tipopago = new reparto_izca.keymon.lat.b4xcombobox();
 //BA.debugLineNum = 96;BA.debugLine="Dim itemselect As String";
_itemselect = "";
 //BA.debugLineNum = 97;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.objects.PanelWrapper  _createlistitem(String _mostrar,String _mostrar1) throws Exception{
anywheresoftware.b4a.objects.B4XViewWrapper _p = null;
 //BA.debugLineNum = 1200;BA.debugLine="Sub CreateListItem(mostrar As String, mostrar1 As";
 //BA.debugLineNum = 1201;BA.debugLine="Dim p As B4XView = xui.CreatePanel(\"\")";
_p = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p = _xui.CreatePanel(ba,"");
 //BA.debugLineNum = 1202;BA.debugLine="p.SetLayoutAnimated(0, 0, 0, 1, 10)";
_p.SetLayoutAnimated((int) (0),(int) (0),(int) (0),(int) (1),(int) (10));
 //BA.debugLineNum = 1203;BA.debugLine="p.LoadLayout(\"folioabono\")";
_p.LoadLayout("folioabono",ba);
 //BA.debugLineNum = 1204;BA.debugLine="p.Height= 32dip";
_p.setHeight(__c.DipToCurrent((int) (32)));
 //BA.debugLineNum = 1205;BA.debugLine="p.Width = 80dip";
_p.setWidth(__c.DipToCurrent((int) (80)));
 //BA.debugLineNum = 1207;BA.debugLine="l_folio.Text = mostrar";
_l_folio.setText(BA.ObjectToCharSequence(_mostrar));
 //BA.debugLineNum = 1208;BA.debugLine="l_saldo.Text = mostrar1";
_l_saldo.setText(BA.ObjectToCharSequence(_mostrar1));
 //BA.debugLineNum = 1211;BA.debugLine="Return p";
if (true) return (anywheresoftware.b4a.objects.PanelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.PanelWrapper(), (android.view.ViewGroup)(_p.getObject()));
 //BA.debugLineNum = 1212;BA.debugLine="End Sub";
return null;
}
public String  _datos_click() throws Exception{
 //BA.debugLineNum = 517;BA.debugLine="Sub DATOS_Click";
 //BA.debugLineNum = 519;BA.debugLine="End Sub";
return "";
}
public String  _gest_click() throws Exception{
 //BA.debugLineNum = 360;BA.debugLine="Sub gest_Click";
 //BA.debugLineNum = 361;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT gestion FROM k";
_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 gestion FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 362;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 363;BA.debugLine="If c.GetInt(\"gestion\") = 2 Then";
if (_c.GetInt("gestion")==2) { 
 //BA.debugLineNum = 364;BA.debugLine="MsgboxAsync(\"El cliente ya fue entregado y no se";
__c.MsgboxAsync(BA.ObjectToCharSequence("El cliente ya fue entregado y no se puede realizar modificación"),BA.ObjectToCharSequence("Atención"),ba);
 }else {
 //BA.debugLineNum = 429;BA.debugLine="B_IMP_Click";
_b_imp_click();
 //BA.debugLineNum = 430;BA.debugLine="banderaimp = 1";
_banderaimp = (int) (1);
 };
 //BA.debugLineNum = 434;BA.debugLine="End Sub";
return "";
}
public String  _gps_locationchanged(anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
 //BA.debugLineNum = 345;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
 //BA.debugLineNum = 348;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 349;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 350;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 351;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 352;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM HIST_GPS\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM HIST_GPS");
 //BA.debugLineNum = 353;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO  HIST_GPS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO  HIST_GPS (HGDATE, HGLAT, HGLON) VALUES(?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_sdate+_stime),(Object)(_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ )}));
 //BA.debugLineNum = 354;BA.debugLine="End Sub";
return "";
}
public String  _guardado() throws Exception{
String _ruta = "";
String _rutapre = "";
String _rutaactualizar = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _rut = null;
 //BA.debugLineNum = 436;BA.debugLine="Sub Guardado";
 //BA.debugLineNum = 437;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 438;BA.debugLine="DateTime.TimeFormat=\"HHmmss\"";
__c.DateTime.setTimeFormat("HHmmss");
 //BA.debugLineNum = 439;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 440;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 441;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CUENTA from cuen";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CUENTA from cuentaa")));
 //BA.debugLineNum = 442;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 443;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
_cuenta = _c.GetString("CUENTA");
 //BA.debugLineNum = 444;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 = 445;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 446;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 447;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 448;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT RUTAA FROM RUT";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT RUTAA FROM RUTAA")));
 //BA.debugLineNum = 449;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 450;BA.debugLine="Dim ruta As String = d.GetString(\"RUTAA\")";
_ruta = _d.GetString("RUTAA");
 //BA.debugLineNum = 451;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 452;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT CAT_CL_RUTA FR";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT CAT_CL_RUTA FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 453;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 454;BA.debugLine="Dim rutapre As String = d.GetString(\"CAT_CL_RUTA\"";
_rutapre = _d.GetString("CAT_CL_RUTA");
 //BA.debugLineNum = 455;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 459;BA.debugLine="Dim fechaprev As String = Subs.traefECHAPREV";
_fechaprev = _subs._traefechaprev /*String*/ (ba);
 //BA.debugLineNum = 462;BA.debugLine="Dim rutaactualizar As String";
_rutaactualizar = "";
 //BA.debugLineNum = 463;BA.debugLine="Dim rut As Cursor = Starter.skmt.ExecQuery(\"SELEC";
_rut = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_rut = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT CAT_CL_RUTA FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 464;BA.debugLine="If rut.RowCount > 0 Then";
if (_rut.getRowCount()>0) { 
 //BA.debugLineNum = 465;BA.debugLine="rut.Position = 0";
_rut.setPosition((int) (0));
 //BA.debugLineNum = 466;BA.debugLine="rutaactualizar = rut.GetString(\"CAT_CL_RUTA\")";
_rutaactualizar = _rut.GetString("CAT_CL_RUTA");
 };
 //BA.debugLineNum = 469;BA.debugLine="Starter.skmt.ExecNonQuery($\"DELETE FROM NOVENTA W";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("DELETE FROM NOVENTA WHERE NV_CLIENTE IN (select cuenta from cuentaa) AND NV_RUTA ='"+__c.SmartStringFormatter("",(Object)(_rutaactualizar))+"' "));
 //BA.debugLineNum = 470;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO NOVENTA (";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO NOVENTA (NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON,NV_RUTA) VALUES(?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cuenta),(Object)(_sdate+" "+_stime),(Object)(_usuario),(Object)("ENTREGA"),(Object)("ENTREGA COMPLETA"),(Object)(_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_rutaactualizar)}));
 //BA.debugLineNum = 471;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO REPARTO_G";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO REPARTO_GEO (CLIENTE, USUARIO, FECHA_PUNTEO, LATITUD, LONGITUD, ALMACEN, RUTA_REPARTO, RUTA_PREV, FECHA_PREVENTA, TIPO,ENVIO) VALUES(?,?,?,?,?,?,?,?,?,?,0)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_la_cuenta.getText(),_usuario,_sdate+" "+_stime,_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ,_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ ,_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._almacen /*String*/ ,_ruta,_rutapre,_fechaprev,"ENTREGADO"}));
 //BA.debugLineNum = 472;BA.debugLine="Starter.skmt.ExecNonQuery($\"UPDATE kmt_info set g";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("UPDATE kmt_info set gestion = 2, HORAENT = '"+__c.SmartStringFormatter("",(Object)(_sdate+" "+_stime))+"' where CAT_CL_CODIGO In (select cuenta from cuentaa) and CAT_CL_RUTA = '"+__c.SmartStringFormatter("",(Object)(_rutaactualizar))+"' "));
 //BA.debugLineNum = 473;BA.debugLine="Starter.skmt.ExecNonQuery(\"update HIST_VENTAS SET";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("update HIST_VENTAS SET HVD_ESTATUS = 1 WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)");
 //BA.debugLineNum = 474;BA.debugLine="mandaPendientesreparto";
_mandapendientesreparto();
 //BA.debugLineNum = 481;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 //BA.debugLineNum = 483;BA.debugLine="End Sub";
return "";
}
public String  _guardar_click() throws Exception{
 //BA.debugLineNum = 521;BA.debugLine="Sub Guardar_Click";
 //BA.debugLineNum = 526;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 //BA.debugLineNum = 528;BA.debugLine="End Sub";
return "";
}
public String  _hist_click() throws Exception{
 //BA.debugLineNum = 534;BA.debugLine="Sub HIST_Click";
 //BA.debugLineNum = 536;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT gestion FROM k";
_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 gestion FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 537;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 538;BA.debugLine="If c.GetInt(\"gestion\") = 2 Then";
if (_c.GetInt("gestion")==2) { 
 //BA.debugLineNum = 539;BA.debugLine="MsgboxAsync(\"El cliente ya fue entregado y no se";
__c.MsgboxAsync(BA.ObjectToCharSequence("El cliente ya fue entregado y no se puede realizar modificación"),BA.ObjectToCharSequence("Atención"),ba);
 }else {
 //BA.debugLineNum = 545;BA.debugLine="B4XPages.MainPage.detalleVenta.prodsMap.Initiali";
_b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._detalleventa /*reparto_izca.keymon.lat.c_detalleventa*/ ._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
 //BA.debugLineNum = 547;BA.debugLine="B4XPages.ShowPage(\"DetalleVenta\")";
_b4xpages._showpage /*String*/ (ba,"DetalleVenta");
 };
 //BA.debugLineNum = 549;BA.debugLine="End Sub";
return "";
}
public Object  _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
 //BA.debugLineNum = 100;BA.debugLine="Public Sub Initialize As Object";
 //BA.debugLineNum = 101;BA.debugLine="Return Me";
if (true) return this;
 //BA.debugLineNum = 102;BA.debugLine="End Sub";
return null;
}
public String  _jobdone(reparto_izca.keymon.lat.httpjob _job) throws Exception{
reparto_izca.keymon.lat.dbrequestmanager._dbresult _resultado = null;
String _cliente = "";
Object[] _records = null;
String _k = "";
 //BA.debugLineNum = 969;BA.debugLine="Sub JobDone(Job As HttpJob)";
 //BA.debugLineNum = 970;BA.debugLine="Log(Job.Success)";
__c.LogImpl("59371649",BA.ObjectToString(_job._success /*boolean*/ ),0);
 //BA.debugLineNum = 971;BA.debugLine="If Job.Success = False Then";
if (_job._success /*boolean*/ ==__c.False) { 
 }else {
 //BA.debugLineNum = 974;BA.debugLine="LogColor(\"JobDone: '\" & reqManager.HandleJob(Job";
__c.LogImpl("59371653","JobDone: '"+BA.ObjectToString(_reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job).Tag /*Object*/ )+"' - Registros: "+BA.NumberToString(_reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job).Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),__c.Colors.Green);
 //BA.debugLineNum = 975;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 976;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 977;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"ins_REPART";
if ((BA.ObjectToString(_resultado.Tag /*Object*/ )).indexOf("ins_REPARTOPendientes_head_")>-1) { 
 //BA.debugLineNum = 978;BA.debugLine="Private cliente As String= resultado.Tag";
_cliente = BA.ObjectToString(_resultado.Tag /*Object*/ );
 //BA.debugLineNum = 979;BA.debugLine="cliente = cliente.SubString(cliente.IndexOf(\"_";
_cliente = _cliente.substring((int) (_cliente.indexOf("_")+24));
 //BA.debugLineNum = 980;BA.debugLine="Log($\"Cliente1:${cliente}\"$)";
__c.LogImpl("59371659",("Cliente1:"+__c.SmartStringFormatter("",(Object)(_cliente))+""),0);
 //BA.debugLineNum = 981;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update REPARTO_GEO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update REPARTO_GEO SET ENVIO = ? WHERE CLIENTE = ? AND ENVIO <> ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{"1",_cliente,"1"}));
 //BA.debugLineNum = 982;BA.debugLine="For Each records() As Object In resultado.Rows";
{
final anywheresoftware.b4a.BA.IterableList group12 = _resultado.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen12 = group12.getSize()
;int index12 = 0;
;
for (; index12 < groupLen12;index12++){
_records = (Object[])(group12.Get(index12));
 //BA.debugLineNum = 983;BA.debugLine="For Each k As String In resultado.Columns.Key";
{
final anywheresoftware.b4a.BA.IterableList group13 = _resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen13 = group13.getSize()
;int index13 = 0;
;
for (; index13 < groupLen13;index13++){
_k = BA.ObjectToString(group13.Get(index13));
 //BA.debugLineNum = 984;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & record";
__c.LogImpl("59371663",BA.ObjectToString(_resultado.Tag /*Object*/ )+": "+_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
 }
};
 }
};
 };
 };
 //BA.debugLineNum = 989;BA.debugLine="Job.Release";
_job._release /*String*/ ();
 };
 //BA.debugLineNum = 992;BA.debugLine="End Sub";
return "";
}
public String  _listview1_itemlongclick(int _position,Object _value) throws Exception{
 //BA.debugLineNum = 356;BA.debugLine="Sub ListView1_ItemLongClick (Position As Int, Valu";
 //BA.debugLineNum = 358;BA.debugLine="End Sub";
return "";
}
public String  _mandapendientesreparto() throws Exception{
 //BA.debugLineNum = 949;BA.debugLine="Sub mandaPendientesreparto";
 //BA.debugLineNum = 965;BA.debugLine="End Sub";
return "";
}
public String  _nuevo_click() throws Exception{
 //BA.debugLineNum = 530;BA.debugLine="Sub NUEVO_Click";
 //BA.debugLineNum = 531;BA.debugLine="StartActivity(MAPA_CLIENTE)";
__c.StartActivity(ba,(Object)(_mapa_cliente.getObject()));
 //BA.debugLineNum = 532;BA.debugLine="End Sub";
return "";
}
public String  _p_abono_click() throws Exception{
 //BA.debugLineNum = 1196;BA.debugLine="Private Sub p_abono_Click";
 //BA.debugLineNum = 1198;BA.debugLine="End Sub";
return "";
}
public String  _p_credito_click() throws Exception{
 //BA.debugLineNum = 1044;BA.debugLine="Private Sub p_credito_Click";
 //BA.debugLineNum = 1046;BA.debugLine="End Sub";
return "";
}
public String  _printer_connected(boolean _success) throws Exception{
 //BA.debugLineNum = 875;BA.debugLine="Sub Printer_Connected (Success As Boolean)";
 //BA.debugLineNum = 876;BA.debugLine="If Success Then";
if (_success) { 
 //BA.debugLineNum = 878;BA.debugLine="PASA_IMP = \"1\"";
_pasa_imp = "1";
 }else {
 //BA.debugLineNum = 881;BA.debugLine="If Msgbox2(\"\", \"Printer Error\",\"Reprint\",\"Cancel";
if (__c.Msgbox2(BA.ObjectToCharSequence(""),BA.ObjectToCharSequence("Printer Error"),"Reprint","Cancel","",(android.graphics.Bitmap)(__c.Null),ba)==__c.DialogResponse.POSITIVE) { 
 //BA.debugLineNum = 882;BA.debugLine="StartPrinter";
_startprinter();
 };
 };
 //BA.debugLineNum = 885;BA.debugLine="End Sub";
return "";
}
public String  _printer1_connected(boolean _success) throws Exception{
 //BA.debugLineNum = 850;BA.debugLine="Sub Printer1_Connected (Success As Boolean)";
 //BA.debugLineNum = 852;BA.debugLine="If Success Then";
if (_success) { 
 //BA.debugLineNum = 853;BA.debugLine="ToastMessageShow(\"Impresora conectada\", False)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Impresora conectada"),__c.False);
 //BA.debugLineNum = 854;BA.debugLine="Starter.skmt.ExecNonQuery2(\"delete from CAT_VARI";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("MACIMP")}));
 //BA.debugLineNum = 855;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO CAT_VARI";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("MACIMP"),(Object)(_starter._mac_impresora /*String*/ )}));
 //BA.debugLineNum = 858;BA.debugLine="impresoraConectada = True";
_impresoraconectada = __c.True;
 }else {
 //BA.debugLineNum = 862;BA.debugLine="LogColor(\"Error conectando la impresora\", Colors";
__c.LogImpl("58978444","Error conectando la impresora",__c.Colors.Red);
 //BA.debugLineNum = 863;BA.debugLine="errorImpresora = errorImpresora + 1";
_errorimpresora = (int) (_errorimpresora+1);
 //BA.debugLineNum = 864;BA.debugLine="If errorImpresora > 1 Then";
if (_errorimpresora>1) { 
 //BA.debugLineNum = 865;BA.debugLine="Starter.MAC_IMPRESORA = \"0\"";
_starter._mac_impresora /*String*/  = "0";
 //BA.debugLineNum = 866;BA.debugLine="errorImpresora = 0";
_errorimpresora = (int) (0);
 };
 };
 //BA.debugLineNum = 869;BA.debugLine="End Sub";
return "";
}
public String  _printer1_error() throws Exception{
 //BA.debugLineNum = 871;BA.debugLine="Sub Printer1_Error";
 //BA.debugLineNum = 872;BA.debugLine="Log(\"error printer\")";
__c.LogImpl("59043969","error printer",0);
 //BA.debugLineNum = 873;BA.debugLine="End Sub";
return "";
}
public String  _startprinter() throws Exception{
anywheresoftware.b4a.objects.collections.List _l1 = null;
int _resimp = 0;
int _i = 0;
 //BA.debugLineNum = 887;BA.debugLine="Sub StartPrinter";
 //BA.debugLineNum = 888;BA.debugLine="Dim PairedDevices As Map";
_paireddevices = new anywheresoftware.b4a.objects.collections.Map();
 //BA.debugLineNum = 889;BA.debugLine="Dim L1 As List";
_l1 = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 890;BA.debugLine="Dim resimp As Int";
_resimp = 0;
 //BA.debugLineNum = 891;BA.debugLine="ToastMessageShow(\"Printing.....\",True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Printing....."),__c.True);
 //BA.debugLineNum = 892;BA.debugLine="PairedDevices.Initialize";
_paireddevices.Initialize();
 //BA.debugLineNum = 893;BA.debugLine="Try";
try { //BA.debugLineNum = 894;BA.debugLine="PairedDevices = cmp20.GetPairedDevices";
_paireddevices = _cmp20.GetPairedDevices();
 } 
       catch (Exception e9) {
			ba.setLastException(e9); //BA.debugLineNum = 896;BA.debugLine="Msgbox(\"Getting Paired Devices\",\"Printer Error\")";
__c.Msgbox(BA.ObjectToCharSequence("Getting Paired Devices"),BA.ObjectToCharSequence("Printer Error"),ba);
 //BA.debugLineNum = 897;BA.debugLine="printer.Close";
_printer.Close();
 //BA.debugLineNum = 898;BA.debugLine="cmp20.Disconnect";
_cmp20.Disconnect();
 };
 //BA.debugLineNum = 901;BA.debugLine="If PairedDevices.Size = 0 Then";
if (_paireddevices.getSize()==0) { 
 //BA.debugLineNum = 902;BA.debugLine="Msgbox(\"Error Connecting to Printer - Printer No";
__c.Msgbox(BA.ObjectToCharSequence("Error Connecting to Printer - Printer Not Found"),BA.ObjectToCharSequence(""),ba);
 //BA.debugLineNum = 903;BA.debugLine="Return";
if (true) return "";
 };
 //BA.debugLineNum = 906;BA.debugLine="If PairedDevices.Size = 1 Then";
if (_paireddevices.getSize()==1) { 
 //BA.debugLineNum = 907;BA.debugLine="Try";
try { //BA.debugLineNum = 908;BA.debugLine="cmp20.Connect(PairedDevices.Get(PairedDevices.G";
_cmp20.Connect(ba,BA.ObjectToString(_paireddevices.Get(_paireddevices.GetKeyAt((int) (0)))));
 } 
       catch (Exception e21) {
			ba.setLastException(e21); //BA.debugLineNum = 910;BA.debugLine="Msgbox(\"Connecting\",\"Printer Error\") 'ignore";
__c.Msgbox(BA.ObjectToCharSequence("Connecting"),BA.ObjectToCharSequence("Printer Error"),ba);
 //BA.debugLineNum = 911;BA.debugLine="printer.Close";
_printer.Close();
 //BA.debugLineNum = 912;BA.debugLine="cmp20.Disconnect";
_cmp20.Disconnect();
 };
 }else {
 //BA.debugLineNum = 915;BA.debugLine="L1.Initialize";
_l1.Initialize();
 //BA.debugLineNum = 916;BA.debugLine="For i = 0 To PairedDevices.Size - 1";
{
final int step27 = 1;
final int limit27 = (int) (_paireddevices.getSize()-1);
_i = (int) (0) ;
for (;_i <= limit27 ;_i = _i + step27 ) {
 //BA.debugLineNum = 917;BA.debugLine="L1.Add(PairedDevices.GetKeyAt(i))";
_l1.Add(_paireddevices.GetKeyAt(_i));
 }
};
 //BA.debugLineNum = 919;BA.debugLine="resimp = InputList(L1, \"Choose device\", -1) 'ign";
_resimp = __c.InputList(_l1,BA.ObjectToCharSequence("Choose device"),(int) (-1),ba);
 //BA.debugLineNum = 920;BA.debugLine="If resimp <> DialogResponse.CANCEL Then";
if (_resimp!=__c.DialogResponse.CANCEL) { 
 //BA.debugLineNum = 921;BA.debugLine="cmp20.Connect(PairedDevices.Get(L1.Get(resimp))";
_cmp20.Connect(ba,BA.ObjectToString(_paireddevices.Get(_l1.Get(_resimp))));
 };
 };
 //BA.debugLineNum = 924;BA.debugLine="End Sub";
return "";
}
public String  _tar_click() throws Exception{
 //BA.debugLineNum = 512;BA.debugLine="Sub Tar_Click";
 //BA.debugLineNum = 514;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 //BA.debugLineNum = 515;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
if (BA.fastSubCompare(sub, "B4XPAGE_CREATED"))
	return _b4xpage_created((anywheresoftware.b4a.objects.B4XViewWrapper) args[0]);
if (BA.fastSubCompare(sub, "GPS_LOCATIONCHANGED"))
	return _gps_locationchanged((anywheresoftware.b4a.gps.LocationWrapper) args[0]);
if (BA.fastSubCompare(sub, "JOBDONE"))
	return _jobdone((reparto_izca.keymon.lat.httpjob) args[0]);
return BA.SubDelegator.SubNotFound;
}
}
