package gunav2.keymon.com.mx;


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

public class c_historicobat 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 anywheresoftware.b4a.ShellBA(_ba, this, htSubs, "gunav2.keymon.com.mx.c_historicobat");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", gunav2.keymon.com.mx.c_historicobat.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 
    public void  innerInitializeHelper(anywheresoftware.b4a.BA _ba) throws Exception{
        innerInitialize(_ba);
    }
    public Object callSub(String sub, Object sender, Object[] args) throws Exception {
        return BA.SubDelegator.SubNotFound;
    }
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 anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public String _ruta = "";
public anywheresoftware.b4a.objects.ButtonWrapper _regresar = null;
public anywheresoftware.b4a.objects.ListViewWrapper _listview1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_cant = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_total = null;
public anywheresoftware.b4a.objects.ButtonWrapper _borra = null;
public String _existe = "";
public String _result = "";
public anywheresoftware.b4a.objects.LabelWrapper _titulo = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_desc = null;
public anywheresoftware.b4a.objects.ListViewWrapper _listview2 = null;
public com.rootsoft.togglelibrary.ToggleLibrary _tgl = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_nota = null;
public anywheresoftware.b4a.objects.PanelWrapper _panel1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_productohist = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_s1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_s2 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_s3 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_s4 = null;
public b4a.example3.customlistview _customlistview1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_promediohist = 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.appupdater _appupdater = null;
public gunav2.keymon.com.mx.tracker _tracker = null;
public gunav2.keymon.com.mx.firebasemessaging _firebasemessaging = null;
public gunav2.keymon.com.mx.mapa_rutas _mapa_rutas = 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 Object  _initialize(gunav2.keymon.com.mx.c_historicobat __ref,anywheresoftware.b4a.BA _ba) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="c_historicobat";
if (Debug.shouldDelegate(ba, "initialize", false))
	 {return ((Object) Debug.delegate(ba, "initialize", new Object[] {_ba}));}
RDebugUtils.currentLine=76021760;
 //BA.debugLineNum = 76021760;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=76021761;
 //BA.debugLineNum = 76021761;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=76021762;
 //BA.debugLineNum = 76021762;BA.debugLine="End Sub";
