package keymon.lat.medicomed;


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

public class c_productos 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, "keymon.lat.medicomed.c_productos");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", keymon.lat.medicomed.c_productos.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 String _ruta = "";
public String _q_buscar = "";
public boolean _forzarbusqueda = false;
public anywheresoftware.b4a.sql.SQL _skmt = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c2 = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c3 = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _s = null;
public anywheresoftware.b4a.objects.ListViewWrapper _lv_catalogos = null;
public anywheresoftware.b4a.objects.ListViewWrapper _lv_promos = null;
public String _entro = "";
public anywheresoftware.b4a.objects.ButtonWrapper _gest = null;
public anywheresoftware.b4a.objects.LabelWrapper _lfila = null;
public String _marca = "";
public String _tipo = "";
public String _subtipo = "";
public anywheresoftware.b4a.objects.EditTextWrapper _busca = null;
public String _ya_entro = "";
public String _tiene_promos = "";
public String _res = "";
public anywheresoftware.b4a.sql.SQL.CursorWrapper _s1 = null;
public anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _bmp = null;
public String _ciclo = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_qr = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_productos = null;
public b4a.example3.customlistview _clv_productos = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _imageview1 = null;
public anywheresoftware.b4a.objects.PanelWrapper _panel3 = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_prods = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _i_prod = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_prodx = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_prodmas = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_pcant = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_pcant = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_prodmenos = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_terminar1 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_continuar = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_total = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_totprods = null;
public int _totalprods = 0;
public float _totalcompra = 0f;
public boolean _etcanthasfocus = false;
public anywheresoftware.b4a.objects.collections.Map _prodsmap = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_cargando = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_info = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_buscar = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_botonesventa = null;
public anywheresoftware.b4a.objects.ListViewWrapper _lv_tipo = null;
public anywheresoftware.b4a.objects.ListViewWrapper _lv_subtipo = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_vistapreviatrans = null;
public anywheresoftware.b4a.objects.ListViewWrapper _lv_prodspedido = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_rechazar = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_aceptar = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_vistaprevia = null;
public String _folio = "";
public String _result = "";
public anywheresoftware.b4a.objects.LabelWrapper _l_cant = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_total2 = null;
public String _prodspedidoactual = "";
public String _montopedidoactual = "";
public b4a.example3.customlistview _clv_prods_ll = null;
public keymon.lat.medicomed.preoptimizedclv _pclv = null;
public anywheresoftware.b4a.objects.collections.List _listaprods = null;
public anywheresoftware.b4a.objects.collections.Map _pedidomap = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_botmasmen = null;
public boolean _reiniciarlistaprods = false;
public anywheresoftware.b4a.objects.collections.List _listatiempos = null;
public String _clienteid = "";
public String _rutausuario = "";
public boolean _haypedido = false;
public anywheresoftware.b4a.objects.collections.List _listahints = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _h = null;
public b4a.example.dateutils _dateutils = null;
public keymon.lat.medicomed.main _main = null;
public keymon.lat.medicomed.starter _starter = null;
public keymon.lat.medicomed.subs _subs = null;
public keymon.lat.medicomed.appupdater _appupdater = null;
public keymon.lat.medicomed.mapa_rutas _mapa_rutas = null;
public keymon.lat.medicomed.tracker _tracker = null;
public keymon.lat.medicomed.newinst2 _newinst2 = null;
public keymon.lat.medicomed.b4xpages _b4xpages = null;
public keymon.lat.medicomed.b4xcollections _b4xcollections = null;
public keymon.lat.medicomed.httputils2service _httputils2service = null;
public keymon.lat.medicomed.xuiviewsutils _xuiviewsutils = null;
public Object  _initialize(keymon.lat.medicomed.c_productos __ref,anywheresoftware.b4a.BA _ba) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "initialize", false))
	 {return ((Object) Debug.delegate(ba, "initialize", new Object[] {_ba}));}
RDebugUtils.currentLine=23265280;
 //BA.debugLineNum = 23265280;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=23265281;
 //BA.debugLineNum = 23265281;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=23265282;
 //BA.debugLineNum = 23265282;BA.debugLine="End Sub";
return null;
}
public String  _b_aceptar_click(keymon.lat.medicomed.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "b_aceptar_click", false))
	 {return ((String) Debug.delegate(ba, "b_aceptar_click", null));}
RDebugUtils.currentLine=24969216;
 //BA.debugLineNum = 24969216;BA.debugLine="Private Sub b_aceptar_Click";
RDebugUtils.currentLine=24969217;
 //BA.debugLineNum = 24969217;BA.debugLine="p_vistaPreviaTrans.Visible=False";
__ref._p_vistapreviatrans /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=24969218;
 //BA.debugLineNum = 24969218;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=24969219;
 //BA.debugLineNum = 24969219;BA.debugLine="End Sub";
return "";
}
public String  _b_buscar_click(keymon.lat.medicomed.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "b_buscar_click", false))
	 {return ((String) Debug.delegate(ba, "b_buscar_click", null));}
RDebugUtils.currentLine=24641536;
 //BA.debugLineNum = 24641536;BA.debugLine="Private Sub b_buscar_Click";
RDebugUtils.currentLine=24641537;
 //BA.debugLineNum = 24641537;BA.debugLine="forzarBusqueda = True";
__ref._forzarbusqueda /*boolean*/  = __c.True;
RDebugUtils.currentLine=24641538;
 //BA.debugLineNum = 24641538;BA.debugLine="Busca_TextChanged(\"\",BUSCA.Text)";
__ref._busca_textchanged /*void*/ (null,"",__ref._busca /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText());
RDebugUtils.currentLine=24641539;
 //BA.debugLineNum = 24641539;BA.debugLine="End Sub";
return "";
}
public void  _busca_textchanged(keymon.lat.medicomed.c_productos __ref,String _old,String _new) throws Exception{
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "busca_textchanged", false))
	 {Debug.delegate(ba, "busca_textchanged", new Object[] {_old,_new}); return;}
ResumableSub_Busca_TextChanged rsub = new ResumableSub_Busca_TextChanged(this,__ref,_old,_new);
rsub.resume(ba, null);
}
public static class ResumableSub_Busca_TextChanged extends BA.ResumableSub {
public ResumableSub_Busca_TextChanged(keymon.lat.medicomed.c_productos parent,keymon.lat.medicomed.c_productos __ref,String _old,String _new) {
this.parent = parent;
this.__ref = __ref;
this._old = _old;
this._new = _new;
this.__ref = parent;
}
keymon.lat.medicomed.c_productos __ref;
keymon.lat.medicomed.c_productos parent;
String _old;
String _new;
anywheresoftware.b4a.sql.SQL.ResultSetWrapper _p = null;

@Override
public void resume(BA ba, Object[] result) throws Exception{
RDebugUtils.currentModule="c_productos";

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
RDebugUtils.currentLine=25296898;
 //BA.debugLineNum = 25296898;BA.debugLine="If Not(clv_prods_ll.AsView.Visible) Then clv_prod";
if (true) break;

case 1:
//if
this.state = 6;
if (parent.__c.Not(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().getVisible())) { 
this.state = 3;
;}if (true) break;

case 3:
//C
this.state = 6;
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(parent.__c.True);
if (true) break;

case 6:
//C
this.state = 7;
;
RDebugUtils.currentLine=25296899;
 //BA.debugLineNum = 25296899;BA.debugLine="If (New.Length = 1 Or New.Length = 2) And Not(for";
if (true) break;

case 7:
//if
this.state = 12;
if ((_new.length()==1 || _new.length()==2) && parent.__c.Not(__ref._forzarbusqueda /*boolean*/ )) { 
this.state = 9;
;}if (true) break;

case 9:
//C
this.state = 12;
if (true) return ;
if (true) break;

case 12:
//C
this.state = -1;
;
RDebugUtils.currentLine=25296900;
 //BA.debugLineNum = 25296900;BA.debugLine="forzarBusqueda = False";
__ref._forzarbusqueda /*boolean*/  = parent.__c.False;
RDebugUtils.currentLine=25296901;
 //BA.debugLineNum = 25296901;BA.debugLine="clv_prods_ll.Clear";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._clear();
RDebugUtils.currentLine=25296902;
 //BA.debugLineNum = 25296902;BA.debugLine="listaProds.Initialize";
__ref._listaprods /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
RDebugUtils.currentLine=25296903;
 //BA.debugLineNum = 25296903;BA.debugLine="listaHints.Initialize";
__ref._listahints /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
RDebugUtils.currentLine=25296904;
 //BA.debugLineNum = 25296904;BA.debugLine="Sleep(0)";
parent.__c.Sleep(ba,new anywheresoftware.b4a.shell.DebugResumableSub.DelegatableResumableSub(this, "c_productos", "busca_textchanged"),(int) (0));
this.state = 13;
return;
case 13:
//C
this.state = -1;
;
RDebugUtils.currentLine=25296905;
 //BA.debugLineNum = 25296905;BA.debugLine="Dim p As ResultSet = B4XPages.MainPage.skmt.ExecQ";
_p = new anywheresoftware.b4a.sql.SQL.ResultSetWrapper();
_p = (anywheresoftware.b4a.sql.SQL.ResultSetWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.ResultSetWrapper(), (android.database.Cursor)(parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select CAT_GP_ID, CAT_GP_NOMBRE, CAT_GP_ALMACEN, CAT_GP_PRECIO, CAT_GP_TIPOPROD from CAT_GUNAPROD where CAT_GP_NOMBRE like '%"+parent.__c.SmartStringFormatter("",(Object)(_new))+"%' and CAT_GP_PRECIO > 0 AND CAT_GP_ALMACEN > 0 and CAT_GP_CLASIF <> 'PROMOS' And CAT_GP_TIPOPROD2 <> '2' order by CAT_GP_NOMBRE"))));
RDebugUtils.currentLine=25296906;
 //BA.debugLineNum = 25296906;BA.debugLine="Log(\"Llamamos LlenaProdsLL\")";
parent.__c.LogImpl("325296906","Llamamos LlenaProdsLL",0);
RDebugUtils.currentLine=25296907;
 //BA.debugLineNum = 25296907;BA.debugLine="LlenaProdsLL(p)";
__ref._llenaprodsll /*String*/ (null,_p);
RDebugUtils.currentLine=25296926;
 //BA.debugLineNum = 25296926;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b_continuar_click(keymon.lat.medicomed.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "b_continuar_click", false))
	 {return ((String) Debug.delegate(ba, "b_continuar_click", null));}
anywheresoftware.b4a.objects.collections.Map _p1 = null;
String _p = "";
String _pn = "";
anywheresoftware.b4a.objects.collections.Map _m = null;
RDebugUtils.currentLine=24379392;
 //BA.debugLineNum = 24379392;BA.debugLine="Private Sub b_continuar_Click";
RDebugUtils.currentLine=24379393;
 //BA.debugLineNum = 24379393;BA.debugLine="Log(\"b_continuar_Click\")";
__c.LogImpl("324379393","b_continuar_Click",0);
RDebugUtils.currentLine=24379394;
 //BA.debugLineNum = 24379394;BA.debugLine="cuentaProds";
__ref._cuentaprods /*String*/ (null);
RDebugUtils.currentLine=24379395;
 //BA.debugLineNum = 24379395;BA.debugLine="Private p1 As Map";
_p1 = new anywheresoftware.b4a.objects.collections.Map();
RDebugUtils.currentLine=24379396;
 //BA.debugLineNum = 24379396;BA.debugLine="For Each p As String In prodsMap.Keys";
{
final anywheresoftware.b4a.BA.IterableList group4 = __ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen4 = group4.getSize()
;int index4 = 0;
;
for (; index4 < groupLen4;index4++){
_p = BA.ObjectToString(group4.Get(index4));
RDebugUtils.currentLine=24379397;
 //BA.debugLineNum = 24379397;BA.debugLine="p1 = prodsMap.Get(p)";
_p1 = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_p))));
RDebugUtils.currentLine=24379398;
 //BA.debugLineNum = 24379398;BA.debugLine="Log(p & \"|\" & p1)";
__c.LogImpl("324379398",_p+"|"+BA.ObjectToString(_p1),0);
RDebugUtils.currentLine=24379399;
 //BA.debugLineNum = 24379399;BA.debugLine="Private pn As String = Subs.traeProdNombre(p)";
_pn = _subs._traeprodnombre /*String*/ (ba,_p);
RDebugUtils.currentLine=24379400;
 //BA.debugLineNum = 24379400;BA.debugLine="Subs.guardaProductoSinGestion(Subs.traeAlmacen,";
_subs._guardaproductosingestion /*String*/ (ba,_subs._traealmacen /*String*/ (ba),BA.ObjectToString(_p1.Get((Object)("precio"))),BA.ObjectToString(_p1.Get((Object)("cant"))),_pn,_p,__ref._clienteid /*String*/ ,_subs._traefecha /*String*/ (ba),_subs._traeusuariodebd /*String*/ (ba),__ref._rutausuario /*String*/ ,BA.NumberToString(0),_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._tipo_venta /*String*/ );
 }
};
RDebugUtils.currentLine=24379402;
 //BA.debugLineNum = 24379402;BA.debugLine="Log(\"promos-inv, prods-inv, cat-vis\")";
__c.LogImpl("324379402","promos-inv, prods-inv, cat-vis",0);
RDebugUtils.currentLine=24379403;
 //BA.debugLineNum = 24379403;BA.debugLine="lv_promos.Visible = False";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=24379404;
 //BA.debugLineNum = 24379404;BA.debugLine="clv_prods_ll.AsView.Visible = False";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(__c.False);
RDebugUtils.currentLine=24379405;
 //BA.debugLineNum = 24379405;BA.debugLine="lv_subtipo.Visible = False";
__ref._lv_subtipo /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=24379406;
 //BA.debugLineNum = 24379406;BA.debugLine="lv_tipo.Visible = False";
__ref._lv_tipo /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=24379407;
 //BA.debugLineNum = 24379407;BA.debugLine="lv_catalogos.Visible = True";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=24379408;
 //BA.debugLineNum = 24379408;BA.debugLine="Log(\"Continuar\")";
__c.LogImpl("324379408","Continuar",0);
RDebugUtils.currentLine=24379409;
 //BA.debugLineNum = 24379409;BA.debugLine="Dim m As Map = Subs.traeTotalesClienteActual";
_m = new anywheresoftware.b4a.objects.collections.Map();
_m = _subs._traetotalesclienteactual /*anywheresoftware.b4a.objects.collections.Map*/ (ba);
RDebugUtils.currentLine=24379410;
 //BA.debugLineNum = 24379410;BA.debugLine="prodsPedidoActual = m.Get(\"productos\")";
__ref._prodspedidoactual /*String*/  = BA.ObjectToString(_m.Get((Object)("productos")));
RDebugUtils.currentLine=24379411;
 //BA.debugLineNum = 24379411;BA.debugLine="montoPedidoActual = m.Get(\"monto\")";
__ref._montopedidoactual /*String*/  = BA.ObjectToString(_m.Get((Object)("monto")));
RDebugUtils.currentLine=24379412;
 //BA.debugLineNum = 24379412;BA.debugLine="End Sub";
return "";
}
public String  _cuentaprods(keymon.lat.medicomed.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "cuentaprods", false))
	 {return ((String) Debug.delegate(ba, "cuentaprods", null));}
RDebugUtils.currentLine=24182784;
 //BA.debugLineNum = 24182784;BA.debugLine="Sub cuentaProds";
RDebugUtils.currentLine=24182786;
 //BA.debugLineNum = 24182786;BA.debugLine="Log(\"===========================\")";
__c.LogImpl("324182786","===========================",0);
RDebugUtils.currentLine=24182787;
 //BA.debugLineNum = 24182787;BA.debugLine="Private c As Cursor = B4XPages.MainPage.skmt.Exec";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select sum(PE_COSTO_TOT) as total, sum(PE_CANT) as cant from PEDIDO where PE_CLIENTE = '"+__c.SmartStringFormatter("",(Object)(__ref._clienteid /*String*/ ))+"'"))));
RDebugUtils.currentLine=24182790;
 //BA.debugLineNum = 24182790;BA.debugLine="p_botonesVenta.Visible = True";
__ref._p_botonesventa /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=24182791;
 //BA.debugLineNum = 24182791;BA.debugLine="p_botonesVenta.BringToFront";
__ref._p_botonesventa /*anywheresoftware.b4a.objects.PanelWrapper*/ .BringToFront();
RDebugUtils.currentLine=24182792;
 //BA.debugLineNum = 24182792;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=24182793;
 //BA.debugLineNum = 24182793;BA.debugLine="Log($\"Total Prods: ${c.GetString(\"cant\")}, Total";
__c.LogImpl("324182793",("Total Prods: "+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("cant")))+", Total Compra: $"+__c.SmartStringFormatter("1.2",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("total")))+""),0);
RDebugUtils.currentLine=24182794;
 //BA.debugLineNum = 24182794;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=24182795;
 //BA.debugLineNum = 24182795;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmas_click(keymon.lat.medicomed.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "b_prodmas_click", false))
	 {return ((String) Debug.delegate(ba, "b_prodmas_click", null));}
int _index = 0;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl0 = null;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lacant = null;
String _precio = "";
String _inv = "";
String _id = "";
RDebugUtils.currentLine=24051712;
 //BA.debugLineNum = 24051712;BA.debugLine="Sub b_prodMas_Click";
RDebugUtils.currentLine=24051713;
 //BA.debugLineNum = 24051713;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=24051715;
 //BA.debugLineNum = 24051715;BA.debugLine="Dim index As Int = clv_prods_ll.GetItemFromView(S";
_index = __ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getitemfromview((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__c.Sender(ba))));
RDebugUtils.currentLine=24051716;
 //BA.debugLineNum = 24051716;BA.debugLine="Dim pnl0 As B4XView = clv_prods_ll.GetPanel(index";
_pnl0 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl0 = __ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getpanel(_index);
RDebugUtils.currentLine=24051717;
 //BA.debugLineNum = 24051717;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=24051718;
 //BA.debugLineNum = 24051718;BA.debugLine="Dim laCant As B4XView = pnl.GetView(2).GetView(2)";
_lacant = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacant = _pnl.GetView((int) (2)).GetView((int) (2));
RDebugUtils.currentLine=24051720;
 //BA.debugLineNum = 24051720;BA.debugLine="Private precio As String=clv_prods_ll.GetValue(in";
_precio = BA.ObjectToString(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getvalue(_index)))).Get((Object)("precio")));
RDebugUtils.currentLine=24051721;
 //BA.debugLineNum = 24051721;BA.debugLine="Private inv As String=clv_prods_ll.GetValue(index";
_inv = BA.ObjectToString(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getvalue(_index)))).Get((Object)("almacen")));
RDebugUtils.currentLine=24051722;
 //BA.debugLineNum = 24051722;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=24051724;
 //BA.debugLineNum = 24051724;BA.debugLine="If laCant.Text + 1 <= inv Then";
if ((double)(Double.parseDouble(_lacant.getText()))+1<=(double)(Double.parseDouble(_inv))) { 
RDebugUtils.currentLine=24051725;
 //BA.debugLineNum = 24051725;BA.debugLine="Log(NumberFormat2(laCant.Text+1,0,0,0,False))";
__c.LogImpl("324051725",__c.NumberFormat2((double)(Double.parseDouble(_lacant.getText()))+1,(int) (0),(int) (0),(int) (0),__c.False),0);
RDebugUtils.currentLine=24051726;
 //BA.debugLineNum = 24051726;BA.debugLine="laCant.Text = $\"${NumberFormat2(laCant.Text+1,0,";
_lacant.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("",(Object)(__c.NumberFormat2((double)(Double.parseDouble(_lacant.getText()))+1,(int) (0),(int) (0),(int) (0),__c.False)))+"")));
RDebugUtils.currentLine=24051728;
 //BA.debugLineNum = 24051728;BA.debugLine="Private id As String=clv_prods_ll.GetValue(index";
