package SHARK2.keymon.com.mx;

import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.*;

public class c_ticketsdia_subs_0 {


public static RemoteObject  _activity_keypress(RemoteObject __ref,RemoteObject _key) throws Exception{
try {
		Debug.PushSubsStack("Activity_KeyPress (c_ticketsdia) ","c_ticketsdia",19,__ref.getField(false, "ba"),__ref,83);
if (RapidSub.canDelegate("activity_keypress")) { return __ref.runUserSub(false, "c_ticketsdia","activity_keypress", __ref, _key);}
Debug.locals.put("key", _key);
 BA.debugLineNum = 83;BA.debugLine="Sub Activity_KeyPress (key As Int) As Boolean";
Debug.ShouldStop(262144);
 BA.debugLineNum = 85;BA.debugLine="If key=KeyCodes.KEYCODE_BACK Then";
Debug.ShouldStop(1048576);
if (RemoteObject.solveBoolean("=",_key,BA.numberCast(double.class, c_ticketsdia.__c.getField(false,"KeyCodes").getField(true,"KEYCODE_BACK")))) { 
 BA.debugLineNum = 87;BA.debugLine="B4XPages.ShowPage(\"principal\")";
Debug.ShouldStop(4194304);
c_ticketsdia._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("principal")));
 };
 BA.debugLineNum = 91;BA.debugLine="Return False";
Debug.ShouldStop(67108864);
if (true) return c_ticketsdia.__c.getField(true,"False");
 BA.debugLineNum = 92;BA.debugLine="End Sub";
Debug.ShouldStop(134217728);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _b_noventa_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("b_noventa_Click (c_ticketsdia) ","c_ticketsdia",19,__ref.getField(false, "ba"),__ref,113);
if (RapidSub.canDelegate("b_noventa_click")) { return __ref.runUserSub(false, "c_ticketsdia","b_noventa_click", __ref);}
int _i = 0;
RemoteObject _label1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
RemoteObject _label2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
 BA.debugLineNum = 113;BA.debugLine="Sub b_noventa_Click";
Debug.ShouldStop(65536);
 BA.debugLineNum = 114;BA.debugLine="If nombre_boton = \"NOVENTA\" Then";
Debug.ShouldStop(131072);
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_nombre_boton" /*RemoteObject*/ ),BA.ObjectToString("NOVENTA"))) { 
 BA.debugLineNum = 115;BA.debugLine="nombre_boton = \"VENTA\"";
Debug.ShouldStop(262144);
__ref.setField ("_nombre_boton" /*RemoteObject*/ ,BA.ObjectToString("VENTA"));
 BA.debugLineNum = 116;BA.debugLine="b_noventa.Text =\"VENTA\"";
Debug.ShouldStop(524288);
__ref.getField(false,"_b_noventa" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence("VENTA"));
 BA.debugLineNum = 117;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select NV_CL";
Debug.ShouldStop(1048576);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_ticketsdia._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("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"))));
 BA.debugLineNum = 118;BA.debugLine="ListView1.Clear";
Debug.ShouldStop(2097152);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("Clear");
 BA.debugLineNum = 119;BA.debugLine="If c.RowCount>0 Then";
Debug.ShouldStop(4194304);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 120;BA.debugLine="For i=0 To c.RowCount -1";
Debug.ShouldStop(8388608);
{
final int step7 = 1;
final int limit7 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step7 > 0 && _i <= limit7) || (step7 < 0 && _i >= limit7) ;_i = ((int)(0 + _i + step7))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 121;BA.debugLine="c.Position=i";
Debug.ShouldStop(16777216);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 122;BA.debugLine="Dim label1 As Label";
Debug.ShouldStop(33554432);
_label1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 123;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
Debug.ShouldStop(67108864);
_label1 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"Label");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 124;BA.debugLine="label1.TextSize = 15";
Debug.ShouldStop(134217728);
_label1.runMethod(true,"setTextSize",BA.numberCast(float.class, 15));
 BA.debugLineNum = 125;BA.debugLine="label1.TextColor = Colors.Black";