return null;
}
public String  _b4xpage_appear(gunav2.keymon.com.mx.c_historicobat __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_historicobat";
if (Debug.shouldDelegate(ba, "b4xpage_appear", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_appear", null));}
int _i = 0;
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _prohit = null;
int _sfdf = 0;
String _nombreproducto = "";
String _cant_sem4 = "";
String _cant_sem3 = "";
String _cant_sem2 = "";
String _cant_sem1 = "";
String _sql = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _prohit2 = null;
double _promx = 0;
int _c1 = 0;
int _c2 = 0;
int _c3 = 0;
int _c4 = 0;
RDebugUtils.currentLine=76152832;
 //BA.debugLineNum = 76152832;BA.debugLine="Sub B4XPage_Appear";
RDebugUtils.currentLine=76152835;
 //BA.debugLineNum = 76152835;BA.debugLine="Panel1.Visible = False";
__ref._panel1 /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=76152836;
 //BA.debugLineNum = 76152836;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then";
if (__c.Not(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled())) { 
RDebugUtils.currentLine=76152837;
 //BA.debugLineNum = 76152837;BA.debugLine="ToastMessageShow(\"Es necesario tener el GPS ence";
__c.ToastMessageShow(BA.ObjectToCharSequence("Es necesario tener el GPS encendido"),__c.True);
RDebugUtils.currentLine=76152838;
 //BA.debugLineNum = 76152838;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent";
__c.StartActivity(ba,(Object)(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent()));
 };
RDebugUtils.currentLine=76152840;
 //BA.debugLineNum = 76152840;BA.debugLine="L_CANT.Text =\"\"";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=76152841;
 //BA.debugLineNum = 76152841;BA.debugLine="L_TOTAL.Text=\"\"";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=76152842;
 //BA.debugLineNum = 76152842;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select count(";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (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 count(*) as EXISTE from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=76152843;
 //BA.debugLineNum = 76152843;BA.debugLine="C.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=76152844;
 //BA.debugLineNum = 76152844;BA.debugLine="Existe = C.GetString(\"EXISTE\")";
__ref._existe /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("EXISTE");
RDebugUtils.currentLine=76152845;
 //BA.debugLineNum = 76152845;BA.debugLine="C.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=76152846;
 //BA.debugLineNum = 76152846;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select HVD_CL";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (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 HVD_CLIENTE,HVD_PRONOMBRE,HVD_CANT,HVD_COSTO_TOT, HVD_FECHA from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) order by HVD_FECHA asc")));
RDebugUtils.currentLine=76152847;
 //BA.debugLineNum = 76152847;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=76152848;
 //BA.debugLineNum = 76152848;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=76152849;
 //BA.debugLineNum = 76152849;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step15 = 1;
final int limit15 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit15 ;_i = _i + step15 ) {
RDebugUtils.currentLine=76152850;
 //BA.debugLineNum = 76152850;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=76152851;
 //BA.debugLineNum = 76152851;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=76152852;
 //BA.debugLineNum = 76152852;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=76152853;
 //BA.debugLineNum = 76152853;BA.debugLine="label1.TextSize = 15";
_label1.setTextSize((float) (15));
RDebugUtils.currentLine=76152854;
 //BA.debugLineNum = 76152854;BA.debugLine="label1.TextColor = Colors.White";
_label1.setTextColor(__c.Colors.White);
RDebugUtils.currentLine=76152855;
 //BA.debugLineNum = 76152855;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=76152856;
 //BA.debugLineNum = 76152856;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=76152857;
 //BA.debugLineNum = 76152857;BA.debugLine="label2.TextSize = 15";
_label2.setTextSize((float) (15));
RDebugUtils.currentLine=76152858;
 //BA.debugLineNum = 76152858;BA.debugLine="label2.TextColor = Colors.White";
_label2.setTextColor(__c.Colors.White);
RDebugUtils.currentLine=76152859;
 //BA.debugLineNum = 76152859;BA.debugLine="ListView1.AddTwoLines(c.GetString(\"HVD_PRONOMBR";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddTwoLines(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PRONOMBRE")),BA.ObjectToCharSequence("Cantidad #"+__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CANT")+" SubTotal $"+__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_COSTO_TOT")+"      Fecha: "+__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_FECHA")));
 }
};
 };
RDebugUtils.currentLine=76152862;
 //BA.debugLineNum = 76152862;BA.debugLine="If Existe <> 0 Then";
if ((__ref._existe /*String*/ ).equals(BA.NumberToString(0)) == false) { 
RDebugUtils.currentLine=76152863;
 //BA.debugLineNum = 76152863;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select SUM(H";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (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 SUM(HVD_CANT) AS PC_NOART, SUM(HVD_COSTO_TOT) AS PC_MONTO from HIST_VENTAS where HVD_CLIENTE in (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=76152864;
 //BA.debugLineNum = 76152864;BA.debugLine="C.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=76152865;
 //BA.debugLineNum = 76152865;BA.debugLine="L_CANT.Text = c.GetString(\"PC_NOART\")";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_NOART")));
RDebugUtils.currentLine=76152866;
 //BA.debugLineNum = 76152866;BA.debugLine="L_TOTAL.Text = c.GetString(\"PC_MONTO\")";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_MONTO")));
 };
RDebugUtils.currentLine=76152868;
 //BA.debugLineNum = 76152868;BA.debugLine="ListView1.Visible = False";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=76152870;
 //BA.debugLineNum = 76152870;BA.debugLine="CustomListView1.AsView.Height = Root.Height * 0.4";
__ref._customlistview1 /*b4a.example3.customlistview*/ ._asview().setHeight((int) (__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getHeight()*0.45));
RDebugUtils.currentLine=76152871;
 //BA.debugLineNum = 76152871;BA.debugLine="CustomListView1.Clear";