_id = BA.ObjectToString(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getvalue(_index)))).Get((Object)("id")));
 };
RDebugUtils.currentLine=24051735;
 //BA.debugLineNum = 24051735;BA.debugLine="Subs.actualizaProducto(Subs.traeAlmacen, precio,";
_subs._actualizaproducto /*String*/ (ba,_subs._traealmacen /*String*/ (ba),_precio,_lacant.getText(),_subs._traeprodnombre /*String*/ (ba,_id),_id,__ref._clienteid /*String*/ ,_subs._traefecha /*String*/ (ba),_subs._traeusuariodebd /*String*/ (ba),__ref._rutausuario /*String*/ ,BA.NumberToString(0),_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._tipo_venta /*String*/ );
RDebugUtils.currentLine=24051736;
 //BA.debugLineNum = 24051736;BA.debugLine="cuentaProds";
__ref._cuentaprods /*String*/ (null);
RDebugUtils.currentLine=24051738;
 //BA.debugLineNum = 24051738;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmenos_click(keymon.lat.medicomed.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "b_prodmenos_click", false))
	 {return ((String) Debug.delegate(ba, "b_prodmenos_click", null));}
int _index = 0;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl0 = null;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lacant = null;
anywheresoftware.b4a.objects.collections.Map _tmpmap = null;
String _precio = "";
String _id = "";
RDebugUtils.currentLine=23986176;
 //BA.debugLineNum = 23986176;BA.debugLine="Sub b_prodMenos_Click";
RDebugUtils.currentLine=23986177;
 //BA.debugLineNum = 23986177;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=23986179;
 //BA.debugLineNum = 23986179;BA.debugLine="Dim index As Int = clv_prods_ll.GetItemFromView(S";
_index = __ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getitemfromview((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__c.Sender(ba))));
RDebugUtils.currentLine=23986180;
 //BA.debugLineNum = 23986180;BA.debugLine="Dim pnl0 As B4XView = clv_prods_ll.GetPanel(index";
_pnl0 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl0 = __ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getpanel(_index);
RDebugUtils.currentLine=23986181;
 //BA.debugLineNum = 23986181;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=23986182;
 //BA.debugLineNum = 23986182;BA.debugLine="Dim laCant As B4XView = pnl.GetView(2).GetView(2)";
_lacant = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacant = _pnl.GetView((int) (2)).GetView((int) (2));
RDebugUtils.currentLine=23986184;
 //BA.debugLineNum = 23986184;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=23986186;
 //BA.debugLineNum = 23986186;BA.debugLine="laCant.Text = $\"${NumberFormat2(laCant.Text-1,0,0";
_lacant.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("",(Object)(__c.NumberFormat2((double)(Double.parseDouble(_lacant.getText()))-1,(int) (0),(int) (0),(int) (0),__c.False)))+"")));
RDebugUtils.currentLine=23986187;
 //BA.debugLineNum = 23986187;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0";
if ((double)(Double.parseDouble(_lacant.getText()))<0) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=23986188;
 //BA.debugLineNum = 23986188;BA.debugLine="Private tmpMap As Map = clv_prods_ll.GetValue(ind";
_tmpmap = new anywheresoftware.b4a.objects.collections.Map();
_tmpmap = ((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getvalue(_index))));
RDebugUtils.currentLine=23986189;
 //BA.debugLineNum = 23986189;BA.debugLine="Private precio As String=clv_prods_ll.GetValue(in";
_precio = BA.ObjectToString(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getvalue(_index)))).Get((Object)("precio")));
RDebugUtils.currentLine=23986190;
 //BA.debugLineNum = 23986190;BA.debugLine="Private id As String=clv_prods_ll.GetValue(index)";
_id = BA.ObjectToString(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getvalue(_index)))).Get((Object)("id")));
RDebugUtils.currentLine=23986191;
 //BA.debugLineNum = 23986191;BA.debugLine="Private tmpMap As Map = CreateMap(\"precio\":precio";
_tmpmap = new anywheresoftware.b4a.objects.collections.Map();
_tmpmap = __c.createMap(new Object[] {(Object)("precio"),(Object)(_precio),(Object)("cant"),(Object)(_lacant.getText()),(Object)("almacen"),(Object)(_subs._traealmacen /*String*/ (ba))});
RDebugUtils.currentLine=23986194;
 //BA.debugLineNum = 23986194;BA.debugLine="If laCant.Text = 0 Then prodsMap.Remove(id)";
if ((_lacant.getText()).equals(BA.NumberToString(0))) { 
__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Remove((Object)(_id));};
RDebugUtils.currentLine=23986197;
 //BA.debugLineNum = 23986197;BA.debugLine="Subs.actualizaProducto(Subs.traeAlmacen, precio,";
_subs._actualizaproducto /*String*/ (ba,_subs._traealmacen /*String*/ (ba),_precio,_lacant.getText(),_subs._traeprodnombre /*String*/ (ba,_id),_id,__ref._clienteid /*String*/ ,_subs._traefecha /*String*/ (ba),_subs._traeusuariodebd /*String*/ (ba),__ref._rutausuario /*String*/ ,BA.NumberToString(0),_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._tipo_venta /*String*/ );
RDebugUtils.currentLine=23986198;
 //BA.debugLineNum = 23986198;BA.debugLine="cuentaProds";
__ref._cuentaprods /*String*/ (null);
RDebugUtils.currentLine=23986200;
 //BA.debugLineNum = 23986200;BA.debugLine="End Sub";
return "";
}
public String  _b_qr_click(keymon.lat.medicomed.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "b_qr_click", false))
	 {return ((String) Debug.delegate(ba, "b_qr_click", null));}
RDebugUtils.currentLine=23855104;
 //BA.debugLineNum = 23855104;BA.debugLine="Sub b_QR_Click";
RDebugUtils.currentLine=23855105;
 //BA.debugLineNum = 23855105;BA.debugLine="If ciclo = 1 Then";
if ((__ref._ciclo /*String*/ ).equals(BA.NumberToString(1))) { 
RDebugUtils.currentLine=23855106;
 //BA.debugLineNum = 23855106;BA.debugLine="ciclo = 2";
__ref._ciclo /*String*/  = BA.NumberToString(2);
RDebugUtils.currentLine=23855107;
 //BA.debugLineNum = 23855107;BA.debugLine="ya_entro  = \"0\"";
__ref._ya_entro /*String*/  = "0";
RDebugUtils.currentLine=23855108;
 //BA.debugLineNum = 23855108;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*void*/ (null);
 }else 
{RDebugUtils.currentLine=23855109;
 //BA.debugLineNum = 23855109;BA.debugLine="else if ciclo = 2 Then";
if ((__ref._ciclo /*String*/ ).equals(BA.NumberToString(2))) { 
RDebugUtils.currentLine=23855110;
 //BA.debugLineNum = 23855110;BA.debugLine="ciclo = 3";
__ref._ciclo /*String*/  = BA.NumberToString(3);
RDebugUtils.currentLine=23855111;
 //BA.debugLineNum = 23855111;BA.debugLine="ya_entro  = \"0\"";
__ref._ya_entro /*String*/  = "0";
RDebugUtils.currentLine=23855112;
 //BA.debugLineNum = 23855112;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*void*/ (null);
 }else 
{RDebugUtils.currentLine=23855113;
 //BA.debugLineNum = 23855113;BA.debugLine="else if ciclo = 3 Then";
if ((__ref._ciclo /*String*/ ).equals(BA.NumberToString(3))) { 
RDebugUtils.currentLine=23855114;
 //BA.debugLineNum = 23855114;BA.debugLine="ciclo = 4";
__ref._ciclo /*String*/  = BA.NumberToString(4);
RDebugUtils.currentLine=23855115;
 //BA.debugLineNum = 23855115;BA.debugLine="ya_entro  = \"0\"";
__ref._ya_entro /*String*/  = "0";
RDebugUtils.currentLine=23855116;
 //BA.debugLineNum = 23855116;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*void*/ (null);
 }else 
{RDebugUtils.currentLine=23855117;
 //BA.debugLineNum = 23855117;BA.debugLine="else if ciclo = 4 Then";
if ((__ref._ciclo /*String*/ ).equals(BA.NumberToString(4))) { 
RDebugUtils.currentLine=23855118;
 //BA.debugLineNum = 23855118;BA.debugLine="ciclo = 5";
__ref._ciclo /*String*/  = BA.NumberToString(5);
RDebugUtils.currentLine=23855119;
 //BA.debugLineNum = 23855119;BA.debugLine="ya_entro  = \"0\"";
__ref._ya_entro /*String*/  = "0";
RDebugUtils.currentLine=23855120;
 //BA.debugLineNum = 23855120;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*void*/ (null);
 }else 
{RDebugUtils.currentLine=23855121;
 //BA.debugLineNum = 23855121;BA.debugLine="else if ciclo = 5 Then";
if ((__ref._ciclo /*String*/ ).equals(BA.NumberToString(5))) { 
RDebugUtils.currentLine=23855122;
 //BA.debugLineNum = 23855122;BA.debugLine="ciclo = 1";
__ref._ciclo /*String*/  = BA.NumberToString(1);
RDebugUtils.currentLine=23855123;
 //BA.debugLineNum = 23855123;BA.debugLine="ya_entro  = \"0\"";
__ref._ya_entro /*String*/  = "0";
RDebugUtils.currentLine=23855124;
 //BA.debugLineNum = 23855124;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*void*/ (null);
 }}}}}
;
RDebugUtils.currentLine=23855126;
 //BA.debugLineNum = 23855126;BA.debugLine="End Sub";
return "";
}
public void  _b4xpage_appear(keymon.lat.medicomed.c_productos __ref) throws Exception{
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "b4xpage_appear", false))
	 {Debug.delegate(ba, "b4xpage_appear", null); return;}
ResumableSub_B4XPage_Appear rsub = new ResumableSub_B4XPage_Appear(this,__ref);
rsub.resume(ba, null);
}
public static class ResumableSub_B4XPage_Appear extends BA.ResumableSub {
public ResumableSub_B4XPage_Appear(keymon.lat.medicomed.c_productos parent,keymon.lat.medicomed.c_productos __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
keymon.lat.medicomed.c_productos __ref;
keymon.lat.medicomed.c_productos parent;
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
anywheresoftware.b4a.objects.collections.Map _m = null;

@Override
public void resume(BA ba, Object[] result) throws Exception{
RDebugUtils.currentModule="c_productos";

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
RDebugUtils.currentLine=23396353;
 //BA.debugLineNum = 23396353;BA.debugLine="clienteId = Subs.traeCliente";
__ref._clienteid /*String*/  = parent._subs._traecliente /*String*/ (ba);
RDebugUtils.currentLine=23396354;
 //BA.debugLineNum = 23396354;BA.debugLine="rutaUsuario = Subs.traeRuta";
__ref._rutausuario /*String*/  = parent._subs._traeruta /*String*/ (ba);
RDebugUtils.currentLine=23396355;
 //BA.debugLineNum = 23396355;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE CAT_";
parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE CAT_GUNAPROD SET CAT_GP_TIPOPROD = (?) WHERE CAT_GP_TIPOPROD = (?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("PRIORITARIO"),(Object)("1")}));
RDebugUtils.currentLine=23396356;
 //BA.debugLineNum = 23396356;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE CAT_";
parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE CAT_GUNAPROD SET CAT_GP_TIPOPROD = (?) WHERE CAT_GP_TIPOPROD = (?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("ESTRATEGICO"),(Object)("2")}));
RDebugUtils.currentLine=23396357;
 //BA.debugLineNum = 23396357;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE CAT_";
parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE CAT_GUNAPROD SET CAT_GP_TIPOPROD = (?) WHERE CAT_GP_TIPOPROD = (?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("COMPLEMENTARIO"),(Object)("3")}));
RDebugUtils.currentLine=23396358;
 //BA.debugLineNum = 23396358;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE CAT_";
parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE CAT_GUNAPROD SET CAT_GP_TIPOPROD = (?) WHERE CAT_GP_TIPOPROD = (?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("CATALOGO REGULAR"),(Object)("0")}));
RDebugUtils.currentLine=23396359;
 //BA.debugLineNum = 23396359;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE CAT_";
parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE CAT_GUNAPROD SET CAT_GP_TIPOPROD = (?) WHERE CAT_GP_CLASIF = (?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("PROMOS"),(Object)("PROMOS")}));
RDebugUtils.currentLine=23396360;
 //BA.debugLineNum = 23396360;BA.debugLine="clv_prods_ll.GetBase.SetLayoutAnimated(0, 5dip, 1";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getbase().SetLayoutAnimated((int) (0),parent.__c.DipToCurrent((int) (5)),parent.__c.DipToCurrent((int) (130)),(int) (__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth()+10),(int) (__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getHeight()*0.68));
RDebugUtils.currentLine=23396361;
 //BA.debugLineNum = 23396361;BA.debugLine="clv_prods_ll.Base_Resize(clv_prods_ll.GetBase.Wid";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._base_resize(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getbase().getWidth(),__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getbase().getHeight());
RDebugUtils.currentLine=23396362;
 //BA.debugLineNum = 23396362;BA.debugLine="If B4XPages.MainPage.bTerminarClicked Then";
if (true) break;

case 1:
//if
this.state = 4;
if (parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._bterminarclicked /*boolean*/ ) { 
this.state = 3;
}if (true) break;

case 3:
//C
this.state = 4;
RDebugUtils.currentLine=23396363;
 //BA.debugLineNum = 23396363;BA.debugLine="lv_catalogos.Visible = True";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.True);
RDebugUtils.currentLine=23396364;
 //BA.debugLineNum = 23396364;BA.debugLine="lv_promos.Visible = False";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=23396365;
 //BA.debugLineNum = 23396365;BA.debugLine="lv_tipo.Visible = False";
__ref._lv_tipo /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=23396366;
 //BA.debugLineNum = 23396366;BA.debugLine="lv_subtipo.Visible = False";
__ref._lv_subtipo /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=23396367;
 //BA.debugLineNum = 23396367;BA.debugLine="clv_prods_ll.AsView.Visible = False";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(parent.__c.False);
RDebugUtils.currentLine=23396368;
 //BA.debugLineNum = 23396368;BA.debugLine="B4XPages.MainPage.bTerminarClicked = False";
parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._bterminarclicked /*boolean*/  = parent.__c.False;
 if (true) break;
;
RDebugUtils.currentLine=23396370;
 //BA.debugLineNum = 23396370;BA.debugLine="If ya_entro <> \"1\" Then";

case 4:
//if
this.state = 13;
if ((__ref._ya_entro /*String*/ ).equals("1") == false) { 
this.state = 6;
}if (true) break;

case 6:
//C
this.state = 7;
RDebugUtils.currentLine=23396371;
 //BA.debugLineNum = 23396371;BA.debugLine="If BUSCA.Text <> \"\" Then BUSCA.Text =\"\"";
if (true) break;

case 7:
//if
this.state = 12;
if ((__ref._busca /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()).equals("") == false) { 
this.state = 9;
;}if (true) break;

case 9:
//C
this.state = 12;
__ref._busca /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
if (true) break;

case 12:
//C
this.state = 13;
;
RDebugUtils.currentLine=23396372;
 //BA.debugLineNum = 23396372;BA.debugLine="entro =\"3\"";
__ref._entro /*String*/  = "3";
RDebugUtils.currentLine=23396373;
 //BA.debugLineNum = 23396373;BA.debugLine="lv_catalogos.Clear";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=23396374;
 //BA.debugLineNum = 23396374;BA.debugLine="Sleep(100)";
parent.__c.Sleep(ba,new anywheresoftware.b4a.shell.DebugResumableSub.DelegatableResumableSub(this, "c_productos", "b4xpage_appear"),(int) (100));
this.state = 24;
return;
case 24:
//C
this.state = 13;
;
RDebugUtils.currentLine=23396375;
 //BA.debugLineNum = 23396375;BA.debugLine="lfila.Text = \"CATALOGOS\"";
__ref._lfila /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("CATALOGOS"));
RDebugUtils.currentLine=23396376;
 //BA.debugLineNum = 23396376;BA.debugLine="p_productos.Height = Root.Height";
__ref._p_productos /*anywheresoftware.b4a.objects.PanelWrapper*/ .setHeight(__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getHeight());
RDebugUtils.currentLine=23396377;
 //BA.debugLineNum = 23396377;BA.debugLine="clv_prods_ll.AsView.Visible = False";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(parent.__c.False);
RDebugUtils.currentLine=23396378;
 //BA.debugLineNum = 23396378;BA.debugLine="lv_catalogos.Visible = True";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.True);
RDebugUtils.currentLine=23396379;
 //BA.debugLineNum = 23396379;BA.debugLine="p_botonesVenta.Visible = False";
__ref._p_botonesventa /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=23396380;
 //BA.debugLineNum = 23396380;BA.debugLine="p_botonesVenta.Top = clv_prods_ll.AsView.top + c";
__ref._p_botonesventa /*anywheresoftware.b4a.objects.PanelWrapper*/ .setTop((int) (__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().getTop()+__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().getHeight()-25));
RDebugUtils.currentLine=23396381;
 //BA.debugLineNum = 23396381;BA.debugLine="lv_promos.Visible = False";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.False);
 if (true) break;

case 13:
//C
this.state = 14;
;
RDebugUtils.currentLine=23396383;
 //BA.debugLineNum = 23396383;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=23396384;
 //BA.debugLineNum = 23396384;BA.debugLine="label1 = lv_catalogos.SingleLineLayout.Label";
_label1 = __ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getSingleLineLayout().Label;
RDebugUtils.currentLine=23396385;
 //BA.debugLineNum = 23396385;BA.debugLine="label1.TextSize = 17";
_label1.setTextSize((float) (17));
RDebugUtils.currentLine=23396386;
 //BA.debugLineNum = 23396386;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(parent.__c.Colors.Black);
RDebugUtils.currentLine=23396387;
 //BA.debugLineNum = 23396387;BA.debugLine="lv_catalogos.Clear";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=23396388;
 //BA.debugLineNum = 23396388;BA.debugLine="lv_catalogos.AddSingleLine(\"CATALOGO\")";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddSingleLine(BA.ObjectToCharSequence("CATALOGO"));
RDebugUtils.currentLine=23396389;
 //BA.debugLineNum = 23396389;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"select coun";
__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)(parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(*) as hayPromos from cat_gunaprod where CAT_GP_TIPOPROD = 'PROMOS'")));
RDebugUtils.currentLine=23396390;
 //BA.debugLineNum = 23396390;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=23396391;
 //BA.debugLineNum = 23396391;BA.debugLine="If c.GetInt(\"hayPromos\") > 0 Then";
if (true) break;

case 14:
//if
this.state = 17;
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetInt("hayPromos")>0) { 
this.state = 16;
}if (true) break;

case 16:
//C
this.state = 17;
RDebugUtils.currentLine=23396392;
 //BA.debugLineNum = 23396392;BA.debugLine="lv_catalogos.AddSingleLine(\"PROMOS\")";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddSingleLine(BA.ObjectToCharSequence("PROMOS"));
 if (true) break;

case 17:
//C
this.state = 18;
;
RDebugUtils.currentLine=23396394;
 //BA.debugLineNum = 23396394;BA.debugLine="Sleep(100)";
parent.__c.Sleep(ba,new anywheresoftware.b4a.shell.DebugResumableSub.DelegatableResumableSub(this, "c_productos", "b4xpage_appear"),(int) (100));
this.state = 25;
return;
case 25:
//C
this.state = 18;
;
RDebugUtils.currentLine=23396395;
 //BA.debugLineNum = 23396395;BA.debugLine="l_total.Visible = False";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=23396396;
 //BA.debugLineNum = 23396396;BA.debugLine="l_totProds.Visible = False";