Debug.ShouldStop(268435456);
_label1.runMethod(true,"setTextColor",c_ticketsdia.__c.getField(false,"Colors").getField(true,"Black"));
 BA.debugLineNum = 126;BA.debugLine="Dim label2 As Label";
Debug.ShouldStop(536870912);
_label2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 127;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
Debug.ShouldStop(1073741824);
_label2 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"SecondLabel");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 128;BA.debugLine="label2.TextSize = 10";
Debug.ShouldStop(-2147483648);
_label2.runMethod(true,"setTextSize",BA.numberCast(float.class, 10));
 BA.debugLineNum = 129;BA.debugLine="label2.TextColor = Colors.Blue";
Debug.ShouldStop(1);
_label2.runMethod(true,"setTextColor",c_ticketsdia.__c.getField(false,"Colors").getField(true,"Blue"));
 BA.debugLineNum = 130;BA.debugLine="ListView1.AddTwoLines(c.GetString(\"NV_CLIENTE\"";
Debug.ShouldStop(2);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("AddTwoLines",(Object)(BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_CLIENTE"))))),(Object)(BA.ObjectToCharSequence(RemoteObject.concat(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NOMBRE"))),RemoteObject.createImmutable("  Motivo #"),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_MOTIVO"))),RemoteObject.createImmutable(" Comentario $"),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_COMM")))))));
 }
}Debug.locals.put("i", _i);
;
 };
 }else {
 BA.debugLineNum = 134;BA.debugLine="nombre_boton = \"NOVENTA\"";
Debug.ShouldStop(32);
__ref.setField ("_nombre_boton" /*RemoteObject*/ ,BA.ObjectToString("NOVENTA"));
 BA.debugLineNum = 135;BA.debugLine="b_noventa.Text =\"NO VENTA\"";
Debug.ShouldStop(64);
__ref.getField(false,"_b_noventa" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence("NO VENTA"));
 BA.debugLineNum = 136;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select PC_CL";
Debug.ShouldStop(128);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_ticketsdia._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("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"))));
 BA.debugLineNum = 137;BA.debugLine="ListView1.Clear";
Debug.ShouldStop(256);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("Clear");
 BA.debugLineNum = 139;BA.debugLine="If c.RowCount>0 Then";
Debug.ShouldStop(1024);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 140;BA.debugLine="For i=0 To c.RowCount -1";
Debug.ShouldStop(2048);
{
final int step26 = 1;
final int limit26 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step26 > 0 && _i <= limit26) || (step26 < 0 && _i >= limit26) ;_i = ((int)(0 + _i + step26))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 141;BA.debugLine="c.Position=i";
Debug.ShouldStop(4096);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 142;BA.debugLine="Dim label1 As Label";
Debug.ShouldStop(8192);
_label1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 143;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
Debug.ShouldStop(16384);
_label1 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"Label");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 144;BA.debugLine="label1.TextSize = 15";
Debug.ShouldStop(32768);
_label1.runMethod(true,"setTextSize",BA.numberCast(float.class, 15));
 BA.debugLineNum = 145;BA.debugLine="label1.TextColor = Colors.Black";
Debug.ShouldStop(65536);
_label1.runMethod(true,"setTextColor",c_ticketsdia.__c.getField(false,"Colors").getField(true,"Black"));
 BA.debugLineNum = 146;BA.debugLine="Dim label2 As Label";
Debug.ShouldStop(131072);
_label2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 147;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
Debug.ShouldStop(262144);
_label2 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"SecondLabel");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 148;BA.debugLine="label2.TextSize = 10";
Debug.ShouldStop(524288);
_label2.runMethod(true,"setTextSize",BA.numberCast(float.class, 10));
 BA.debugLineNum = 149;BA.debugLine="label2.TextColor = Colors.Blue";
Debug.ShouldStop(1048576);
_label2.runMethod(true,"setTextColor",c_ticketsdia.__c.getField(false,"Colors").getField(true,"Blue"));
 BA.debugLineNum = 150;BA.debugLine="ListView1.AddTwoLines(c.GetString(\"PC_CLIENTE\"";
