package SHARK2.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, "SHARK2.keymon.com.mx.c_ticketsdia");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", SHARK2.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 b4a.example.dateutils _dateutils = null;
public SHARK2.keymon.com.mx.main _main = null;
public SHARK2.keymon.com.mx.appupdater _appupdater = null;
public SHARK2.keymon.com.mx.mapa_cliente _mapa_cliente = null;
public SHARK2.keymon.com.mx.mapa_rutas _mapa_rutas = null;
public SHARK2.keymon.com.mx.notificationservice _notificationservice = null;
public SHARK2.keymon.com.mx.pendientes _pendientes = null;
public SHARK2.keymon.com.mx.starter _starter = null;
public SHARK2.keymon.com.mx.subs _subs = null;
public SHARK2.keymon.com.mx.tracker _tracker = null;
public SHARK2.keymon.com.mx.newinst2 _newinst2 = null;
public SHARK2.keymon.com.mx.b4xpages _b4xpages = null;
public SHARK2.keymon.com.mx.b4xcollections _b4xcollections = null;
public SHARK2.keymon.com.mx.httputils2service _httputils2service = null;
public SHARK2.keymon.com.mx.xuiviewsutils _xuiviewsutils = null;
public Object  _initialize(SHARK2.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=26083328;
 //BA.debugLineNum = 26083328;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=26083329;
 //BA.debugLineNum = 26083329;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=26083330;
 //BA.debugLineNum = 26083330;BA.debugLine="End Sub";
return null;
}
public boolean  _activity_keypress(SHARK2.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=26345472;
 //BA.debugLineNum = 26345472;BA.debugLine="Sub Activity_KeyPress (key As Int) As Boolean";
RDebugUtils.currentLine=26345474;
 //BA.debugLineNum = 26345474;BA.debugLine="If key=KeyCodes.KEYCODE_BACK Then";
if (_key==__c.KeyCodes.KEYCODE_BACK) { 
RDebugUtils.currentLine=26345476;
 //BA.debugLineNum = 26345476;BA.debugLine="B4XPages.ShowPage(\"principal\")";
_b4xpages._showpage /*String*/ (ba,"principal");
 };
RDebugUtils.currentLine=26345480;
 //BA.debugLineNum = 26345480;BA.debugLine="Return False";
if (true) return __c.False;
RDebugUtils.currentLine=26345481;
 //BA.debugLineNum = 26345481;BA.debugLine="End Sub";
return false;
}
public String  _b_noventa_click(SHARK2.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;
RDebugUtils.currentLine=26476544;
 //BA.debugLineNum = 26476544;BA.debugLine="Sub b_noventa_Click";
RDebugUtils.currentLine=26476545;
 //BA.debugLineNum = 26476545;BA.debugLine="If nombre_boton = \"NOVENTA\" Then";
if ((__ref._nombre_boton /*String*/ ).equals("NOVENTA")) { 
RDebugUtils.currentLine=26476546;
 //BA.debugLineNum = 26476546;BA.debugLine="nombre_boton = \"VENTA\"";
__ref._nombre_boton /*String*/  = "VENTA";
RDebugUtils.currentLine=26476547;
 //BA.debugLineNum = 26476547;BA.debugLine="b_noventa.Text =\"VENTA\"";
__ref._b_noventa /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setText(BA.ObjectToCharSequence("VENTA"));
RDebugUtils.currentLine=26476548;
 //BA.debugLineNum = 26476548;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select NV_CLIENTE,NV_MOTIVO,NV_COMM, (select CAT_CL_NOMBRE from kmt_info where cat_cl_codigo = NV_CLIENTE ) as NOMBRE FROM NOVENTA ORDER BY NV_CLIENTE asc")));
RDebugUtils.currentLine=26476549;
 //BA.debugLineNum = 26476549;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=26476550;
 //BA.debugLineNum = 26476550;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=26476551;
 //BA.debugLineNum = 26476551;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step7 = 1;
final int limit7 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit7 ;_i = _i + step7 ) {
RDebugUtils.currentLine=26476552;
 //BA.debugLineNum = 26476552;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=26476553;
 //BA.debugLineNum = 26476553;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=26476554;
 //BA.debugLineNum = 26476554;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=26476555;
 //BA.debugLineNum = 26476555;BA.debugLine="label1.TextSize = 15";
_label1.setTextSize((float) (15));
RDebugUtils.currentLine=26476556;
 //BA.debugLineNum = 26476556;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=26476557;
 //BA.debugLineNum = 26476557;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=26476558;
 //BA.debugLineNum = 26476558;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=26476559;
 //BA.debugLineNum = 26476559;BA.debugLine="label2.TextSize = 10";
_label2.setTextSize((float) (10));
RDebugUtils.currentLine=26476560;
 //BA.debugLineNum = 26476560;BA.debugLine="label2.TextColor = Colors.Blue";
_label2.setTextColor(__c.Colors.Blue);
RDebugUtils.currentLine=26476561;
 //BA.debugLineNum = 26476561;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=26476565;
 //BA.debugLineNum = 26476565;BA.debugLine="nombre_boton = \"NOVENTA\"";
__ref._nombre_boton /*String*/  = "NOVENTA";
RDebugUtils.currentLine=26476566;
 //BA.debugLineNum = 26476566;BA.debugLine="b_noventa.Text =\"NO VENTA\"";
__ref._b_noventa /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setText(BA.ObjectToCharSequence("NO VENTA"));
RDebugUtils.currentLine=26476567;
 //BA.debugLineNum = 26476567;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select PC_CLIENTE,PC_MONTO,PC_NOART,(select CAT_CL_NOMBRE from kmt_info where cat_cl_codigo = pc_cliente ) as NOMBRE FROM PEDIDO_CLIENTE ORDER BY PC_FECHA asc")));
RDebugUtils.currentLine=26476568;
 //BA.debugLineNum = 26476568;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=26476570;
 //BA.debugLineNum = 26476570;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=26476571;
 //BA.debugLineNum = 26476571;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step26 = 1;
final int limit26 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit26 ;_i = _i + step26 ) {
RDebugUtils.currentLine=26476572;
 //BA.debugLineNum = 26476572;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=26476573;
 //BA.debugLineNum = 26476573;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=26476574;
 //BA.debugLineNum = 26476574;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=26476575;
 //BA.debugLineNum = 26476575;BA.debugLine="label1.TextSize = 15";
_label1.setTextSize((float) (15));
RDebugUtils.currentLine=26476576;
 //BA.debugLineNum = 26476576;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=26476577;
 //BA.debugLineNum = 26476577;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=26476578;
 //BA.debugLineNum = 26476578;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=26476579;
 //BA.debugLineNum = 26476579;BA.debugLine="label2.TextSize = 10";
_label2.setTextSize((float) (10));
RDebugUtils.currentLine=26476580;
 //BA.debugLineNum = 26476580;BA.debugLine="label2.TextColor = Colors.Blue";
_label2.setTextColor(__c.Colors.Blue);
RDebugUtils.currentLine=26476581;
 //BA.debugLineNum = 26476581;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._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_NOART")+" SubTotal $"+__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_MONTO")));
 }
};
 };
