package gunav2.keymon.com.mx;


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

public class v_tclientes 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, "gunav2.keymon.com.mx.v_tclientes");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", gunav2.keymon.com.mx.v_tclientes.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.sql.SQL.CursorWrapper _c = 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_col = 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 _label19 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_animal = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_limite = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_tipocliente = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_saldotot = null;
public anywheresoftware.b4a.objects.LabelWrapper _label22 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_credito = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _imageview4 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _guardar = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_deuda = null;
public anywheresoftware.b4a.objects.PanelWrapper _panel5 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_okdeuda = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_deuda = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _i_fotogrande = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_imagengrande = null;
public b4a.example.dateutils _dateutils = null;
public gunav2.keymon.com.mx.main _main = null;
public gunav2.keymon.com.mx.starter _starter = null;
public gunav2.keymon.com.mx.subs _subs = null;
public gunav2.keymon.com.mx.mapa_rutas _mapa_rutas = null;
public gunav2.keymon.com.mx.appupdater _appupdater = null;
public gunav2.keymon.com.mx.firebasemessaging _firebasemessaging = null;
public gunav2.keymon.com.mx.tracker _tracker = null;
public gunav2.keymon.com.mx.newinst2 _newinst2 = null;
public gunav2.keymon.com.mx.b4xpages _b4xpages = null;
public gunav2.keymon.com.mx.b4xcollections _b4xcollections = null;
public gunav2.keymon.com.mx.httputils2service _httputils2service = null;
public gunav2.keymon.com.mx.xuiviewsutils _xuiviewsutils = null;
public String  _b_okdeuda_click() throws Exception{
 //BA.debugLineNum = 253;BA.debugLine="Private Sub b_okdeuda_Click";
 //BA.debugLineNum = 254;BA.debugLine="p_deuda.Visible = False";
_p_deuda.setVisible(__c.False);
 //BA.debugLineNum = 255;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear() throws Exception{
anywheresoftware.b4a.sql.SQL.CursorWrapper _fotomostrar = null;
byte[] _fotomostrarfinal = null;
anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _inputstream1 = null;
anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _bitmap1 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _coloressaldo = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _pagarepen = null;
String _fechainicio = "";
long _ticksinicio = 0L;
long _tickshoy = 0L;
int _diferenciadias = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c4 = null;
 //BA.debugLineNum = 45;BA.debugLine="Sub B4XPage_Appear";
 //BA.debugLineNum = 46;BA.debugLine="Log(\"Entramos\")";
__c.LogImpl("458785793","Entramos",0);
 //BA.debugLineNum = 47;BA.debugLine="c = Starter.skmt.ExecQuery ($\"select * from CAT_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 * from CAT_CATCLIENTESTODOS where CAT_CL_CODIGO in (Select CUENTA from cuentaa)"))));
 //BA.debugLineNum = 48;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 49;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 50;BA.debugLine="Log(c.GetString(\"CAT_CL_NOMBRE\"))";
__c.LogImpl("458785797",_c.GetString("CAT_CL_NOMBRE"),0);
 //BA.debugLineNum = 51;BA.debugLine="la_cuenta.Text=c.GetString(\"CAT_CL_CODIGO\")";
_la_cuenta.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CODIGO")));
 //BA.debugLineNum = 52;BA.debugLine="La_nombre.Text=c.GetString(\"CAT_CL_NOMBRE\")";
_la_nombre.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_NOMBRE")));
 //BA.debugLineNum = 53;BA.debugLine="la_Calle.Text=c.GetString(\"CAT_CL_CALLE\")";
_la_calle.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE")));
 //BA.debugLineNum = 54;BA.debugLine="la_col.Text=c.GetString(\"CAT_CL_COLONIA\")";
_la_col.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_COLONIA")));
 //BA.debugLineNum = 55;BA.debugLine="l_entre1.Text=c.GetString(\"CAT_CL_CALLE1\")";
_l_entre1.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE1")));
 //BA.debugLineNum = 56;BA.debugLine="l_entre2.Text=c.GetString(\"CAT_CL_CALLE2\")";
_l_entre2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE2")));
 //BA.debugLineNum = 57;BA.debugLine="l_atiende.Text=c.GetString(\"CAT_CL_ATIENDE1\")";
_l_atiende.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENDE1")));
 //BA.debugLineNum = 58;BA.debugLine="Label19.Text = c.GetString(\"CAT_CL_TELEFONO\")";
_label19.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_TELEFONO")));
 //BA.debugLineNum = 60;BA.debugLine="l_tipocliente.Text = Subs.traeTipoCliente";
_l_tipocliente.setText(BA.ObjectToCharSequence(_subs._traetipocliente /*int*/ (ba)));
 //BA.debugLineNum = 62;BA.debugLine="Dim fotomostrar As Cursor = Starter.skmt.ExecQue";
_fotomostrar = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_fotomostrar = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT FOTO FROM FOTOS where CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 63;BA.debugLine="If fotomostrar.RowCount > 0 Then";
if (_fotomostrar.getRowCount()>0) { 
 //BA.debugLineNum = 65;BA.debugLine="fotomostrar.Position = 0";
_fotomostrar.setPosition((int) (0));
 //BA.debugLineNum = 66;BA.debugLine="Private fotomostrarfinal() As Byte = fotomostra";
_fotomostrarfinal = _fotomostrar.GetBlob("FOTO");
 //BA.debugLineNum = 67;BA.debugLine="Dim InputStream1 As InputStream";
_inputstream1 = new anywheresoftware.b4a.objects.streams.File.InputStreamWrapper();
 //BA.debugLineNum = 68;BA.debugLine="InputStream1.InitializeFromBytesArray(fotomostr";
_inputstream1.InitializeFromBytesArray(_fotomostrarfinal,(int) (0),_fotomostrarfinal.length);
 //BA.debugLineNum = 69;BA.debugLine="Dim Bitmap1 As Bitmap";
_bitmap1 = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper();
 //BA.debugLineNum = 70;BA.debugLine="Bitmap1.Initialize2(InputStream1)";
_bitmap1.Initialize2((java.io.InputStream)(_inputstream1.getObject()));
 //BA.debugLineNum = 71;BA.debugLine="InputStream1.Close";
_inputstream1.Close();
 //BA.debugLineNum = 72;BA.debugLine="ImageView4.Bitmap = Bitmap1";
_imageview4.setBitmap((android.graphics.Bitmap)(_bitmap1.getObject()));
 //BA.debugLineNum = 73;BA.debugLine="Log(\"aqui si hay foto\")";
__c.LogImpl("458785820","aqui si hay foto",0);
 }else {
 //BA.debugLineNum = 75;BA.debugLine="ImageView4.Bitmap = LoadBitmap(File.DirAssets,\"";
_imageview4.setBitmap((android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"images.png").getObject()));
 //BA.debugLineNum = 76;BA.debugLine="Log(\"aqui no hay foto\")";
__c.LogImpl("458785823","aqui no hay foto",0);
 };
 };
 //BA.debugLineNum = 84;BA.debugLine="Subs.centraPanel(P_Imagengrande,Root.Width)";