__ref._l_totprods /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=23396397;
 //BA.debugLineNum = 23396397;BA.debugLine="l_total.Left = 5dip";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setLeft(parent.__c.DipToCurrent((int) (5)));
RDebugUtils.currentLine=23396398;
 //BA.debugLineNum = 23396398;BA.debugLine="l_totProds.Width = Root.Width * 0.19";
__ref._l_totprods /*anywheresoftware.b4a.objects.LabelWrapper*/ .setWidth((int) (__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth()*0.19));
RDebugUtils.currentLine=23396399;
 //BA.debugLineNum = 23396399;BA.debugLine="l_total.Left = l_totProds.Width + 20";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setLeft((int) (__ref._l_totprods /*anywheresoftware.b4a.objects.LabelWrapper*/ .getWidth()+20));
RDebugUtils.currentLine=23396400;
 //BA.debugLineNum = 23396400;BA.debugLine="l_total.Width = Root.Width * 0.25";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setWidth((int) (__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth()*0.25));
RDebugUtils.currentLine=23396402;
 //BA.debugLineNum = 23396402;BA.debugLine="Dim m As Map = Subs.traeTotalesClienteActual";
_m = new anywheresoftware.b4a.objects.collections.Map();
_m = parent._subs._traetotalesclienteactual /*anywheresoftware.b4a.objects.collections.Map*/ (ba);
RDebugUtils.currentLine=23396403;
 //BA.debugLineNum = 23396403;BA.debugLine="prodsPedidoActual = m.Get(\"productos\")";
__ref._prodspedidoactual /*String*/  = BA.ObjectToString(_m.Get((Object)("productos")));
RDebugUtils.currentLine=23396404;
 //BA.debugLineNum = 23396404;BA.debugLine="montoPedidoActual = m.Get(\"monto\")";
__ref._montopedidoactual /*String*/  = BA.ObjectToString(_m.Get((Object)("monto")));
RDebugUtils.currentLine=23396405;
 //BA.debugLineNum = 23396405;BA.debugLine="hayPedido = Subs.hayPedido";
__ref._haypedido /*boolean*/  = parent._subs._haypedido /*boolean*/ (ba);
RDebugUtils.currentLine=23396407;
 //BA.debugLineNum = 23396407;BA.debugLine="If reiniciarlistaProds Then";
if (true) break;

case 18:
//if
this.state = 23;
if (__ref._reiniciarlistaprods /*boolean*/ ) { 
this.state = 20;
}else 
{RDebugUtils.currentLine=23396410;
 //BA.debugLineNum = 23396410;BA.debugLine="else If hayPedido Then";
if (__ref._haypedido /*boolean*/ ) { 
this.state = 22;
}}
if (true) break;

case 20:
//C
this.state = 23;
RDebugUtils.currentLine=23396408;
 //BA.debugLineNum = 23396408;BA.debugLine="Log(\"Llamamos LlenaProdsLL\")";
parent.__c.LogImpl("323396408","Llamamos LlenaProdsLL",0);
RDebugUtils.currentLine=23396409;
 //BA.debugLineNum = 23396409;BA.debugLine="LlenaProdsLL(Null)";
__ref._llenaprodsll /*String*/ (null,(anywheresoftware.b4a.sql.SQL.ResultSetWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.ResultSetWrapper(), (android.database.Cursor)(parent.__c.Null)));
 if (true) break;

case 22:
//C
this.state = 23;
RDebugUtils.currentLine=23396412;
 //BA.debugLineNum = 23396412;BA.debugLine="Log(\"Llamamos LlenaProdsLL\")";
parent.__c.LogImpl("323396412","Llamamos LlenaProdsLL",0);
RDebugUtils.currentLine=23396413;
 //BA.debugLineNum = 23396413;BA.debugLine="LlenaProdsLL(Null)";
__ref._llenaprodsll /*String*/ (null,(anywheresoftware.b4a.sql.SQL.ResultSetWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.ResultSetWrapper(), (android.database.Cursor)(parent.__c.Null)));
 if (true) break;

case 23:
//C
this.state = -1;
;
RDebugUtils.currentLine=23396415;
 //BA.debugLineNum = 23396415;BA.debugLine="clv_prods_ll.JumpToItem(0) 'Vamos al primer artíc";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._jumptoitem((int) (0));
RDebugUtils.currentLine=23396416;
 //BA.debugLineNum = 23396416;BA.debugLine="PCLV.lblHint.SetTextSizeAnimated(0,13)";
__ref._pclv /*keymon.lat.medicomed.preoptimizedclv*/ ._lblhint /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .SetTextSizeAnimated((int) (0),(float) (13));
RDebugUtils.currentLine=23396417;
 //BA.debugLineNum = 23396417;BA.debugLine="PCLV.B4XSeekBar1.Color1=Colors.DarkGray";
__ref._pclv /*keymon.lat.medicomed.preoptimizedclv*/ ._b4xseekbar1 /*keymon.lat.medicomed.b4xseekbar*/ ._color1 /*int*/  = parent.__c.Colors.DarkGray;
RDebugUtils.currentLine=23396418;
 //BA.debugLineNum = 23396418;BA.debugLine="PCLV.B4XSeekBar1.Color2=Colors.DarkGray";
__ref._pclv /*keymon.lat.medicomed.preoptimizedclv*/ ._b4xseekbar1 /*keymon.lat.medicomed.b4xseekbar*/ ._color2 /*int*/  = parent.__c.Colors.DarkGray;
RDebugUtils.currentLine=23396419;
 //BA.debugLineNum = 23396419;BA.debugLine="PCLV.B4XSeekBar1.ThumbColor=Colors.red";
__ref._pclv /*keymon.lat.medicomed.preoptimizedclv*/ ._b4xseekbar1 /*keymon.lat.medicomed.b4xseekbar*/ ._thumbcolor /*int*/  = parent.__c.Colors.Red;
RDebugUtils.currentLine=23396420;
 //BA.debugLineNum = 23396420;BA.debugLine="PCLV.B4XSeekBar1.mBase.Left=Root.Width *0.91";
__ref._pclv /*keymon.lat.medicomed.preoptimizedclv*/ ._b4xseekbar1 /*keymon.lat.medicomed.b4xseekbar*/ ._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .setLeft((int) (__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth()*0.91));
RDebugUtils.currentLine=23396422;
 //BA.debugLineNum = 23396422;BA.debugLine="PCLV.B4XSeekBar1.mBase.Height=clv_prods_ll.AsView";
__ref._pclv /*keymon.lat.medicomed.preoptimizedclv*/ ._b4xseekbar1 /*keymon.lat.medicomed.b4xseekbar*/ ._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .setHeight(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().getHeight());
RDebugUtils.currentLine=23396423;
 //BA.debugLineNum = 23396423;BA.debugLine="PCLV.pnlOverlay.Height = clv_prods_ll.AsView.Heig";
__ref._pclv /*keymon.lat.medicomed.preoptimizedclv*/ ._pnloverlay /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .setHeight(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().getHeight());
RDebugUtils.currentLine=23396424;
 //BA.debugLineNum = 23396424;BA.debugLine="PCLV.B4XSeekBar1.Update";
__ref._pclv /*keymon.lat.medicomed.preoptimizedclv*/ ._b4xseekbar1 /*keymon.lat.medicomed.b4xseekbar*/ ._update /*String*/ (null);
RDebugUtils.currentLine=23396425;
 //BA.debugLineNum = 23396425;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b_rechazar_click(keymon.lat.medicomed.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "b_rechazar_click", false))
	 {return ((String) Debug.delegate(ba, "b_rechazar_click", null));}
RDebugUtils.currentLine=24903680;
 //BA.debugLineNum = 24903680;BA.debugLine="Private Sub b_rechazar_Click";
RDebugUtils.currentLine=24903681;
 //BA.debugLineNum = 24903681;BA.debugLine="If folio <> \"\" Then";
if ((__ref._folio /*String*/ ).equals("") == false) { 
RDebugUtils.currentLine=24903682;
 //BA.debugLineNum = 24903682;BA.debugLine="result =  Msgbox2($\"Seguro que desea borrar el p";
__ref._result /*String*/  = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence(("Seguro que desea borrar el pedido completo?"+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Haciendo clic largo sobre un producto se pueden borrar articulos independientes.")),BA.ObjectToCharSequence("Rechazar Pedido"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
RDebugUtils.currentLine=24903683;
 //BA.debugLineNum = 24903683;BA.debugLine="If result = DialogResponse.POSITIVE Then";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=24903684;
 //BA.debugLineNum = 24903684;BA.debugLine="Subs.borraPedidoClienteActual";
_subs._borrapedidoclienteactual /*String*/ (ba);
RDebugUtils.currentLine=24903685;
 //BA.debugLineNum = 24903685;BA.debugLine="prodsMap.Initialize";
__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
RDebugUtils.currentLine=24903686;
 //BA.debugLineNum = 24903686;BA.debugLine="B4XPages.MainPage.promos.promosMap.Initialize";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._promos /*keymon.lat.medicomed.c_promos*/ ._promosmap /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
RDebugUtils.currentLine=24903687;
 //BA.debugLineNum = 24903687;BA.debugLine="Log(\"Llamamos LlenaProdsLL\")";
__c.LogImpl("324903687","Llamamos LlenaProdsLL",0);
RDebugUtils.currentLine=24903688;
 //BA.debugLineNum = 24903688;BA.debugLine="LlenaProdsLL(Null)";
__ref._llenaprodsll /*String*/ (null,(anywheresoftware.b4a.sql.SQL.ResultSetWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.ResultSetWrapper(), (android.database.Cursor)(__c.Null)));
RDebugUtils.currentLine=24903689;
 //BA.debugLineNum = 24903689;BA.debugLine="Log(\"Positivo\")";
__c.LogImpl("324903689","Positivo",0);
RDebugUtils.currentLine=24903690;
 //BA.debugLineNum = 24903690;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 }else {
RDebugUtils.currentLine=24903692;
 //BA.debugLineNum = 24903692;BA.debugLine="Log(\"NO Positivo\")";
__c.LogImpl("324903692","NO Positivo",0);
RDebugUtils.currentLine=24903693;
 //BA.debugLineNum = 24903693;BA.debugLine="p_vistaPreviaTrans.Visible = False";
__ref._p_vistapreviatrans /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
 };
 }else {
RDebugUtils.currentLine=24903696;
 //BA.debugLineNum = 24903696;BA.debugLine="Msgbox(\"CLIENTE YA SE TRANSMITIO, FAVOR DE LLAMA";
__c.Msgbox(BA.ObjectToCharSequence("CLIENTE YA SE TRANSMITIO, FAVOR DE LLAMAR A SOPORTE PARA ASISTENCIA"),BA.ObjectToCharSequence("AVISO"),ba);
 };
RDebugUtils.currentLine=24903698;
 //BA.debugLineNum = 24903698;BA.debugLine="p_vistaPreviaTrans.Visible=False";
__ref._p_vistapreviatrans /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=24903699;
 //BA.debugLineNum = 24903699;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=24903700;
 //BA.debugLineNum = 24903700;BA.debugLine="End Sub";
return "";
}
public String  _llenaprodsll(keymon.lat.medicomed.c_productos __ref,anywheresoftware.b4a.sql.SQL.ResultSetWrapper _p) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "llenaprodsll", false))
	 {return ((String) Debug.delegate(ba, "llenaprodsll", new Object[] {_p}));}
anywheresoftware.b4a.objects.collections.Map _cantsmap = null;
anywheresoftware.b4a.sql.SQL.ResultSetWrapper _pe = null;
int _cant = 0;
anywheresoftware.b4a.objects.collections.Map _tempmap = null;
anywheresoftware.b4a.objects.collections.List _listaprodsconcant = null;
anywheresoftware.b4a.objects.collections.List _listaprodsconcantindex = null;
int _q = 0;
int _cont = 0;
int _pr0 = 0;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl = null;
int _pr = 0;
RDebugUtils.currentLine=25362432;
 //BA.debugLineNum = 25362432;BA.debugLine="Sub LlenaProdsLL(p As ResultSet)";
RDebugUtils.currentLine=25362434;
 //BA.debugLineNum = 25362434;BA.debugLine="listaProds.Initialize";
__ref._listaprods /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
RDebugUtils.currentLine=25362435;
 //BA.debugLineNum = 25362435;BA.debugLine="If hayPedido Then 'Si hay pedido obtenemos las ca";
if (__ref._haypedido /*boolean*/ ) { 
RDebugUtils.currentLine=25362436;
 //BA.debugLineNum = 25362436;BA.debugLine="Dim cantsMap As Map";
_cantsmap = new anywheresoftware.b4a.objects.collections.Map();
RDebugUtils.currentLine=25362437;
 //BA.debugLineNum = 25362437;BA.debugLine="cantsMap.Initialize";
_cantsmap.Initialize();
RDebugUtils.currentLine=25362438;
 //BA.debugLineNum = 25362438;BA.debugLine="Dim pe As ResultSet = B4XPages.MainPage.skmt.Exe";
_pe = new anywheresoftware.b4a.sql.SQL.ResultSetWrapper();
_pe = (anywheresoftware.b4a.sql.SQL.ResultSetWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.ResultSetWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select PE_PROID, PE_CANT from PEDIDO where PE_CLIENTE = '"+__c.SmartStringFormatter("",(Object)(__ref._clienteid /*String*/ ))+"' and PE_CEDIS = '"+__c.SmartStringFormatter("",(Object)(_subs._traealmacen /*String*/ (ba)))+"'"))));
RDebugUtils.currentLine=25362440;
 //BA.debugLineNum = 25362440;BA.debugLine="Do While pe.NextRow";
while (_pe.NextRow()) {
RDebugUtils.currentLine=25362441;
 //BA.debugLineNum = 25362441;BA.debugLine="Private cant As Int = 0";
_cant = (int) (0);
RDebugUtils.currentLine=25362442;
 //BA.debugLineNum = 25362442;BA.debugLine="cantsMap.put(pe.GetString(\"PE_PROID\"), pe.GetSt";
_cantsmap.Put((Object)(_pe.GetString("PE_PROID")),(Object)(_pe.GetString("PE_CANT")));
 }
;
RDebugUtils.currentLine=25362444;
 //BA.debugLineNum = 25362444;BA.debugLine="pe.Close";
_pe.Close();
 };
RDebugUtils.currentLine=25362447;
 //BA.debugLineNum = 25362447;BA.debugLine="If p.IsInitialized Then";
if (_p.IsInitialized()) { 
 }else {
RDebugUtils.currentLine=25362451;
 //BA.debugLineNum = 25362451;BA.debugLine="Dim p As ResultSet = B4XPages.MainPage.skmt.Exec";
_p = new anywheresoftware.b4a.sql.SQL.ResultSetWrapper();
_p = (anywheresoftware.b4a.sql.SQL.ResultSetWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.ResultSetWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select CAT_GP_ID, CAT_GP_NOMBRE, CAT_GP_ALMACEN, CAT_GP_PRECIO, CAT_GP_TIPOPROD from CAT_GUNAPROD where CAT_GP_PRECIO > 0 And CAT_GP_ALMACEN > 0 And CAT_GP_CLASIF <> 'PROMOS' And CAT_GP_TIPOPROD2 <> '2' order by CAT_GP_NOMBRE"))));
 };
RDebugUtils.currentLine=25362454;
 //BA.debugLineNum = 25362454;BA.debugLine="Do While p.NextRow";
while (_p.NextRow()) {
RDebugUtils.currentLine=25362455;
 //BA.debugLineNum = 25362455;BA.debugLine="Private cant As Int = 0";
_cant = (int) (0);
RDebugUtils.currentLine=25362456;
 //BA.debugLineNum = 25362456;BA.debugLine="If hayPedido And cantsMap.ContainsKey(p.GetStrin";
if (__ref._haypedido /*boolean*/  && _cantsmap.ContainsKey((Object)(_p.GetString("CAT_GP_ID")))) { 
_cant = (int)(BA.ObjectToNumber(_cantsmap.Get((Object)(_p.GetString("CAT_GP_ID")))));};
RDebugUtils.currentLine=25362457;
 //BA.debugLineNum = 25362457;BA.debugLine="Dim tempMap As Map = CreateMap(\"prod\":p.GetStrin";
_tempmap = new anywheresoftware.b4a.objects.collections.Map();
_tempmap = __c.createMap(new Object[] {(Object)("prod"),(Object)(_p.GetString("CAT_GP_NOMBRE")),(Object)("precio"),(Object)(_p.GetString("CAT_GP_PRECIO")),(Object)("almacen"),(Object)(_p.GetString("CAT_GP_ALMACEN")),(Object)("id"),(Object)(_p.GetString("CAT_GP_ID")),(Object)("cant"),(Object)(_cant)});
RDebugUtils.currentLine=25362458;
 //BA.debugLineNum = 25362458;BA.debugLine="listaProds.Add(tempMap)";
__ref._listaprods /*anywheresoftware.b4a.objects.collections.List*/ .Add((Object)(_tempmap.getObject()));
 }
;
RDebugUtils.currentLine=25362460;
 //BA.debugLineNum = 25362460;BA.debugLine="p.Close";
_p.Close();
RDebugUtils.currentLine=25362462;
 //BA.debugLineNum = 25362462;BA.debugLine="PCLV.Commit";
__ref._pclv /*keymon.lat.medicomed.preoptimizedclv*/ ._commit /*String*/ (null);
RDebugUtils.currentLine=25362463;
 //BA.debugLineNum = 25362463;BA.debugLine="clv_prods_ll.Clear";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._clear();
RDebugUtils.currentLine=25362464;
 //BA.debugLineNum = 25362464;BA.debugLine="Private listaProdsConCant, listaProdsConCantIndex";
_listaprodsconcant = new anywheresoftware.b4a.objects.collections.List();
_listaprodsconcantindex = new anywheresoftware.b4a.objects.collections.List();
RDebugUtils.currentLine=25362465;
 //BA.debugLineNum = 25362465;BA.debugLine="listaProdsConCant.Initialize";
_listaprodsconcant.Initialize();
RDebugUtils.currentLine=25362466;
 //BA.debugLineNum = 25362466;BA.debugLine="listaProdsConCantIndex.Initialize";
_listaprodsconcantindex.Initialize();
RDebugUtils.currentLine=25362467;
 //BA.debugLineNum = 25362467;BA.debugLine="listaHints.Initialize";
__ref._listahints /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
RDebugUtils.currentLine=25362468;
 //BA.debugLineNum = 25362468;BA.debugLine="For q=0 To listaProds.Size-1' Sacamos los product";
{
final int step29 = 1;
final int limit29 = (int) (__ref._listaprods /*anywheresoftware.b4a.objects.collections.List*/ .getSize()-1);
_q = (int) (0) ;
for (;_q <= limit29 ;_q = _q + step29 ) {
RDebugUtils.currentLine=25362469;
 //BA.debugLineNum = 25362469;BA.debugLine="If listaProds.Get(q).As(Map).Get(\"cant\").As(Int)";
if (((int)(BA.ObjectToNumber(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._listaprods /*anywheresoftware.b4a.objects.collections.List*/ .Get(_q)))).Get((Object)("cant")))))!=0) { 
RDebugUtils.currentLine=25362471;
 //BA.debugLineNum = 25362471;BA.debugLine="listaProdsConCant.Add(listaProds.Get(q))";
_listaprodsconcant.Add(__ref._listaprods /*anywheresoftware.b4a.objects.collections.List*/ .Get(_q));
RDebugUtils.currentLine=25362472;
 //BA.debugLineNum = 25362472;BA.debugLine="listaProdsConCantIndex.Add(q)";
_listaprodsconcantindex.Add((Object)(_q));
 };
 }
};
RDebugUtils.currentLine=25362476;
 //BA.debugLineNum = 25362476;BA.debugLine="Private cont As Int = 0";