__ref._customlistview1 /*b4a.example3.customlistview*/ ._clear();
RDebugUtils.currentLine=76152872;
 //BA.debugLineNum = 76152872;BA.debugLine="Dim prohit As Cursor = B4XPages.MainPage.skmt.Exe";
_prohit = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_prohit = (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 distinct HVD_PRONOMBRE from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) order by HVD_PRONOMBRE asc")));
RDebugUtils.currentLine=76152874;
 //BA.debugLineNum = 76152874;BA.debugLine="If prohit.RowCount > 0 Then";
if (_prohit.getRowCount()>0) { 
RDebugUtils.currentLine=76152877;
 //BA.debugLineNum = 76152877;BA.debugLine="For sfdf = 0 To prohit.RowCount - 1";
{
final int step39 = 1;
final int limit39 = (int) (_prohit.getRowCount()-1);
_sfdf = (int) (0) ;
for (;_sfdf <= limit39 ;_sfdf = _sfdf + step39 ) {
RDebugUtils.currentLine=76152878;
 //BA.debugLineNum = 76152878;BA.debugLine="prohit.Position = sfdf";
_prohit.setPosition(_sfdf);
RDebugUtils.currentLine=76152879;
 //BA.debugLineNum = 76152879;BA.debugLine="Dim nombreProducto As String = prohit.GetString";
_nombreproducto = _prohit.GetString("HVD_PRONOMBRE");
RDebugUtils.currentLine=76152883;
 //BA.debugLineNum = 76152883;BA.debugLine="Dim cant_sem4 As String = \"0\"";
_cant_sem4 = "0";
RDebugUtils.currentLine=76152884;
 //BA.debugLineNum = 76152884;BA.debugLine="Dim cant_sem3 As String = \"0\"";
_cant_sem3 = "0";
RDebugUtils.currentLine=76152885;
 //BA.debugLineNum = 76152885;BA.debugLine="Dim cant_sem2 As String = \"0\"";
_cant_sem2 = "0";
RDebugUtils.currentLine=76152886;
 //BA.debugLineNum = 76152886;BA.debugLine="Dim cant_sem1 As String = \"0\"";
_cant_sem1 = "0";
RDebugUtils.currentLine=76152919;
 //BA.debugLineNum = 76152919;BA.debugLine="Dim sql As String = $\"     WITH FechasObjetivo";
_sql = ("\n"+"    WITH FechasObjetivo (Fecha) AS (\n"+"        SELECT strftime('%d/%m/%Y', date('now', 'localtime', '-28 days'))\n"+"        UNION ALL\n"+"        SELECT strftime('%d/%m/%Y', date('now', 'localtime', '-21 days'))\n"+"        UNION ALL\n"+"        SELECT strftime('%d/%m/%Y', date('now', 'localtime', '-14 days'))\n"+"        UNION ALL\n"+"        SELECT strftime('%d/%m/%Y', date('now', 'localtime', '-7 days'))\n"+"    )\n"+"    SELECT \n"+"        COALESCE(SUM(H.HVD_CANT), 0) AS HVD_CANT_TOTAL,\n"+"        -- Si el mes de la fecha es igual al mes actual, devuelve 1, si no 0\n"+"        CASE WHEN SUBSTR(F.Fecha, 4, 2) = strftime('%m', 'now', 'localtime') THEN 1 ELSE 0 END AS EsMesActual\n"+"    FROM \n"+"        FechasObjetivo AS F\n"+"    LEFT JOIN \n"+"        HIST_VENTAS AS H \n"+"        ON F.Fecha = H.HVD_FECHA\n"+"        AND H.HVD_CLIENTE IN (SELECT CUENTA FROM cuentaa)\n"+"        AND H.HVD_PRONOMBRE = '"+__c.SmartStringFormatter("",(Object)(_nombreproducto))+"'\n"+"    GROUP BY F.Fecha\n"+"    ORDER BY SUBSTR(F.Fecha, 7, 4), SUBSTR(F.Fecha, 4, 2), SUBSTR(F.Fecha, 1, 2)\n"+"");
RDebugUtils.currentLine=76152947;
 //BA.debugLineNum = 76152947;BA.debugLine="Dim prohit2 As Cursor = B4XPages.MainPage.skmt.";
_prohit2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_prohit2 = (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(_sql)));
RDebugUtils.currentLine=76152971;
 //BA.debugLineNum = 76152971;BA.debugLine="Dim promx As Double = (cant_sem4 +  cant_sem3 +";
_promx = ((double)(Double.parseDouble(_cant_sem4))+(double)(Double.parseDouble(_cant_sem3))+(double)(Double.parseDouble(_cant_sem2))+(double)(Double.parseDouble(_cant_sem1)))/(double)4;
RDebugUtils.currentLine=76152978;
 //BA.debugLineNum = 76152978;BA.debugLine="Dim c1, c2, c3, c4 As Int";
_c1 = 0;
_c2 = 0;
_c3 = 0;
_c4 = 0;
RDebugUtils.currentLine=76152980;
 //BA.debugLineNum = 76152980;BA.debugLine="If prohit2.RowCount = 4 Then";
if (_prohit2.getRowCount()==4) { 
RDebugUtils.currentLine=76152981;
 //BA.debugLineNum = 76152981;BA.debugLine="prohit2.Position = 0";
_prohit2.setPosition((int) (0));
RDebugUtils.currentLine=76152982;
 //BA.debugLineNum = 76152982;BA.debugLine="cant_sem4 = prohit2.GetString(\"HVD_CANT_TOTAL\"";
_cant_sem4 = _prohit2.GetString("HVD_CANT_TOTAL");
RDebugUtils.currentLine=76152983;
 //BA.debugLineNum = 76152983;BA.debugLine="c1 = prohit2.GetInt(\"EsMesActual\")";
_c1 = _prohit2.GetInt("EsMesActual");
RDebugUtils.currentLine=76152985;
 //BA.debugLineNum = 76152985;BA.debugLine="prohit2.Position = 1";
_prohit2.setPosition((int) (1));
RDebugUtils.currentLine=76152986;
 //BA.debugLineNum = 76152986;BA.debugLine="cant_sem3 = prohit2.GetString(\"HVD_CANT_TOTAL\"";
_cant_sem3 = _prohit2.GetString("HVD_CANT_TOTAL");
RDebugUtils.currentLine=76152987;
 //BA.debugLineNum = 76152987;BA.debugLine="c2 = prohit2.GetInt(\"EsMesActual\")";
_c2 = _prohit2.GetInt("EsMesActual");
RDebugUtils.currentLine=76152989;
 //BA.debugLineNum = 76152989;BA.debugLine="prohit2.Position = 2";
_prohit2.setPosition((int) (2));
RDebugUtils.currentLine=76152990;
 //BA.debugLineNum = 76152990;BA.debugLine="cant_sem2 = prohit2.GetString(\"HVD_CANT_TOTAL\"";
_cant_sem2 = _prohit2.GetString("HVD_CANT_TOTAL");
RDebugUtils.currentLine=76152991;
 //BA.debugLineNum = 76152991;BA.debugLine="c3 = prohit2.GetInt(\"EsMesActual\")";
_c3 = _prohit2.GetInt("EsMesActual");
RDebugUtils.currentLine=76152993;
 //BA.debugLineNum = 76152993;BA.debugLine="prohit2.Position = 3";
_prohit2.setPosition((int) (3));
RDebugUtils.currentLine=76152994;
 //BA.debugLineNum = 76152994;BA.debugLine="cant_sem1 = prohit2.GetString(\"HVD_CANT_TOTAL\"";
_cant_sem1 = _prohit2.GetString("HVD_CANT_TOTAL");
RDebugUtils.currentLine=76152995;
 //BA.debugLineNum = 76152995;BA.debugLine="c4 = prohit2.GetInt(\"EsMesActual\")";
_c4 = _prohit2.GetInt("EsMesActual");
 }else {
RDebugUtils.currentLine=76152997;
 //BA.debugLineNum = 76152997;BA.debugLine="Log(\"Error en filas\")";
__c.LogImpl("076152997","Error en filas",0);
 };
RDebugUtils.currentLine=76152999;
 //BA.debugLineNum = 76152999;BA.debugLine="prohit2.Close";
_prohit2.Close();
RDebugUtils.currentLine=76153002;
 //BA.debugLineNum = 76153002;BA.debugLine="CustomListView1.Add(CreateListItem(nombreProduc";
__ref._customlistview1 /*b4a.example3.customlistview*/ ._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__ref._createlistitem /*anywheresoftware.b4a.objects.PanelWrapper*/ (null,_nombreproducto,(int)(Double.parseDouble(_cant_sem4)),(int)(Double.parseDouble(_cant_sem3)),(int)(Double.parseDouble(_cant_sem2)),(int)(Double.parseDouble(_cant_sem1)),_promx,_c1,_c2,_c3,_c4).getObject())),(Object)(1));
 }
};
RDebugUtils.currentLine=76153006;
 //BA.debugLineNum = 76153006;BA.debugLine="prohit.Close ' Cerramos el cursor externo";