_subs._centrapanel /*String*/ (ba,_p_imagengrande,_root.getWidth());
 //BA.debugLineNum = 86;BA.debugLine="Dim coloressaldo As Cursor=B4XPages.MainPage.skmt";
_coloressaldo = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_coloressaldo = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select IFNULL(CAT_CL_CLASIFICADOR3,0) AS CAT_CL_CLASIFICADOR3, IFNULL(CAT_CL_CLASIFICADOR4,0) AS CAT_CL_CLASIFICADOR4, IFNULL(CAT_CL_CLASIFICADOR2,'') AS CAT_CL_CLASIFICADOR2 from CAT_CATCLIENTESTODOS where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
 //BA.debugLineNum = 87;BA.debugLine="coloressaldo.Position = 0";
_coloressaldo.setPosition((int) (0));
 //BA.debugLineNum = 89;BA.debugLine="l_animal.Text = coloressaldo.GetString(\"CAT_CL_CL";
_l_animal.setText(BA.ObjectToCharSequence(_coloressaldo.GetString("CAT_CL_CLASIFICADOR2")));
 //BA.debugLineNum = 90;BA.debugLine="If coloressaldo.GetString(\"CAT_CL_CLASIFICADOR2\")";
if ((_coloressaldo.GetString("CAT_CL_CLASIFICADOR2")).equals("Chimpancé KIN")) { 
 //BA.debugLineNum = 91;BA.debugLine="l_animal.Color = Colors.RGB(84,255,172)";
_l_animal.setColor(__c.Colors.RGB((int) (84),(int) (255),(int) (172)));
 //BA.debugLineNum = 92;BA.debugLine="Label22.Color = Colors.RGB(84,255,172)";
_label22.setColor(__c.Colors.RGB((int) (84),(int) (255),(int) (172)));
 }else if((_coloressaldo.GetString("CAT_CL_CLASIFICADOR2")).equals("Delfín Niky")) { 
 //BA.debugLineNum = 94;BA.debugLine="l_animal.Color = Colors.RGB(84,255,245)";
_l_animal.setColor(__c.Colors.RGB((int) (84),(int) (255),(int) (245)));
 //BA.debugLineNum = 95;BA.debugLine="Label22.Color = Colors.RGB(84,255,245)";
_label22.setColor(__c.Colors.RGB((int) (84),(int) (255),(int) (245)));
 }else if((_coloressaldo.GetString("CAT_CL_CLASIFICADOR2")).equals("Tortuga KOPI")) { 
 //BA.debugLineNum = 97;BA.debugLine="l_animal.Color = Colors.RGB(255,123,84)";
_l_animal.setColor(__c.Colors.RGB((int) (255),(int) (123),(int) (84)));
 //BA.debugLineNum = 98;BA.debugLine="Label22.Color = Colors.RGB(255,123,84)";
_label22.setColor(__c.Colors.RGB((int) (255),(int) (123),(int) (84)));
 }else if((_coloressaldo.GetString("CAT_CL_CLASIFICADOR2")).equals("Lechuza MON")) { 
 //BA.debugLineNum = 100;BA.debugLine="l_animal.Color = Colors.RGB(255,250,140)";
_l_animal.setColor(__c.Colors.RGB((int) (255),(int) (250),(int) (140)));
 //BA.debugLineNum = 101;BA.debugLine="Label22.Color = Colors.RGB(255,250,140)";
_label22.setColor(__c.Colors.RGB((int) (255),(int) (250),(int) (140)));
 }else {
 //BA.debugLineNum = 103;BA.debugLine="l_animal.Color = Colors.Transparent";
_l_animal.setColor(__c.Colors.Transparent);
 //BA.debugLineNum = 104;BA.debugLine="Label22.Color = Colors.Transparent";
_label22.setColor(__c.Colors.Transparent);
 };
 //BA.debugLineNum = 107;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"select IFNU";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select IFNULL(CAT_CL_BCREDITO,0) AS CAT_CL_BCREDITO, CAT_CL_LIMITECREDITO from CAT_CATCLIENTESTODOS where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
 //BA.debugLineNum = 108;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 109;BA.debugLine="If c.GetInt(\"CAT_CL_BCREDITO\") = 1 Then";