RDebugUtils.currentLine=26476584;
 //BA.debugLineNum = 26476584;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 };
RDebugUtils.currentLine=26476586;
 //BA.debugLineNum = 26476586;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear(SHARK2.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 _noarticulos = 0;
int _i = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _x = null;
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
RDebugUtils.currentLine=26214400;
 //BA.debugLineNum = 26214400;BA.debugLine="Sub B4XPage_Appear";
RDebugUtils.currentLine=26214401;
 //BA.debugLineNum = 26214401;BA.debugLine="nombre_boton = \"NOVENTA\"";
__ref._nombre_boton /*String*/  = "NOVENTA";
RDebugUtils.currentLine=26214402;
 //BA.debugLineNum = 26214402;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select PC_CLIENTE,PC_MONTO,PC_NOART,(select CAT_CL_NOMBRE from kmt_info where cat_cl_codigo = pc_cliente UNION select CAT_CL_NOMBRE from kmt_info2 where cat_cl_codigo = pc_cliente ) as NOMBRE FROM PEDIDO_CLIENTE ORDER BY PC_FECHA asc")));
RDebugUtils.currentLine=26214403;
 //BA.debugLineNum = 26214403;BA.debugLine="Dim noArticulos As Int = 0";
_noarticulos = (int) (0);
RDebugUtils.currentLine=26214405;
 //BA.debugLineNum = 26214405;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=26214406;
 //BA.debugLineNum = 26214406;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=26214407;
 //BA.debugLineNum = 26214407;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step6 = 1;