_prohit.Close();
 };
RDebugUtils.currentLine=76153013;
 //BA.debugLineNum = 76153013;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.objects.PanelWrapper  _createlistitem(gunav2.keymon.com.mx.c_historicobat __ref,String _prodhis,int _s1,int _s2,int _s3,int _s4,double _prom,int _m1,int _m2,int _m3,int _m4) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_historicobat";
if (Debug.shouldDelegate(ba, "createlistitem", false))
	 {return ((anywheresoftware.b4a.objects.PanelWrapper) Debug.delegate(ba, "createlistitem", new Object[] {_prodhis,_s1,_s2,_s3,_s4,_prom,_m1,_m2,_m3,_m4}));}
anywheresoftware.b4a.objects.B4XViewWrapper _p = null;
RDebugUtils.currentLine=76218368;
 //BA.debugLineNum = 76218368;BA.debugLine="Sub CreateListItem(prodhis As String, s1 As Int, s";
RDebugUtils.currentLine=76218369;
 //BA.debugLineNum = 76218369;BA.debugLine="Dim p As B4XView = xui.CreatePanel(\"\")";
_p = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p = __ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .CreatePanel(ba,"");
RDebugUtils.currentLine=76218371;
 //BA.debugLineNum = 76218371;BA.debugLine="p.SetLayoutAnimated(0, 0, 0, 288dip, 170dip)";