if (_c.GetInt("CAT_CL_BCREDITO")==1) { 
 //BA.debugLineNum = 111;BA.debugLine="Dim pagarepen As Cursor = B4XPages.MainPage.skmt";
_pagarepen = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_pagarepen = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select FECHA, SALDO_PENDIENTE FROM ABONOSP WHERE CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 112;BA.debugLine="If pagarepen.RowCount > 0 Then";
if (_pagarepen.getRowCount()>0) { 
 //BA.debugLineNum = 113;BA.debugLine="pagarepen.Position = 0";
_pagarepen.setPosition((int) (0));
 //BA.debugLineNum = 114;BA.debugLine="DateTime.DateFormat=\"dd/MM/yyyy\"";
__c.DateTime.setDateFormat("dd/MM/yyyy");
 //BA.debugLineNum = 115;BA.debugLine="Dim FechaInicio As String = pagarepen.GetString";
_fechainicio = _pagarepen.GetString("FECHA");
 //BA.debugLineNum = 117;BA.debugLine="Log(pagarepen.GetString(\"FECHA\"))";
__c.LogImpl("458785864",_pagarepen.GetString("FECHA"),0);
 //BA.debugLineNum = 119;BA.debugLine="Dim TicksInicio As Long = DateTime.DateParse(Fe";
_ticksinicio = __c.DateTime.DateParse(_fechainicio);
 //BA.debugLineNum = 120;BA.debugLine="Dim TicksHoy As Long = DateTime.DateParse(DateT";
_tickshoy = __c.DateTime.DateParse(__c.DateTime.Date(__c.DateTime.getNow()));
 //BA.debugLineNum = 123;BA.debugLine="Dim DiferenciaDias As Int = (TicksHoy - TicksIn";
_diferenciadias = (int) ((_tickshoy-_ticksinicio)/(double)__c.DateTime.TicksPerDay);
 //BA.debugLineNum = 126;BA.debugLine="Log($\"Días transcurridos: ${DiferenciaDias}\"$)";
__c.LogImpl("458785873",("Días transcurridos: "+__c.SmartStringFormatter("",(Object)(_diferenciadias))+""),0);
 //BA.debugLineNum = 128;BA.debugLine="Dim c4 As Cursor=B4XPages.MainPage.skmt.ExecQue";
_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)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select IFNULL(CAT_CL_DIASCREDITO,0) AS CAT_CL_DIASCREDITO from kmt_info3 where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
 //BA.debugLineNum = 129;BA.debugLine="c4.Position = 0";
_c4.setPosition((int) (0));
 }else {
 };
 //BA.debugLineNum = 142;BA.debugLine="l_credito.Visible = True";