Debug.ShouldStop(2097152);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("AddTwoLines",(Object)(BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PC_CLIENTE"))))),(Object)(BA.ObjectToCharSequence(RemoteObject.concat(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NOMBRE"))),RemoteObject.createImmutable("   Cantidad #"),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PC_NOART"))),RemoteObject.createImmutable(" SubTotal $"),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PC_MONTO")))))));
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 153;BA.debugLine="c.Close";
Debug.ShouldStop(16777216);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 };
 BA.debugLineNum = 155;BA.debugLine="End Sub";
Debug.ShouldStop(67108864);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _b4xpage_appear(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_Appear (c_ticketsdia) ","c_ticketsdia",19,__ref.getField(false, "ba"),__ref,51);
if (RapidSub.canDelegate("b4xpage_appear")) { return __ref.runUserSub(false, "c_ticketsdia","b4xpage_appear", __ref);}
RemoteObject _noarticulos = RemoteObject.createImmutable(0);
int _i = 0;
RemoteObject _x = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _label1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
RemoteObject _label2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
 BA.debugLineNum = 51;BA.debugLine="Sub B4XPage_Appear";
Debug.ShouldStop(262144);
 BA.debugLineNum = 52;BA.debugLine="nombre_boton = \"NOVENTA\"";
Debug.ShouldStop(524288);
__ref.setField ("_nombre_boton" /*RemoteObject*/ ,BA.ObjectToString("NOVENTA"));
 BA.debugLineNum = 53;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select PC_CLI";
Debug.ShouldStop(1048576);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_ticketsdia._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("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"))));
 BA.debugLineNum = 54;BA.debugLine="Dim noArticulos As Int = 0";
Debug.ShouldStop(2097152);
_noarticulos = BA.numberCast(int.class, 0);Debug.locals.put("noArticulos", _noarticulos);Debug.locals.put("noArticulos", _noarticulos);
 BA.debugLineNum = 56;BA.debugLine="ListView1.Clear";
Debug.ShouldStop(8388608);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("Clear");
 BA.debugLineNum = 57;BA.debugLine="If c.RowCount>0 Then";
Debug.ShouldStop(16777216);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 58;BA.debugLine="For i=0 To c.RowCount -1";
Debug.ShouldStop(33554432);
{
final int step6 = 1;
final int limit6 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step6 > 0 && _i <= limit6) || (step6 < 0 && _i >= limit6) ;_i = ((int)(0 + _i + step6))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 59;BA.debugLine="c.Position=i";
Debug.ShouldStop(67108864);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 60;BA.debugLine="Dim x As Cursor = B4XPages.MainPage.skmt.ExecQu";
Debug.ShouldStop(134217728);
_x = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_x = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), c_ticketsdia._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select IFNULL(sum(IFNULL(PE_CANT,0)),0) as PC_NOART from PEDIDO where PE_CLIENTE = '"),c_ticketsdia.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PC_CLIENTE")))))),RemoteObject.createImmutable("' AND PE_PROID NOT IN (SELECT CAT_PA_ID FROM PROMOS_COMP)"))))));Debug.locals.put("x", _x);Debug.locals.put("x", _x);
 BA.debugLineNum = 61;BA.debugLine="If x.RowCount > 0 Then";