_cont = (int) (0);
RDebugUtils.currentLine=25362477;
 //BA.debugLineNum = 25362477;BA.debugLine="For pr0=0 To listaProdsConCant.Size - 1 'Agregamo";
{
final int step36 = 1;
final int limit36 = (int) (_listaprodsconcant.getSize()-1);
_pr0 = (int) (0) ;
for (;_pr0 <= limit36 ;_pr0 = _pr0 + step36 ) {
RDebugUtils.currentLine=25362478;
 //BA.debugLineNum = 25362478;BA.debugLine="Private Pnl As B4XView = xui.CreatePanel(\"\")";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = __ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .CreatePanel(ba,"");
RDebugUtils.currentLine=25362479;
 //BA.debugLineNum = 25362479;BA.debugLine="Pnl.SetLayoutAnimated(0, 0, 0, clv_prods_ll.AsVi";
_pnl.SetLayoutAnimated((int) (0),(int) (0),(int) (0),__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().getWidth(),__c.DipToCurrent((int) (50)));
RDebugUtils.currentLine=25362480;
 //BA.debugLineNum = 25362480;BA.debugLine="clv_prods_ll.Add(Pnl, listaProdsConCant.Get(pr0)";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._add(_pnl,_listaprodsconcant.Get(_pr0));
RDebugUtils.currentLine=25362481;
 //BA.debugLineNum = 25362481;BA.debugLine="listaHints.Add(listaProdsConCant.get(pr0).As(Map";
__ref._listahints /*anywheresoftware.b4a.objects.collections.List*/ .Add(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(_listaprodsconcant.Get(_pr0)))).Get((Object)("prod")));
RDebugUtils.currentLine=25362482;
 //BA.debugLineNum = 25362482;BA.debugLine="cont = cont + 1";
_cont = (int) (_cont+1);
 }
};
RDebugUtils.currentLine=25362486;
 //BA.debugLineNum = 25362486;BA.debugLine="For pr=0 To listaProds.Size-1";
{
final int step43 = 1;
final int limit43 = (int) (__ref._listaprods /*anywheresoftware.b4a.objects.collections.List*/ .getSize()-1);
_pr = (int) (0) ;
for (;_pr <= limit43 ;_pr = _pr + step43 ) {
RDebugUtils.currentLine=25362487;
 //BA.debugLineNum = 25362487;BA.debugLine="If listaProdsConCantIndex.IndexOf(pr) = -1 Then";
if (_listaprodsconcantindex.IndexOf((Object)(_pr))==-1) { 
RDebugUtils.currentLine=25362488;
 //BA.debugLineNum = 25362488;BA.debugLine="Private Pnl As B4XView = xui.CreatePanel(\"\")";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = __ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .CreatePanel(ba,"");
RDebugUtils.currentLine=25362489;
 //BA.debugLineNum = 25362489;BA.debugLine="Pnl.SetLayoutAnimated(0, 0, 0, clv_prods_ll.AsV";
_pnl.SetLayoutAnimated((int) (0),(int) (0),(int) (0),__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().getWidth(),__c.DipToCurrent((int) (50)));
RDebugUtils.currentLine=25362490;
 //BA.debugLineNum = 25362490;BA.debugLine="clv_prods_ll.Add(Pnl, listaProds.Get(pr))";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._add(_pnl,__ref._listaprods /*anywheresoftware.b4a.objects.collections.List*/ .Get(_pr));
RDebugUtils.currentLine=25362491;
 //BA.debugLineNum = 25362491;BA.debugLine="listaHints.Add(listaProds.get(pr).As(Map).Get(\"";
__ref._listahints /*anywheresoftware.b4a.objects.collections.List*/ .Add(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._listaprods /*anywheresoftware.b4a.objects.collections.List*/ .Get(_pr)))).Get((Object)("prod")));
RDebugUtils.currentLine=25362492;
 //BA.debugLineNum = 25362492;BA.debugLine="cont = cont + 1";
_cont = (int) (_cont+1);
 };
 }
};
RDebugUtils.currentLine=25362499;
 //BA.debugLineNum = 25362499;BA.debugLine="PCLV.B4XSeekBar1.MaxValue = clv_prods_ll.Size";
__ref._pclv /*keymon.lat.medicomed.preoptimizedclv*/ ._b4xseekbar1 /*keymon.lat.medicomed.b4xseekbar*/ ._maxvalue /*int*/  = __ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getsize();
RDebugUtils.currentLine=25362500;
 //BA.debugLineNum = 25362500;BA.debugLine="PCLV.B4XSeekBar1.MinValue = 0";
__ref._pclv /*keymon.lat.medicomed.preoptimizedclv*/ ._b4xseekbar1 /*keymon.lat.medicomed.b4xseekbar*/ ._minvalue /*int*/  = (int) (0);
RDebugUtils.currentLine=25362501;
 //BA.debugLineNum = 25362501;BA.debugLine="PCLV.B4XSeekBar1.Interval = clv_prods_ll.Size/20";
__ref._pclv /*keymon.lat.medicomed.preoptimizedclv*/ ._b4xseekbar1 /*keymon.lat.medicomed.b4xseekbar*/ ._interval /*int*/  = (int) (__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getsize()/(double)20);
RDebugUtils.currentLine=25362502;
 //BA.debugLineNum = 25362502;BA.debugLine="PCLV.B4XSeekBar1.Value = clv_prods_ll.Size";
__ref._pclv /*keymon.lat.medicomed.preoptimizedclv*/ ._b4xseekbar1 /*keymon.lat.medicomed.b4xseekbar*/ ._setvalue /*int*/ (null,__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getsize());
RDebugUtils.currentLine=25362503;
 //BA.debugLineNum = 25362503;BA.debugLine="PCLV.B4XSeekBar1.Update";
__ref._pclv /*keymon.lat.medicomed.preoptimizedclv*/ ._b4xseekbar1 /*keymon.lat.medicomed.b4xseekbar*/ ._update /*String*/ (null);
RDebugUtils.currentLine=25362505;
 //BA.debugLineNum = 25362505;BA.debugLine="reiniciarlistaProds = False";
__ref._reiniciarlistaprods /*boolean*/  = __c.False;
RDebugUtils.currentLine=25362506;
 //BA.debugLineNum = 25362506;BA.debugLine="End Sub";
return "";
}
public String  _b_terminar1_click(keymon.lat.medicomed.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "b_terminar1_click", false))
	 {return ((String) Debug.delegate(ba, "b_terminar1_click", null));}
anywheresoftware.b4a.sql.SQL.CursorWrapper _c_prods = null;
anywheresoftware.b4a.objects.CSBuilder _cs = null;
int _i = 0;
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
int _textcolor = 0;
anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
RDebugUtils.currentLine=24313856;
 //BA.debugLineNum = 24313856;BA.debugLine="Sub b_terminar1_Click";
RDebugUtils.currentLine=24313859;
 //BA.debugLineNum = 24313859;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"delete from";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from PEDIDO WHERE PE_PRONOMBRE = ? ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("N/A")}));
RDebugUtils.currentLine=24313861;
 //BA.debugLineNum = 24313861;BA.debugLine="lv_promos.Visible = False";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=24313862;
 //BA.debugLineNum = 24313862;BA.debugLine="clv_prods_ll.AsView.Visible = False";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(__c.False);
RDebugUtils.currentLine=24313863;
 //BA.debugLineNum = 24313863;BA.debugLine="lv_catalogos.Visible = True";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=24313864;
 //BA.debugLineNum = 24313864;BA.debugLine="lv_prodsPedido.Clear";
__ref._lv_prodspedido /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=24313866;
 //BA.debugLineNum = 24313866;BA.debugLine="Private c_prods As Cursor=B4XPages.MainPage.skmt.";
_c_prods = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c_prods = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select PE_PRONOMBRE,PE_COSTO_TOT, PE_CANT, PE_FOLIO, PE_CEDIS FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa) order by PE_CEDIS, PE_PRONOMBRE")));
RDebugUtils.currentLine=24313867;
 //BA.debugLineNum = 24313867;BA.debugLine="If c_prods.RowCount > 0 Then";
if (_c_prods.getRowCount()>0) { 
RDebugUtils.currentLine=24313868;
 //BA.debugLineNum = 24313868;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=24313869;
 //BA.debugLineNum = 24313869;BA.debugLine="For i=0 To c_prods.RowCount -1";
{
final int step9 = 1;
final int limit9 = (int) (_c_prods.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit9 ;_i = _i + step9 ) {
RDebugUtils.currentLine=24313870;
 //BA.debugLineNum = 24313870;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=24313871;
 //BA.debugLineNum = 24313871;BA.debugLine="c_prods.Position=i";
_c_prods.setPosition(_i);
RDebugUtils.currentLine=24313872;
 //BA.debugLineNum = 24313872;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=24313873;
 //BA.debugLineNum = 24313873;BA.debugLine="label1 = lv_prodsPedido.TwoLinesLayout.Label";
_label1 = __ref._lv_prodspedido /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=24313874;
 //BA.debugLineNum = 24313874;BA.debugLine="label1.TextSize = 15";
_label1.setTextSize((float) (15));
RDebugUtils.currentLine=24313875;
 //BA.debugLineNum = 24313875;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=24313876;
 //BA.debugLineNum = 24313876;BA.debugLine="label1.color = Colors.White";
_label1.setColor(__c.Colors.White);
RDebugUtils.currentLine=24313877;
 //BA.debugLineNum = 24313877;BA.debugLine="Private textColor As Int = Colors.black";
_textcolor = __c.Colors.Black;
RDebugUtils.currentLine=24313878;
 //BA.debugLineNum = 24313878;BA.debugLine="If Not(IsNumber(c_prods.GetString(\"PE_CEDIS\")))";
if (__c.Not(__c.IsNumber(_c_prods.GetString("PE_CEDIS")))) { 
_textcolor = __c.Colors.RGB((int) (210),(int) (105),(int) (30));};
RDebugUtils.currentLine=24313880;
 //BA.debugLineNum = 24313880;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=24313881;
 //BA.debugLineNum = 24313881;BA.debugLine="label2 = lv_prodsPedido.TwoLinesLayout.SecondLa";
_label2 = __ref._lv_prodspedido /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=24313882;
 //BA.debugLineNum = 24313882;BA.debugLine="label2.TextSize = 15";
_label2.setTextSize((float) (15));
RDebugUtils.currentLine=24313883;
 //BA.debugLineNum = 24313883;BA.debugLine="label2.TextColor = Colors.Blue";
_label2.setTextColor(__c.Colors.Blue);
RDebugUtils.currentLine=24313884;
 //BA.debugLineNum = 24313884;BA.debugLine="lv_prodsPedido.AddTwoLines(cs.Color(textColor).";
__ref._lv_prodspedido /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddTwoLines(BA.ObjectToCharSequence(_cs.Color(_textcolor).Append(BA.ObjectToCharSequence(_c_prods.GetString("PE_PRONOMBRE"))).Pop().getObject()),BA.ObjectToCharSequence("Cantidad #"+_c_prods.GetString("PE_CANT")+" SubTotal $"+_c_prods.GetString("PE_COSTO_TOT")+" Folio "+_c_prods.GetString("PE_FOLIO")));
RDebugUtils.currentLine=24313885;
 //BA.debugLineNum = 24313885;BA.debugLine="folio = c_prods.GetString(\"PE_FOLIO\")";
__ref._folio /*String*/  = _c_prods.GetString("PE_FOLIO");
 }
};
RDebugUtils.currentLine=24313888;
 //BA.debugLineNum = 24313888;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(P";
__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 /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(PE_CANT) as PC_NOART, sum (PE_COSTO_TOT) as PC_MONTO from PEDIDO where PE_CLIENTE in (Select CUENTA from cuentaa) AND PE_PROID NOT IN (SELECT CAT_PA_ID FROM PROMOS_COMP )")));
RDebugUtils.currentLine=24313889;
 //BA.debugLineNum = 24313889;BA.debugLine="C.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=24313890;
 //BA.debugLineNum = 24313890;BA.debugLine="l_cant.Text = c.GetString(\"PC_NOART\")";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_NOART")));
RDebugUtils.currentLine=24313891;
 //BA.debugLineNum = 24313891;BA.debugLine="l_total2.Text = c.GetString(\"PC_MONTO\")";
__ref._l_total2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_MONTO")));
RDebugUtils.currentLine=24313892;
 //BA.debugLineNum = 24313892;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 };
RDebugUtils.currentLine=24313894;
 //BA.debugLineNum = 24313894;BA.debugLine="c_prods.Close";
_c_prods.Close();
RDebugUtils.currentLine=24313895;
 //BA.debugLineNum = 24313895;BA.debugLine="p_vistaPreviaTrans.Width = Root.Width";
__ref._p_vistapreviatrans /*anywheresoftware.b4a.objects.PanelWrapper*/ .setWidth(__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth());
RDebugUtils.currentLine=24313896;
 //BA.debugLineNum = 24313896;BA.debugLine="Subs.centraPanel(p_vistaPrevia, Root.Width)";
_subs._centrapanel /*String*/ (ba,__ref._p_vistaprevia /*anywheresoftware.b4a.objects.PanelWrapper*/ ,__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth());
RDebugUtils.currentLine=24313897;
 //BA.debugLineNum = 24313897;BA.debugLine="If Subs.pedidoGuardado Then b_rechazar.Enabled =";
if (_subs._pedidoguardado /*boolean*/ (ba)) { 
__ref._b_rechazar /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setEnabled(__c.False);}
else {
__ref._b_rechazar /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setEnabled(__c.True);};
RDebugUtils.currentLine=24313898;
 //BA.debugLineNum = 24313898;BA.debugLine="p_vistaPrevia.Visible=True";
__ref._p_vistaprevia /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=24313899;
 //BA.debugLineNum = 24313899;BA.debugLine="p_vistaPreviaTrans.Visible=True";
__ref._p_vistapreviatrans /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=24313900;
 //BA.debugLineNum = 24313900;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest(keymon.lat.medicomed.c_productos __ref) throws Exception{
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "b4xpage_closerequest", false))
	 {return ((anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) Debug.delegate(ba, "b4xpage_closerequest", null));}