_l_credito.setVisible(__c.True);
 //BA.debugLineNum = 143;BA.debugLine="l_limite.Visible = True";
_l_limite.setVisible(__c.True);
 //BA.debugLineNum = 144;BA.debugLine="l_limite.Text = c.GetInt(\"CAT_CL_LIMITECREDITO\")";
_l_limite.setText(BA.ObjectToCharSequence(_c.GetInt("CAT_CL_LIMITECREDITO")));
 }else if(_c.GetInt("CAT_CL_BCREDITO")==0) { 
 //BA.debugLineNum = 146;BA.debugLine="l_credito.Visible = False";
_l_credito.setVisible(__c.False);
 //BA.debugLineNum = 147;BA.debugLine="l_limite.Visible = False";
_l_limite.setVisible(__c.False);
 };
 //BA.debugLineNum = 149;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
 //BA.debugLineNum = 35;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
 //BA.debugLineNum = 36;BA.debugLine="Root = Root1";
_root = _root1;
 //BA.debugLineNum = 38;BA.debugLine="Root.LoadLayout(\"Vista_todoslosclientes\")";
_root.LoadLayout("Vista_todoslosclientes",ba);
 //BA.debugLineNum = 39;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 c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 5;BA.debugLine="Private la_cuenta As Label";
_la_cuenta = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 6;BA.debugLine="Private La_nombre As Label";
_la_nombre = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 7;BA.debugLine="Private la_Calle As Label";
_la_calle = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 8;BA.debugLine="Private la_col As Label";
_la_col = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 9;BA.debugLine="Private l_entre1 As Label";
_l_entre1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 10;BA.debugLine="Private l_entre2 As Label";
_l_entre2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 11;BA.debugLine="Private l_atiende As Label";
_l_atiende = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 12;BA.debugLine="Private Label19 As Label";
_label19 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 13;BA.debugLine="Private l_animal As Label";
_l_animal = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 14;BA.debugLine="Private l_limite As Label";
_l_limite = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 15;BA.debugLine="Private l_tipocliente As Label";
_l_tipocliente = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 16;BA.debugLine="Private la_saldotot As Label";
_la_saldotot = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 17;BA.debugLine="Private Label22 As Label";
_label22 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 18;BA.debugLine="Private l_credito As Label";
_l_credito = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 19;BA.debugLine="Private ImageView4 As ImageView";
_imageview4 = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 20;BA.debugLine="Private Guardar As Button";
_guardar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 21;BA.debugLine="Private p_deuda As Panel";
_p_deuda = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 22;BA.debugLine="Private Panel5 As Panel";
_panel5 = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 23;BA.debugLine="Private b_okdeuda As Button";
_b_okdeuda = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 24;BA.debugLine="Private l_deuda As Label";
_l_deuda = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 25;BA.debugLine="Private I_fotogrande As ImageView";
_i_fotogrande = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 26;BA.debugLine="Private P_Imagengrande As Panel";
_p_imagengrande = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 27;BA.debugLine="End Sub";
return "";
}
public String  _guardar_click() throws Exception{
 //BA.debugLineNum = 225;BA.debugLine="Private Sub Guardar_Click";
 //BA.debugLineNum = 226;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 //BA.debugLineNum = 227;BA.debugLine="End Sub";
return "";
}
public String  _hist_click() throws Exception{
 //BA.debugLineNum = 41;BA.debugLine="Sub HIST_Click";
 //BA.debugLineNum = 42;BA.debugLine="B4XPages.ShowPage(\"historicobattodos\")";
_b4xpages._showpage /*String*/ (ba,"historicobattodos");
 //BA.debugLineNum = 43;BA.debugLine="End Sub";
return "";
}
public String  _imageview4_longclick() throws Exception{
anywheresoftware.b4a.sql.SQL.CursorWrapper _fotomostrar = null;
byte[] _fotomostrarfinal = null;
anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _inputstream1 = null;
anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _bitmap1 = null;
 //BA.debugLineNum = 229;BA.debugLine="Private Sub ImageView4_LongClick";
 //BA.debugLineNum = 230;BA.debugLine="Private fotomostrar As Cursor = Starter.skmt.Exec";
_fotomostrar = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_fotomostrar = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT FOTO FROM FOTOS where CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 231;BA.debugLine="If fotomostrar.RowCount > 0 Then";
if (_fotomostrar.getRowCount()>0) { 
 //BA.debugLineNum = 233;BA.debugLine="fotomostrar.Position = 0";
_fotomostrar.setPosition((int) (0));
 //BA.debugLineNum = 234;BA.debugLine="Private fotomostrarfinal() As Byte = fotomostrar";
_fotomostrarfinal = _fotomostrar.GetBlob("FOTO");
 //BA.debugLineNum = 235;BA.debugLine="Dim InputStream1 As InputStream";
_inputstream1 = new anywheresoftware.b4a.objects.streams.File.InputStreamWrapper();
 //BA.debugLineNum = 236;BA.debugLine="InputStream1.InitializeFromBytesArray(fotomostra";
_inputstream1.InitializeFromBytesArray(_fotomostrarfinal,(int) (0),_fotomostrarfinal.length);
 //BA.debugLineNum = 237;BA.debugLine="Dim Bitmap1 As Bitmap";
_bitmap1 = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper();
 //BA.debugLineNum = 238;BA.debugLine="Bitmap1.Initialize2(InputStream1)";
_bitmap1.Initialize2((java.io.InputStream)(_inputstream1.getObject()));
 //BA.debugLineNum = 239;BA.debugLine="InputStream1.Close";
_inputstream1.Close();
 //BA.debugLineNum = 240;BA.debugLine="I_fotogrande.Bitmap = Bitmap1";
_i_fotogrande.setBitmap((android.graphics.Bitmap)(_bitmap1.getObject()));
 //BA.debugLineNum = 241;BA.debugLine="Log(\"aqui si hay foto\")";
__c.LogImpl("458982412","aqui si hay foto",0);
 }else {
 //BA.debugLineNum = 243;BA.debugLine="I_fotogrande.Bitmap = LoadBitmap(File.DirAssets,";
_i_fotogrande.setBitmap((android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"images.png").getObject()));
 //BA.debugLineNum = 244;BA.debugLine="Log(\"aqui no hay foto\")";
__c.LogImpl("458982415","aqui no hay foto",0);
 };
 //BA.debugLineNum = 246;BA.debugLine="P_Imagengrande.Visible = True";