Debug.ShouldStop(268435456);
if (RemoteObject.solveBoolean(">",_x.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 62;BA.debugLine="x.Position = 0";
Debug.ShouldStop(536870912);
_x.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 64;BA.debugLine="noArticulos = x.GetString(\"PC_NOART\")";
Debug.ShouldStop(-2147483648);
_noarticulos = BA.numberCast(int.class, _x.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PC_NOART"))));Debug.locals.put("noArticulos", _noarticulos);
 };
 BA.debugLineNum = 66;BA.debugLine="Dim label1 As Label";
Debug.ShouldStop(2);
_label1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 67;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
Debug.ShouldStop(4);
_label1 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"Label");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 68;BA.debugLine="label1.TextSize = 10";
Debug.ShouldStop(8);
_label1.runMethod(true,"setTextSize",BA.numberCast(float.class, 10));
 BA.debugLineNum = 69;BA.debugLine="label1.TextColor = Colors.Black";
Debug.ShouldStop(16);
_label1.runMethod(true,"setTextColor",c_ticketsdia.__c.getField(false,"Colors").getField(true,"Black"));
 BA.debugLineNum = 70;BA.debugLine="Dim label2 As Label";
Debug.ShouldStop(32);
_label2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 71;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
Debug.ShouldStop(64);
_label2 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"SecondLabel");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 72;BA.debugLine="label2.TextSize = 13";
Debug.ShouldStop(128);
_label2.runMethod(true,"setTextSize",BA.numberCast(float.class, 13));
 BA.debugLineNum = 73;BA.debugLine="label2.TextColor = Colors.Blue";
Debug.ShouldStop(256);
_label2.runMethod(true,"setTextColor",c_ticketsdia.__c.getField(false,"Colors").getField(true,"Blue"));
 BA.debugLineNum = 74;BA.debugLine="ListView1.AddTwoLines(c.GetString(\"PC_CLIENTE\")";
Debug.ShouldStop(512);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("AddTwoLines",(Object)(BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PC_CLIENTE"))))),(Object)(BA.ObjectToCharSequence(RemoteObject.concat(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NOMBRE"))),RemoteObject.createImmutable("   Cantidad #"),_noarticulos,RemoteObject.createImmutable(" SubTotal $"),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PC_MONTO")))))));
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 77;BA.debugLine="c.Close";
Debug.ShouldStop(4096);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 78;BA.debugLine="End Sub";
Debug.ShouldStop(8192);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _b4xpage_created(RemoteObject __ref,RemoteObject _root1) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_Created (c_ticketsdia) ","c_ticketsdia",19,__ref.getField(false, "ba"),__ref,21);
if (RapidSub.canDelegate("b4xpage_created")) { return __ref.runUserSub(false, "c_ticketsdia","b4xpage_created", __ref, _root1);}
int _i = 0;
RemoteObject _label1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
RemoteObject _label2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
Debug.locals.put("Root1", _root1);
 BA.debugLineNum = 21;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
Debug.ShouldStop(1048576);
 BA.debugLineNum = 22;BA.debugLine="Root = Root1";
Debug.ShouldStop(2097152);
__ref.setField ("_root" /*RemoteObject*/ ,_root1);
 BA.debugLineNum = 24;BA.debugLine="ruta = File.DirInternal";
Debug.ShouldStop(8388608);
__ref.setField ("_ruta" /*RemoteObject*/ ,c_ticketsdia.__c.getField(false,"File").runMethod(true,"getDirInternal"));
 BA.debugLineNum = 25;BA.debugLine="Root.LoadLayout(\"ticketsdia\")";
Debug.ShouldStop(16777216);
__ref.getField(false,"_root" /*RemoteObject*/ ).runVoidMethodAndSync ("LoadLayout",(Object)(RemoteObject.createImmutable("ticketsdia")),__ref.getField(false, "ba"));
 BA.debugLineNum = 26;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
Debug.ShouldStop(33554432);
if (RemoteObject.solveBoolean("=",c_ticketsdia.__c.getField(false,"File").runMethod(true,"Exists",(Object)(__ref.getField(true,"_ruta" /*RemoteObject*/ )),(Object)(RemoteObject.createImmutable("kmt.db"))),c_ticketsdia.__c.getField(true,"False"))) { 
 BA.debugLineNum = 27;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", ruta, \"kmt.d";
Debug.ShouldStop(67108864);
c_ticketsdia.__c.getField(false,"File").runVoidMethod ("Copy",(Object)(c_ticketsdia.__c.getField(false,"File").runMethod(true,"getDirAssets")),(Object)(BA.ObjectToString("kmt.db")),(Object)(__ref.getField(true,"_ruta" /*RemoteObject*/ )),(Object)(RemoteObject.createImmutable("kmt.db")));
 };
 BA.debugLineNum = 29;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"select PC_C";