ResumableSub_B4XPage_CloseRequest rsub = new ResumableSub_B4XPage_CloseRequest(this,__ref);
rsub.resume(ba, null);
return (anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.keywords.Common.ResumableSubWrapper(), rsub);
}
public static class ResumableSub_B4XPage_CloseRequest extends BA.ResumableSub {
public ResumableSub_B4XPage_CloseRequest(keymon.lat.medicomed.c_productos parent,keymon.lat.medicomed.c_productos __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
keymon.lat.medicomed.c_productos __ref;
keymon.lat.medicomed.c_productos parent;

@Override
public void resume(BA ba, Object[] result) throws Exception{
RDebugUtils.currentModule="c_productos";

    while (true) {
        switch (state) {
            case -1:
{
parent.__c.ReturnFromResumableSub(this,null);return;}
case 0:
//C
this.state = 1;
RDebugUtils.currentLine=23789571;
 //BA.debugLineNum = 23789571;BA.debugLine="If l_info.Visible Then";
if (true) break;

case 1:
//if
this.state = 16;
if (__ref._l_info /*anywheresoftware.b4a.objects.LabelWrapper*/ .getVisible()) { 
this.state = 3;
}else 
{RDebugUtils.currentLine=23789574;
 //BA.debugLineNum = 23789574;BA.debugLine="else if p_vistaPreviaTrans.Visible Then";
if (__ref._p_vistapreviatrans /*anywheresoftware.b4a.objects.PanelWrapper*/ .getVisible()) { 
this.state = 5;
}else 
{RDebugUtils.currentLine=23789577;
 //BA.debugLineNum = 23789577;BA.debugLine="else if lv_promos.visible Then";
if (__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getVisible()) { 
this.state = 7;
}else 
{RDebugUtils.currentLine=23789584;
 //BA.debugLineNum = 23789584;BA.debugLine="else if clv_prods_ll.AsView.Visible Then";
if (__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().getVisible()) { 
this.state = 9;
}else 
{RDebugUtils.currentLine=23789603;
 //BA.debugLineNum = 23789603;BA.debugLine="else If entro = \"4\" Then";
if ((__ref._entro /*String*/ ).equals("4")) { 
this.state = 11;
}else 
{RDebugUtils.currentLine=23789607;
 //BA.debugLineNum = 23789607;BA.debugLine="Else If entro = \"3\" Then";
if ((__ref._entro /*String*/ ).equals("3")) { 
this.state = 13;
}else {
this.state = 15;
}}}}}}
if (true) break;

case 3:
//C
this.state = 16;
RDebugUtils.currentLine=23789572;
 //BA.debugLineNum = 23789572;BA.debugLine="l_info.Visible = False";
__ref._l_info /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=23789573;
 //BA.debugLineNum = 23789573;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 if (true) break;

case 5:
//C
this.state = 16;
RDebugUtils.currentLine=23789575;
 //BA.debugLineNum = 23789575;BA.debugLine="p_vistaPreviaTrans.Visible = False";
__ref._p_vistapreviatrans /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=23789576;
 //BA.debugLineNum = 23789576;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 if (true) break;

case 7:
//C
this.state = 16;
RDebugUtils.currentLine=23789578;
 //BA.debugLineNum = 23789578;BA.debugLine="lv_promos.Visible = False";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=23789579;
 //BA.debugLineNum = 23789579;BA.debugLine="lv_catalogos.Visible = True";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.True);
RDebugUtils.currentLine=23789580;
 //BA.debugLineNum = 23789580;BA.debugLine="p_botonesVenta.Visible = False";
__ref._p_botonesventa /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=23789581;
 //BA.debugLineNum = 23789581;BA.debugLine="l_total.Visible = False";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=23789582;
 //BA.debugLineNum = 23789582;BA.debugLine="l_totProds.Visible = False";
__ref._l_totprods /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=23789583;
 //BA.debugLineNum = 23789583;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 if (true) break;

case 9:
//C
this.state = 16;
RDebugUtils.currentLine=23789585;
 //BA.debugLineNum = 23789585;BA.debugLine="lfila.text = \"CATALOGO\"";
__ref._lfila /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("CATALOGO"));
RDebugUtils.currentLine=23789586;
 //BA.debugLineNum = 23789586;BA.debugLine="clv_prods_ll.AsView.Visible = False";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(parent.__c.False);
RDebugUtils.currentLine=23789587;
 //BA.debugLineNum = 23789587;BA.debugLine="lv_subtipo.Visible = False";
__ref._lv_subtipo /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=23789588;
 //BA.debugLineNum = 23789588;BA.debugLine="p_botonesVenta.Visible = False";
__ref._p_botonesventa /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=23789589;
 //BA.debugLineNum = 23789589;BA.debugLine="l_total.Visible = False";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=23789590;
 //BA.debugLineNum = 23789590;BA.debugLine="l_totProds.Visible = False";
__ref._l_totprods /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=23789591;
 //BA.debugLineNum = 23789591;BA.debugLine="lv_catalogos.Visible = True";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.True);
RDebugUtils.currentLine=23789592;
 //BA.debugLineNum = 23789592;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 if (true) break;

case 11:
//C
this.state = 16;
RDebugUtils.currentLine=23789604;
 //BA.debugLineNum = 23789604;BA.debugLine="entro = \"3\"";
__ref._entro /*String*/  = "3";
RDebugUtils.currentLine=23789605;
 //BA.debugLineNum = 23789605;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*void*/ (null);
RDebugUtils.currentLine=23789606;
 //BA.debugLineNum = 23789606;BA.debugLine="Return True";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.True));return;};
 if (true) break;

case 13:
//C
this.state = 16;
RDebugUtils.currentLine=23789608;
 //BA.debugLineNum = 23789608;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
parent._b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=23789609;
 //BA.debugLineNum = 23789609;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 if (true) break;

case 15:
//C
this.state = 16;
RDebugUtils.currentLine=23789611;
 //BA.debugLineNum = 23789611;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
parent._b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=23789612;
 //BA.debugLineNum = 23789612;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 if (true) break;

case 16:
//C
this.state = -1;
;
RDebugUtils.currentLine=23789614;
 //BA.debugLineNum = 23789614;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b4xpage_created(keymon.lat.medicomed.c_productos __ref,anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "b4xpage_created", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_created", new Object[] {_root1}));}
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
int _i = 0;
RDebugUtils.currentLine=23330816;
 //BA.debugLineNum = 23330816;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=23330817;
 //BA.debugLineNum = 23330817;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=23330820;
 //BA.debugLineNum = 23330820;BA.debugLine="Root.LoadLayout(\"productos\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("productos",ba);
RDebugUtils.currentLine=23330821;
 //BA.debugLineNum = 23330821;BA.debugLine="ruta = File.DirInternal";
__ref._ruta /*String*/  = __c.File.getDirInternal();
RDebugUtils.currentLine=23330822;
 //BA.debugLineNum = 23330822;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
if (__c.File.Exists(__ref._ruta /*String*/ ,"kmt.db")==__c.False) { 
RDebugUtils.currentLine=23330823;
 //BA.debugLineNum = 23330823;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=23330825;
 //BA.debugLineNum = 23330825;BA.debugLine="PCLV.Initialize(Me, \"PCLV\", clv_prods_ll)";
__ref._pclv /*keymon.lat.medicomed.preoptimizedclv*/ ._initialize /*String*/ (null,ba,this,"PCLV",__ref._clv_prods_ll /*b4a.example3.customlistview*/ );
RDebugUtils.currentLine=23330826;
 //BA.debugLineNum = 23330826;BA.debugLine="ciclo = 1";
__ref._ciclo /*String*/  = BA.NumberToString(1);
RDebugUtils.currentLine=23330827;
 //BA.debugLineNum = 23330827;BA.debugLine="l_info.Width = Root.Width * 0.8";
__ref._l_info /*anywheresoftware.b4a.objects.LabelWrapper*/ .setWidth((int) (__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth()*0.8));
RDebugUtils.currentLine=23330828;
 //BA.debugLineNum = 23330828;BA.debugLine="l_info.Left = (Root.Width/2) - (l_info.Width/2)";
__ref._l_info /*anywheresoftware.b4a.objects.LabelWrapper*/ .setLeft((int) ((__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth()/(double)2)-(__ref._l_info /*anywheresoftware.b4a.objects.LabelWrapper*/ .getWidth()/(double)2)));
RDebugUtils.currentLine=23330829;
 //BA.debugLineNum = 23330829;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"select dist";
__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 /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select distinct CAT_GP_TIPO from cat_gunaprod where CAT_GP_TIPO <> 'PROMOS' order by CAT_GP_TIPO")));
RDebugUtils.currentLine=23330830;
 //BA.debugLineNum = 23330830;BA.debugLine="If c.RowCount > 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=23330831;
 //BA.debugLineNum = 23330831;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=23330832;
 //BA.debugLineNum = 23330832;BA.debugLine="label1 = lv_tipo.SingleLineLayout.Label";
_label1 = __ref._lv_tipo /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getSingleLineLayout().Label;
RDebugUtils.currentLine=23330833;
 //BA.debugLineNum = 23330833;BA.debugLine="label1.TextSize = 17";
_label1.setTextSize((float) (17));
RDebugUtils.currentLine=23330834;
 //BA.debugLineNum = 23330834;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=23330835;
 //BA.debugLineNum = 23330835;BA.debugLine="lv_tipo.Clear";
__ref._lv_tipo /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=23330836;
 //BA.debugLineNum = 23330836;BA.debugLine="For i=0 To c.RowCount-1";
{
final int step18 = 1;
final int limit18 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit18 ;_i = _i + step18 ) {
RDebugUtils.currentLine=23330837;
 //BA.debugLineNum = 23330837;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=23330838;
 //BA.debugLineNum = 23330838;BA.debugLine="lv_tipo.AddSingleLine(c.GetString(\"CAT_GP_TIPO\"";
__ref._lv_tipo /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddSingleLine(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_TIPO")));
 }
};
 };
RDebugUtils.currentLine=23330841;
 //BA.debugLineNum = 23330841;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=23330844;
 //BA.debugLineNum = 23330844;BA.debugLine="listaTiempos.Initialize";
__ref._listatiempos /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
RDebugUtils.currentLine=23330845;
 //BA.debugLineNum = 23330845;BA.debugLine="listaProds.Initialize";
__ref._listaprods /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
RDebugUtils.currentLine=23330846;
 //BA.debugLineNum = 23330846;BA.debugLine="pedidoMap.Initialize";
__ref._pedidomap /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
RDebugUtils.currentLine=23330847;
 //BA.debugLineNum = 23330847;BA.debugLine="listaHints.Initialize";
__ref._listahints /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
RDebugUtils.currentLine=23330848;
 //BA.debugLineNum = 23330848;BA.debugLine="Log(\"Llamamos LlenaProdsLL\")";
__c.LogImpl("323330848","Llamamos LlenaProdsLL",0);
RDebugUtils.currentLine=23330849;
 //BA.debugLineNum = 23330849;BA.debugLine="LlenaProdsLL(Null)";
__ref._llenaprodsll /*String*/ (null,(anywheresoftware.b4a.sql.SQL.ResultSetWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.ResultSetWrapper(), (android.database.Cursor)(__c.Null)));
RDebugUtils.currentLine=23330850;
 //BA.debugLineNum = 23330850;BA.debugLine="prodsMap.Initialize";
__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
RDebugUtils.currentLine=23330851;
 //BA.debugLineNum = 23330851;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(keymon.lat.medicomed.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
RDebugUtils.currentLine=23199744;
 //BA.debugLineNum = 23199744;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=23199745;
 //BA.debugLineNum = 23199745;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=23199746;
 //BA.debugLineNum = 23199746;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=23199747;
 //BA.debugLineNum = 23199747;BA.debugLine="Dim ruta As String";
_ruta = "";
RDebugUtils.currentLine=23199748;
 //BA.debugLineNum = 23199748;BA.debugLine="Dim q_buscar As String";
_q_buscar = "";
RDebugUtils.currentLine=23199749;
 //BA.debugLineNum = 23199749;BA.debugLine="Dim forzarBusqueda As Boolean = False";
_forzarbusqueda = __c.False;
RDebugUtils.currentLine=23199750;
 //BA.debugLineNum = 23199750;BA.debugLine="Dim skmt As SQL";
_skmt = new anywheresoftware.b4a.sql.SQL();
RDebugUtils.currentLine=23199751;
 //BA.debugLineNum = 23199751;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=23199752;
 //BA.debugLineNum = 23199752;BA.debugLine="Dim c2 As Cursor";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=23199753;
 //BA.debugLineNum = 23199753;BA.debugLine="Dim C3 As Cursor";
_c3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=23199754;
 //BA.debugLineNum = 23199754;BA.debugLine="Dim s As Cursor";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=23199755;
 //BA.debugLineNum = 23199755;BA.debugLine="Dim lv_catalogos As ListView";
_lv_catalogos = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=23199756;
 //BA.debugLineNum = 23199756;BA.debugLine="Dim lv_promos As ListView";
_lv_promos = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=23199757;
 //BA.debugLineNum = 23199757;BA.debugLine="Dim entro As String";
_entro = "";
RDebugUtils.currentLine=23199758;
 //BA.debugLineNum = 23199758;BA.debugLine="Dim gest As Button";
_gest = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=23199759;
 //BA.debugLineNum = 23199759;BA.debugLine="Dim lfila As Label";
_lfila = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=23199760;
 //BA.debugLineNum = 23199760;BA.debugLine="Dim marca As String";
_marca = "";
RDebugUtils.currentLine=23199761;
 //BA.debugLineNum = 23199761;BA.debugLine="Dim tipo As String";
_tipo = "";
RDebugUtils.currentLine=23199762;
 //BA.debugLineNum = 23199762;BA.debugLine="Dim subtipo As String";
_subtipo = "";
RDebugUtils.currentLine=23199763;
 //BA.debugLineNum = 23199763;BA.debugLine="Private BUSCA As EditText";
_busca = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=23199764;
 //BA.debugLineNum = 23199764;BA.debugLine="Dim ya_entro As String";
_ya_entro = "";
RDebugUtils.currentLine=23199765;
 //BA.debugLineNum = 23199765;BA.debugLine="Dim TIENE_PROMOS As String";
_tiene_promos = "";
RDebugUtils.currentLine=23199766;
 //BA.debugLineNum = 23199766;BA.debugLine="Dim RES As String";
_res = "";
RDebugUtils.currentLine=23199767;
 //BA.debugLineNum = 23199767;BA.debugLine="Dim S1 As Cursor";
_s1 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=23199768;
 //BA.debugLineNum = 23199768;BA.debugLine="Dim bmp As Bitmap";
_bmp = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper();
RDebugUtils.currentLine=23199769;
 //BA.debugLineNum = 23199769;BA.debugLine="Dim ciclo As String";
_ciclo = "";
RDebugUtils.currentLine=23199770;
 //BA.debugLineNum = 23199770;BA.debugLine="Private b_qr As Button";
_b_qr = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=23199771;
 //BA.debugLineNum = 23199771;BA.debugLine="Private p_productos As Panel";
_p_productos = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=23199772;
 //BA.debugLineNum = 23199772;BA.debugLine="Dim clv_productos As CustomListView";
_clv_productos = new b4a.example3.customlistview();
RDebugUtils.currentLine=23199773;
 //BA.debugLineNum = 23199773;BA.debugLine="Private ImageView1 As ImageView";
_imageview1 = new anywheresoftware.b4a.objects.ImageViewWrapper();
RDebugUtils.currentLine=23199774;
 //BA.debugLineNum = 23199774;BA.debugLine="Private Panel3 As Panel";
_panel3 = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=23199775;
 //BA.debugLineNum = 23199775;BA.debugLine="Private p_prods As Panel";
_p_prods = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=23199776;
 //BA.debugLineNum = 23199776;BA.debugLine="Private i_prod As ImageView";
_i_prod = new anywheresoftware.b4a.objects.ImageViewWrapper();
RDebugUtils.currentLine=23199777;
 //BA.debugLineNum = 23199777;BA.debugLine="Private l_prodX As Label";
_l_prodx = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=23199778;
 //BA.debugLineNum = 23199778;BA.debugLine="Private b_prodMas As Button";
_b_prodmas = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=23199779;
 //BA.debugLineNum = 23199779;BA.debugLine="Private l_pCant As Label";
_l_pcant = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=23199780;
 //BA.debugLineNum = 23199780;BA.debugLine="Private et_pCant As EditText";
_et_pcant = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=23199781;
 //BA.debugLineNum = 23199781;BA.debugLine="Private b_prodMenos As Button";
_b_prodmenos = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=23199782;
 //BA.debugLineNum = 23199782;BA.debugLine="Dim b_terminar1 As Button";
_b_terminar1 = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=23199783;
 //BA.debugLineNum = 23199783;BA.debugLine="Dim b_continuar As Button";
_b_continuar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=23199784;
 //BA.debugLineNum = 23199784;BA.debugLine="Private l_total As Label";
_l_total = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=23199785;
 //BA.debugLineNum = 23199785;BA.debugLine="Private l_totProds As Label";
_l_totprods = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=23199786;
 //BA.debugLineNum = 23199786;BA.debugLine="Dim totalProds As Int = 0";
_totalprods = (int) (0);
RDebugUtils.currentLine=23199787;
 //BA.debugLineNum = 23199787;BA.debugLine="Dim totalCompra As Float = 0";
_totalcompra = (float) (0);
RDebugUtils.currentLine=23199788;
 //BA.debugLineNum = 23199788;BA.debugLine="Dim etCantHasFocus As Boolean = False";
_etcanthasfocus = __c.False;
RDebugUtils.currentLine=23199789;
 //BA.debugLineNum = 23199789;BA.debugLine="Dim prodsMap As Map";
_prodsmap = new anywheresoftware.b4a.objects.collections.Map();
RDebugUtils.currentLine=23199790;
 //BA.debugLineNum = 23199790;BA.debugLine="Private l_Cargando As Label";
_l_cargando = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=23199791;
 //BA.debugLineNum = 23199791;BA.debugLine="Private l_info As Label";
_l_info = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=23199792;
 //BA.debugLineNum = 23199792;BA.debugLine="Private b_buscar As Button";
_b_buscar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=23199793;
 //BA.debugLineNum = 23199793;BA.debugLine="Private p_botonesVenta As Panel";
_p_botonesventa = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=23199794;
 //BA.debugLineNum = 23199794;BA.debugLine="Private lv_tipo As ListView";
_lv_tipo = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=23199795;
 //BA.debugLineNum = 23199795;BA.debugLine="Private lv_subtipo As ListView";
_lv_subtipo = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=23199796;
 //BA.debugLineNum = 23199796;BA.debugLine="Private p_vistaPreviaTrans As Panel";
_p_vistapreviatrans = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=23199797;
 //BA.debugLineNum = 23199797;BA.debugLine="Private lv_prodsPedido As ListView";
_lv_prodspedido = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=23199798;
 //BA.debugLineNum = 23199798;BA.debugLine="Private b_rechazar As Button";
_b_rechazar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=23199799;
 //BA.debugLineNum = 23199799;BA.debugLine="Private b_aceptar As Button";
_b_aceptar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=23199800;
 //BA.debugLineNum = 23199800;BA.debugLine="Private p_vistaPrevia As Panel";
_p_vistaprevia = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=23199801;
 //BA.debugLineNum = 23199801;BA.debugLine="Dim folio As String";
_folio = "";
RDebugUtils.currentLine=23199802;
 //BA.debugLineNum = 23199802;BA.debugLine="Dim result As String";
_result = "";
RDebugUtils.currentLine=23199803;
 //BA.debugLineNum = 23199803;BA.debugLine="Private l_cant As Label";
_l_cant = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=23199804;
 //BA.debugLineNum = 23199804;BA.debugLine="Private l_total2 As Label";
_l_total2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=23199805;
 //BA.debugLineNum = 23199805;BA.debugLine="Dim prodsPedidoActual As String";
_prodspedidoactual = "";
RDebugUtils.currentLine=23199806;
 //BA.debugLineNum = 23199806;BA.debugLine="Dim montoPedidoActual As String";
_montopedidoactual = "";
RDebugUtils.currentLine=23199808;
 //BA.debugLineNum = 23199808;BA.debugLine="Private clv_prods_ll As CustomListView";
_clv_prods_ll = new b4a.example3.customlistview();
RDebugUtils.currentLine=23199809;
 //BA.debugLineNum = 23199809;BA.debugLine="Private PCLV As PreoptimizedCLV";
_pclv = new keymon.lat.medicomed.preoptimizedclv();
RDebugUtils.currentLine=23199810;
 //BA.debugLineNum = 23199810;BA.debugLine="Dim listaProds As List";
_listaprods = new anywheresoftware.b4a.objects.collections.List();
RDebugUtils.currentLine=23199812;
 //BA.debugLineNum = 23199812;BA.debugLine="Dim pedidoMap As Map";
_pedidomap = new anywheresoftware.b4a.objects.collections.Map();
RDebugUtils.currentLine=23199813;
 //BA.debugLineNum = 23199813;BA.debugLine="Private p_botMasMen As Panel";
_p_botmasmen = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=23199814;
 //BA.debugLineNum = 23199814;BA.debugLine="Dim reiniciarlistaProds As Boolean= False";
_reiniciarlistaprods = __c.False;
RDebugUtils.currentLine=23199816;
 //BA.debugLineNum = 23199816;BA.debugLine="Dim listaTiempos As List";
_listatiempos = new anywheresoftware.b4a.objects.collections.List();
RDebugUtils.currentLine=23199817;
 //BA.debugLineNum = 23199817;BA.debugLine="Dim clienteId As String";
_clienteid = "";
RDebugUtils.currentLine=23199818;
 //BA.debugLineNum = 23199818;BA.debugLine="Dim rutaUsuario As String";
_rutausuario = "";
RDebugUtils.currentLine=23199819;
 //BA.debugLineNum = 23199819;BA.debugLine="Dim hayPedido As Boolean";
_haypedido = false;
RDebugUtils.currentLine=23199820;
 //BA.debugLineNum = 23199820;BA.debugLine="Dim listaHints As List";
_listahints = new anywheresoftware.b4a.objects.collections.List();
RDebugUtils.currentLine=23199821;
 //BA.debugLineNum = 23199821;BA.debugLine="Dim h As Cursor";
_h = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=23199822;
 //BA.debugLineNum = 23199822;BA.debugLine="End Sub";
return "";
}
public String  _clv_prods_ll_itemclick(keymon.lat.medicomed.c_productos __ref,int _index,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "clv_prods_ll_itemclick", false))
	 {return ((String) Debug.delegate(ba, "clv_prods_ll_itemclick", new Object[] {_index,_value}));}
RDebugUtils.currentLine=25100288;
 //BA.debugLineNum = 25100288;BA.debugLine="Private Sub clv_prods_ll_ItemClick (Index As Int,";
RDebugUtils.currentLine=25100290;
 //BA.debugLineNum = 25100290;BA.debugLine="End Sub";
return "";
}
public String  _clv_prods_ll_visiblerangechanged(keymon.lat.medicomed.c_productos __ref,int _firstindex,int _lastindex) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "clv_prods_ll_visiblerangechanged", false))
	 {return ((String) Debug.delegate(ba, "clv_prods_ll_visiblerangechanged", new Object[] {_firstindex,_lastindex}));}
int _extrasize = 0;
int _i = 0;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl = null;
anywheresoftware.b4a.objects.CSBuilder _cs = null;
String _precio = "";
RDebugUtils.currentLine=25231360;
 //BA.debugLineNum = 25231360;BA.debugLine="Private Sub clv_prods_ll_VisibleRangeChanged (Firs";
RDebugUtils.currentLine=25231363;
 //BA.debugLineNum = 25231363;BA.debugLine="Dim ExtraSize As Int = 30 'List size";