final int limit6 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit6 ;_i = _i + step6 ) {
RDebugUtils.currentLine=26214408;
 //BA.debugLineNum = 26214408;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=26214409;
 //BA.debugLineNum = 26214409;BA.debugLine="Dim x As Cursor = B4XPages.MainPage.skmt.ExecQu";
_x = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_x = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select IFNULL(sum(IFNULL(PE_CANT,0)),0) as PC_NOART from PEDIDO where PE_CLIENTE = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE")))+"' AND PE_PROID NOT IN (SELECT CAT_PA_ID FROM PROMOS_COMP)"))));
RDebugUtils.currentLine=26214410;
 //BA.debugLineNum = 26214410;BA.debugLine="If x.RowCount > 0 Then";
if (_x.getRowCount()>0) { 
RDebugUtils.currentLine=26214411;
 //BA.debugLineNum = 26214411;BA.debugLine="x.Position = 0";
_x.setPosition((int) (0));
RDebugUtils.currentLine=26214413;
 //BA.debugLineNum = 26214413;BA.debugLine="noArticulos = x.GetString(\"PC_NOART\")";
_noarticulos = (int)(Double.parseDouble(_x.GetString("PC_NOART")));
 };
RDebugUtils.currentLine=26214415;
 //BA.debugLineNum = 26214415;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=26214416;
 //BA.debugLineNum = 26214416;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=26214417;
 //BA.debugLineNum = 26214417;BA.debugLine="label1.TextSize = 10";
_label1.setTextSize((float) (10));
RDebugUtils.currentLine=26214418;
 //BA.debugLineNum = 26214418;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=26214419;
 //BA.debugLineNum = 26214419;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=26214420;
 //BA.debugLineNum = 26214420;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=26214421;
 //BA.debugLineNum = 26214421;BA.debugLine="label2.TextSize = 13";
_label2.setTextSize((float) (13));
RDebugUtils.currentLine=26214422;
 //BA.debugLineNum = 26214422;BA.debugLine="label2.TextColor = Colors.Blue";
_label2.setTextColor(__c.Colors.Blue);
RDebugUtils.currentLine=26214423;
 //BA.debugLineNum = 26214423;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(_noarticulos)+" SubTotal $"+__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_MONTO")));
 }
};
 };
RDebugUtils.currentLine=26214426;
 //BA.debugLineNum = 26214426;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=26214427;
 //BA.debugLineNum = 26214427;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_created(SHARK2.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=26148864;
 //BA.debugLineNum = 26148864;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=26148865;
 //BA.debugLineNum = 26148865;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=26148867;
 //BA.debugLineNum = 26148867;BA.debugLine="ruta = File.DirInternal";
__ref._ruta /*String*/  = __c.File.getDirInternal();
RDebugUtils.currentLine=26148868;
 //BA.debugLineNum = 26148868;BA.debugLine="Root.LoadLayout(\"ticketsdia\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("ticketsdia",ba);
RDebugUtils.currentLine=26148869;
 //BA.debugLineNum = 26148869;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