_p.SetLayoutAnimated((int) (0),(int) (0),(int) (0),__c.DipToCurrent((int) (288)),__c.DipToCurrent((int) (170)));
RDebugUtils.currentLine=76218372;
 //BA.debugLineNum = 76218372;BA.debugLine="p.LoadLayout(\"historicobat\")";
_p.LoadLayout("historicobat",ba);
RDebugUtils.currentLine=76218374;
 //BA.debugLineNum = 76218374;BA.debugLine="l_productohist.Text = prodhis";
__ref._l_productohist /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_prodhis));
RDebugUtils.currentLine=76218375;
 //BA.debugLineNum = 76218375;BA.debugLine="l_s1.Text = s1";
__ref._l_s1 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_s1));
RDebugUtils.currentLine=76218376;
 //BA.debugLineNum = 76218376;BA.debugLine="l_s2.Text = s2";
__ref._l_s2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_s2));
RDebugUtils.currentLine=76218377;
 //BA.debugLineNum = 76218377;BA.debugLine="l_s3.Text = s3";
__ref._l_s3 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_s3));
RDebugUtils.currentLine=76218378;
 //BA.debugLineNum = 76218378;BA.debugLine="l_s4.Text = s4";
__ref._l_s4 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_s4));
RDebugUtils.currentLine=76218382;
 //BA.debugLineNum = 76218382;BA.debugLine="l_s1.Color = IIf(m1 = 1, xui.Color_Blue, xui.Colo";
__ref._l_s1 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setColor((int)(BA.ObjectToNumber(((_m1==1) ? ((Object)(__ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .Color_Blue)) : ((Object)(__ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .Color_Yellow))))));
RDebugUtils.currentLine=76218383;
 //BA.debugLineNum = 76218383;BA.debugLine="l_s2.Color = IIf(m2 = 1, xui.Color_Blue, xui.Colo";