_extrasize = (int) (30);
RDebugUtils.currentLine=25231364;
 //BA.debugLineNum = 25231364;BA.debugLine="For i = Max(0, FirstIndex - ExtraSize) To Min(Las";
{
final int step2 = 1;
final int limit2 = (int) (__c.Min(_lastindex+_extrasize,__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getsize()-1));
_i = (int) (__c.Max(0,_firstindex-_extrasize)) ;
for (;_i <= limit2 ;_i = _i + step2 ) {
RDebugUtils.currentLine=25231365;
 //BA.debugLineNum = 25231365;BA.debugLine="Dim Pnl As B4XView = clv_prods_ll.GetPanel(i)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = __ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getpanel(_i);
RDebugUtils.currentLine=25231366;
 //BA.debugLineNum = 25231366;BA.debugLine="If i > FirstIndex - ExtraSize And i < LastIndex";
if (_i>_firstindex-_extrasize && _i<_lastindex+_extrasize) { 
RDebugUtils.currentLine=25231368;
 //BA.debugLineNum = 25231368;BA.debugLine="If Pnl.NumberOfViews = 0 Then 'Add each item/la";
if (_pnl.getNumberOfViews()==0) { 
RDebugUtils.currentLine=25231369;
 //BA.debugLineNum = 25231369;BA.debugLine="Pnl.LoadLayout(\"proditem\")";
_pnl.LoadLayout("proditem",ba);
RDebugUtils.currentLine=25231370;
 //BA.debugLineNum = 25231370;BA.debugLine="p_prods.Width = Root.Width * 0.92";
__ref._p_prods /*anywheresoftware.b4a.objects.PanelWrapper*/ .setWidth((int) (__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth()*0.92));
RDebugUtils.currentLine=25231371;
 //BA.debugLineNum = 25231371;BA.debugLine="p_botMasMen.Left = p_prods.Width - (p_botMasMe";
__ref._p_botmasmen /*anywheresoftware.b4a.objects.PanelWrapper*/ .setLeft((int) (__ref._p_prods /*anywheresoftware.b4a.objects.PanelWrapper*/ .getWidth()-(__ref._p_botmasmen /*anywheresoftware.b4a.objects.PanelWrapper*/ .getWidth()+5)));
RDebugUtils.currentLine=25231372;
 //BA.debugLineNum = 25231372;BA.debugLine="Pnl.Height = p_prods.Height";
_pnl.setHeight(__ref._p_prods /*anywheresoftware.b4a.objects.PanelWrapper*/ .getHeight());
RDebugUtils.currentLine=25231373;
 //BA.debugLineNum = 25231373;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=25231374;
 //BA.debugLineNum = 25231374;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=25231375;
 //BA.debugLineNum = 25231375;BA.debugLine="l_prodX.SetTextSizeAnimated(0, 13)";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .SetTextSizeAnimated((int) (0),(float) (13));
RDebugUtils.currentLine=25231376;
 //BA.debugLineNum = 25231376;BA.debugLine="If clv_prods_ll.GetValue(i).As(Map).Get(\"cant\"";
if (((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getvalue(_i)))).Get((Object)("cant"))!= null && (double)(BA.ObjectToNumber(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getvalue(_i)))).Get((Object)("cant"))))>0) { 
RDebugUtils.currentLine=25231377;
 //BA.debugLineNum = 25231377;BA.debugLine="p_prods.Color=0xFFE2EEFF";
__ref._p_prods /*anywheresoftware.b4a.objects.PanelWrapper*/ .setColor(((int)0xffe2eeff));
RDebugUtils.currentLine=25231378;
 //BA.debugLineNum = 25231378;BA.debugLine="et_pCant.TextColor=Colors.Red";
__ref._et_pcant /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setTextColor(__c.Colors.Red);
RDebugUtils.currentLine=25231379;
 //BA.debugLineNum = 25231379;BA.debugLine="If Subs.pedidoGuardado Then";
if (_subs._pedidoguardado /*boolean*/ (ba)) { 
RDebugUtils.currentLine=25231380;
 //BA.debugLineNum = 25231380;BA.debugLine="Log(\"YA SE GUARDO\")";
__c.LogImpl("325231380","YA SE GUARDO",0);
RDebugUtils.currentLine=25231381;
 //BA.debugLineNum = 25231381;BA.debugLine="et_pCant.Enabled = False";
__ref._et_pcant /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setEnabled(__c.False);
RDebugUtils.currentLine=25231383;
 //BA.debugLineNum = 25231383;BA.debugLine="b_prodMenos.Enabled = False";
__ref._b_prodmenos /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setEnabled(__c.False);
 };
 };
RDebugUtils.currentLine=25231386;
 //BA.debugLineNum = 25231386;BA.debugLine="Private precio As String=NumberFormat2(clv_pro";
_precio = __c.NumberFormat2(((double)(BA.ObjectToNumber(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getvalue(_i)))).Get((Object)("precio"))))),(int) (1),(int) (2),(int) (2),__c.False);
RDebugUtils.currentLine=25231387;
 //BA.debugLineNum = 25231387;BA.debugLine="If clv_prods_ll.GetValue(i).As(Map).Get(\"cant\"";
if (((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getvalue(_i)))).Get((Object)("cant"))!= null) { 
__ref._et_pcant /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getvalue(_i)))).Get((Object)("cant"))));};
RDebugUtils.currentLine=25231388;
 //BA.debugLineNum = 25231388;BA.debugLine="l_prodX.Text = cs.Color(Colors.red).append(clv";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_cs.Color(__c.Colors.Red).Append(BA.ObjectToCharSequence(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getvalue(_i)))).Get((Object)("prod")))).Pop().Append(BA.ObjectToCharSequence(__c.CRLF)).Append(BA.ObjectToCharSequence("Existencias: "+BA.ObjectToString(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getvalue(_i)))).Get((Object)("almacen"))))).Color(((int)0xff017f01)).Append(BA.ObjectToCharSequence(("   $"+__c.SmartStringFormatter("",(Object)(_precio))+""))).PopAll().getObject()));
 };
 }else {
 };
RDebugUtils.currentLine=25231396;
 //BA.debugLineNum = 25231396;BA.debugLine="PCLV.B4XSeekBar1.Value = clv_prods_ll.Size - Fir";
__ref._pclv /*keymon.lat.medicomed.preoptimizedclv*/ ._b4xseekbar1 /*keymon.lat.medicomed.b4xseekbar*/ ._setvalue /*int*/ (null,(int) (__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getsize()-_firstindex));
 }
};
RDebugUtils.currentLine=25231399;
 //BA.debugLineNum = 25231399;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.objects.PanelWrapper  _createlistitem(keymon.lat.medicomed.c_productos __ref,String _text,String _preciou,int _inv,int _width,int _height,anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _img,String _prodid,int _bc,int _tc) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "createlistitem", false))
	 {return ((anywheresoftware.b4a.objects.PanelWrapper) Debug.delegate(ba, "createlistitem", new Object[] {_text,_preciou,_inv,_width,_height,_img,_prodid,_bc,_tc}));}
RDebugUtils.currentLine=23920640;
 //BA.debugLineNum = 23920640;BA.debugLine="Sub CreateListItem(Text As String, precioU As Stri";
RDebugUtils.currentLine=23920655;
 //BA.debugLineNum = 23920655;BA.debugLine="End Sub";
return null;
}
public String  _et_pcant_focuschanged(keymon.lat.medicomed.c_productos __ref,boolean _hasfocus) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "et_pcant_focuschanged", false))
	 {return ((String) Debug.delegate(ba, "et_pcant_focuschanged", new Object[] {_hasfocus}));}
RDebugUtils.currentLine=24248320;
 //BA.debugLineNum = 24248320;BA.debugLine="Private Sub et_pCant_FocusChanged (HasFocus As Boo";
RDebugUtils.currentLine=24248321;
 //BA.debugLineNum = 24248321;BA.debugLine="LogColor($\"focus changed=${HasFocus}\"$, Colors.Ma";
__c.LogImpl("324248321",("focus changed="+__c.SmartStringFormatter("",(Object)(_hasfocus))+""),__c.Colors.Magenta);
RDebugUtils.currentLine=24248322;
 //BA.debugLineNum = 24248322;BA.debugLine="etCantHasFocus = HasFocus";
__ref._etcanthasfocus /*boolean*/  = _hasfocus;
RDebugUtils.currentLine=24248323;
 //BA.debugLineNum = 24248323;BA.debugLine="cuentaProds";
__ref._cuentaprods /*String*/ (null);
RDebugUtils.currentLine=24248324;
 //BA.debugLineNum = 24248324;BA.debugLine="End Sub";
return "";
}
public String  _et_pcant_textchanged(keymon.lat.medicomed.c_productos __ref,String _old,String _new) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "et_pcant_textchanged", false))
	 {return ((String) Debug.delegate(ba, "et_pcant_textchanged", new Object[] {_old,_new}));}
int _index = 0;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl0 = null;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lacant = null;
String _id = "";
String _precio = "";
String _inv = "";
RDebugUtils.currentLine=24117248;
 //BA.debugLineNum = 24117248;BA.debugLine="Private Sub et_pCant_TextChanged (Old As String, N";
RDebugUtils.currentLine=24117260;
 //BA.debugLineNum = 24117260;BA.debugLine="If etCantHasFocus = True Then";
if (__ref._etcanthasfocus /*boolean*/ ==__c.True) { 
RDebugUtils.currentLine=24117263;
 //BA.debugLineNum = 24117263;BA.debugLine="Dim index As Int = clv_prods_ll.GetItemFromView(";
_index = __ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getitemfromview((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__c.Sender(ba))));
RDebugUtils.currentLine=24117264;
 //BA.debugLineNum = 24117264;BA.debugLine="Dim pnl0 As B4XView = clv_prods_ll.GetPanel(inde";
_pnl0 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl0 = __ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getpanel(_index);
RDebugUtils.currentLine=24117265;
 //BA.debugLineNum = 24117265;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=24117266;
 //BA.debugLineNum = 24117266;BA.debugLine="Dim laCant As B4XView = pnl.GetView(2).GetView(2";
_lacant = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacant = _pnl.GetView((int) (2)).GetView((int) (2));
RDebugUtils.currentLine=24117267;
 //BA.debugLineNum = 24117267;BA.debugLine="Private id As String=clv_prods_ll.GetValue(index";
_id = BA.ObjectToString(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getvalue(_index)))).Get((Object)("id")));
RDebugUtils.currentLine=24117268;
 //BA.debugLineNum = 24117268;BA.debugLine="Private precio As String=clv_prods_ll.GetValue(i";
_precio = BA.ObjectToString(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getvalue(_index)))).Get((Object)("precio")));
RDebugUtils.currentLine=24117269;
 //BA.debugLineNum = 24117269;BA.debugLine="Private inv As String=clv_prods_ll.GetValue(inde";
_inv = BA.ObjectToString(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getvalue(_index)))).Get((Object)("almacen")));
RDebugUtils.currentLine=24117270;
 //BA.debugLineNum = 24117270;BA.debugLine="Private inv As String=clv_prods_ll.GetValue(inde";
_inv = BA.ObjectToString(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getvalue(_index)))).Get((Object)("almacen")));
RDebugUtils.currentLine=24117271;
 //BA.debugLineNum = 24117271;BA.debugLine="If(New = \"\" Or New = Null) Then New = 0";
if (((_new).equals("") || _new== null)) { 
_new = BA.NumberToString(0);};
RDebugUtils.currentLine=24117272;
 //BA.debugLineNum = 24117272;BA.debugLine="If(New > inv) Then";
if (((double)(Double.parseDouble(_new))>(double)(Double.parseDouble(_inv)))) { 
RDebugUtils.currentLine=24117273;
 //BA.debugLineNum = 24117273;BA.debugLine="Sender.As(EditText).text = inv";
((anywheresoftware.b4a.objects.EditTextWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.EditTextWrapper(), (android.widget.EditText)(__c.Sender(ba)))).setText(BA.ObjectToCharSequence(_inv));
 };
RDebugUtils.currentLine=24117276;
 //BA.debugLineNum = 24117276;BA.debugLine="If Not(Old = \"0\" And New = \"\") And laCant.Text <";
if (__c.Not((_old).equals("0") && (_new).equals("")) && _lacant.getText()!= null && (_lacant.getText()).equals(BA.NumberToString(0)) == false && (_lacant.getText()).equals("") == false && __ref._etcanthasfocus /*boolean*/ ) { 
RDebugUtils.currentLine=24117277;
 //BA.debugLineNum = 24117277;BA.debugLine="Subs.actualizaProducto(Subs.traeAlmacen, precio";
_subs._actualizaproducto /*String*/ (ba,_subs._traealmacen /*String*/ (ba),_precio,_lacant.getText(),_subs._traeprodnombre /*String*/ (ba,_id),_id,__ref._clienteid /*String*/ ,_subs._traefecha /*String*/ (ba),_subs._traeusuariodebd /*String*/ (ba),__ref._rutausuario /*String*/ ,BA.NumberToString(0),_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._tipo_venta /*String*/ );
RDebugUtils.currentLine=24117278;
 //BA.debugLineNum = 24117278;BA.debugLine="cuentaProds";
__ref._cuentaprods /*String*/ (null);
 };
 };
RDebugUtils.currentLine=24117281;
 //BA.debugLineNum = 24117281;BA.debugLine="End Sub";
return "";
}
public String  _l_info_click(keymon.lat.medicomed.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "l_info_click", false))
	 {return ((String) Debug.delegate(ba, "l_info_click", null));}
RDebugUtils.currentLine=24510464;
 //BA.debugLineNum = 24510464;BA.debugLine="Private Sub l_info_Click";
RDebugUtils.currentLine=24510465;
 //BA.debugLineNum = 24510465;BA.debugLine="l_info.Visible = False";
__ref._l_info /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=24510466;
 //BA.debugLineNum = 24510466;BA.debugLine="End Sub";
return "";
}
public String  _l_prodx_click(keymon.lat.medicomed.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "l_prodx_click", false))
	 {return ((String) Debug.delegate(ba, "l_prodx_click", null));}
int _index = 0;
anywheresoftware.b4a.objects.B4XViewWrapper _p0 = null;
anywheresoftware.b4a.objects.B4XViewWrapper _p = null;
anywheresoftware.b4a.objects.B4XViewWrapper _cant1 = null;
RDebugUtils.currentLine=25165824;
 //BA.debugLineNum = 25165824;BA.debugLine="Sub l_prodx_click";
RDebugUtils.currentLine=25165825;
 //BA.debugLineNum = 25165825;BA.debugLine="Dim index As Int = clv_prods_ll.GetItemFromView(S";
_index = __ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getitemfromview((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__c.Sender(ba))));
RDebugUtils.currentLine=25165826;
 //BA.debugLineNum = 25165826;BA.debugLine="Private p0 As B4XView = clv_prods_ll.GetPanel(ind";
_p0 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p0 = __ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getpanel(_index);
RDebugUtils.currentLine=25165827;
 //BA.debugLineNum = 25165827;BA.debugLine="Private p As B4XView = p0.GetView(0)";
_p = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p = _p0.GetView((int) (0));
RDebugUtils.currentLine=25165828;
 //BA.debugLineNum = 25165828;BA.debugLine="Private cant1 As B4XView = p.GetView(2).GetView(2";
_cant1 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_cant1 = _p.GetView((int) (2)).GetView((int) (2));
RDebugUtils.currentLine=25165829;
 //BA.debugLineNum = 25165829;BA.debugLine="Dim index As Int = clv_prods_ll.GetItemFromView(S";
_index = __ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getitemfromview((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__c.Sender(ba))));
RDebugUtils.currentLine=25165831;
 //BA.debugLineNum = 25165831;BA.debugLine="Log(cant1.Text)";
__c.LogImpl("325165831",_cant1.getText(),0);
RDebugUtils.currentLine=25165832;
 //BA.debugLineNum = 25165832;BA.debugLine="End Sub";
return "";
}
public String  _l_prodx_longclick(keymon.lat.medicomed.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "l_prodx_longclick", false))
	 {return ((String) Debug.delegate(ba, "l_prodx_longclick", null));}
RDebugUtils.currentLine=24444928;
 //BA.debugLineNum = 24444928;BA.debugLine="Private Sub l_prodX_LongClick";
RDebugUtils.currentLine=24444929;
 //BA.debugLineNum = 24444929;BA.debugLine="Log(\"longclic = \"&Sender.as(Label).tag)";
__c.LogImpl("324444929","longclic = "+BA.ObjectToString(((anywheresoftware.b4a.objects.LabelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.LabelWrapper(), (android.widget.TextView)(__c.Sender(ba)))).getTag()),0);
RDebugUtils.currentLine=24444930;
 //BA.debugLineNum = 24444930;BA.debugLine="l_info.Text = Sender.as(Label).tag";
__ref._l_info /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(((anywheresoftware.b4a.objects.LabelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.LabelWrapper(), (android.widget.TextView)(__c.Sender(ba)))).getTag()));
RDebugUtils.currentLine=24444931;
 //BA.debugLineNum = 24444931;BA.debugLine="l_info.Visible = True";
__ref._l_info /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=24444932;
 //BA.debugLineNum = 24444932;BA.debugLine="End Sub";
return "";
}
public String  _llenacatalogo(keymon.lat.medicomed.c_productos __ref,String _subtipo1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "llenacatalogo", false))
	 {return ((String) Debug.delegate(ba, "llenacatalogo", new Object[] {_subtipo1}));}
RDebugUtils.currentLine=23724032;
 //BA.debugLineNum = 23724032;BA.debugLine="Sub llenaCatalogo(subtipo1 As String)";
RDebugUtils.currentLine=23724055;
 //BA.debugLineNum = 23724055;BA.debugLine="End Sub";
return "";
}
public String  _lv_catalogos_itemclick(keymon.lat.medicomed.c_productos __ref,int _position,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "lv_catalogos_itemclick", false))
	 {return ((String) Debug.delegate(ba, "lv_catalogos_itemclick", new Object[] {_position,_value}));}
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
anywheresoftware.b4a.objects.LabelWrapper _label13 = null;
anywheresoftware.b4a.objects.LabelWrapper _label14 = null;
int _i = 0;
anywheresoftware.b4a.objects.collections.Map _tm = null;
RDebugUtils.currentLine=23527424;
 //BA.debugLineNum = 23527424;BA.debugLine="Sub lv_catalogos_ItemClick (Position As Int, Value";
RDebugUtils.currentLine=23527425;
 //BA.debugLineNum = 23527425;BA.debugLine="If Value = \"CATALOGO\" Then";
if ((_value).equals((Object)("CATALOGO"))) { 
RDebugUtils.currentLine=23527427;
 //BA.debugLineNum = 23527427;BA.debugLine="lfila.text = \"PRODUCTOS\"";
__ref._lfila /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("PRODUCTOS"));
RDebugUtils.currentLine=23527428;
 //BA.debugLineNum = 23527428;BA.debugLine="lv_catalogos.Visible = False";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=23527430;
 //BA.debugLineNum = 23527430;BA.debugLine="clv_prods_ll.AsView.Visible = True";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(__c.True);
RDebugUtils.currentLine=23527431;
 //BA.debugLineNum = 23527431;BA.debugLine="If hayPedido Then p_botonesVenta.Visible = True";
if (__ref._haypedido /*boolean*/ ) { 
__ref._p_botonesventa /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.True);};
 }else {
RDebugUtils.currentLine=23527433;
 //BA.debugLineNum = 23527433;BA.debugLine="clv_prods_ll.AsView.Visible = False";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(__c.False);
RDebugUtils.currentLine=23527434;
 //BA.debugLineNum = 23527434;BA.debugLine="lv_promos.Visible = True";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=23527435;
 //BA.debugLineNum = 23527435;BA.debugLine="lfila.text = \"PROMOCIONES\"";
__ref._lfila /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("PROMOCIONES"));
RDebugUtils.currentLine=23527436;
 //BA.debugLineNum = 23527436;BA.debugLine="lv_catalogos.Visible = False";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=23527437;
 //BA.debugLineNum = 23527437;BA.debugLine="lv_promos.Clear";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=23527438;
 //BA.debugLineNum = 23527438;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=23527439;
 //BA.debugLineNum = 23527439;BA.debugLine="label1 = lv_promos.TwoLinesLayout.Label";
_label1 = __ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=23527440;
 //BA.debugLineNum = 23527440;BA.debugLine="label1.TextSize = 15";
_label1.setTextSize((float) (15));
RDebugUtils.currentLine=23527441;
 //BA.debugLineNum = 23527441;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=23527442;
 //BA.debugLineNum = 23527442;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=23527443;
 //BA.debugLineNum = 23527443;BA.debugLine="label2 = lv_promos.TwoLinesLayout.SecondLabel";
_label2 = __ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=23527444;
 //BA.debugLineNum = 23527444;BA.debugLine="label2.TextSize = 15";
_label2.setTextSize((float) (15));
RDebugUtils.currentLine=23527445;
 //BA.debugLineNum = 23527445;BA.debugLine="label2.TextColor = Colors.Black";
_label2.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=23527446;
 //BA.debugLineNum = 23527446;BA.debugLine="Dim label13 As Label";
_label13 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=23527447;
 //BA.debugLineNum = 23527447;BA.debugLine="label13 = lv_promos.TwoLinesAndBitmap.Label";
_label13 = __ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesAndBitmap().Label;
RDebugUtils.currentLine=23527448;
 //BA.debugLineNum = 23527448;BA.debugLine="label13.TextSize = 15";
_label13.setTextSize((float) (15));
RDebugUtils.currentLine=23527449;
 //BA.debugLineNum = 23527449;BA.debugLine="label13.TextColor = Colors.Black";