if (__c.File.Exists(__ref._ruta /*String*/ ,"kmt.db")==__c.False) { 
RDebugUtils.currentLine=26148870;
 //BA.debugLineNum = 26148870;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=26148872;
 //BA.debugLineNum = 26148872;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"select PC_C";
__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 /*SHARK2.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=26148875;
 //BA.debugLineNum = 26148875;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=26148876;
 //BA.debugLineNum = 26148876;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=26148877;
 //BA.debugLineNum = 26148877;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=26148878;
 //BA.debugLineNum = 26148878;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=26148879;
 //BA.debugLineNum = 26148879;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=26148880;
 //BA.debugLineNum = 26148880;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=26148881;
 //BA.debugLineNum = 26148881;BA.debugLine="label1.TextSize = 10";
_label1.setTextSize((float) (10));
RDebugUtils.currentLine=26148882;
 //BA.debugLineNum = 26148882;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=26148883;
 //BA.debugLineNum = 26148883;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=26148884;
 //BA.debugLineNum = 26148884;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=26148885;
 //BA.debugLineNum = 26148885;BA.debugLine="label2.TextSize = 13";
_label2.setTextSize((float) (13));
RDebugUtils.currentLine=26148886;
 //BA.debugLineNum = 26148886;BA.debugLine="label2.TextColor = Colors.Blue";
_label2.setTextColor(__c.Colors.Blue);
RDebugUtils.currentLine=26148887;
 //BA.debugLineNum = 26148887;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 $"+__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_MONTO")));
 }
};
 };
RDebugUtils.currentLine=26148890;
 //BA.debugLineNum = 26148890;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(SHARK2.keymon.com.mx.c_ticketsdia __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_ticketsdia";
RDebugUtils.currentLine=26017792;
 //BA.debugLineNum = 26017792;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=26017793;
 //BA.debugLineNum = 26017793;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=26017794;
 //BA.debugLineNum = 26017794;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=26017795;
 //BA.debugLineNum = 26017795;BA.debugLine="Private p_ticketsdia As Panel";
_p_ticketsdia = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=26017797;
 //BA.debugLineNum = 26017797;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=26017798;
 //BA.debugLineNum = 26017798;BA.debugLine="Dim S As Cursor";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=26017799;
 //BA.debugLineNum = 26017799;BA.debugLine="Dim ruta As String";
_ruta = "";
RDebugUtils.currentLine=26017800;
 //BA.debugLineNum = 26017800;BA.debugLine="Dim ListView1 As ListView";
_listview1 = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=26017801;
 //BA.debugLineNum = 26017801;BA.debugLine="Dim b_noventa As Button";
_b_noventa = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=26017802;
 //BA.debugLineNum = 26017802;BA.debugLine="Dim nombre_boton As String";
_nombre_boton = "";
RDebugUtils.currentLine=26017803;
 //BA.debugLineNum = 26017803;BA.debugLine="Dim STIME As String";
_stime = "";
RDebugUtils.currentLine=26017804;
 //BA.debugLineNum = 26017804;BA.debugLine="End Sub";
return "";
}
public String  _listview1_itemlongclick(SHARK2.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=26411008;
 //BA.debugLineNum = 26411008;BA.debugLine="Sub ListView1_ItemLongClick (Position As Int, Valu";
RDebugUtils.currentLine=26411009;
 //BA.debugLineNum = 26411009;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CUENTAA");
RDebugUtils.currentLine=26411010;
 //BA.debugLineNum = 26411010;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
_b4xpages._mainpage /*SHARK2.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=26411011;
 //BA.debugLineNum = 26411011;BA.debugLine="DateTime.TimeFormat = \"HHmmss\"";
__c.DateTime.setTimeFormat("HHmmss");
RDebugUtils.currentLine=26411012;
 //BA.debugLineNum = 26411012;BA.debugLine="STIME=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=26411013;
 //BA.debugLineNum = 26411013;BA.debugLine="Starter.pre_viejo = Subs.traeTotalClientepreventa";
_starter._pre_viejo /*float*/  = (float) (_subs._traetotalclientepreventaparacredito /*double*/ (ba));
RDebugUtils.currentLine=26411014;
 //BA.debugLineNum = 26411014;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 /*SHARK2.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=26411015;
 //BA.debugLineNum = 26411015;BA.debugLine="s.Position = 0";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=26411016;
 //BA.debugLineNum = 26411016;BA.debugLine="If s.GetString(\"CUANTOS\") = 1 Then";
if ((__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")).equals(BA.NumberToString(1))) { 
RDebugUtils.currentLine=26411017;
 //BA.debugLineNum = 26411017;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIS";
_b4xpages._mainpage /*SHARK2.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=26411019;
 //BA.debugLineNum = 26411019;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*SHARK2.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=26411020;
 //BA.debugLineNum = 26411020;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIS";
_b4xpages._mainpage /*SHARK2.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=26411022;
 //BA.debugLineNum = 26411022;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
__c.DateTime.setTimeFormat("HH:mm:ss");
RDebugUtils.currentLine=26411023;
 //BA.debugLineNum = 26411023;BA.debugLine="Subs.guardaClienteHoraInicio(Value)";
_subs._guardaclientehorainicio /*String*/ (ba,BA.ObjectToString(_value));
RDebugUtils.currentLine=26411024;
 //BA.debugLineNum = 26411024;BA.debugLine="B4XPages.MainPage.cliente.venimosDeTicketsDia = T";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*SHARK2.keymon.com.mx.c_cliente*/ ._venimosdeticketsdia /*boolean*/  = __c.True;
RDebugUtils.currentLine=26411025;
 //BA.debugLineNum = 26411025;BA.debugLine="B4XPages.ShowPage(\"cliente\")";
_b4xpages._showpage /*String*/ (ba,"cliente");
RDebugUtils.currentLine=26411026;
 //BA.debugLineNum = 26411026;BA.debugLine="End Sub";
return "";
}
public String  _p_ticketsdia_click(SHARK2.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=26542080;
 //BA.debugLineNum = 26542080;BA.debugLine="Private Sub p_ticketsdia_Click";
RDebugUtils.currentLine=26542082;
 //BA.debugLineNum = 26542082;BA.debugLine="End Sub";
return "";
}
public String  _regresar_click(SHARK2.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=26279936;
 //BA.debugLineNum = 26279936;BA.debugLine="Sub Regresar_Click";
RDebugUtils.currentLine=26279937;
 //BA.debugLineNum = 26279937;BA.debugLine="B4XPages.ShowPage(\"cliente\")";
_b4xpages._showpage /*String*/ (ba,"cliente");
RDebugUtils.currentLine=26279938;
 //BA.debugLineNum = 26279938;BA.debugLine="End Sub";
return "";
}
}