_p_imagengrande.setVisible(__c.True);
 //BA.debugLineNum = 247;BA.debugLine="End Sub";
return "";
}
public Object  _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
 //BA.debugLineNum = 30;BA.debugLine="Public Sub Initialize As Object";
 //BA.debugLineNum = 31;BA.debugLine="Return Me";
if (true) return this;
 //BA.debugLineNum = 32;BA.debugLine="End Sub";
return null;
}
public String  _l_limite_click() throws Exception{
anywheresoftware.b4a.sql.SQL.CursorWrapper _pagarepen = null;
anywheresoftware.b4a.objects.CSBuilder _cs = null;
String _fechainicio = "";
long _ticksinicio = 0L;
long _tickshoy = 0L;
int _diferenciadias = 0;
 //BA.debugLineNum = 151;BA.debugLine="Private Sub l_limite_Click";
 //BA.debugLineNum = 154;BA.debugLine="Dim pagarepen As Cursor = B4XPages.MainPage.skmt.";
_pagarepen = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_pagarepen = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select FECHA, SALDO_PENDIENTE FROM ABONOSPTOD WHERE CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 155;BA.debugLine="If pagarepen.RowCount > 0 Then";
if (_pagarepen.getRowCount()>0) { 
 //BA.debugLineNum = 156;BA.debugLine="Dim cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
 //BA.debugLineNum = 157;BA.debugLine="cs.Initialize";
_cs.Initialize();
 //BA.debugLineNum = 158;BA.debugLine="p_deuda.Visible = True";
_p_deuda.setVisible(__c.True);
 //BA.debugLineNum = 159;BA.debugLine="p_deuda.Width = Root.Width";
_p_deuda.setWidth(_root.getWidth());
 //BA.debugLineNum = 160;BA.debugLine="p_deuda.Height = Root.Height";
_p_deuda.setHeight(_root.getHeight());
 //BA.debugLineNum = 162;BA.debugLine="pagarepen.Position = 0";
_pagarepen.setPosition((int) (0));
 //BA.debugLineNum = 163;BA.debugLine="DateTime.DateFormat=\"dd/MM/yyyy\"";
__c.DateTime.setDateFormat("dd/MM/yyyy");
 //BA.debugLineNum = 164;BA.debugLine="Dim FechaInicio As String = pagarepen.GetString(";
_fechainicio = _pagarepen.GetString("FECHA");
 //BA.debugLineNum = 166;BA.debugLine="Log(pagarepen.GetString(\"FECHA\"))";
__c.LogImpl("458851343",_pagarepen.GetString("FECHA"),0);
 //BA.debugLineNum = 169;BA.debugLine="Dim TicksInicio As Long = DateTime.DateParse(Fec";
_ticksinicio = __c.DateTime.DateParse(_fechainicio);
 //BA.debugLineNum = 170;BA.debugLine="Dim TicksHoy As Long = DateTime.DateParse(DateTi";
_tickshoy = __c.DateTime.DateParse(__c.DateTime.Date(__c.DateTime.getNow()));
 //BA.debugLineNum = 173;BA.debugLine="Dim DiferenciaDias As Int = (TicksHoy - TicksIni";
_diferenciadias = (int) ((_tickshoy-_ticksinicio)/(double)__c.DateTime.TicksPerDay);
 //BA.debugLineNum = 176;BA.debugLine="Log($\"Días transcurridos: ${DiferenciaDias}\"$)";
__c.LogImpl("458851353",("Días transcurridos: "+__c.SmartStringFormatter("",(Object)(_diferenciadias))+""),0);
 //BA.debugLineNum = 178;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select IFNUL";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select IFNULL(CAT_CL_DIASCREDITO,0) AS CAT_CL_DIASCREDITO from CAT_CATCLIENTESTODOS where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
 //BA.debugLineNum = 179;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 181;BA.debugLine="If DiferenciaDias <= c.GetInt(\"CAT_CL_DIASCREDIT";
if (_diferenciadias<=_c.GetInt("CAT_CL_DIASCREDITO")+8) { 
 //BA.debugLineNum = 185;BA.debugLine="l_deuda.Text = cs.Color(Colors.Black).Append(\"M";
_l_deuda.setText(BA.ObjectToCharSequence(_cs.Color(__c.Colors.Black).Append(BA.ObjectToCharSequence("Monto de la deuda:"+__c.CRLF+__c.CRLF)).Pop().Size((int) (18)).Color(__c.Colors.RGB((int) (48),(int) (109),(int) (0))).Append(BA.ObjectToCharSequence("$ "+_pagarepen.GetString("SALDO_PENDIENTE"))).PopAll().getObject()));
 }else if(_diferenciadias>_c.GetInt("CAT_CL_DIASCREDITO")+8) { 
 //BA.debugLineNum = 188;BA.debugLine="l_deuda.Text = cs.Color(Colors.Black).Append(\"M";
_l_deuda.setText(BA.ObjectToCharSequence(_cs.Color(__c.Colors.Black).Append(BA.ObjectToCharSequence("Monto de la deuda:"+__c.CRLF+__c.CRLF)).Pop().Color(__c.Colors.Red).Size((int) (18)).Append(BA.ObjectToCharSequence("$ "+_pagarepen.GetString("SALDO_PENDIENTE")+__c.CRLF+__c.CRLF)).Pop().Size((int) (14)).Color(__c.Colors.Black).Append(BA.ObjectToCharSequence("Dias de atraso:"+__c.CRLF+__c.CRLF)).Pop().Size((int) (18)).Color(__c.Colors.Red).Append(BA.ObjectToCharSequence((_diferenciadias-(_c.GetInt("CAT_CL_DIASCREDITO")+1)))).PopAll().getObject()));
 };
 }else {
 //BA.debugLineNum = 191;BA.debugLine="p_deuda.Visible = True";
_p_deuda.setVisible(__c.True);
 //BA.debugLineNum = 193;BA.debugLine="p_deuda.Width = Root.Width";
_p_deuda.setWidth(_root.getWidth());
 //BA.debugLineNum = 194;BA.debugLine="p_deuda.Height = Root.Height";
_p_deuda.setHeight(_root.getHeight());
 //BA.debugLineNum = 196;BA.debugLine="l_deuda.Text = \"No tiene adeudo\"";
_l_deuda.setText(BA.ObjectToCharSequence("No tiene adeudo"));
 };
 //BA.debugLineNum = 199;BA.debugLine="End Sub";
return "";
}
public String  _p_imagengrande_click() throws Exception{
 //BA.debugLineNum = 249;BA.debugLine="Sub P_Imagengrande_click";
 //BA.debugLineNum = 250;BA.debugLine="P_Imagengrande.Visible = False";
_p_imagengrande.setVisible(__c.False);
 //BA.debugLineNum = 251;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]);
return BA.SubDelegator.SubNotFound;
}
}