_label13.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=23527450;
 //BA.debugLineNum = 23527450;BA.debugLine="Dim label14 As Label";
_label14 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=23527451;
 //BA.debugLineNum = 23527451;BA.debugLine="label14 = lv_promos.TwoLinesAndBitmap.SecondLabe";
_label14 = __ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesAndBitmap().SecondLabel;
RDebugUtils.currentLine=23527452;
 //BA.debugLineNum = 23527452;BA.debugLine="label14.TextSize = 15";
_label14.setTextSize((float) (15));
RDebugUtils.currentLine=23527453;
 //BA.debugLineNum = 23527453;BA.debugLine="label14.TextColor = Colors.Black";
_label14.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=23527454;
 //BA.debugLineNum = 23527454;BA.debugLine="lfila.text = \"PROMOS\"";
__ref._lfila /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("PROMOS"));
RDebugUtils.currentLine=23527455;
 //BA.debugLineNum = 23527455;BA.debugLine="c2=B4XPages.MainPage.skmt.ExecQuery2(\"select  CA";
__ref._c2 /*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 /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select  CAT_GP_ID, CAT_GP_NOMBRE, CAT_GP_PRECIO, CAT_GP_ALMACEN, CAT_GP_IMG from cat_gunaprod where CAT_GP_PRECIO > 0 AND  CAT_GP_ALMACEN > 0 and CAT_GP_TIPOPROD = ? AND CAT_GP_TIPO = ? AND CAT_GP_SUBTIPO = ?  AND CAT_GP_ID NOT IN (SELECT PE_PROID FROM PEDIDO WHERE PE_CLIENTE IN (Select cuenta from cuentaa) )",new String[]{BA.ObjectToString(_value),BA.ObjectToString(_value),BA.ObjectToString(_value)})));
RDebugUtils.currentLine=23527456;
 //BA.debugLineNum = 23527456;BA.debugLine="Log($\"res:${c2.RowCount}, ${Value}, ${marca}, ${";
__c.LogImpl("323527456",("res:"+__c.SmartStringFormatter("",(Object)(__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()))+", "+__c.SmartStringFormatter("",_value)+", "+__c.SmartStringFormatter("",(Object)(__ref._marca /*String*/ ))+", "+__c.SmartStringFormatter("",(Object)(__ref._tipo /*String*/ ))+""),0);
RDebugUtils.currentLine=23527457;
 //BA.debugLineNum = 23527457;BA.debugLine="If c2.RowCount > 0 Then";
if (__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=23527458;
 //BA.debugLineNum = 23527458;BA.debugLine="For i=0 To c2.RowCount -1";
{
final int step32 = 1;
final int limit32 = (int) (__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit32 ;_i = _i + step32 ) {
RDebugUtils.currentLine=23527459;
 //BA.debugLineNum = 23527459;BA.debugLine="c2.Position=i";
__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=23527460;
 //BA.debugLineNum = 23527460;BA.debugLine="Private tm As Map = Subs.procesaPromocion(c2.G";
_tm = new anywheresoftware.b4a.objects.collections.Map();
_tm = _subs._procesapromocion /*anywheresoftware.b4a.objects.collections.Map*/ (ba,__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_ID"),__ref._clienteid /*String*/ );
RDebugUtils.currentLine=23527461;
 //BA.debugLineNum = 23527461;BA.debugLine="If tm.Get(\"status\") = \"ok\" Then 'Solo muestral";
if ((_tm.Get((Object)("status"))).equals((Object)("ok"))) { 
RDebugUtils.currentLine=23527462;
 //BA.debugLineNum = 23527462;BA.debugLine="lv_promos.AddTwoLines(c2.GetString(\"CAT_GP_NO";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddTwoLines(BA.ObjectToCharSequence(__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_NOMBRE")),BA.ObjectToCharSequence("# "+__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_ALMACEN")+" $ "+__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_PRECIO")+" F:"+BA.ObjectToString(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(_tm.Get((Object)("mp"))))).Get((Object)("prodsFijosCant")))+" V:"+BA.ObjectToString(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(_tm.Get((Object)("mp"))))).Get((Object)("prodsVariablesCant")))));
 };
 }
};
 }else {
RDebugUtils.currentLine=23527466;
 //BA.debugLineNum = 23527466;BA.debugLine="ToastMessageShow(\"No hay promociones disponible";
__c.ToastMessageShow(BA.ObjectToCharSequence("No hay promociones disponibles."),__c.False);
 };
RDebugUtils.currentLine=23527468;
 //BA.debugLineNum = 23527468;BA.debugLine="c2.Close";
__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=23527469;
 //BA.debugLineNum = 23527469;BA.debugLine="entro = \"4\"";
__ref._entro /*String*/  = "4";
 };
RDebugUtils.currentLine=23527471;
 //BA.debugLineNum = 23527471;BA.debugLine="End Sub";
return "";
}
public void  _lv_catalogos2_itemclick(keymon.lat.medicomed.c_productos __ref,int _position,Object _value) throws Exception{
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "lv_catalogos2_itemclick", false))
	 {Debug.delegate(ba, "lv_catalogos2_itemclick", new Object[] {_position,_value}); return;}
ResumableSub_lv_catalogos2_ItemClick rsub = new ResumableSub_lv_catalogos2_ItemClick(this,__ref,_position,_value);
rsub.resume(ba, null);
}
public static class ResumableSub_lv_catalogos2_ItemClick extends BA.ResumableSub {
public ResumableSub_lv_catalogos2_ItemClick(keymon.lat.medicomed.c_productos parent,keymon.lat.medicomed.c_productos __ref,int _position,Object _value) {
this.parent = parent;
this.__ref = __ref;
this._position = _position;
this._value = _value;
this.__ref = parent;
}
keymon.lat.medicomed.c_productos __ref;
keymon.lat.medicomed.c_productos parent;
int _position;
Object _value;
keymon.lat.medicomed.c_cliente _cliente = null;
String _iniciocontador = "";
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
anywheresoftware.b4a.objects.LabelWrapper _label13 = null;
anywheresoftware.b4a.objects.LabelWrapper _label14 = null;
int _i = 0;
anywheresoftware.b4a.objects.collections.Map _tm = null;
int step57;
int limit57;

@Override
public void resume(BA ba, Object[] result) throws Exception{
RDebugUtils.currentModule="c_productos";

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
RDebugUtils.currentLine=23592961;
 //BA.debugLineNum = 23592961;BA.debugLine="clv_prods_ll.AsView.Visible = False";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(parent.__c.False);
RDebugUtils.currentLine=23592962;
 //BA.debugLineNum = 23592962;BA.debugLine="BUSCA.Text = \"\"";
__ref._busca /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=23592963;
 //BA.debugLineNum = 23592963;BA.debugLine="Dim cliente As C_Cliente = B4XPages.GetPage(\"Clie";
_cliente = (keymon.lat.medicomed.c_cliente)(parent._b4xpages._getpage /*Object*/ (ba,"Cliente"));
RDebugUtils.currentLine=23592964;
 //BA.debugLineNum = 23592964;BA.debugLine="Log($\"value=${Value}\"$)";
parent.__c.LogImpl("323592964",("value="+parent.__c.SmartStringFormatter("",_value)+""),0);
RDebugUtils.currentLine=23592965;
 //BA.debugLineNum = 23592965;BA.debugLine="If Value = \"PROMOS\" And cliente.cuenta <> \"N\" The";
if (true) break;

case 1:
//if
this.state = 6;
if ((_value).equals((Object)("PROMOS")) && (_cliente._cuenta /*String*/ ).equals("N") == false) { 
this.state = 3;
}else 
{RDebugUtils.currentLine=23592969;
 //BA.debugLineNum = 23592969;BA.debugLine="Else if Value = \"PROMOS\" And cliente.cuenta = \"N\"";
if ((_value).equals((Object)("PROMOS")) && (_cliente._cuenta /*String*/ ).equals("N")) { 
this.state = 5;
}}
if (true) break;

case 3:
//C
this.state = 6;
RDebugUtils.currentLine=23592966;
 //BA.debugLineNum = 23592966;BA.debugLine="entro = \"3\"";
__ref._entro /*String*/  = "3";
RDebugUtils.currentLine=23592967;
 //BA.debugLineNum = 23592967;BA.debugLine="marca = \"PROMOS\"";
__ref._marca /*String*/  = "PROMOS";
RDebugUtils.currentLine=23592968;
 //BA.debugLineNum = 23592968;BA.debugLine="tipo = \"PROMOS\"";
__ref._tipo /*String*/  = "PROMOS";
 if (true) break;

case 5:
//C
this.state = 6;
RDebugUtils.currentLine=23592970;
 //BA.debugLineNum = 23592970;BA.debugLine="entro = \"5\"";
__ref._entro /*String*/  = "5";
RDebugUtils.currentLine=23592971;
 //BA.debugLineNum = 23592971;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
parent._b4xpages._showpage /*String*/ (ba,"Cliente");
 if (true) break;
;
RDebugUtils.currentLine=23592973;
 //BA.debugLineNum = 23592973;BA.debugLine="If Value = \"PROMOS\" Then";

case 6:
//if
this.state = 11;
if ((_value).equals((Object)("PROMOS"))) { 
this.state = 8;
}else {
this.state = 10;
}if (true) break;

case 8:
//C
this.state = 11;
RDebugUtils.currentLine=23592974;
 //BA.debugLineNum = 23592974;BA.debugLine="LogColor(\"Promos\", Colors.red)";
parent.__c.LogImpl("323592974","Promos",parent.__c.Colors.Red);
RDebugUtils.currentLine=23592975;
 //BA.debugLineNum = 23592975;BA.debugLine="c2=B4XPages.MainPage.skmt.ExecQuery2(\"select  CA";
__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select  CAT_GP_ID, CAT_GP_NOMBRE, CAT_GP_PRECIO, CAT_GP_ALMACEN, CAT_GP_IMG from cat_gunaprod where CAT_GP_PRECIO > 0 AND  CAT_GP_ALMACEN > 0 and CAT_GP_TIPOPROD = ? AND CAT_GP_TIPO = ? AND CAT_GP_SUBTIPO = ?  AND CAT_GP_ID NOT IN (SELECT PE_PROID FROM PEDIDO WHERE PE_CLIENTE IN (Select cuenta from cuentaa) )",new String[]{BA.ObjectToString(_value),__ref._marca /*String*/ ,__ref._tipo /*String*/ })));
 if (true) break;

case 10:
//C
this.state = 11;
RDebugUtils.currentLine=23592977;
 //BA.debugLineNum = 23592977;BA.debugLine="LogColor(\"Catalogo\", Colors.red)";
parent.__c.LogImpl("323592977","Catalogo",parent.__c.Colors.Red);
RDebugUtils.currentLine=23592978;
 //BA.debugLineNum = 23592978;BA.debugLine="c2=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_";
__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_GP_ID, CAT_GP_NOMBRE, CAT_GP_PRECIO, CAT_GP_ALMACEN, CAT_GP_IMG, CAT_GP_TIPOPROD, CAT_GP_INICIATIVA from cat_gunaprod where CAT_GP_PRECIO > 0 AND CAT_GP_ALMACEN > 0 and CAT_GP_TIPOPROD <> 'PROMOS' ")));
 if (true) break;
;
RDebugUtils.currentLine=23592980;
 //BA.debugLineNum = 23592980;BA.debugLine="If Value = \"CATALOGO\" Then";

case 11:
//if
this.state = 28;
if ((_value).equals((Object)("CATALOGO"))) { 
this.state = 13;
}else {
this.state = 15;
}if (true) break;

case 13:
//C
this.state = 28;
RDebugUtils.currentLine=23592981;
 //BA.debugLineNum = 23592981;BA.debugLine="lv_catalogos.Visible = False";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=23592982;
 //BA.debugLineNum = 23592982;BA.debugLine="lv_promos.Visible = False";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=23592983;
 //BA.debugLineNum = 23592983;BA.debugLine="lfila.text = \"CATALOGO\"";
__ref._lfila /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("CATALOGO"));
RDebugUtils.currentLine=23592984;
 //BA.debugLineNum = 23592984;BA.debugLine="Log(\"PGS\")";
parent.__c.LogImpl("323592984","PGS",0);
RDebugUtils.currentLine=23592985;
 //BA.debugLineNum = 23592985;BA.debugLine="ProgressDialogShow(\"Cargando catalogo ...\")";
parent.__c.ProgressDialogShow(ba,BA.ObjectToCharSequence("Cargando catalogo ..."));
RDebugUtils.currentLine=23592986;
 //BA.debugLineNum = 23592986;BA.debugLine="Sleep(100)";
parent.__c.Sleep(ba,new anywheresoftware.b4a.shell.DebugResumableSub.DelegatableResumableSub(this, "c_productos", "lv_catalogos2_itemclick"),(int) (100));
this.state = 29;
return;
case 29:
//C
this.state = 28;
;
RDebugUtils.currentLine=23592987;
 //BA.debugLineNum = 23592987;BA.debugLine="Private inicioContador As String = DateTime.Now";
_iniciocontador = BA.NumberToString(parent.__c.DateTime.getNow());
RDebugUtils.currentLine=23592988;
 //BA.debugLineNum = 23592988;BA.debugLine="llenaCatalogo(False)";
__ref._llenacatalogo /*String*/ (null,BA.ObjectToString(parent.__c.False));
RDebugUtils.currentLine=23592989;
 //BA.debugLineNum = 23592989;BA.debugLine="clv_prods_ll.AsView.Visible = True";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(parent.__c.True);
RDebugUtils.currentLine=23592990;
 //BA.debugLineNum = 23592990;BA.debugLine="Log(\"PGH\")";
parent.__c.LogImpl("323592990","PGH",0);
RDebugUtils.currentLine=23592991;
 //BA.debugLineNum = 23592991;BA.debugLine="LogColor(\"TIEMPO DE PROCESO DEL CATALOGO: \" & ((";
parent.__c.LogImpl("323592991","TIEMPO DE PROCESO DEL CATALOGO: "+BA.NumberToString(((parent.__c.DateTime.getNow()-(double)(Double.parseDouble(_iniciocontador)))/(double)1000)),parent.__c.Colors.Red);
RDebugUtils.currentLine=23592992;
 //BA.debugLineNum = 23592992;BA.debugLine="ProgressDialogHide";
parent.__c.ProgressDialogHide();
RDebugUtils.currentLine=23592993;
 //BA.debugLineNum = 23592993;BA.debugLine="c2.Close";
__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 if (true) break;

case 15:
//C
this.state = 16;
RDebugUtils.currentLine=23592995;
 //BA.debugLineNum = 23592995;BA.debugLine="clv_prods_ll.AsView.Visible = False";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(parent.__c.False);
RDebugUtils.currentLine=23592996;
 //BA.debugLineNum = 23592996;BA.debugLine="lv_promos.Visible = True";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.True);
RDebugUtils.currentLine=23592997;
 //BA.debugLineNum = 23592997;BA.debugLine="lv_catalogos.Visible = False";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=23592998;
 //BA.debugLineNum = 23592998;BA.debugLine="lv_promos.Clear";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=23592999;
 //BA.debugLineNum = 23592999;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=23593000;
 //BA.debugLineNum = 23593000;BA.debugLine="label1 = lv_promos.TwoLinesLayout.Label";
_label1 = __ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=23593001;
 //BA.debugLineNum = 23593001;BA.debugLine="label1.TextSize = 15";
_label1.setTextSize((float) (15));
RDebugUtils.currentLine=23593002;
 //BA.debugLineNum = 23593002;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(parent.__c.Colors.Black);
RDebugUtils.currentLine=23593003;
 //BA.debugLineNum = 23593003;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=23593004;
 //BA.debugLineNum = 23593004;BA.debugLine="label2 = lv_promos.TwoLinesLayout.SecondLabel";
_label2 = __ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=23593005;
 //BA.debugLineNum = 23593005;BA.debugLine="label2.TextSize = 15";
_label2.setTextSize((float) (15));
RDebugUtils.currentLine=23593006;
 //BA.debugLineNum = 23593006;BA.debugLine="label2.TextColor = Colors.Black";
_label2.setTextColor(parent.__c.Colors.Black);
RDebugUtils.currentLine=23593007;
 //BA.debugLineNum = 23593007;BA.debugLine="Dim label13 As Label";
_label13 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=23593008;
 //BA.debugLineNum = 23593008;BA.debugLine="label13 = lv_promos.TwoLinesAndBitmap.Label";
_label13 = __ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesAndBitmap().Label;
RDebugUtils.currentLine=23593009;
 //BA.debugLineNum = 23593009;BA.debugLine="label13.TextSize = 15";
_label13.setTextSize((float) (15));
RDebugUtils.currentLine=23593010;
 //BA.debugLineNum = 23593010;BA.debugLine="label13.TextColor = Colors.Black";
_label13.setTextColor(parent.__c.Colors.Black);
RDebugUtils.currentLine=23593011;
 //BA.debugLineNum = 23593011;BA.debugLine="Dim label14 As Label";
_label14 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=23593012;
 //BA.debugLineNum = 23593012;BA.debugLine="label14 = lv_promos.TwoLinesAndBitmap.SecondLabe";
_label14 = __ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesAndBitmap().SecondLabel;
RDebugUtils.currentLine=23593013;
 //BA.debugLineNum = 23593013;BA.debugLine="label14.TextSize = 15";
_label14.setTextSize((float) (15));
RDebugUtils.currentLine=23593014;
 //BA.debugLineNum = 23593014;BA.debugLine="label14.TextColor = Colors.Black";
_label14.setTextColor(parent.__c.Colors.Black);
RDebugUtils.currentLine=23593015;
 //BA.debugLineNum = 23593015;BA.debugLine="lfila.text = \"PROMOS\"";
__ref._lfila /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("PROMOS"));
RDebugUtils.currentLine=23593016;
 //BA.debugLineNum = 23593016;BA.debugLine="If c2.RowCount > 0 Then";
if (true) break;

case 16:
//if
this.state = 27;
if (__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
this.state = 18;
}if (true) break;

case 18:
//C
this.state = 19;
RDebugUtils.currentLine=23593017;
 //BA.debugLineNum = 23593017;BA.debugLine="For i=0 To c2.RowCount -1";
if (true) break;

