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 String _tipo_abonox = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_cancel_pagare = null;
public String _nota = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_imp2 = null;
public b4a.example.dateutils _dateutils = null;
public reparto_izca.keymon.lat.main _main = null;
public reparto_izca.keymon.lat.appupdater _appupdater = null;
public reparto_izca.keymon.lat.foto _foto = null;
public reparto_izca.keymon.lat.mapa_cliente _mapa_cliente = null;
public reparto_izca.keymon.lat.mapa_rutas _mapa_rutas = null;
public reparto_izca.keymon.lat.starter _starter = null;
public reparto_izca.keymon.lat.subs _subs = null;
public reparto_izca.keymon.lat.tracker _tracker = null;
public reparto_izca.keymon.lat.newinst2 _newinst2 = null;
public reparto_izca.keymon.lat.b4xpages _b4xpages = null;
public reparto_izca.keymon.lat.b4xcollections _b4xcollections = null;
public reparto_izca.keymon.lat.httputils2service _httputils2service = null;
public reparto_izca.keymon.lat.xuiviewsutils _xuiviewsutils = null;
public String  _activity_pause(boolean _userclosed) throws Exception{
 //BA.debugLineNum = 427;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
 //BA.debugLineNum = 429;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;
int _resultado = 0;

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

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

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

case 4:
//if
this.state = 23;
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 = 23;
 //BA.debugLineNum = 2113;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 = 2115;BA.debugLine="If et_abono.Text <> \"\" And et_abono.Text > 0 Th";
if (true) break;

case 9:
//if
this.state = 22;
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 = 2116;BA.debugLine="If itemselect <> \"SELECCIONA UNA OPCION\" Then";
if (true) break;

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

case 14:
//C
this.state = 15;
 //BA.debugLineNum = 2124;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 = 2125;BA.debugLine="Wait For Msgbox_Result (resultado As Int)";
parent.__c.WaitFor("msgbox_result", ba, this, null);
this.state = 25;
return;
case 25:
//C
this.state = 15;
_resultado = (Integer) result[0];
;
 //BA.debugLineNum = 2126;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
if (true) break;

case 15:
//if
this.state = 18;
if (_resultado==parent.__c.DialogResponse.POSITIVE) { 
this.state = 17;
}if (true) break;

case 17:
//C
this.state = 18;
 //BA.debugLineNum = 2127;BA.debugLine="imprime_abonopagare";
parent._imprime_abonopagare();
 if (true) break;

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

case 20:
//C
this.state = 21;
 //BA.debugLineNum = 2144;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 21:
//C
this.state = 22;
;
 if (true) break;

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

case 23:
//C
this.state = 24;
;
 if (true) break;

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

            }
        }
    }
}
public void  _msgbox_result(int _resultado) throws Exception{
}
public String  _b_acred_click() throws Exception{
anywheresoftware.b4a.sql.SQL.CursorWrapper _pagacheca = null;
 //BA.debugLineNum = 1285;BA.debugLine="Private Sub b_acred_Click";
 //BA.debugLineNum = 1289;BA.debugLine="DateTime.DateFormat = \"dd/MM/yyyy\"";
__c.DateTime.setDateFormat("dd/MM/yyyy");
 //BA.debugLineNum = 1290;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 1291;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 1292;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 1294;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 = 1295;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1296;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
_cuenta = _c.GetString("CUENTA");
 //BA.debugLineNum = 1297;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1299;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 = 1300;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1301;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 1302;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1304;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 = 1305;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1306;BA.debugLine="almacen = c.GetString(\"ID_ALMACEN\")";
_almacen = _c.GetString("ID_ALMACEN");
 //BA.debugLineNum = 1307;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1309;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 = 1310;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1311;BA.debugLine="fechaprev = c.GetString(\"HVD_FECHA\")";
_fechaprev = _c.GetString("HVD_FECHA");
 //BA.debugLineNum = 1312;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1314;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 = 1315;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1316;BA.debugLine="rutaprev = c.GetString(\"CAT_CL_RUTA\")";
_rutaprev = _c.GetString("CAT_CL_RUTA");
 //BA.debugLineNum = 1317;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1319;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 = 1320;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1321;BA.debugLine="rutarep = c.GetString(\"RUTAA\")";
_rutarep = _c.GetString("RUTAA");
 //BA.debugLineNum = 1322;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1324;BA.debugLine="c = Starter.skmt.ExecQuery($\"select distinct hvd_";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select distinct hvd_num_ticket from hist_ventas where hvd_cliente = '"+__c.SmartStringFormatter("",(Object)(_la_cuenta.getText()))+"' AND HVD_BCREDITO = '1'"))));
 //BA.debugLineNum = 1325;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 1326;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1327;BA.debugLine="NOTA = c.GetString(\"HVD_NUM_TICKET\")";
_nota = _c.GetString("HVD_NUM_TICKET");
 };
 //BA.debugLineNum = 1329;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1331;BA.debugLine="Dim pagacheca As Cursor = Starter.skmt.ExecQuery(";
_pagacheca = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_pagacheca = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT * FROM PAGARES WHERE PA_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 1333;BA.debugLine="If pagacheca.RowCount > 0 Then";
if (_pagacheca.getRowCount()>0) { 
 //BA.debugLineNum = 1336;BA.debugLine="Guardado";
_guardado();
 }else {
 //BA.debugLineNum = 1339;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,PA_TICKET) VALUES(?,?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_almacen),(Object)(_rutarep),(Object)(_rutaprev),(Object)(_fechaprev),(Object)((_sdate)),(Object)(_l_montopag.getText()),(Object)(_usuario),(Object)(_cuenta),(Object)(_nota)}));
 //BA.debugLineNum = 1342;BA.debugLine="Guardado";
_guardado();
 };
 //BA.debugLineNum = 1350;BA.debugLine="End Sub";
return "";
}
public String  _b_cancel_pagare_click() throws Exception{
anywheresoftware.b4a.objects.collections.List _items = null;
double _total = 0;
int _i = 0;
 //BA.debugLineNum = 1949;BA.debugLine="Private Sub b_cancel_pagare_Click";
 //BA.debugLineNum = 1950;BA.debugLine="tipo_abonox = \"abono\"";
_tipo_abonox = "abono";
 //BA.debugLineNum = 1952;BA.debugLine="Dim Items As List";
_items = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 1953;BA.debugLine="Items.Initialize";
_items.Initialize();
 //BA.debugLineNum = 1955;BA.debugLine="Items.Add(\"SELECCIONA UNA OPCION\")";
_items.Add((Object)("SELECCIONA UNA OPCION"));
 //BA.debugLineNum = 1956;BA.debugLine="Items.Add(\"TRANSFERENCIA\")";
_items.Add((Object)("TRANSFERENCIA"));
 //BA.debugLineNum = 1957;BA.debugLine="Items.Add(\"EFECTIVO\")";
_items.Add((Object)("EFECTIVO"));
 //BA.debugLineNum = 1958;BA.debugLine="Items.Add(\"CHEQUE\")";
_items.Add((Object)("CHEQUE"));
 //BA.debugLineNum = 1960;BA.debugLine="cb_tipopago.SetItems(Items)";
_cb_tipopago._setitems /*String*/ (_items);
 //BA.debugLineNum = 1962;BA.debugLine="itemselect= \"SELECCIONA UNA OPCION\"";
_itemselect = "SELECCIONA UNA OPCION";
 //BA.debugLineNum = 1964;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 = 1965;BA.debugLine="h.Position = 0";
_h.setPosition((int) (0));
 //BA.debugLineNum = 1966;BA.debugLine="Log(h.GetString(\"CUENTA\"))";
__c.LogImpl("144892177",_h.GetString("CUENTA"),0);
 //BA.debugLineNum = 1967;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 = ? and a_tipoabono is null",new String[]{_h.GetString("CUENTA")})));
 //BA.debugLineNum = 1968;BA.debugLine="j.position = 0";
_j.setPosition((int) (0));
 //BA.debugLineNum = 1969;BA.debugLine="Log(j.RowCount)";
__c.LogImpl("144892180",BA.NumberToString(_j.getRowCount()),0);
 //BA.debugLineNum = 1970;BA.debugLine="If j.RowCount = 0 Then";
if (_j.getRowCount()==0) { 
 //BA.debugLineNum = 1971;BA.debugLine="p_abono.Visible = True";
_p_abono.setVisible(__c.True);
 //BA.debugLineNum = 1972;BA.debugLine="p_abono.Width = Root.Width";
_p_abono.setWidth(_root.getWidth());
 //BA.debugLineNum = 1973;BA.debugLine="p_abono.Height = Root.Height";
_p_abono.setHeight(_root.getHeight());
 //BA.debugLineNum = 1974;BA.debugLine="et_abono.text = \"\"";
_et_abono.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 1975;BA.debugLine="Dim total As Double = 0";
_total = 0;
 //BA.debugLineNum = 1976;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 = 1977;BA.debugLine="f.Position = 0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 1978;BA.debugLine="d = Starter.skmt.ExecQuery2(\"SELECT distinct PA_";
_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 distinct PA_TICKET, PA_MONTO FROM PAGARES WHERE PA_CLIENTE = ?",new String[]{_f.GetString("CUENTA")})));
 //BA.debugLineNum = 1979;BA.debugLine="clv_abonos.Clear";
_clv_abonos._clear();
 //BA.debugLineNum = 1980;BA.debugLine="For i = 0 To d.RowCount - 1";
{
final int step26 = 1;
final int limit26 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit26 ;_i = _i + step26 ) {
 //BA.debugLineNum = 1981;BA.debugLine="d.Position = i";
_d.setPosition(_i);
 //BA.debugLineNum = 1982;BA.debugLine="clv_abonos.Add(CreateListItem(d.GetString(\"PA_T";
_clv_abonos._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_createlistitem(_d.GetString("PA_TICKET"),"$ "+_d.GetString("PA_MONTO")).getObject())),(Object)(_i));
 //BA.debugLineNum = 1984;BA.debugLine="total = total + d.GetString(\"PA_MONTO\")";
_total = _total+(double)(Double.parseDouble(_d.GetString("PA_MONTO")));
 //BA.debugLineNum = 1985;BA.debugLine="Log(total)";
__c.LogImpl("144892196",BA.NumberToString(_total),0);
 }
};
 //BA.debugLineNum = 1987;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1988;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 = ? and a_tipoabono is not null ",new String[]{_f.GetString("CUENTA")})));
 //BA.debugLineNum = 1989;BA.debugLine="If d.RowCount > 0 Then";
if (_d.getRowCount()>0) { 
 //BA.debugLineNum = 1990;BA.debugLine="For i = 0 To d.RowCount - 1";
{
final int step35 = 1;
final int limit35 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit35 ;_i = _i + step35 ) {
 //BA.debugLineNum = 1991;BA.debugLine="d.Position = i";
_d.setPosition(_i);
 //BA.debugLineNum = 1992;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 = 1993;BA.debugLine="total = total - d.GetString(\"a_abono\")";
_total = _total-(double)(Double.parseDouble(_d.GetString("a_abono")));
 //BA.debugLineNum = 1994;BA.debugLine="Log(total)";
__c.LogImpl("144892205",BA.NumberToString(_total),0);
 }
};
 };
 //BA.debugLineNum = 1997;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 = 1998;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1999;BA.debugLine="f.Close";
_f.Close();
 }else if(_j.getRowCount()>0) { 
 //BA.debugLineNum = 2001;BA.debugLine="p_abono.Visible = True";
_p_abono.setVisible(__c.True);
 //BA.debugLineNum = 2002;BA.debugLine="p_abono.Width = Root.Width";
_p_abono.setWidth(_root.getWidth());
 //BA.debugLineNum = 2003;BA.debugLine="p_abono.Height = Root.Height";
_p_abono.setHeight(_root.getHeight());
 //BA.debugLineNum = 2004;BA.debugLine="et_abono.text = \"\"";
_et_abono.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 2005;BA.debugLine="Dim total As Double = 0";
_total = 0;
 //BA.debugLineNum = 2006;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 = 2007;BA.debugLine="f.Position = 0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 2008;BA.debugLine="d = Starter.skmt.ExecQuery2(\"SELECT distinct PA_";
_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 distinct PA_TICKET, PA_MONTO FROM PAGARES WHERE PA_CLIENTE = ? ",new String[]{_f.GetString("CUENTA")})));
 //BA.debugLineNum = 2009;BA.debugLine="clv_abonos.Clear";
_clv_abonos._clear();
 //BA.debugLineNum = 2010;BA.debugLine="For i = 0 To d.RowCount - 1";
{
final int step55 = 1;
final int limit55 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit55 ;_i = _i + step55 ) {
 //BA.debugLineNum = 2011;BA.debugLine="d.Position = i";
_d.setPosition(_i);
 //BA.debugLineNum = 2012;BA.debugLine="clv_abonos.Add(CreateListItem(d.GetString(\"PA_T";
_clv_abonos._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_createlistitem(_d.GetString("PA_TICKET"),"$ "+_d.GetString("PA_MONTO")).getObject())),(Object)(_i));
 //BA.debugLineNum = 2014;BA.debugLine="total = total + d.GetString(\"PA_MONTO\").Replace";
_total = _total+(double)(Double.parseDouble(_d.GetString("PA_MONTO").replace(",","")));
 //BA.debugLineNum = 2015;BA.debugLine="Log(total)";
__c.LogImpl("144892226",BA.NumberToString(_total),0);
 }
};
 //BA.debugLineNum = 2017;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 2018;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 = ? and a_tipoabono is not null ",new String[]{_f.GetString("CUENTA")})));
 //BA.debugLineNum = 2019;BA.debugLine="If d.RowCount > 0 Then";
if (_d.getRowCount()>0) { 
 //BA.debugLineNum = 2020;BA.debugLine="For i = 0 To d.RowCount - 1";
{
final int step64 = 1;
final int limit64 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit64 ;_i = _i + step64 ) {
 //BA.debugLineNum = 2021;BA.debugLine="d.Position = i";
_d.setPosition(_i);
 //BA.debugLineNum = 2022;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 = 2023;BA.debugLine="total = total - d.GetString(\"a_abono\")";
_total = _total-(double)(Double.parseDouble(_d.GetString("a_abono")));
 //BA.debugLineNum = 2024;BA.debugLine="Log(total)";
__c.LogImpl("144892235",BA.NumberToString(_total),0);
 }
};
 };
 //BA.debugLineNum = 2027;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 = 2028;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 2029;BA.debugLine="f.Close";
_f.Close();
 };
 //BA.debugLineNum = 2032;BA.debugLine="h.Close";
_h.Close();
 //BA.debugLineNum = 2033;BA.debugLine="j.Close";
_j.Close();
 //BA.debugLineNum = 2040;BA.debugLine="End Sub";
return "";
}
public String  _b_cancelar_click() throws Exception{
 //BA.debugLineNum = 2060;BA.debugLine="Private Sub b_cancelar_Click";
 //BA.debugLineNum = 2061;BA.debugLine="et_abono.Text = \"\"";
_et_abono.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 2062;BA.debugLine="p_abono.Visible = False";
_p_abono.setVisible(__c.False);
 //BA.debugLineNum = 2063;BA.debugLine="ime.HideKeyboard";
_ime.HideKeyboard(ba);
 //BA.debugLineNum = 2064;BA.debugLine="End Sub";
return "";
}
public String  _b_cancred_click() throws Exception{
 //BA.debugLineNum = 1352;BA.debugLine="Private Sub b_cancred_Click";
 //BA.debugLineNum = 1353;BA.debugLine="et_montoacredito.Text = \"\"";
_et_montoacredito.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 1354;BA.debugLine="p_credito.Visible = False";
_p_credito.setVisible(__c.False);
 //BA.debugLineNum = 1355;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 = 1508;BA.debugLine="Private Sub b_cxc_Click";
 //BA.debugLineNum = 1509;BA.debugLine="tipo_abonox = \"cxc\"";
_tipo_abonox = "cxc";
 //BA.debugLineNum = 1510;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 = 1511;BA.debugLine="h.Position = 0";
_h.setPosition((int) (0));
 //BA.debugLineNum = 1512;BA.debugLine="Log(h.GetString(\"CUENTA\"))";
__c.LogImpl("144761092",_h.GetString("CUENTA"),0);
 //BA.debugLineNum = 1514;BA.debugLine="Dim Items As List";
_items = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 1515;BA.debugLine="Items.Initialize";
_items.Initialize();
 //BA.debugLineNum = 1517;BA.debugLine="Items.Add(\"SELECCIONA UNA OPCION\")";
_items.Add((Object)("SELECCIONA UNA OPCION"));
 //BA.debugLineNum = 1518;BA.debugLine="Items.Add(\"TRANSFERENCIA\")";
_items.Add((Object)("TRANSFERENCIA"));
 //BA.debugLineNum = 1519;BA.debugLine="Items.Add(\"EFECTIVO\")";
_items.Add((Object)("EFECTIVO"));
 //BA.debugLineNum = 1520;BA.debugLine="Items.Add(\"CHEQUE\")";
_items.Add((Object)("CHEQUE"));
 //BA.debugLineNum = 1522;BA.debugLine="cb_tipopago.SetItems(Items)";
_cb_tipopago._setitems /*String*/ (_items);
 //BA.debugLineNum = 1524;BA.debugLine="itemselect= \"SELECCIONA UNA OPCION\"";
_itemselect = "SELECCIONA UNA OPCION";
 //BA.debugLineNum = 1526;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 = 1527;BA.debugLine="j.position = 0";
_j.setPosition((int) (0));
 //BA.debugLineNum = 1528;BA.debugLine="Log(j.RowCount)";
__c.LogImpl("144761108",BA.NumberToString(_j.getRowCount()),0);
 //BA.debugLineNum = 1529;BA.debugLine="If j.RowCount = 0 Then";
if (_j.getRowCount()==0) { 
 //BA.debugLineNum = 1530;BA.debugLine="p_abono.Visible = True";
_p_abono.setVisible(__c.True);
 //BA.debugLineNum = 1531;BA.debugLine="p_abono.Width = Root.Width";
_p_abono.setWidth(_root.getWidth());
 //BA.debugLineNum = 1532;BA.debugLine="p_abono.Height = Root.Height";
_p_abono.setHeight(_root.getHeight());
 //BA.debugLineNum = 1533;BA.debugLine="et_abono.text = \"\"";
_et_abono.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 1534;BA.debugLine="Dim total As Double = 0";
_total = 0;
 //BA.debugLineNum = 1535;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 = 1536;BA.debugLine="f.Position = 0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 1537;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 = 1538;BA.debugLine="clv_abonos.Clear";
_clv_abonos._clear();
 //BA.debugLineNum = 1539;BA.debugLine="For i = 0 To d.RowCount - 1";
{
final int step26 = 1;
final int limit26 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit26 ;_i = _i + step26 ) {
 //BA.debugLineNum = 1540;BA.debugLine="d.Position = i";
_d.setPosition(_i);
 //BA.debugLineNum = 1541;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 = 1542;BA.debugLine="Log(d.GetString(\"NOTA\"))";
__c.LogImpl("144761122",_d.GetString("NOTA"),0);
 //BA.debugLineNum = 1543;BA.debugLine="Log(d.GetString(\"SALDO_PENDIENTE\"))";
__c.LogImpl("144761123",_d.GetString("SALDO_PENDIENTE"),0);
 //BA.debugLineNum = 1544;BA.debugLine="total = total + d.GetString(\"SALDO_PENDIENTE\")";
_total = _total+(double)(Double.parseDouble(_d.GetString("SALDO_PENDIENTE")));
 //BA.debugLineNum = 1545;BA.debugLine="Log(total)";
__c.LogImpl("144761125",BA.NumberToString(_total),0);
 }
};
 //BA.debugLineNum = 1547;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1548;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 = ? and a_tipoabono is null",new String[]{_f.GetString("CUENTA")})));
 //BA.debugLineNum = 1549;BA.debugLine="If d.RowCount > 0 Then";
if (_d.getRowCount()>0) { 
 //BA.debugLineNum = 1550;BA.debugLine="For i = 0 To d.RowCount - 1";
{
final int step37 = 1;
final int limit37 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit37 ;_i = _i + step37 ) {
 //BA.debugLineNum = 1551;BA.debugLine="d.Position = i";
_d.setPosition(_i);
 //BA.debugLineNum = 1552;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 = 1553;BA.debugLine="total = total - d.GetString(\"a_abono\")";
_total = _total-(double)(Double.parseDouble(_d.GetString("a_abono")));
 //BA.debugLineNum = 1554;BA.debugLine="Log(total)";
__c.LogImpl("144761134",BA.NumberToString(_total),0);
 }
};
 };
 //BA.debugLineNum = 1557;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 = 1558;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1559;BA.debugLine="f.Close";
_f.Close();
 }else if(_j.getRowCount()>0) { 
 //BA.debugLineNum = 1561;BA.debugLine="p_abono.Visible = True";
_p_abono.setVisible(__c.True);
 //BA.debugLineNum = 1562;BA.debugLine="p_abono.Width = Root.Width";
_p_abono.setWidth(_root.getWidth());
 //BA.debugLineNum = 1563;BA.debugLine="p_abono.Height = Root.Height";
_p_abono.setHeight(_root.getHeight());
 //BA.debugLineNum = 1564;BA.debugLine="et_abono.text = \"\"";
_et_abono.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 1565;BA.debugLine="Dim total As Double = 0";
_total = 0;
 //BA.debugLineNum = 1566;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 = 1567;BA.debugLine="f.Position = 0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 1568;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 = 1569;BA.debugLine="clv_abonos.Clear";
_clv_abonos._clear();
 //BA.debugLineNum = 1570;BA.debugLine="For i = 0 To d.RowCount - 1";
{
final int step57 = 1;
final int limit57 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit57 ;_i = _i + step57 ) {
 //BA.debugLineNum = 1571;BA.debugLine="d.Position = i";
_d.setPosition(_i);
 //BA.debugLineNum = 1572;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 = 1573;BA.debugLine="Log(d.GetString(\"NOTA\"))";
__c.LogImpl("144761153",_d.GetString("NOTA"),0);
 //BA.debugLineNum = 1574;BA.debugLine="Log(d.GetString(\"SALDO_PENDIENTE\"))";
__c.LogImpl("144761154",_d.GetString("SALDO_PENDIENTE"),0);
 //BA.debugLineNum = 1575;BA.debugLine="total = total + d.GetString(\"SALDO_PENDIENTE\")";
_total = _total+(double)(Double.parseDouble(_d.GetString("SALDO_PENDIENTE")));
 //BA.debugLineNum = 1576;BA.debugLine="Log(total)";
__c.LogImpl("144761156",BA.NumberToString(_total),0);
 }
};
 //BA.debugLineNum = 1578;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1579;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 = ? and a_tipoabono is null",new String[]{_f.GetString("CUENTA")})));
 //BA.debugLineNum = 1580;BA.debugLine="If d.RowCount > 0 Then";
if (_d.getRowCount()>0) { 
 //BA.debugLineNum = 1581;BA.debugLine="For i = 0 To d.RowCount - 1";
{
final int step68 = 1;
final int limit68 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit68 ;_i = _i + step68 ) {
 //BA.debugLineNum = 1582;BA.debugLine="d.Position = i";
_d.setPosition(_i);
 //BA.debugLineNum = 1583;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 = 1584;BA.debugLine="total = total - d.GetString(\"a_abono\")";
_total = _total-(double)(Double.parseDouble(_d.GetString("a_abono")));
 //BA.debugLineNum = 1585;BA.debugLine="Log(total)";
__c.LogImpl("144761165",BA.NumberToString(_total),0);
 }
};
 };
 //BA.debugLineNum = 1588;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 = 1589;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1590;BA.debugLine="f.Close";
_f.Close();
 };
 //BA.debugLineNum = 1593;BA.debugLine="h.Close";
_h.Close();
 //BA.debugLineNum = 1594;BA.debugLine="j.Close";
_j.Close();
 //BA.debugLineNum = 1595;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;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c2 = null;
int _i = 0;
String _punit = "";
String _ptot = "";
int _e = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc5 = null;
int _resultado = 0;
float _totalcredito = 0f;
int step57;
int limit57;
int step69;
int limit69;
int step92;
int limit92;
int step118;
int limit118;
int step133;
int limit133;
int step164;
int limit164;
int step176;
int limit176;
int step199;
int limit199;
int step225;
int limit225;
int step240;
int limit240;
int step265;
int limit265;
int step275;
int limit275;