__ref._l_s2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setColor((int)(BA.ObjectToNumber(((_m2==1) ? ((Object)(__ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .Color_Blue)) : ((Object)(__ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .Color_Yellow))))));
RDebugUtils.currentLine=76218384;
 //BA.debugLineNum = 76218384;BA.debugLine="l_s3.Color = IIf(m3 = 1, xui.Color_Blue, xui.Colo";
__ref._l_s3 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setColor((int)(BA.ObjectToNumber(((_m3==1) ? ((Object)(__ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .Color_Blue)) : ((Object)(__ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .Color_Yellow))))));
RDebugUtils.currentLine=76218385;
 //BA.debugLineNum = 76218385;BA.debugLine="l_s4.Color = IIf(m4 = 1, xui.Color_Blue, xui.Colo";
__ref._l_s4 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setColor((int)(BA.ObjectToNumber(((_m4==1) ? ((Object)(__ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .Color_Blue)) : ((Object)(__ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .Color_Yellow))))));
RDebugUtils.currentLine=76218388;
 //BA.debugLineNum = 76218388;BA.debugLine="l_s1.TextColor = IIf(m1 = 1, xui.Color_White, xui";
__ref._l_s1 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor((int)(BA.ObjectToNumber(((_m1==1) ? ((Object)(__ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .Color_White)) : ((Object)(__ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .Color_Black))))));
RDebugUtils.currentLine=76218389;
 //BA.debugLineNum = 76218389;BA.debugLine="l_s2.TextColor = IIf(m2 = 1, xui.Color_White, xui";
__ref._l_s2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor((int)(BA.ObjectToNumber(((_m2==1) ? ((Object)(__ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .Color_White)) : ((Object)(__ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .Color_Black))))));
RDebugUtils.currentLine=76218390;
 //BA.debugLineNum = 76218390;BA.debugLine="l_s3.TextColor = IIf(m3 = 1, xui.Color_White, xui";
__ref._l_s3 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor((int)(BA.ObjectToNumber(((_m3==1) ? ((Object)(__ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .Color_White)) : ((Object)(__ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .Color_Black))))));
RDebugUtils.currentLine=76218391;
 //BA.debugLineNum = 76218391;BA.debugLine="l_s4.TextColor = IIf(m4 = 1, xui.Color_White, xui";
__ref._l_s4 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor((int)(BA.ObjectToNumber(((_m4==1) ? ((Object)(__ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .Color_White)) : ((Object)(__ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .Color_Black))))));
RDebugUtils.currentLine=76218393;
 //BA.debugLineNum = 76218393;BA.debugLine="L_PROMEDIOHIST.Text = \"Promedio \" & NumberFormat(";
__ref._l_promediohist /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("Promedio "+__c.NumberFormat(_prom,(int) (1),(int) (2))));
RDebugUtils.currentLine=76218395;
 //BA.debugLineNum = 76218395;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()));
RDebugUtils.currentLine=76218396;
 //BA.debugLineNum = 76218396;BA.debugLine="End Sub";