case 19:
//for
this.state = 26;
step57 = 1;
limit57 = (int) (__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
this.state = 30;
if (true) break;

case 30:
//C
this.state = 26;
if ((step57 > 0 && _i <= limit57) || (step57 < 0 && _i >= limit57)) this.state = 21;
if (true) break;

case 31:
//C
this.state = 30;
_i = ((int)(0 + _i + step57)) ;
if (true) break;

case 21:
//C
this.state = 22;
RDebugUtils.currentLine=23593018;
 //BA.debugLineNum = 23593018;BA.debugLine="c2.Position=i";
__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=23593019;
 //BA.debugLineNum = 23593019;BA.debugLine="Private tm As Map = Subs.procesaPromocion(c2.G";
_tm = new anywheresoftware.b4a.objects.collections.Map();
_tm = parent._subs._procesapromocion /*anywheresoftware.b4a.objects.collections.Map*/ (ba,__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_ID"),__ref._clienteid /*String*/ );
RDebugUtils.currentLine=23593020;
 //BA.debugLineNum = 23593020;BA.debugLine="If tm.Get(\"status\") = \"ok\" Then 'Solo muestral";
if (true) break;

case 22:
//if
this.state = 25;
if ((_tm.Get((Object)("status"))).equals((Object)("ok"))) { 
this.state = 24;
}if (true) break;

case 24:
//C
this.state = 25;
RDebugUtils.currentLine=23593021;
 //BA.debugLineNum = 23593021;BA.debugLine="lv_promos.AddTwoLines(c2.GetString(\"CAT_GP_NO";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddTwoLines(BA.ObjectToCharSequence(__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_NOMBRE")),BA.ObjectToCharSequence("# "+__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_ALMACEN")+" $ "+__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_PRECIO")+" F:"+BA.ObjectToString(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(_tm.Get((Object)("mp"))))).Get((Object)("prodsFijosCant")))+" V:"+BA.ObjectToString(((anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(_tm.Get((Object)("mp"))))).Get((Object)("prodsVariablesCant")))));
 if (true) break;

case 25:
//C
this.state = 31;
;
 if (true) break;
if (true) break;

case 26:
//C
this.state = 27;
;
 if (true) break;

case 27:
//C
this.state = 28;
;
RDebugUtils.currentLine=23593025;
 //BA.debugLineNum = 23593025;BA.debugLine="c2.Close";
__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 if (true) break;

case 28:
//C
this.state = -1;
;
RDebugUtils.currentLine=23593027;
 //BA.debugLineNum = 23593027;BA.debugLine="entro = \"4\"";
__ref._entro /*String*/  = "4";
RDebugUtils.currentLine=23593028;
 //BA.debugLineNum = 23593028;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _lv_prodspedido_itemlongclick(keymon.lat.medicomed.c_productos __ref,int _position,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "lv_prodspedido_itemlongclick", false))
	 {return ((String) Debug.delegate(ba, "lv_prodspedido_itemlongclick", new Object[] {_position,_value}));}
String _sdate = "";
String _stime = "";
String _clie_id = "";
String _usuario = "";
RDebugUtils.currentLine=25034752;
 //BA.debugLineNum = 25034752;BA.debugLine="Private Sub lv_prodsPedido_ItemLongClick (Position";
RDebugUtils.currentLine=25034753;
 //BA.debugLineNum = 25034753;BA.debugLine="Private sDate,sTime, clie_id, usuario As String";
_sdate = "";
_stime = "";
_clie_id = "";
_usuario = "";
RDebugUtils.currentLine=25034754;
 //BA.debugLineNum = 25034754;BA.debugLine="If Not(Subs.pedidoGuardado) Then";
if (__c.Not(_subs._pedidoguardado /*boolean*/ (ba))) { 
RDebugUtils.currentLine=25034755;
 //BA.debugLineNum = 25034755;BA.debugLine="result =  Msgbox2(\"Seguro que desea borrar este";
__ref._result /*String*/  = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Seguro que desea borrar este articulo?"),BA.ObjectToCharSequence("Borrar Articulo"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
RDebugUtils.currentLine=25034756;
 //BA.debugLineNum = 25034756;BA.debugLine="If result = DialogResponse.POSITIVE Then";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=25034757;
 //BA.debugLineNum = 25034757;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery2(\"select PE_";
__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 /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select PE_PROID,PE_CANT FROM PEDIDO where pe_pronombre = ? and pe_cliente in (Select CUENTA from cuentaa) ",new String[]{BA.ObjectToString(_value)})));
RDebugUtils.currentLine=25034758;
 //BA.debugLineNum = 25034758;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=25034759;
 //BA.debugLineNum = 25034759;BA.debugLine="Log(\"aqui1\")";
__c.LogImpl("325034759","aqui1",0);
RDebugUtils.currentLine=25034760;
 //BA.debugLineNum = 25034760;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update ca";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen + ? where cat_gp_id = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID"))}));
RDebugUtils.currentLine=25034761;
 //BA.debugLineNum = 25034761;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT IN";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO INVENT_X_ENVIAR (ALMACEN , PROID , CANTIDAD ) VALUES(?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_subs._traealmacen /*String*/ (ba)),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")),(Object)((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))*-1)}));
RDebugUtils.currentLine=25034762;
 //BA.debugLineNum = 25034762;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=25034763;
 //BA.debugLineNum = 25034763;BA.debugLine="Log(\"aqui2\")";
__c.LogImpl("325034763","aqui2",0);
RDebugUtils.currentLine=25034764;
 //BA.debugLineNum = 25034764;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery2(\"select cou";
__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 /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select count(*) AS CUANTOS from cat_gunaprod where  CAT_GP_ID in (select pe_cedis from pedido where pe_pronombre = ? and pe_cliente in (Select CUENTA from cuentaa)) and CAT_GP_CLASIF = 'PROMOS' AND CAT_GP_TIPO = 'PROMOS' AND CAT_GP_SUBTIPO = 'PROMOS'",new String[]{BA.ObjectToString(_value)})));
RDebugUtils.currentLine=25034765;
 //BA.debugLineNum = 25034765;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=25034766;
 //BA.debugLineNum = 25034766;BA.debugLine="If c.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")))>0) { 
RDebugUtils.currentLine=25034767;
 //BA.debugLineNum = 25034767;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"delete f";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from pedido where  pe_cedis in (select pe_cedis from pedido where pe_pronombre = ?) and pe_cliente in (Select CUENTA from cuentaa)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{_value}));
RDebugUtils.currentLine=25034768;
 //BA.debugLineNum = 25034768;BA.debugLine="Log(\"aqui3\")";
__c.LogImpl("325034768","aqui3",0);
 }else {
RDebugUtils.currentLine=25034770;
 //BA.debugLineNum = 25034770;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"delete f";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from pedido where  pe_pronombre = ?  and pe_cliente in (Select CUENTA from cuentaa)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{_value}));
RDebugUtils.currentLine=25034771;
 //BA.debugLineNum = 25034771;BA.debugLine="Log(\"aqui4\")";
__c.LogImpl("325034771","aqui4",0);
 };
RDebugUtils.currentLine=25034773;
 //BA.debugLineNum = 25034773;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=25034774;
 //BA.debugLineNum = 25034774;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=25034775;
 //BA.debugLineNum = 25034775;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=25034776;
 //BA.debugLineNum = 25034776;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUEN";
__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 /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=25034777;
 //BA.debugLineNum = 25034777;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=25034778;
 //BA.debugLineNum = 25034778;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
_clie_id = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=25034779;
 //BA.debugLineNum = 25034779;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUA";
__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 /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=25034780;
 //BA.debugLineNum = 25034780;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=25034781;
 //BA.debugLineNum = 25034781;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=25034782;
 //BA.debugLineNum = 25034782;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(";
__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 /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, count(*) as CUANTOS FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=25034783;
 //BA.debugLineNum = 25034783;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=25034784;
 //BA.debugLineNum = 25034784;BA.debugLine="If c.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")))>0) { 
RDebugUtils.currentLine=25034785;
 //BA.debugLineNum = 25034785;BA.debugLine="Log(\"aqui5\")";
__c.LogImpl("325034785","aqui5",0);
RDebugUtils.currentLine=25034786;
 //BA.debugLineNum = 25034786;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fr";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=25034787;
 //BA.debugLineNum = 25034787;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert i";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT) VALUES (?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_clie_id),(Object)(_sdate+_stime),(Object)(_usuario),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANT_CLIE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE")),(Object)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ )}));
RDebugUtils.currentLine=25034790;
 //BA.debugLineNum = 25034790;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fr";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=25034791;
 //BA.debugLineNum = 25034791;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE km";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info set gestion = 0  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
RDebugUtils.currentLine=25034792;
 //BA.debugLineNum = 25034792;BA.debugLine="h =B4XPages.MainPage.skmt.ExecQuery(\"select su";
__ref._h /*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 /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(PE_CANT) as PC_NOART, sum (PE_COSTO_TOT) as PC_MONTO from PEDIDO where PE_CLIENTE in (Select CUENTA from cuentaa) AND PE_PROID NOT IN (SELECT CAT_PA_ID FROM PROMOS_COMP )")));
RDebugUtils.currentLine=25034793;
 //BA.debugLineNum = 25034793;BA.debugLine="h.Position=0";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=25034794;
 //BA.debugLineNum = 25034794;BA.debugLine="l_cant.Text = h.GetString(\"PC_NOART\")";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_NOART")));
RDebugUtils.currentLine=25034795;
 //BA.debugLineNum = 25034795;BA.debugLine="l_total2.Text = h.GetString(\"PC_MONTO\")";
__ref._l_total2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_MONTO")));
RDebugUtils.currentLine=25034796;
 //BA.debugLineNum = 25034796;BA.debugLine="h.Close";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }else {
RDebugUtils.currentLine=25034798;
 //BA.debugLineNum = 25034798;BA.debugLine="Log(\"aqui6\")";
__c.LogImpl("325034798","aqui6",0);
RDebugUtils.currentLine=25034799;
 //BA.debugLineNum = 25034799;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fr";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=25034800;
 //BA.debugLineNum = 25034800;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE km";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info set gestion = 0  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
RDebugUtils.currentLine=25034801;
 //BA.debugLineNum = 25034801;BA.debugLine="h =B4XPages.MainPage.skmt.ExecQuery(\"select su";
__ref._h /*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 /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(PE_CANT) as PC_NOART, sum (PE_COSTO_TOT) as PC_MONTO from PEDIDO where PE_CLIENTE in (Select CUENTA from cuentaa) AND PE_PROID NOT IN (SELECT CAT_PA_ID FROM PROMOS_COMP )")));
RDebugUtils.currentLine=25034802;
 //BA.debugLineNum = 25034802;BA.debugLine="h.Position=0";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=25034803;
 //BA.debugLineNum = 25034803;BA.debugLine="l_cant.Text = 0";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(0));
RDebugUtils.currentLine=25034804;
 //BA.debugLineNum = 25034804;BA.debugLine="l_total2.Text = 0";
__ref._l_total2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(0));
RDebugUtils.currentLine=25034805;
 //BA.debugLineNum = 25034805;BA.debugLine="h.Close";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 };
RDebugUtils.currentLine=25034807;
 //BA.debugLineNum = 25034807;BA.debugLine="b_terminar1_Click";
__ref._b_terminar1_click /*String*/ (null);
 };
 }else {
RDebugUtils.currentLine=25034810;
 //BA.debugLineNum = 25034810;BA.debugLine="ToastMessageShow(\"Esta venta ya esta guardada, n";
__c.ToastMessageShow(BA.ObjectToCharSequence("Esta venta ya esta guardada, no se puede editar ni borrar."),__c.False);
 };
RDebugUtils.currentLine=25034812;
 //BA.debugLineNum = 25034812;BA.debugLine="End Sub";
return "";
}
public String  _lv_promos_itemclick(keymon.lat.medicomed.c_productos __ref,int _position,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "lv_promos_itemclick", false))
	 {return ((String) Debug.delegate(ba, "lv_promos_itemclick", new Object[] {_position,_value}));}
keymon.lat.medicomed.c_cliente _cliente = null;
keymon.lat.medicomed.c_promos _promos = null;
RDebugUtils.currentLine=23658496;
 //BA.debugLineNum = 23658496;BA.debugLine="Sub lv_promos_ItemClick (Position As Int, Value As";
RDebugUtils.currentLine=23658497;
 //BA.debugLineNum = 23658497;BA.debugLine="clv_prods_ll.AsView.Visible = False";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(__c.False);
RDebugUtils.currentLine=23658498;
 //BA.debugLineNum = 23658498;BA.debugLine="Dim cliente As C_Cliente = B4XPages.GetPage(\"Clie";
_cliente = (keymon.lat.medicomed.c_cliente)(_b4xpages._getpage /*Object*/ (ba,"Cliente"));
RDebugUtils.currentLine=23658500;
 //BA.debugLineNum = 23658500;BA.debugLine="If Value = \"PROMOS\" And cliente.cuenta <> \"N\" The";
if ((_value).equals((Object)("PROMOS")) && (_cliente._cuenta /*String*/ ).equals("N") == false) { 
RDebugUtils.currentLine=23658501;
 //BA.debugLineNum = 23658501;BA.debugLine="entro = \"3\"";
__ref._entro /*String*/  = "3";
RDebugUtils.currentLine=23658502;
 //BA.debugLineNum = 23658502;BA.debugLine="marca = \"PROMOS\"";
__ref._marca /*String*/  = "PROMOS";
RDebugUtils.currentLine=23658503;
 //BA.debugLineNum = 23658503;BA.debugLine="tipo = \"PROMOS\"";
__ref._tipo /*String*/  = "PROMOS";
 }else 
{RDebugUtils.currentLine=23658504;
 //BA.debugLineNum = 23658504;BA.debugLine="Else if Value = \"PROMOS\" And cliente.cuenta = \"N\"";
if ((_value).equals((Object)("PROMOS")) && (_cliente._cuenta /*String*/ ).equals("N")) { 
RDebugUtils.currentLine=23658505;
 //BA.debugLineNum = 23658505;BA.debugLine="entro = \"5\"";
__ref._entro /*String*/  = "5";
RDebugUtils.currentLine=23658506;
 //BA.debugLineNum = 23658506;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 }}
;
RDebugUtils.currentLine=23658508;
 //BA.debugLineNum = 23658508;BA.debugLine="If entro = \"3\" Then";
if ((__ref._entro /*String*/ ).equals("3")) { 
 }else 
{RDebugUtils.currentLine=23658510;
 //BA.debugLineNum = 23658510;BA.debugLine="Else If entro = \"4\" Then";
if ((__ref._entro /*String*/ ).equals("4")) { 
RDebugUtils.currentLine=23658511;
 //BA.debugLineNum = 23658511;BA.debugLine="Log(\"Entro = 4\")";
__c.LogImpl("323658511","Entro = 4",0);
RDebugUtils.currentLine=23658512;
 //BA.debugLineNum = 23658512;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PROID");
RDebugUtils.currentLine=23658513;
 //BA.debugLineNum = 23658513;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PROID VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{_value}));
RDebugUtils.currentLine=23658514;
 //BA.debugLineNum = 23658514;BA.debugLine="Dim promos As C_Promos = B4XPages.GetPage(\"Promo";
_promos = (keymon.lat.medicomed.c_promos)(_b4xpages._getpage /*Object*/ (ba,"Promos"));
RDebugUtils.currentLine=23658515;
 //BA.debugLineNum = 23658515;BA.debugLine="promos.laPromo = Subs.traeProdIdDeBD.Get(\"id\")";
_promos._lapromo /*String*/  = BA.ObjectToString(_subs._traeprodiddebd /*anywheresoftware.b4a.objects.collections.Map*/ (ba).Get((Object)("id")));
RDebugUtils.currentLine=23658516;
 //BA.debugLineNum = 23658516;BA.debugLine="promos.elCliente = Subs.traeUsuarioDeBD";
_promos._elcliente /*String*/  = _subs._traeusuariodebd /*String*/ (ba);
RDebugUtils.currentLine=23658517;
 //BA.debugLineNum = 23658517;BA.debugLine="B4XPages.ShowPage(\"Promos\")";
_b4xpages._showpage /*String*/ (ba,"Promos");
 }}
;
RDebugUtils.currentLine=23658519;
 //BA.debugLineNum = 23658519;BA.debugLine="End Sub";
return "";
}
public String  _lv_promos_itemlongclick(keymon.lat.medicomed.c_productos __ref,int _position,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "lv_promos_itemlongclick", false))
	 {return ((String) Debug.delegate(ba, "lv_promos_itemlongclick", new Object[] {_position,_value}));}
String _id = "";
RDebugUtils.currentLine=24576000;
 //BA.debugLineNum = 24576000;BA.debugLine="Private Sub lv_promos_ItemLongClick (Position As I";
RDebugUtils.currentLine=24576001;
 //BA.debugLineNum = 24576001;BA.debugLine="Log(\"Promo longclic = \"&Value)";
__c.LogImpl("324576001","Promo longclic = "+BA.ObjectToString(_value),0);
RDebugUtils.currentLine=24576002;
 //BA.debugLineNum = 24576002;BA.debugLine="Private id As String = \"\"";
_id = "";
RDebugUtils.currentLine=24576003;
 //BA.debugLineNum = 24576003;BA.debugLine="Dim c As Cursor = B4XPages.MainPage.skmt.ExecQuer";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select CAT_GP_ID from cat_gunaprod where CAT_GP_TIPO = 'PROMOS' and CAT_GP_NOMBRE = '"+__c.SmartStringFormatter("",_value)+"'"))));
RDebugUtils.currentLine=24576004;
 //BA.debugLineNum = 24576004;BA.debugLine="If c.RowCount > 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=24576005;
 //BA.debugLineNum = 24576005;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=24576006;
 //BA.debugLineNum = 24576006;BA.debugLine="id = c.GetString(\"CAT_GP_ID\")";
_id = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_ID");
 };
RDebugUtils.currentLine=24576008;
 //BA.debugLineNum = 24576008;BA.debugLine="l_info.Text = $\"ID: ${id}${CRLF}${Value}\"$";
__ref._l_info /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(("ID: "+__c.SmartStringFormatter("",(Object)(_id))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+""+__c.SmartStringFormatter("",_value)+"")));
RDebugUtils.currentLine=24576009;
 //BA.debugLineNum = 24576009;BA.debugLine="l_info.Visible = True";
__ref._l_info /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=24576010;
 //BA.debugLineNum = 24576010;BA.debugLine="End Sub";
return "";
}
public String  _lv_subtipo_itemclick(keymon.lat.medicomed.c_productos __ref,int _position,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "lv_subtipo_itemclick", false))
	 {return ((String) Debug.delegate(ba, "lv_subtipo_itemclick", new Object[] {_position,_value}));}
RDebugUtils.currentLine=24772608;
 //BA.debugLineNum = 24772608;BA.debugLine="Private Sub lv_subtipo_ItemClick (Position As Int,";
RDebugUtils.currentLine=24772622;
 //BA.debugLineNum = 24772622;BA.debugLine="End Sub";
return "";
}
public String  _lv_tipo_itemclick(keymon.lat.medicomed.c_productos __ref,int _position,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "lv_tipo_itemclick", false))
	 {return ((String) Debug.delegate(ba, "lv_tipo_itemclick", new Object[] {_position,_value}));}
RDebugUtils.currentLine=24707072;
 //BA.debugLineNum = 24707072;BA.debugLine="Private Sub lv_tipo_ItemClick (Position As Int, Va";
RDebugUtils.currentLine=24707090;
 //BA.debugLineNum = 24707090;BA.debugLine="End Sub";
return "";
}
public String  _p_vistapreviatrans_click(keymon.lat.medicomed.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "p_vistapreviatrans_click", false))
	 {return ((String) Debug.delegate(ba, "p_vistapreviatrans_click", null));}
RDebugUtils.currentLine=24838144;
 //BA.debugLineNum = 24838144;BA.debugLine="Private Sub p_vistaPreviaTrans_Click";
RDebugUtils.currentLine=24838146;
 //BA.debugLineNum = 24838146;BA.debugLine="End Sub";
return "";
}
public String  _pclv_addprods(keymon.lat.medicomed.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "pclv_addprods", false))
	 {return ((String) Debug.delegate(ba, "pclv_addprods", null));}
RDebugUtils.currentLine=23461888;
 //BA.debugLineNum = 23461888;BA.debugLine="Sub PCLV_AddProds";
RDebugUtils.currentLine=23461890;
 //BA.debugLineNum = 23461890;BA.debugLine="End Sub";
return "";
}
public Object  _pclv_hintrequested(keymon.lat.medicomed.c_productos __ref,int _index) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "pclv_hintrequested", false))
	 {return ((Object) Debug.delegate(ba, "pclv_hintrequested", new Object[] {_index}));}
String _word = "";
RDebugUtils.currentLine=25427968;
 //BA.debugLineNum = 25427968;BA.debugLine="Sub PCLV_HintRequested(Index As Int) As Object";
RDebugUtils.currentLine=25427969;
 //BA.debugLineNum = 25427969;BA.debugLine="Dim word As String = listaHints.get(Index)";
_word = BA.ObjectToString(__ref._listahints /*anywheresoftware.b4a.objects.collections.List*/ .Get(_index));
RDebugUtils.currentLine=25427970;
 //BA.debugLineNum = 25427970;BA.debugLine="Return word";
if (true) return (Object)(_word);
RDebugUtils.currentLine=25427971;
 //BA.debugLineNum = 25427971;BA.debugLine="End Sub";
return null;
}
}