Debug.ShouldStop(268435456);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_ticketsdia._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select PC_CLIENTE,PC_MONTO,PC_NOART FROM PEDIDO_CLIENTE ORDER BY PC_FECHA asc"))));
 BA.debugLineNum = 32;BA.debugLine="ListView1.Clear";
Debug.ShouldStop(-2147483648);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("Clear");
 BA.debugLineNum = 33;BA.debugLine="If c.RowCount>0 Then";
Debug.ShouldStop(1);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 34;BA.debugLine="For i=0 To c.RowCount -1";
Debug.ShouldStop(2);
{
final int step10 = 1;
final int limit10 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step10 > 0 && _i <= limit10) || (step10 < 0 && _i >= limit10) ;_i = ((int)(0 + _i + step10))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 35;BA.debugLine="c.Position=i";
Debug.ShouldStop(4);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 36;BA.debugLine="Dim label1 As Label";
Debug.ShouldStop(8);
_label1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 37;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
Debug.ShouldStop(16);
_label1 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"Label");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 38;BA.debugLine="label1.TextSize = 10";
Debug.ShouldStop(32);
_label1.runMethod(true,"setTextSize",BA.numberCast(float.class, 10));
 BA.debugLineNum = 39;BA.debugLine="label1.TextColor = Colors.Black";
Debug.ShouldStop(64);
_label1.runMethod(true,"setTextColor",c_ticketsdia.__c.getField(false,"Colors").getField(true,"Black"));
 BA.debugLineNum = 40;BA.debugLine="Dim label2 As Label";
Debug.ShouldStop(128);
_label2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 41;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
Debug.ShouldStop(256);
_label2 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"SecondLabel");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 42;BA.debugLine="label2.TextSize = 13";
Debug.ShouldStop(512);
_label2.runMethod(true,"setTextSize",BA.numberCast(float.class, 13));
 BA.debugLineNum = 43;BA.debugLine="label2.TextColor = Colors.Blue";
Debug.ShouldStop(1024);
_label2.runMethod(true,"setTextColor",c_ticketsdia.__c.getField(false,"Colors").getField(true,"Blue"));
 BA.debugLineNum = 44;BA.debugLine="ListView1.AddTwoLines(c.GetString(\"PC_CLIENTE\")";
