package gunav2.keymon.com.mx;


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

public class c_ticketsdia 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_ticketsdia");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", gunav2.keymon.com.mx.c_ticketsdia.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.objects.PanelWrapper _p_ticketsdia = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _s = null;
public String _ruta = "";
public anywheresoftware.b4a.objects.ListViewWrapper _listview1 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_noventa = null;
public String _nombre_boton = "";
public String _stime = "";
public anywheresoftware.b4a.objects.LabelWrapper _l_ventanoventa = 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_ticketsdia __ref,anywheresoftware.b4a.BA _ba) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="c_ticketsdia";
if (Debug.shouldDelegate(ba, "initialize", false))
	 {return ((Object) Debug.delegate(ba, "initialize", new Object[] {_ba}));}
RDebugUtils.currentLine=68354048;
 //BA.debugLineNum = 68354048;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=68354049;
 //BA.debugLineNum = 68354049;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=68354050;
 //BA.debugLineNum = 68354050;BA.debugLine="End Sub";
return null;
}
public boolean  _activity_keypress(gunav2.keymon.com.mx.c_ticketsdia __ref,int _key) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_ticketsdia";
if (Debug.shouldDelegate(ba, "activity_keypress", false))
	 {return ((Boolean) Debug.delegate(ba, "activity_keypress", new Object[] {_key}));}
RDebugUtils.currentLine=68616192;
 //BA.debugLineNum = 68616192;BA.debugLine="Sub Activity_KeyPress (key As Int) As Boolean";
RDebugUtils.currentLine=68616194;
 //BA.debugLineNum = 68616194;BA.debugLine="If key=KeyCodes.KEYCODE_BACK Then";
if (_key==__c.KeyCodes.KEYCODE_BACK) { 
RDebugUtils.currentLine=68616196;
 //BA.debugLineNum = 68616196;BA.debugLine="B4XPages.ShowPage(\"principal\")";
_b4xpages._showpage /*String*/ (ba,"principal");
 };
RDebugUtils.currentLine=68616200;
 //BA.debugLineNum = 68616200;BA.debugLine="Return False";
if (true) return __c.False;
RDebugUtils.currentLine=68616201;
 //BA.debugLineNum = 68616201;BA.debugLine="End Sub";
return false;
}
public String  _b_noventa_click(gunav2.keymon.com.mx.c_ticketsdia __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_ticketsdia";
if (Debug.shouldDelegate(ba, "b_noventa_click", false))
	 {return ((String) Debug.delegate(ba, "b_noventa_click", null));}
int _i = 0;
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _s3 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _s5 = null;
RDebugUtils.currentLine=68747264;
 //BA.debugLineNum = 68747264;BA.debugLine="Sub b_noventa_Click";
RDebugUtils.currentLine=68747265;
 //BA.debugLineNum = 68747265;BA.debugLine="If nombre_boton = \"NOVENTA\" Then";
if ((__ref._nombre_boton /*String*/ ).equals("NOVENTA")) { 
RDebugUtils.currentLine=68747266;
 //BA.debugLineNum = 68747266;BA.debugLine="nombre_boton = \"VENTA\"";
__ref._nombre_boton /*String*/  = "VENTA";
RDebugUtils.currentLine=68747267;
 //BA.debugLineNum = 68747267;BA.debugLine="b_noventa.Text =\"VENTA\"";
__ref._b_noventa /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setText(BA.ObjectToCharSequence("VENTA"));
RDebugUtils.currentLine=68747268;
 //BA.debugLineNum = 68747268;BA.debugLine="L_ventanoventa.Text = \"Clientes sin venta\"";
__ref._l_ventanoventa /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("Clientes sin venta"));
RDebugUtils.currentLine=68747269;
 //BA.debugLineNum = 68747269;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select NV_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 NV_CLIENTE,NV_MOTIVO,NV_COMM, (select CAT_CL_NOMBRE from kmt_info3 where cat_cl_codigo = NV_CLIENTE ) as NOMBRE FROM NOVENTA ORDER BY NV_CLIENTE asc")));
RDebugUtils.currentLine=68747270;
 //BA.debugLineNum = 68747270;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=68747271;
 //BA.debugLineNum = 68747271;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=68747272;
 //BA.debugLineNum = 68747272;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step8 = 1;
final int limit8 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit8 ;_i = _i + step8 ) {
RDebugUtils.currentLine=68747273;
 //BA.debugLineNum = 68747273;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=68747274;
 //BA.debugLineNum = 68747274;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=68747275;
 //BA.debugLineNum = 68747275;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=68747276;
 //BA.debugLineNum = 68747276;BA.debugLine="label1.TextSize = 15";
_label1.setTextSize((float) (15));
RDebugUtils.currentLine=68747277;
 //BA.debugLineNum = 68747277;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=68747278;
 //BA.debugLineNum = 68747278;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=68747279;
 //BA.debugLineNum = 68747279;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=68747280;
 //BA.debugLineNum = 68747280;BA.debugLine="label2.TextSize = 10";
_label2.setTextSize((float) (10));
RDebugUtils.currentLine=68747281;
 //BA.debugLineNum = 68747281;BA.debugLine="label2.TextColor = Colors.Blue";
_label2.setTextColor(__c.Colors.Blue);
RDebugUtils.currentLine=68747282;
 //BA.debugLineNum = 68747282;BA.debugLine="ListView1.AddTwoLines(c.GetString(\"NV_CLIENTE\"";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddTwoLines(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("NV_CLIENTE")),BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("NOMBRE")+"  Motivo #"+__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("NV_MOTIVO")+" Comentario $"+__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("NV_COMM")));
 }
};
 };
 }else {
RDebugUtils.currentLine=68747286;
 //BA.debugLineNum = 68747286;BA.debugLine="nombre_boton = \"NOVENTA\"";
__ref._nombre_boton /*String*/  = "NOVENTA";
RDebugUtils.currentLine=68747287;
 //BA.debugLineNum = 68747287;BA.debugLine="b_noventa.Text =\"NO VENTA\"";
__ref._b_noventa /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setText(BA.ObjectToCharSequence("NO VENTA"));
RDebugUtils.currentLine=68747288;
 //BA.debugLineNum = 68747288;BA.debugLine="L_ventanoventa.Text = \"Clientes con venta\"";
__ref._l_ventanoventa /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("Clientes con venta"));
RDebugUtils.currentLine=68747289;
 //BA.debugLineNum = 68747289;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=68747290;
 //BA.debugLineNum = 68747290;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select PC_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 PC_CLIENTE,PC_MONTO,PC_NOART,(select CAT_CL_NOMBRE from kmt_info3 where cat_cl_codigo = pc_cliente ) as NOMBRE FROM PEDIDO_CLIENTE ORDER BY PC_FECHA asc")));