return null;
}
public String  _b4xpage_created(gunav2.keymon.com.mx.c_historicobat __ref,anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_historicobat";
if (Debug.shouldDelegate(ba, "b4xpage_created", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_created", new Object[] {_root1}));}
RDebugUtils.currentLine=76087296;
 //BA.debugLineNum = 76087296;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=76087297;
 //BA.debugLineNum = 76087297;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=76087299;
 //BA.debugLineNum = 76087299;BA.debugLine="Root.LoadLayout(\"nota2\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("nota2",ba);
RDebugUtils.currentLine=76087300;
 //BA.debugLineNum = 76087300;BA.debugLine="borra.Visible = False";
__ref._borra /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=76087301;
 //BA.debugLineNum = 76087301;BA.debugLine="Titulo.Text = \"Acumulado\"";
__ref._titulo /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("Acumulado"));
RDebugUtils.currentLine=76087302;
 //BA.debugLineNum = 76087302;BA.debugLine="b_desc.Visible = False";
__ref._b_desc /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=76087303;
 //BA.debugLineNum = 76087303;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(gunav2.keymon.com.mx.c_historicobat __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_historicobat";
RDebugUtils.currentLine=75956224;
 //BA.debugLineNum = 75956224;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=75956225;
 //BA.debugLineNum = 75956225;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=75956226;
 //BA.debugLineNum = 75956226;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=75956228;
 //BA.debugLineNum = 75956228;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
RDebugUtils.currentLine=75956229;
 //BA.debugLineNum = 75956229;BA.debugLine="Dim clie_id As String";
_clie_id = "";
RDebugUtils.currentLine=75956230;
 //BA.debugLineNum = 75956230;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
RDebugUtils.currentLine=75956231;
 //BA.debugLineNum = 75956231;BA.debugLine="Dim usuario As String";
_usuario = "";
RDebugUtils.currentLine=75956233;
 //BA.debugLineNum = 75956233;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=75956234;
 //BA.debugLineNum = 75956234;BA.debugLine="Dim ruta As String";
_ruta = "";
RDebugUtils.currentLine=75956235;
 //BA.debugLineNum = 75956235;BA.debugLine="Dim Regresar As Button";
_regresar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=75956238;
 //BA.debugLineNum = 75956238;BA.debugLine="Dim ListView1 As ListView";
_listview1 = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=75956239;
 //BA.debugLineNum = 75956239;BA.debugLine="Dim L_CANT As Label";
_l_cant = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=75956240;
 //BA.debugLineNum = 75956240;BA.debugLine="Dim L_TOTAL As Label";
_l_total = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=75956241;
 //BA.debugLineNum = 75956241;BA.debugLine="Dim borra As Button";
_borra = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=75956242;
 //BA.debugLineNum = 75956242;BA.debugLine="Dim Existe As String";
_existe = "";
RDebugUtils.currentLine=75956243;
 //BA.debugLineNum = 75956243;BA.debugLine="Dim result As String";
_result = "";
RDebugUtils.currentLine=75956246;
 //BA.debugLineNum = 75956246;BA.debugLine="Private Titulo As Label";
_titulo = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=75956247;
 //BA.debugLineNum = 75956247;BA.debugLine="Private b_desc As Button";
_b_desc = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=75956248;
 //BA.debugLineNum = 75956248;BA.debugLine="Private ListView2 As ListView";
_listview2 = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=75956249;
 //BA.debugLineNum = 75956249;BA.debugLine="Dim tgl As Toggle";
_tgl = new com.rootsoft.togglelibrary.ToggleLibrary();
RDebugUtils.currentLine=75956250;
 //BA.debugLineNum = 75956250;BA.debugLine="Private p_nota As Panel";
_p_nota = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=75956251;
 //BA.debugLineNum = 75956251;BA.debugLine="Private Panel1 As Panel";
_panel1 = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=75956252;
 //BA.debugLineNum = 75956252;BA.debugLine="Private l_productohist As Label";
_l_productohist = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=75956253;
 //BA.debugLineNum = 75956253;BA.debugLine="Private l_s1 As Label";
_l_s1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=75956254;
 //BA.debugLineNum = 75956254;BA.debugLine="Private l_s2 As Label";
_l_s2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=75956255;
 //BA.debugLineNum = 75956255;BA.debugLine="Private l_s3 As Label";
_l_s3 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=75956256;
 //BA.debugLineNum = 75956256;BA.debugLine="Private l_s4 As Label";
_l_s4 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=75956257;
 //BA.debugLineNum = 75956257;BA.debugLine="Private CustomListView1 As CustomListView";
_customlistview1 = new b4a.example3.customlistview();
RDebugUtils.currentLine=75956258;
 //BA.debugLineNum = 75956258;BA.debugLine="Private L_PROMEDIOHIST As Label";
_l_promediohist = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=75956259;
 //BA.debugLineNum = 75956259;BA.debugLine="End Sub";
return "";
}
}