Debug.ShouldStop(2048);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("AddTwoLines",(Object)(BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PC_CLIENTE"))))),(Object)(BA.ObjectToCharSequence(RemoteObject.concat(RemoteObject.createImmutable("Cantidad #"),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PC_NOART"))),RemoteObject.createImmutable(" SubTotal $"),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PC_MONTO")))))));
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 47;BA.debugLine="End Sub";
Debug.ShouldStop(16384);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _class_globals(RemoteObject __ref) throws Exception{
 //BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 2;BA.debugLine="Private Root As B4XView 'ignore";
c_ticketsdia._root = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");__ref.setField("_root",c_ticketsdia._root);
 //BA.debugLineNum = 3;BA.debugLine="Private xui As XUI 'ignore";
c_ticketsdia._xui = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper.XUI");__ref.setField("_xui",c_ticketsdia._xui);
 //BA.debugLineNum = 4;BA.debugLine="Private p_ticketsdia As Panel";
c_ticketsdia._p_ticketsdia = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");__ref.setField("_p_ticketsdia",c_ticketsdia._p_ticketsdia);
 //BA.debugLineNum = 6;BA.debugLine="Dim c As Cursor";
c_ticketsdia._c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");__ref.setField("_c",c_ticketsdia._c);
 //BA.debugLineNum = 7;BA.debugLine="Dim S As Cursor";
c_ticketsdia._s = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");__ref.setField("_s",c_ticketsdia._s);
 //BA.debugLineNum = 8;BA.debugLine="Dim ruta As String";
c_ticketsdia._ruta = RemoteObject.createImmutable("");__ref.setField("_ruta",c_ticketsdia._ruta);
 //BA.debugLineNum = 9;BA.debugLine="Dim ListView1 As ListView";
c_ticketsdia._listview1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.ListViewWrapper");__ref.setField("_listview1",c_ticketsdia._listview1);
 //BA.debugLineNum = 10;BA.debugLine="Dim b_noventa As Button";
c_ticketsdia._b_noventa = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_b_noventa",c_ticketsdia._b_noventa);
 //BA.debugLineNum = 11;BA.debugLine="Dim nombre_boton As String";
c_ticketsdia._nombre_boton = RemoteObject.createImmutable("");__ref.setField("_nombre_boton",c_ticketsdia._nombre_boton);
 //BA.debugLineNum = 12;BA.debugLine="Dim STIME As String";
c_ticketsdia._stime = RemoteObject.createImmutable("");__ref.setField("_stime",c_ticketsdia._stime);
 //BA.debugLineNum = 13;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _initialize(RemoteObject __ref,RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("Initialize (c_ticketsdia) ","c_ticketsdia",19,__ref.getField(false, "ba"),__ref,16);
if (RapidSub.canDelegate("initialize")) { return __ref.runUserSub(false, "c_ticketsdia","initialize", __ref, _ba);}
__ref.runVoidMethodAndSync("innerInitializeHelper", _ba);
Debug.locals.put("ba", _ba);
 BA.debugLineNum = 16;BA.debugLine="Public Sub Initialize As Object";
Debug.ShouldStop(32768);
 BA.debugLineNum = 17;BA.debugLine="Return Me";
Debug.ShouldStop(65536);
if (true) return __ref;
 BA.debugLineNum = 18;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _listview1_itemlongclick(RemoteObject __ref,RemoteObject _position,RemoteObject _value) throws Exception{
try {
		Debug.PushSubsStack("ListView1_ItemLongClick (c_ticketsdia) ","c_ticketsdia",19,__ref.getField(false, "ba"),__ref,93);
if (RapidSub.canDelegate("listview1_itemlongclick")) { return __ref.runUserSub(false, "c_ticketsdia","listview1_itemlongclick", __ref, _position, _value);}
Debug.locals.put("Position", _position);
Debug.locals.put("Value", _value);
 BA.debugLineNum = 93;BA.debugLine="Sub ListView1_ItemLongClick (Position As Int, Valu";
Debug.ShouldStop(268435456);
 BA.debugLineNum = 94;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
Debug.ShouldStop(536870912);
c_ticketsdia._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from CUENTAA")));
 BA.debugLineNum = 95;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
Debug.ShouldStop(1073741824);
c_ticketsdia._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO CUENTAA VALUES (?)")),(Object)(c_ticketsdia.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {_value})))));
 BA.debugLineNum = 96;BA.debugLine="DateTime.TimeFormat = \"HHmmss\"";
Debug.ShouldStop(-2147483648);
c_ticketsdia.__c.getField(false,"DateTime").runMethod(true,"setTimeFormat",BA.ObjectToString("HHmmss"));
 BA.debugLineNum = 97;BA.debugLine="STIME=DateTime.Time(DateTime.Now)";
Debug.ShouldStop(1);
__ref.setField ("_stime" /*RemoteObject*/ ,c_ticketsdia.__c.getField(false,"DateTime").runMethod(true,"Time",(Object)(c_ticketsdia.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 98;BA.debugLine="Starter.pre_viejo = Subs.traeTotalClientepreventa";
Debug.ShouldStop(2);
c_ticketsdia._starter._pre_viejo /*RemoteObject*/  = BA.numberCast(float.class, c_ticketsdia._subs.runMethod(true,"_traetotalclientepreventaparacredito" /*RemoteObject*/ ,__ref.getField(false, "ba")));
 BA.debugLineNum = 99;BA.debugLine="s=B4XPages.MainPage.skmt.ExecQuery(\"SELECT COUNT(";
Debug.ShouldStop(4);
__ref.getField(false,"_s" /*RemoteObject*/ ).setObject (c_ticketsdia._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("SELECT COUNT(*) AS CUANTOS FROM HIST_STAY_STORE WHERE HSS_IN = 0 AND HSS_CODIGO In (select cuenta from cuentaa)"))));
 BA.debugLineNum = 100;BA.debugLine="s.Position = 0";
Debug.ShouldStop(8);
__ref.getField(false,"_s" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 101;BA.debugLine="If s.GetString(\"CUANTOS\") = 1 Then";
Debug.ShouldStop(16);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_s" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUANTOS"))),BA.NumberToString(1))) { 
 BA.debugLineNum = 102;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIS";
Debug.ShouldStop(32);
c_ticketsdia._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("UPDATE HIST_STAY_STORE set HSS_IN = ?  where HSS_IN = 0 AND HSS_CODIGO In (select cuenta from cuentaa)")),(Object)(c_ticketsdia.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(__ref.getField(true,"_stime" /*RemoteObject*/ ))})))));
 }else {
 BA.debugLineNum = 104;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
Debug.ShouldStop(128);
c_ticketsdia._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO HIST_STAY_STORE(HSS_CODIGO,  HSS_IN , HSS_OUT , HSS_TOT) VALUES (?,0,0,0)")),(Object)(c_ticketsdia.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {_value})))));
 BA.debugLineNum = 105;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIS";
Debug.ShouldStop(256);
c_ticketsdia._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("UPDATE HIST_STAY_STORE set HSS_IN = ?  where HSS_IN = 0 AND HSS_CODIGO In (select cuenta from cuentaa)")),(Object)(c_ticketsdia.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(__ref.getField(true,"_stime" /*RemoteObject*/ ))})))));
 };
 BA.debugLineNum = 107;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