RDebugUtils.currentLine=68747293;
 //BA.debugLineNum = 68747293;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=68747294;
 //BA.debugLineNum = 68747294;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=68747295;
 //BA.debugLineNum = 68747295;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step29 = 1;
final int limit29 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit29 ;_i = _i + step29 ) {
RDebugUtils.currentLine=68747296;
 //BA.debugLineNum = 68747296;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=68747297;
 //BA.debugLineNum = 68747297;BA.debugLine="Log(C.GetString(\"PC_CLIENTE\"))";
__c.LogImpl("068747297",__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE"),0);
RDebugUtils.currentLine=68747298;
 //BA.debugLineNum = 68747298;BA.debugLine="Private s3 As Cursor=B4XPages.MainPage.skmt.Ex";
_s3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_s3 = (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*/ .ExecQuery2("select * FROM PEDIDO WHERE PE_CLIENTE = ? and PE_RECALCULO <> ? OR PE_RECALCULO <> ? OR PE_RECALCULO IS NOT NULL",new String[]{__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE"),"","null"})));
RDebugUtils.currentLine=68747299;
 //BA.debugLineNum = 68747299;BA.debugLine="LogColor(s3.RowCount,Colors.Yellow)";
__c.LogImpl("068747299",BA.NumberToString(_s3.getRowCount()),__c.Colors.Yellow);
RDebugUtils.currentLine=68747300;
 //BA.debugLineNum = 68747300;BA.debugLine="If s3.RowCount > 0 Then";
if (_s3.getRowCount()>0) { 
RDebugUtils.currentLine=68747301;
 //BA.debugLineNum = 68747301;BA.debugLine="Private s As Cursor=B4XPages.MainPage.skmt.Ex";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_s = (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*/ .ExecQuery2("select iFNULL(sum(pe_costo_tot),0) as TOTAL_CLIE, IFNULL(SUM(PE_CANT),0) AS CANT_CLIE FROM PEDIDO WHERE PE_CLIENTE = ? and (PE_RECALCULO = ? or PE_RECALCULO = ? or PE_RECALCULO IS NULL ) AND PE_PROID NOT IN (SELECT CAT_PA_ID FROM PROMOS_COMP)",new String[]{__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE"),"","null"})));
RDebugUtils.currentLine=68747302;
 //BA.debugLineNum = 68747302;BA.debugLine="s.Position=0";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=68747303;
 //BA.debugLineNum = 68747303;BA.debugLine="Private s5 As Cursor = B4XPages.MainPage.skmt";
_s5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_s5 = (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*/ .ExecQuery2("select iFNULL(sum(PE_RECALCULOTOT),0) as TOTAL_CLIE, IFNULL(SUM(PE_CANT),0) AS CANT_CLIE FROM PEDIDO WHERE PE_CLIENTE = ? and (PE_RECALCULO <> ? or PE_RECALCULO <> ? OR PE_RECALCULO IS NOT NULL) AND PE_PROID NOT IN (SELECT CAT_PA_ID FROM PROMOS_COMP)",new String[]{__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE"),"","null"})));
RDebugUtils.currentLine=68747304;
 //BA.debugLineNum = 68747304;BA.debugLine="s5.Position = 0";
_s5.setPosition((int) (0));
RDebugUtils.currentLine=68747305;
 //BA.debugLineNum = 68747305;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=68747306;
 //BA.debugLineNum = 68747306;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=68747307;
 //BA.debugLineNum = 68747307;BA.debugLine="label1.TextSize = 20";
_label1.setTextSize((float) (20));
RDebugUtils.currentLine=68747308;
 //BA.debugLineNum = 68747308;BA.debugLine="label1.TextColor = Colors.White";
_label1.setTextColor(__c.Colors.White);
RDebugUtils.currentLine=68747309;
 //BA.debugLineNum = 68747309;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=68747310;
 //BA.debugLineNum = 68747310;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=68747311;
 //BA.debugLineNum = 68747311;BA.debugLine="label2.TextSize = 20";
_label2.setTextSize((float) (20));
RDebugUtils.currentLine=68747312;
 //BA.debugLineNum = 68747312;BA.debugLine="label2.TextColor = Colors.White";
_label2.setTextColor(__c.Colors.White);
RDebugUtils.currentLine=68747313;
 //BA.debugLineNum = 68747313;BA.debugLine="label1.Height = 25dip";
_label1.setHeight(__c.DipToCurrent((int) (25)));
RDebugUtils.currentLine=68747314;
 //BA.debugLineNum = 68747314;BA.debugLine="label2.Height = 60dip";
_label2.setHeight(__c.DipToCurrent((int) (60)));
RDebugUtils.currentLine=68747316;
 //BA.debugLineNum = 68747316;BA.debugLine="ListView1.TwoLinesLayout.ItemHeight = 95dip";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().setItemHeight(__c.DipToCurrent((int) (95)));
RDebugUtils.currentLine=68747317;
 //BA.debugLineNum = 68747317;BA.debugLine="label1.Typeface = Typeface.CreateNew(Typeface";
_label1.setTypeface(__c.Typeface.CreateNew(__c.Typeface.DEFAULT_BOLD,__c.Typeface.STYLE_BOLD));
RDebugUtils.currentLine=68747318;
 //BA.debugLineNum = 68747318;BA.debugLine="label2.Typeface = Typeface.CreateNew(Typeface";
_label2.setTypeface(__c.Typeface.CreateNew(__c.Typeface.DEFAULT_BOLD,__c.Typeface.STYLE_BOLD));
RDebugUtils.currentLine=68747320;
 //BA.debugLineNum = 68747320;BA.debugLine="ListView1.AddTwoLines(c.GetString(\"PC_CLIENTE";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddTwoLines(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE")),BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("NOMBRE")+"   Cantidad #"+BA.NumberToString(((double)(Double.parseDouble(__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANT_CLIE")))+(double)(Double.parseDouble(_s5.GetString("CANT_CLIE")))))+" SubTotal $"+_subs._calculatotalconpromoxrango /*String*/ (ba,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE"))));
RDebugUtils.currentLine=68747321;
 //BA.debugLineNum = 68747321;BA.debugLine="s.Close";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }else 
{RDebugUtils.currentLine=68747322;
 //BA.debugLineNum = 68747322;BA.debugLine="Else If s3.RowCount = 0 Then";
if (_s3.getRowCount()==0) { 
RDebugUtils.currentLine=68747323;
 //BA.debugLineNum = 68747323;BA.debugLine="Log(s3.RowCount)";
__c.LogImpl("068747323",BA.NumberToString(_s3.getRowCount()),0);
RDebugUtils.currentLine=68747324;
 //BA.debugLineNum = 68747324;BA.debugLine="Private s As Cursor=B4XPages.MainPage.skmt.Ex";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_s = (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*/ .ExecQuery2("select iFNULL(sum(pe_costo_tot),0) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE FROM PEDIDO WHERE PE_CLIENTE = ?",new String[]{__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE")})));
RDebugUtils.currentLine=68747325;
 //BA.debugLineNum = 68747325;BA.debugLine="s.Position=0";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=68747327;
 //BA.debugLineNum = 68747327;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=68747328;
 //BA.debugLineNum = 68747328;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=68747329;
 //BA.debugLineNum = 68747329;BA.debugLine="label1.TextSize = 20";
_label1.setTextSize((float) (20));
RDebugUtils.currentLine=68747330;
 //BA.debugLineNum = 68747330;BA.debugLine="label1.TextColor = Colors.White";
_label1.setTextColor(__c.Colors.White);
RDebugUtils.currentLine=68747331;
 //BA.debugLineNum = 68747331;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=68747332;
 //BA.debugLineNum = 68747332;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=68747333;
 //BA.debugLineNum = 68747333;BA.debugLine="label2.TextSize = 20";
_label2.setTextSize((float) (20));
RDebugUtils.currentLine=68747334;
 //BA.debugLineNum = 68747334;BA.debugLine="label2.TextColor = Colors.White";
_label2.setTextColor(__c.Colors.White);
RDebugUtils.currentLine=68747335;
 //BA.debugLineNum = 68747335;BA.debugLine="label1.Height = 25dip";
_label1.setHeight(__c.DipToCurrent((int) (25)));
RDebugUtils.currentLine=68747336;
 //BA.debugLineNum = 68747336;BA.debugLine="label2.Height = 60dip";
_label2.setHeight(__c.DipToCurrent((int) (60)));
RDebugUtils.currentLine=68747338;
 //BA.debugLineNum = 68747338;BA.debugLine="ListView1.TwoLinesLayout.ItemHeight = 95dip";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().setItemHeight(__c.DipToCurrent((int) (95)));
RDebugUtils.currentLine=68747339;
 //BA.debugLineNum = 68747339;BA.debugLine="label1.Typeface = Typeface.CreateNew(Typeface";
_label1.setTypeface(__c.Typeface.CreateNew(__c.Typeface.DEFAULT_BOLD,__c.Typeface.STYLE_BOLD));
RDebugUtils.currentLine=68747340;
 //BA.debugLineNum = 68747340;BA.debugLine="label2.Typeface = Typeface.CreateNew(Typeface";
_label2.setTypeface(__c.Typeface.CreateNew(__c.Typeface.DEFAULT_BOLD,__c.Typeface.STYLE_BOLD));
RDebugUtils.currentLine=68747341;
 //BA.debugLineNum = 68747341;BA.debugLine="Log(c.GetString(\"PC_CLIENTE\"))";
__c.LogImpl("068747341",__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE"),0);
RDebugUtils.currentLine=68747342;
 //BA.debugLineNum = 68747342;BA.debugLine="Log(c.GetString(\"NOMBRE\"))";
__c.LogImpl("068747342",__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("NOMBRE"),0);
RDebugUtils.currentLine=68747343;
 //BA.debugLineNum = 68747343;BA.debugLine="Log(s.GetString(\"CANT_CLIE\"))";
__c.LogImpl("068747343",__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANT_CLIE"),0);
RDebugUtils.currentLine=68747344;
 //BA.debugLineNum = 68747344;BA.debugLine="Log(c.GetString(\"PC_CLIENTE\"))";
__c.LogImpl("068747344",__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE"),0);
RDebugUtils.currentLine=68747345;
 //BA.debugLineNum = 68747345;BA.debugLine="ListView1.AddTwoLines(c.GetString(\"PC_CLIENTE";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddTwoLines(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE")),BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("NOMBRE")+"   Cantidad #"+__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANT_CLIE")+" SubTotal $"+_subs._calculatotalconpromoxrango /*String*/ (ba,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE"))));
RDebugUtils.currentLine=68747346;
 //BA.debugLineNum = 68747346;BA.debugLine="s.Close";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }}
;
 }
};
 };
RDebugUtils.currentLine=68747351;
 //BA.debugLineNum = 68747351;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 };
RDebugUtils.currentLine=68747353;
 //BA.debugLineNum = 68747353;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear(gunav2.keymon.com.mx.c_ticketsdia __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_ticketsdia";
if (Debug.shouldDelegate(ba, "b4xpage_appear", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_appear", null));}
int _i = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _s3 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _s5 = null;
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
RDebugUtils.currentLine=68485120;
 //BA.debugLineNum = 68485120;BA.debugLine="Sub B4XPage_Appear";
RDebugUtils.currentLine=68485121;
 //BA.debugLineNum = 68485121;BA.debugLine="nombre_boton = \"NOVENTA\"";
__ref._nombre_boton /*String*/  = "NOVENTA";
RDebugUtils.currentLine=68485122;
 //BA.debugLineNum = 68485122;BA.debugLine="L_ventanoventa.Text = \"Clientes con venta\"";
__ref._l_ventanoventa /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("Clientes con venta"));
RDebugUtils.currentLine=68485123;
 //BA.debugLineNum = 68485123;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=68485124;
 //BA.debugLineNum = 68485124;BA.debugLine="ListView1.Height = Root.Height * 0.70";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setHeight((int) (__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getHeight()*0.70));
RDebugUtils.currentLine=68485125;
 //BA.debugLineNum = 68485125;BA.debugLine="p_ticketsdia.Height = Root.Height * 0.80";
__ref._p_ticketsdia /*anywheresoftware.b4a.objects.PanelWrapper*/ .setHeight((int) (__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getHeight()*0.80));
RDebugUtils.currentLine=68485126;
 //BA.debugLineNum = 68485126;BA.debugLine="p_ticketsdia.Width = Root.Width * 0.90";
__ref._p_ticketsdia /*anywheresoftware.b4a.objects.PanelWrapper*/ .setWidth((int) (__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth()*0.90));
RDebugUtils.currentLine=68485128;
 //BA.debugLineNum = 68485128;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select PC_CLI";
__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 PC_CLIENTE,PC_MONTO,PC_NOART,(select CAT_CL_NOMBRE from kmt_info3 where cat_cl_codigo = pc_cliente ) as NOMBRE FROM PEDIDO_CLIENTE ORDER BY PC_FECHA asc")));
RDebugUtils.currentLine=68485131;
 //BA.debugLineNum = 68485131;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=68485132;
 //BA.debugLineNum = 68485132;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=68485133;
 //BA.debugLineNum = 68485133;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step10 = 1;
final int limit10 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit10 ;_i = _i + step10 ) {
RDebugUtils.currentLine=68485134;
 //BA.debugLineNum = 68485134;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=68485137;
 //BA.debugLineNum = 68485137;BA.debugLine="Private s3 As Cursor=B4XPages.MainPage.skmt.Exe";
_s3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_s3 = (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*/ .ExecQuery2("select * FROM PEDIDO WHERE PE_CLIENTE = ? and PE_RECALCULO <> ? OR PE_RECALCULO <> ? OR PE_RECALCULO IS NOT NULL",new String[]{__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE"),"","null"})));
RDebugUtils.currentLine=68485138;
 //BA.debugLineNum = 68485138;BA.debugLine="LogColor(s3.RowCount,Colors.Yellow)";
__c.LogImpl("068485138",BA.NumberToString(_s3.getRowCount()),__c.Colors.Yellow);
RDebugUtils.currentLine=68485139;
 //BA.debugLineNum = 68485139;BA.debugLine="If s3.RowCount > 0 Then";
if (_s3.getRowCount()>0) { 
RDebugUtils.currentLine=68485141;
 //BA.debugLineNum = 68485141;BA.debugLine="Private s As Cursor=B4XPages.MainPage.skmt.Exe";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_s = (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*/ .ExecQuery2("select iFNULL(sum(pe_costo_tot),0) as TOTAL_CLIE, IFNULL(SUM(PE_CANT),0) AS CANT_CLIE FROM PEDIDO WHERE PE_CLIENTE = ? and (PE_RECALCULO = ? or PE_RECALCULO = ? or PE_RECALCULO IS NULL ) AND PE_PROID NOT IN (SELECT CAT_PA_ID FROM PROMOS_COMP)",new String[]{__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE"),"","null"})));
RDebugUtils.currentLine=68485142;
 //BA.debugLineNum = 68485142;BA.debugLine="s.Position=0";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=68485143;
 //BA.debugLineNum = 68485143;BA.debugLine="Private s5 As Cursor = B4XPages.MainPage.skmt.";
_s5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_s5 = (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*/ .ExecQuery2("select iFNULL(sum(PE_RECALCULOTOT),0) as TOTAL_CLIE,  IFNULL(SUM(PE_CANT),0) AS CANT_CLIE FROM PEDIDO WHERE PE_CLIENTE = ? and (PE_RECALCULO <> ? or PE_RECALCULO <> ? OR PE_RECALCULO IS NOT NULL) AND PE_PROID NOT IN (SELECT CAT_PA_ID FROM PROMOS_COMP)",new String[]{__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE"),"","null"})));
RDebugUtils.currentLine=68485144;
 //BA.debugLineNum = 68485144;BA.debugLine="s5.Position = 0";
_s5.setPosition((int) (0));
RDebugUtils.currentLine=68485149;
 //BA.debugLineNum = 68485149;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=68485150;
 //BA.debugLineNum = 68485150;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=68485151;
 //BA.debugLineNum = 68485151;BA.debugLine="label1.TextSize = 20";
_label1.setTextSize((float) (20));
RDebugUtils.currentLine=68485152;
 //BA.debugLineNum = 68485152;BA.debugLine="label1.TextColor = Colors.White";
_label1.setTextColor(__c.Colors.White);
RDebugUtils.currentLine=68485153;
 //BA.debugLineNum = 68485153;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=68485154;
 //BA.debugLineNum = 68485154;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=68485155;
 //BA.debugLineNum = 68485155;BA.debugLine="label2.TextSize = 20";
_label2.setTextSize((float) (20));
RDebugUtils.currentLine=68485156;
 //BA.debugLineNum = 68485156;BA.debugLine="label2.TextColor = Colors.White";
_label2.setTextColor(__c.Colors.White);
RDebugUtils.currentLine=68485157;
 //BA.debugLineNum = 68485157;BA.debugLine="label1.Height = 25dip";
_label1.setHeight(__c.DipToCurrent((int) (25)));
RDebugUtils.currentLine=68485158;
 //BA.debugLineNum = 68485158;BA.debugLine="label2.Height = 60dip";
_label2.setHeight(__c.DipToCurrent((int) (60)));
RDebugUtils.currentLine=68485160;
 //BA.debugLineNum = 68485160;BA.debugLine="ListView1.TwoLinesLayout.ItemHeight = 95dip";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().setItemHeight(__c.DipToCurrent((int) (95)));
RDebugUtils.currentLine=68485161;
 //BA.debugLineNum = 68485161;BA.debugLine="label1.Typeface = Typeface.CreateNew(Typeface.";
_label1.setTypeface(__c.Typeface.CreateNew(__c.Typeface.DEFAULT_BOLD,__c.Typeface.STYLE_BOLD));
RDebugUtils.currentLine=68485162;
 //BA.debugLineNum = 68485162;BA.debugLine="label2.Typeface = Typeface.CreateNew(Typeface.";
_label2.setTypeface(__c.Typeface.CreateNew(__c.Typeface.DEFAULT_BOLD,__c.Typeface.STYLE_BOLD));
RDebugUtils.currentLine=68485163;
 //BA.debugLineNum = 68485163;BA.debugLine="Log(1)";
__c.LogImpl("068485163",BA.NumberToString(1),0);
RDebugUtils.currentLine=68485165;
 //BA.debugLineNum = 68485165;BA.debugLine="ListView1.AddTwoLines(c.GetString(\"PC_CLIENTE\"";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddTwoLines(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE")),BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("NOMBRE")+"   Cantidad #"+BA.NumberToString(((double)(Double.parseDouble(__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANT_CLIE")))+(double)(Double.parseDouble(_s5.GetString("CANT_CLIE")))))+" SubTotal $"+_subs._calculatotalconpromoxrango /*String*/ (ba,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE"))));
RDebugUtils.currentLine=68485166;
 //BA.debugLineNum = 68485166;BA.debugLine="s.Close";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }else 
{RDebugUtils.currentLine=68485167;
 //BA.debugLineNum = 68485167;BA.debugLine="Else If s3.RowCount = 0 Then";
if (_s3.getRowCount()==0) { 
RDebugUtils.currentLine=68485168;
 //BA.debugLineNum = 68485168;BA.debugLine="Private s As Cursor=B4XPages.MainPage.skmt.Exe";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_s = (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*/ .ExecQuery2("select iFNULL(sum(pe_costo_tot),0) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE FROM PEDIDO WHERE PE_CLIENTE = ?",new String[]{__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE")})));
RDebugUtils.currentLine=68485169;
 //BA.debugLineNum = 68485169;BA.debugLine="s.Position=0";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=68485171;
 //BA.debugLineNum = 68485171;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=68485172;
 //BA.debugLineNum = 68485172;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=68485173;
 //BA.debugLineNum = 68485173;BA.debugLine="label1.TextSize = 20";
_label1.setTextSize((float) (20));
RDebugUtils.currentLine=68485174;
 //BA.debugLineNum = 68485174;BA.debugLine="label1.TextColor = Colors.White";
_label1.setTextColor(__c.Colors.White);
RDebugUtils.currentLine=68485175;
 //BA.debugLineNum = 68485175;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=68485176;
 //BA.debugLineNum = 68485176;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=68485177;
 //BA.debugLineNum = 68485177;BA.debugLine="label2.TextSize = 20";
_label2.setTextSize((float) (20));
RDebugUtils.currentLine=68485178;
 //BA.debugLineNum = 68485178;BA.debugLine="label2.TextColor = Colors.White";
_label2.setTextColor(__c.Colors.White);
RDebugUtils.currentLine=68485179;
 //BA.debugLineNum = 68485179;BA.debugLine="label1.Height = 25dip";
_label1.setHeight(__c.DipToCurrent((int) (25)));
RDebugUtils.currentLine=68485180;
 //BA.debugLineNum = 68485180;BA.debugLine="label2.Height = 60dip";
_label2.setHeight(__c.DipToCurrent((int) (60)));
RDebugUtils.currentLine=68485182;
 //BA.debugLineNum = 68485182;BA.debugLine="ListView1.TwoLinesLayout.ItemHeight = 95dip";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().setItemHeight(__c.DipToCurrent((int) (95)));
RDebugUtils.currentLine=68485183;
 //BA.debugLineNum = 68485183;BA.debugLine="label1.Typeface = Typeface.CreateNew(Typeface.";
_label1.setTypeface(__c.Typeface.CreateNew(__c.Typeface.DEFAULT_BOLD,__c.Typeface.STYLE_BOLD));
RDebugUtils.currentLine=68485184;
 //BA.debugLineNum = 68485184;BA.debugLine="label2.Typeface = Typeface.CreateNew(Typeface.";
_label2.setTypeface(__c.Typeface.CreateNew(__c.Typeface.DEFAULT_BOLD,__c.Typeface.STYLE_BOLD));
RDebugUtils.currentLine=68485185;
 //BA.debugLineNum = 68485185;BA.debugLine="Log(2)";
__c.LogImpl("068485185",BA.NumberToString(2),0);
RDebugUtils.currentLine=68485186;
 //BA.debugLineNum = 68485186;BA.debugLine="ListView1.AddTwoLines(c.GetString(\"PC_CLIENTE\"";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddTwoLines(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE")),BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("NOMBRE")+"   Cantidad #"+__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANT_CLIE")+" SubTotal $"+_subs._calculatotalconpromoxrango /*String*/ (ba,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE"))));
RDebugUtils.currentLine=68485187;
 //BA.debugLineNum = 68485187;BA.debugLine="s.Close";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }}
;
 }
};
 };
RDebugUtils.currentLine=68485191;
 //BA.debugLineNum = 68485191;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=68485192;
 //BA.debugLineNum = 68485192;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_created(gunav2.keymon.com.mx.c_ticketsdia __ref,anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_ticketsdia";
if (Debug.shouldDelegate(ba, "b4xpage_created", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_created", new Object[] {_root1}));}
int _i = 0;
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
RDebugUtils.currentLine=68419584;
 //BA.debugLineNum = 68419584;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=68419585;
 //BA.debugLineNum = 68419585;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=68419587;
 //BA.debugLineNum = 68419587;BA.debugLine="ruta = File.DirInternal";
__ref._ruta /*String*/  = __c.File.getDirInternal();
RDebugUtils.currentLine=68419588;
 //BA.debugLineNum = 68419588;BA.debugLine="Root.LoadLayout(\"ticketsdia\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("ticketsdia",ba);
RDebugUtils.currentLine=68419590;
 //BA.debugLineNum = 68419590;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
if (__c.File.Exists(__ref._ruta /*String*/ ,"kmt.db")==__c.False) { 
RDebugUtils.currentLine=68419591;
 //BA.debugLineNum = 68419591;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", ruta, \"kmt.d";
__c.File.Copy(__c.File.getDirAssets(),"kmt.db",__ref._ruta /*String*/ ,"kmt.db");
 };
RDebugUtils.currentLine=68419593;
 //BA.debugLineNum = 68419593;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select PC_CLI";
__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 PC_CLIENTE,PC_MONTO,PC_NOART FROM PEDIDO_CLIENTE ORDER BY PC_FECHA asc")));
RDebugUtils.currentLine=68419594;
 //BA.debugLineNum = 68419594;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=68419595;
 //BA.debugLineNum = 68419595;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=68419596;
 //BA.debugLineNum = 68419596;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step10 = 1;
final int limit10 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit10 ;_i = _i + step10 ) {
RDebugUtils.currentLine=68419597;
 //BA.debugLineNum = 68419597;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=68419598;
 //BA.debugLineNum = 68419598;BA.debugLine="Dim Label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=68419599;
 //BA.debugLineNum = 68419599;BA.debugLine="Label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=68419600;
 //BA.debugLineNum = 68419600;BA.debugLine="Label1.TextSize = 20";
_label1.setTextSize((float) (20));
RDebugUtils.currentLine=68419601;
 //BA.debugLineNum = 68419601;BA.debugLine="Label1.TextColor = Colors.White";
_label1.setTextColor(__c.Colors.White);
RDebugUtils.currentLine=68419602;
 //BA.debugLineNum = 68419602;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=68419603;
 //BA.debugLineNum = 68419603;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=68419604;
 //BA.debugLineNum = 68419604;BA.debugLine="label2.TextSize = 20";
_label2.setTextSize((float) (20));
RDebugUtils.currentLine=68419605;
 //BA.debugLineNum = 68419605;BA.debugLine="label2.TextColor = Colors.White";
_label2.setTextColor(__c.Colors.White);
RDebugUtils.currentLine=68419606;
 //BA.debugLineNum = 68419606;BA.debugLine="Label1.Height = 25dip";
_label1.setHeight(__c.DipToCurrent((int) (25)));
RDebugUtils.currentLine=68419607;
 //BA.debugLineNum = 68419607;BA.debugLine="label2.Height = 60dip";
_label2.setHeight(__c.DipToCurrent((int) (60)));
RDebugUtils.currentLine=68419609;
 //BA.debugLineNum = 68419609;BA.debugLine="ListView1.TwoLinesLayout.ItemHeight = 95dip";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().setItemHeight(__c.DipToCurrent((int) (95)));
RDebugUtils.currentLine=68419610;
 //BA.debugLineNum = 68419610;BA.debugLine="Label1.Typeface = Typeface.CreateNew(Typeface.D";
_label1.setTypeface(__c.Typeface.CreateNew(__c.Typeface.DEFAULT_BOLD,__c.Typeface.STYLE_BOLD));
RDebugUtils.currentLine=68419611;
 //BA.debugLineNum = 68419611;BA.debugLine="label2.Typeface = Typeface.CreateNew(Typeface.D";
_label2.setTypeface(__c.Typeface.CreateNew(__c.Typeface.DEFAULT_BOLD,__c.Typeface.STYLE_BOLD));
RDebugUtils.currentLine=68419612;
 //BA.debugLineNum = 68419612;BA.debugLine="ListView1.AddTwoLines(c.GetString(\"PC_CLIENTE\")";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddTwoLines(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE")),BA.ObjectToCharSequence("Cantidad #"+__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_NOART")+" SubTotal $"+_subs._calculatotalconpromoxrango /*String*/ (ba,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE"))));
 }
};
 };
RDebugUtils.currentLine=68419615;
 //BA.debugLineNum = 68419615;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(gunav2.keymon.com.mx.c_ticketsdia __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_ticketsdia";
RDebugUtils.currentLine=68288512;
 //BA.debugLineNum = 68288512;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=68288513;
 //BA.debugLineNum = 68288513;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=68288514;
 //BA.debugLineNum = 68288514;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=68288515;
 //BA.debugLineNum = 68288515;BA.debugLine="Private p_ticketsdia As Panel";
_p_ticketsdia = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=68288517;
 //BA.debugLineNum = 68288517;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=68288518;
 //BA.debugLineNum = 68288518;BA.debugLine="Dim S As Cursor";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=68288519;
 //BA.debugLineNum = 68288519;BA.debugLine="Dim ruta As String";
_ruta = "";
RDebugUtils.currentLine=68288520;
 //BA.debugLineNum = 68288520;BA.debugLine="Dim ListView1 As ListView";
_listview1 = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=68288521;
 //BA.debugLineNum = 68288521;BA.debugLine="Dim b_noventa As Button";
_b_noventa = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=68288522;
 //BA.debugLineNum = 68288522;BA.debugLine="Dim nombre_boton As String";
_nombre_boton = "";
RDebugUtils.currentLine=68288523;
 //BA.debugLineNum = 68288523;BA.debugLine="Dim STIME As String";
_stime = "";
RDebugUtils.currentLine=68288525;
 //BA.debugLineNum = 68288525;BA.debugLine="Private L_ventanoventa As Label";
_l_ventanoventa = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=68288526;
 //BA.debugLineNum = 68288526;BA.debugLine="End Sub";
return "";
}
public String  _listview1_itemlongclick(gunav2.keymon.com.mx.c_ticketsdia __ref,int _position,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_ticketsdia";
if (Debug.shouldDelegate(ba, "listview1_itemlongclick", false))
	 {return ((String) Debug.delegate(ba, "listview1_itemlongclick", new Object[] {_position,_value}));}
RDebugUtils.currentLine=68681728;
 //BA.debugLineNum = 68681728;BA.debugLine="Sub ListView1_ItemLongClick (Position As Int, Valu";
RDebugUtils.currentLine=68681729;
 //BA.debugLineNum = 68681729;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CUENTAA");
RDebugUtils.currentLine=68681730;
 //BA.debugLineNum = 68681730;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{_value}));
RDebugUtils.currentLine=68681731;
 //BA.debugLineNum = 68681731;BA.debugLine="DateTime.TimeFormat = \"HHmmss\"";
__c.DateTime.setTimeFormat("HHmmss");
RDebugUtils.currentLine=68681732;
 //BA.debugLineNum = 68681732;BA.debugLine="STIME=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=68681733;
 //BA.debugLineNum = 68681733;BA.debugLine="s=B4XPages.MainPage.skmt.ExecQuery(\"SELECT COUNT(";
__ref._s /*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 CUANTOS FROM HIST_STAY_STORE WHERE HSS_IN = 0 AND HSS_CODIGO In (select cuenta from cuentaa)")));
RDebugUtils.currentLine=68681734;
 //BA.debugLineNum = 68681734;BA.debugLine="s.Position = 0";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=68681735;
 //BA.debugLineNum = 68681735;BA.debugLine="If s.GetString(\"CUANTOS\") = 1 Then";
if ((__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")).equals(BA.NumberToString(1))) { 
RDebugUtils.currentLine=68681736;
 //BA.debugLineNum = 68681736;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIS";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE HIST_STAY_STORE set HSS_IN = ?  where HSS_IN = 0 AND HSS_CODIGO In (select cuenta from cuentaa)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._stime /*String*/ )}));
 }else {
RDebugUtils.currentLine=68681738;
 //BA.debugLineNum = 68681738;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO HIST_STAY_STORE(HSS_CODIGO,  HSS_IN , HSS_OUT , HSS_TOT) VALUES (?,0,0,0)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{_value}));
RDebugUtils.currentLine=68681739;
 //BA.debugLineNum = 68681739;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIS";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE HIST_STAY_STORE set HSS_IN = ?  where HSS_IN = 0 AND HSS_CODIGO In (select cuenta from cuentaa)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._stime /*String*/ )}));
 };
RDebugUtils.currentLine=68681741;
 //BA.debugLineNum = 68681741;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
__c.DateTime.setTimeFormat("HH:mm:ss");
RDebugUtils.currentLine=68681742;
 //BA.debugLineNum = 68681742;BA.debugLine="B4XPages.ShowPage(\"cliente\")";
_b4xpages._showpage /*String*/ (ba,"cliente");
RDebugUtils.currentLine=68681743;
 //BA.debugLineNum = 68681743;BA.debugLine="End Sub";
return "";
}
public String  _p_ticketsdia_click(gunav2.keymon.com.mx.c_ticketsdia __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_ticketsdia";
if (Debug.shouldDelegate(ba, "p_ticketsdia_click", false))
	 {return ((String) Debug.delegate(ba, "p_ticketsdia_click", null));}
RDebugUtils.currentLine=68812800;
 //BA.debugLineNum = 68812800;BA.debugLine="Private Sub p_ticketsdia_Click";
RDebugUtils.currentLine=68812802;
 //BA.debugLineNum = 68812802;BA.debugLine="End Sub";
return "";
}
public String  _regresar_click(gunav2.keymon.com.mx.c_ticketsdia __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_ticketsdia";
if (Debug.shouldDelegate(ba, "regresar_click", false))
	 {return ((String) Debug.delegate(ba, "regresar_click", null));}
RDebugUtils.currentLine=68550656;
 //BA.debugLineNum = 68550656;BA.debugLine="Sub Regresar_Click";
RDebugUtils.currentLine=68550657;
 //BA.debugLineNum = 68550657;BA.debugLine="B4XPages.ShowPage(\"cliente\")";
_b4xpages._showpage /*String*/ (ba,"cliente");
RDebugUtils.currentLine=68550658;
 //BA.debugLineNum = 68550658;BA.debugLine="End Sub";
return "";
}
}