@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 = 682;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 = 683;BA.debugLine="c.Position=0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 684;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
parent._usuario = parent._c.GetString("USUARIO");
 //BA.debugLineNum = 686;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
parent.__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 687;BA.debugLine="DateTime.TimeFormat=\"HH:mm:ss\"";
parent.__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 688;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
parent._sdate = parent.__c.DateTime.Date(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 689;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
parent._stime = parent.__c.DateTime.Time(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 690;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 696;BA.debugLine="ProgressDialogShow(\"Imprimiendo, un momento ...\")";
parent.__c.ProgressDialogShow(ba,BA.ObjectToCharSequence("Imprimiendo, un momento ..."));
 //BA.debugLineNum = 697;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 698;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 = 700;BA.debugLine="Printer1.Connect";
parent._printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 701;BA.debugLine="Private cont As Int = 0";
_cont = (int) (0);
 //BA.debugLineNum = 702;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 = 703;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 197;
return;
case 197:
//C
this.state = 7;
;
 //BA.debugLineNum = 705;BA.debugLine="cont = cont + 1";
_cont = (int) (_cont+1);
 //BA.debugLineNum = 706;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 = 707;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 = 709;BA.debugLine="Sleep(500)";
parent.__c.Sleep(ba,this,(int) (500));
this.state = 198;
return;
case 198:
//C
this.state = 38;
;
 //BA.debugLineNum = 710;BA.debugLine="impresoraConectada = False";
parent._impresoraconectada = parent.__c.False;
 if (true) break;

case 21:
//C
this.state = 22;
 //BA.debugLineNum = 713;BA.debugLine="Printer1.Connect";
parent._printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 714;BA.debugLine="Private cont As Int = 0";
_cont = (int) (0);
 //BA.debugLineNum = 715;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 = 716;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 199;
return;
case 199:
//C
this.state = 25;
;
 //BA.debugLineNum = 718;BA.debugLine="cont = cont + 1";
_cont = (int) (_cont+1);
 //BA.debugLineNum = 719;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 = 720;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 = 722;BA.debugLine="Sleep(500)";
parent.__c.Sleep(ba,this,(int) (500));
this.state = 200;
return;
case 200:
//C
this.state = 38;
;
 //BA.debugLineNum = 723;BA.debugLine="impresoraConectada = False";
parent._impresoraconectada = parent.__c.False;
 if (true) break;

case 38:
//C
this.state = 39;
;
 //BA.debugLineNum = 726;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 727;BA.debugLine="ESPACIO = 28";
parent._espacio = (int) (28);
 //BA.debugLineNum = 728;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 745;BA.debugLine="Printer1.WriteString(\"Izca Distribuciones\" &  CRL";
parent._printer1._writestring /*String*/ ("Izca Distribuciones"+parent.__c.CRLF);
 //BA.debugLineNum = 747;BA.debugLine="Printer1.WriteString(sDate &  CRLF)";
parent._printer1._writestring /*String*/ (parent._sdate+parent.__c.CRLF);
 //BA.debugLineNum = 748;BA.debugLine="Printer1.WriteString(sTime &  CRLF)";
parent._printer1._writestring /*String*/ (parent._stime+parent.__c.CRLF);
 //BA.debugLineNum = 749;BA.debugLine="Printer1.WriteString(\"Vendedor:\" & usuario &  CRL";
parent._printer1._writestring /*String*/ ("Vendedor:"+parent._usuario+parent.__c.CRLF);
 //BA.debugLineNum = 750;BA.debugLine="Printer1.WriteString(\"Tienda: \" & La_nombre.Text";
parent._printer1._writestring /*String*/ ("Tienda: "+parent._la_nombre.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 751;BA.debugLine="Printer1.WriteString(\"ID.Cliente: \" &  la_cuenta.";
parent._printer1._writestring /*String*/ ("ID.Cliente: "+parent._la_cuenta.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 752;BA.debugLine="Printer1.WriteString(\"Calle: \" & la_Calle.Text &";
parent._printer1._writestring /*String*/ ("Calle: "+parent._la_calle.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 753;BA.debugLine="Printer1.WriteString(\"Colonia: \" & la_col.Text &";
parent._printer1._writestring /*String*/ ("Colonia: "+parent._la_col.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 757;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 759;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) and HVD_BCREDITO = '1' ")));
 //BA.debugLineNum = 760;BA.debugLine="If c.RowCount > 0 Then";
if (true) break;

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

case 41:
//C
this.state = 42;
 //BA.debugLineNum = 762;BA.debugLine="Dim c2 As Cursor= Starter.skmt.ExecQuery(\"SELECT";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT iFNULL(SUM(HVD_CANT),0) AS HVD_CANT, iFNULL(SUM(HVD_RECHAZOCANT),0) AS HVD_RECHAZOCANT FROM HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA) and HVD_BCREDITO = '1' ")));
 //BA.debugLineNum = 763;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
 //BA.debugLineNum = 764;BA.debugLine="If c2.GetInt(\"HVD_CANT\") - c2.GetInt(\"HVD_RECHAZ";
if (true) break;

case 42:
//if
this.state = 45;
if (_c2.GetInt("HVD_CANT")-_c2.GetInt("HVD_RECHAZOCANT")>0) { 
this.state = 44;
}if (true) break;

case 44:
//C
this.state = 45;
 //BA.debugLineNum = 765;BA.debugLine="Printer1.WriteString(\"--------ENTREGA CREDITO--";
parent._printer1._writestring /*String*/ ("--------ENTREGA CREDITO-------"+parent.__c.CRLF);
 //BA.debugLineNum = 768;BA.debugLine="Printer1.WriteString(\"Cant.      Precio";
parent._printer1._writestring /*String*/ ("Cant.      Precio        Importe"+parent.__c.CRLF);
 //BA.debugLineNum = 770;BA.debugLine="Printer1.WriteString(\"-------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 if (true) break;

case 45:
//C
this.state = 46;
;
 //BA.debugLineNum = 774;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) and HVD_BCREDITO = '1' order by  HVD_PROID"))));
 //BA.debugLineNum = 775;BA.debugLine="If S.RowCount>0 Then";
if (true) break;

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

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

case 49:
//for
this.state = 70;
step57 = 1;
limit57 = (int) (parent._s.getRowCount()-1);
_i = (int) (0) ;
this.state = 201;
if (true) break;

case 201:
//C
this.state = 70;
if ((step57 > 0 && _i <= limit57) || (step57 < 0 && _i >= limit57)) this.state = 51;
if (true) break;

case 202:
//C
this.state = 201;
_i = ((int)(0 + _i + step57)) ;
if (true) break;

case 51:
//C
this.state = 52;
 //BA.debugLineNum = 777;BA.debugLine="S.Position=i";
parent._s.setPosition(_i);
 //BA.debugLineNum = 778;BA.debugLine="Log(s.GetString(\"HVD_RECHAZO\"))";
parent.__c.LogImpl("144040289",parent._s.GetString("HVD_RECHAZO"),0);
 //BA.debugLineNum = 779;BA.debugLine="If s.GetString(\"HVD_CANT\") - s.GetString(\"HVD_";
if (true) break;

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

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

case 55:
//if
this.state = 68;
if ((parent._s.GetString("HVD_CODPROMO")).equals(parent._subs._traealmacen /*String*/ (ba))) { 
this.state = 57;
}else if((parent._s.GetString("HVD_RECHAZO")).equals(BA.NumberToString(1))) { 
this.state = 63;
}if (true) break;

case 57:
//C
this.state = 58;
 //BA.debugLineNum = 784;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 785;BA.debugLine="Printer1.WriteString(s.GetString(\"HVD_PRONOM";
parent._printer1._writestring /*String*/ (parent._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 788;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 = 789;BA.debugLine="TAMANO = punit.Length + TAMANO";
parent._tamano = (int) (_punit.length()+parent._tamano);
 //BA.debugLineNum = 792;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 = 793;BA.debugLine="TAMANO = ptot.Length + TAMANO";
parent._tamano = (int) (_ptot.length()+parent._tamano);
 //BA.debugLineNum = 795;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 797;BA.debugLine="For E=0 To ESPACIO -1";
if (true) break;

case 58:
//for
this.state = 61;
step69 = 1;
limit69 = (int) (parent._espacio-1);
_e = (int) (0) ;
this.state = 203;
if (true) break;

case 203:
//C
this.state = 61;
if ((step69 > 0 && _e <= limit69) || (step69 < 0 && _e >= limit69)) this.state = 60;
if (true) break;

case 204:
//C
this.state = 203;
_e = ((int)(0 + _e + step69)) ;
if (true) break;

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

case 61:
//C
this.state = 68;
;
 //BA.debugLineNum = 800;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 801;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 = 802;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 803;BA.debugLine="Printer1.WriteString( punit & BLANCO)";
parent._printer1._writestring /*String*/ (_punit+parent._blanco);
 //BA.debugLineNum = 804;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 805;BA.debugLine="Printer1.WriteString( ptot &  CRLF )";
parent._printer1._writestring /*String*/ (_ptot+parent.__c.CRLF);
 //BA.debugLineNum = 806;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 807;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 808;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 if (true) break;

case 63:
//C
this.state = 64;
 //BA.debugLineNum = 812;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 813;BA.debugLine="Printer1.WriteString(s.GetString(\"HVD_PRONOM";
parent._printer1._writestring /*String*/ (parent._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 815;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 = 816;BA.debugLine="vc5.Position = 0";
_vc5.setPosition((int) (0));
 //BA.debugLineNum = 817;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 = 818;BA.debugLine="TAMANO = punit.Length + TAMANO";
parent._tamano = (int) (_punit.length()+parent._tamano);
 //BA.debugLineNum = 819;BA.debugLine="vc5.Close";
_vc5.Close();
 //BA.debugLineNum = 821;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 = 822;BA.debugLine="TAMANO = ptot.Length + TAMANO";
parent._tamano = (int) (_ptot.length()+parent._tamano);
 //BA.debugLineNum = 824;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 826;BA.debugLine="For E=0 To ESPACIO -1";
if (true) break;

case 64:
//for
this.state = 67;
step92 = 1;
limit92 = (int) (parent._espacio-1);
_e = (int) (0) ;
this.state = 205;
if (true) break;

case 205:
//C
this.state = 67;
if ((step92 > 0 && _e <= limit92) || (step92 < 0 && _e >= limit92)) this.state = 66;
if (true) break;

case 206:
//C
this.state = 205;
_e = ((int)(0 + _e + step92)) ;
if (true) break;

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

case 67:
//C
this.state = 68;
;
 //BA.debugLineNum = 829;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 830;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 = 831;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 832;BA.debugLine="Printer1.WriteString( punit & BLANCO)";
parent._printer1._writestring /*String*/ (_punit+parent._blanco);
 //BA.debugLineNum = 833;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 834;BA.debugLine="Printer1.WriteString(ptot&  CRLF )";
parent._printer1._writestring /*String*/ (_ptot+parent.__c.CRLF);
 //BA.debugLineNum = 835;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 836;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 837;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 838;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 if (true) break;

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

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

case 70:
//C
this.state = 71;
;
 //BA.debugLineNum = 842;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 843;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 if (true) break;

case 71:
//C
this.state = 72;
;
 if (true) break;

case 72:
//C
this.state = 73;
;
 //BA.debugLineNum = 847;BA.debugLine="s.Close";
parent._s.Close();
 //BA.debugLineNum = 848;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)))+"' and HVD_BCREDITO = '1' order by  HVD_CODPROMO, ESPROMO DESC, HVD_PROID"))));
 //BA.debugLineNum = 850;BA.debugLine="If S.RowCount>0 Then";
if (true) break;

case 73:
//if
this.state = 100;
if (parent._s.getRowCount()>0) { 
this.state = 75;
}if (true) break;

case 75:
//C
this.state = 76;
 //BA.debugLineNum = 851;BA.debugLine="Printer1.WriteString(\"---PROMOS ENTREGA CREDITO-";
parent._printer1._writestring /*String*/ ("---PROMOS ENTREGA CREDITO----"+parent.__c.CRLF);
 //BA.debugLineNum = 852;BA.debugLine="Printer1.WriteString(\"Cant.      Precio        I";
parent._printer1._writestring /*String*/ ("Cant.      Precio        Importe"+parent.__c.CRLF);
 //BA.debugLineNum = 853;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 855;BA.debugLine="For i=0 To S.RowCount -1";
if (true) break;

case 76:
//for
this.state = 99;
step118 = 1;
limit118 = (int) (parent._s.getRowCount()-1);
_i = (int) (0) ;
this.state = 207;
if (true) break;

case 207:
//C
this.state = 99;
if ((step118 > 0 && _i <= limit118) || (step118 < 0 && _i >= limit118)) this.state = 78;
if (true) break;

case 208:
//C
this.state = 207;
_i = ((int)(0 + _i + step118)) ;
if (true) break;

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

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

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

case 82:
//if
this.state = 97;
if ((parent._s.GetString("HVD_CODPROMO")).equals(parent._subs._traealmacen /*String*/ (ba)) == false) { 
this.state = 84;
}else {
this.state = 96;
}if (true) break;

case 84:
//C
this.state = 85;
 //BA.debugLineNum = 862;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 863;BA.debugLine="If s.GetString(\"HVD_CODPROMO\") = s.GetString(";
if (true) break;

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

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

case 89:
//C
this.state = 90;
 //BA.debugLineNum = 866;BA.debugLine="Printer1.WriteString(s.GetString(\"HVD_PRONOM";
parent._printer1._writestring /*String*/ (parent._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 868;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 = 869;BA.debugLine="TAMANO = punit.Length + TAMANO";
parent._tamano = (int) (_punit.length()+parent._tamano);
 //BA.debugLineNum = 872;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 = 873;BA.debugLine="TAMANO = ptot.Length + TAMANO";
parent._tamano = (int) (_ptot.length()+parent._tamano);
 //BA.debugLineNum = 876;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 877;BA.debugLine="Log(ESPACIO)";
parent.__c.LogImpl("144040388",BA.NumberToString(parent._espacio),0);
 //BA.debugLineNum = 878;BA.debugLine="For E=0 To ESPACIO -1";
if (true) break;

case 90:
//for
this.state = 93;
step133 = 1;
limit133 = (int) (parent._espacio-1);
_e = (int) (0) ;
this.state = 209;
if (true) break;

case 209:
//C
this.state = 93;
if ((step133 > 0 && _e <= limit133) || (step133 < 0 && _e >= limit133)) this.state = 92;
if (true) break;

case 210:
//C
this.state = 209;
_e = ((int)(0 + _e + step133)) ;
if (true) break;

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

case 93:
//C
this.state = 94;
;
 //BA.debugLineNum = 881;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 882;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 = 883;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 884;BA.debugLine="Printer1.WriteString( punit & BLANCO)";
parent._printer1._writestring /*String*/ (_punit+parent._blanco);
 //BA.debugLineNum = 885;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 886;BA.debugLine="Printer1.WriteString(ptot &  CRLF )";
parent._printer1._writestring /*String*/ (_ptot+parent.__c.CRLF);
 //BA.debugLineNum = 887;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 888;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 889;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 890;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 if (true) break;

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

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

case 97:
//C
this.state = 98;
;
 if (true) break;

case 98:
//C
this.state = 208;
;
 if (true) break;
if (true) break;

case 99:
//C
this.state = 100;
;
 if (true) break;

case 100:
//C
this.state = 101;
;
 //BA.debugLineNum = 902;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) and HVD_BCREDITO <> '1' ")));
 //BA.debugLineNum = 903;BA.debugLine="Log(c.RowCount&\"------------------\")";
parent.__c.LogImpl("144040414",BA.NumberToString(parent._c.getRowCount())+"------------------",0);
 //BA.debugLineNum = 904;BA.debugLine="If c.RowCount > 0 Then";
if (true) break;

case 101:
//if
this.state = 134;
if (parent._c.getRowCount()>0) { 
this.state = 103;
}if (true) break;

case 103:
//C
this.state = 104;
 //BA.debugLineNum = 906;BA.debugLine="Dim c2 As Cursor= Starter.skmt.ExecQuery(\"SELECT";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT iFNULL(SUM(HVD_CANT),0) AS HVD_CANT, iFNULL(SUM(HVD_RECHAZOCANT),0) AS HVD_RECHAZOCANT FROM HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA) and HVD_BCREDITO <> '1' ")));
 //BA.debugLineNum = 907;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
 //BA.debugLineNum = 908;BA.debugLine="If c2.GetInt(\"HVD_CANT\") - c2.GetInt(\"HVD_RECHAZ";
if (true) break;

case 104:
//if
this.state = 107;
if (_c2.GetInt("HVD_CANT")-_c2.GetInt("HVD_RECHAZOCANT")>0) { 
this.state = 106;
}if (true) break;

case 106:
//C
this.state = 107;
 //BA.debugLineNum = 909;BA.debugLine="Printer1.WriteString(\"--------ENTREGA CONTADO--";
parent._printer1._writestring /*String*/ ("--------ENTREGA CONTADO-------"+parent.__c.CRLF);
 //BA.debugLineNum = 912;BA.debugLine="Printer1.WriteString(\"Cant.      Precio";
parent._printer1._writestring /*String*/ ("Cant.      Precio        Importe"+parent.__c.CRLF);
 //BA.debugLineNum = 913;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 if (true) break;

case 107:
//C
this.state = 108;
;
 //BA.debugLineNum = 918;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) AND HVD_BCREDITO <> '1' order by  HVD_PROID"))));
 //BA.debugLineNum = 919;BA.debugLine="If S.RowCount>0 Then";
if (true) break;

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

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

case 111:
//for
this.state = 132;
step164 = 1;
limit164 = (int) (parent._s.getRowCount()-1);
_i = (int) (0) ;
this.state = 211;
if (true) break;

case 211:
//C
this.state = 132;
if ((step164 > 0 && _i <= limit164) || (step164 < 0 && _i >= limit164)) this.state = 113;
if (true) break;

case 212:
//C
this.state = 211;
_i = ((int)(0 + _i + step164)) ;
if (true) break;

case 113:
//C
this.state = 114;
 //BA.debugLineNum = 921;BA.debugLine="S.Position=i";
parent._s.setPosition(_i);
 //BA.debugLineNum = 922;BA.debugLine="Log(s.GetString(\"HVD_RECHAZO\"))";
parent.__c.LogImpl("144040433",parent._s.GetString("HVD_RECHAZO"),0);
 //BA.debugLineNum = 923;BA.debugLine="If s.GetString(\"HVD_CANT\") - s.GetString(\"HVD_";
if (true) break;

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

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

case 117:
//if
this.state = 130;
if ((parent._s.GetString("HVD_CODPROMO")).equals(parent._subs._traealmacen /*String*/ (ba))) { 
this.state = 119;
}else if((parent._s.GetString("HVD_RECHAZO")).equals(BA.NumberToString(1))) { 
this.state = 125;
}if (true) break;

case 119:
//C
this.state = 120;
 //BA.debugLineNum = 928;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 929;BA.debugLine="Printer1.WriteString(s.GetString(\"HVD_PRONOM";
parent._printer1._writestring /*String*/ (parent._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 932;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 = 933;BA.debugLine="TAMANO = punit.Length + TAMANO";
parent._tamano = (int) (_punit.length()+parent._tamano);
 //BA.debugLineNum = 936;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 = 937;BA.debugLine="TAMANO = ptot.Length + TAMANO";
parent._tamano = (int) (_ptot.length()+parent._tamano);
 //BA.debugLineNum = 939;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 941;BA.debugLine="For E=0 To ESPACIO -1";
if (true) break;

case 120:
//for
this.state = 123;
step176 = 1;
limit176 = (int) (parent._espacio-1);
_e = (int) (0) ;
this.state = 213;
if (true) break;

case 213:
//C
this.state = 123;
if ((step176 > 0 && _e <= limit176) || (step176 < 0 && _e >= limit176)) this.state = 122;
if (true) break;

case 214:
//C
this.state = 213;
_e = ((int)(0 + _e + step176)) ;
if (true) break;

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

case 123:
//C
this.state = 130;
;
 //BA.debugLineNum = 944;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 945;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 = 946;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 947;BA.debugLine="Printer1.WriteString( punit & BLANCO)";
parent._printer1._writestring /*String*/ (_punit+parent._blanco);
 //BA.debugLineNum = 948;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 949;BA.debugLine="Printer1.WriteString( ptot &  CRLF )";
parent._printer1._writestring /*String*/ (_ptot+parent.__c.CRLF);
 //BA.debugLineNum = 950;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 951;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 952;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 if (true) break;

case 125:
//C
this.state = 126;
 //BA.debugLineNum = 956;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 957;BA.debugLine="Printer1.WriteString(s.GetString(\"HVD_PRONOM";
parent._printer1._writestring /*String*/ (parent._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 959;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 = 960;BA.debugLine="vc5.Position = 0";
_vc5.setPosition((int) (0));
 //BA.debugLineNum = 961;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 = 962;BA.debugLine="TAMANO = punit.Length + TAMANO";
parent._tamano = (int) (_punit.length()+parent._tamano);
 //BA.debugLineNum = 963;BA.debugLine="vc5.Close";
_vc5.Close();
 //BA.debugLineNum = 965;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 = 966;BA.debugLine="TAMANO = ptot.Length + TAMANO";
parent._tamano = (int) (_ptot.length()+parent._tamano);
 //BA.debugLineNum = 968;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 970;BA.debugLine="For E=0 To ESPACIO -1";
if (true) break;

case 126:
//for
this.state = 129;
step199 = 1;
limit199 = (int) (parent._espacio-1);
_e = (int) (0) ;
this.state = 215;
if (true) break;

case 215:
//C
this.state = 129;
if ((step199 > 0 && _e <= limit199) || (step199 < 0 && _e >= limit199)) this.state = 128;
if (true) break;

case 216:
//C
this.state = 215;
_e = ((int)(0 + _e + step199)) ;
if (true) break;

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

case 129:
//C
this.state = 130;
;
 //BA.debugLineNum = 973;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 974;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 = 975;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 976;BA.debugLine="Printer1.WriteString( punit & BLANCO)";
parent._printer1._writestring /*String*/ (_punit+parent._blanco);
 //BA.debugLineNum = 977;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 978;BA.debugLine="Printer1.WriteString(ptot&  CRLF )";
parent._printer1._writestring /*String*/ (_ptot+parent.__c.CRLF);
 //BA.debugLineNum = 979;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 980;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 981;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 982;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 if (true) break;

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

case 131:
//C
this.state = 212;
;
 if (true) break;
if (true) break;

case 132:
//C
this.state = 133;
;
 //BA.debugLineNum = 986;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 987;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 if (true) break;

case 133:
//C
this.state = 134;
;
 if (true) break;

case 134:
//C
this.state = 135;
;
 //BA.debugLineNum = 991;BA.debugLine="s.Close";
parent._s.Close();
 //BA.debugLineNum = 992;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)))+"' and HVD_BCREDITO <> '1' order by  HVD_CODPROMO, ESPROMO DESC, HVD_PROID"))));
 //BA.debugLineNum = 994;BA.debugLine="If S.RowCount>0 Then";
if (true) break;

case 135:
//if
this.state = 162;
if (parent._s.getRowCount()>0) { 
this.state = 137;
}if (true) break;

case 137:
//C
this.state = 138;
 //BA.debugLineNum = 995;BA.debugLine="Printer1.WriteString(\"---PROMOS ENTREGA CONTADO-";
parent._printer1._writestring /*String*/ ("---PROMOS ENTREGA CONTADO----"+parent.__c.CRLF);
 //BA.debugLineNum = 996;BA.debugLine="Printer1.WriteString(\"Cant.      Precio        I";
parent._printer1._writestring /*String*/ ("Cant.      Precio        Importe"+parent.__c.CRLF);
 //BA.debugLineNum = 997;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 999;BA.debugLine="For i=0 To S.RowCount -1";
if (true) break;

case 138:
//for
this.state = 161;
step225 = 1;
limit225 = (int) (parent._s.getRowCount()-1);
_i = (int) (0) ;
this.state = 217;
if (true) break;

case 217:
//C
this.state = 161;
if ((step225 > 0 && _i <= limit225) || (step225 < 0 && _i >= limit225)) this.state = 140;
if (true) break;

case 218:
//C
this.state = 217;
_i = ((int)(0 + _i + step225)) ;
if (true) break;

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

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

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

case 144:
//if
this.state = 159;
if ((parent._s.GetString("HVD_CODPROMO")).equals(parent._subs._traealmacen /*String*/ (ba)) == false) { 
this.state = 146;
}else {
this.state = 158;
}if (true) break;

case 146:
//C
this.state = 147;
 //BA.debugLineNum = 1006;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 1007;BA.debugLine="If s.GetString(\"HVD_CODPROMO\") = s.GetString(";
if (true) break;

case 147:
//if
this.state = 156;
if ((parent._s.GetString("HVD_CODPROMO")).equals(parent._s.GetString("HVD_PROID"))) { 
this.state = 149;
}else {
this.state = 151;
}if (true) break;

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

case 151:
//C
this.state = 152;
 //BA.debugLineNum = 1010;BA.debugLine="Printer1.WriteString(s.GetString(\"HVD_PRONOM";
parent._printer1._writestring /*String*/ (parent._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 1012;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 = 1013;BA.debugLine="TAMANO = punit.Length + TAMANO";
parent._tamano = (int) (_punit.length()+parent._tamano);
 //BA.debugLineNum = 1016;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 = 1017;BA.debugLine="TAMANO = ptot.Length + TAMANO";
parent._tamano = (int) (_ptot.length()+parent._tamano);
 //BA.debugLineNum = 1020;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 1021;BA.debugLine="Log(ESPACIO)";
parent.__c.LogImpl("144040532",BA.NumberToString(parent._espacio),0);
 //BA.debugLineNum = 1022;BA.debugLine="For E=0 To ESPACIO -1";
if (true) break;

case 152:
//for
this.state = 155;
step240 = 1;
limit240 = (int) (parent._espacio-1);
_e = (int) (0) ;
this.state = 219;
if (true) break;

case 219:
//C
this.state = 155;
if ((step240 > 0 && _e <= limit240) || (step240 < 0 && _e >= limit240)) this.state = 154;
if (true) break;

case 220:
//C
this.state = 219;
_e = ((int)(0 + _e + step240)) ;
if (true) break;

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

case 155:
//C
this.state = 156;
;
 //BA.debugLineNum = 1025;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 1026;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 = 1027;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 1028;BA.debugLine="Printer1.WriteString( punit & BLANCO)";
parent._printer1._writestring /*String*/ (_punit+parent._blanco);
 //BA.debugLineNum = 1029;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 1030;BA.debugLine="Printer1.WriteString(ptot &  CRLF )";
parent._printer1._writestring /*String*/ (_ptot+parent.__c.CRLF);
 //BA.debugLineNum = 1031;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 1032;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 1033;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 1034;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 if (true) break;

case 156:
//C
this.state = 159;
;
 if (true) break;

case 158:
//C
this.state = 159;
 if (true) break;

case 159:
//C
this.state = 160;
;
 if (true) break;

case 160:
//C
this.state = 218;
;
 if (true) break;
if (true) break;

case 161:
//C
this.state = 162;
;
 //BA.debugLineNum = 1044;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 if (true) break;

case 162:
//C
this.state = 163;
;
 //BA.debugLineNum = 1047;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 = 1049;BA.debugLine="If S.RowCount>0 Then";
if (true) break;

case 163:
//if
this.state = 174;
if (parent._s.getRowCount()>0) { 
this.state = 165;
}if (true) break;

case 165:
//C
this.state = 166;
 //BA.debugLineNum = 1050;BA.debugLine="Printer1.WriteString(\"-----------VENTA----------";
parent._printer1._writestring /*String*/ ("-----------VENTA------------"+parent.__c.CRLF);
 //BA.debugLineNum = 1051;BA.debugLine="Printer1.WriteString(\"Cant.      Precio        I";
parent._printer1._writestring /*String*/ ("Cant.      Precio        Importe"+parent.__c.CRLF);
 //BA.debugLineNum = 1052;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 1054;BA.debugLine="For i=0 To S.RowCount -1";
if (true) break;

case 166:
//for
this.state = 173;
step265 = 1;
limit265 = (int) (parent._s.getRowCount()-1);
_i = (int) (0) ;
this.state = 221;
if (true) break;

case 221:
//C
this.state = 173;
if ((step265 > 0 && _i <= limit265) || (step265 < 0 && _i >= limit265)) this.state = 168;
if (true) break;

case 222:
//C
this.state = 221;
_i = ((int)(0 + _i + step265)) ;
if (true) break;

case 168:
//C
this.state = 169;
 //BA.debugLineNum = 1055;BA.debugLine="S.Position=i";
parent._s.setPosition(_i);
 //BA.debugLineNum = 1057;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 1058;BA.debugLine="Printer1.WriteString(s.GetString(\"PE_PRONOMBRE\"";
parent._printer1._writestring /*String*/ (parent._s.GetString("PE_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 1061;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 = 1062;BA.debugLine="TAMANO = punit.Length + TAMANO";
parent._tamano = (int) (_punit.length()+parent._tamano);
 //BA.debugLineNum = 1064;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 = 1065;BA.debugLine="TAMANO = ptot.Length + TAMANO";
parent._tamano = (int) (_ptot.length()+parent._tamano);
 //BA.debugLineNum = 1068;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 1069;BA.debugLine="Log(ESPACIO)";
parent.__c.LogImpl("144040580",BA.NumberToString(parent._espacio),0);
 //BA.debugLineNum = 1070;BA.debugLine="For E=0 To ESPACIO -1";
if (true) break;

case 169:
//for
this.state = 172;
step275 = 1;
limit275 = (int) (parent._espacio-1);
_e = (int) (0) ;
this.state = 223;
if (true) break;

case 223:
//C
this.state = 172;
if ((step275 > 0 && _e <= limit275) || (step275 < 0 && _e >= limit275)) this.state = 171;
if (true) break;

case 224:
//C
this.state = 223;
_e = ((int)(0 + _e + step275)) ;
if (true) break;

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

case 172:
//C
this.state = 222;
;
 //BA.debugLineNum = 1073;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 1074;BA.debugLine="Printer1.WriteString( s.GetString(\"PE_CANT\") &";
parent._printer1._writestring /*String*/ (parent._s.GetString("PE_CANT")+parent._blanco);
 //BA.debugLineNum = 1075;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 1076;BA.debugLine="Printer1.WriteString( punit & BLANCO)";
parent._printer1._writestring /*String*/ (_punit+parent._blanco);
 //BA.debugLineNum = 1077;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 1078;BA.debugLine="Printer1.WriteString(ptot &  CRLF )";
parent._printer1._writestring /*String*/ (_ptot+parent.__c.CRLF);
 //BA.debugLineNum = 1079;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 1080;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 1081;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 1082;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 if (true) break;
if (true) break;

case 173:
//C
this.state = 174;
;
 //BA.debugLineNum = 1085;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 if (true) break;

case 174:
//C
this.state = 175;
;
 //BA.debugLineNum = 1087;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 1090;BA.debugLine="Printer1.WriteString(\"Total Articulos:   \" & L_CA";
parent._printer1._writestring /*String*/ ("Total Articulos:   "+parent._l_cant.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 1092;BA.debugLine="Printer1.WriteString(\"Total credito:   $\" & l_mon";
parent._printer1._writestring /*String*/ ("Total credito:   $"+parent._l_montopag.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 1093;BA.debugLine="Printer1.WriteString(\"Total contado:   $\" & l_mon";
parent._printer1._writestring /*String*/ ("Total contado:   $"+parent._l_montoefec.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 1094;BA.debugLine="Printer1.WriteString(\"Total general:   $\" & l_tot";
parent._printer1._writestring /*String*/ ("Total general:   $"+parent._l_total.getText());
 //BA.debugLineNum = 1097;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1098;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 1101;BA.debugLine="Printer1.WriteString(\"----ESTE TICKET NO ES UN --";
parent._printer1._writestring /*String*/ ("----ESTE TICKET NO ES UN -----"+parent.__c.CRLF);
 //BA.debugLineNum = 1102;BA.debugLine="Printer1.WriteString(\"--COMPROBANTE FISCAL, SOLO";
parent._printer1._writestring /*String*/ ("--COMPROBANTE FISCAL, SOLO ES-"+parent.__c.CRLF);
 //BA.debugLineNum = 1103;BA.debugLine="Printer1.WriteString(\"--------INFORMATIVO--------";
parent._printer1._writestring /*String*/ ("--------INFORMATIVO-----------"+parent.__c.CRLF);
 //BA.debugLineNum = 1104;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 1105;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1106;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1107;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1108;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 225;
return;
case 225:
//C
this.state = 175;
;
 //BA.debugLineNum = 1109;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 1111;BA.debugLine="ProgressDialogHide";
parent.__c.ProgressDialogHide();
 //BA.debugLineNum = 1113;BA.debugLine="If banderaimp = 1 Then";
if (true) break;

case 175:
//if
this.state = 196;
if (parent._banderaimp==1) { 
this.state = 177;
}else if(parent._banderaimp==0) { 
this.state = 191;
}if (true) break;

case 177:
//C
this.state = 178;
 //BA.debugLineNum = 1114;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 = 1115;BA.debugLine="Wait For Msgbox_Result (resultado As Int)";
parent.__c.WaitFor("msgbox_result", ba, this, null);
this.state = 226;
return;
case 226:
//C
this.state = 178;
_resultado = (Integer) result[0];
;
 //BA.debugLineNum = 1116;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
if (true) break;

case 178:
//if
this.state = 189;
if (_resultado==parent.__c.DialogResponse.POSITIVE) { 
this.state = 180;
}else {
this.state = 182;
}if (true) break;

case 180:
//C
this.state = 189;
 //BA.debugLineNum = 1117;BA.debugLine="B_IMP_Click";
parent._b_imp_click();
 if (true) break;

case 182:
//C
this.state = 183;
 //BA.debugLineNum = 1119;BA.debugLine="Dim totalcredito As Float = l_montopag.Text";
_totalcredito = (float)(Double.parseDouble(parent._l_montopag.getText()));
 //BA.debugLineNum = 1120;BA.debugLine="If totalcredito > 0 Then";
if (true) break;

case 183:
//if
this.state = 188;
if (_totalcredito>0) { 
this.state = 185;
}else {
this.state = 187;
}if (true) break;

case 185:
//C
this.state = 188;
 //BA.debugLineNum = 1121;BA.debugLine="imprime_pagare";
parent._imprime_pagare();
 if (true) break;

case 187:
//C
this.state = 188;
 //BA.debugLineNum = 1124;BA.debugLine="Guardado";
parent._guardado();
 if (true) break;

case 188:
//C
this.state = 189;
;
 if (true) break;

case 189:
//C
this.state = 196;
;
 if (true) break;

case 191:
//C
this.state = 192;
 //BA.debugLineNum = 1131;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 = 1132;BA.debugLine="Wait For Msgbox_Result (resultado As Int)";
parent.__c.WaitFor("msgbox_result", ba, this, null);
this.state = 227;
return;
case 227:
//C
this.state = 192;
_resultado = (Integer) result[0];
;
 //BA.debugLineNum = 1133;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
if (true) break;

case 192:
//if
this.state = 195;
if (_resultado==parent.__c.DialogResponse.POSITIVE) { 
this.state = 194;
}if (true) break;

case 194:
//C
this.state = 195;
 //BA.debugLineNum = 1134;BA.debugLine="B_IMP_Click";
parent._b_imp_click();
 if (true) break;

case 195:
//C
this.state = 196;
;
 if (true) break;

case 196:
//C
this.state = -1;
;
 //BA.debugLineNum = 1139;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 = 2597;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 = 2598;BA.debugLine="c.Position=0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 2599;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
parent._usuario = parent._c.GetString("USUARIO");
 //BA.debugLineNum = 2601;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
parent.__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 2602;BA.debugLine="DateTime.TimeFormat=\"HH:mm:ss\"";
parent.__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 2603;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
parent._sdate = parent.__c.DateTime.Date(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 2604;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
parent._stime = parent.__c.DateTime.Time(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 2605;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 2611;BA.debugLine="ProgressDialogShow(\"Imprimiendo, un momento ...\")";
parent.__c.ProgressDialogShow(ba,BA.ObjectToCharSequence("Imprimiendo, un momento ..."));
 //BA.debugLineNum = 2612;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 2613;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 = 2615;BA.debugLine="Printer1.Connect";
parent._printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 2616;BA.debugLine="Private cont As Int = 0";
_cont = (int) (0);
 //BA.debugLineNum = 2617;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 = 2618;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 125;
return;
case 125:
//C
this.state = 7;
;
 //BA.debugLineNum = 2620;BA.debugLine="cont = cont + 1";
_cont = (int) (_cont+1);
 //BA.debugLineNum = 2621;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 = 2622;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 = 2624;BA.debugLine="Sleep(500)";
parent.__c.Sleep(ba,this,(int) (500));
this.state = 126;
return;
case 126:
//C
this.state = 38;
;
 //BA.debugLineNum = 2625;BA.debugLine="impresoraConectada = False";
parent._impresoraconectada = parent.__c.False;
 if (true) break;

case 21:
//C
this.state = 22;
 //BA.debugLineNum = 2628;BA.debugLine="Printer1.Connect";
parent._printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 2629;BA.debugLine="Private cont As Int = 0";
_cont = (int) (0);
 //BA.debugLineNum = 2630;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 = 2631;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 127;
return;
case 127:
//C
this.state = 25;
;
 //BA.debugLineNum = 2633;BA.debugLine="cont = cont + 1";
_cont = (int) (_cont+1);
 //BA.debugLineNum = 2634;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 = 2635;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 = 2637;BA.debugLine="Sleep(500)";
parent.__c.Sleep(ba,this,(int) (500));
this.state = 128;
return;
case 128:
//C
this.state = 38;
;
 //BA.debugLineNum = 2638;BA.debugLine="impresoraConectada = False";
parent._impresoraconectada = parent.__c.False;
 if (true) break;

case 38:
//C
this.state = 39;
;
 //BA.debugLineNum = 2641;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 2642;BA.debugLine="ESPACIO = 28";
parent._espacio = (int) (28);
 //BA.debugLineNum = 2643;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 2660;BA.debugLine="Printer1.WriteString(\"Izca Distribuciones\" &  CRL";
parent._printer1._writestring /*String*/ ("Izca Distribuciones"+parent.__c.CRLF);
 //BA.debugLineNum = 2662;BA.debugLine="Printer1.WriteString(sDate &  CRLF)";
parent._printer1._writestring /*String*/ (parent._sdate+parent.__c.CRLF);
 //BA.debugLineNum = 2663;BA.debugLine="Printer1.WriteString(sTime &  CRLF)";
parent._printer1._writestring /*String*/ (parent._stime+parent.__c.CRLF);
 //BA.debugLineNum = 2664;BA.debugLine="Printer1.WriteString(\"Vendedor:\" & usuario &  CRL";
parent._printer1._writestring /*String*/ ("Vendedor:"+parent._usuario+parent.__c.CRLF);
 //BA.debugLineNum = 2665;BA.debugLine="Printer1.WriteString(\"Tienda: \" & La_nombre.Text";
parent._printer1._writestring /*String*/ ("Tienda: "+parent._la_nombre.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 2666;BA.debugLine="Printer1.WriteString(\"ID.Cliente: \" &  la_cuenta.";
parent._printer1._writestring /*String*/ ("ID.Cliente: "+parent._la_cuenta.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 2667;BA.debugLine="Printer1.WriteString(\"Calle: \" & la_Calle.Text &";
parent._printer1._writestring /*String*/ ("Calle: "+parent._la_calle.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 2668;BA.debugLine="Printer1.WriteString(\"Colonia: \" & la_col.Text &";
parent._printer1._writestring /*String*/ ("Colonia: "+parent._la_col.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 2672;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2673;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 = 2674;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 = 2675;BA.debugLine="Printer1.WriteString(\"------------ENTREGA-------";
parent._printer1._writestring /*String*/ ("------------ENTREGA-----------"+parent.__c.CRLF);
 //BA.debugLineNum = 2678;BA.debugLine="Printer1.WriteString(\"Cant.      Precio        I";
parent._printer1._writestring /*String*/ ("Cant.      Precio        Importe"+parent.__c.CRLF);
 //BA.debugLineNum = 2680;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 2682;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 = 2683;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 = 2684;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 = 2685;BA.debugLine="S.Position=i";
parent._s.setPosition(_i);
 //BA.debugLineNum = 2686;BA.debugLine="Log(s.GetString(\"HVD_RECHAZO\"))";
parent.__c.LogImpl("145351124",parent._s.GetString("HVD_RECHAZO"),0);
 //BA.debugLineNum = 2687;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 = 2690;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 = 2692;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 2693;BA.debugLine="Printer1.WriteString(s.GetString(\"HVD_PRONOM";
parent._printer1._writestring /*String*/ (parent._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 2696;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 = 2697;BA.debugLine="TAMANO = punit.Length + TAMANO";
parent._tamano = (int) (_punit.length()+parent._tamano);
 //BA.debugLineNum = 2700;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 = 2701;BA.debugLine="TAMANO = ptot.Length + TAMANO";
parent._tamano = (int) (_ptot.length()+parent._tamano);
 //BA.debugLineNum = 2703;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 2705;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 = 2706;BA.debugLine="BLANCO = \" \" & BLANCO";
parent._blanco = " "+parent._blanco;
 if (true) break;
if (true) break;

case 57:
//C
this.state = 64;
;
 //BA.debugLineNum = 2708;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 2709;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 = 2710;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 2711;BA.debugLine="Printer1.WriteString( punit & BLANCO)";
parent._printer1._writestring /*String*/ (_punit+parent._blanco);
 //BA.debugLineNum = 2712;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 2713;BA.debugLine="Printer1.WriteString( ptot &  CRLF )";
parent._printer1._writestring /*String*/ (_ptot+parent.__c.CRLF);
 //BA.debugLineNum = 2714;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 2715;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 2716;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 if (true) break;

case 59:
//C
this.state = 60;
 //BA.debugLineNum = 2720;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 2721;BA.debugLine="Printer1.WriteString(s.GetString(\"HVD_PRONOM";
parent._printer1._writestring /*String*/ (parent._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 2723;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 = 2724;BA.debugLine="vc5.Position = 0";
_vc5.setPosition((int) (0));
 //BA.debugLineNum = 2725;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 = 2726;BA.debugLine="TAMANO = punit.Length + TAMANO";
parent._tamano = (int) (_punit.length()+parent._tamano);
 //BA.debugLineNum = 2727;BA.debugLine="vc5.Close";
_vc5.Close();
 //BA.debugLineNum = 2729;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 = 2730;BA.debugLine="TAMANO = ptot.Length + TAMANO";
parent._tamano = (int) (_ptot.length()+parent._tamano);
 //BA.debugLineNum = 2732;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 2734;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 = 2735;BA.debugLine="BLANCO = \" \" & BLANCO";
parent._blanco = " "+parent._blanco;
 if (true) break;
if (true) break;

case 63:
//C
this.state = 64;
;
 //BA.debugLineNum = 2737;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 2738;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 = 2739;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 2740;BA.debugLine="Printer1.WriteString( punit & BLANCO)";
parent._printer1._writestring /*String*/ (_punit+parent._blanco);
 //BA.debugLineNum = 2741;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 2742;BA.debugLine="Printer1.WriteString(ptot&  CRLF )";
parent._printer1._writestring /*String*/ (_ptot+parent.__c.CRLF);
 //BA.debugLineNum = 2743;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 2744;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 2745;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 2746;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 = 2752;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 2753;BA.debugLine="s.Close";
parent._s.Close();
 //BA.debugLineNum = 2754;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2755;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 = 2757;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 = 2758;BA.debugLine="Printer1.WriteString(\"-------PROMOS ENTREGA-----";
parent._printer1._writestring /*String*/ ("-------PROMOS ENTREGA--------"+parent.__c.CRLF);
 //BA.debugLineNum = 2759;BA.debugLine="Printer1.WriteString(\"Cant.      Precio        I";
parent._printer1._writestring /*String*/ ("Cant.      Precio        Importe"+parent.__c.CRLF);
 //BA.debugLineNum = 2760;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 2762;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 = 2763;BA.debugLine="S.Position=i";
parent._s.setPosition(_i);
 //BA.debugLineNum = 2764;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 = 2767;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 = 2769;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 2770;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 = 2771;BA.debugLine="Printer1.WriteString(\"* \"&s.GetString(\"HVD_P";
parent._printer1._writestring /*String*/ ("* "+parent._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 2772;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2773;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 if (true) break;

case 85:
//C
this.state = 86;
 //BA.debugLineNum = 2775;BA.debugLine="Printer1.WriteString(s.GetString(\"HVD_PRONOM";
parent._printer1._writestring /*String*/ (parent._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 2777;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 = 2778;BA.debugLine="TAMANO = punit.Length + TAMANO";
parent._tamano = (int) (_punit.length()+parent._tamano);
 //BA.debugLineNum = 2781;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 = 2782;BA.debugLine="TAMANO = ptot.Length + TAMANO";
parent._tamano = (int) (_ptot.length()+parent._tamano);
 //BA.debugLineNum = 2785;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 2786;BA.debugLine="Log(ESPACIO)";
parent.__c.LogImpl("145351224",BA.NumberToString(parent._espacio),0);
 //BA.debugLineNum = 2787;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 = 2788;BA.debugLine="BLANCO = \" \" & BLANCO";
parent._blanco = " "+parent._blanco;
 if (true) break;
if (true) break;

case 89:
//C
this.state = 90;
;
 //BA.debugLineNum = 2790;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 2791;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 = 2792;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 2793;BA.debugLine="Printer1.WriteString( punit & BLANCO)";
parent._printer1._writestring /*String*/ (_punit+parent._blanco);
 //BA.debugLineNum = 2794;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 2795;BA.debugLine="Printer1.WriteString(ptot &  CRLF )";
parent._printer1._writestring /*String*/ (_ptot+parent.__c.CRLF);
 //BA.debugLineNum = 2796;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 2797;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 2798;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 2799;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 = 2811;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2812;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 = 2814;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 = 2815;BA.debugLine="Printer1.WriteString(\"-----------VENTA----------";
parent._printer1._writestring /*String*/ ("-----------VENTA------------"+parent.__c.CRLF);
 //BA.debugLineNum = 2816;BA.debugLine="Printer1.WriteString(\"Cant.      Precio        I";
parent._printer1._writestring /*String*/ ("Cant.      Precio        Importe"+parent.__c.CRLF);
 //BA.debugLineNum = 2817;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 2819;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 = 2820;BA.debugLine="S.Position=i";
parent._s.setPosition(_i);
 //BA.debugLineNum = 2822;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 2823;BA.debugLine="Printer1.WriteString(s.GetString(\"PE_PRONOMBRE\"";
parent._printer1._writestring /*String*/ (parent._s.GetString("PE_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 2826;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 = 2827;BA.debugLine="TAMANO = punit.Length + TAMANO";
parent._tamano = (int) (_punit.length()+parent._tamano);
 //BA.debugLineNum = 2829;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 = 2830;BA.debugLine="TAMANO = ptot.Length + TAMANO";
parent._tamano = (int) (_ptot.length()+parent._tamano);
 //BA.debugLineNum = 2833;BA.debugLine="ESPACIO = (ESPACIO - TAMANO)/2";
parent._espacio = (int) ((parent._espacio-parent._tamano)/(double)2);
 //BA.debugLineNum = 2834;BA.debugLine="Log(ESPACIO)";
parent.__c.LogImpl("145351272",BA.NumberToString(parent._espacio),0);
 //BA.debugLineNum = 2835;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 = 2836;BA.debugLine="BLANCO = \" \" & BLANCO";
parent._blanco = " "+parent._blanco;
 if (true) break;
if (true) break;

case 106:
//C
this.state = 140;
;
 //BA.debugLineNum = 2838;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 2839;BA.debugLine="Printer1.WriteString( s.GetString(\"PE_CANT\") &";
parent._printer1._writestring /*String*/ (parent._s.GetString("PE_CANT")+parent._blanco);
 //BA.debugLineNum = 2840;BA.debugLine="Printer1.Justify = 1";
parent._printer1._setjustify((int) (1));
 //BA.debugLineNum = 2841;BA.debugLine="Printer1.WriteString( punit & BLANCO)";
parent._printer1._writestring /*String*/ (_punit+parent._blanco);
 //BA.debugLineNum = 2842;BA.debugLine="Printer1.Justify = 2";
parent._printer1._setjustify((int) (2));
 //BA.debugLineNum = 2843;BA.debugLine="Printer1.WriteString(ptot &  CRLF )";
parent._printer1._writestring /*String*/ (_ptot+parent.__c.CRLF);
 //BA.debugLineNum = 2844;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 2845;BA.debugLine="ESPACIO = 29";
parent._espacio = (int) (29);
 //BA.debugLineNum = 2846;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 2847;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 = 2851;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2852;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 2855;BA.debugLine="Printer1.WriteString(\"Total Articulos:   \" & L_CA";
parent._printer1._writestring /*String*/ ("Total Articulos:   "+parent._l_cant.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 2856;BA.debugLine="Printer1.WriteString(\"Total:   $\" & l_total.Text)";
parent._printer1._writestring /*String*/ ("Total:   $"+parent._l_total.getText());
 //BA.debugLineNum = 2859;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2860;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 2863;BA.debugLine="Printer1.WriteString(\"----ESTE TICKET NO ES UN --";
parent._printer1._writestring /*String*/ ("----ESTE TICKET NO ES UN -----"+parent.__c.CRLF);
 //BA.debugLineNum = 2864;BA.debugLine="Printer1.WriteString(\"--COMPROBANTE FISCAL, SOLO";
parent._printer1._writestring /*String*/ ("--COMPROBANTE FISCAL, SOLO ES-"+parent.__c.CRLF);
 //BA.debugLineNum = 2865;BA.debugLine="Printer1.WriteString(\"--------INFORMATIVO--------";
parent._printer1._writestring /*String*/ ("--------INFORMATIVO-----------"+parent.__c.CRLF);
 //BA.debugLineNum = 2866;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 2867;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2868;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2869;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2870;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 143;
return;
case 143:
//C
this.state = 109;
;
 //BA.debugLineNum = 2871;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 2873;BA.debugLine="ProgressDialogHide";
parent.__c.ProgressDialogHide();
 //BA.debugLineNum = 2875;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 = 2876;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 = 2877;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 = 2878;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 = 2879;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 = 2887;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 = 2888;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 = 2889;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 = 2890;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 = 2895;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b_noentrega_click() throws Exception{
 //BA.debugLineNum = 555;BA.debugLine="Sub b_noEntrega_Click";
 //BA.debugLineNum = 557;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 = 558;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 559;BA.debugLine="If c.GetInt(\"gestion\") = 2 Then";
if (_c.GetInt("gestion")==2) { 
 //BA.debugLineNum = 560;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 = 564;BA.debugLine="B4XPages.ShowPage(\"noVenta\")";
_b4xpages._showpage /*String*/ (ba,"noVenta");
 };
 //BA.debugLineNum = 566;BA.debugLine="End Sub";
return "";
}
public String  _b_paso2_click() throws Exception{
 //BA.debugLineNum = 1217;BA.debugLine="Sub B_PASO2_Click";
 //BA.debugLineNum = 1218;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 1219;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 1220;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 1221;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 = 1222;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1223;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
_cuenta = _c.GetString("CUENTA");
 //BA.debugLineNum = 1224;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 = 1225;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1226;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 1227;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1228;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 = 1229;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 = 1235;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 //BA.debugLineNum = 1237;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear() throws Exception{
anywheresoftware.b4a.objects.collections.Map _cym = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc = null;
String _cuenta0 = "";
String _arti = "";
int _i = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc2 = null;
String _cuenta1 = "";
String _arti1 = "";
float _preu = 0f;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc3 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc4 = null;
String _cuenta2 = "";
String _arti2 = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc5 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c4 = null;
String _cuenta3 = "";
String _arti3 = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _vcred4 = null;
float _cuentacred2 = 0f;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vcred5 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vcred = null;
float _cuentacred0 = 0f;
anywheresoftware.b4a.sql.SQL.CursorWrapper _cp = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _x2 = null;
String _cabonos = "";
 //BA.debugLineNum = 148;BA.debugLine="Sub B4XPage_Appear";
 //BA.debugLineNum = 149;BA.debugLine="banderaimp = 0";
_banderaimp = (int) (0);
 //BA.debugLineNum = 150;BA.debugLine="Subs.centraPanel(p_principal, Root.Width)";
_subs._centrapanel /*String*/ (ba,_p_principal,_root.getWidth());
 //BA.debugLineNum = 151;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 = 152;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 = 153;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 = 154;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) AND PE_TIPO NOT IN ('SOBRANTE','FALTANTE')")));
 //BA.debugLineNum = 155;BA.debugLine="s.Position=0";
_s.setPosition((int) (0));
 //BA.debugLineNum = 156;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 157;BA.debugLine="la_cuenta.Text = c.GetString(\"CAT_CL_CODIGO\")";
_la_cuenta.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CODIGO")));
 //BA.debugLineNum = 158;BA.debugLine="La_nombre.Text = c.GetString(\"CAT_CL_NOMBRE\")";
_la_nombre.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_NOMBRE")));
 //BA.debugLineNum = 159;BA.debugLine="NOMBRE = c.GetString(\"CAT_CL_NOMBRE\")";
_nombre = _c.GetString("CAT_CL_NOMBRE");
 //BA.debugLineNum = 160;BA.debugLine="LONGITUD = c.GetString(\"CAT_CL_LONG\")";
_longitud = _c.GetString("CAT_CL_LONG");
 //BA.debugLineNum = 161;BA.debugLine="LATITUD = c.GetString(\"CAT_CL_LAT\")";
_latitud = _c.GetString("CAT_CL_LAT");
 //BA.debugLineNum = 162;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 = 163;BA.debugLine="la_col.Text = c.GetString(\"CAT_CL_COLONIA\")";
_la_col.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_COLONIA")));
 //BA.debugLineNum = 164;BA.debugLine="la_edo.Text = c.GetString(\"CAT_CL_EDO\")";
_la_edo.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_EDO")));
 //BA.debugLineNum = 165;BA.debugLine="la_cp.Text = c.GetString(\"CAT_CL_CP\")";
_la_cp.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CP")));
 //BA.debugLineNum = 166;BA.debugLine="l_entre1.Text = c.GetString(\"CAT_CL_CALLE1\")";
_l_entre1.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE1")));
 //BA.debugLineNum = 167;BA.debugLine="l_entre2.Text = c.GetString(\"CAT_CL_CALLE2\")";
_l_entre2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE2")));
 //BA.debugLineNum = 168;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 = 169;BA.debugLine="l_atiende.Text = c.GetString(\"CAT_CL_ATIENDE1\")";
_l_atiende.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENDE1")));
 }else {
 //BA.debugLineNum = 171;BA.debugLine="l_atiende.Text = \" \"";
_l_atiende.setText(BA.ObjectToCharSequence(" "));
 };
 //BA.debugLineNum = 173;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 = 174;BA.debugLine="l_atiende2.Text = c.GetString(\"CAT_CL_ATIENTE2\")";
_l_atiende2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENTE2")));
 }else {
 //BA.debugLineNum = 176;BA.debugLine="l_atiende2.Text = \" \"";
_l_atiende2.setText(BA.ObjectToCharSequence(" "));
 };
 //BA.debugLineNum = 178;BA.debugLine="la_saldotot.Text = c.GetString(\"CAT_CL_TELEFONO\")";
_la_saldotot.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_TELEFONO")));
 //BA.debugLineNum = 179;BA.debugLine="la_saldooper.Text = c.GetString(\"CAT_CL_EMAIL\")";
_la_saldooper.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_EMAIL")));
 //BA.debugLineNum = 181;BA.debugLine="CREDITO = C.GetString(\"CAT_CL_BCREDITO\")";
_credito = _c.GetString("CAT_CL_BCREDITO");
 //BA.debugLineNum = 184;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 = 185;BA.debugLine="L_CANT.Text = cym.Get(\"cantidad\")";
_l_cant.setText(BA.ObjectToCharSequence(_cym.Get((Object)("cantidad"))));
 //BA.debugLineNum = 186;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 = 194;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 = 195;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 = 197;BA.debugLine="Private cuenta0 As String = 0";
_cuenta0 = BA.NumberToString(0);
 //BA.debugLineNum = 198;BA.debugLine="Private arti As String = 0";
_arti = BA.NumberToString(0);
 //BA.debugLineNum = 199;BA.debugLine="If vc.RowCount > 0 Then";
if (_vc.getRowCount()>0) { 
 //BA.debugLineNum = 200;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 = 201;BA.debugLine="vc.Position = i";
_vc.setPosition(_i);
 //BA.debugLineNum = 204;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 = 209;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 = 215;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 = 216;BA.debugLine="Private Cuenta1 As String = 0";
_cuenta1 = BA.NumberToString(0);
 //BA.debugLineNum = 217;BA.debugLine="Private arti1 As String = 0";
_arti1 = BA.NumberToString(0);
 //BA.debugLineNum = 218;BA.debugLine="If vc2.RowCount > 0 Then";
if (_vc2.getRowCount()>0) { 
 //BA.debugLineNum = 219;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 = 220;BA.debugLine="vc2.Position = i";
_vc2.setPosition(_i);
 //BA.debugLineNum = 221;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 = 222;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 = 223;BA.debugLine="If vc3.RowCount > 0 Then";
if (_vc3.getRowCount()>0) { 
 //BA.debugLineNum = 224;BA.debugLine="vc3.Position = 0";
_vc3.setPosition((int) (0));
 //BA.debugLineNum = 225;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 = 226;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 = 232;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 = 233;BA.debugLine="Private Cuenta2 As String = 0";
_cuenta2 = BA.NumberToString(0);
 //BA.debugLineNum = 234;BA.debugLine="Private arti2 As String = 0";
_arti2 = BA.NumberToString(0);
 //BA.debugLineNum = 235;BA.debugLine="If vc4.RowCount > 0 Then";
if (_vc4.getRowCount()>0) { 
 //BA.debugLineNum = 237;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 = 238;BA.debugLine="vc4.Position = i";
_vc4.setPosition(_i);
 //BA.debugLineNum = 239;BA.debugLine="If vc4.GetString(\"HVD_PROID\") <> vc4.GetString(";
if ((_vc4.GetString("HVD_PROID")).equals(_vc4.GetString("HVD_CODPROMO")) == false) { 
 //BA.debugLineNum = 240;BA.debugLine="If vc4.GetString(\"HVD_RECHAZO\") = 0 Then";
if ((_vc4.GetString("HVD_RECHAZO")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 241;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 = 242;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 = 244;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 = 245;BA.debugLine="If vc5.RowCount > 0 Then";
if (_vc5.getRowCount()>0) { 
 //BA.debugLineNum = 246;BA.debugLine="vc5.Position= 0";
_vc5.setPosition((int) (0));
 //BA.debugLineNum = 248;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 = 249;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 = 259;BA.debugLine="Subs.centraPanel(p_credito, Root.Width)";
_subs._centrapanel /*String*/ (ba,_p_credito,_root.getWidth());
 //BA.debugLineNum = 260;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) AND PE_TIPO NOT IN ('SOBRANTE','FALTANTE')"))));
 //BA.debugLineNum = 261;BA.debugLine="Private Cuenta3 As String = 0";
_cuenta3 = BA.NumberToString(0);
 //BA.debugLineNum = 262;BA.debugLine="Private arti3 As String = 0";
_arti3 = BA.NumberToString(0);
 //BA.debugLineNum = 263;BA.debugLine="If c4.RowCount > 0 Then";
if (_c4.getRowCount()>0) { 
 //BA.debugLineNum = 264;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 = 265;BA.debugLine="c4.Position = i";
_c4.setPosition(_i);
 //BA.debugLineNum = 266;BA.debugLine="arti3 = arti3 + c4.GetString(\"PE_CANT\")";
_arti3 = BA.NumberToString((double)(Double.parseDouble(_arti3))+(double)(Double.parseDouble(_c4.GetString("PE_CANT"))));
 //BA.debugLineNum = 267;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 = 270;BA.debugLine="Log(cuenta0)";
__c.LogImpl("143188346",_cuenta0,0);
 //BA.debugLineNum = 271;BA.debugLine="Log(Cuenta1)";
__c.LogImpl("143188347",_cuenta1,0);
 //BA.debugLineNum = 272;BA.debugLine="Log(Cuenta2)";
__c.LogImpl("143188348",_cuenta2,0);
 //BA.debugLineNum = 273;BA.debugLine="Log(Cuenta3)";
__c.LogImpl("143188349",_cuenta3,0);
 //BA.debugLineNum = 275;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 = 276;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 = 281;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 = 282;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 283;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 284;BA.debugLine="Starter.MAC_IMPRESORA = c.GetString(\"CAT_VA_VALO";
_starter._mac_impresora /*String*/  = _c.GetString("CAT_VA_VALOR");
 };
 //BA.debugLineNum = 286;BA.debugLine="If Starter.MAC_IMPRESORA = \"\" Then Starter.MAC_IM";
if ((_starter._mac_impresora /*String*/ ).equals("")) { 
_starter._mac_impresora /*String*/  = "0";};
 //BA.debugLineNum = 288;BA.debugLine="Printer1.Initialize(Me, \"Printer1\")";
_printer1._initialize /*String*/ (ba,this,"Printer1");
 //BA.debugLineNum = 290;BA.debugLine="If Printer1.IsConnected = False Then";
if (_printer1._isconnected /*boolean*/ ()==__c.False) { 
 }else {
 //BA.debugLineNum = 294;BA.debugLine="Printer1.DisConnect";
_printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 295;BA.debugLine="Printer1.Connect";
_printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 296;BA.debugLine="Log(\"2\")";
__c.LogImpl("143188372","2",0);
 };
 //BA.debugLineNum = 327;BA.debugLine="Private vcred4 As Cursor = Starter.skmt.ExecQuery";
_vcred4 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vcred4 = (anywheresoftware.b4a.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)))+"' and HVD_BCREDITO = '1' "))));
 //BA.debugLineNum = 328;BA.debugLine="Private Cuentacred2 As Float = 0";
_cuentacred2 = (float) (0);
 //BA.debugLineNum = 330;BA.debugLine="If vcred4.RowCount > 0 Then";
if (_vcred4.getRowCount()>0) { 
 //BA.debugLineNum = 332;BA.debugLine="For i = 0 To vcred4.RowCount - 1";
{
final int step116 = 1;
final int limit116 = (int) (_vcred4.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit116 ;_i = _i + step116 ) {
 //BA.debugLineNum = 333;BA.debugLine="vcred4.Position = i";
_vcred4.setPosition(_i);
 //BA.debugLineNum = 334;BA.debugLine="If vcred4.GetString(\"HVD_PROID\") <> vcred4.GetS";
if ((_vcred4.GetString("HVD_PROID")).equals(_vcred4.GetString("HVD_CODPROMO")) == false) { 
 //BA.debugLineNum = 335;BA.debugLine="If vcred4.GetString(\"HVD_RECHAZO\") = 0 Then";
if ((_vcred4.GetString("HVD_RECHAZO")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 336;BA.debugLine="Cuentacred2 = Cuentacred2 + vcred4.GetString(";
_cuentacred2 = (float) (_cuentacred2+(double)(Double.parseDouble(_vcred4.GetString("HVD_COSTO_TOT"))));
 }else {
 //BA.debugLineNum = 339;BA.debugLine="Private vcred5 As Cursor = Starter.skmt.ExecQ";
_vcred5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vcred5 = (anywheresoftware.b4a.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)(_vcred4.GetString("HVD_PROID")))+"'"))));
 //BA.debugLineNum = 340;BA.debugLine="If vcred5.RowCount > 0 Then";
if (_vcred5.getRowCount()>0) { 
 //BA.debugLineNum = 341;BA.debugLine="vc5.Position= 0";
_vc5.setPosition((int) (0));
 //BA.debugLineNum = 343;BA.debugLine="Cuentacred2 = Cuentacred2 +((vcred4.GetStrin";
_cuentacred2 = (float) (_cuentacred2+(((double)(Double.parseDouble(_vcred4.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vcred4.GetString("HVD_RECHAZOCANT"))))*((double)(Double.parseDouble(_vcred4.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_vcred4.GetString("HVD_CANT"))))));
 };
 };
 };
 }
};
 };
 //BA.debugLineNum = 352;BA.debugLine="Private vcred As Cursor = Starter.skmt.ExecQuery(";
_vcred = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vcred = (anywheresoftware.b4a.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) and HVD_BCREDITO = '1'"))));
 //BA.debugLineNum = 354;BA.debugLine="Private cuentacred0 As Float = 0";
_cuentacred0 = (float) (0);
 //BA.debugLineNum = 356;BA.debugLine="If vcred.RowCount > 0 Then";
if (_vcred.getRowCount()>0) { 
 //BA.debugLineNum = 357;BA.debugLine="For i = 0 To vcred.RowCount - 1";
{
final int step134 = 1;
final int limit134 = (int) (_vcred.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit134 ;_i = _i + step134 ) {
 //BA.debugLineNum = 358;BA.debugLine="vcred.Position = i";
_vcred.setPosition(_i);
 //BA.debugLineNum = 361;BA.debugLine="cuentacred0 = cuentacred0 + ((vcred.GetInt(\"HVD";
_cuentacred0 = (float) (_cuentacred0+((_vcred.GetInt("HVD_CANT")-_vcred.GetInt("HVD_RECHAZOCANT"))*(_vcred.GetDouble("HVD_COSTO_TOT")/(double)_vcred.GetInt("HVD_CANT"))));
 }
};
 };
 //BA.debugLineNum = 370;BA.debugLine="Log(cuentacred0)";
__c.LogImpl("143188446",BA.NumberToString(_cuentacred0),0);
 //BA.debugLineNum = 371;BA.debugLine="Log(Cuentacred2)";
__c.LogImpl("143188447",BA.NumberToString(_cuentacred2),0);
 //BA.debugLineNum = 373;BA.debugLine="l_montopag.Text = NumberFormat2((cuentacred0 + Cu";
_l_montopag.setText(BA.ObjectToCharSequence(__c.NumberFormat2((_cuentacred0+_cuentacred2),(int) (0),(int) (2),(int) (2),__c.False)));
 //BA.debugLineNum = 374;BA.debugLine="l_montoefec.Text = NumberFormat2((NumberFormat2((";
_l_montoefec.setText(BA.ObjectToCharSequence(__c.NumberFormat2(((double)(Double.parseDouble(__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.False)))-(double)(Double.parseDouble(_l_montopag.getText()))),(int) (0),(int) (2),(int) (2),__c.False)));
 //BA.debugLineNum = 378;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 = 379;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 380;BA.debugLine="almacen = c.GetString(\"ID_ALMACEN\")";
_almacen = _c.GetString("ID_ALMACEN");
 //BA.debugLineNum = 381;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 383;BA.debugLine="Dim cp As Cursor = Starter.skmt.ExecQuery(\"SELECT";
_cp = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_cp = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT * FROM PAGARES WHERE PA_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 384;BA.debugLine="If cp.RowCount > 0 Then";
if (_cp.getRowCount()>0) { 
 //BA.debugLineNum = 386;BA.debugLine="Dim x2 As Cursor =Starter.skmt.ExecQuery(\"SELECT";
_x2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_x2 = (anywheresoftware.b4a.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 = 387;BA.debugLine="x2.Position = 0";
_x2.setPosition((int) (0));
 //BA.debugLineNum = 388;BA.debugLine="If x2.GetString(\"gestion\") = 2 Then";
if ((_x2.GetString("gestion")).equals(BA.NumberToString(2))) { 
 //BA.debugLineNum = 389;BA.debugLine="b_cancel_pagare.Visible = True";
_b_cancel_pagare.setVisible(__c.True);
 }else {
 //BA.debugLineNum = 391;BA.debugLine="b_cancel_pagare.Visible = False";
_b_cancel_pagare.setVisible(__c.False);
 };
 }else {
 //BA.debugLineNum = 395;BA.debugLine="b_cancel_pagare.Visible = False";
_b_cancel_pagare.setVisible(__c.False);
 };
 //BA.debugLineNum = 400;BA.debugLine="Log(\"SI AQUI\")";
__c.LogImpl("143188476","SI AQUI",0);
 //BA.debugLineNum = 401;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 = 402;BA.debugLine="b.Position = 0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 403;BA.debugLine="Dim cabonos As String = b.GetString(\"CLIENTE\")";
_cabonos = _b.GetString("CLIENTE");
 //BA.debugLineNum = 404;BA.debugLine="If cabonos = 0 Then";
if ((_cabonos).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 405;BA.debugLine="b_cxc.Visible = False";
_b_cxc.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 407;BA.debugLine="b_cxc.Visible = True";
_b_cxc.setVisible(__c.True);
 };
 //BA.debugLineNum = 412;BA.debugLine="If (Subs.traeCliente = \"63403\" OR Subs.traeClient";
if (((_subs._traecliente /*String*/ (ba)).equals("63403") || (_subs._traecliente /*String*/ (ba)).equals("100000"))) { 
 //BA.debugLineNum = 413;BA.debugLine="gest.Visible = False";
_gest.setVisible(__c.False);
 //BA.debugLineNum = 414;BA.debugLine="b_noEntrega.Visible = False";
_b_noentrega.setVisible(__c.False);
 //BA.debugLineNum = 415;BA.debugLine="Tar.Visible = True";
_tar.setVisible(__c.True);
 //BA.debugLineNum = 416;BA.debugLine="NUEVO.Visible = False";
_nuevo.setVisible(__c.False);
 //BA.debugLineNum = 417;BA.debugLine="B_IMP2.Visible = False";
_b_imp2.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 419;BA.debugLine="Tar.Visible = True";
_tar.setVisible(__c.True);
 //BA.debugLineNum = 420;BA.debugLine="gest.Visible = True";
_gest.setVisible(__c.True);
 //BA.debugLineNum = 421;BA.debugLine="b_noEntrega.Visible = True";
_b_noentrega.setVisible(__c.True);
 //BA.debugLineNum = 422;BA.debugLine="NUEVO.Visible = True";
_nuevo.setVisible(__c.True);
 //BA.debugLineNum = 423;BA.debugLine="B_IMP2.Visible = True";
_b_imp2.setVisible(__c.True);
 };
 //BA.debugLineNum = 425;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 = 571;BA.debugLine="If p_credito.Visible Then";
if (true) break;

case 1:
//if
this.state = 10;
if (parent._p_credito.getVisible()) { 
this.state = 3;
}else if(parent._p_abono.getVisible()) { 
this.state = 5;
}else if(((parent._la_cuenta.getText()).equals("63403") || (parent._la_cuenta.getText()).equals("100000"))) { 
this.state = 7;
}else {
this.state = 9;
}if (true) break;

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

case 5:
//C
this.state = 10;
 //BA.debugLineNum = 576;BA.debugLine="p_abono.Visible = False";
parent._p_abono.setVisible(parent.__c.False);
 //BA.debugLineNum = 577;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 if (true) break;

case 7:
//C
this.state = 10;
 //BA.debugLineNum = 579;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
parent._b4xpages._showpage /*String*/ (ba,"Principal");
 //BA.debugLineNum = 580;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 if (true) break;

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

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

            }
        }
    }
}
public String  _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
 //BA.debugLineNum = 109;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
 //BA.debugLineNum = 110;BA.debugLine="Root = Root1";
_root = _root1;
 //BA.debugLineNum = 112;BA.debugLine="g.Initialize(\"GPS\")";
_g.Initialize("GPS");
 //BA.debugLineNum = 114;BA.debugLine="Root.LoadLayout(\"cliente\")";
_root.LoadLayout("cliente",ba);
 //BA.debugLineNum = 115;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 = 116;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 = 117;BA.debugLine="s.Position=0";
_s.setPosition((int) (0));
 //BA.debugLineNum = 118;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 119;BA.debugLine="la_cuenta.Text = c.GetString(\"CAT_CL_CODIGO\")";
_la_cuenta.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CODIGO")));
 //BA.debugLineNum = 120;BA.debugLine="La_nombre.Text = c.GetString(\"CAT_CL_NOMBRE\")";
_la_nombre.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_NOMBRE")));
 //BA.debugLineNum = 121;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 = 122;BA.debugLine="la_col.Text = c.GetString(\"CAT_CL_COLONIA\")";
_la_col.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_COLONIA")));
 //BA.debugLineNum = 123;BA.debugLine="la_edo.Text = c.GetString(\"CAT_CL_EDO\")";
_la_edo.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_EDO")));
 //BA.debugLineNum = 124;BA.debugLine="la_cp.Text = c.GetString(\"CAT_CL_CP\")";
_la_cp.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CP")));
 //BA.debugLineNum = 125;BA.debugLine="l_entre1.Text = c.GetString(\"CAT_CL_CALLE1\")";
_l_entre1.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE1")));
 //BA.debugLineNum = 126;BA.debugLine="l_entre2.Text = c.GetString(\"CAT_CL_CALLE2\")";
_l_entre2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE2")));
 //BA.debugLineNum = 127;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 = 128;BA.debugLine="l_atiende.Text = c.GetString(\"CAT_CL_ATIENDE1\")";
_l_atiende.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENDE1")));
 }else {
 //BA.debugLineNum = 130;BA.debugLine="l_atiende.Text = \" \"";
_l_atiende.setText(BA.ObjectToCharSequence(" "));
 };
 //BA.debugLineNum = 132;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 = 133;BA.debugLine="l_atiende2.Text = c.GetString(\"CAT_CL_ATIENTE2\")";
_l_atiende2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENTE2")));
 //BA.debugLineNum = 134;BA.debugLine="Log(\"|\"&c.GetString(\"CAT_CL_ATIENTE2\")&\"|\")";
__c.LogImpl("143122713","|"+_c.GetString("CAT_CL_ATIENTE2")+"|",0);
 }else {
 //BA.debugLineNum = 136;BA.debugLine="l_atiende2.Text = \" \"";
_l_atiende2.setText(BA.ObjectToCharSequence(" "));
 };
 //BA.debugLineNum = 138;BA.debugLine="la_saldotot.Text = c.GetString(\"CAT_CL_TELEFONO\")";
_la_saldotot.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_TELEFONO")));
 //BA.debugLineNum = 139;BA.debugLine="la_saldooper.Text = c.GetString(\"CAT_CL_EMAIL\")";
_la_saldooper.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_EMAIL")));
 //BA.debugLineNum = 141;BA.debugLine="btAdmin.Initialize(\"BlueTeeth\")";
_btadmin.Initialize(ba,"BlueTeeth");
 //BA.debugLineNum = 142;BA.debugLine="cmp20.Initialize(\"Printer\")";
_cmp20.Initialize("Printer");
 //BA.debugLineNum = 143;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 = 144;BA.debugLine="End Sub";
return "";
}
public String  _cb_tipopago_selectedindexchanged(int _index) throws Exception{
 //BA.debugLineNum = 2470;BA.debugLine="Private Sub cb_tipopago_SelectedIndexChanged (Inde";
 //BA.debugLineNum = 2471;BA.debugLine="itemselect = cb_tipopago.SelectedItem";
_itemselect = _cb_tipopago._getselecteditem /*String*/ ();
 //BA.debugLineNum = 2472;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="Dim tipo_abonox As String";
_tipo_abonox = "";
 //BA.debugLineNum = 98;BA.debugLine="Private b_cancel_pagare As Button";
_b_cancel_pagare = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 99;BA.debugLine="Dim NOTA As String";
_nota = "";
 //BA.debugLineNum = 100;BA.debugLine="Private B_IMP2 As Button";
_b_imp2 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 101;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 = 2046;BA.debugLine="Sub CreateListItem(mostrar As String, mostrar1 As";
 //BA.debugLineNum = 2047;BA.debugLine="Dim p As B4XView = xui.CreatePanel(\"\")";
_p = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p = _xui.CreatePanel(ba,"");
 //BA.debugLineNum = 2048;BA.debugLine="p.SetLayoutAnimated(0, 0, 0, 1, 10)";
_p.SetLayoutAnimated((int) (0),(int) (0),(int) (0),(int) (1),(int) (10));
 //BA.debugLineNum = 2049;BA.debugLine="p.LoadLayout(\"folioabono\")";
_p.LoadLayout("folioabono",ba);
 //BA.debugLineNum = 2050;BA.debugLine="p.Height= 32dip";
_p.setHeight(__c.DipToCurrent((int) (32)));
 //BA.debugLineNum = 2051;BA.debugLine="p.Width = 80dip";
_p.setWidth(__c.DipToCurrent((int) (80)));
 //BA.debugLineNum = 2053;BA.debugLine="l_folio.Text = mostrar";
_l_folio.setText(BA.ObjectToCharSequence(_mostrar));
 //BA.debugLineNum = 2054;BA.debugLine="l_saldo.Text = mostrar1";
_l_saldo.setText(BA.ObjectToCharSequence(_mostrar1));
 //BA.debugLineNum = 2057;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 = 2058;BA.debugLine="End Sub";
return null;
}
public String  _datos_click() throws Exception{
 //BA.debugLineNum = 593;BA.debugLine="Sub DATOS_Click";
 //BA.debugLineNum = 595;BA.debugLine="End Sub";
return "";
}
public void  _gest_click() throws Exception{
ResumableSub_gest_Click rsub = new ResumableSub_gest_Click(this);
rsub.resume(ba, null);
}
public static class ResumableSub_gest_Click extends BA.ResumableSub {
public ResumableSub_gest_Click(reparto_izca.keymon.lat.c_cliente parent) {
this.parent = parent;
}
reparto_izca.keymon.lat.c_cliente parent;
anywheresoftware.b4a.sql.SQL.CursorWrapper _x2 = null;
int _result = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _k = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _y = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _u = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _cobra = null;

@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 = 458;BA.debugLine="Dim x2 As Cursor =Starter.skmt.ExecQuery(\"SELECT";
_x2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_x2 = (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 gestion FROM kmt_info where CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 459;BA.debugLine="x2.Position = 0";
_x2.setPosition((int) (0));
 //BA.debugLineNum = 460;BA.debugLine="If x2.GetString(\"gestion\") = 2 Then";
if (true) break;

case 1:
//if
this.state = 40;
if ((_x2.GetString("gestion")).equals(BA.NumberToString(2))) { 
this.state = 3;
}else {
this.state = 9;
}if (true) break;

case 3:
//C
this.state = 4;
 //BA.debugLineNum = 461;BA.debugLine="Msgbox2Async(\"Ya se gestiono el cliente, no se p";
parent.__c.Msgbox2Async(BA.ObjectToCharSequence("Ya se gestiono el cliente, no se pueden hacer modificaciones"),BA.ObjectToCharSequence("Atención"),"","","Ok",parent.__c.LoadBitmap(parent.__c.File.getDirAssets(),"alert2.png"),ba,parent.__c.False);
 //BA.debugLineNum = 462;BA.debugLine="Wait For Msgbox_Result (Result As Int)";
parent.__c.WaitFor("msgbox_result", ba, this, null);
this.state = 41;
return;
case 41:
//C
this.state = 4;
_result = (Integer) result[0];
;
 //BA.debugLineNum = 463;BA.debugLine="If Result= DialogResponse.NEGATIVE Then";
if (true) break;

case 4:
//if
this.state = 7;
if (_result==parent.__c.DialogResponse.NEGATIVE) { 
this.state = 6;
}if (true) break;

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

case 7:
//C
this.state = 40;
;
 if (true) break;

case 9:
//C
this.state = 10;
 //BA.debugLineNum = 467;BA.debugLine="Dim k As Cursor = Starter.skmt.ExecQuery(\"SELECT";
_k = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_k = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT CUENTA from CUENTAA")));
 //BA.debugLineNum = 468;BA.debugLine="k.Position = 0";
_k.setPosition((int) (0));
 //BA.debugLineNum = 469;BA.debugLine="Log(k.GetString(\"CUENTA\"))";
parent.__c.LogImpl("143450391",_k.GetString("CUENTA"),0);
 //BA.debugLineNum = 470;BA.debugLine="Dim y As Cursor = Starter.skmt.ExecQuery2(\"SELEC";
_y = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_y = (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*/ .ExecQuery2("SELECT IFNULL(SUM(a_abono),0) AS a_abono FROM ABONOS WHERE a_cliente = ?",new String[]{_k.GetString("CUENTA")})));
 //BA.debugLineNum = 471;BA.debugLine="y.position = 0";
_y.setPosition((int) (0));
 //BA.debugLineNum = 472;BA.debugLine="Dim u As Cursor = Starter.skmt.ExecQuery2(\"SELEC";
_u = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_u = (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*/ .ExecQuery2("SELECT IFNULL(SUM(SALDO_PENDIENTE),0) AS SALDO_PENDIENTE FROM ABONOSP WHERE CLIENTE = ?",new String[]{_k.GetString("CUENTA")})));
 //BA.debugLineNum = 473;BA.debugLine="u.Position = 0";
_u.setPosition((int) (0));
 //BA.debugLineNum = 474;BA.debugLine="If u.RowCount > 0 Then";
if (true) break;

case 10:
//if
this.state = 39;
if (_u.getRowCount()>0) { 
this.state = 12;
}else {
this.state = 38;
}if (true) break;

case 12:
//C
this.state = 13;
 //BA.debugLineNum = 475;BA.debugLine="If u.GetString(\"SALDO_PENDIENTE\") <> 0 Then";
if (true) break;

case 13:
//if
this.state = 36;
if ((_u.GetString("SALDO_PENDIENTE")).equals(BA.NumberToString(0)) == false) { 
this.state = 15;
}else if((_u.GetString("SALDO_PENDIENTE")).equals(BA.NumberToString(0))) { 
this.state = 35;
}if (true) break;

case 15:
//C
this.state = 16;
 //BA.debugLineNum = 476;BA.debugLine="If y.RowCount > 0 Then";
if (true) break;

case 16:
//if
this.state = 33;
if (_y.getRowCount()>0) { 
this.state = 18;
}else {
this.state = 32;
}if (true) break;

case 18:
//C
this.state = 19;
 //BA.debugLineNum = 477;BA.debugLine="If u.GetString(\"SALDO_PENDIENTE\") = y.GetStri";
if (true) break;

case 19:
//if
this.state = 30;
if ((_u.GetString("SALDO_PENDIENTE")).equals(_y.GetString("a_abono"))) { 
this.state = 21;
}else {
this.state = 29;
}if (true) break;

case 21:
//C
this.state = 22;
 //BA.debugLineNum = 479;BA.debugLine="Dim cobra As Cursor = Starter.skmt.ExecQuery";
_cobra = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_cobra = (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 = 480;BA.debugLine="cobra.Position = 0";
_cobra.setPosition((int) (0));
 //BA.debugLineNum = 481;BA.debugLine="If cobra.RowCount = 1 And cobra.GetString(\"H";
if (true) break;

case 22:
//if
this.state = 27;
if (_cobra.getRowCount()==1 && (_cobra.GetString("HVD_PRONOMBRE")).equals("Cobranza Pendiente")) { 
this.state = 24;
}else {
this.state = 26;
}if (true) break;

case 24:
//C
this.state = 27;
 //BA.debugLineNum = 482;BA.debugLine="Guardado";
parent._guardado();
 if (true) break;

case 26:
//C
this.state = 27;
 //BA.debugLineNum = 484;BA.debugLine="B_IMP_Click";
parent._b_imp_click();
 //BA.debugLineNum = 485;BA.debugLine="banderaimp = 1";
parent._banderaimp = (int) (1);
 if (true) break;

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

case 29:
//C
this.state = 30;
 //BA.debugLineNum = 489;BA.debugLine="MsgboxAsync(\"Para poder hacer una entrega se";
parent.__c.MsgboxAsync(BA.ObjectToCharSequence("Para poder hacer una entrega se necesita liquidar el(los) pagare(s)"),BA.ObjectToCharSequence("Atención"),ba);
 if (true) break;

case 30:
//C
this.state = 33;
;
 if (true) break;

case 32:
//C
this.state = 33;
 //BA.debugLineNum = 492;BA.debugLine="MsgboxAsync(\"Para poder hacer una entrega se";
parent.__c.MsgboxAsync(BA.ObjectToCharSequence("Para poder hacer una entrega se necesita liquidar el(los) pagare(s)"),BA.ObjectToCharSequence("Atención"),ba);
 if (true) break;

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

case 35:
//C
this.state = 36;
 //BA.debugLineNum = 495;BA.debugLine="B_IMP_Click";
parent._b_imp_click();
 //BA.debugLineNum = 496;BA.debugLine="banderaimp = 1";
parent._banderaimp = (int) (1);
 if (true) break;

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

case 38:
//C
this.state = 39;
 //BA.debugLineNum = 499;BA.debugLine="B_IMP_Click";
parent._b_imp_click();
 //BA.debugLineNum = 500;BA.debugLine="banderaimp = 1";
parent._banderaimp = (int) (1);
 if (true) break;

case 39:
//C
this.state = 40;
;
 if (true) break;

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

            }
        }
    }
}
public String  _gps_locationchanged(anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
 //BA.debugLineNum = 431;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
 //BA.debugLineNum = 434;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 435;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 436;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 437;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 438;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM HIST_GPS\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM HIST_GPS");
 //BA.debugLineNum = 439;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 = 440;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 = 506;BA.debugLine="Sub Guardado";
 //BA.debugLineNum = 507;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 508;BA.debugLine="DateTime.TimeFormat=\"HHmmss\"";
__c.DateTime.setTimeFormat("HHmmss");
 //BA.debugLineNum = 509;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 510;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 511;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 = 512;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 513;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
_cuenta = _c.GetString("CUENTA");
 //BA.debugLineNum = 514;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 = 515;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 516;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 517;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 518;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 = 519;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 520;BA.debugLine="Dim ruta As String = d.GetString(\"RUTAA\")";
_ruta = _d.GetString("RUTAA");
 //BA.debugLineNum = 521;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 522;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 = 523;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 524;BA.debugLine="Dim rutapre As String = d.GetString(\"CAT_CL_RUTA\"";
_rutapre = _d.GetString("CAT_CL_RUTA");
 //BA.debugLineNum = 525;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 529;BA.debugLine="Dim fechaprev As String = Subs.traefECHAPREV";
_fechaprev = _subs._traefechaprev /*String*/ (ba);
 //BA.debugLineNum = 532;BA.debugLine="Dim rutaactualizar As String";
_rutaactualizar = "";
 //BA.debugLineNum = 533;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 = 534;BA.debugLine="If rut.RowCount > 0 Then";
if (_rut.getRowCount()>0) { 
 //BA.debugLineNum = 535;BA.debugLine="rut.Position = 0";
_rut.setPosition((int) (0));
 //BA.debugLineNum = 536;BA.debugLine="rutaactualizar = rut.GetString(\"CAT_CL_RUTA\")";
_rutaactualizar = _rut.GetString("CAT_CL_RUTA");
 };
 //BA.debugLineNum = 539;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 = 540;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 = 541;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 = 542;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 = 543;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 = 544;BA.debugLine="mandaPendientesreparto";
_mandapendientesreparto();
 //BA.debugLineNum = 551;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 //BA.debugLineNum = 553;BA.debugLine="End Sub";
return "";
}
public String  _guardar_click() throws Exception{
 //BA.debugLineNum = 597;BA.debugLine="Sub Guardar_Click";
 //BA.debugLineNum = 602;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 //BA.debugLineNum = 604;BA.debugLine="End Sub";
return "";
}
public void  _hist_click() throws Exception{
ResumableSub_HIST_Click rsub = new ResumableSub_HIST_Click(this);
rsub.resume(ba, null);
}
public static class ResumableSub_HIST_Click extends BA.ResumableSub {
public ResumableSub_HIST_Click(reparto_izca.keymon.lat.c_cliente parent) {
this.parent = parent;
}
reparto_izca.keymon.lat.c_cliente parent;
anywheresoftware.b4a.sql.SQL.CursorWrapper _x2 = null;
int _result = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _pagacheca2 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _k = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _y = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _u = null;

@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 = 627;BA.debugLine="Dim x2 As Cursor =Starter.skmt.ExecQuery(\"SELECT";
_x2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_x2 = (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 gestion FROM kmt_info where CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 628;BA.debugLine="x2.Position = 0";
_x2.setPosition((int) (0));
 //BA.debugLineNum = 629;BA.debugLine="If x2.GetString(\"gestion\") = 2 Then";
if (true) break;

case 1:
//if
this.state = 44;
if ((_x2.GetString("gestion")).equals(BA.NumberToString(2))) { 
this.state = 3;
}else {
this.state = 9;
}if (true) break;

case 3:
//C
this.state = 4;
 //BA.debugLineNum = 630;BA.debugLine="Msgbox2Async(\"Ya se gestiono el cliente, no se p";
parent.__c.Msgbox2Async(BA.ObjectToCharSequence("Ya se gestiono el cliente, no se pueden hacer modificaciones"),BA.ObjectToCharSequence("Atención"),"","","Ok",parent.__c.LoadBitmap(parent.__c.File.getDirAssets(),"alert2.png"),ba,parent.__c.False);
 //BA.debugLineNum = 631;BA.debugLine="Wait For Msgbox_Result (Result As Int)";
parent.__c.WaitFor("msgbox_result", ba, this, null);
this.state = 45;
return;
case 45:
//C
this.state = 4;
_result = (Integer) result[0];
;
 //BA.debugLineNum = 632;BA.debugLine="If Result= DialogResponse.NEGATIVE Then";
if (true) break;

case 4:
//if
this.state = 7;
if (_result==parent.__c.DialogResponse.NEGATIVE) { 
this.state = 6;
}if (true) break;

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

case 7:
//C
this.state = 44;
;
 if (true) break;

case 9:
//C
this.state = 10;
 //BA.debugLineNum = 637;BA.debugLine="Dim pagacheca2 As Cursor = Starter.skmt.ExecQuer";
_pagacheca2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_pagacheca2 = (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 PAGARES WHERE PA_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 639;BA.debugLine="If pagacheca2.RowCount > 0 Then";
if (true) break;

case 10:
//if
this.state = 43;
if (_pagacheca2.getRowCount()>0) { 
this.state = 12;
}else {
this.state = 18;
}if (true) break;

case 12:
//C
this.state = 13;
 //BA.debugLineNum = 642;BA.debugLine="Msgbox2Async(\"El pagare ya fue generdo, no se p";
parent.__c.Msgbox2Async(BA.ObjectToCharSequence("El pagare ya fue generdo, no se puede realizar modificación."),BA.ObjectToCharSequence("Atención"),"","","Ok",parent.__c.LoadBitmap(parent.__c.File.getDirAssets(),"alert2.png"),ba,parent.__c.False);
 //BA.debugLineNum = 643;BA.debugLine="Wait For Msgbox_Result (Result As Int)";
parent.__c.WaitFor("msgbox_result", ba, this, null);
this.state = 46;
return;
case 46:
//C
this.state = 13;
_result = (Integer) result[0];
;
 //BA.debugLineNum = 644;BA.debugLine="If Result= DialogResponse.POSITIVE Then";
if (true) break;

case 13:
//if
this.state = 16;
if (_result==parent.__c.DialogResponse.POSITIVE) { 
this.state = 15;
}if (true) break;

case 15:
//C
this.state = 16;
 //BA.debugLineNum = 645;BA.debugLine="Log(\"Aqui\")";
parent.__c.LogImpl("143974691","Aqui",0);
 if (true) break;

case 16:
//C
this.state = 43;
;
 if (true) break;

case 18:
//C
this.state = 19;
 //BA.debugLineNum = 650;BA.debugLine="Dim k As Cursor = Starter.skmt.ExecQuery(\"SELEC";
_k = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_k = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT CUENTA from CUENTAA")));
 //BA.debugLineNum = 651;BA.debugLine="k.Position = 0";
_k.setPosition((int) (0));
 //BA.debugLineNum = 652;BA.debugLine="Log(k.GetString(\"CUENTA\"))";
parent.__c.LogImpl("143974698",_k.GetString("CUENTA"),0);
 //BA.debugLineNum = 653;BA.debugLine="Dim y As Cursor = Starter.skmt.ExecQuery2(\"SELE";
_y = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_y = (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*/ .ExecQuery2("SELECT IFNULL(SUM(a_abono),0) AS a_abono FROM ABONOS WHERE a_cliente = ?",new String[]{_k.GetString("CUENTA")})));
 //BA.debugLineNum = 654;BA.debugLine="y.position = 0";
_y.setPosition((int) (0));
 //BA.debugLineNum = 655;BA.debugLine="Dim u As Cursor = Starter.skmt.ExecQuery2(\"SELE";
_u = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_u = (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*/ .ExecQuery2("SELECT IFNULL(SUM(SALDO_PENDIENTE),0) AS SALDO_PENDIENTE FROM ABONOSP WHERE CLIENTE = ?",new String[]{_k.GetString("CUENTA")})));
 //BA.debugLineNum = 656;BA.debugLine="u.Position = 0";
_u.setPosition((int) (0));
 //BA.debugLineNum = 657;BA.debugLine="If u.RowCount > 0 Then";
if (true) break;

case 19:
//if
this.state = 42;
if (_u.getRowCount()>0) { 
this.state = 21;
}else {
this.state = 41;
}if (true) break;

case 21:
//C
this.state = 22;
 //BA.debugLineNum = 658;BA.debugLine="If u.GetString(\"SALDO_PENDIENTE\") <> 0 Then";
if (true) break;

case 22:
//if
this.state = 39;
if ((_u.GetString("SALDO_PENDIENTE")).equals(BA.NumberToString(0)) == false) { 
this.state = 24;
}else if((_u.GetString("SALDO_PENDIENTE")).equals(BA.NumberToString(0))) { 
this.state = 38;
}if (true) break;

case 24:
//C
this.state = 25;
 //BA.debugLineNum = 659;BA.debugLine="If y.RowCount > 0 Then";
if (true) break;

case 25:
//if
this.state = 36;
if (_y.getRowCount()>0) { 
this.state = 27;
}else {
this.state = 35;
}if (true) break;

case 27:
//C
this.state = 28;
 //BA.debugLineNum = 660;BA.debugLine="If u.GetString(\"SALDO_PENDIENTE\") = y.GetStr";
if (true) break;

case 28:
//if
this.state = 33;
if ((_u.GetString("SALDO_PENDIENTE")).equals(_y.GetString("a_abono"))) { 
this.state = 30;
}else {
this.state = 32;
}if (true) break;

case 30:
//C
this.state = 33;
 //BA.debugLineNum = 661;BA.debugLine="B4XPages.MainPage.detalleVenta.prodsMap.Ini";
parent._b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._detalleventa /*reparto_izca.keymon.lat.c_detalleventa*/ ._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
 //BA.debugLineNum = 662;BA.debugLine="B4XPages.ShowPage(\"DetalleVenta\")";
parent._b4xpages._showpage /*String*/ (ba,"DetalleVenta");
 if (true) break;

case 32:
//C
this.state = 33;
 //BA.debugLineNum = 664;BA.debugLine="MsgboxAsync(\"Para poder hacer una entrega s";
parent.__c.MsgboxAsync(BA.ObjectToCharSequence("Para poder hacer una entrega se necesita liquidar el(los) pagare(s)"),BA.ObjectToCharSequence("Atención"),ba);
 if (true) break;

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

case 35:
//C
this.state = 36;
 //BA.debugLineNum = 667;BA.debugLine="MsgboxAsync(\"Para poder hacer una entrega se";
parent.__c.MsgboxAsync(BA.ObjectToCharSequence("Para poder hacer una entrega se necesita liquidar el(los) pagare(s)"),BA.ObjectToCharSequence("Atención"),ba);
 if (true) break;

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

case 38:
//C
this.state = 39;
 //BA.debugLineNum = 670;BA.debugLine="B4XPages.MainPage.detalleVenta.prodsMap.Initi";
parent._b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._detalleventa /*reparto_izca.keymon.lat.c_detalleventa*/ ._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
 //BA.debugLineNum = 671;BA.debugLine="B4XPages.ShowPage(\"DetalleVenta\")";
parent._b4xpages._showpage /*String*/ (ba,"DetalleVenta");
 if (true) break;

case 39:
//C
this.state = 42;
;
 if (true) break;

case 41:
//C
this.state = 42;
 //BA.debugLineNum = 674;BA.debugLine="B4XPages.MainPage.detalleVenta.prodsMap.Initia";
parent._b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._detalleventa /*reparto_izca.keymon.lat.c_detalleventa*/ ._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
 //BA.debugLineNum = 675;BA.debugLine="B4XPages.ShowPage(\"DetalleVenta\")";
parent._b4xpages._showpage /*String*/ (ba,"DetalleVenta");
 if (true) break;

case 42:
//C
this.state = 43;
;
 if (true) break;

case 43:
//C
this.state = 44;
;
 if (true) break;

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

            }
        }
    }
}
public void  _imprime_abonopagare() throws Exception{
ResumableSub_imprime_abonopagare rsub = new ResumableSub_imprime_abonopagare(this);
rsub.resume(ba, null);
}
public static class ResumableSub_imprime_abonopagare extends BA.ResumableSub {
public ResumableSub_imprime_abonopagare(reparto_izca.keymon.lat.c_cliente parent) {
this.parent = parent;
}
reparto_izca.keymon.lat.c_cliente parent;
int _cont = 0;
String _telefono = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _c7 = null;
String _notaabono = "";
double _saldopendiente = 0;
double _saldopendiente1 = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c4 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c5 = null;
int _numpago = 0;
String _tipopagotick = "";
int _resultado = 0;
String _rutaactualizar = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _rut = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c3 = null;
double _textedit = 0;
double _sumaresta = 0;
String _ruta = "";
String _rutapre = "";

@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 = 1598;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 = 1599;BA.debugLine="c.Position=0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 1600;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
parent._usuario = parent._c.GetString("USUARIO");
 //BA.debugLineNum = 1601;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
parent.__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 1602;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
parent.__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 1603;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
parent._sdate = parent.__c.DateTime.Date(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 1604;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
parent._stime = parent.__c.DateTime.Time(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 1605;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 1636;BA.debugLine="ProgressDialogShow(\"Imprimiendo, un momento ...\")";
parent.__c.ProgressDialogShow(ba,BA.ObjectToCharSequence("Imprimiendo, un momento ..."));
 //BA.debugLineNum = 1637;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 1638;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 = 1640;BA.debugLine="Printer1.Connect";
parent._printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 1641;BA.debugLine="Private cont As Int = 0";
_cont = (int) (0);
 //BA.debugLineNum = 1642;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 = 1643;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 145;
return;
case 145:
//C
this.state = 7;
;
 //BA.debugLineNum = 1644;BA.debugLine="cont = cont + 1";
_cont = (int) (_cont+1);
 //BA.debugLineNum = 1645;BA.debugLine="If cont = 7 Then Printer1.Connect 'Tratamos de";
if (true) break;

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

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

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

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

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

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

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

case 21:
//C
this.state = 22;
 //BA.debugLineNum = 1652;BA.debugLine="Printer1.Connect";
parent._printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 1653;BA.debugLine="Private cont As Int = 0";
_cont = (int) (0);
 //BA.debugLineNum = 1654;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 = 1655;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 147;
return;
case 147:
//C
this.state = 25;
;
 //BA.debugLineNum = 1656;BA.debugLine="cont = cont + 1";
_cont = (int) (_cont+1);
 //BA.debugLineNum = 1657;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 = 1658;BA.debugLine="If cont > 4 Then impresoraConectada = True";
if (true) break;

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

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

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

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

case 38:
//C
this.state = 39;
;
 //BA.debugLineNum = 1663;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 1664;BA.debugLine="ESPACIO = 22";
parent._espacio = (int) (22);
 //BA.debugLineNum = 1665;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 1675;BA.debugLine="Dim telefono As String = \"\"";
_telefono = "";
 //BA.debugLineNum = 1676;BA.debugLine="Dim c7 As Cursor = Starter.skmt.ExecQuery(\"select";
_c7 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c7 = (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_CL_TELEFONO,' ') AS CAT_CL_TELEFONO FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 1677;BA.debugLine="If c7.RowCount > 0 Then";
if (true) break;

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

case 41:
//C
this.state = 42;
 //BA.debugLineNum = 1678;BA.debugLine="c7.Position = 0";
_c7.setPosition((int) (0));
 //BA.debugLineNum = 1679;BA.debugLine="telefono = c7.GetString(\"CAT_CL_TELEFONO\")";
_telefono = _c7.GetString("CAT_CL_TELEFONO");
 if (true) break;

case 42:
//C
this.state = 43;
;
 //BA.debugLineNum = 1681;BA.debugLine="c7.Close";
_c7.Close();
 //BA.debugLineNum = 1685;BA.debugLine="Printer1.WriteString(\"Izca Distribuciones\" &  CRL";
parent._printer1._writestring /*String*/ ("Izca Distribuciones"+parent.__c.CRLF);
 //BA.debugLineNum = 1687;BA.debugLine="Printer1.WriteString(sDate &  CRLF)";
parent._printer1._writestring /*String*/ (parent._sdate+parent.__c.CRLF);
 //BA.debugLineNum = 1688;BA.debugLine="Printer1.WriteString(sTime &  CRLF)";
parent._printer1._writestring /*String*/ (parent._stime+parent.__c.CRLF);
 //BA.debugLineNum = 1689;BA.debugLine="Printer1.WriteString(\"Reparto:\" & usuario &  CRLF";
parent._printer1._writestring /*String*/ ("Reparto:"+parent._usuario+parent.__c.CRLF);
 //BA.debugLineNum = 1690;BA.debugLine="Printer1.WriteString(\"Tienda: \" & La_nombre.Text";
parent._printer1._writestring /*String*/ ("Tienda: "+parent._la_nombre.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 1691;BA.debugLine="Printer1.WriteString(\"ID.Cliente: \" &  la_cuenta.";
parent._printer1._writestring /*String*/ ("ID.Cliente: "+parent._la_cuenta.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 1692;BA.debugLine="Printer1.WriteString(\"Calle: \" & la_Calle.Text &";
parent._printer1._writestring /*String*/ ("Calle: "+parent._la_calle.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 1693;BA.debugLine="Printer1.WriteString(\"Colonia: \" & la_col.Text &";
parent._printer1._writestring /*String*/ ("Colonia: "+parent._la_col.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 1694;BA.debugLine="Printer1.WriteString(\"Telefono: \" & telefono &  C";
parent._printer1._writestring /*String*/ ("Telefono: "+_telefono+parent.__c.CRLF);
 //BA.debugLineNum = 1695;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1696;BA.debugLine="Dim notaabono As String";
_notaabono = "";
 //BA.debugLineNum = 1697;BA.debugLine="Dim saldopendiente As Double";
_saldopendiente = 0;
 //BA.debugLineNum = 1699;BA.debugLine="If tipo_abonox = \"abono\" Then";
if (true) break;

case 43:
//if
this.state = 68;
if ((parent._tipo_abonox).equals("abono")) { 
this.state = 45;
}else if((parent._tipo_abonox).equals("cxc")) { 
this.state = 59;
}if (true) break;

case 45:
//C
this.state = 46;
 //BA.debugLineNum = 1702;BA.debugLine="c = Starter.skmt.ExecQuery($\"select distinct hvd";
parent._c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select distinct hvd_num_ticket from hist_ventas where hvd_cliente = '"+parent.__c.SmartStringFormatter("",(Object)(parent._la_cuenta.getText()))+"'"))));
 //BA.debugLineNum = 1703;BA.debugLine="If c.RowCount > 0 Then";
if (true) break;

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

case 48:
//C
this.state = 49;
 //BA.debugLineNum = 1704;BA.debugLine="c.Position = 0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 1705;BA.debugLine="notaabono = c.GetString(\"HVD_NUM_TICKET\")";
_notaabono = parent._c.GetString("HVD_NUM_TICKET");
 if (true) break;

case 49:
//C
this.state = 50;
;
 //BA.debugLineNum = 1707;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 1709;BA.debugLine="c = Starter.skmt.ExecQuery($\"select iFNULL(sum(P";
parent._c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select iFNULL(sum(PA_MONTO),0) AS SALDO_PENDIENTE from PAGARES where PA_CLIENTE = '"+parent.__c.SmartStringFormatter("",(Object)(parent._la_cuenta.getText()))+"'"))));
 //BA.debugLineNum = 1710;BA.debugLine="If c.RowCount > 0 Then";
if (true) break;

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

case 52:
//C
this.state = 53;
 //BA.debugLineNum = 1711;BA.debugLine="c.Position = 0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 1712;BA.debugLine="saldopendiente = c.GetDouble(\"SALDO_PENDIENTE\")";
_saldopendiente = parent._c.GetDouble("SALDO_PENDIENTE");
 //BA.debugLineNum = 1713;BA.debugLine="Log(c.GetString(\"SALDO_PENDIENTE\"))";
parent.__c.LogImpl("144826740",parent._c.GetString("SALDO_PENDIENTE"),0);
 if (true) break;

case 53:
//C
this.state = 54;
;
 //BA.debugLineNum = 1715;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 1718;BA.debugLine="Dim saldopendiente1 As Double = 0";
_saldopendiente1 = 0;
 //BA.debugLineNum = 1719;BA.debugLine="Dim c4 As Cursor= Starter.skmt.ExecQuery(\"SELECT";
_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)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT Ifnull(SUM(a_abono),0) AS SALDO_PENDIENTE FROM ABONOS WHERE a_cliente IN (SELECT CUENTA FROM CUENTAA) and a_tipoabono is not null")));
 //BA.debugLineNum = 1720;BA.debugLine="If c4.RowCount > 0 Then";
if (true) break;

case 54:
//if
this.state = 57;
if (_c4.getRowCount()>0) { 
this.state = 56;
}if (true) break;

case 56:
//C
this.state = 57;
 //BA.debugLineNum = 1721;BA.debugLine="c4.Position = 0";
_c4.setPosition((int) (0));
 //BA.debugLineNum = 1722;BA.debugLine="Dim c5 As Cursor= Starter.skmt.ExecQuery(\"SELEC";
_c5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c5 = (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(a_abono,0) AS SALDO_PENDIENTE FROM ABONOS WHERE a_cliente IN (SELECT CUENTA FROM CUENTAA) and a_tipoabono is not null")));
 //BA.debugLineNum = 1723;BA.debugLine="saldopendiente1 = c4.GetDouble(\"SALDO_PENDIENTE";
_saldopendiente1 = _c4.GetDouble("SALDO_PENDIENTE");
 if (true) break;

case 57:
//C
this.state = 68;
;
 //BA.debugLineNum = 1727;BA.debugLine="c4.Close";
_c4.Close();
 if (true) break;

case 59:
//C
this.state = 60;
 //BA.debugLineNum = 1730;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT NOTA, SUM(SAL";
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 NOTA, SUM(SALDO_PENDIENTE) AS SALDO_PENDIENTE FROM ABONOSP WHERE CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 1731;BA.debugLine="If c.RowCount > 0 Then";
if (true) break;

case 60:
//if
this.state = 63;
if (parent._c.getRowCount()>0) { 
this.state = 62;
}if (true) break;

case 62:
//C
this.state = 63;
 //BA.debugLineNum = 1732;BA.debugLine="c.Position = 0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 1733;BA.debugLine="notaabono = c.GetString(\"NOTA\")";
_notaabono = parent._c.GetString("NOTA");
 //BA.debugLineNum = 1734;BA.debugLine="saldopendiente = c.GetDouble(\"SALDO_PENDIENTE\")";
_saldopendiente = parent._c.GetDouble("SALDO_PENDIENTE");
 if (true) break;

case 63:
//C
this.state = 64;
;
 //BA.debugLineNum = 1736;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 1738;BA.debugLine="Dim saldopendiente1 As Double = 0";
_saldopendiente1 = 0;
 //BA.debugLineNum = 1739;BA.debugLine="Dim c4 As Cursor= Starter.skmt.ExecQuery(\"SELECT";
_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)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT Ifnull(SUM(a_abono),0) AS SALDO_PENDIENTE FROM ABONOS WHERE a_cliente IN (SELECT CUENTA FROM CUENTAA) and a_tipoabono is null")));
 //BA.debugLineNum = 1740;BA.debugLine="If c4.RowCount > 0 Then";
if (true) break;

case 64:
//if
this.state = 67;
if (_c4.getRowCount()>0) { 
this.state = 66;
}if (true) break;

case 66:
//C
this.state = 67;
 //BA.debugLineNum = 1741;BA.debugLine="c4.Position = 0";
_c4.setPosition((int) (0));
 //BA.debugLineNum = 1742;BA.debugLine="Dim c5 As Cursor= Starter.skmt.ExecQuery(\"SELEC";
_c5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c5 = (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(a_abono,0) AS SALDO_PENDIENTE FROM ABONOS WHERE a_cliente IN (SELECT CUENTA FROM CUENTAA) and a_tipoabono is null")));
 //BA.debugLineNum = 1743;BA.debugLine="saldopendiente1 = c4.GetDouble(\"SALDO_PENDIENTE";
_saldopendiente1 = _c4.GetDouble("SALDO_PENDIENTE");
 if (true) break;

case 67:
//C
this.state = 68;
;
 //BA.debugLineNum = 1748;BA.debugLine="c4.Close";
_c4.Close();
 if (true) break;

case 68:
//C
this.state = 69;
;
 //BA.debugLineNum = 1758;BA.debugLine="Dim numpago As Int = c5.RowCount + 1";
_numpago = (int) (_c5.getRowCount()+1);
 //BA.debugLineNum = 1759;BA.debugLine="Log(notaabono)";
parent.__c.LogImpl("144826786",_notaabono,0);
 //BA.debugLineNum = 1760;BA.debugLine="Log(et_abono.Text)";
parent.__c.LogImpl("144826787",parent._et_abono.getText(),0);
 //BA.debugLineNum = 1761;BA.debugLine="Printer1.WriteString(\"Comprobante de pago del pag";
parent._printer1._writestring /*String*/ ("Comprobante de pago del pagare"+parent.__c.CRLF);
 //BA.debugLineNum = 1762;BA.debugLine="Printer1.WriteString(\"Folio:  \" & notaabono &\"-\"&";
parent._printer1._writestring /*String*/ ("Folio:  "+_notaabono+"-"+BA.NumberToString((_numpago))+parent.__c.CRLF);
 //BA.debugLineNum = 1763;BA.debugLine="Printer1.WriteString(\"Monto deuda:  \" & (NumberFo";
parent._printer1._writestring /*String*/ ("Monto deuda:  "+(parent.__c.NumberFormat(_saldopendiente-_saldopendiente1,(int) (0),(int) (2)))+parent.__c.CRLF);
 //BA.debugLineNum = 1764;BA.debugLine="Printer1.WriteString(\"Monto abono:  \" & (NumberFo";
parent._printer1._writestring /*String*/ ("Monto abono:  "+(parent.__c.NumberFormat((double)(Double.parseDouble(parent._et_abono.getText())),(int) (0),(int) (2)))+parent.__c.CRLF);
 //BA.debugLineNum = 1765;BA.debugLine="Printer1.WriteString(\"Restante: \" &(NumberFormat(";
parent._printer1._writestring /*String*/ ("Restante: "+(parent.__c.NumberFormat(_saldopendiente-(double)(Double.parseDouble(parent._et_abono.getText()))-_saldopendiente1,(int) (0),(int) (2)))+parent.__c.CRLF);
 //BA.debugLineNum = 1766;BA.debugLine="Printer1.WriteString(\"Fecha Abono: \" & sDate &  C";
parent._printer1._writestring /*String*/ ("Fecha Abono: "+parent._sdate+parent.__c.CRLF);
 //BA.debugLineNum = 1767;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1768;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1769;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1770;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1771;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1772;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1773;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1774;BA.debugLine="Printer1.WriteString(\"---------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 1775;BA.debugLine="Printer1.WriteString(\"-------------FIRMA---------";
parent._printer1._writestring /*String*/ ("-------------FIRMA------------"+parent.__c.CRLF);
 //BA.debugLineNum = 1776;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1777;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1778;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1779;BA.debugLine="DateTime.DateFormat = \"ddMMyyyy\"";
parent.__c.DateTime.setDateFormat("ddMMyyyy");
 //BA.debugLineNum = 1780;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
parent._sdate = parent.__c.DateTime.Date(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 1786;BA.debugLine="Dim tipopagotick As String = \"\"";
_tipopagotick = "";
 //BA.debugLineNum = 1787;BA.debugLine="If itemselect = \"TRANSFERENCIA\" Then";
if (true) break;

case 69:
//if
this.state = 76;
if ((parent._itemselect).equals("TRANSFERENCIA")) { 
this.state = 71;
}else if((parent._itemselect).equals("EFECTIVO")) { 
this.state = 73;
}else if((parent._itemselect).equals("CHEQUE")) { 
this.state = 75;
}if (true) break;

case 71:
//C
this.state = 76;
 //BA.debugLineNum = 1788;BA.debugLine="tipopagotick = \"T\"";
_tipopagotick = "T";
 if (true) break;

case 73:
//C
this.state = 76;
 //BA.debugLineNum = 1790;BA.debugLine="tipopagotick = \"E\"";
_tipopagotick = "E";
 if (true) break;

case 75:
//C
this.state = 76;
 //BA.debugLineNum = 1792;BA.debugLine="tipopagotick = \"C\"";
_tipopagotick = "C";
 if (true) break;

case 76:
//C
this.state = 77;
;
 //BA.debugLineNum = 1795;BA.debugLine="Printer1.WriteBarCode(\"I\",notaabono&sDate&tipopag";
parent._printer1._writebarcode /*String*/ ("I",_notaabono+parent._sdate+_tipopagotick+BA.NumberToString(_numpago));
 //BA.debugLineNum = 1796;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1797;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1798;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 1799;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 149;
return;
case 149:
//C
this.state = 77;
;
 //BA.debugLineNum = 1800;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 1801;BA.debugLine="ProgressDialogHide";
parent.__c.ProgressDialogHide();
 //BA.debugLineNum = 1804;BA.debugLine="If tipo_abonox = \"abono\" Then";
if (true) break;

case 77:
//if
this.state = 144;
if ((parent._tipo_abonox).equals("abono")) { 
this.state = 79;
}else if((parent._tipo_abonox).equals("cxc")) { 
this.state = 87;
}if (true) break;

case 79:
//C
this.state = 80;
 //BA.debugLineNum = 1805;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 = 1807;BA.debugLine="Wait For Msgbox_Result (resultado As Int)";
parent.__c.WaitFor("msgbox_result", ba, this, null);
this.state = 150;
return;
case 150:
//C
this.state = 80;
_resultado = (Integer) result[0];
;
 //BA.debugLineNum = 1808;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
if (true) break;

case 80:
//if
this.state = 85;
if (_resultado==parent.__c.DialogResponse.POSITIVE) { 
this.state = 82;
}else {
this.state = 84;
}if (true) break;

case 82:
//C
this.state = 85;
 //BA.debugLineNum = 1809;BA.debugLine="imprime_abonopagare";
parent._imprime_abonopagare();
 if (true) break;

case 84:
//C
this.state = 85;
 //BA.debugLineNum = 1811;BA.debugLine="p_abono.Visible = False";
parent._p_abono.setVisible(parent.__c.False);
 //BA.debugLineNum = 1813;BA.debugLine="Starter.skmt.ExecNonQuery($\"INSERT INTO ABONOS(";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("INSERT INTO ABONOS(a_usuario, a_ruta, a_cliente, a_abono, a_fecha,a_tipoabono,TIPO_PAGO,a_ticket,a_numpago) 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()))))+"', 1,'"+parent.__c.SmartStringFormatter("",(Object)(parent._itemselect))+"','"+parent.__c.SmartStringFormatter("",(Object)(_notaabono))+"','"+parent.__c.SmartStringFormatter("",(Object)(_numpago))+"')"));
 //BA.debugLineNum = 1814;BA.debugLine="ToastMessageShow(\"Abono guardado\", False)";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Abono guardado"),parent.__c.False);
 if (true) break;

case 85:
//C
this.state = 144;
;
 if (true) break;

case 87:
//C
this.state = 88;
 //BA.debugLineNum = 1818;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 = 1819;BA.debugLine="Wait For Msgbox_Result (resultado As Int)";
parent.__c.WaitFor("msgbox_result", ba, this, null);
this.state = 151;
return;
case 151:
//C
this.state = 88;
_resultado = (Integer) result[0];
;
 //BA.debugLineNum = 1820;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
if (true) break;

case 88:
//if
this.state = 143;
if (_resultado==parent.__c.DialogResponse.POSITIVE) { 
this.state = 90;
}else {
this.state = 92;
}if (true) break;

case 90:
//C
this.state = 143;
 //BA.debugLineNum = 1821;BA.debugLine="imprime_abonopagare";
parent._imprime_abonopagare();
 if (true) break;

case 92:
//C
this.state = 93;
 //BA.debugLineNum = 1827;BA.debugLine="h = Starter.skmt.ExecQuery(\"SELECT CUENTA from";
parent._h = (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 CUENTA from CUENTAA")));
 //BA.debugLineNum = 1828;BA.debugLine="h.Position = 0";
parent._h.setPosition((int) (0));
 //BA.debugLineNum = 1829;BA.debugLine="Log(h.GetString(\"CUENTA\"))";
parent.__c.LogImpl("144826856",parent._h.GetString("CUENTA"),0);
 //BA.debugLineNum = 1830;BA.debugLine="j = Starter.skmt.ExecQuery2(\"SELECT a_abono FRO";
parent._j = (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*/ .ExecQuery2("SELECT a_abono FROM ABONOS WHERE a_cliente = ?",new String[]{parent._h.GetString("CUENTA")})));
 //BA.debugLineNum = 1831;BA.debugLine="j.position = 0";
parent._j.setPosition((int) (0));
 //BA.debugLineNum = 1832;BA.debugLine="If j.RowCount = 0 Then";
if (true) break;

case 93:
//if
this.state = 142;
if (parent._j.getRowCount()==0) { 
this.state = 95;
}else {
this.state = 119;
}if (true) break;

case 95:
//C
this.state = 96;
 //BA.debugLineNum = 1833;BA.debugLine="p_abono.Visible = False";
parent._p_abono.setVisible(parent.__c.False);
 //BA.debugLineNum = 1834;BA.debugLine="Starter.skmt.ExecNonQuery($\"INSERT INTO ABONOS";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("INSERT INTO ABONOS(a_usuario, a_ruta, a_cliente, a_abono, a_fecha,TIPO_PAGO,a_ticket,a_numpago) 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)(_notaabono))+"','"+parent.__c.SmartStringFormatter("",(Object)(_numpago))+"')"));
 //BA.debugLineNum = 1835;BA.debugLine="ToastMessageShow(\"Abono guardado\", False)";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Abono guardado"),parent.__c.False);
 //BA.debugLineNum = 1836;BA.debugLine="Dim rutaactualizar As String";
_rutaactualizar = "";
 //BA.debugLineNum = 1837;BA.debugLine="Dim rut As Cursor = Starter.skmt.ExecQuery(\"SE";
_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)(parent._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 = 1838;BA.debugLine="If rut.RowCount > 0 Then";
if (true) break;

case 96:
//if
this.state = 99;
if (_rut.getRowCount()>0) { 
this.state = 98;
}if (true) break;

case 98:
//C
this.state = 99;
 //BA.debugLineNum = 1839;BA.debugLine="rut.Position = 0";
_rut.setPosition((int) (0));
 //BA.debugLineNum = 1840;BA.debugLine="rutaactualizar = rut.GetString(\"CAT_CL_RUTA\")";
_rutaactualizar = _rut.GetString("CAT_CL_RUTA");
 if (true) break;

case 99:
//C
this.state = 100;
;
 //BA.debugLineNum = 1842;BA.debugLine="Starter.skmt.ExecNonQuery($\"UPDATE kmt_info se";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("UPDATE kmt_info set gestion = 0, HORAENT = '"+parent.__c.SmartStringFormatter("",(Object)(parent._sdate+" "+parent._stime))+"' where CAT_CL_CODIGO In (select cuenta from cuentaa) and CAT_CL_RUTA = '"+parent.__c.SmartStringFormatter("",(Object)(_rutaactualizar))+"'"));
 //BA.debugLineNum = 1843;BA.debugLine="Starter.skmt.ExecNonQuery($\"DELETE FROM NOVENT";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("DELETE FROM NOVENTA WHERE NV_CLIENTE IN (select cuenta from cuentaa)"));
 //BA.debugLineNum = 1844;BA.debugLine="Private c3 As Cursor = Starter.skmt.ExecQuery(";
_c3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c3 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT * FROM PEDIDO WHERE PE_CLIENTEOR IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 1845;BA.debugLine="If c3.RowCount = 0 Then";
if (true) break;

case 100:
//if
this.state = 105;
if (_c3.getRowCount()==0) { 
this.state = 102;
}else {
this.state = 104;
}if (true) break;

case 102:
//C
this.state = 105;
 //BA.debugLineNum = 1846;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTA";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 0,  HVD_RECHAZOCANT = 0, BCAJAS = BCAJAS_OR, CANTC = CANTC_OR  WHERE HVD_cliente in (Select CUENTA from cuentaa)"));
 //BA.debugLineNum = 1847;BA.debugLine="B4XPage_Appear";
parent._b4xpage_appear();
 if (true) break;

case 104:
//C
this.state = 105;
 //BA.debugLineNum = 1849;BA.debugLine="MsgboxAsync(\"Hay productos que ya se vendiero";
parent.__c.MsgboxAsync(BA.ObjectToCharSequence("Hay productos que ya se vendieron, no se puede regresar la venta"),BA.ObjectToCharSequence("Atención"),ba);
 if (true) break;

case 105:
//C
this.state = 106;
;
 //BA.debugLineNum = 1851;BA.debugLine="Dim textedit As Double = et_abono.Text";
_textedit = (double)(Double.parseDouble(parent._et_abono.getText()));
 //BA.debugLineNum = 1852;BA.debugLine="Dim sumaresta As Double = saldopendiente-texte";
_sumaresta = _saldopendiente-_textedit-_saldopendiente1;
 //BA.debugLineNum = 1853;BA.debugLine="Log(NumberFormat2(sumaresta,0,2,2,False))";
parent.__c.LogImpl("144826880",parent.__c.NumberFormat2(_sumaresta,(int) (0),(int) (2),(int) (2),parent.__c.False),0);
 //BA.debugLineNum = 1854;BA.debugLine="If NumberFormat2(sumaresta,0,2,2,False) <> \"-.";
if (true) break;

case 106:
//if
this.state = 117;
if ((parent.__c.NumberFormat2(_sumaresta,(int) (0),(int) (2),(int) (2),parent.__c.False)).equals("-.00") == false) { 
this.state = 108;
}if (true) break;

case 108:
//C
this.state = 109;
 //BA.debugLineNum = 1855;BA.debugLine="If NumberFormat2(sumaresta,0,2,2,False) <> \".";
if (true) break;

case 109:
//if
this.state = 116;
if ((parent.__c.NumberFormat2(_sumaresta,(int) (0),(int) (2),(int) (2),parent.__c.False)).equals(".00") == false) { 
this.state = 111;
}if (true) break;

case 111:
//C
this.state = 112;
 //BA.debugLineNum = 1856;BA.debugLine="Dim rutaactualizar As String";
_rutaactualizar = "";
 //BA.debugLineNum = 1857;BA.debugLine="Dim rut As Cursor = Starter.skmt.ExecQuery(\"";
_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)(parent._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 = 1858;BA.debugLine="If rut.RowCount > 0 Then";
if (true) break;

case 112:
//if
this.state = 115;
if (_rut.getRowCount()>0) { 
this.state = 114;
}if (true) break;

case 114:
//C
this.state = 115;
 //BA.debugLineNum = 1859;BA.debugLine="rut.Position = 0";
_rut.setPosition((int) (0));
 //BA.debugLineNum = 1860;BA.debugLine="rutaactualizar = rut.GetString(\"CAT_CL_RUTA";
_rutaactualizar = _rut.GetString("CAT_CL_RUTA");
 if (true) break;

case 115:
//C
this.state = 116;
;
 //BA.debugLineNum = 1862;BA.debugLine="Starter.skmt.ExecNonQuery($\"UPDATE kmt_info";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("UPDATE kmt_info set gestion = 3, HORAENT = '"+parent.__c.SmartStringFormatter("",(Object)(parent._sdate+" "+parent._stime))+"' where CAT_CL_CODIGO In (select cuenta from cuentaa) and CAT_CL_RUTA = '"+parent.__c.SmartStringFormatter("",(Object)(_rutaactualizar))+"'"));
 //BA.debugLineNum = 1863;BA.debugLine="Starter.skmt.ExecNonQuery($\"DELETE FROM NOVE";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("DELETE FROM NOVENTA WHERE NV_CLIENTE IN (select cuenta from cuentaa)"));
 //BA.debugLineNum = 1864;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO NOVE";
parent._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_FOTO,NV_REPROGRAMAR) VALUES(?,?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(parent._la_cuenta.getText()),(Object)(parent._sdate+parent._stime),(Object)(parent._usuario),(Object)("PAGO INCOMPLETO"),(Object)("PAGO INCOMPLETO"),(Object)(parent._b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(parent._b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_rutaactualizar),(Object)(0)}));
 //BA.debugLineNum = 1865;BA.debugLine="Starter.skmt.ExecNonQuery(\"update HIST_VENTA";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("update HIST_VENTAS SET HVD_RECHAZO = 1, HVD_RECHAZOCANT = HVD_CANT, HVD_RECHAZOCANTC = CANTC, BCAJAS = 0 , CANTC = 0 WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)");
 //BA.debugLineNum = 1866;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENT";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 2,  HVD_RECHAZOCANT = HVD_RECHAZOCANT  WHERE HVD_PROID = HVD_CODPROMO and HVD_CLIENTE in (Select CUENTA from cuentaa)"));
 //BA.debugLineNum = 1867;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM PEDID";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM PEDIDO WHERE PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA)");
 //BA.debugLineNum = 1868;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT RUTAA FRO";
parent._d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT RUTAA FROM RUTAA")));
 //BA.debugLineNum = 1869;BA.debugLine="d.Position = 0";
parent._d.setPosition((int) (0));
 //BA.debugLineNum = 1870;BA.debugLine="Dim ruta As String = d.GetString(\"RUTAA\")";
_ruta = parent._d.GetString("RUTAA");
 //BA.debugLineNum = 1871;BA.debugLine="d.Close";
parent._d.Close();
 //BA.debugLineNum = 1872;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT CAT_CL_RU";
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 CAT_CL_RUTA FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 1873;BA.debugLine="d.Position = 0";
parent._d.setPosition((int) (0));
 //BA.debugLineNum = 1874;BA.debugLine="Dim rutapre As String = d.GetString(\"CAT_CL_";
_rutapre = parent._d.GetString("CAT_CL_RUTA");
 //BA.debugLineNum = 1875;BA.debugLine="d.Close";
parent._d.Close();
 //BA.debugLineNum = 1876;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT HVD_FECHA";
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 HVD_FECHA FROM HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 1877;BA.debugLine="d.Position = 0";
parent._d.setPosition((int) (0));
 //BA.debugLineNum = 1878;BA.debugLine="Dim fechaprev As String = d.GetString(\"HVD_F";
parent._fechaprev = parent._d.GetString("HVD_FECHA");
 //BA.debugLineNum = 1879;BA.debugLine="d.Close";
parent._d.Close();
 //BA.debugLineNum = 1880;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT CUENTA FR";
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 CUENTA FROM CUENTAA")));
 //BA.debugLineNum = 1881;BA.debugLine="d.Position = 0";
parent._d.setPosition((int) (0));
 //BA.debugLineNum = 1882;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO REPA";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO REPARTO_GEO (CLIENTE, USUARIO, FECHA_PUNTEO, LATITUD, LONGITUD, ALMACEN, RUTA_REPARTO, RUTA_PREV, FECHA_PREVENTA, MOTIVO, COMENTARIO,TIPO,ENVIO) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,0)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{parent._cuenta,parent._usuario,parent._sdate+" "+parent._stime,parent._b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ,parent._b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ ,parent._b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._almacen /*String*/ ,_ruta,_rutapre,parent._fechaprev,"PAGO INCOMPLETO","PAGO INCOMPLETO","NO ENTREGADO"}));
 //BA.debugLineNum = 1883;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
parent._b4xpages._showpage /*String*/ (ba,"Principal");
 if (true) break;

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

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

case 119:
//C
this.state = 120;
 //BA.debugLineNum = 1887;BA.debugLine="p_abono.Visible = False";
parent._p_abono.setVisible(parent.__c.False);
 //BA.debugLineNum = 1888;BA.debugLine="Starter.skmt.ExecNonQuery($\"INSERT INTO ABONOS";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("INSERT INTO ABONOS(a_usuario, a_ruta, a_cliente, a_abono, a_fecha,TIPO_PAGO,a_ticket,a_numpago) 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)(_notaabono))+"','"+parent.__c.SmartStringFormatter("",(Object)(_numpago))+"')"));
 //BA.debugLineNum = 1889;BA.debugLine="ToastMessageShow(\"Abono guardado\", False)";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Abono guardado"),parent.__c.False);
 //BA.debugLineNum = 1890;BA.debugLine="Dim rutaactualizar As String";
_rutaactualizar = "";
 //BA.debugLineNum = 1891;BA.debugLine="Dim rut As Cursor = Starter.skmt.ExecQuery(\"SE";
_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)(parent._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 = 1892;BA.debugLine="If rut.RowCount > 0 Then";
if (true) break;

case 120:
//if
this.state = 123;
if (_rut.getRowCount()>0) { 
this.state = 122;
}if (true) break;

case 122:
//C
this.state = 123;
 //BA.debugLineNum = 1893;BA.debugLine="rut.Position = 0";
_rut.setPosition((int) (0));
 //BA.debugLineNum = 1894;BA.debugLine="rutaactualizar = rut.GetString(\"CAT_CL_RUTA\")";
_rutaactualizar = _rut.GetString("CAT_CL_RUTA");
 if (true) break;

case 123:
//C
this.state = 124;
;
 //BA.debugLineNum = 1896;BA.debugLine="Starter.skmt.ExecNonQuery($\"UPDATE kmt_info se";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("UPDATE kmt_info set gestion = 0, HORAENT = '"+parent.__c.SmartStringFormatter("",(Object)(parent._sdate+" "+parent._stime))+"' where CAT_CL_CODIGO In (select cuenta from cuentaa) and CAT_CL_RUTA = '"+parent.__c.SmartStringFormatter("",(Object)(_rutaactualizar))+"'"));
 //BA.debugLineNum = 1897;BA.debugLine="Starter.skmt.ExecNonQuery($\"DELETE FROM NOVENT";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("DELETE FROM NOVENTA WHERE NV_CLIENTE IN (select cuenta from cuentaa)"));
 //BA.debugLineNum = 1898;BA.debugLine="Private c3 As Cursor = Starter.skmt.ExecQuery(";
_c3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c3 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT * FROM PEDIDO WHERE PE_CLIENTEOR IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 1899;BA.debugLine="If c3.RowCount = 0 Then";
if (true) break;

case 124:
//if
this.state = 129;
if (_c3.getRowCount()==0) { 
this.state = 126;
}else {
this.state = 128;
}if (true) break;

case 126:
//C
this.state = 129;
 //BA.debugLineNum = 1900;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTA";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 0,  HVD_RECHAZOCANT = 0, BCAJAS = BCAJAS_OR, CANTC = CANTC_OR  WHERE HVD_cliente in (Select CUENTA from cuentaa)"));
 //BA.debugLineNum = 1901;BA.debugLine="B4XPage_Appear";
parent._b4xpage_appear();
 if (true) break;

case 128:
//C
this.state = 129;
 //BA.debugLineNum = 1903;BA.debugLine="MsgboxAsync(\"Hay productos que ya se vendiero";
parent.__c.MsgboxAsync(BA.ObjectToCharSequence("Hay productos que ya se vendieron, no se puede regresar la venta"),BA.ObjectToCharSequence("Atención"),ba);
 if (true) break;

case 129:
//C
this.state = 130;
;
 //BA.debugLineNum = 1905;BA.debugLine="Dim textedit As Double = et_abono.Text";
_textedit = (double)(Double.parseDouble(parent._et_abono.getText()));
 //BA.debugLineNum = 1906;BA.debugLine="Dim sumaresta As Double = saldopendiente-texte";
_sumaresta = _saldopendiente-_textedit-_saldopendiente1;
 //BA.debugLineNum = 1908;BA.debugLine="If NumberFormat2(sumaresta,0,2,2,False) <> \"-.";
if (true) break;

case 130:
//if
this.state = 141;
if ((parent.__c.NumberFormat2(_sumaresta,(int) (0),(int) (2),(int) (2),parent.__c.False)).equals("-.00") == false) { 
this.state = 132;
}if (true) break;

case 132:
//C
this.state = 133;
 //BA.debugLineNum = 1909;BA.debugLine="If NumberFormat2(sumaresta,0,2,2,False) <> \".";
if (true) break;

case 133:
//if
this.state = 140;
if ((parent.__c.NumberFormat2(_sumaresta,(int) (0),(int) (2),(int) (2),parent.__c.False)).equals(".00") == false) { 
this.state = 135;
}if (true) break;

case 135:
//C
this.state = 136;
 //BA.debugLineNum = 1910;BA.debugLine="Dim rutaactualizar As String";
_rutaactualizar = "";
 //BA.debugLineNum = 1911;BA.debugLine="Dim rut As Cursor = Starter.skmt.ExecQuery(\"";
_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)(parent._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 = 1912;BA.debugLine="If rut.RowCount > 0 Then";
if (true) break;

case 136:
//if
this.state = 139;
if (_rut.getRowCount()>0) { 
this.state = 138;
}if (true) break;

case 138:
//C
this.state = 139;
 //BA.debugLineNum = 1913;BA.debugLine="rut.Position = 0";
_rut.setPosition((int) (0));
 //BA.debugLineNum = 1914;BA.debugLine="rutaactualizar = rut.GetString(\"CAT_CL_RUTA";
_rutaactualizar = _rut.GetString("CAT_CL_RUTA");
 if (true) break;

case 139:
//C
this.state = 140;
;
 //BA.debugLineNum = 1916;BA.debugLine="Starter.skmt.ExecNonQuery($\"UPDATE kmt_info";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("UPDATE kmt_info set gestion = 3, HORAENT = '"+parent.__c.SmartStringFormatter("",(Object)(parent._sdate+" "+parent._stime))+"' where CAT_CL_CODIGO In (select cuenta from cuentaa) and CAT_CL_RUTA = '"+parent.__c.SmartStringFormatter("",(Object)(_rutaactualizar))+"'"));
 //BA.debugLineNum = 1917;BA.debugLine="Starter.skmt.ExecNonQuery($\"DELETE FROM NOVE";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("DELETE FROM NOVENTA WHERE NV_CLIENTE IN (select cuenta from cuentaa)"));
 //BA.debugLineNum = 1918;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO NOVE";
parent._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_FOTO,NV_REPROGRAMAR) VALUES(?,?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(parent._la_cuenta.getText()),(Object)(parent._sdate+parent._stime),(Object)(parent._usuario),(Object)("PAGO INCOMPLETO"),(Object)("PAGO INCOMPLETO"),(Object)(parent._b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(parent._b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_rutaactualizar),(Object)(0)}));
 //BA.debugLineNum = 1919;BA.debugLine="Starter.skmt.ExecNonQuery(\"update HIST_VENTA";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("update HIST_VENTAS SET HVD_RECHAZO = 1, HVD_RECHAZOCANT = HVD_CANT, HVD_RECHAZOCANTC = CANTC, BCAJAS = 0 , CANTC = 0 WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)");
 //BA.debugLineNum = 1920;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENT";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 2,  HVD_RECHAZOCANT = HVD_RECHAZOCANT  WHERE HVD_PROID = HVD_CODPROMO and HVD_CLIENTE in (Select CUENTA from cuentaa)"));
 //BA.debugLineNum = 1921;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM PEDID";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM PEDIDO WHERE PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA)");
 //BA.debugLineNum = 1922;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT RUTAA FRO";
parent._d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT RUTAA FROM RUTAA")));
 //BA.debugLineNum = 1923;BA.debugLine="d.Position = 0";
parent._d.setPosition((int) (0));
 //BA.debugLineNum = 1924;BA.debugLine="Dim ruta As String = d.GetString(\"RUTAA\")";
_ruta = parent._d.GetString("RUTAA");
 //BA.debugLineNum = 1925;BA.debugLine="d.Close";
parent._d.Close();
 //BA.debugLineNum = 1926;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT CAT_CL_RU";
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 CAT_CL_RUTA FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 1927;BA.debugLine="d.Position = 0";
parent._d.setPosition((int) (0));
 //BA.debugLineNum = 1928;BA.debugLine="Dim rutapre As String = d.GetString(\"CAT_CL_";
_rutapre = parent._d.GetString("CAT_CL_RUTA");
 //BA.debugLineNum = 1929;BA.debugLine="d.Close";
parent._d.Close();
 //BA.debugLineNum = 1930;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT HVD_FECHA";
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 HVD_FECHA FROM HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 1931;BA.debugLine="d.Position = 0";
parent._d.setPosition((int) (0));
 //BA.debugLineNum = 1932;BA.debugLine="Dim fechaprev As String = d.GetString(\"HVD_F";
parent._fechaprev = parent._d.GetString("HVD_FECHA");
 //BA.debugLineNum = 1933;BA.debugLine="d.Close";
parent._d.Close();
 //BA.debugLineNum = 1934;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT CUENTA FR";
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 CUENTA FROM CUENTAA")));
 //BA.debugLineNum = 1935;BA.debugLine="d.Position = 0";
parent._d.setPosition((int) (0));
 //BA.debugLineNum = 1936;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO REPA";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO REPARTO_GEO (CLIENTE, USUARIO, FECHA_PUNTEO, LATITUD, LONGITUD, ALMACEN, RUTA_REPARTO, RUTA_PREV, FECHA_PREVENTA, MOTIVO, COMENTARIO,TIPO,ENVIO) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,0)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{parent._cuenta,parent._usuario,parent._sdate+" "+parent._stime,parent._b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ,parent._b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ ,parent._b4xpages._mainpage /*reparto_izca.keymon.lat.b4xmainpage*/ (ba)._almacen /*String*/ ,_ruta,_rutapre,parent._fechaprev,"PAGO INCOMPLETO","PAGO INCOMPLETO","NO ENTREGADO"}));
 //BA.debugLineNum = 1937;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
parent._b4xpages._showpage /*String*/ (ba,"Principal");
 if (true) break;

case 140:
//C
this.state = 141;
;
 if (true) break;

case 141:
//C
this.state = 142;
;
 if (true) break;

case 142:
//C
this.state = 143;
;
 if (true) break;

case 143:
//C
this.state = 144;
;
 if (true) break;

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

            }
        }
    }
}
public void  _imprime_pagare() throws Exception{
ResumableSub_imprime_pagare rsub = new ResumableSub_imprime_pagare(this);
rsub.resume(ba, null);
}
public static class ResumableSub_imprime_pagare extends BA.ResumableSub {
public ResumableSub_imprime_pagare(reparto_izca.keymon.lat.c_cliente parent) {
this.parent = parent;
}
reparto_izca.keymon.lat.c_cliente parent;
int _cont = 0;
String _telefono = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _c7 = null;
String _ticket = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _c6 = null;
int _k = 0;
int _i = 0;
int _resultado = 0;
int step59;
int limit59;
int step76;
int limit76;
int step100;
int limit100;

@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 = 2153;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 = 2154;BA.debugLine="c.Position=0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 2155;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
parent._usuario = parent._c.GetString("USUARIO");
 //BA.debugLineNum = 2156;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
parent.__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 2157;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
parent._sdate = parent.__c.DateTime.Date(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 2158;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
parent._stime = parent.__c.DateTime.Time(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 2159;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 2190;BA.debugLine="ProgressDialogShow(\"Imprimiendo, un momento ...\")";
parent.__c.ProgressDialogShow(ba,BA.ObjectToCharSequence("Imprimiendo, un momento ..."));
 //BA.debugLineNum = 2191;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 2192;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 = 2194;BA.debugLine="Printer1.Connect";
parent._printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 2195;BA.debugLine="Private cont As Int = 0";
_cont = (int) (0);
 //BA.debugLineNum = 2196;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 = 2197;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 117;
return;
case 117:
//C
this.state = 7;
;
 //BA.debugLineNum = 2198;BA.debugLine="cont = cont + 1";
_cont = (int) (_cont+1);
 //BA.debugLineNum = 2199;BA.debugLine="If cont = 7 Then Printer1.Connect 'Tratamos de";
if (true) break;

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

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

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

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

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

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

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

case 21:
//C
this.state = 22;
 //BA.debugLineNum = 2206;BA.debugLine="Printer1.Connect";
parent._printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 2207;BA.debugLine="Private cont As Int = 0";
_cont = (int) (0);
 //BA.debugLineNum = 2208;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 = 2209;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 119;
return;
case 119:
//C
this.state = 25;
;
 //BA.debugLineNum = 2210;BA.debugLine="cont = cont + 1";
_cont = (int) (_cont+1);
 //BA.debugLineNum = 2211;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 = 2212;BA.debugLine="If cont > 4 Then impresoraConectada = True";
if (true) break;

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

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

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

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

case 38:
//C
this.state = 39;
;
 //BA.debugLineNum = 2218;BA.debugLine="TAMANO = 0";
parent._tamano = (int) (0);
 //BA.debugLineNum = 2219;BA.debugLine="ESPACIO = 28";
parent._espacio = (int) (28);
 //BA.debugLineNum = 2220;BA.debugLine="BLANCO = \" \"";
parent._blanco = " ";
 //BA.debugLineNum = 2222;BA.debugLine="Dim telefono As String = \"\"";
_telefono = "";
 //BA.debugLineNum = 2223;BA.debugLine="Dim c7 As Cursor = Starter.skmt.ExecQuery(\"select";
_c7 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c7 = (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_CL_TELEFONO,' ') AS CAT_CL_TELEFONO FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 2224;BA.debugLine="If c7.RowCount > 0 Then";
if (true) break;

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

case 41:
//C
this.state = 42;
 //BA.debugLineNum = 2225;BA.debugLine="c7.Position = 0";
_c7.setPosition((int) (0));
 //BA.debugLineNum = 2226;BA.debugLine="telefono = c7.GetString(\"CAT_CL_TELEFONO\")";
_telefono = _c7.GetString("CAT_CL_TELEFONO");
 if (true) break;

case 42:
//C
this.state = 43;
;
 //BA.debugLineNum = 2228;BA.debugLine="c7.Close";
_c7.Close();
 //BA.debugLineNum = 2247;BA.debugLine="DateTime.DateFormat = \"dd/MM/yyyy\"";
parent.__c.DateTime.setDateFormat("dd/MM/yyyy");
 //BA.debugLineNum = 2248;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
parent.__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 2249;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
parent._sdate = parent.__c.DateTime.Date(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 2250;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
parent._stime = parent.__c.DateTime.Time(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 2251;BA.debugLine="Printer1.WriteString(\"Izca Distribuciones\" &  CRL";
parent._printer1._writestring /*String*/ ("Izca Distribuciones"+parent.__c.CRLF);
 //BA.debugLineNum = 2252;BA.debugLine="Printer1.WriteString(sDate &  CRLF)";
parent._printer1._writestring /*String*/ (parent._sdate+parent.__c.CRLF);
 //BA.debugLineNum = 2253;BA.debugLine="Printer1.WriteString(sTime &  CRLF)";
parent._printer1._writestring /*String*/ (parent._stime+parent.__c.CRLF);
 //BA.debugLineNum = 2254;BA.debugLine="Printer1.WriteString(\"Reparto:\" & usuario &  CRLF";
parent._printer1._writestring /*String*/ ("Reparto:"+parent._usuario+parent.__c.CRLF);
 //BA.debugLineNum = 2255;BA.debugLine="Printer1.WriteString(\"Tienda: \" & La_nombre.Text";
parent._printer1._writestring /*String*/ ("Tienda: "+parent._la_nombre.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 2256;BA.debugLine="Printer1.WriteString(\"ID.Cliente: \" &  la_cuenta.";
parent._printer1._writestring /*String*/ ("ID.Cliente: "+parent._la_cuenta.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 2257;BA.debugLine="Printer1.WriteString(\"Calle: \" & la_Calle.Text &";
parent._printer1._writestring /*String*/ ("Calle: "+parent._la_calle.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 2258;BA.debugLine="Printer1.WriteString(\"Colonia: \" & la_col.Text &";
parent._printer1._writestring /*String*/ ("Colonia: "+parent._la_col.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 2259;BA.debugLine="Printer1.WriteString(\"Telefono: \" & telefono &  C";
parent._printer1._writestring /*String*/ ("Telefono: "+_telefono+parent.__c.CRLF);
 //BA.debugLineNum = 2260;BA.debugLine="Dim Ticket As String = 0";
_ticket = BA.NumberToString(0);
 //BA.debugLineNum = 2261;BA.debugLine="Dim c6 As Cursor = Starter.skmt.ExecQuery(\"select";
_c6 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c6 = (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 distinct HVD_NUM_TICKET FROM HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND HVD_PRONOMBRE <> 'Cobranza Pendiente' and HVD_BCREDITO = '1'")));
 //BA.debugLineNum = 2262;BA.debugLine="If c6.RowCount > 0 Then";
if (true) break;

case 43:
//if
this.state = 50;
if (_c6.getRowCount()>0) { 
this.state = 45;
}if (true) break;

case 45:
//C
this.state = 46;
 //BA.debugLineNum = 2263;BA.debugLine="For k = 0 To c6.RowCount -1";
if (true) break;

case 46:
//for
this.state = 49;
step59 = 1;
limit59 = (int) (_c6.getRowCount()-1);
_k = (int) (0) ;
this.state = 121;
if (true) break;

case 121:
//C
this.state = 49;
if ((step59 > 0 && _k <= limit59) || (step59 < 0 && _k >= limit59)) this.state = 48;
if (true) break;

case 122:
//C
this.state = 121;
_k = ((int)(0 + _k + step59)) ;
if (true) break;

case 48:
//C
this.state = 122;
 //BA.debugLineNum = 2264;BA.debugLine="c6.Position = k";
_c6.setPosition(_k);
 //BA.debugLineNum = 2265;BA.debugLine="Ticket = c6.GetString(\"HVD_NUM_TICKET\")";
_ticket = _c6.GetString("HVD_NUM_TICKET");
 //BA.debugLineNum = 2266;BA.debugLine="Printer1.WriteString(\"Num. Ticket \" & (k +1)&\":";
parent._printer1._writestring /*String*/ ("Num. Ticket "+BA.NumberToString((_k+1))+": "+_ticket+parent.__c.CRLF);
 if (true) break;
if (true) break;

case 49:
//C
this.state = 50;
;
 if (true) break;

case 50:
//C
this.state = 51;
;
 //BA.debugLineNum = 2269;BA.debugLine="c6.Close";
_c6.Close();
 //BA.debugLineNum = 2270;BA.debugLine="Printer1.WriteString(\"Fecha: \" &  sDate &\" \" & sT";
parent._printer1._writestring /*String*/ ("Fecha: "+parent._sdate+" "+parent._stime+parent.__c.CRLF);
 //BA.debugLineNum = 2271;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2275;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) and HVD_BCREDITO = '1' ")));
 //BA.debugLineNum = 2276;BA.debugLine="If c.RowCount > 0 Then";
if (true) break;

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

case 53:
//C
this.state = 54;
 //BA.debugLineNum = 2277;BA.debugLine="Printer1.WriteString(\"------------PAGARE--------";
parent._printer1._writestring /*String*/ ("------------PAGARE------------"+parent.__c.CRLF);
 //BA.debugLineNum = 2278;BA.debugLine="Printer1.WriteString(\"\" &  CRLF)";
parent._printer1._writestring /*String*/ (""+parent.__c.CRLF);
 //BA.debugLineNum = 2279;BA.debugLine="Printer1.WriteString(\"Pagare por los articulos\"";
parent._printer1._writestring /*String*/ ("Pagare por los articulos"+parent.__c.CRLF);
 //BA.debugLineNum = 2280;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 2283;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) and HVD_BCREDITO = '1' order by  HVD_PROID"))));
 //BA.debugLineNum = 2284;BA.debugLine="If S.RowCount>0 Then";
if (true) break;

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

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

case 57:
//for
this.state = 70;
step76 = 1;
limit76 = (int) (parent._s.getRowCount()-1);
_i = (int) (0) ;
this.state = 123;
if (true) break;

case 123:
//C
this.state = 70;
if ((step76 > 0 && _i <= limit76) || (step76 < 0 && _i >= limit76)) this.state = 59;
if (true) break;

case 124:
//C
this.state = 123;
_i = ((int)(0 + _i + step76)) ;
if (true) break;

case 59:
//C
this.state = 60;
 //BA.debugLineNum = 2286;BA.debugLine="S.Position=i";
parent._s.setPosition(_i);
 //BA.debugLineNum = 2287;BA.debugLine="Log(s.GetString(\"HVD_RECHAZO\"))";
parent.__c.LogImpl("145219975",parent._s.GetString("HVD_RECHAZO"),0);
 //BA.debugLineNum = 2288;BA.debugLine="If s.GetString(\"HVD_CANT\") - s.GetString(\"HVD_";
if (true) break;

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

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

case 63:
//if
this.state = 68;
if ((parent._s.GetString("HVD_CODPROMO")).equals(parent._subs._traealmacen /*String*/ (ba))) { 
this.state = 65;
}else if((parent._s.GetString("HVD_RECHAZO")).equals(BA.NumberToString(1))) { 
this.state = 67;
}if (true) break;

case 65:
//C
this.state = 68;
 //BA.debugLineNum = 2290;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 2291;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._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 if (true) break;

case 67:
//C
this.state = 68;
 //BA.debugLineNum = 2314;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 2315;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._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 //BA.debugLineNum = 2340;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 if (true) break;

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

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

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

case 71:
//C
this.state = 72;
;
 if (true) break;

case 72:
//C
this.state = 73;
;
 //BA.debugLineNum = 2346;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 2347;BA.debugLine="s.Close";
parent._s.Close();
 //BA.debugLineNum = 2348;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2350;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)))+"' and HVD_BCREDITO = '1' order by  HVD_CODPROMO, ESPROMO DESC, HVD_PROID"))));
 //BA.debugLineNum = 2351;BA.debugLine="If S.RowCount>0 Then";
if (true) break;

case 73:
//if
this.state = 100;
if (parent._s.getRowCount()>0) { 
this.state = 75;
}if (true) break;

case 75:
//C
this.state = 76;
 //BA.debugLineNum = 2352;BA.debugLine="Printer1.WriteString(\"-------PROMOS ENTREGA-----";
parent._printer1._writestring /*String*/ ("-------PROMOS ENTREGA--------"+parent.__c.CRLF);
 //BA.debugLineNum = 2353;BA.debugLine="Printer1.WriteString(\"Cant.      Precio        I";
parent._printer1._writestring /*String*/ ("Cant.      Precio        Importe"+parent.__c.CRLF);
 //BA.debugLineNum = 2354;BA.debugLine="Printer1.WriteString(\"--------------------------";
parent._printer1._writestring /*String*/ ("------------------------------"+parent.__c.CRLF);
 //BA.debugLineNum = 2355;BA.debugLine="For i=0 To S.RowCount -1";
if (true) break;

case 76:
//for
this.state = 99;
step100 = 1;
limit100 = (int) (parent._s.getRowCount()-1);
_i = (int) (0) ;
this.state = 125;
if (true) break;

case 125:
//C
this.state = 99;
if ((step100 > 0 && _i <= limit100) || (step100 < 0 && _i >= limit100)) this.state = 78;
if (true) break;

case 126:
//C
this.state = 125;
_i = ((int)(0 + _i + step100)) ;
if (true) break;

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

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

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

case 82:
//if
this.state = 97;
if ((parent._s.GetString("HVD_CODPROMO")).equals(parent._subs._traealmacen /*String*/ (ba)) == false) { 
this.state = 84;
}else {
this.state = 96;
}if (true) break;

case 84:
//C
this.state = 85;
 //BA.debugLineNum = 2359;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 //BA.debugLineNum = 2360;BA.debugLine="If s.GetString(\"HVD_CODPROMO\") = s.GetString(";
if (true) break;

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

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

case 89:
//C
this.state = 90;
 //BA.debugLineNum = 2363;BA.debugLine="If s.GetString(\"HVD_PRONOMBRE\") <> \"Cobranza";
if (true) break;

case 90:
//if
this.state = 93;
if ((parent._s.GetString("HVD_PRONOMBRE")).equals("Cobranza Pendiente") == false) { 
this.state = 92;
}if (true) break;

case 92:
//C
this.state = 93;
 //BA.debugLineNum = 2365;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._s.GetString("HVD_PRONOMBRE")+parent.__c.CRLF);
 if (true) break;

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

case 94:
//C
this.state = 97;
;
 //BA.debugLineNum = 2386;BA.debugLine="Printer1.Justify = 0";
parent._printer1._setjustify((int) (0));
 if (true) break;

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

case 97:
//C
this.state = 98;
;
 if (true) break;

case 98:
//C
this.state = 126;
;
 if (true) break;
if (true) break;

case 99:
//C
this.state = 100;
;
 if (true) break;

case 100:
//C
this.state = 101;
;
 //BA.debugLineNum = 2393;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2394;BA.debugLine="Printer1.WriteString(\"Por monto de $\" &l_montopag";
parent._printer1._writestring /*String*/ ("Por monto de $"+parent._l_montopag.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 2395;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2396;BA.debugLine="Printer1.WriteString(\"Debo(mos) y pagare(mos) inc";
parent._printer1._writestring /*String*/ ("Debo(mos) y pagare(mos) incon"+parent.__c.CRLF);
 //BA.debugLineNum = 2397;BA.debugLine="Printer1.WriteString(\"dicionalmente en __________";
parent._printer1._writestring /*String*/ ("dicionalmente en _____________"+parent.__c.CRLF);
 //BA.debugLineNum = 2398;BA.debugLine="Printer1.WriteString(\"o en el lugar donde se me \"";
parent._printer1._writestring /*String*/ ("o en el lugar donde se me "+parent.__c.CRLF);
 //BA.debugLineNum = 2399;BA.debugLine="Printer1.WriteString(\"requiera por el presente pa";
parent._printer1._writestring /*String*/ ("requiera por el presente pagare"+parent.__c.CRLF);
 //BA.debugLineNum = 2400;BA.debugLine="Printer1.WriteString(\"a Izca Distribuciones la \"&";
parent._printer1._writestring /*String*/ ("a Izca Distribuciones la "+parent.__c.CRLF);
 //BA.debugLineNum = 2401;BA.debugLine="Printer1.WriteString(\"cantidad de $\"&l_montopag.T";
parent._printer1._writestring /*String*/ ("cantidad de $"+parent._l_montopag.getText()+parent.__c.CRLF);
 //BA.debugLineNum = 2402;BA.debugLine="Printer1.WriteString(\"valor recibido a entera \" &";
parent._printer1._writestring /*String*/ ("valor recibido a entera "+parent.__c.CRLF);
 //BA.debugLineNum = 2403;BA.debugLine="Printer1.WriteString(\"satisfaccion. La falta de p";
parent._printer1._writestring /*String*/ ("satisfaccion. La falta de pago"+parent.__c.CRLF);
 //BA.debugLineNum = 2404;BA.debugLine="Printer1.WriteString(\"a la fecha indicada causara";
parent._printer1._writestring /*String*/ ("a la fecha indicada causara "+parent.__c.CRLF);
 //BA.debugLineNum = 2405;BA.debugLine="Printer1.WriteString(\"intereses moratorios a razo";
parent._printer1._writestring /*String*/ ("intereses moratorios a razon "+parent.__c.CRLF);
 //BA.debugLineNum = 2406;BA.debugLine="Printer1.WriteString(\"de ______% mensual a la fec";
parent._printer1._writestring /*String*/ ("de ______% mensual a la fecha."+parent.__c.CRLF);
 //BA.debugLineNum = 2407;BA.debugLine="Printer1.WriteString(\"\" &  CRLF)";
parent._printer1._writestring /*String*/ (""+parent.__c.CRLF);
 //BA.debugLineNum = 2408;BA.debugLine="Printer1.WriteString(\"\" &  CRLF)";
parent._printer1._writestring /*String*/ (""+parent.__c.CRLF);
 //BA.debugLineNum = 2409;BA.debugLine="Printer1.WriteString(\"            Recibi";
parent._printer1._writestring /*String*/ ("            Recibi            "+parent.__c.CRLF);
 //BA.debugLineNum = 2410;BA.debugLine="Printer1.WriteString(\"\" &  CRLF)";
parent._printer1._writestring /*String*/ (""+parent.__c.CRLF);
 //BA.debugLineNum = 2411;BA.debugLine="Printer1.WriteString(\"\" &  CRLF)";
parent._printer1._writestring /*String*/ (""+parent.__c.CRLF);
 //BA.debugLineNum = 2412;BA.debugLine="Printer1.WriteString(\"___________________________";
parent._printer1._writestring /*String*/ ("______________________________"+parent.__c.CRLF);
 //BA.debugLineNum = 2414;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2415;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2416;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2417;BA.debugLine="DateTime.DateFormat = \"ddMMyyyy\"";
parent.__c.DateTime.setDateFormat("ddMMyyyy");
 //BA.debugLineNum = 2418;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
parent._sdate = parent.__c.DateTime.Date(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 2420;BA.debugLine="Printer1.WriteBarCode(\"I\",Ticket&sDate)";
parent._printer1._writebarcode /*String*/ ("I",_ticket+parent._sdate);
 //BA.debugLineNum = 2422;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2423;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2424;BA.debugLine="Printer1.WriteString(\" \" &  CRLF)";
parent._printer1._writestring /*String*/ (" "+parent.__c.CRLF);
 //BA.debugLineNum = 2425;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 127;
return;
case 127:
//C
this.state = 101;
;
 //BA.debugLineNum = 2426;BA.debugLine="Printer1.DisConnect";
parent._printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 2427;BA.debugLine="ProgressDialogHide";
parent.__c.ProgressDialogHide();
 //BA.debugLineNum = 2428;BA.debugLine="If banderaimp = 1 Then";
if (true) break;

case 101:
//if
this.state = 116;
if (parent._banderaimp==1) { 
this.state = 103;
}else if(parent._banderaimp==0) { 
this.state = 111;
}if (true) break;

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

case 104:
//if
this.state = 109;
if (_resultado==parent.__c.DialogResponse.POSITIVE) { 
this.state = 106;
}else {
this.state = 108;
}if (true) break;

case 106:
//C
this.state = 109;
 //BA.debugLineNum = 2432;BA.debugLine="imprime_pagare";
parent._imprime_pagare();
 if (true) break;

case 108:
//C
this.state = 109;
 //BA.debugLineNum = 2434;BA.debugLine="b_acred_Click";
parent._b_acred_click();
 if (true) break;

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

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

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

case 114:
//C
this.state = 115;
 //BA.debugLineNum = 2442;BA.debugLine="imprime_pagare";
parent._imprime_pagare();
 if (true) break;

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

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

            }
        }
    }
}
public Object  _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
 //BA.debugLineNum = 104;BA.debugLine="Public Sub Initialize As Object";
 //BA.debugLineNum = 105;BA.debugLine="Return Me";
if (true) return this;
 //BA.debugLineNum = 106;BA.debugLine="End Sub";
return null;
}
public String  _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 = 1260;BA.debugLine="Sub JobDone(Job As HttpJob)";
 //BA.debugLineNum = 1261;BA.debugLine="Log(Job.Success)";
__c.LogImpl("144498945",BA.ObjectToString(_job._success /*boolean*/ ),0);
 //BA.debugLineNum = 1262;BA.debugLine="If Job.Success = False Then";
if (_job._success /*boolean*/ ==__c.False) { 
 }else {
 //BA.debugLineNum = 1265;BA.debugLine="LogColor(\"JobDone: '\" & reqManager.HandleJob(Job";
__c.LogImpl("144498949","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 = 1266;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1267;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = _reqmanager._handlejob /*reparto_izca.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1268;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"ins_REPART";
if ((BA.ObjectToString(_resultado.Tag /*Object*/ )).indexOf("ins_REPARTOPendientes_head_")>-1) { 
 //BA.debugLineNum = 1269;BA.debugLine="Private cliente As String= resultado.Tag";
_cliente = BA.ObjectToString(_resultado.Tag /*Object*/ );
 //BA.debugLineNum = 1270;BA.debugLine="cliente = cliente.SubString(cliente.IndexOf(\"_";
_cliente = _cliente.substring((int) (_cliente.indexOf("_")+24));
 //BA.debugLineNum = 1271;BA.debugLine="Log($\"Cliente1:${cliente}\"$)";
__c.LogImpl("144498955",("Cliente1:"+__c.SmartStringFormatter("",(Object)(_cliente))+""),0);
 //BA.debugLineNum = 1272;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 = 1273;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 = 1274;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 = 1275;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & record";
__c.LogImpl("144498959",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 = 1280;BA.debugLine="Job.Release";
_job._release /*String*/ ();
 };
 //BA.debugLineNum = 1283;BA.debugLine="End Sub";
return "";
}
public String  _listview1_itemlongclick(int _position,Object _value) throws Exception{
 //BA.debugLineNum = 442;BA.debugLine="Sub ListView1_ItemLongClick (Position As Int, Valu";
 //BA.debugLineNum = 444;BA.debugLine="End Sub";
return "";
}
public String  _mandapendientesreparto() throws Exception{
 //BA.debugLineNum = 1240;BA.debugLine="Sub mandaPendientesreparto";
 //BA.debugLineNum = 1256;BA.debugLine="End Sub";
return "";
}
public String  _nuevo_click() throws Exception{
 //BA.debugLineNum = 606;BA.debugLine="Sub NUEVO_Click";
 //BA.debugLineNum = 607;BA.debugLine="StartActivity(MAPA_CLIENTE)";
__c.StartActivity(ba,(Object)(_mapa_cliente.getObject()));
 //BA.debugLineNum = 608;BA.debugLine="End Sub";
return "";
}
public String  _p_abono_click() throws Exception{
 //BA.debugLineNum = 2042;BA.debugLine="Private Sub p_abono_Click";
 //BA.debugLineNum = 2044;BA.debugLine="End Sub";
return "";
}
public String  _p_credito_click() throws Exception{
 //BA.debugLineNum = 1357;BA.debugLine="Private Sub p_credito_Click";
 //BA.debugLineNum = 1359;BA.debugLine="End Sub";
return "";
}
public String  _printer_connected(boolean _success) throws Exception{
 //BA.debugLineNum = 1166;BA.debugLine="Sub Printer_Connected (Success As Boolean)";
 //BA.debugLineNum = 1167;BA.debugLine="If Success Then";
if (_success) { 
 //BA.debugLineNum = 1169;BA.debugLine="PASA_IMP = \"1\"";
_pasa_imp = "1";
 }else {
 //BA.debugLineNum = 1172;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 = 1173;BA.debugLine="StartPrinter";
_startprinter();
 };
 };
 //BA.debugLineNum = 1176;BA.debugLine="End Sub";
return "";
}
public String  _printer1_connected(boolean _success) throws Exception{
 //BA.debugLineNum = 1141;BA.debugLine="Sub Printer1_Connected (Success As Boolean)";
 //BA.debugLineNum = 1143;BA.debugLine="If Success Then";
if (_success) { 
 //BA.debugLineNum = 1144;BA.debugLine="ToastMessageShow(\"Impresora conectada\", False)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Impresora conectada"),__c.False);
 //BA.debugLineNum = 1145;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 = 1146;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 = 1149;BA.debugLine="impresoraConectada = True";
_impresoraconectada = __c.True;
 }else {
 //BA.debugLineNum = 1153;BA.debugLine="LogColor(\"Error conectando la impresora\", Colors";
__c.LogImpl("144105740","Error conectando la impresora",__c.Colors.Red);
 //BA.debugLineNum = 1154;BA.debugLine="errorImpresora = errorImpresora + 1";
_errorimpresora = (int) (_errorimpresora+1);
 //BA.debugLineNum = 1155;BA.debugLine="If errorImpresora > 1 Then";
if (_errorimpresora>1) { 
 //BA.debugLineNum = 1156;BA.debugLine="Starter.MAC_IMPRESORA = \"0\"";
_starter._mac_impresora /*String*/  = "0";
 //BA.debugLineNum = 1157;BA.debugLine="errorImpresora = 0";
_errorimpresora = (int) (0);
 };
 };
 //BA.debugLineNum = 1160;BA.debugLine="End Sub";
return "";
}
public String  _printer1_error() throws Exception{
 //BA.debugLineNum = 1162;BA.debugLine="Sub Printer1_Error";
 //BA.debugLineNum = 1163;BA.debugLine="Log(\"error printer\")";
__c.LogImpl("144171265","error printer",0);
 //BA.debugLineNum = 1164;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 = 1178;BA.debugLine="Sub StartPrinter";
 //BA.debugLineNum = 1179;BA.debugLine="Dim PairedDevices As Map";
_paireddevices = new anywheresoftware.b4a.objects.collections.Map();
 //BA.debugLineNum = 1180;BA.debugLine="Dim L1 As List";
_l1 = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 1181;BA.debugLine="Dim resimp As Int";
_resimp = 0;
 //BA.debugLineNum = 1182;BA.debugLine="ToastMessageShow(\"Printing.....\",True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Printing....."),__c.True);
 //BA.debugLineNum = 1183;BA.debugLine="PairedDevices.Initialize";
_paireddevices.Initialize();
 //BA.debugLineNum = 1184;BA.debugLine="Try";
try { //BA.debugLineNum = 1185;BA.debugLine="PairedDevices = cmp20.GetPairedDevices";
_paireddevices = _cmp20.GetPairedDevices();
 } 
       catch (Exception e9) {
			ba.setLastException(e9); //BA.debugLineNum = 1187;BA.debugLine="Msgbox(\"Getting Paired Devices\",\"Printer Error\")";
__c.Msgbox(BA.ObjectToCharSequence("Getting Paired Devices"),BA.ObjectToCharSequence("Printer Error"),ba);
 //BA.debugLineNum = 1188;BA.debugLine="printer.Close";
_printer.Close();
 //BA.debugLineNum = 1189;BA.debugLine="cmp20.Disconnect";
_cmp20.Disconnect();
 };
 //BA.debugLineNum = 1192;BA.debugLine="If PairedDevices.Size = 0 Then";
if (_paireddevices.getSize()==0) { 
 //BA.debugLineNum = 1193;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 = 1194;BA.debugLine="Return";
if (true) return "";
 };
 //BA.debugLineNum = 1197;BA.debugLine="If PairedDevices.Size = 1 Then";
if (_paireddevices.getSize()==1) { 
 //BA.debugLineNum = 1198;BA.debugLine="Try";
try { //BA.debugLineNum = 1199;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 = 1201;BA.debugLine="Msgbox(\"Connecting\",\"Printer Error\") 'ignore";
__c.Msgbox(BA.ObjectToCharSequence("Connecting"),BA.ObjectToCharSequence("Printer Error"),ba);
 //BA.debugLineNum = 1202;BA.debugLine="printer.Close";
_printer.Close();
 //BA.debugLineNum = 1203;BA.debugLine="cmp20.Disconnect";
_cmp20.Disconnect();
 };
 }else {
 //BA.debugLineNum = 1206;BA.debugLine="L1.Initialize";
_l1.Initialize();
 //BA.debugLineNum = 1207;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 = 1208;BA.debugLine="L1.Add(PairedDevices.GetKeyAt(i))";
_l1.Add(_paireddevices.GetKeyAt(_i));
 }
};
 //BA.debugLineNum = 1210;BA.debugLine="resimp = InputList(L1, \"Choose device\", -1) 'ign";
_resimp = __c.InputList(_l1,BA.ObjectToCharSequence("Choose device"),(int) (-1),ba);
 //BA.debugLineNum = 1211;BA.debugLine="If resimp <> DialogResponse.CANCEL Then";
if (_resimp!=__c.DialogResponse.CANCEL) { 
 //BA.debugLineNum = 1212;BA.debugLine="cmp20.Connect(PairedDevices.Get(L1.Get(resimp))";
_cmp20.Connect(ba,BA.ObjectToString(_paireddevices.Get(_l1.Get(_resimp))));
 };
 };
 //BA.debugLineNum = 1215;BA.debugLine="End Sub";
return "";
}
public String  _tar_click() throws Exception{
 //BA.debugLineNum = 588;BA.debugLine="Sub Tar_Click";
 //BA.debugLineNum = 590;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 //BA.debugLineNum = 591;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;
}
}