Debug.ShouldStop(1024);
c_ticketsdia.__c.getField(false,"DateTime").runMethod(true,"setTimeFormat",BA.ObjectToString("HH:mm:ss"));
 BA.debugLineNum = 108;BA.debugLine="Subs.guardaClienteHoraInicio(Value)";
Debug.ShouldStop(2048);
c_ticketsdia._subs.runVoidMethod ("_guardaclientehorainicio" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString(_value)));
 BA.debugLineNum = 109;BA.debugLine="B4XPages.MainPage.cliente.venimosDeTicketsDia = T";
Debug.ShouldStop(4096);
c_ticketsdia._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_cliente" /*RemoteObject*/ ).setField ("_venimosdeticketsdia" /*RemoteObject*/ ,c_ticketsdia.__c.getField(true,"True"));
 BA.debugLineNum = 110;BA.debugLine="B4XPages.ShowPage(\"cliente\")";
Debug.ShouldStop(8192);
c_ticketsdia._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("cliente")));
 BA.debugLineNum = 111;BA.debugLine="End Sub";
Debug.ShouldStop(16384);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _p_ticketsdia_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("p_ticketsdia_Click (c_ticketsdia) ","c_ticketsdia",19,__ref.getField(false, "ba"),__ref,157);
if (RapidSub.canDelegate("p_ticketsdia_click")) { return __ref.runUserSub(false, "c_ticketsdia","p_ticketsdia_click", __ref);}
 BA.debugLineNum = 157;BA.debugLine="Private Sub p_ticketsdia_Click";
Debug.ShouldStop(268435456);
 BA.debugLineNum = 159;BA.debugLine="End Sub";
Debug.ShouldStop(1073741824);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _regresar_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("Regresar_Click (c_ticketsdia) ","c_ticketsdia",19,__ref.getField(false, "ba"),__ref,80);
if (RapidSub.canDelegate("regresar_click")) { return __ref.runUserSub(false, "c_ticketsdia","regresar_click", __ref);}
 BA.debugLineNum = 80;BA.debugLine="Sub Regresar_Click";
Debug.ShouldStop(32768);
 BA.debugLineNum = 81;BA.debugLine="B4XPages.ShowPage(\"cliente\")";
Debug.ShouldStop(65536);
c_ticketsdia._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("cliente")));
 BA.debugLineNum = 82;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}