package SHARK2.keymon.com.mx;


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, "SHARK2.keymon.com.mx.c_productos");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", SHARK2.keymon.com.mx.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 SHARK2.keymon.com.mx.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 _r = null;
public anywheresoftware.b4a.objects.collections.List _vamoaver = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _j3 = null;
public int _invtotal = 0;
public anywheresoftware.b4a.objects.EditTextWrapper _et_pcantc = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_prodmenosc = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_prodmasc = null;
public int _totalcajasmaspiezas = 0;
public int _cajas = 0;
public int _piezas = 0;
public anywheresoftware.b4a.objects.PanelWrapper _p_botmasmenc = null;
public String _tipoclienteactual = "";
public anywheresoftware.b4a.objects.collections.Map _cantsmap = null;
public b4a.example.dateutils _dateutils = null;
public SHARK2.keymon.com.mx.main _main = null;
public SHARK2.keymon.com.mx.appupdater _appupdater = null;
public SHARK2.keymon.com.mx.mapa_cliente _mapa_cliente = null;
public SHARK2.keymon.com.mx.mapa_rutas _mapa_rutas = null;
public SHARK2.keymon.com.mx.notificationservice _notificationservice = null;
public SHARK2.keymon.com.mx.pendientes _pendientes = null;
public SHARK2.keymon.com.mx.starter _starter = null;
public SHARK2.keymon.com.mx.subs _subs = null;
public SHARK2.keymon.com.mx.tracker _tracker = null;
public SHARK2.keymon.com.mx.newinst2 _newinst2 = null;
public SHARK2.keymon.com.mx.b4xpages _b4xpages = null;
public SHARK2.keymon.com.mx.b4xcollections _b4xcollections = null;
public SHARK2.keymon.com.mx.httputils2service _httputils2service = null;
public SHARK2.keymon.com.mx.xuiviewsutils _xuiviewsutils = null;
public Object  _initialize(SHARK2.keymon.com.mx.c_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=18022400;
 //BA.debugLineNum = 18022400;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=18022401;
 //BA.debugLineNum = 18022401;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=18022402;
 //BA.debugLineNum = 18022402;BA.debugLine="End Sub";
return null;
}
public String  _actualizaretiquetastotales(SHARK2.keymon.com.mx.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "actualizaretiquetastotales", false))
	 {return ((String) Debug.delegate(ba, "actualizaretiquetastotales", null));}
anywheresoftware.b4a.sql.SQL.CursorWrapper _h = null;
RDebugUtils.currentLine=19136512;
 //BA.debugLineNum = 19136512;BA.debugLine="Private Sub ActualizarEtiquetasTotales";
RDebugUtils.currentLine=19136513;
 //BA.debugLineNum = 19136513;BA.debugLine="Dim h As Cursor = B4XPages.MainPage.skmt.ExecQuer";
_h = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_h = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select ifnull(sum(PE_CANT),0) as PC_NOART, ifnull(sum (PE_COSTO_TOT),0) 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=19136514;
 //BA.debugLineNum = 19136514;BA.debugLine="h.Position = 0";
_h.setPosition((int) (0));
RDebugUtils.currentLine=19136516;
 //BA.debugLineNum = 19136516;BA.debugLine="l_cant.Text = h.GetString(\"PC_NOART\")";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_h.GetString("PC_NOART")));
RDebugUtils.currentLine=19136517;
 //BA.debugLineNum = 19136517;BA.debugLine="l_total2.Text = NumberFormat2(h.GetDouble(\"PC_MON";
__ref._l_total2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.NumberFormat2(_h.GetDouble("PC_MONTO"),(int) (1),(int) (2),(int) (2),__c.False)));
RDebugUtils.currentLine=19136519;
 //BA.debugLineNum = 19136519;BA.debugLine="h.Close";
_h.Close();
RDebugUtils.currentLine=19136520;
 //BA.debugLineNum = 19136520;BA.debugLine="End Sub";
return "";
}
public String  _actualizarlabelexistencias(SHARK2.keymon.com.mx.c_productos __ref,anywheresoftware.b4a.objects.ConcreteViewWrapper _v,String _idprod) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "actualizarlabelexistencias", false))
	 {return ((String) Debug.delegate(ba, "actualizarlabelexistencias", new Object[] {_v,_idprod}));}
anywheresoftware.b4a.objects.B4XViewWrapper _parent = null;
anywheresoftware.b4a.objects.B4XViewWrapper _child = null;
anywheresoftware.b4a.objects.LabelWrapper _lbl = null;
int _nuevostock = 0;
String _prodnombre = "";
anywheresoftware.b4a.objects.CSBuilder _cs = null;
RDebugUtils.currentLine=20578304;
 //BA.debugLineNum = 20578304;BA.debugLine="Private Sub ActualizarLabelExistencias(v As View,";
RDebugUtils.currentLine=20578307;
 //BA.debugLineNum = 20578307;BA.debugLine="Dim parent As B4XView = v.Parent";
_parent = new anywheresoftware.b4a.objects.B4XViewWrapper();
_parent = (anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_v.getParent()));
RDebugUtils.currentLine=20578311;
 //BA.debugLineNum = 20578311;BA.debugLine="For Each child As B4XView In parent.GetAllViewsRe";
_child = new anywheresoftware.b4a.objects.B4XViewWrapper();
{
final anywheresoftware.b4a.BA.IterableList group2 = _parent.GetAllViewsRecursive();
final int groupLen2 = group2.getSize()
;int index2 = 0;
;
for (; index2 < groupLen2;index2++){
_child = (anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(group2.Get(index2)));
RDebugUtils.currentLine=20578312;
 //BA.debugLineNum = 20578312;BA.debugLine="If child Is Label Then";
if (_child.getObjectOrNull() instanceof android.widget.TextView) { 
RDebugUtils.currentLine=20578313;
 //BA.debugLineNum = 20578313;BA.debugLine="Dim lbl As Label = child";
_lbl = new anywheresoftware.b4a.objects.LabelWrapper();
_lbl = (anywheresoftware.b4a.objects.LabelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.LabelWrapper(), (android.widget.TextView)(_child.getObject()));
RDebugUtils.currentLine=20578315;
 //BA.debugLineNum = 20578315;BA.debugLine="If lbl.Text.Contains(\"Existencias:\") Then";
if (_lbl.getText().contains("Existencias:")) { 
RDebugUtils.currentLine=20578316;
 //BA.debugLineNum = 20578316;BA.debugLine="Dim nuevoStock As Int = Subs.traeinventario(id";
_nuevostock = (int)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_idprod)));
RDebugUtils.currentLine=20578317;
 //BA.debugLineNum = 20578317;BA.debugLine="Dim prodNombre As String = Subs.traeProdNombre";
_prodnombre = _subs._traeprodnombre /*String*/ (ba,_idprod);
RDebugUtils.currentLine=20578319;
 //BA.debugLineNum = 20578319;BA.debugLine="Dim cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=20578320;
 //BA.debugLineNum = 20578320;BA.debugLine="cs.Initialize.Color(Colors.Red).Bold.Append(pr";
_cs.Initialize().Color(__c.Colors.Red).Bold().Append(BA.ObjectToCharSequence(_prodnombre)).Pop().Pop().Append(BA.ObjectToCharSequence(__c.CRLF)).Size((int) (12)).Color(__c.Colors.Black).Append(BA.ObjectToCharSequence("Existencias: "+BA.NumberToString(_nuevostock))).Pop();
RDebugUtils.currentLine=20578323;
 //BA.debugLineNum = 20578323;BA.debugLine="lbl.Text = cs";
_lbl.setText(BA.ObjectToCharSequence(_cs.getObject()));
RDebugUtils.currentLine=20578324;
 //BA.debugLineNum = 20578324;BA.debugLine="Exit ' Ya lo encontramos, salimos del bucle";
if (true) break;
 };
 };
 }
};
RDebugUtils.currentLine=20578328;
 //BA.debugLineNum = 20578328;BA.debugLine="End Sub";
return "";
}
public String  _actualizarlabelnombrepresentacion(SHARK2.keymon.com.mx.c_productos __ref,anywheresoftware.b4a.objects.ConcreteViewWrapper _v,String _nombrepres,int _totalunidades) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "actualizarlabelnombrepresentacion", false))
	 {return ((String) Debug.delegate(ba, "actualizarlabelnombrepresentacion", new Object[] {_v,_nombrepres,_totalunidades}));}
anywheresoftware.b4a.objects.B4XViewWrapper _parent = null;
anywheresoftware.b4a.objects.B4XViewWrapper _child = null;
anywheresoftware.b4a.objects.LabelWrapper _lbl = null;
RDebugUtils.currentLine=20774912;
 //BA.debugLineNum = 20774912;BA.debugLine="Private Sub ActualizarLabelNombrePresentacion(v As";
RDebugUtils.currentLine=20774914;
 //BA.debugLineNum = 20774914;BA.debugLine="Dim parent As B4XView = v.Parent";
_parent = new anywheresoftware.b4a.objects.B4XViewWrapper();
_parent = (anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_v.getParent()));
RDebugUtils.currentLine=20774917;
 //BA.debugLineNum = 20774917;BA.debugLine="For Each child As B4XView In parent.GetAllViewsRe";
_child = new anywheresoftware.b4a.objects.B4XViewWrapper();
{
final anywheresoftware.b4a.BA.IterableList group2 = _parent.GetAllViewsRecursive();
final int groupLen2 = group2.getSize()
;int index2 = 0;
;
for (; index2 < groupLen2;index2++){
_child = (anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(group2.Get(index2)));
RDebugUtils.currentLine=20774918;
 //BA.debugLineNum = 20774918;BA.debugLine="If child Is Label Then";
if (_child.getObjectOrNull() instanceof android.widget.TextView) { 
RDebugUtils.currentLine=20774919;
 //BA.debugLineNum = 20774919;BA.debugLine="Dim lbl As Label = child";
_lbl = new anywheresoftware.b4a.objects.LabelWrapper();
_lbl = (anywheresoftware.b4a.objects.LabelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.LabelWrapper(), (android.widget.TextView)(_child.getObject()));
RDebugUtils.currentLine=20774922;
 //BA.debugLineNum = 20774922;BA.debugLine="If lbl.Text.ToUpperCase.Contains(nombrePres.ToU";
if (_lbl.getText().toUpperCase().contains(_nombrepres.toUpperCase())) { 
RDebugUtils.currentLine=20774923;
 //BA.debugLineNum = 20774923;BA.debugLine="lbl.Text = nombrePres.ToUpperCase & \": \" & tot";
_lbl.setText(BA.ObjectToCharSequence(_nombrepres.toUpperCase()+": "+BA.NumberToString(_totalunidades)));
RDebugUtils.currentLine=20774924;
 //BA.debugLineNum = 20774924;BA.debugLine="Exit";
if (true) break;
 };
 };
 }
};
RDebugUtils.currentLine=20774928;
 //BA.debugLineNum = 20774928;BA.debugLine="End Sub";
return "";
}
public String  _actualizartotalespedido(SHARK2.keymon.com.mx.c_productos __ref,String _idclie) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "actualizartotalespedido", false))
	 {return ((String) Debug.delegate(ba, "actualizartotalespedido", new Object[] {_idclie}));}
String _sdate = "";
String _stime = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _h = null;
String _usuario = "";
RDebugUtils.currentLine=19857408;
 //BA.debugLineNum = 19857408;BA.debugLine="Private Sub ActualizarTotalesPedido(idClie As Stri";
RDebugUtils.currentLine=19857409;
 //BA.debugLineNum = 19857409;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=19857410;
 //BA.debugLineNum = 19857410;BA.debugLine="Dim sDate As String = DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=19857411;
 //BA.debugLineNum = 19857411;BA.debugLine="Dim sTime As String = DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=19857414;
 //BA.debugLineNum = 19857414;BA.debugLine="Dim h As Cursor = B4XPages.MainPage.skmt.ExecQuer";
_h = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_h = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT SUM(PE_CANT) as PC_NOART, SUM(PE_COSTO_TOT) as PC_MONTO FROM PEDIDO WHERE PE_CLIENTE = '"+_idclie+"'")));
RDebugUtils.currentLine=19857415;
 //BA.debugLineNum = 19857415;BA.debugLine="h.Position = 0";
_h.setPosition((int) (0));
RDebugUtils.currentLine=19857417;
 //BA.debugLineNum = 19857417;BA.debugLine="If h.RowCount > 0 And h.GetString(\"PC_NOART\") <>";
if (_h.getRowCount()>0 && _h.GetString("PC_NOART")!= null) { 
RDebugUtils.currentLine=19857419;
 //BA.debugLineNum = 19857419;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM pedido_cliente WHERE PC_CLIENTE = '"+_idclie+"'");
RDebugUtils.currentLine=19857421;
 //BA.debugLineNum = 19857421;BA.debugLine="Dim usuario As String = Subs.traeUsuarioDeBD 'As";
_usuario = _subs._traeusuariodebd /*String*/ (ba);
RDebugUtils.currentLine=19857422;
 //BA.debugLineNum = 19857422;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.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)(_idclie),(Object)(_sdate+" "+_stime),(Object)(_usuario),(Object)(_h.GetString("PC_NOART")),(Object)(_h.GetString("PC_MONTO")),(Object)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ )}));
RDebugUtils.currentLine=19857425;
 //BA.debugLineNum = 19857425;BA.debugLine="l_cant.Text = h.GetString(\"PC_NOART\")";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_h.GetString("PC_NOART")));
RDebugUtils.currentLine=19857426;
 //BA.debugLineNum = 19857426;BA.debugLine="l_total2.Text = NumberFormat2(h.GetDouble(\"PC_MO";
__ref._l_total2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.NumberFormat2(_h.GetDouble("PC_MONTO"),(int) (1),(int) (2),(int) (2),__c.False)));
 }else {
RDebugUtils.currentLine=19857429;
 //BA.debugLineNum = 19857429;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM pedido_cliente WHERE PC_CLIENTE = '"+_idclie+"'");
RDebugUtils.currentLine=19857430;
 //BA.debugLineNum = 19857430;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info SET gestion = 0 WHERE CAT_CL_CODIGO = '"+_idclie+"'");
RDebugUtils.currentLine=19857431;
 //BA.debugLineNum = 19857431;BA.debugLine="l_cant.Text = \"0\"";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("0"));
RDebugUtils.currentLine=19857432;
 //BA.debugLineNum = 19857432;BA.debugLine="l_total2.Text = \"0.00\"";
__ref._l_total2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("0.00"));
 };
RDebugUtils.currentLine=19857434;
 //BA.debugLineNum = 19857434;BA.debugLine="h.Close";
_h.Close();
RDebugUtils.currentLine=19857435;
 //BA.debugLineNum = 19857435;BA.debugLine="End Sub";
return "";
}
public String  _b_aceptar_click(SHARK2.keymon.com.mx.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=19726336;
 //BA.debugLineNum = 19726336;BA.debugLine="Private Sub b_aceptar_Click";
RDebugUtils.currentLine=19726337;
 //BA.debugLineNum = 19726337;BA.debugLine="p_vistaPreviaTrans.Visible=False";
__ref._p_vistapreviatrans /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=19726338;
 //BA.debugLineNum = 19726338;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=19726339;
 //BA.debugLineNum = 19726339;BA.debugLine="End Sub";
return "";
}
public String  _b_continuar_click(SHARK2.keymon.com.mx.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 _m = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _fg = null;
String _costo = "";
RDebugUtils.currentLine=19202048;
 //BA.debugLineNum = 19202048;BA.debugLine="Private Sub b_continuar_Click";
RDebugUtils.currentLine=19202049;
 //BA.debugLineNum = 19202049;BA.debugLine="Log(\"b_continuar_Click\")";
__c.LogImpl("519202049","b_continuar_Click",0);
RDebugUtils.currentLine=19202050;
 //BA.debugLineNum = 19202050;BA.debugLine="cuentaProds";
__ref._cuentaprods /*String*/ (null);
RDebugUtils.currentLine=19202052;
 //BA.debugLineNum = 19202052;BA.debugLine="Log($\"prodsMap=${prodsMap}\"$)";
__c.LogImpl("519202052",("prodsMap="+__c.SmartStringFormatter("",(Object)(__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .getObject()))+""),0);
RDebugUtils.currentLine=19202059;
 //BA.debugLineNum = 19202059;BA.debugLine="Log(\"promos-inv, prods-inv, cat-vis\")";
__c.LogImpl("519202059","promos-inv, prods-inv, cat-vis",0);
RDebugUtils.currentLine=19202060;
 //BA.debugLineNum = 19202060;BA.debugLine="lv_promos.Visible = False";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=19202061;
 //BA.debugLineNum = 19202061;BA.debugLine="clv_prods_ll.AsView.Visible = False";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(__c.False);
RDebugUtils.currentLine=19202062;
 //BA.debugLineNum = 19202062;BA.debugLine="lv_subtipo.Visible = False";
__ref._lv_subtipo /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=19202063;
 //BA.debugLineNum = 19202063;BA.debugLine="lv_tipo.Visible = False";
__ref._lv_tipo /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=19202064;
 //BA.debugLineNum = 19202064;BA.debugLine="lv_catalogos.Visible = True";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=19202065;
 //BA.debugLineNum = 19202065;BA.debugLine="Log(\"Continuar\")";
__c.LogImpl("519202065","Continuar",0);
RDebugUtils.currentLine=19202066;
 //BA.debugLineNum = 19202066;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=19202067;
 //BA.debugLineNum = 19202067;BA.debugLine="prodsPedidoActual = m.Get(\"productos\")";
__ref._prodspedidoactual /*String*/  = BA.ObjectToString(_m.Get((Object)("productos")));
RDebugUtils.currentLine=19202068;
 //BA.debugLineNum = 19202068;BA.debugLine="montoPedidoActual = m.Get(\"monto\")";
__ref._montopedidoactual /*String*/  = BA.ObjectToString(_m.Get((Object)("monto")));
RDebugUtils.currentLine=19202069;
 //BA.debugLineNum = 19202069;BA.debugLine="Dim fg As Cursor = Starter.skmt.ExecQuery(\"Select";
_fg = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_fg = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select IFNULL(sum(PE_COSTO_TOT),0) AS COSTO FROM PEDIDO WHERE PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND PE_FOLIO = 'PREVENTA_CREDITO'")));
RDebugUtils.currentLine=19202070;
 //BA.debugLineNum = 19202070;BA.debugLine="fg.Position = 0";
_fg.setPosition((int) (0));
RDebugUtils.currentLine=19202071;
 //BA.debugLineNum = 19202071;BA.debugLine="Dim costo As String = fg.GetString(\"COSTO\")";
_costo = _fg.GetString("COSTO");
RDebugUtils.currentLine=19202073;
 //BA.debugLineNum = 19202073;BA.debugLine="If costo > 0 And costo < 1000 Then";
if ((double)(Double.parseDouble(_costo))>0 && (double)(Double.parseDouble(_costo))<1000) { 
RDebugUtils.currentLine=19202074;
 //BA.debugLineNum = 19202074;BA.debugLine="result = Msgbox2($\"¿Desea continuar?${CRLF}Si ac";
__ref._result /*String*/  = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence(("¿Desea continuar?"+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Si acepta, el pedido se borrará (mínimo $1,000)."+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Si cancela, podrá seguir agregando productos.")),BA.ObjectToCharSequence("Venta Minima de Credito"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
RDebugUtils.currentLine=19202075;
 //BA.debugLineNum = 19202075;BA.debugLine="If result = DialogResponse.POSITIVE Then";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=19202076;
 //BA.debugLineNum = 19202076;BA.debugLine="Subs.borraPedidoCredito";
_subs._borrapedidocredito /*String*/ (ba);
RDebugUtils.currentLine=19202077;
 //BA.debugLineNum = 19202077;BA.debugLine="B4XPages.MainPage.promos.promosMap.Initialize";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._promos /*SHARK2.keymon.com.mx.c_promos*/ ._promosmap /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
RDebugUtils.currentLine=19202078;
 //BA.debugLineNum = 19202078;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 }else {
RDebugUtils.currentLine=19202080;
 //BA.debugLineNum = 19202080;BA.debugLine="lv_catalogos.Visible = True";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.True);
 };
 };
RDebugUtils.currentLine=19202083;
 //BA.debugLineNum = 19202083;BA.debugLine="fg.Close";
_fg.Close();
RDebugUtils.currentLine=19202084;
 //BA.debugLineNum = 19202084;BA.debugLine="End Sub";
return "";
}
public String  _cuentaprods(SHARK2.keymon.com.mx.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=19005440;
 //BA.debugLineNum = 19005440;BA.debugLine="Sub cuentaProds";
RDebugUtils.currentLine=19005442;
 //BA.debugLineNum = 19005442;BA.debugLine="Log(\"===========================\")";
__c.LogImpl("519005442","===========================",0);
RDebugUtils.currentLine=19005443;
 //BA.debugLineNum = 19005443;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 /*SHARK2.keymon.com.mx.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=19005446;
 //BA.debugLineNum = 19005446;BA.debugLine="p_botonesVenta.Visible = True";
__ref._p_botonesventa /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=19005447;
 //BA.debugLineNum = 19005447;BA.debugLine="p_botonesVenta.BringToFront";
__ref._p_botonesventa /*anywheresoftware.b4a.objects.PanelWrapper*/ .BringToFront();
RDebugUtils.currentLine=19005448;
 //BA.debugLineNum = 19005448;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=19005450;
 //BA.debugLineNum = 19005450;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=19005452;
 //BA.debugLineNum = 19005452;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmas_click(SHARK2.keymon.com.mx.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;
anywheresoftware.b4a.objects.B4XViewWrapper _panelcajas = null;
anywheresoftware.b4a.objects.B4XViewWrapper _panelpiezas = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lacant2 = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lprodx = null;
String _precio = "";
String _inv = "";
String _existencias = "";
String _id = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _fg = null;
String _nombrex = "";
anywheresoftware.b4a.objects.CSBuilder _cs = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _o = null;
String _invactualizado = "";
int _maxcajas = 0;
RDebugUtils.currentLine=18808832;
 //BA.debugLineNum = 18808832;BA.debugLine="Sub b_prodMas_Click";
RDebugUtils.currentLine=18808833;
 //BA.debugLineNum = 18808833;BA.debugLine="totalcajasmaspiezas = 0";
__ref._totalcajasmaspiezas /*int*/  = (int) (0);
RDebugUtils.currentLine=18808834;
 //BA.debugLineNum = 18808834;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=18808835;
 //BA.debugLineNum = 18808835;BA.debugLine="Root.RequestFocus";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .RequestFocus();
RDebugUtils.currentLine=18808838;
 //BA.debugLineNum = 18808838;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=18808839;
 //BA.debugLineNum = 18808839;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=18808840;
 //BA.debugLineNum = 18808840;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=18808841;
 //BA.debugLineNum = 18808841;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=18808842;
 //BA.debugLineNum = 18808842;BA.debugLine="Dim panelcajas As B4XView = pnl.GetView(3)";
_panelcajas = new anywheresoftware.b4a.objects.B4XViewWrapper();
_panelcajas = _pnl.GetView((int) (3));
RDebugUtils.currentLine=18808843;
 //BA.debugLineNum = 18808843;BA.debugLine="Dim panelpiezas As B4XView = pnl.GetView(2)";
_panelpiezas = new anywheresoftware.b4a.objects.B4XViewWrapper();
_panelpiezas = _pnl.GetView((int) (2));
RDebugUtils.currentLine=18808844;
 //BA.debugLineNum = 18808844;BA.debugLine="Dim laCant2 As B4XView = pnl.GetView(3).GetView(2";
_lacant2 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacant2 = _pnl.GetView((int) (3)).GetView((int) (2));
RDebugUtils.currentLine=18808845;
 //BA.debugLineNum = 18808845;BA.debugLine="Dim lProdX As B4XView = pnl.GetView(1)";
_lprodx = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lprodx = _pnl.GetView((int) (1));
RDebugUtils.currentLine=18808848;
 //BA.debugLineNum = 18808848;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=18808849;
 //BA.debugLineNum = 18808849;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=18808850;
 //BA.debugLineNum = 18808850;BA.debugLine="Private existencias As String = clv_prods_ll.GetV";
_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(_index)))).Get((Object)("almacen")));
RDebugUtils.currentLine=18808851;
 //BA.debugLineNum = 18808851;BA.debugLine="Log($\"Existencias: ${existencias}\"$)";
__c.LogImpl("518808851",("Existencias: "+__c.SmartStringFormatter("",(Object)(_existencias))+""),0);
RDebugUtils.currentLine=18808852;
 //BA.debugLineNum = 18808852;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=18808853;
 //BA.debugLineNum = 18808853;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=18808870;
 //BA.debugLineNum = 18808870;BA.debugLine="Log(B4XPages.MainPage.tipo_venta)";
__c.LogImpl("518808870",_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,0);
RDebugUtils.currentLine=18808871;
 //BA.debugLineNum = 18808871;BA.debugLine="Log(B4XPages.MainPage.cliente.credito_diponible)";
__c.LogImpl("518808871",_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*SHARK2.keymon.com.mx.c_cliente*/ ._credito_diponible /*String*/ ,0);
RDebugUtils.currentLine=18808872;
 //BA.debugLineNum = 18808872;BA.debugLine="LogColor(laCant.Text,Colors.Red)";
__c.LogImpl("518808872",_lacant.getText(),__c.Colors.Red);
RDebugUtils.currentLine=18808873;
 //BA.debugLineNum = 18808873;BA.debugLine="If B4XPages.MainPage.tipo_venta = \"PREVENTA_CREDI";
if ((_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ).equals("PREVENTA_CREDITO")) { 
RDebugUtils.currentLine=18808874;
 //BA.debugLineNum = 18808874;BA.debugLine="Dim fg As Cursor = Starter.skmt.ExecQuery(\"Selec";
_fg = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_fg = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select IFNULL(sum(PE_COSTO_TOT),0) AS COSTO FROM PEDIDO WHERE PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND PE_FOLIO = 'PREVENTA_CREDITO'")));
RDebugUtils.currentLine=18808875;
 //BA.debugLineNum = 18808875;BA.debugLine="fg.Position = 0";
_fg.setPosition((int) (0));
RDebugUtils.currentLine=18808877;
 //BA.debugLineNum = 18808877;BA.debugLine="If fg.GetString(\"COSTO\") + precio <= B4XPages.Ma";
if ((double)(Double.parseDouble(_fg.GetString("COSTO")))+(double)(Double.parseDouble(_precio))<=(double)(Double.parseDouble(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*SHARK2.keymon.com.mx.c_cliente*/ ._credito_diponible /*String*/ ))) { 
RDebugUtils.currentLine=18808878;
 //BA.debugLineNum = 18808878;BA.debugLine="If Subs.traeinventario(id) > 0 And (laCant.Text";
if ((double)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_id)))>0 && ((double)(Double.parseDouble(_lacant.getText()))<=((double)(Double.parseDouble(_lacant.getText()))+(double)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_id)))))) { 
RDebugUtils.currentLine=18808880;
 //BA.debugLineNum = 18808880;BA.debugLine="clv_prods_ll.GetValue(index).As(Map).Put(\"alma";
((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)))).Put((Object)("almacen"),(Object)(((double)(Double.parseDouble(_inv))-1)));
RDebugUtils.currentLine=18808881;
 //BA.debugLineNum = 18808881;BA.debugLine="inv = inv - 1";
_inv = BA.NumberToString((double)(Double.parseDouble(_inv))-1);
RDebugUtils.currentLine=18808883;
 //BA.debugLineNum = 18808883;BA.debugLine="laCant.Text = NumberFormat2((laCant.Text + 1),";
_lacant.setText(BA.ObjectToCharSequence(__c.NumberFormat2(((double)(Double.parseDouble(_lacant.getText()))+1),(int) (1),(int) (0),(int) (0),__c.False)));
 };
RDebugUtils.currentLine=18808886;
 //BA.debugLineNum = 18808886;BA.debugLine="Private nombreX As String = Subs.traeProdNombre";
_nombrex = _subs._traeprodnombre /*String*/ (ba,_id);
RDebugUtils.currentLine=18808889;
 //BA.debugLineNum = 18808889;BA.debugLine="If laCant.Text > 0 Then";
if ((double)(Double.parseDouble(_lacant.getText()))>0) { 
RDebugUtils.currentLine=18808890;
 //BA.debugLineNum = 18808890;BA.debugLine="panelcajas.Visible = False";
_panelcajas.setVisible(__c.False);
 }else 
{RDebugUtils.currentLine=18808891;
 //BA.debugLineNum = 18808891;BA.debugLine="Else If laCant.Text = 0 Then";
if ((_lacant.getText()).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=18808892;
 //BA.debugLineNum = 18808892;BA.debugLine="panelcajas.Visible = True";
_panelcajas.setVisible(__c.True);
 }}
;
RDebugUtils.currentLine=18808895;
 //BA.debugLineNum = 18808895;BA.debugLine="LogColor(laCant.Text,Colors.Red)";
__c.LogImpl("518808895",_lacant.getText(),__c.Colors.Red);
RDebugUtils.currentLine=18808902;
 //BA.debugLineNum = 18808902;BA.debugLine="Subs.actualizaProducto(Subs.traeAlmacen, precio";
_subs._actualizaproducto /*String*/ (ba,_subs._traealmacen /*String*/ (ba),_precio,(int)(Double.parseDouble(_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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,BA.NumberToString(0),BA.NumberToString(0));
RDebugUtils.currentLine=18808903;
 //BA.debugLineNum = 18808903;BA.debugLine="cuentaProds";
__ref._cuentaprods /*String*/ (null);
RDebugUtils.currentLine=18808905;
 //BA.debugLineNum = 18808905;BA.debugLine="If 1 = 1 Then";
if (1==1) { 
RDebugUtils.currentLine=18808906;
 //BA.debugLineNum = 18808906;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=18808907;
 //BA.debugLineNum = 18808907;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=18808908;
 //BA.debugLineNum = 18808908;BA.debugLine="Private o As Cursor = Starter.skmt.ExecQuery($";
_o = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_o = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select CAT_GP_ALMACEN from "+__c.SmartStringFormatter("",(Object)(_starter._tabla /*String*/ ))+" where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_id))+"'"))));
RDebugUtils.currentLine=18808909;
 //BA.debugLineNum = 18808909;BA.debugLine="Private invActualizado As String = \"0\"";
_invactualizado = "0";
RDebugUtils.currentLine=18808910;
 //BA.debugLineNum = 18808910;BA.debugLine="If o.RowCount > 0 Then";
if (_o.getRowCount()>0) { 
RDebugUtils.currentLine=18808911;
 //BA.debugLineNum = 18808911;BA.debugLine="o.Position = 0";
_o.setPosition((int) (0));
RDebugUtils.currentLine=18808912;
 //BA.debugLineNum = 18808912;BA.debugLine="invActualizado = o.GetString(\"CAT_GP_ALMACEN\"";
_invactualizado = _o.GetString("CAT_GP_ALMACEN");
 };
RDebugUtils.currentLine=18808914;
 //BA.debugLineNum = 18808914;BA.debugLine="If clv_prods_ll.GetValue(index).As(Map).Get(\"p";
if (((float)(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(_index)))).Get((Object)("precio_caja")))))==0 || ((int)(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(_index)))).Get((Object)("conversion")))))==1) { 
RDebugUtils.currentLine=18808915;
 //BA.debugLineNum = 18808915;BA.debugLine="Private maxcajas As Int = 0";
_maxcajas = (int) (0);
RDebugUtils.currentLine=18808916;
 //BA.debugLineNum = 18808916;BA.debugLine="Log(\"cajas a 0\")";
__c.LogImpl("518808916","cajas a 0",0);
 }else {
RDebugUtils.currentLine=18808918;
 //BA.debugLineNum = 18808918;BA.debugLine="Private maxcajas As Int = invActualizado/clv_";
_maxcajas = (int) ((double)(Double.parseDouble(_invactualizado))/(double)(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(_index)))).Get((Object)("conversion")))));
RDebugUtils.currentLine=18808919;
 //BA.debugLineNum = 18808919;BA.debugLine="Log(\"cajas no a 0\")";
__c.LogImpl("518808919","cajas no a 0",0);
 };
RDebugUtils.currentLine=18808921;
 //BA.debugLineNum = 18808921;BA.debugLine="If 2 = 2 Then lProdX.Text = cs.Color(Colors.re";
if (2==2) { 
_lprodx.setText(BA.ObjectToCharSequence(_cs.Color(__c.Colors.Red).Append(BA.ObjectToCharSequence(_nombrex)).Pop().Append(BA.ObjectToCharSequence(__c.CRLF)).Append(BA.ObjectToCharSequence("Existencias: "+_invactualizado)).Color(((int)0xff017f01)).Append(BA.ObjectToCharSequence(("   $"+__c.SmartStringFormatter("",(Object)(__c.NumberFormat2((double)(Double.parseDouble(_precio)),(int) (1),(int) (2),(int) (2),__c.False)))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Max. Cajas: "+__c.SmartStringFormatter("",(Object)(_maxcajas))+""))).PopAll().getObject()));};
 };
RDebugUtils.currentLine=18808924;
 //BA.debugLineNum = 18808924;BA.debugLine="invTotal = totalcajasmaspiezas + Subs.traeinven";
__ref._invtotal /*int*/  = (int) (__ref._totalcajasmaspiezas /*int*/ +(double)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_id))));
 }else {
RDebugUtils.currentLine=18808927;
 //BA.debugLineNum = 18808927;BA.debugLine="MsgboxAsync(\"No se puede meter mas venta a cred";
__c.MsgboxAsync(BA.ObjectToCharSequence("No se puede meter mas venta a credito por que supera el limite del credito"),BA.ObjectToCharSequence("Atencion"),ba);
 };
 }else {
RDebugUtils.currentLine=18808930;
 //BA.debugLineNum = 18808930;BA.debugLine="If Subs.traeinventario(id) > 0 And (laCant.Text";
if ((double)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_id)))>0 && ((double)(Double.parseDouble(_lacant.getText()))<=((double)(Double.parseDouble(_lacant.getText()))+(double)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_id)))))) { 
RDebugUtils.currentLine=18808932;
 //BA.debugLineNum = 18808932;BA.debugLine="clv_prods_ll.GetValue(index).As(Map).Put(\"almac";
((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)))).Put((Object)("almacen"),(Object)(((double)(Double.parseDouble(_inv))-1)));
RDebugUtils.currentLine=18808933;
 //BA.debugLineNum = 18808933;BA.debugLine="inv = inv - 1";
_inv = BA.NumberToString((double)(Double.parseDouble(_inv))-1);
RDebugUtils.currentLine=18808935;
 //BA.debugLineNum = 18808935;BA.debugLine="laCant.Text = NumberFormat2((laCant.Text + 1),";
_lacant.setText(BA.ObjectToCharSequence(__c.NumberFormat2(((double)(Double.parseDouble(_lacant.getText()))+1),(int) (1),(int) (0),(int) (0),__c.False)));
 };
RDebugUtils.currentLine=18808938;
 //BA.debugLineNum = 18808938;BA.debugLine="Private nombreX As String = Subs.traeProdNombre(";
_nombrex = _subs._traeprodnombre /*String*/ (ba,_id);
RDebugUtils.currentLine=18808941;
 //BA.debugLineNum = 18808941;BA.debugLine="If laCant.Text > 0 Then";
if ((double)(Double.parseDouble(_lacant.getText()))>0) { 
RDebugUtils.currentLine=18808942;
 //BA.debugLineNum = 18808942;BA.debugLine="panelcajas.Visible = False";
_panelcajas.setVisible(__c.False);
 }else 
{RDebugUtils.currentLine=18808943;
 //BA.debugLineNum = 18808943;BA.debugLine="Else If laCant.Text = 0 Then";
if ((_lacant.getText()).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=18808944;
 //BA.debugLineNum = 18808944;BA.debugLine="panelcajas.Visible = True";
_panelcajas.setVisible(__c.True);
 }}
;
RDebugUtils.currentLine=18808947;
 //BA.debugLineNum = 18808947;BA.debugLine="LogColor(laCant.Text,Colors.Red)";
__c.LogImpl("518808947",_lacant.getText(),__c.Colors.Red);
RDebugUtils.currentLine=18808954;
 //BA.debugLineNum = 18808954;BA.debugLine="Subs.actualizaProducto(Subs.traeAlmacen, precio,";
_subs._actualizaproducto /*String*/ (ba,_subs._traealmacen /*String*/ (ba),_precio,(int)(Double.parseDouble(_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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,BA.NumberToString(0),BA.NumberToString(0));
RDebugUtils.currentLine=18808955;
 //BA.debugLineNum = 18808955;BA.debugLine="cuentaProds";
__ref._cuentaprods /*String*/ (null);
RDebugUtils.currentLine=18808957;
 //BA.debugLineNum = 18808957;BA.debugLine="If 1 = 1 Then";
if (1==1) { 
RDebugUtils.currentLine=18808958;
 //BA.debugLineNum = 18808958;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=18808959;
 //BA.debugLineNum = 18808959;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=18808960;
 //BA.debugLineNum = 18808960;BA.debugLine="Private o As Cursor = Starter.skmt.ExecQuery($\"";
_o = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_o = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select CAT_GP_ALMACEN from "+__c.SmartStringFormatter("",(Object)(_starter._tabla /*String*/ ))+" where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_id))+"'"))));
RDebugUtils.currentLine=18808961;
 //BA.debugLineNum = 18808961;BA.debugLine="Private invActualizado As String = \"0\"";
_invactualizado = "0";
RDebugUtils.currentLine=18808962;
 //BA.debugLineNum = 18808962;BA.debugLine="If o.RowCount > 0 Then";
if (_o.getRowCount()>0) { 
RDebugUtils.currentLine=18808963;
 //BA.debugLineNum = 18808963;BA.debugLine="o.Position = 0";
_o.setPosition((int) (0));
RDebugUtils.currentLine=18808964;
 //BA.debugLineNum = 18808964;BA.debugLine="invActualizado = o.GetString(\"CAT_GP_ALMACEN\")";
_invactualizado = _o.GetString("CAT_GP_ALMACEN");
 };
RDebugUtils.currentLine=18808966;
 //BA.debugLineNum = 18808966;BA.debugLine="If clv_prods_ll.GetValue(index).As(Map).Get(\"pr";
if (((float)(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(_index)))).Get((Object)("precio_caja")))))==0 || ((int)(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(_index)))).Get((Object)("conversion")))))==1) { 
RDebugUtils.currentLine=18808967;
 //BA.debugLineNum = 18808967;BA.debugLine="Private maxcajas As Int = 0";
_maxcajas = (int) (0);
RDebugUtils.currentLine=18808968;
 //BA.debugLineNum = 18808968;BA.debugLine="Log(\"cajas a 0\")";
__c.LogImpl("518808968","cajas a 0",0);
 }else {
RDebugUtils.currentLine=18808970;
 //BA.debugLineNum = 18808970;BA.debugLine="Private maxcajas As Int = invActualizado/clv_p";
_maxcajas = (int) ((double)(Double.parseDouble(_invactualizado))/(double)(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(_index)))).Get((Object)("conversion")))));
RDebugUtils.currentLine=18808971;
 //BA.debugLineNum = 18808971;BA.debugLine="Log(\"cajas no a 0\")";
__c.LogImpl("518808971","cajas no a 0",0);
 };
RDebugUtils.currentLine=18808973;
 //BA.debugLineNum = 18808973;BA.debugLine="If 2 = 2 Then lProdX.Text = cs.Color(Colors.red";
if (2==2) { 
_lprodx.setText(BA.ObjectToCharSequence(_cs.Color(__c.Colors.Red).Append(BA.ObjectToCharSequence(_nombrex)).Pop().Append(BA.ObjectToCharSequence(__c.CRLF)).Append(BA.ObjectToCharSequence("Existencias: "+_invactualizado)).Color(((int)0xff017f01)).Append(BA.ObjectToCharSequence(("   $"+__c.SmartStringFormatter("",(Object)(__c.NumberFormat2((double)(Double.parseDouble(_precio)),(int) (1),(int) (2),(int) (2),__c.False)))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Max. Cajas: "+__c.SmartStringFormatter("",(Object)(_maxcajas))+""))).PopAll().getObject()));};
 };
RDebugUtils.currentLine=18808976;
 //BA.debugLineNum = 18808976;BA.debugLine="invTotal = totalcajasmaspiezas + Subs.traeinvent";
__ref._invtotal /*int*/  = (int) (__ref._totalcajasmaspiezas /*int*/ +(double)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_id))));
 };
RDebugUtils.currentLine=18808979;
 //BA.debugLineNum = 18808979;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmasc_click(SHARK2.keymon.com.mx.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "b_prodmasc_click", false))
	 {return ((String) Debug.delegate(ba, "b_prodmasc_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.B4XViewWrapper _lacant2 = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lprodx = null;
anywheresoftware.b4a.objects.B4XViewWrapper _panelcajas = null;
anywheresoftware.b4a.objects.B4XViewWrapper _panelpiezas = null;
String _precio = "";
String _inv = "";
String _existencias = "";
String _conversion = "";
String _preciocaja = "";
String _id = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _fg = null;
String _nombrex = "";
anywheresoftware.b4a.objects.CSBuilder _cs = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _o = null;
String _invactualizado = "";
int _maxcajas2 = 0;
RDebugUtils.currentLine=20381696;
 //BA.debugLineNum = 20381696;BA.debugLine="Sub b_prodMasc_Click";
RDebugUtils.currentLine=20381697;
 //BA.debugLineNum = 20381697;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=20381698;
 //BA.debugLineNum = 20381698;BA.debugLine="Root.RequestFocus";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .RequestFocus();
RDebugUtils.currentLine=20381701;
 //BA.debugLineNum = 20381701;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=20381702;
 //BA.debugLineNum = 20381702;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=20381703;
 //BA.debugLineNum = 20381703;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=20381704;
 //BA.debugLineNum = 20381704;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=20381705;
 //BA.debugLineNum = 20381705;BA.debugLine="Dim laCant2 As B4XView = pnl.GetView(3).GetView(2";
_lacant2 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacant2 = _pnl.GetView((int) (3)).GetView((int) (2));
RDebugUtils.currentLine=20381706;
 //BA.debugLineNum = 20381706;BA.debugLine="Dim lProdX As B4XView = pnl.GetView(1)";
_lprodx = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lprodx = _pnl.GetView((int) (1));
RDebugUtils.currentLine=20381707;
 //BA.debugLineNum = 20381707;BA.debugLine="Dim panelcajas As B4XView = pnl.GetView(3)";
_panelcajas = new anywheresoftware.b4a.objects.B4XViewWrapper();
_panelcajas = _pnl.GetView((int) (3));
RDebugUtils.currentLine=20381708;
 //BA.debugLineNum = 20381708;BA.debugLine="Dim panelpiezas As B4XView = pnl.GetView(2)";
_panelpiezas = new anywheresoftware.b4a.objects.B4XViewWrapper();
_panelpiezas = _pnl.GetView((int) (2));
RDebugUtils.currentLine=20381710;
 //BA.debugLineNum = 20381710;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=20381711;
 //BA.debugLineNum = 20381711;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=20381712;
 //BA.debugLineNum = 20381712;BA.debugLine="Private existencias As String = clv_prods_ll.GetV";
_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(_index)))).Get((Object)("almacen")));
RDebugUtils.currentLine=20381713;
 //BA.debugLineNum = 20381713;BA.debugLine="Private conversion As String = clv_prods_ll.GetVa";
_conversion = 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)("conversion")));
RDebugUtils.currentLine=20381714;
 //BA.debugLineNum = 20381714;BA.debugLine="Private preciocaja As String = clv_prods_ll.GetVa";
_preciocaja = 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_caja")));
RDebugUtils.currentLine=20381715;
 //BA.debugLineNum = 20381715;BA.debugLine="Log(conversion)";
__c.LogImpl("520381715",_conversion,0);
RDebugUtils.currentLine=20381716;
 //BA.debugLineNum = 20381716;BA.debugLine="Log($\"Existencias: ${existencias}\"$)";
__c.LogImpl("520381716",("Existencias: "+__c.SmartStringFormatter("",(Object)(_existencias))+""),0);
RDebugUtils.currentLine=20381717;
 //BA.debugLineNum = 20381717;BA.debugLine="If laCant2.Text = \"\" Then laCant2.Text = 0";
if ((_lacant2.getText()).equals("")) { 
_lacant2.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=20381718;
 //BA.debugLineNum = 20381718;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=20381735;
 //BA.debugLineNum = 20381735;BA.debugLine="Log(B4XPages.MainPage.tipo_venta)";
__c.LogImpl("520381735",_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,0);
RDebugUtils.currentLine=20381736;
 //BA.debugLineNum = 20381736;BA.debugLine="Log(\"--------------->Credito Disponible: \"&B4XPag";
__c.LogImpl("520381736","--------------->Credito Disponible: "+_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*SHARK2.keymon.com.mx.c_cliente*/ ._credito_diponible /*String*/ ,0);
RDebugUtils.currentLine=20381737;
 //BA.debugLineNum = 20381737;BA.debugLine="Log(preciocaja)";
__c.LogImpl("520381737",_preciocaja,0);
RDebugUtils.currentLine=20381739;
 //BA.debugLineNum = 20381739;BA.debugLine="If B4XPages.MainPage.tipo_venta = \"PREVENTA_CREDI";
if ((_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ).equals("PREVENTA_CREDITO")) { 
RDebugUtils.currentLine=20381740;
 //BA.debugLineNum = 20381740;BA.debugLine="Dim fg As Cursor = Starter.skmt.ExecQuery(\"Selec";
_fg = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_fg = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select Ifnull(sum(PE_COSTO_TOT),0) AS COSTO FROM PEDIDO WHERE PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND PE_FOLIO = 'PREVENTA_CREDITO'")));
RDebugUtils.currentLine=20381741;
 //BA.debugLineNum = 20381741;BA.debugLine="fg.Position = 0";
_fg.setPosition((int) (0));
RDebugUtils.currentLine=20381742;
 //BA.debugLineNum = 20381742;BA.debugLine="If fg.GetString(\"COSTO\") + preciocaja <= B4XPage";
if ((double)(Double.parseDouble(_fg.GetString("COSTO")))+(double)(Double.parseDouble(_preciocaja))<=(double)(Double.parseDouble(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*SHARK2.keymon.com.mx.c_cliente*/ ._credito_diponible /*String*/ ))) { 
RDebugUtils.currentLine=20381743;
 //BA.debugLineNum = 20381743;BA.debugLine="Log(Subs.traeinventario(id))";
__c.LogImpl("520381743",_subs._traeinventario /*String*/ (ba,_id),0);
RDebugUtils.currentLine=20381744;
 //BA.debugLineNum = 20381744;BA.debugLine="Log((laCant2.Text * conversion) + conversion)";
__c.LogImpl("520381744",BA.NumberToString(((double)(Double.parseDouble(_lacant2.getText()))*(double)(Double.parseDouble(_conversion)))+(double)(Double.parseDouble(_conversion))),0);
RDebugUtils.currentLine=20381745;
 //BA.debugLineNum = 20381745;BA.debugLine="Log((laCant2.Text *conversion)+ Subs.traeinvent";
__c.LogImpl("520381745",BA.NumberToString(((double)(Double.parseDouble(_lacant2.getText()))*(double)(Double.parseDouble(_conversion)))+(double)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_id)))),0);
RDebugUtils.currentLine=20381746;
 //BA.debugLineNum = 20381746;BA.debugLine="If Subs.traeinventario(id) > 0 And ((laCant2.Te";
if ((double)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_id)))>0 && (((double)(Double.parseDouble(_lacant2.getText()))*(double)(Double.parseDouble(_conversion)))+(double)(Double.parseDouble(_conversion))<=(((double)(Double.parseDouble(_lacant2.getText()))*(double)(Double.parseDouble(_conversion)))+(double)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_id)))))) { 
RDebugUtils.currentLine=20381748;
 //BA.debugLineNum = 20381748;BA.debugLine="clv_prods_ll.GetValue(index).As(Map).Put(\"alma";
((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)))).Put((Object)("almacen"),(Object)(((double)(Double.parseDouble(_inv))-(double)(Double.parseDouble(_conversion)))));
RDebugUtils.currentLine=20381749;
 //BA.debugLineNum = 20381749;BA.debugLine="inv = inv - conversion";
_inv = BA.NumberToString((double)(Double.parseDouble(_inv))-(double)(Double.parseDouble(_conversion)));
RDebugUtils.currentLine=20381751;
 //BA.debugLineNum = 20381751;BA.debugLine="laCant2.Text = NumberFormat2((laCant2.Text + 1";
_lacant2.setText(BA.ObjectToCharSequence(__c.NumberFormat2(((double)(Double.parseDouble(_lacant2.getText()))+1),(int) (1),(int) (0),(int) (0),__c.False)));
RDebugUtils.currentLine=20381753;
 //BA.debugLineNum = 20381753;BA.debugLine="Log(\"cuando entro aqui?\")";
__c.LogImpl("520381753","cuando entro aqui?",0);
 };
RDebugUtils.currentLine=20381755;
 //BA.debugLineNum = 20381755;BA.debugLine="Private nombreX As String = Subs.traeProdNombre";
_nombrex = _subs._traeprodnombre /*String*/ (ba,_id);
RDebugUtils.currentLine=20381757;
 //BA.debugLineNum = 20381757;BA.debugLine="Log((laCant2.Text * conversion))";
__c.LogImpl("520381757",BA.NumberToString(((double)(Double.parseDouble(_lacant2.getText()))*(double)(Double.parseDouble(_conversion)))),0);
RDebugUtils.currentLine=20381758;
 //BA.debugLineNum = 20381758;BA.debugLine="If laCant2.Text > 0 Then";
if ((double)(Double.parseDouble(_lacant2.getText()))>0) { 
RDebugUtils.currentLine=20381759;
 //BA.debugLineNum = 20381759;BA.debugLine="panelpiezas.Visible = False";
_panelpiezas.setVisible(__c.False);
 }else 
{RDebugUtils.currentLine=20381760;
 //BA.debugLineNum = 20381760;BA.debugLine="Else If laCant2.Text = 0 Then";
if ((_lacant2.getText()).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=20381761;
 //BA.debugLineNum = 20381761;BA.debugLine="panelpiezas.Visible = True";
_panelpiezas.setVisible(__c.True);
 }}
;
RDebugUtils.currentLine=20381771;
 //BA.debugLineNum = 20381771;BA.debugLine="Subs.actualizaProducto2(Subs.traeAlmacen,precio";
_subs._actualizaproducto2 /*String*/ (ba,_subs._traealmacen /*String*/ (ba),_preciocaja,(int) (((double)(Double.parseDouble(_lacant2.getText()))*(double)(Double.parseDouble(_conversion)))),_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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,_lacant2.getText(),BA.NumberToString(1));
RDebugUtils.currentLine=20381772;
 //BA.debugLineNum = 20381772;BA.debugLine="cuentaProds";
__ref._cuentaprods /*String*/ (null);
RDebugUtils.currentLine=20381774;
 //BA.debugLineNum = 20381774;BA.debugLine="If 1 = 1 Then";
if (1==1) { 
RDebugUtils.currentLine=20381775;
 //BA.debugLineNum = 20381775;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=20381776;
 //BA.debugLineNum = 20381776;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=20381777;
 //BA.debugLineNum = 20381777;BA.debugLine="Private o As Cursor = Starter.skmt.ExecQuery($";
_o = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_o = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select CAT_GP_ALMACEN from "+__c.SmartStringFormatter("",(Object)(_starter._tabla /*String*/ ))+" where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_id))+"'"))));
RDebugUtils.currentLine=20381778;
 //BA.debugLineNum = 20381778;BA.debugLine="Private invActualizado As String = \"0\"";
_invactualizado = "0";
RDebugUtils.currentLine=20381779;
 //BA.debugLineNum = 20381779;BA.debugLine="If o.RowCount > 0 Then";
if (_o.getRowCount()>0) { 
RDebugUtils.currentLine=20381780;
 //BA.debugLineNum = 20381780;BA.debugLine="o.Position = 0";
_o.setPosition((int) (0));
RDebugUtils.currentLine=20381781;
 //BA.debugLineNum = 20381781;BA.debugLine="invActualizado = o.GetString(\"CAT_GP_ALMACEN\"";
_invactualizado = _o.GetString("CAT_GP_ALMACEN");
 };
RDebugUtils.currentLine=20381783;
 //BA.debugLineNum = 20381783;BA.debugLine="If clv_prods_ll.GetValue(index).As(Map).Get(\"p";
if (((float)(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(_index)))).Get((Object)("precio_caja")))))==0 || ((int)(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(_index)))).Get((Object)("conversion")))))==1) { 
RDebugUtils.currentLine=20381784;
 //BA.debugLineNum = 20381784;BA.debugLine="Private maxcajas2 As Int = 0";
_maxcajas2 = (int) (0);
RDebugUtils.currentLine=20381785;
 //BA.debugLineNum = 20381785;BA.debugLine="Log(\"cajas a 0\")";
__c.LogImpl("520381785","cajas a 0",0);
 }else {
RDebugUtils.currentLine=20381787;
 //BA.debugLineNum = 20381787;BA.debugLine="Private maxcajas2 As Int = invActualizado/clv";
_maxcajas2 = (int) ((double)(Double.parseDouble(_invactualizado))/(double)(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(_index)))).Get((Object)("conversion")))));
RDebugUtils.currentLine=20381788;
 //BA.debugLineNum = 20381788;BA.debugLine="Log(\"cajas no a 0\")";
__c.LogImpl("520381788","cajas no a 0",0);
 };
RDebugUtils.currentLine=20381790;
 //BA.debugLineNum = 20381790;BA.debugLine="If 2 = 2 Then lProdX.Text = cs.Color(Colors.re";
if (2==2) { 
_lprodx.setText(BA.ObjectToCharSequence(_cs.Color(__c.Colors.Red).Append(BA.ObjectToCharSequence(_nombrex)).Pop().Append(BA.ObjectToCharSequence(__c.CRLF)).Append(BA.ObjectToCharSequence("Existencias: "+_invactualizado)).Color(((int)0xff017f01)).Append(BA.ObjectToCharSequence(("   $"+__c.SmartStringFormatter("",(Object)(__c.NumberFormat2((double)(Double.parseDouble(_precio)),(int) (1),(int) (2),(int) (2),__c.False)))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Max. Cajas: "+__c.SmartStringFormatter("",(Object)(_maxcajas2))+""))).PopAll().getObject()));};
 };
RDebugUtils.currentLine=20381793;
 //BA.debugLineNum = 20381793;BA.debugLine="invTotal = totalcajasmaspiezas + Subs.traeinven";
__ref._invtotal /*int*/  = (int) (__ref._totalcajasmaspiezas /*int*/ +(double)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_id))));
 }else {
RDebugUtils.currentLine=20381796;
 //BA.debugLineNum = 20381796;BA.debugLine="MsgboxAsync(\"No se puede meter mas venta a cred";
__c.MsgboxAsync(BA.ObjectToCharSequence("No se puede meter mas venta a credito por que supera el limite del credito"),BA.ObjectToCharSequence("Atencion"),ba);
 };
 }else {
RDebugUtils.currentLine=20381799;
 //BA.debugLineNum = 20381799;BA.debugLine="Log(Subs.traeinventario(id))";
__c.LogImpl("520381799",_subs._traeinventario /*String*/ (ba,_id),0);
RDebugUtils.currentLine=20381800;
 //BA.debugLineNum = 20381800;BA.debugLine="Log((laCant2.Text * conversion) + conversion)";
__c.LogImpl("520381800",BA.NumberToString(((double)(Double.parseDouble(_lacant2.getText()))*(double)(Double.parseDouble(_conversion)))+(double)(Double.parseDouble(_conversion))),0);
RDebugUtils.currentLine=20381801;
 //BA.debugLineNum = 20381801;BA.debugLine="Log((laCant2.Text *conversion)+ Subs.traeinventa";
__c.LogImpl("520381801",BA.NumberToString(((double)(Double.parseDouble(_lacant2.getText()))*(double)(Double.parseDouble(_conversion)))+(double)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_id)))),0);
RDebugUtils.currentLine=20381802;
 //BA.debugLineNum = 20381802;BA.debugLine="If Subs.traeinventario(id) > 0 And ((laCant2.Tex";
if ((double)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_id)))>0 && (((double)(Double.parseDouble(_lacant2.getText()))*(double)(Double.parseDouble(_conversion)))+(double)(Double.parseDouble(_conversion))<=(((double)(Double.parseDouble(_lacant2.getText()))*(double)(Double.parseDouble(_conversion)))+(double)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_id)))))) { 
RDebugUtils.currentLine=20381804;
 //BA.debugLineNum = 20381804;BA.debugLine="clv_prods_ll.GetValue(index).As(Map).Put(\"almac";
((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)))).Put((Object)("almacen"),(Object)(((double)(Double.parseDouble(_inv))-(double)(Double.parseDouble(_conversion)))));
RDebugUtils.currentLine=20381805;
 //BA.debugLineNum = 20381805;BA.debugLine="inv = inv - conversion";
_inv = BA.NumberToString((double)(Double.parseDouble(_inv))-(double)(Double.parseDouble(_conversion)));
RDebugUtils.currentLine=20381807;
 //BA.debugLineNum = 20381807;BA.debugLine="laCant2.Text = NumberFormat2((laCant2.Text + 1)";
_lacant2.setText(BA.ObjectToCharSequence(__c.NumberFormat2(((double)(Double.parseDouble(_lacant2.getText()))+1),(int) (1),(int) (0),(int) (0),__c.False)));
RDebugUtils.currentLine=20381809;
 //BA.debugLineNum = 20381809;BA.debugLine="Log(\"cuando entro aqui?\")";
__c.LogImpl("520381809","cuando entro aqui?",0);
 };
RDebugUtils.currentLine=20381811;
 //BA.debugLineNum = 20381811;BA.debugLine="Private nombreX As String = Subs.traeProdNombre(";
_nombrex = _subs._traeprodnombre /*String*/ (ba,_id);
RDebugUtils.currentLine=20381813;
 //BA.debugLineNum = 20381813;BA.debugLine="Log((laCant2.Text * conversion))";
__c.LogImpl("520381813",BA.NumberToString(((double)(Double.parseDouble(_lacant2.getText()))*(double)(Double.parseDouble(_conversion)))),0);
RDebugUtils.currentLine=20381814;
 //BA.debugLineNum = 20381814;BA.debugLine="If laCant2.Text > 0 Then";
if ((double)(Double.parseDouble(_lacant2.getText()))>0) { 
RDebugUtils.currentLine=20381815;
 //BA.debugLineNum = 20381815;BA.debugLine="panelpiezas.Visible = False";
_panelpiezas.setVisible(__c.False);
 }else 
{RDebugUtils.currentLine=20381816;
 //BA.debugLineNum = 20381816;BA.debugLine="Else If laCant2.Text = 0 Then";
if ((_lacant2.getText()).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=20381817;
 //BA.debugLineNum = 20381817;BA.debugLine="panelpiezas.Visible = True";
_panelpiezas.setVisible(__c.True);
 }}
;
RDebugUtils.currentLine=20381827;
 //BA.debugLineNum = 20381827;BA.debugLine="Subs.actualizaProducto2(Subs.traeAlmacen,precioc";
_subs._actualizaproducto2 /*String*/ (ba,_subs._traealmacen /*String*/ (ba),_preciocaja,(int) (((double)(Double.parseDouble(_lacant2.getText()))*(double)(Double.parseDouble(_conversion)))),_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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,_lacant2.getText(),BA.NumberToString(1));
RDebugUtils.currentLine=20381828;
 //BA.debugLineNum = 20381828;BA.debugLine="cuentaProds";
__ref._cuentaprods /*String*/ (null);
RDebugUtils.currentLine=20381830;
 //BA.debugLineNum = 20381830;BA.debugLine="If 1 = 1 Then";
if (1==1) { 
RDebugUtils.currentLine=20381831;
 //BA.debugLineNum = 20381831;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=20381832;
 //BA.debugLineNum = 20381832;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=20381833;
 //BA.debugLineNum = 20381833;BA.debugLine="Private o As Cursor = Starter.skmt.ExecQuery($\"";
_o = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_o = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select CAT_GP_ALMACEN from "+__c.SmartStringFormatter("",(Object)(_starter._tabla /*String*/ ))+" where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_id))+"'"))));
RDebugUtils.currentLine=20381834;
 //BA.debugLineNum = 20381834;BA.debugLine="Private invActualizado As String = \"0\"";
_invactualizado = "0";
RDebugUtils.currentLine=20381835;
 //BA.debugLineNum = 20381835;BA.debugLine="If o.RowCount > 0 Then";
if (_o.getRowCount()>0) { 
RDebugUtils.currentLine=20381836;
 //BA.debugLineNum = 20381836;BA.debugLine="o.Position = 0";
_o.setPosition((int) (0));
RDebugUtils.currentLine=20381837;
 //BA.debugLineNum = 20381837;BA.debugLine="invActualizado = o.GetString(\"CAT_GP_ALMACEN\")";
_invactualizado = _o.GetString("CAT_GP_ALMACEN");
 };
RDebugUtils.currentLine=20381839;
 //BA.debugLineNum = 20381839;BA.debugLine="If clv_prods_ll.GetValue(index).As(Map).Get(\"pr";
if (((float)(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(_index)))).Get((Object)("precio_caja")))))==0 || ((int)(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(_index)))).Get((Object)("conversion")))))==1) { 
RDebugUtils.currentLine=20381840;
 //BA.debugLineNum = 20381840;BA.debugLine="Private maxcajas2 As Int = 0";
_maxcajas2 = (int) (0);
RDebugUtils.currentLine=20381841;
 //BA.debugLineNum = 20381841;BA.debugLine="Log(\"cajas a 0\")";
__c.LogImpl("520381841","cajas a 0",0);
 }else {
RDebugUtils.currentLine=20381843;
 //BA.debugLineNum = 20381843;BA.debugLine="Private maxcajas2 As Int = invActualizado/clv_";
_maxcajas2 = (int) ((double)(Double.parseDouble(_invactualizado))/(double)(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(_index)))).Get((Object)("conversion")))));
RDebugUtils.currentLine=20381844;
 //BA.debugLineNum = 20381844;BA.debugLine="Log(\"cajas no a 0\")";
__c.LogImpl("520381844","cajas no a 0",0);
 };
RDebugUtils.currentLine=20381846;
 //BA.debugLineNum = 20381846;BA.debugLine="If 2 = 2 Then lProdX.Text = cs.Color(Colors.red";
if (2==2) { 
_lprodx.setText(BA.ObjectToCharSequence(_cs.Color(__c.Colors.Red).Append(BA.ObjectToCharSequence(_nombrex)).Pop().Append(BA.ObjectToCharSequence(__c.CRLF)).Append(BA.ObjectToCharSequence("Existencias: "+_invactualizado)).Color(((int)0xff017f01)).Append(BA.ObjectToCharSequence(("   $"+__c.SmartStringFormatter("",(Object)(__c.NumberFormat2((double)(Double.parseDouble(_precio)),(int) (1),(int) (2),(int) (2),__c.False)))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Max. Cajas: "+__c.SmartStringFormatter("",(Object)(_maxcajas2))+""))).PopAll().getObject()));};
 };
RDebugUtils.currentLine=20381849;
 //BA.debugLineNum = 20381849;BA.debugLine="invTotal = totalcajasmaspiezas + Subs.traeinvent";
__ref._invtotal /*int*/  = (int) (__ref._totalcajasmaspiezas /*int*/ +(double)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_id))));
 };
RDebugUtils.currentLine=20381853;
 //BA.debugLineNum = 20381853;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmenos_click(SHARK2.keymon.com.mx.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.B4XViewWrapper _lacant2 = null;
anywheresoftware.b4a.objects.B4XViewWrapper _panelbotonesc = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lprodx = null;
anywheresoftware.b4a.objects.B4XViewWrapper _panelcajas = null;
anywheresoftware.b4a.objects.B4XViewWrapper _panelpiezas = null;
anywheresoftware.b4a.objects.collections.Map _tmpmap1 = null;
String _precio = "";
String _id = "";
anywheresoftware.b4a.objects.collections.Map _tmpmap = null;
String _nombrex = "";
anywheresoftware.b4a.objects.CSBuilder _cs = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _o = null;
String _invactualizado = "";
int _maxcajas = 0;
RDebugUtils.currentLine=18743296;
 //BA.debugLineNum = 18743296;BA.debugLine="Sub b_prodMenos_Click";
RDebugUtils.currentLine=18743297;
 //BA.debugLineNum = 18743297;BA.debugLine="totalcajasmaspiezas = 0";
__ref._totalcajasmaspiezas /*int*/  = (int) (0);
RDebugUtils.currentLine=18743298;
 //BA.debugLineNum = 18743298;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=18743299;
 //BA.debugLineNum = 18743299;BA.debugLine="Root.RequestFocus";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .RequestFocus();
RDebugUtils.currentLine=18743301;
 //BA.debugLineNum = 18743301;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=18743302;
 //BA.debugLineNum = 18743302;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=18743303;
 //BA.debugLineNum = 18743303;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=18743304;
 //BA.debugLineNum = 18743304;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=18743305;
 //BA.debugLineNum = 18743305;BA.debugLine="Dim laCant2 As B4XView = pnl.GetView(3).GetView(2";
_lacant2 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacant2 = _pnl.GetView((int) (3)).GetView((int) (2));
RDebugUtils.currentLine=18743306;
 //BA.debugLineNum = 18743306;BA.debugLine="Dim panelbotonesc As B4XView = pnl.GetView(3)";
_panelbotonesc = new anywheresoftware.b4a.objects.B4XViewWrapper();
_panelbotonesc = _pnl.GetView((int) (3));
RDebugUtils.currentLine=18743307;
 //BA.debugLineNum = 18743307;BA.debugLine="Dim lProdX As B4XView = pnl.GetView(1)";
_lprodx = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lprodx = _pnl.GetView((int) (1));
RDebugUtils.currentLine=18743308;
 //BA.debugLineNum = 18743308;BA.debugLine="Dim panelcajas As B4XView = pnl.GetView(3)";
_panelcajas = new anywheresoftware.b4a.objects.B4XViewWrapper();
_panelcajas = _pnl.GetView((int) (3));
RDebugUtils.currentLine=18743309;
 //BA.debugLineNum = 18743309;BA.debugLine="Dim panelpiezas As B4XView = pnl.GetView(2)";
_panelpiezas = new anywheresoftware.b4a.objects.B4XViewWrapper();
_panelpiezas = _pnl.GetView((int) (2));
RDebugUtils.currentLine=18743311;
 //BA.debugLineNum = 18743311;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=18743313;
 //BA.debugLineNum = 18743313;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=18743314;
 //BA.debugLineNum = 18743314;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0";
if ((double)(Double.parseDouble(_lacant.getText()))<0) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=18743315;
 //BA.debugLineNum = 18743315;BA.debugLine="Private tmpMap1 As Map = clv_prods_ll.GetValue(in";
_tmpmap1 = new anywheresoftware.b4a.objects.collections.Map();
_tmpmap1 = ((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=18743316;
 //BA.debugLineNum = 18743316;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=18743317;
 //BA.debugLineNum = 18743317;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=18743318;
 //BA.debugLineNum = 18743318;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=18743319;
 //BA.debugLineNum = 18743319;BA.debugLine="Private nombreX As String = Subs.traeProdNombre(i";
_nombrex = _subs._traeprodnombre /*String*/ (ba,_id);
RDebugUtils.currentLine=18743320;
 //BA.debugLineNum = 18743320;BA.debugLine="LogColor(tmpMap1,Colors.Magenta)";
__c.LogImpl("518743320",BA.ObjectToString(_tmpmap1),__c.Colors.Magenta);
RDebugUtils.currentLine=18743322;
 //BA.debugLineNum = 18743322;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=18743323;
 //BA.debugLineNum = 18743323;BA.debugLine="If laCant.Text = 0 Then";
if ((_lacant.getText()).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=18743324;
 //BA.debugLineNum = 18743324;BA.debugLine="panelcajas.Visible = True";
_panelcajas.setVisible(__c.True);
 }else 
{RDebugUtils.currentLine=18743325;
 //BA.debugLineNum = 18743325;BA.debugLine="Else If laCant.Text > 0 Then";
if ((double)(Double.parseDouble(_lacant.getText()))>0) { 
RDebugUtils.currentLine=18743326;
 //BA.debugLineNum = 18743326;BA.debugLine="panelcajas.Visible = False";
_panelcajas.setVisible(__c.False);
 }}
;
RDebugUtils.currentLine=18743333;
 //BA.debugLineNum = 18743333;BA.debugLine="LogColor(\"prodsMap=\"&prodsMap, Colors.blue)";
__c.LogImpl("518743333","prodsMap="+BA.ObjectToString(__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ ),__c.Colors.Blue);
RDebugUtils.currentLine=18743335;
 //BA.debugLineNum = 18743335;BA.debugLine="Log($\"${Subs.traeAlmacen}, ${precio}, ${laCant.te";
__c.LogImpl("518743335",(""+__c.SmartStringFormatter("",(Object)(_subs._traealmacen /*String*/ (ba)))+", "+__c.SmartStringFormatter("",(Object)(_precio))+", "+__c.SmartStringFormatter("",(Object)(_lacant.getText()))+", "+__c.SmartStringFormatter("",(Object)(_subs._traeprodnombre /*String*/ (ba,_id)))+", "+__c.SmartStringFormatter("",(Object)(_id))+", "+__c.SmartStringFormatter("",(Object)(__ref._clienteid /*String*/ ))+""),0);
RDebugUtils.currentLine=18743336;
 //BA.debugLineNum = 18743336;BA.debugLine="Subs.actualizaProducto(Subs.traeAlmacen, precio,";
_subs._actualizaproducto /*String*/ (ba,_subs._traealmacen /*String*/ (ba),_precio,(int)(Double.parseDouble(_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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,BA.NumberToString(0),BA.NumberToString(0));
RDebugUtils.currentLine=18743337;
 //BA.debugLineNum = 18743337;BA.debugLine="cuentaProds";
__ref._cuentaprods /*String*/ (null);
RDebugUtils.currentLine=18743338;
 //BA.debugLineNum = 18743338;BA.debugLine="LogColor(\"prodsMap=\"&prodsMap, Colors.blue)";
__c.LogImpl("518743338","prodsMap="+BA.ObjectToString(__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ ),__c.Colors.Blue);
RDebugUtils.currentLine=18743339;
 //BA.debugLineNum = 18743339;BA.debugLine="Log($\"Total Prods: ${totalProds}, Total Compra: $";
__c.LogImpl("518743339",("Total Prods: "+__c.SmartStringFormatter("",(Object)(__ref._totalprods /*int*/ ))+", Total Compra: $"+__c.SmartStringFormatter("1.2",(Object)(__ref._totalcompra /*float*/ ))+""),0);
RDebugUtils.currentLine=18743340;
 //BA.debugLineNum = 18743340;BA.debugLine="If 1 = 1 Then";
if (1==1) { 
RDebugUtils.currentLine=18743341;
 //BA.debugLineNum = 18743341;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=18743342;
 //BA.debugLineNum = 18743342;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=18743343;
 //BA.debugLineNum = 18743343;BA.debugLine="Private o As Cursor = Starter.skmt.ExecQuery($\"s";
_o = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_o = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select CAT_GP_ALMACEN from "+__c.SmartStringFormatter("",(Object)(_starter._tabla /*String*/ ))+" where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_id))+"'"))));
RDebugUtils.currentLine=18743344;
 //BA.debugLineNum = 18743344;BA.debugLine="Private invActualizado As String = \"0\"";
_invactualizado = "0";
RDebugUtils.currentLine=18743345;
 //BA.debugLineNum = 18743345;BA.debugLine="If o.RowCount > 0 Then";
if (_o.getRowCount()>0) { 
RDebugUtils.currentLine=18743346;
 //BA.debugLineNum = 18743346;BA.debugLine="o.Position = 0";
_o.setPosition((int) (0));
RDebugUtils.currentLine=18743347;
 //BA.debugLineNum = 18743347;BA.debugLine="invActualizado = o.GetString(\"CAT_GP_ALMACEN\")";
_invactualizado = _o.GetString("CAT_GP_ALMACEN");
 };
RDebugUtils.currentLine=18743349;
 //BA.debugLineNum = 18743349;BA.debugLine="If clv_prods_ll.GetValue(index).As(Map).Get(\"pre";
if (((float)(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(_index)))).Get((Object)("precio_caja")))))==0 || ((int)(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(_index)))).Get((Object)("conversion")))))==1) { 
RDebugUtils.currentLine=18743350;
 //BA.debugLineNum = 18743350;BA.debugLine="Private maxcajas As Int = 0";
_maxcajas = (int) (0);
RDebugUtils.currentLine=18743351;
 //BA.debugLineNum = 18743351;BA.debugLine="Log(\"cajas a 0\")";
__c.LogImpl("518743351","cajas a 0",0);
 }else {
RDebugUtils.currentLine=18743353;
 //BA.debugLineNum = 18743353;BA.debugLine="Private maxcajas As Int = invActualizado/clv_pr";
_maxcajas = (int) ((double)(Double.parseDouble(_invactualizado))/(double)(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(_index)))).Get((Object)("conversion")))));
RDebugUtils.currentLine=18743354;
 //BA.debugLineNum = 18743354;BA.debugLine="Log(\"cajas no a 0\")";
__c.LogImpl("518743354","cajas no a 0",0);
 };
RDebugUtils.currentLine=18743357;
 //BA.debugLineNum = 18743357;BA.debugLine="If 2 = 2 Then lProdX.Text = cs.Color(Colors.red)";
if (2==2) { 
_lprodx.setText(BA.ObjectToCharSequence(_cs.Color(__c.Colors.Red).Append(BA.ObjectToCharSequence(_nombrex)).Pop().Append(BA.ObjectToCharSequence(__c.CRLF)).Append(BA.ObjectToCharSequence("Existencias: "+_invactualizado)).Color(((int)0xff017f01)).Append(BA.ObjectToCharSequence(("   $"+__c.SmartStringFormatter("",(Object)(__c.NumberFormat2((double)(Double.parseDouble(_precio)),(int) (1),(int) (2),(int) (2),__c.False)))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Max. Cajas: "+__c.SmartStringFormatter("",(Object)(_maxcajas))+""))).PopAll().getObject()));};
 };
RDebugUtils.currentLine=18743360;
 //BA.debugLineNum = 18743360;BA.debugLine="If laCant.Text = 0 Then";
if ((_lacant.getText()).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=18743361;
 //BA.debugLineNum = 18743361;BA.debugLine="If maxcajas > 0 Then";
if (_maxcajas>0) { 
RDebugUtils.currentLine=18743362;
 //BA.debugLineNum = 18743362;BA.debugLine="panelcajas.Visible = True";
_panelcajas.setVisible(__c.True);
 }else {
RDebugUtils.currentLine=18743364;
 //BA.debugLineNum = 18743364;BA.debugLine="panelcajas.Visible = False";
_panelcajas.setVisible(__c.False);
 };
 }else 
{RDebugUtils.currentLine=18743366;
 //BA.debugLineNum = 18743366;BA.debugLine="Else If laCant.Text > 0 Then";
if ((double)(Double.parseDouble(_lacant.getText()))>0) { 
RDebugUtils.currentLine=18743367;
 //BA.debugLineNum = 18743367;BA.debugLine="panelcajas.Visible = False";
_panelcajas.setVisible(__c.False);
 }}
;
RDebugUtils.currentLine=18743369;
 //BA.debugLineNum = 18743369;BA.debugLine="If Subs.totalPedido < 1 Then laCant.Text = \"0\"";
if ((double)(Double.parseDouble(_subs._totalpedido /*String*/ (ba)))<1) { 
_lacant.setText(BA.ObjectToCharSequence("0"));};
RDebugUtils.currentLine=18743370;
 //BA.debugLineNum = 18743370;BA.debugLine="invTotal = totalcajasmaspiezas + Subs.traeinventa";
__ref._invtotal /*int*/  = (int) (__ref._totalcajasmaspiezas /*int*/ +(double)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_id))));
RDebugUtils.currentLine=18743372;
 //BA.debugLineNum = 18743372;BA.debugLine="If tmpMap1.Get(\"conversion\") = \"1\" Or tmpMap1.Get";
if ((_tmpmap1.Get((Object)("conversion"))).equals((Object)("1")) || (_tmpmap1.Get((Object)("precio_caja"))).equals((Object)("0"))) { 
RDebugUtils.currentLine=18743373;
 //BA.debugLineNum = 18743373;BA.debugLine="Log(\"invisible\")";
__c.LogImpl("518743373","invisible",0);
RDebugUtils.currentLine=18743374;
 //BA.debugLineNum = 18743374;BA.debugLine="panelbotonesc.Visible = False";
_panelbotonesc.setVisible(__c.False);
 };
RDebugUtils.currentLine=18743376;
 //BA.debugLineNum = 18743376;BA.debugLine="If clv_prods_ll.GetValue(index).As(Map).Get(\"alma";
if ((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(_index)))).Get((Object)("almacen"))))<(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(_index)))).Get((Object)("conversion"))))) { 
RDebugUtils.currentLine=18743377;
 //BA.debugLineNum = 18743377;BA.debugLine="Log(clv_prods_ll.GetValue(index).As(Map).Get(\"ca";
__c.LogImpl("518743377",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)("cant"))),0);
RDebugUtils.currentLine=18743378;
 //BA.debugLineNum = 18743378;BA.debugLine="If clv_prods_ll.GetValue(index).As(Map).Get(\"can";
if (((int)(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(_index)))).Get((Object)("cant")))))==0) { 
RDebugUtils.currentLine=18743379;
 //BA.debugLineNum = 18743379;BA.debugLine="Log(\"Aqui debemos ponerlo invisible\")";
__c.LogImpl("518743379","Aqui debemos ponerlo invisible",0);
RDebugUtils.currentLine=18743380;
 //BA.debugLineNum = 18743380;BA.debugLine="panelcajas.Visible = False";
_panelcajas.setVisible(__c.False);
 }else {
 };
 };
RDebugUtils.currentLine=18743387;
 //BA.debugLineNum = 18743387;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmenosc_click(SHARK2.keymon.com.mx.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "b_prodmenosc_click", false))
	 {return ((String) Debug.delegate(ba, "b_prodmenosc_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.B4XViewWrapper _lacant2 = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lprodx = null;
anywheresoftware.b4a.objects.B4XViewWrapper _panelcajas = null;
anywheresoftware.b4a.objects.B4XViewWrapper _panelpiezas = null;
anywheresoftware.b4a.objects.collections.Map _tmpmap = null;
String _precio = "";
String _id = "";
String _nombrex = "";
String _conversion = "";
String _preciocaja = "";
anywheresoftware.b4a.objects.CSBuilder _cs = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _o = null;
String _invactualizado = "";
int _maxcajas2 = 0;
RDebugUtils.currentLine=20316160;
 //BA.debugLineNum = 20316160;BA.debugLine="Sub b_prodMenosc_Click";
RDebugUtils.currentLine=20316161;
 //BA.debugLineNum = 20316161;BA.debugLine="totalcajasmaspiezas = 0";
__ref._totalcajasmaspiezas /*int*/  = (int) (0);
RDebugUtils.currentLine=20316162;
 //BA.debugLineNum = 20316162;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=20316163;
 //BA.debugLineNum = 20316163;BA.debugLine="Root.RequestFocus";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .RequestFocus();
RDebugUtils.currentLine=20316165;
 //BA.debugLineNum = 20316165;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=20316166;
 //BA.debugLineNum = 20316166;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=20316167;
 //BA.debugLineNum = 20316167;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=20316168;
 //BA.debugLineNum = 20316168;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=20316169;
 //BA.debugLineNum = 20316169;BA.debugLine="Dim laCant2 As B4XView = pnl.GetView(3).GetView(2";
_lacant2 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacant2 = _pnl.GetView((int) (3)).GetView((int) (2));
RDebugUtils.currentLine=20316170;
 //BA.debugLineNum = 20316170;BA.debugLine="Dim lProdX As B4XView = pnl.GetView(1)";
_lprodx = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lprodx = _pnl.GetView((int) (1));
RDebugUtils.currentLine=20316171;
 //BA.debugLineNum = 20316171;BA.debugLine="Dim panelcajas As B4XView = pnl.GetView(3)";
_panelcajas = new anywheresoftware.b4a.objects.B4XViewWrapper();
_panelcajas = _pnl.GetView((int) (3));
RDebugUtils.currentLine=20316172;
 //BA.debugLineNum = 20316172;BA.debugLine="Dim panelpiezas As B4XView = pnl.GetView(2)";
_panelpiezas = new anywheresoftware.b4a.objects.B4XViewWrapper();
_panelpiezas = _pnl.GetView((int) (2));
RDebugUtils.currentLine=20316174;
 //BA.debugLineNum = 20316174;BA.debugLine="If laCant2.Text = \"\" Then laCant2.Text = 0";
if ((_lacant2.getText()).equals("")) { 
_lacant2.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=20316176;
 //BA.debugLineNum = 20316176;BA.debugLine="laCant2.Text = $\"${NumberFormat2(laCant2.Text-1,0";
_lacant2.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("",(Object)(__c.NumberFormat2((double)(Double.parseDouble(_lacant2.getText()))-1,(int) (0),(int) (0),(int) (0),__c.False)))+"")));
RDebugUtils.currentLine=20316177;
 //BA.debugLineNum = 20316177;BA.debugLine="If laCant2.Text < 0 Then laCant2.Text = 0";
if ((double)(Double.parseDouble(_lacant2.getText()))<0) { 
_lacant2.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=20316178;
 //BA.debugLineNum = 20316178;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=20316179;
 //BA.debugLineNum = 20316179;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=20316180;
 //BA.debugLineNum = 20316180;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=20316181;
 //BA.debugLineNum = 20316181;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)(_lacant2.getText()),(Object)("almacen"),(Object)(_subs._traealmacen /*String*/ (ba))});
RDebugUtils.currentLine=20316182;
 //BA.debugLineNum = 20316182;BA.debugLine="Private nombreX As String = Subs.traeProdNombre(i";
_nombrex = _subs._traeprodnombre /*String*/ (ba,_id);
RDebugUtils.currentLine=20316183;
 //BA.debugLineNum = 20316183;BA.debugLine="Private conversion As String = clv_prods_ll.GetVa";
_conversion = 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)("conversion")));
RDebugUtils.currentLine=20316184;
 //BA.debugLineNum = 20316184;BA.debugLine="Private preciocaja As String = clv_prods_ll.GetVa";
_preciocaja = 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_caja")));
RDebugUtils.currentLine=20316185;
 //BA.debugLineNum = 20316185;BA.debugLine="Log(tmpMap)";
__c.LogImpl("520316185",BA.ObjectToString(_tmpmap),0);
RDebugUtils.currentLine=20316187;
 //BA.debugLineNum = 20316187;BA.debugLine="If laCant2.Text = 0 Then prodsMap.Remove(id)";
if ((_lacant2.getText()).equals(BA.NumberToString(0))) { 
__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Remove((Object)(_id));};
RDebugUtils.currentLine=20316188;
 //BA.debugLineNum = 20316188;BA.debugLine="If laCant2.Text = 0 Then";
if ((_lacant2.getText()).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=20316189;
 //BA.debugLineNum = 20316189;BA.debugLine="panelpiezas.Visible = True";
_panelpiezas.setVisible(__c.True);
 }else 
{RDebugUtils.currentLine=20316190;
 //BA.debugLineNum = 20316190;BA.debugLine="Else If laCant2.Text > 0 Or clv_prods_ll.GetValue";
if ((double)(Double.parseDouble(_lacant2.getText()))>0 || (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(_index)))).Get((Object)("conversion"))))<(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(_index)))).Get((Object)("almacen"))))) { 
RDebugUtils.currentLine=20316191;
 //BA.debugLineNum = 20316191;BA.debugLine="panelpiezas.Visible = False";
_panelpiezas.setVisible(__c.False);
 }}
;
RDebugUtils.currentLine=20316198;
 //BA.debugLineNum = 20316198;BA.debugLine="LogColor(\"prodsMap=\"&prodsMap, Colors.blue)";
__c.LogImpl("520316198","prodsMap="+BA.ObjectToString(__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ ),__c.Colors.Blue);
RDebugUtils.currentLine=20316200;
 //BA.debugLineNum = 20316200;BA.debugLine="Log($\"${Subs.traeAlmacen}, ${precio}, ${laCant2.t";
__c.LogImpl("520316200",(""+__c.SmartStringFormatter("",(Object)(_subs._traealmacen /*String*/ (ba)))+", "+__c.SmartStringFormatter("",(Object)(_precio))+", "+__c.SmartStringFormatter("",(Object)(_lacant2.getText()))+", "+__c.SmartStringFormatter("",(Object)(_subs._traeprodnombre /*String*/ (ba,_id)))+", "+__c.SmartStringFormatter("",(Object)(_id))+", "+__c.SmartStringFormatter("",(Object)(__ref._clienteid /*String*/ ))+""),0);
RDebugUtils.currentLine=20316202;
 //BA.debugLineNum = 20316202;BA.debugLine="Subs.actualizaProducto2(Subs.traeAlmacen,  precio";
_subs._actualizaproducto2 /*String*/ (ba,_subs._traealmacen /*String*/ (ba),_preciocaja,(int) (((double)(Double.parseDouble(_lacant2.getText()))*(double)(Double.parseDouble(_conversion)))),_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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,_lacant2.getText(),BA.NumberToString(1));
RDebugUtils.currentLine=20316203;
 //BA.debugLineNum = 20316203;BA.debugLine="cuentaProds";
__ref._cuentaprods /*String*/ (null);
RDebugUtils.currentLine=20316204;
 //BA.debugLineNum = 20316204;BA.debugLine="LogColor(\"prodsMap=\"&prodsMap, Colors.blue)";
__c.LogImpl("520316204","prodsMap="+BA.ObjectToString(__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ ),__c.Colors.Blue);
RDebugUtils.currentLine=20316205;
 //BA.debugLineNum = 20316205;BA.debugLine="Log($\"Total Prods: ${totalProds}, Total Compra: $";
__c.LogImpl("520316205",("Total Prods: "+__c.SmartStringFormatter("",(Object)(__ref._totalprods /*int*/ ))+", Total Compra: $"+__c.SmartStringFormatter("1.2",(Object)(__ref._totalcompra /*float*/ ))+""),0);
RDebugUtils.currentLine=20316206;
 //BA.debugLineNum = 20316206;BA.debugLine="If 1 = 1 Then";
if (1==1) { 
RDebugUtils.currentLine=20316207;
 //BA.debugLineNum = 20316207;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=20316208;
 //BA.debugLineNum = 20316208;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=20316209;
 //BA.debugLineNum = 20316209;BA.debugLine="Private o As Cursor = Starter.skmt.ExecQuery($\"s";
_o = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_o = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select CAT_GP_ALMACEN from "+__c.SmartStringFormatter("",(Object)(_starter._tabla /*String*/ ))+" where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_id))+"'"))));
RDebugUtils.currentLine=20316210;
 //BA.debugLineNum = 20316210;BA.debugLine="Private invActualizado As String = \"0\"";
_invactualizado = "0";
RDebugUtils.currentLine=20316211;
 //BA.debugLineNum = 20316211;BA.debugLine="If o.RowCount > 0 Then";
if (_o.getRowCount()>0) { 
RDebugUtils.currentLine=20316212;
 //BA.debugLineNum = 20316212;BA.debugLine="o.Position = 0";
_o.setPosition((int) (0));
RDebugUtils.currentLine=20316213;
 //BA.debugLineNum = 20316213;BA.debugLine="invActualizado = o.GetString(\"CAT_GP_ALMACEN\")";
_invactualizado = _o.GetString("CAT_GP_ALMACEN");
 };
RDebugUtils.currentLine=20316215;
 //BA.debugLineNum = 20316215;BA.debugLine="If clv_prods_ll.GetValue(index).As(Map).Get(\"pre";
if (((float)(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(_index)))).Get((Object)("precio_caja")))))==0 || ((int)(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(_index)))).Get((Object)("conversion")))))==1) { 
RDebugUtils.currentLine=20316216;
 //BA.debugLineNum = 20316216;BA.debugLine="Private maxcajas2 As Int = 0";
_maxcajas2 = (int) (0);
RDebugUtils.currentLine=20316217;
 //BA.debugLineNum = 20316217;BA.debugLine="Log(\"cajas a 0\")";
__c.LogImpl("520316217","cajas a 0",0);
 }else {
RDebugUtils.currentLine=20316219;
 //BA.debugLineNum = 20316219;BA.debugLine="Private maxcajas2 As Int = invActualizado/clv_p";
_maxcajas2 = (int) ((double)(Double.parseDouble(_invactualizado))/(double)(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(_index)))).Get((Object)("conversion")))));
RDebugUtils.currentLine=20316220;
 //BA.debugLineNum = 20316220;BA.debugLine="Log(\"cajas no a 0\")";
__c.LogImpl("520316220","cajas no a 0",0);
 };
RDebugUtils.currentLine=20316222;
 //BA.debugLineNum = 20316222;BA.debugLine="If 2 = 2 Then lProdX.Text = cs.Color(Colors.red)";
if (2==2) { 
_lprodx.setText(BA.ObjectToCharSequence(_cs.Color(__c.Colors.Red).Append(BA.ObjectToCharSequence(_nombrex)).Pop().Append(BA.ObjectToCharSequence(__c.CRLF)).Append(BA.ObjectToCharSequence("Existencias: "+_invactualizado)).Color(((int)0xff017f01)).Append(BA.ObjectToCharSequence(("   $"+__c.SmartStringFormatter("",(Object)(__c.NumberFormat2((double)(Double.parseDouble(_precio)),(int) (1),(int) (2),(int) (2),__c.False)))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Max. Cajas: "+__c.SmartStringFormatter("",(Object)(_maxcajas2))+""))).PopAll().getObject()));};
 };
RDebugUtils.currentLine=20316225;
 //BA.debugLineNum = 20316225;BA.debugLine="If Subs.totalPedido < 1 Then laCant2.Text = \"0\"";
if ((double)(Double.parseDouble(_subs._totalpedido /*String*/ (ba)))<1) { 
_lacant2.setText(BA.ObjectToCharSequence("0"));};
RDebugUtils.currentLine=20316226;
 //BA.debugLineNum = 20316226;BA.debugLine="invTotal = totalcajasmaspiezas + Subs.traeinventa";
__ref._invtotal /*int*/  = (int) (__ref._totalcajasmaspiezas /*int*/ +(double)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_id))));
RDebugUtils.currentLine=20316229;
 //BA.debugLineNum = 20316229;BA.debugLine="End Sub";
return "";
}
public String  _b_qr_click(SHARK2.keymon.com.mx.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=18612224;
 //BA.debugLineNum = 18612224;BA.debugLine="Sub b_QR_Click";
RDebugUtils.currentLine=18612225;
 //BA.debugLineNum = 18612225;BA.debugLine="If ciclo = 1 Then";
if ((__ref._ciclo /*String*/ ).equals(BA.NumberToString(1))) { 
RDebugUtils.currentLine=18612226;
 //BA.debugLineNum = 18612226;BA.debugLine="ciclo = 2";
__ref._ciclo /*String*/  = BA.NumberToString(2);
RDebugUtils.currentLine=18612227;
 //BA.debugLineNum = 18612227;BA.debugLine="ya_entro  = \"0\"";
__ref._ya_entro /*String*/  = "0";
RDebugUtils.currentLine=18612228;
 //BA.debugLineNum = 18612228;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*void*/ (null);
 }else 
{RDebugUtils.currentLine=18612229;
 //BA.debugLineNum = 18612229;BA.debugLine="else if ciclo = 2 Then";
if ((__ref._ciclo /*String*/ ).equals(BA.NumberToString(2))) { 
RDebugUtils.currentLine=18612230;
 //BA.debugLineNum = 18612230;BA.debugLine="ciclo = 3";
__ref._ciclo /*String*/  = BA.NumberToString(3);
RDebugUtils.currentLine=18612231;
 //BA.debugLineNum = 18612231;BA.debugLine="ya_entro  = \"0\"";
__ref._ya_entro /*String*/  = "0";
RDebugUtils.currentLine=18612232;
 //BA.debugLineNum = 18612232;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*void*/ (null);
 }else 
{RDebugUtils.currentLine=18612233;
 //BA.debugLineNum = 18612233;BA.debugLine="else if ciclo = 3 Then";
if ((__ref._ciclo /*String*/ ).equals(BA.NumberToString(3))) { 
RDebugUtils.currentLine=18612234;
 //BA.debugLineNum = 18612234;BA.debugLine="ciclo = 4";
__ref._ciclo /*String*/  = BA.NumberToString(4);
RDebugUtils.currentLine=18612235;
 //BA.debugLineNum = 18612235;BA.debugLine="ya_entro  = \"0\"";
__ref._ya_entro /*String*/  = "0";
RDebugUtils.currentLine=18612236;
 //BA.debugLineNum = 18612236;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*void*/ (null);
 }else 
{RDebugUtils.currentLine=18612237;
 //BA.debugLineNum = 18612237;BA.debugLine="else if ciclo = 4 Then";
if ((__ref._ciclo /*String*/ ).equals(BA.NumberToString(4))) { 
RDebugUtils.currentLine=18612238;
 //BA.debugLineNum = 18612238;BA.debugLine="ciclo = 5";
__ref._ciclo /*String*/  = BA.NumberToString(5);
RDebugUtils.currentLine=18612239;
 //BA.debugLineNum = 18612239;BA.debugLine="ya_entro  = \"0\"";
__ref._ya_entro /*String*/  = "0";
RDebugUtils.currentLine=18612240;
 //BA.debugLineNum = 18612240;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*void*/ (null);
 }else 
{RDebugUtils.currentLine=18612241;
 //BA.debugLineNum = 18612241;BA.debugLine="else if ciclo = 5 Then";
if ((__ref._ciclo /*String*/ ).equals(BA.NumberToString(5))) { 
RDebugUtils.currentLine=18612242;
 //BA.debugLineNum = 18612242;BA.debugLine="ciclo = 1";
__ref._ciclo /*String*/  = BA.NumberToString(1);
RDebugUtils.currentLine=18612243;
 //BA.debugLineNum = 18612243;BA.debugLine="ya_entro  = \"0\"";
__ref._ya_entro /*String*/  = "0";
RDebugUtils.currentLine=18612244;
 //BA.debugLineNum = 18612244;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*void*/ (null);
 }}}}}
;
RDebugUtils.currentLine=18612246;
 //BA.debugLineNum = 18612246;BA.debugLine="End Sub";
return "";
}
public void  _b4xpage_appear(SHARK2.keymon.com.mx.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(SHARK2.keymon.com.mx.c_productos parent,SHARK2.keymon.com.mx.c_productos __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
SHARK2.keymon.com.mx.c_productos __ref;
SHARK2.keymon.com.mx.c_productos parent;
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
boolean _haypromos = false;
int _i = 0;
anywheresoftware.b4a.objects.collections.Map _tm = null;
anywheresoftware.b4a.objects.collections.Map _m = null;
int step63;
int limit63;

@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=18153473;
 //BA.debugLineNum = 18153473;BA.debugLine="Log(Subs.traeTipoCliente2)";
parent.__c.LogImpl("518153473",parent._subs._traetipocliente2 /*String*/ (ba),0);
RDebugUtils.currentLine=18153474;
 //BA.debugLineNum = 18153474;BA.debugLine="tipoClienteActual = Subs.traeTipoCliente2";
__ref._tipoclienteactual /*String*/  = parent._subs._traetipocliente2 /*String*/ (ba);
RDebugUtils.currentLine=18153475;
 //BA.debugLineNum = 18153475;BA.debugLine="Log(B4XPages.MainPage.tipo_venta)";
parent.__c.LogImpl("518153475",parent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,0);
RDebugUtils.currentLine=18153476;
 //BA.debugLineNum = 18153476;BA.debugLine="If B4XPages.MainPage.tipo_venta = \"PREVENTA_CONTA";
if (true) break;

case 1:
//if
this.state = 10;
if ((parent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ).equals("PREVENTA_CONTADO") || (parent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ).equals("ABORDO")) { 
this.state = 3;
}else 
{RDebugUtils.currentLine=18153479;
 //BA.debugLineNum = 18153479;BA.debugLine="Else If B4XPages.MainPage.tipo_venta = \"VENTA\" Th";
if ((parent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ).equals("VENTA")) { 
this.state = 5;
}else 
{RDebugUtils.currentLine=18153482;
 //BA.debugLineNum = 18153482;BA.debugLine="Else If B4XPages.MainPage.tipo_venta = \"RECARGA\"";
if ((parent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ).equals("RECARGA")) { 
this.state = 7;
}else 
{RDebugUtils.currentLine=18153485;
 //BA.debugLineNum = 18153485;BA.debugLine="Else If B4XPages.MainPage.tipo_venta = \"PREVENTA_";
if ((parent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ).equals("PREVENTA_CREDITO")) { 
this.state = 9;
}}}}
if (true) break;

case 3:
//C
this.state = 10;
RDebugUtils.currentLine=18153477;
 //BA.debugLineNum = 18153477;BA.debugLine="Starter.tabla = \"CAT_GUNAPROD\"";
parent._starter._tabla /*String*/  = "CAT_GUNAPROD";
RDebugUtils.currentLine=18153478;
 //BA.debugLineNum = 18153478;BA.debugLine="Log(\"1\")";
parent.__c.LogImpl("518153478","1",0);
 if (true) break;

case 5:
//C
this.state = 10;
RDebugUtils.currentLine=18153480;
 //BA.debugLineNum = 18153480;BA.debugLine="Starter.tabla = \"CAT_GUNAPROD2\"";
parent._starter._tabla /*String*/  = "CAT_GUNAPROD2";
RDebugUtils.currentLine=18153481;
 //BA.debugLineNum = 18153481;BA.debugLine="Log(2)";
parent.__c.LogImpl("518153481",BA.NumberToString(2),0);
 if (true) break;

case 7:
//C
this.state = 10;
RDebugUtils.currentLine=18153483;
 //BA.debugLineNum = 18153483;BA.debugLine="Starter.tabla = \"CAT_GUNAPROD\"";
parent._starter._tabla /*String*/  = "CAT_GUNAPROD";
RDebugUtils.currentLine=18153484;
 //BA.debugLineNum = 18153484;BA.debugLine="Log(3)";
parent.__c.LogImpl("518153484",BA.NumberToString(3),0);
 if (true) break;

case 9:
//C
this.state = 10;
RDebugUtils.currentLine=18153486;
 //BA.debugLineNum = 18153486;BA.debugLine="Starter.tabla = \"CAT_GUNAPROD4\"";
parent._starter._tabla /*String*/  = "CAT_GUNAPROD4";
RDebugUtils.currentLine=18153487;
 //BA.debugLineNum = 18153487;BA.debugLine="Log(4)";
parent.__c.LogImpl("518153487",BA.NumberToString(4),0);
 if (true) break;

case 10:
//C
this.state = 11;
;
RDebugUtils.currentLine=18153489;
 //BA.debugLineNum = 18153489;BA.debugLine="Log(Starter.tabla)";
parent.__c.LogImpl("518153489",parent._starter._tabla /*String*/ ,0);
RDebugUtils.currentLine=18153490;
 //BA.debugLineNum = 18153490;BA.debugLine="clienteId = Subs.traeCliente";
__ref._clienteid /*String*/  = parent._subs._traecliente /*String*/ (ba);
RDebugUtils.currentLine=18153491;
 //BA.debugLineNum = 18153491;BA.debugLine="rutaUsuario = Subs.traeRuta(Subs.traeCliente)";
__ref._rutausuario /*String*/  = parent._subs._traeruta /*String*/ (ba,parent._subs._traecliente /*String*/ (ba));
RDebugUtils.currentLine=18153492;
 //BA.debugLineNum = 18153492;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE CAT_";
parent._b4xpages._mainpage /*SHARK2.keymon.com.mx.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=18153493;
 //BA.debugLineNum = 18153493;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE CAT_";
parent._b4xpages._mainpage /*SHARK2.keymon.com.mx.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=18153494;
 //BA.debugLineNum = 18153494;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE CAT_";
parent._b4xpages._mainpage /*SHARK2.keymon.com.mx.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=18153495;
 //BA.debugLineNum = 18153495;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE CAT_";
parent._b4xpages._mainpage /*SHARK2.keymon.com.mx.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=18153496;
 //BA.debugLineNum = 18153496;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE CAT_";
parent._b4xpages._mainpage /*SHARK2.keymon.com.mx.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=18153497;
 //BA.debugLineNum = 18153497;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.74));
RDebugUtils.currentLine=18153498;
 //BA.debugLineNum = 18153498;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=18153499;
 //BA.debugLineNum = 18153499;BA.debugLine="If B4XPages.MainPage.bTerminarClicked Then";
if (true) break;

case 11:
//if
this.state = 14;
if (parent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._bterminarclicked /*boolean*/ ) { 
this.state = 13;
}if (true) break;

case 13:
//C
this.state = 14;
RDebugUtils.currentLine=18153500;
 //BA.debugLineNum = 18153500;BA.debugLine="lv_catalogos.Visible = True";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.True);
RDebugUtils.currentLine=18153501;
 //BA.debugLineNum = 18153501;BA.debugLine="lv_promos.Visible = False";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=18153502;
 //BA.debugLineNum = 18153502;BA.debugLine="lv_tipo.Visible = False";
__ref._lv_tipo /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=18153503;
 //BA.debugLineNum = 18153503;BA.debugLine="lv_subtipo.Visible = False";
__ref._lv_subtipo /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=18153504;
 //BA.debugLineNum = 18153504;BA.debugLine="clv_prods_ll.AsView.Visible = False";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(parent.__c.False);
RDebugUtils.currentLine=18153505;
 //BA.debugLineNum = 18153505;BA.debugLine="B4XPages.MainPage.bTerminarClicked = False";
parent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._bterminarclicked /*boolean*/  = parent.__c.False;
 if (true) break;
;
RDebugUtils.currentLine=18153507;
 //BA.debugLineNum = 18153507;BA.debugLine="If ya_entro <> \"1\" Then";

case 14:
//if
this.state = 23;
if ((__ref._ya_entro /*String*/ ).equals("1") == false) { 
this.state = 16;
}if (true) break;

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

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

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

case 22:
//C
this.state = 23;
;
RDebugUtils.currentLine=18153509;
 //BA.debugLineNum = 18153509;BA.debugLine="entro =\"3\"";
__ref._entro /*String*/  = "3";
RDebugUtils.currentLine=18153510;
 //BA.debugLineNum = 18153510;BA.debugLine="lv_catalogos.Clear";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=18153511;
 //BA.debugLineNum = 18153511;BA.debugLine="Sleep(100)";
parent.__c.Sleep(ba,new anywheresoftware.b4a.shell.DebugResumableSub.DelegatableResumableSub(this, "c_productos", "b4xpage_appear"),(int) (100));
this.state = 64;
return;
case 64:
//C
this.state = 23;
;
RDebugUtils.currentLine=18153512;
 //BA.debugLineNum = 18153512;BA.debugLine="lfila.Text = \"CATALOGOS\"";
__ref._lfila /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("CATALOGOS"));
RDebugUtils.currentLine=18153513;
 //BA.debugLineNum = 18153513;BA.debugLine="p_productos.Height = Root.Height";
__ref._p_productos /*anywheresoftware.b4a.objects.PanelWrapper*/ .setHeight(__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getHeight());
RDebugUtils.currentLine=18153514;
 //BA.debugLineNum = 18153514;BA.debugLine="clv_prods_ll.AsView.Visible = False";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(parent.__c.False);
RDebugUtils.currentLine=18153515;
 //BA.debugLineNum = 18153515;BA.debugLine="lv_catalogos.Visible = True";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.True);
RDebugUtils.currentLine=18153516;
 //BA.debugLineNum = 18153516;BA.debugLine="p_botonesVenta.Visible = False";
__ref._p_botonesventa /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=18153517;
 //BA.debugLineNum = 18153517;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()-10));
RDebugUtils.currentLine=18153518;
 //BA.debugLineNum = 18153518;BA.debugLine="lv_promos.Visible = False";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.False);
 if (true) break;

case 23:
//C
this.state = 24;
;
RDebugUtils.currentLine=18153520;
 //BA.debugLineNum = 18153520;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=18153521;
 //BA.debugLineNum = 18153521;BA.debugLine="label1 = lv_catalogos.SingleLineLayout.Label";
_label1 = __ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getSingleLineLayout().Label;
RDebugUtils.currentLine=18153522;
 //BA.debugLineNum = 18153522;BA.debugLine="label1.TextSize = 17";
_label1.setTextSize((float) (17));
RDebugUtils.currentLine=18153523;
 //BA.debugLineNum = 18153523;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(parent.__c.Colors.Black);
RDebugUtils.currentLine=18153524;
 //BA.debugLineNum = 18153524;BA.debugLine="lv_catalogos.Clear";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=18153525;
 //BA.debugLineNum = 18153525;BA.debugLine="lv_catalogos.AddSingleLine(\"CATALOGO\")";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddSingleLine(BA.ObjectToCharSequence("CATALOGO"));
RDebugUtils.currentLine=18153527;
 //BA.debugLineNum = 18153527;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery($\"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)(parent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select count(*) as hayPromos from "+parent.__c.SmartStringFormatter("",(Object)(parent._starter._tabla /*String*/ ))+" where CAT_GP_TIPO = 'PROMOS'"))));
RDebugUtils.currentLine=18153528;
 //BA.debugLineNum = 18153528;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=18153529;
 //BA.debugLineNum = 18153529;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery($\"SELECT CUE";
__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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("SELECT CUENTA FROM CUENTAA"))));
RDebugUtils.currentLine=18153530;
 //BA.debugLineNum = 18153530;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=18153531;
 //BA.debugLineNum = 18153531;BA.debugLine="If c.GetString(\"CUENTA\") <> \"0\" And c.GetString(\"";
if (true) break;

case 24:
//if
this.state = 52;
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA")).equals("0") == false && (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA")).equals("1") == false) { 
this.state = 26;
}if (true) break;

case 26:
//C
this.state = 27;
RDebugUtils.currentLine=18153532;
 //BA.debugLineNum = 18153532;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2(("select CAT_GP_ID, CAT_GP_NOMBRE, CAT_GP_PRECIO1, CAT_GP_ALMACEN, IFNULL(CAT_GP_IMG,0) AS CAT_GP_IMG from "+parent.__c.SmartStringFormatter("",(Object)(parent._starter._tabla /*String*/ ))+" where CAT_GP_PRECIO1 > 0 AND  CAT_GP_ALMACEN > 0 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[]{"PROMOS","PROMOS"})));
RDebugUtils.currentLine=18153535;
 //BA.debugLineNum = 18153535;BA.debugLine="Private hayPromos As Boolean = False";
_haypromos = parent.__c.False;
RDebugUtils.currentLine=18153536;
 //BA.debugLineNum = 18153536;BA.debugLine="If c2.RowCount > 0 Then";
if (true) break;

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

case 29:
//C
this.state = 30;
RDebugUtils.currentLine=18153537;
 //BA.debugLineNum = 18153537;BA.debugLine="Log(\"Esto es un conteo --->\"&c2.RowCount) 'Isaa";
parent.__c.LogImpl("518153537","Esto es un conteo --->"+BA.NumberToString(__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()),0);
RDebugUtils.currentLine=18153538;
 //BA.debugLineNum = 18153538;BA.debugLine="For i = 0 To c2.RowCount - 1";
if (true) break;

case 30:
//for
this.state = 43;
step63 = 1;
limit63 = (int) (__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
this.state = 65;
if (true) break;

case 65:
//C
this.state = 43;
if ((step63 > 0 && _i <= limit63) || (step63 < 0 && _i >= limit63)) this.state = 32;
if (true) break;

case 66:
//C
this.state = 65;
_i = ((int)(0 + _i + step63)) ;
if (true) break;

case 32:
//C
this.state = 33;
RDebugUtils.currentLine=18153539;
 //BA.debugLineNum = 18153539;BA.debugLine="c2.Position = i";
__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=18153540;
 //BA.debugLineNum = 18153540;BA.debugLine="Log(\"Esto es i----->\" & i) 'Isaac";
parent.__c.LogImpl("518153540","Esto es i----->"+BA.NumberToString(_i),0);
RDebugUtils.currentLine=18153541;
 //BA.debugLineNum = 18153541;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=18153544;
 //BA.debugLineNum = 18153544;BA.debugLine="If tm <> Null Then";
if (true) break;

case 33:
//if
this.state = 42;
if (_tm!= null) { 
this.state = 35;
}else {
this.state = 41;
}if (true) break;

case 35:
//C
this.state = 36;
RDebugUtils.currentLine=18153545;
 //BA.debugLineNum = 18153545;BA.debugLine="If tm.Get(\"status\") = \"ok\" Then 'Solo muestra";
if (true) break;

case 36:
//if
this.state = 39;
if ((_tm.Get((Object)("status"))).equals((Object)("ok"))) { 
this.state = 38;
}if (true) break;

case 38:
//C
this.state = 39;
RDebugUtils.currentLine=18153546;
 //BA.debugLineNum = 18153546;BA.debugLine="hayPromos = True";
_haypromos = parent.__c.True;
 if (true) break;

case 39:
//C
this.state = 42;
;
 if (true) break;

case 41:
//C
this.state = 42;
RDebugUtils.currentLine=18153549;
 //BA.debugLineNum = 18153549;BA.debugLine="Log(\"El Map devuelto por procesaPromocion es";
parent.__c.LogImpl("518153549","El Map devuelto por procesaPromocion es null",0);
 if (true) break;

case 42:
//C
this.state = 66;
;
 if (true) break;
if (true) break;
;
RDebugUtils.currentLine=18153552;
 //BA.debugLineNum = 18153552;BA.debugLine="If hayPromos Then lv_catalogos.AddSingleLine(\"P";

case 43:
//if
this.state = 48;
if (_haypromos) { 
this.state = 45;
;}if (true) break;

case 45:
//C
this.state = 48;
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddSingleLine(BA.ObjectToCharSequence("PROMOS"));
if (true) break;

case 48:
//C
this.state = 51;
;
 if (true) break;

case 50:
//C
this.state = 51;
RDebugUtils.currentLine=18153554;
 //BA.debugLineNum = 18153554;BA.debugLine="Log(\"NO HAY PROMOS\")";
parent.__c.LogImpl("518153554","NO HAY PROMOS",0);
 if (true) break;

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

case 52:
//C
this.state = 53;
;
RDebugUtils.currentLine=18153558;
 //BA.debugLineNum = 18153558;BA.debugLine="Sleep(100)";
parent.__c.Sleep(ba,new anywheresoftware.b4a.shell.DebugResumableSub.DelegatableResumableSub(this, "c_productos", "b4xpage_appear"),(int) (100));
this.state = 67;
return;
case 67:
//C
this.state = 53;
;
RDebugUtils.currentLine=18153559;
 //BA.debugLineNum = 18153559;BA.debugLine="l_total.Visible = False";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=18153560;
 //BA.debugLineNum = 18153560;BA.debugLine="l_totProds.Visible = False";
__ref._l_totprods /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=18153561;
 //BA.debugLineNum = 18153561;BA.debugLine="l_total.Left = 5dip";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setLeft(parent.__c.DipToCurrent((int) (5)));
RDebugUtils.currentLine=18153562;
 //BA.debugLineNum = 18153562;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=18153563;
 //BA.debugLineNum = 18153563;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=18153564;
 //BA.debugLineNum = 18153564;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=18153566;
 //BA.debugLineNum = 18153566;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=18153567;
 //BA.debugLineNum = 18153567;BA.debugLine="prodsPedidoActual = m.Get(\"productos\")";
__ref._prodspedidoactual /*String*/  = BA.ObjectToString(_m.Get((Object)("productos")));
RDebugUtils.currentLine=18153568;
 //BA.debugLineNum = 18153568;BA.debugLine="montoPedidoActual = m.Get(\"monto\")";
__ref._montopedidoactual /*String*/  = BA.ObjectToString(_m.Get((Object)("monto")));
RDebugUtils.currentLine=18153569;
 //BA.debugLineNum = 18153569;BA.debugLine="hayPedido = Subs.hayPedido";
__ref._haypedido /*boolean*/  = parent._subs._haypedido /*boolean*/ (ba);
RDebugUtils.currentLine=18153571;
 //BA.debugLineNum = 18153571;BA.debugLine="B4XPages.MainPage.productos.clv_prods_ll.Clear";
parent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._productos /*SHARK2.keymon.com.mx.c_productos*/ ._clv_prods_ll /*b4a.example3.customlistview*/ ._clear();
RDebugUtils.currentLine=18153572;
 //BA.debugLineNum = 18153572;BA.debugLine="If reiniciarlistaProds Then";
if (true) break;

case 53:
//if
this.state = 58;
if (__ref._reiniciarlistaprods /*boolean*/ ) { 
this.state = 55;
}else 
{RDebugUtils.currentLine=18153576;
 //BA.debugLineNum = 18153576;BA.debugLine="else If hayPedido Then";
if (__ref._haypedido /*boolean*/ ) { 
this.state = 57;
}}
if (true) break;

case 55:
//C
this.state = 58;
RDebugUtils.currentLine=18153575;
 //BA.debugLineNum = 18153575;BA.debugLine="clv_prods_ll.Clear";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._clear();
 if (true) break;

case 57:
//C
this.state = 58;
RDebugUtils.currentLine=18153580;
 //BA.debugLineNum = 18153580;BA.debugLine="clv_prods_ll.Clear";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._clear();
 if (true) break;
;
RDebugUtils.currentLine=18153582;
 //BA.debugLineNum = 18153582;BA.debugLine="If clv_prods_ll.Size = 0 Then LlenaProdsLL(Null)";

case 58:
//if
this.state = 63;
if (__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getsize()==0) { 
this.state = 60;
;}if (true) break;

case 60:
//C
this.state = 63;
__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 63:
//C
this.state = -1;
;
RDebugUtils.currentLine=18153583;
 //BA.debugLineNum = 18153583;BA.debugLine="clv_prods_ll.JumpToItem(0) 'Vamos al primer artíc";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._jumptoitem((int) (0));
RDebugUtils.currentLine=18153584;
 //BA.debugLineNum = 18153584;BA.debugLine="PCLV.lblHint.SetTextSizeAnimated(0,13)";
__ref._pclv /*SHARK2.keymon.com.mx.preoptimizedclv*/ ._lblhint /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .SetTextSizeAnimated((int) (0),(float) (13));
RDebugUtils.currentLine=18153585;
 //BA.debugLineNum = 18153585;BA.debugLine="PCLV.B4XSeekBar1.Color1=Colors.Transparent";
__ref._pclv /*SHARK2.keymon.com.mx.preoptimizedclv*/ ._b4xseekbar1 /*SHARK2.keymon.com.mx.b4xseekbar*/ ._color1 /*int*/  = parent.__c.Colors.Transparent;
RDebugUtils.currentLine=18153586;
 //BA.debugLineNum = 18153586;BA.debugLine="PCLV.B4XSeekBar1.Color2=Colors.Transparent";
__ref._pclv /*SHARK2.keymon.com.mx.preoptimizedclv*/ ._b4xseekbar1 /*SHARK2.keymon.com.mx.b4xseekbar*/ ._color2 /*int*/  = parent.__c.Colors.Transparent;
RDebugUtils.currentLine=18153587;
 //BA.debugLineNum = 18153587;BA.debugLine="PCLV.B4XSeekBar1.ThumbColor=Colors.Transparent";
__ref._pclv /*SHARK2.keymon.com.mx.preoptimizedclv*/ ._b4xseekbar1 /*SHARK2.keymon.com.mx.b4xseekbar*/ ._thumbcolor /*int*/  = parent.__c.Colors.Transparent;
RDebugUtils.currentLine=18153588;
 //BA.debugLineNum = 18153588;BA.debugLine="PCLV.B4XSeekBar1.mBase.Left=Root.Width *110";
__ref._pclv /*SHARK2.keymon.com.mx.preoptimizedclv*/ ._b4xseekbar1 /*SHARK2.keymon.com.mx.b4xseekbar*/ ._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .setLeft((int) (__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth()*110));
RDebugUtils.currentLine=18153590;
 //BA.debugLineNum = 18153590;BA.debugLine="PCLV.B4XSeekBar1.mBase.Height=0";
__ref._pclv /*SHARK2.keymon.com.mx.preoptimizedclv*/ ._b4xseekbar1 /*SHARK2.keymon.com.mx.b4xseekbar*/ ._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .setHeight((int) (0));
RDebugUtils.currentLine=18153591;
 //BA.debugLineNum = 18153591;BA.debugLine="PCLV.pnlOverlay.Height = clv_prods_ll.AsView.Heig";
__ref._pclv /*SHARK2.keymon.com.mx.preoptimizedclv*/ ._pnloverlay /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .setHeight(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().getHeight());
RDebugUtils.currentLine=18153592;
 //BA.debugLineNum = 18153592;BA.debugLine="PCLV.B4XSeekBar1.Update";
__ref._pclv /*SHARK2.keymon.com.mx.preoptimizedclv*/ ._b4xseekbar1 /*SHARK2.keymon.com.mx.b4xseekbar*/ ._update /*String*/ (null);
RDebugUtils.currentLine=18153593;
 //BA.debugLineNum = 18153593;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b_rechazar_click(SHARK2.keymon.com.mx.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=19660800;
 //BA.debugLineNum = 19660800;BA.debugLine="Private Sub b_rechazar_Click";
RDebugUtils.currentLine=19660802;
 //BA.debugLineNum = 19660802;BA.debugLine="result =  Msgbox2($\"Seguro que desea borrar el pe";
__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=19660803;
 //BA.debugLineNum = 19660803;BA.debugLine="If result = DialogResponse.POSITIVE Then";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=19660804;
 //BA.debugLineNum = 19660804;BA.debugLine="Subs.borraPedidoClienteActual";
_subs._borrapedidoclienteactual /*String*/ (ba);
RDebugUtils.currentLine=19660805;
 //BA.debugLineNum = 19660805;BA.debugLine="prodsMap.Initialize";
__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
RDebugUtils.currentLine=19660806;
 //BA.debugLineNum = 19660806;BA.debugLine="B4XPages.MainPage.promos.promosMap.Initialize";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._promos /*SHARK2.keymon.com.mx.c_promos*/ ._promosmap /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
RDebugUtils.currentLine=19660809;
 //BA.debugLineNum = 19660809;BA.debugLine="clv_prods_ll.Clear";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._clear();
RDebugUtils.currentLine=19660810;
 //BA.debugLineNum = 19660810;BA.debugLine="Log(\"Positivo\")";
__c.LogImpl("519660810","Positivo",0);
RDebugUtils.currentLine=19660811;
 //BA.debugLineNum = 19660811;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 }else {
RDebugUtils.currentLine=19660813;
 //BA.debugLineNum = 19660813;BA.debugLine="Log(\"NO Positivo\")";
__c.LogImpl("519660813","NO Positivo",0);
RDebugUtils.currentLine=19660814;
 //BA.debugLineNum = 19660814;BA.debugLine="p_vistaPreviaTrans.Visible = False";
__ref._p_vistapreviatrans /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
 };
RDebugUtils.currentLine=19660819;
 //BA.debugLineNum = 19660819;BA.debugLine="p_vistaPreviaTrans.Visible=False";
__ref._p_vistapreviatrans /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=19660820;
 //BA.debugLineNum = 19660820;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=19660821;
 //BA.debugLineNum = 19660821;BA.debugLine="End Sub";
return "";
}
public String  _b_terminar1_click(SHARK2.keymon.com.mx.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));}
String _q = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _c_prods = null;
String _almacenactual = "";
int _i = 0;
String _nomprod = "";
String _idprod = "";
String _presname = "";
String _cantpres = "";
int _uvmval = 0;
String _cedisfila = "";
String _foliofila = "";
String _dirfila = "";
int _cantpzs = 0;
anywheresoftware.b4a.objects.CSBuilder _cstitulo = null;
anywheresoftware.b4a.objects.CSBuilder _detalle = null;
anywheresoftware.b4a.objects.collections.Map _datosidentidad = null;
RDebugUtils.currentLine=19070976;
 //BA.debugLineNum = 19070976;BA.debugLine="Sub b_terminar1_Click";
RDebugUtils.currentLine=19070978;
 //BA.debugLineNum = 19070978;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"delete from";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.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=19070980;
 //BA.debugLineNum = 19070980;BA.debugLine="lv_promos.Visible = False";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=19070981;
 //BA.debugLineNum = 19070981;BA.debugLine="clv_prods_ll.AsView.Visible = False";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(__c.False);
RDebugUtils.currentLine=19070982;
 //BA.debugLineNum = 19070982;BA.debugLine="lv_catalogos.Visible = True";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=19070983;
 //BA.debugLineNum = 19070983;BA.debugLine="lv_prodsPedido.Clear";
__ref._lv_prodspedido /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=19070988;
 //BA.debugLineNum = 19070988;BA.debugLine="lv_prodsPedido.TwoLinesLayout.ItemHeight = 140dip";
__ref._lv_prodspedido /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().setItemHeight(__c.DipToCurrent((int) (140)));
RDebugUtils.currentLine=19070991;
 //BA.debugLineNum = 19070991;BA.debugLine="lv_prodsPedido.TwoLinesLayout.Label.Height = 45di";
__ref._lv_prodspedido /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label.setHeight(__c.DipToCurrent((int) (45)));
RDebugUtils.currentLine=19070992;
 //BA.debugLineNum = 19070992;BA.debugLine="lv_prodsPedido.TwoLinesLayout.Label.TextSize = 14";
__ref._lv_prodspedido /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label.setTextSize((float) (14));
RDebugUtils.currentLine=19070993;
 //BA.debugLineNum = 19070993;BA.debugLine="lv_prodsPedido.TwoLinesLayout.Label.Typeface = Ty";
__ref._lv_prodspedido /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label.setTypeface(__c.Typeface.DEFAULT_BOLD);
RDebugUtils.currentLine=19070994;
 //BA.debugLineNum = 19070994;BA.debugLine="lv_prodsPedido.TwoLinesLayout.Label.Gravity = Gra";
__ref._lv_prodspedido /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label.setGravity(__c.Gravity.CENTER_VERTICAL);
RDebugUtils.currentLine=19070997;
 //BA.debugLineNum = 19070997;BA.debugLine="lv_prodsPedido.TwoLinesLayout.SecondLabel.Height";
__ref._lv_prodspedido /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel.setHeight(__c.DipToCurrent((int) (90)));
RDebugUtils.currentLine=19070998;
 //BA.debugLineNum = 19070998;BA.debugLine="lv_prodsPedido.TwoLinesLayout.SecondLabel.Top = 5";
__ref._lv_prodspedido /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel.setTop(__c.DipToCurrent((int) (50)));
RDebugUtils.currentLine=19070999;
 //BA.debugLineNum = 19070999;BA.debugLine="lv_prodsPedido.TwoLinesLayout.SecondLabel.TextSiz";
__ref._lv_prodspedido /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel.setTextSize((float) (14));
RDebugUtils.currentLine=19071002;
 //BA.debugLineNum = 19071002;BA.debugLine="Private q As String = \"SELECT PE_PRONOMBRE, PE_CO";
_q = "SELECT PE_PRONOMBRE, PE_COSTO_TOT, PE_CANT, PE_FOLIO, PE_CEDIS, PE_PRESENTACION, PE_CANTC, PE_UVM, PE_PROID, PE_DIRIGIDA "+"FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa) order by PE_CEDIS,PE_COSTO_TOT, PE_PRONOMBRE";
RDebugUtils.currentLine=19071005;
 //BA.debugLineNum = 19071005;BA.debugLine="Private c_prods As Cursor = B4XPages.MainPage.skm";
_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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(_q)));
RDebugUtils.currentLine=19071007;
 //BA.debugLineNum = 19071007;BA.debugLine="If c_prods.RowCount > 0 Then";
if (_c_prods.getRowCount()>0) { 
RDebugUtils.currentLine=19071008;
 //BA.debugLineNum = 19071008;BA.debugLine="vamoaver.Initialize";
__ref._vamoaver /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
RDebugUtils.currentLine=19071009;
 //BA.debugLineNum = 19071009;BA.debugLine="Dim almacenActual As String = Subs.traeAlmacen '";
_almacenactual = _subs._traealmacen /*String*/ (ba);
RDebugUtils.currentLine=19071011;
 //BA.debugLineNum = 19071011;BA.debugLine="For i = 0 To c_prods.RowCount - 1";
{
final int step19 = 1;
final int limit19 = (int) (_c_prods.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit19 ;_i = _i + step19 ) {
RDebugUtils.currentLine=19071012;
 //BA.debugLineNum = 19071012;BA.debugLine="c_prods.Position = i";
_c_prods.setPosition(_i);
RDebugUtils.currentLine=19071015;
 //BA.debugLineNum = 19071015;BA.debugLine="Dim nomProd As String = c_prods.GetString(\"PE_P";
_nomprod = _c_prods.GetString("PE_PRONOMBRE");
RDebugUtils.currentLine=19071016;
 //BA.debugLineNum = 19071016;BA.debugLine="Dim idProd As String = c_prods.GetString(\"PE_PR";
_idprod = _c_prods.GetString("PE_PROID");
RDebugUtils.currentLine=19071017;
 //BA.debugLineNum = 19071017;BA.debugLine="Dim presName As String = c_prods.GetString(\"PE_";
_presname = _c_prods.GetString("PE_PRESENTACION");
RDebugUtils.currentLine=19071018;
 //BA.debugLineNum = 19071018;BA.debugLine="Dim cantPres As String = c_prods.GetString(\"PE_";
_cantpres = _c_prods.GetString("PE_CANTC");
RDebugUtils.currentLine=19071019;
 //BA.debugLineNum = 19071019;BA.debugLine="Dim uvmVal As Int = c_prods.GetInt(\"PE_UVM\")";
_uvmval = _c_prods.GetInt("PE_UVM");
RDebugUtils.currentLine=19071020;
 //BA.debugLineNum = 19071020;BA.debugLine="Dim cedisFila As String = c_prods.GetString(\"PE";
_cedisfila = _c_prods.GetString("PE_CEDIS");
RDebugUtils.currentLine=19071021;
 //BA.debugLineNum = 19071021;BA.debugLine="Dim folioFila As String = c_prods.GetString(\"PE";
_foliofila = _c_prods.GetString("PE_FOLIO");
RDebugUtils.currentLine=19071022;
 //BA.debugLineNum = 19071022;BA.debugLine="Dim dirFila As String = c_prods.GetString(\"PE_D";
_dirfila = _c_prods.GetString("PE_DIRIGIDA");
RDebugUtils.currentLine=19071023;
 //BA.debugLineNum = 19071023;BA.debugLine="Dim cantPzs As Int = c_prods.GetInt(\"PE_CANT\")";
_cantpzs = _c_prods.GetInt("PE_CANT");
RDebugUtils.currentLine=19071025;
 //BA.debugLineNum = 19071025;BA.debugLine="If cantPres = \"\" Or cantPres = \"null\" Then cant";
if ((_cantpres).equals("") || (_cantpres).equals("null")) { 
_cantpres = "0";};
RDebugUtils.currentLine=19071030;
 //BA.debugLineNum = 19071030;BA.debugLine="Dim csTitulo As CSBuilder";
_cstitulo = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=19071031;
 //BA.debugLineNum = 19071031;BA.debugLine="csTitulo.Initialize";
_cstitulo.Initialize();
RDebugUtils.currentLine=19071033;
 //BA.debugLineNum = 19071033;BA.debugLine="If cedisFila <> almacenActual Then";
if ((_cedisfila).equals(_almacenactual) == false) { 
RDebugUtils.currentLine=19071035;
 //BA.debugLineNum = 19071035;BA.debugLine="csTitulo.Color(Colors.RGB(0, 150, 136)).Typefa";
_cstitulo.Color(__c.Colors.RGB((int) (0),(int) (150),(int) (136))).Typeface(__c.Typeface.DEFAULT_BOLD).Append(BA.ObjectToCharSequence(_nomprod+" (PROMO)")).PopAll();
 }else {
RDebugUtils.currentLine=19071038;
 //BA.debugLineNum = 19071038;BA.debugLine="csTitulo.Color(Colors.RGB(150, 0, 0)).Typeface";
_cstitulo.Color(__c.Colors.RGB((int) (150),(int) (0),(int) (0))).Typeface(__c.Typeface.DEFAULT_BOLD).Append(BA.ObjectToCharSequence(_nomprod)).PopAll();
 };
RDebugUtils.currentLine=19071044;
 //BA.debugLineNum = 19071044;BA.debugLine="Dim detalle As CSBuilder";
_detalle = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=19071045;
 //BA.debugLineNum = 19071045;BA.debugLine="detalle.Initialize";
_detalle.Initialize();
RDebugUtils.currentLine=19071046;
 //BA.debugLineNum = 19071046;BA.debugLine="detalle.Append(CRLF) ' Salto de línea inicial p";
_detalle.Append(BA.ObjectToCharSequence(__c.CRLF));
RDebugUtils.currentLine=19071049;
 //BA.debugLineNum = 19071049;BA.debugLine="If uvmVal > 1 Then";
if (_uvmval>1) { 
RDebugUtils.currentLine=19071050;
 //BA.debugLineNum = 19071050;BA.debugLine="detalle.Color(Colors.Blue).Size(14).Append(pre";
_detalle.Color(__c.Colors.Blue).Size((int) (14)).Append(BA.ObjectToCharSequence(_presname.toUpperCase()+": "+BA.NumberToString((_cantpzs/(double)_uvmval)))).Pop().Pop().Append(BA.ObjectToCharSequence(__c.CRLF));
RDebugUtils.currentLine=19071051;
 //BA.debugLineNum = 19071051;BA.debugLine="detalle.Size(6).Append(CRLF).Pop";
_detalle.Size((int) (6)).Append(BA.ObjectToCharSequence(__c.CRLF)).Pop();
 };
RDebugUtils.currentLine=19071054;
 //BA.debugLineNum = 19071054;BA.debugLine="detalle.Color(Colors.DarkGray).Size(13).Append(";
_detalle.Color(__c.Colors.DarkGray).Size((int) (13)).Append(BA.ObjectToCharSequence("Piezas: ")).Color(__c.Colors.Black).Append(BA.ObjectToCharSequence("#"+BA.NumberToString(_cantpzs))).Pop();
RDebugUtils.currentLine=19071055;
 //BA.debugLineNum = 19071055;BA.debugLine="detalle.Append(\"  |  \").Color(Colors.DarkGray).";
_detalle.Append(BA.ObjectToCharSequence("  |  ")).Color(__c.Colors.DarkGray).Append(BA.ObjectToCharSequence("Subtotal: ")).Color(((int)0xff008000)).Append(BA.ObjectToCharSequence("$"+__c.NumberFormat2(_c_prods.GetDouble("PE_COSTO_TOT"),(int) (1),(int) (2),(int) (2),__c.False))).PopAll();
RDebugUtils.currentLine=19071058;
 //BA.debugLineNum = 19071058;BA.debugLine="Dim datosIdentidad As Map = CreateMap(\"id\": idP";
_datosidentidad = new anywheresoftware.b4a.objects.collections.Map();
_datosidentidad = __c.createMap(new Object[] {(Object)("id"),(Object)(_idprod),(Object)("nombre"),(Object)(_nomprod),(Object)("cedis"),(Object)(_cedisfila),(Object)("pres"),(Object)(_presname),(Object)("uvm"),(Object)(_uvmval),(Object)("dir"),(Object)(_dirfila),(Object)("folio"),(Object)(_foliofila),(Object)("cant"),(Object)(_cantpzs)});
RDebugUtils.currentLine=19071061;
 //BA.debugLineNum = 19071061;BA.debugLine="lv_prodsPedido.AddTwoLines2(csTitulo, detalle,";
__ref._lv_prodspedido /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddTwoLines2(BA.ObjectToCharSequence(_cstitulo.getObject()),BA.ObjectToCharSequence(_detalle.getObject()),(Object)(_datosidentidad.getObject()));
RDebugUtils.currentLine=19071063;
 //BA.debugLineNum = 19071063;BA.debugLine="vamoaver.Add(folioFila)";
__ref._vamoaver /*anywheresoftware.b4a.objects.collections.List*/ .Add((Object)(_foliofila));
 }
};
RDebugUtils.currentLine=19071066;
 //BA.debugLineNum = 19071066;BA.debugLine="ActualizarEtiquetasTotales";
__ref._actualizaretiquetastotales /*String*/ (null);
 };
RDebugUtils.currentLine=19071068;
 //BA.debugLineNum = 19071068;BA.debugLine="c_prods.Close";
_c_prods.Close();
RDebugUtils.currentLine=19071071;
 //BA.debugLineNum = 19071071;BA.debugLine="p_vistaPreviaTrans.Width = Root.Width";
__ref._p_vistapreviatrans /*anywheresoftware.b4a.objects.PanelWrapper*/ .setWidth(__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth());
RDebugUtils.currentLine=19071072;
 //BA.debugLineNum = 19071072;BA.debugLine="p_vistaPreviaTrans.Height = Root.Height";
__ref._p_vistapreviatrans /*anywheresoftware.b4a.objects.PanelWrapper*/ .setHeight(__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getHeight());
RDebugUtils.currentLine=19071073;
 //BA.debugLineNum = 19071073;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=19071074;
 //BA.debugLineNum = 19071074;BA.debugLine="p_vistaPrevia.Visible = True";
__ref._p_vistaprevia /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=19071075;
 //BA.debugLineNum = 19071075;BA.debugLine="p_vistaPreviaTrans.Visible = True";
__ref._p_vistapreviatrans /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=19071076;
 //BA.debugLineNum = 19071076;BA.debugLine="End Sub";
return "";
}
public String  _llenaprodsll(SHARK2.keymon.com.mx.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.sql.SQL.ResultSetWrapper _pe = null;
String _idprod = "";
anywheresoftware.b4a.objects.collections.List _presentacionesvalidas = null;
int _i = 0;
double _precio = 0;
String _presnombre = "";
String _dirigida = "";
int _umvval = 0;
int _cantexistente = 0;
anywheresoftware.b4a.objects.collections.Map _m = null;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl = null;
anywheresoftware.b4a.objects.collections.List _lpres = null;
int _alturaitem = 0;
RDebugUtils.currentLine=20185088;
 //BA.debugLineNum = 20185088;BA.debugLine="Sub LlenaProdsLL(p As ResultSet)";
RDebugUtils.currentLine=20185089;
 //BA.debugLineNum = 20185089;BA.debugLine="Log(\"--- Iniciando LlenaProdsLL (11 Niveles) ---\"";
__c.LogImpl("520185089","--- Iniciando LlenaProdsLL (11 Niveles) ---",0);
RDebugUtils.currentLine=20185090;
 //BA.debugLineNum = 20185090;BA.debugLine="listaProds.Initialize";
__ref._listaprods /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
RDebugUtils.currentLine=20185091;
 //BA.debugLineNum = 20185091;BA.debugLine="listaHints.Initialize";
__ref._listahints /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
RDebugUtils.currentLine=20185092;
 //BA.debugLineNum = 20185092;BA.debugLine="cantsMap.Initialize";
__ref._cantsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
RDebugUtils.currentLine=20185105;
 //BA.debugLineNum = 20185105;BA.debugLine="If hayPedido Then";
if (__ref._haypedido /*boolean*/ ) { 
RDebugUtils.currentLine=20185106;
 //BA.debugLineNum = 20185106;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("SELECT PE_PROID, PE_DIRIGIDA, PE_CANT FROM PEDIDO WHERE PE_CLIENTE = '"+__c.SmartStringFormatter("",(Object)(__ref._clienteid /*String*/ ))+"' AND PE_FOLIO ='"+__c.SmartStringFormatter("",(Object)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ))+"'"))));
RDebugUtils.currentLine=20185107;
 //BA.debugLineNum = 20185107;BA.debugLine="Do While pe.NextRow";
while (_pe.NextRow()) {
RDebugUtils.currentLine=20185109;
 //BA.debugLineNum = 20185109;BA.debugLine="cantsMap.Put(pe.GetString(\"PE_PROID\") & \"_\" & p";
__ref._cantsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Put((Object)(_pe.GetString("PE_PROID")+"_"+_pe.GetString("PE_DIRIGIDA")),(Object)(_pe.GetInt("PE_CANT")));
 }
;
RDebugUtils.currentLine=20185111;
 //BA.debugLineNum = 20185111;BA.debugLine="pe.Close";
_pe.Close();
 };
RDebugUtils.currentLine=20185115;
 //BA.debugLineNum = 20185115;BA.debugLine="If p = Null Or p.IsInitialized = False Then";
if (_p== null || _p.IsInitialized()==__c.False) { 
RDebugUtils.currentLine=20185116;
 //BA.debugLineNum = 20185116;BA.debugLine="Log(Starter.tabla)";
__c.LogImpl("520185116",_starter._tabla /*String*/ ,0);
RDebugUtils.currentLine=20185117;
 //BA.debugLineNum = 20185117;BA.debugLine="p = B4XPages.MainPage.skmt.ExecQuery($\"SELECT *";
_p = (anywheresoftware.b4a.sql.SQL.ResultSetWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.ResultSetWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("SELECT * FROM "+__c.SmartStringFormatter("",(Object)(_starter._tabla /*String*/ ))+" WHERE CAT_GP_STS = 1 AND CAT_GP_TIPO <> 'PROMOS' AND CAT_GP_SUBTIPO <> 'PROMOS' ORDER BY CAT_GP_NOMBRE"))));
 };
RDebugUtils.currentLine=20185121;
 //BA.debugLineNum = 20185121;BA.debugLine="Do While p.NextRow";
while (_p.NextRow()) {
RDebugUtils.currentLine=20185122;
 //BA.debugLineNum = 20185122;BA.debugLine="Log(p.GetString(\"CAT_GP_ID\"))";
__c.LogImpl("520185122",_p.GetString("CAT_GP_ID"),0);
RDebugUtils.currentLine=20185123;
 //BA.debugLineNum = 20185123;BA.debugLine="Dim idProd As String = p.GetString(\"CAT_GP_ID\")";
_idprod = _p.GetString("CAT_GP_ID");
RDebugUtils.currentLine=20185124;
 //BA.debugLineNum = 20185124;BA.debugLine="Dim presentacionesValidas As List : presentacion";
_presentacionesvalidas = new anywheresoftware.b4a.objects.collections.List();
RDebugUtils.currentLine=20185124;
 //BA.debugLineNum = 20185124;BA.debugLine="Dim presentacionesValidas As List : presentacion";
_presentacionesvalidas.Initialize();
RDebugUtils.currentLine=20185127;
 //BA.debugLineNum = 20185127;BA.debugLine="For i = 1 To 11";
{
final int step21 = 1;
final int limit21 = (int) (11);
_i = (int) (1) ;
for (;_i <= limit21 ;_i = _i + step21 ) {
RDebugUtils.currentLine=20185128;
 //BA.debugLineNum = 20185128;BA.debugLine="Dim precio As Double = p.GetDouble(\"CAT_GP_PREC";
_precio = _p.GetDouble("CAT_GP_PRECIO"+BA.NumberToString(_i));
RDebugUtils.currentLine=20185129;
 //BA.debugLineNum = 20185129;BA.debugLine="Dim presNombre As String = p.GetString(\"CAT_GP_";
_presnombre = _p.GetString("CAT_GP_PRESENTACION"+BA.NumberToString(_i));
RDebugUtils.currentLine=20185130;
 //BA.debugLineNum = 20185130;BA.debugLine="Dim dirigida As String = p.GetString(\"CAT_GP_DI";
_dirigida = _p.GetString("CAT_GP_DIRIGIDA"+BA.NumberToString(_i));
RDebugUtils.currentLine=20185131;
 //BA.debugLineNum = 20185131;BA.debugLine="Dim umvVal As Int = p.GetInt(\"CAT_GP_UMV\" & i)";
_umvval = _p.GetInt("CAT_GP_UMV"+BA.NumberToString(_i));
RDebugUtils.currentLine=20185132;
 //BA.debugLineNum = 20185132;BA.debugLine="Log(precio)";
__c.LogImpl("520185132",BA.NumberToString(_precio),0);
RDebugUtils.currentLine=20185133;
 //BA.debugLineNum = 20185133;BA.debugLine="Log(presNombre)";
__c.LogImpl("520185133",_presnombre,0);
RDebugUtils.currentLine=20185134;
 //BA.debugLineNum = 20185134;BA.debugLine="Log(dirigida)";
__c.LogImpl("520185134",_dirigida,0);
RDebugUtils.currentLine=20185135;
 //BA.debugLineNum = 20185135;BA.debugLine="Log(umvVal)";
__c.LogImpl("520185135",BA.NumberToString(_umvval),0);
RDebugUtils.currentLine=20185139;
 //BA.debugLineNum = 20185139;BA.debugLine="If precio > 0 And presNombre <> \"\" And dirigida";
if (_precio>0 && (_presnombre).equals("") == false && (_dirigida).equals("") == false && _umvval>0) { 
RDebugUtils.currentLine=20185141;
 //BA.debugLineNum = 20185141;BA.debugLine="Log(tipoClienteActual.ToUpperCase)";
__c.LogImpl("520185141",__ref._tipoclienteactual /*String*/ .toUpperCase(),0);
RDebugUtils.currentLine=20185142;
 //BA.debugLineNum = 20185142;BA.debugLine="If dirigida.ToUpperCase = tipoClienteActual.To";
if ((_dirigida.toUpperCase()).equals(__ref._tipoclienteactual /*String*/ .toUpperCase())) { 
RDebugUtils.currentLine=20185143;
 //BA.debugLineNum = 20185143;BA.debugLine="Dim cantExistente As Int = cantsMap.GetDefaul";
_cantexistente = (int)(BA.ObjectToNumber(__ref._cantsmap /*anywheresoftware.b4a.objects.collections.Map*/ .GetDefault((Object)(_idprod+"_"+BA.NumberToString(_i)),(Object)(0))));
RDebugUtils.currentLine=20185145;
 //BA.debugLineNum = 20185145;BA.debugLine="presentacionesValidas.Add(CreateMap( _     \"c";
_presentacionesvalidas.Add((Object)(__c.createMap(new Object[] {(Object)("col_index"),(Object)(_i),(Object)("nombre"),(Object)(_presnombre),(Object)("precio"),(Object)(_precio),(Object)("umv"),(Object)(_umvval),(Object)("cantidad"),(Object)(_cantexistente),(Object)("dirigida"),(Object)(_dirigida),(Object)("listaprecio"),(Object)(_i)}).getObject()));
 };
 };
 }
};
RDebugUtils.currentLine=20185157;
 //BA.debugLineNum = 20185157;BA.debugLine="Log(presentacionesValidas)";
__c.LogImpl("520185157",BA.ObjectToString(_presentacionesvalidas),0);
RDebugUtils.currentLine=20185159;
 //BA.debugLineNum = 20185159;BA.debugLine="If presentacionesValidas.Size > 0 Then";
if (_presentacionesvalidas.getSize()>0) { 
RDebugUtils.currentLine=20185160;
 //BA.debugLineNum = 20185160;BA.debugLine="listaProds.Add(CreateMap( _                 \"id";
__ref._listaprods /*anywheresoftware.b4a.objects.collections.List*/ .Add((Object)(__c.createMap(new Object[] {(Object)("id"),(Object)(_idprod),(Object)("prod"),(Object)(_p.GetString("CAT_GP_NOMBRE")),(Object)("almacen"),(Object)(_p.GetInt("CAT_GP_ALMACEN")),(Object)("presentaciones"),(Object)(_presentacionesvalidas.getObject())}).getObject()));
RDebugUtils.currentLine=20185166;
 //BA.debugLineNum = 20185166;BA.debugLine="listaHints.Add(p.GetString(\"CAT_GP_NOMBRE\"))";
__ref._listahints /*anywheresoftware.b4a.objects.collections.List*/ .Add((Object)(_p.GetString("CAT_GP_NOMBRE")));
 };
 }
;
RDebugUtils.currentLine=20185169;
 //BA.debugLineNum = 20185169;BA.debugLine="p.Close";
_p.Close();
RDebugUtils.currentLine=20185172;
 //BA.debugLineNum = 20185172;BA.debugLine="clv_prods_ll.Clear";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._clear();
RDebugUtils.currentLine=20185173;
 //BA.debugLineNum = 20185173;BA.debugLine="PCLV.Commit";
__ref._pclv /*SHARK2.keymon.com.mx.preoptimizedclv*/ ._commit /*String*/ (null);
RDebugUtils.currentLine=20185175;
 //BA.debugLineNum = 20185175;BA.debugLine="For Each m As Map In listaProds";
_m = new anywheresoftware.b4a.objects.collections.Map();
{
final anywheresoftware.b4a.BA.IterableList group47 = __ref._listaprods /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen47 = group47.getSize()
;int index47 = 0;
;
for (; index47 < groupLen47;index47++){
_m = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(group47.Get(index47)));
RDebugUtils.currentLine=20185177;
 //BA.debugLineNum = 20185177;BA.debugLine="Dim pnl As B4XView = xui.CreatePanel(\"\")";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = __ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .CreatePanel(ba,"");
RDebugUtils.currentLine=20185178;
 //BA.debugLineNum = 20185178;BA.debugLine="Dim lPres As List = m.Get(\"presentaciones\")";
_lpres = new anywheresoftware.b4a.objects.collections.List();
_lpres = (anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(_m.Get((Object)("presentaciones"))));
RDebugUtils.currentLine=20185180;
 //BA.debugLineNum = 20185180;BA.debugLine="Dim alturaItem As Int = 45dip + (lPres.Size * 60";
_alturaitem = (int) (__c.DipToCurrent((int) (45))+(_lpres.getSize()*__c.DipToCurrent((int) (60))));
RDebugUtils.currentLine=20185182;
 //BA.debugLineNum = 20185182;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(),_alturaitem);
RDebugUtils.currentLine=20185183;
 //BA.debugLineNum = 20185183;BA.debugLine="clv_prods_ll.Add(pnl, m)";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._add(_pnl,(Object)(_m.getObject()));
 }
};
RDebugUtils.currentLine=20185187;
 //BA.debugLineNum = 20185187;BA.debugLine="If clv_prods_ll.Size > 0 Then";
if (__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getsize()>0) { 
RDebugUtils.currentLine=20185191;
 //BA.debugLineNum = 20185191;BA.debugLine="PCLV.B4XSeekBar1.MaxValue = clv_prods_ll.Size";
__ref._pclv /*SHARK2.keymon.com.mx.preoptimizedclv*/ ._b4xseekbar1 /*SHARK2.keymon.com.mx.b4xseekbar*/ ._maxvalue /*int*/  = __ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getsize();
RDebugUtils.currentLine=20185192;
 //BA.debugLineNum = 20185192;BA.debugLine="PCLV.B4XSeekBar1.MinValue = 0";
__ref._pclv /*SHARK2.keymon.com.mx.preoptimizedclv*/ ._b4xseekbar1 /*SHARK2.keymon.com.mx.b4xseekbar*/ ._minvalue /*int*/  = (int) (0);
RDebugUtils.currentLine=20185193;
 //BA.debugLineNum = 20185193;BA.debugLine="PCLV.B4XSeekBar1.Interval = clv_prods_ll.Size/20";
__ref._pclv /*SHARK2.keymon.com.mx.preoptimizedclv*/ ._b4xseekbar1 /*SHARK2.keymon.com.mx.b4xseekbar*/ ._interval /*int*/  = (int) (__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getsize()/(double)20);
RDebugUtils.currentLine=20185194;
 //BA.debugLineNum = 20185194;BA.debugLine="PCLV.B4XSeekBar1.Value = clv_prods_ll.Size";
__ref._pclv /*SHARK2.keymon.com.mx.preoptimizedclv*/ ._b4xseekbar1 /*SHARK2.keymon.com.mx.b4xseekbar*/ ._setvalue /*int*/ (null,__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getsize());
RDebugUtils.currentLine=20185195;
 //BA.debugLineNum = 20185195;BA.debugLine="PCLV.B4XSeekBar1.Update";
__ref._pclv /*SHARK2.keymon.com.mx.preoptimizedclv*/ ._b4xseekbar1 /*SHARK2.keymon.com.mx.b4xseekbar*/ ._update /*String*/ (null);
 };
RDebugUtils.currentLine=20185197;
 //BA.debugLineNum = 20185197;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest(SHARK2.keymon.com.mx.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(SHARK2.keymon.com.mx.c_productos parent,SHARK2.keymon.com.mx.c_productos __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
SHARK2.keymon.com.mx.c_productos __ref;
SHARK2.keymon.com.mx.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=18546691;
 //BA.debugLineNum = 18546691;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=18546694;
 //BA.debugLineNum = 18546694;BA.debugLine="else if p_vistaPreviaTrans.Visible Then";
if (__ref._p_vistapreviatrans /*anywheresoftware.b4a.objects.PanelWrapper*/ .getVisible()) { 
this.state = 5;
}else 
{RDebugUtils.currentLine=18546697;
 //BA.debugLineNum = 18546697;BA.debugLine="else if lv_promos.visible Then";
if (__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getVisible()) { 
this.state = 7;
}else 
{RDebugUtils.currentLine=18546704;
 //BA.debugLineNum = 18546704;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=18546723;
 //BA.debugLineNum = 18546723;BA.debugLine="else If entro = \"4\" Then";
if ((__ref._entro /*String*/ ).equals("4")) { 
this.state = 11;
}else 
{RDebugUtils.currentLine=18546727;
 //BA.debugLineNum = 18546727;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=18546692;
 //BA.debugLineNum = 18546692;BA.debugLine="l_info.Visible = False";
__ref._l_info /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=18546693;
 //BA.debugLineNum = 18546693;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=18546695;
 //BA.debugLineNum = 18546695;BA.debugLine="p_vistaPreviaTrans.Visible = False";
__ref._p_vistapreviatrans /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=18546696;
 //BA.debugLineNum = 18546696;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=18546698;
 //BA.debugLineNum = 18546698;BA.debugLine="lv_promos.Visible = False";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=18546699;
 //BA.debugLineNum = 18546699;BA.debugLine="lv_catalogos.Visible = True";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.True);
RDebugUtils.currentLine=18546700;
 //BA.debugLineNum = 18546700;BA.debugLine="p_botonesVenta.Visible = False";
__ref._p_botonesventa /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=18546701;
 //BA.debugLineNum = 18546701;BA.debugLine="l_total.Visible = False";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=18546702;
 //BA.debugLineNum = 18546702;BA.debugLine="l_totProds.Visible = False";
__ref._l_totprods /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=18546703;
 //BA.debugLineNum = 18546703;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=18546705;
 //BA.debugLineNum = 18546705;BA.debugLine="lfila.text = \"CATALOGO\"";
__ref._lfila /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("CATALOGO"));
RDebugUtils.currentLine=18546706;
 //BA.debugLineNum = 18546706;BA.debugLine="clv_prods_ll.AsView.Visible = False";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(parent.__c.False);
RDebugUtils.currentLine=18546707;
 //BA.debugLineNum = 18546707;BA.debugLine="lv_subtipo.Visible = False";
__ref._lv_subtipo /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=18546708;
 //BA.debugLineNum = 18546708;BA.debugLine="p_botonesVenta.Visible = False";
__ref._p_botonesventa /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=18546709;
 //BA.debugLineNum = 18546709;BA.debugLine="l_total.Visible = False";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=18546710;
 //BA.debugLineNum = 18546710;BA.debugLine="l_totProds.Visible = False";
__ref._l_totprods /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=18546711;
 //BA.debugLineNum = 18546711;BA.debugLine="lv_catalogos.Visible = True";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.True);
RDebugUtils.currentLine=18546712;
 //BA.debugLineNum = 18546712;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=18546724;
 //BA.debugLineNum = 18546724;BA.debugLine="entro = \"3\"";
__ref._entro /*String*/  = "3";
RDebugUtils.currentLine=18546725;
 //BA.debugLineNum = 18546725;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*void*/ (null);
RDebugUtils.currentLine=18546726;
 //BA.debugLineNum = 18546726;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=18546728;
 //BA.debugLineNum = 18546728;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
parent._b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=18546729;
 //BA.debugLineNum = 18546729;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=18546731;
 //BA.debugLineNum = 18546731;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
parent._b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=18546732;
 //BA.debugLineNum = 18546732;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=18546734;
 //BA.debugLineNum = 18546734;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b4xpage_created(SHARK2.keymon.com.mx.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=18087936;
 //BA.debugLineNum = 18087936;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=18087937;
 //BA.debugLineNum = 18087937;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=18087940;
 //BA.debugLineNum = 18087940;BA.debugLine="Root.LoadLayout(\"productos\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("productos",ba);
RDebugUtils.currentLine=18087941;
 //BA.debugLineNum = 18087941;BA.debugLine="ruta = File.DirInternal";
__ref._ruta /*String*/  = __c.File.getDirInternal();
RDebugUtils.currentLine=18087942;
 //BA.debugLineNum = 18087942;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
if (__c.File.Exists(__ref._ruta /*String*/ ,"kmt.db")==__c.False) { 
RDebugUtils.currentLine=18087943;
 //BA.debugLineNum = 18087943;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=18087945;
 //BA.debugLineNum = 18087945;BA.debugLine="PCLV.Initialize(Me, \"PCLV\", clv_prods_ll)";
__ref._pclv /*SHARK2.keymon.com.mx.preoptimizedclv*/ ._initialize /*String*/ (null,ba,this,"PCLV",__ref._clv_prods_ll /*b4a.example3.customlistview*/ );
RDebugUtils.currentLine=18087946;
 //BA.debugLineNum = 18087946;BA.debugLine="ciclo = 1";
__ref._ciclo /*String*/  = BA.NumberToString(1);
RDebugUtils.currentLine=18087947;
 //BA.debugLineNum = 18087947;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=18087948;
 //BA.debugLineNum = 18087948;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=18087949;
 //BA.debugLineNum = 18087949;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 /*SHARK2.keymon.com.mx.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=18087950;
 //BA.debugLineNum = 18087950;BA.debugLine="If c.RowCount > 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=18087951;
 //BA.debugLineNum = 18087951;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=18087952;
 //BA.debugLineNum = 18087952;BA.debugLine="label1 = lv_tipo.SingleLineLayout.Label";
_label1 = __ref._lv_tipo /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getSingleLineLayout().Label;
RDebugUtils.currentLine=18087953;
 //BA.debugLineNum = 18087953;BA.debugLine="label1.TextSize = 17";
_label1.setTextSize((float) (17));
RDebugUtils.currentLine=18087954;
 //BA.debugLineNum = 18087954;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=18087955;
 //BA.debugLineNum = 18087955;BA.debugLine="lv_tipo.Clear";
__ref._lv_tipo /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=18087956;
 //BA.debugLineNum = 18087956;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=18087957;
 //BA.debugLineNum = 18087957;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=18087958;
 //BA.debugLineNum = 18087958;BA.debugLine="Log(\"ENTRE AQUI EN PROMOS create\")";
__c.LogImpl("518087958","ENTRE AQUI EN PROMOS create",0);
RDebugUtils.currentLine=18087959;
 //BA.debugLineNum = 18087959;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=18087962;
 //BA.debugLineNum = 18087962;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=18087965;
 //BA.debugLineNum = 18087965;BA.debugLine="listaTiempos.Initialize";
__ref._listatiempos /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
RDebugUtils.currentLine=18087966;
 //BA.debugLineNum = 18087966;BA.debugLine="listaProds.Initialize";
__ref._listaprods /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
RDebugUtils.currentLine=18087967;
 //BA.debugLineNum = 18087967;BA.debugLine="pedidoMap.Initialize";
__ref._pedidomap /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
RDebugUtils.currentLine=18087968;
 //BA.debugLineNum = 18087968;BA.debugLine="listaHints.Initialize";
__ref._listahints /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
RDebugUtils.currentLine=18087971;
 //BA.debugLineNum = 18087971;BA.debugLine="clv_prods_ll.Clear";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._clear();
RDebugUtils.currentLine=18087972;
 //BA.debugLineNum = 18087972;BA.debugLine="prodsMap.Initialize";
__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
RDebugUtils.currentLine=18087973;
 //BA.debugLineNum = 18087973;BA.debugLine="End Sub";
return "";
}
public String  _btnmasdinamico_click(SHARK2.keymon.com.mx.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "btnmasdinamico_click", false))
	 {return ((String) Debug.delegate(ba, "btnmasdinamico_click", null));}
anywheresoftware.b4a.objects.ButtonWrapper _btn = null;
anywheresoftware.b4a.objects.collections.Map _info = null;
anywheresoftware.b4a.objects.EditTextWrapper _et = null;
anywheresoftware.b4a.objects.collections.Map _pres = null;
String _idprod = "";
int _stockdisponible = 0;
int _umv = 0;
int _cantactual = 0;
int _nuevacant = 0;
int _unidades = 0;
RDebugUtils.currentLine=20643840;
 //BA.debugLineNum = 20643840;BA.debugLine="Sub btnMasDinamico_Click";
RDebugUtils.currentLine=20643841;
 //BA.debugLineNum = 20643841;BA.debugLine="Dim btn As Button = Sender";
_btn = new anywheresoftware.b4a.objects.ButtonWrapper();
_btn = (anywheresoftware.b4a.objects.ButtonWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.ButtonWrapper(), (android.widget.Button)(__c.Sender(ba)));
RDebugUtils.currentLine=20643842;
 //BA.debugLineNum = 20643842;BA.debugLine="Dim info As Map = btn.Tag";
_info = new anywheresoftware.b4a.objects.collections.Map();
_info = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(_btn.getTag()));
RDebugUtils.currentLine=20643843;
 //BA.debugLineNum = 20643843;BA.debugLine="Dim et As EditText = info.Get(\"et\")";
_et = new anywheresoftware.b4a.objects.EditTextWrapper();
_et = (anywheresoftware.b4a.objects.EditTextWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.EditTextWrapper(), (android.widget.EditText)(_info.Get((Object)("et"))));
RDebugUtils.currentLine=20643844;
 //BA.debugLineNum = 20643844;BA.debugLine="Dim pres As Map = info.Get(\"pres\")";
_pres = new anywheresoftware.b4a.objects.collections.Map();
_pres = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(_info.Get((Object)("pres"))));
RDebugUtils.currentLine=20643845;
 //BA.debugLineNum = 20643845;BA.debugLine="Dim idProd As String = info.Get(\"id\")";
_idprod = BA.ObjectToString(_info.Get((Object)("id")));
RDebugUtils.currentLine=20643847;
 //BA.debugLineNum = 20643847;BA.debugLine="Dim stockDisponible As Int = Subs.traeinventario(";
_stockdisponible = (int)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_idprod)));
RDebugUtils.currentLine=20643848;
 //BA.debugLineNum = 20643848;BA.debugLine="Dim umv As Int = pres.Get(\"umv\")";
_umv = (int)(BA.ObjectToNumber(_pres.Get((Object)("umv"))));
RDebugUtils.currentLine=20643850;
 //BA.debugLineNum = 20643850;BA.debugLine="Dim cantActual As Int = 0";
_cantactual = (int) (0);
RDebugUtils.currentLine=20643851;
 //BA.debugLineNum = 20643851;BA.debugLine="If et.Text <> \"\" Then cantActual = et.Text";
if ((_et.getText()).equals("") == false) { 
_cantactual = (int)(Double.parseDouble(_et.getText()));};
RDebugUtils.currentLine=20643853;
 //BA.debugLineNum = 20643853;BA.debugLine="If stockDisponible >= umv Then";
if (_stockdisponible>=_umv) { 
RDebugUtils.currentLine=20643854;
 //BA.debugLineNum = 20643854;BA.debugLine="Dim nuevaCant As Int = cantActual + umv";
_nuevacant = (int) (_cantactual+_umv);
RDebugUtils.currentLine=20643855;
 //BA.debugLineNum = 20643855;BA.debugLine="et.Text = nuevaCant";
_et.setText(BA.ObjectToCharSequence(_nuevacant));
RDebugUtils.currentLine=20643858;
 //BA.debugLineNum = 20643858;BA.debugLine="Dim unidades As Int = nuevaCant / umv";
_unidades = (int) (_nuevacant/(double)_umv);
RDebugUtils.currentLine=20643859;
 //BA.debugLineNum = 20643859;BA.debugLine="ActualizarLabelNombrePresentacion(btn, pres.Get(";
__ref._actualizarlabelnombrepresentacion /*String*/ (null,(anywheresoftware.b4a.objects.ConcreteViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.ConcreteViewWrapper(), (android.view.View)(_btn.getObject())),BA.ObjectToString(_pres.Get((Object)("nombre"))),_unidades);
RDebugUtils.currentLine=20643862;
 //BA.debugLineNum = 20643862;BA.debugLine="Subs.actualizaProductoDinamico(Subs.traeAlmacen,";
_subs._actualizaproductodinamico /*String*/ (ba,_subs._traealmacen /*String*/ (ba),(float)(BA.ObjectToNumber(_pres.Get((Object)("precio")))),(int)(Double.parseDouble(_et.getText())),_subs._traeprodnombre /*String*/ (ba,_idprod),_idprod,__ref._clienteid /*String*/ ,_subs._traefecha /*String*/ (ba),_subs._traeusuariodebd /*String*/ (ba),__ref._rutausuario /*String*/ ,BA.NumberToString(0),_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,BA.NumberToString(0),BA.NumberToString(0),BA.ObjectToString(_pres.Get((Object)("listaprecio"))),_umv,BA.ObjectToString(_pres.Get((Object)("nombre"))));
RDebugUtils.currentLine=20643865;
 //BA.debugLineNum = 20643865;BA.debugLine="ActualizarLabelExistencias(btn, idProd)";
__ref._actualizarlabelexistencias /*String*/ (null,(anywheresoftware.b4a.objects.ConcreteViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.ConcreteViewWrapper(), (android.view.View)(_btn.getObject())),_idprod);
RDebugUtils.currentLine=20643866;
 //BA.debugLineNum = 20643866;BA.debugLine="cuentaProds";
__ref._cuentaprods /*String*/ (null);
 }else {
RDebugUtils.currentLine=20643868;
 //BA.debugLineNum = 20643868;BA.debugLine="ToastMessageShow(\"Inventario insuficiente. Stock";
__c.ToastMessageShow(BA.ObjectToCharSequence("Inventario insuficiente. Stock: "+BA.NumberToString(_stockdisponible)),__c.False);
 };
RDebugUtils.currentLine=20643870;
 //BA.debugLineNum = 20643870;BA.debugLine="End Sub";
return "";
}
public String  _btnmenosdinamico_click(SHARK2.keymon.com.mx.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "btnmenosdinamico_click", false))
	 {return ((String) Debug.delegate(ba, "btnmenosdinamico_click", null));}
anywheresoftware.b4a.objects.ButtonWrapper _btn = null;
anywheresoftware.b4a.objects.collections.Map _info = null;
anywheresoftware.b4a.objects.EditTextWrapper _et = null;
anywheresoftware.b4a.objects.collections.Map _pres = null;
String _idprod = "";
int _cantactual = 0;
int _umv = 0;
int _nuevacant = 0;
int _unidades = 0;
RDebugUtils.currentLine=20709376;
 //BA.debugLineNum = 20709376;BA.debugLine="Sub btnMenosDinamico_Click";
RDebugUtils.currentLine=20709377;
 //BA.debugLineNum = 20709377;BA.debugLine="Dim btn As Button = Sender";
_btn = new anywheresoftware.b4a.objects.ButtonWrapper();
_btn = (anywheresoftware.b4a.objects.ButtonWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.ButtonWrapper(), (android.widget.Button)(__c.Sender(ba)));
RDebugUtils.currentLine=20709378;
 //BA.debugLineNum = 20709378;BA.debugLine="Dim info As Map = btn.Tag";
_info = new anywheresoftware.b4a.objects.collections.Map();
_info = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(_btn.getTag()));
RDebugUtils.currentLine=20709379;
 //BA.debugLineNum = 20709379;BA.debugLine="Dim et As EditText = info.Get(\"et\")";
_et = new anywheresoftware.b4a.objects.EditTextWrapper();
_et = (anywheresoftware.b4a.objects.EditTextWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.EditTextWrapper(), (android.widget.EditText)(_info.Get((Object)("et"))));
RDebugUtils.currentLine=20709380;
 //BA.debugLineNum = 20709380;BA.debugLine="Dim pres As Map = info.Get(\"pres\")";
_pres = new anywheresoftware.b4a.objects.collections.Map();
_pres = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(_info.Get((Object)("pres"))));
RDebugUtils.currentLine=20709381;
 //BA.debugLineNum = 20709381;BA.debugLine="Dim idProd As String = info.Get(\"id\")";
_idprod = BA.ObjectToString(_info.Get((Object)("id")));
RDebugUtils.currentLine=20709383;
 //BA.debugLineNum = 20709383;BA.debugLine="Dim cantActual As Int = 0";
_cantactual = (int) (0);
RDebugUtils.currentLine=20709384;
 //BA.debugLineNum = 20709384;BA.debugLine="If et.Text <> \"\" Then cantActual = et.Text";
if ((_et.getText()).equals("") == false) { 
_cantactual = (int)(Double.parseDouble(_et.getText()));};
RDebugUtils.currentLine=20709386;
 //BA.debugLineNum = 20709386;BA.debugLine="If cantActual > 0 Then";
if (_cantactual>0) { 
RDebugUtils.currentLine=20709387;
 //BA.debugLineNum = 20709387;BA.debugLine="Dim umv As Int = pres.Get(\"umv\")";
_umv = (int)(BA.ObjectToNumber(_pres.Get((Object)("umv"))));
RDebugUtils.currentLine=20709388;
 //BA.debugLineNum = 20709388;BA.debugLine="Dim nuevaCant As Int = cantActual - umv";
_nuevacant = (int) (_cantactual-_umv);
RDebugUtils.currentLine=20709389;
 //BA.debugLineNum = 20709389;BA.debugLine="If nuevaCant < 0 Then nuevaCant = 0";
if (_nuevacant<0) { 
_nuevacant = (int) (0);};
RDebugUtils.currentLine=20709390;
 //BA.debugLineNum = 20709390;BA.debugLine="et.Text = nuevaCant";
_et.setText(BA.ObjectToCharSequence(_nuevacant));
RDebugUtils.currentLine=20709393;
 //BA.debugLineNum = 20709393;BA.debugLine="Dim unidades As Int = nuevaCant / umv";
_unidades = (int) (_nuevacant/(double)_umv);
RDebugUtils.currentLine=20709394;
 //BA.debugLineNum = 20709394;BA.debugLine="ActualizarLabelNombrePresentacion(btn, pres.Get(";
__ref._actualizarlabelnombrepresentacion /*String*/ (null,(anywheresoftware.b4a.objects.ConcreteViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.ConcreteViewWrapper(), (android.view.View)(_btn.getObject())),BA.ObjectToString(_pres.Get((Object)("nombre"))),_unidades);
RDebugUtils.currentLine=20709397;
 //BA.debugLineNum = 20709397;BA.debugLine="Subs.actualizaProductoDinamico(Subs.traeAlmacen,";
_subs._actualizaproductodinamico /*String*/ (ba,_subs._traealmacen /*String*/ (ba),(float)(BA.ObjectToNumber(_pres.Get((Object)("precio")))),(int)(Double.parseDouble(_et.getText())),_subs._traeprodnombre /*String*/ (ba,_idprod),_idprod,__ref._clienteid /*String*/ ,_subs._traefecha /*String*/ (ba),_subs._traeusuariodebd /*String*/ (ba),__ref._rutausuario /*String*/ ,BA.NumberToString(0),_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,BA.NumberToString(0),BA.NumberToString(0),BA.ObjectToString(_pres.Get((Object)("listaprecio"))),_umv,BA.ObjectToString(_pres.Get((Object)("nombre"))));
RDebugUtils.currentLine=20709400;
 //BA.debugLineNum = 20709400;BA.debugLine="ActualizarLabelExistencias(btn, idProd)";
__ref._actualizarlabelexistencias /*String*/ (null,(anywheresoftware.b4a.objects.ConcreteViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.ConcreteViewWrapper(), (android.view.View)(_btn.getObject())),_idprod);
RDebugUtils.currentLine=20709401;
 //BA.debugLineNum = 20709401;BA.debugLine="cuentaProds";
__ref._cuentaprods /*String*/ (null);
 };
RDebugUtils.currentLine=20709403;
 //BA.debugLineNum = 20709403;BA.debugLine="End Sub";
return "";
}
public String  _busca_textchanged(SHARK2.keymon.com.mx.c_productos __ref,String _old,String _new) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "busca_textchanged", false))
	 {return ((String) Debug.delegate(ba, "busca_textchanged", new Object[] {_old,_new}));}
String _query = "";
anywheresoftware.b4a.sql.SQL.ResultSetWrapper _p = null;
RDebugUtils.currentLine=20119552;
 //BA.debugLineNum = 20119552;BA.debugLine="Sub Busca_TextChanged (Old As String, New As Strin";
RDebugUtils.currentLine=20119554;
 //BA.debugLineNum = 20119554;BA.debugLine="If Not(clv_prods_ll.AsView.Visible) Then clv_prod";
if (__c.Not(__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().getVisible())) { 
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(__c.True);};
RDebugUtils.currentLine=20119558;
 //BA.debugLineNum = 20119558;BA.debugLine="If New.Length > 0 And New.Length < 3 And Not(forz";
if (_new.length()>0 && _new.length()<3 && __c.Not(__ref._forzarbusqueda /*boolean*/ )) { 
if (true) return "";};
RDebugUtils.currentLine=20119560;
 //BA.debugLineNum = 20119560;BA.debugLine="forzarBusqueda = False";
__ref._forzarbusqueda /*boolean*/  = __c.False;
RDebugUtils.currentLine=20119561;
 //BA.debugLineNum = 20119561;BA.debugLine="Log(\"Texto buscado: [\" & New.Trim & \"]\")";
__c.LogImpl("520119561","Texto buscado: ["+_new.trim()+"]",0);
RDebugUtils.currentLine=20119564;
 //BA.debugLineNum = 20119564;BA.debugLine="If New.Trim = \"\" Then";
if ((_new.trim()).equals("")) { 
RDebugUtils.currentLine=20119567;
 //BA.debugLineNum = 20119567;BA.debugLine="Log(\"Búsqueda borrada. Restaurando catálogo prin";
__c.LogImpl("520119567","Búsqueda borrada. Restaurando catálogo principal...",0);
RDebugUtils.currentLine=20119568;
 //BA.debugLineNum = 20119568;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)));
 }else {
RDebugUtils.currentLine=20119572;
 //BA.debugLineNum = 20119572;BA.debugLine="Dim query As String = $\"SELECT * FROM ${Starter.";
_query = ("SELECT * FROM "+__c.SmartStringFormatter("",(Object)(_starter._tabla /*String*/ ))+" WHERE CAT_GP_STS = 1 AND CAT_GP_TIPO <> 'PROMOS' AND CAT_GP_SUBTIPO <> 'PROMOS' AND CAT_GP_NOMBRE LIKE '%"+__c.SmartStringFormatter("",(Object)(_new))+"%' ORDER BY CAT_GP_NOMBRE");
RDebugUtils.currentLine=20119573;
 //BA.debugLineNum = 20119573;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(_query)));
RDebugUtils.currentLine=20119575;
 //BA.debugLineNum = 20119575;BA.debugLine="Log(\"Buscando: \" & New & \" - Resultados encontra";
__c.LogImpl("520119575","Buscando: "+_new+" - Resultados encontrados: "+BA.NumberToString(_p.getRowCount()),0);
RDebugUtils.currentLine=20119576;
 //BA.debugLineNum = 20119576;BA.debugLine="LlenaProdsLL(p)";
__ref._llenaprodsll /*String*/ (null,_p);
 };
RDebugUtils.currentLine=20119578;
 //BA.debugLineNum = 20119578;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(SHARK2.keymon.com.mx.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
RDebugUtils.currentLine=17956864;
 //BA.debugLineNum = 17956864;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=17956865;
 //BA.debugLineNum = 17956865;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=17956866;
 //BA.debugLineNum = 17956866;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=17956867;
 //BA.debugLineNum = 17956867;BA.debugLine="Dim ruta As String";
_ruta = "";
RDebugUtils.currentLine=17956868;
 //BA.debugLineNum = 17956868;BA.debugLine="Dim q_buscar As String";
_q_buscar = "";
RDebugUtils.currentLine=17956869;
 //BA.debugLineNum = 17956869;BA.debugLine="Dim forzarBusqueda As Boolean = False";
_forzarbusqueda = __c.False;
RDebugUtils.currentLine=17956870;
 //BA.debugLineNum = 17956870;BA.debugLine="Dim skmt As SQL";
_skmt = new anywheresoftware.b4a.sql.SQL();
RDebugUtils.currentLine=17956871;
 //BA.debugLineNum = 17956871;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=17956872;
 //BA.debugLineNum = 17956872;BA.debugLine="Dim c2 As Cursor";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=17956873;
 //BA.debugLineNum = 17956873;BA.debugLine="Dim C3 As Cursor";
_c3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=17956874;
 //BA.debugLineNum = 17956874;BA.debugLine="Dim s As Cursor";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=17956875;
 //BA.debugLineNum = 17956875;BA.debugLine="Dim lv_catalogos As ListView";
_lv_catalogos = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=17956876;
 //BA.debugLineNum = 17956876;BA.debugLine="Dim lv_promos As ListView";
_lv_promos = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=17956877;
 //BA.debugLineNum = 17956877;BA.debugLine="Dim entro As String";
_entro = "";
RDebugUtils.currentLine=17956878;
 //BA.debugLineNum = 17956878;BA.debugLine="Dim gest As Button";
_gest = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=17956879;
 //BA.debugLineNum = 17956879;BA.debugLine="Dim lfila As Label";
_lfila = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=17956880;
 //BA.debugLineNum = 17956880;BA.debugLine="Dim marca As String";
_marca = "";
RDebugUtils.currentLine=17956881;
 //BA.debugLineNum = 17956881;BA.debugLine="Dim tipo As String";
_tipo = "";
RDebugUtils.currentLine=17956882;
 //BA.debugLineNum = 17956882;BA.debugLine="Dim subtipo As String";
_subtipo = "";
RDebugUtils.currentLine=17956883;
 //BA.debugLineNum = 17956883;BA.debugLine="Private BUSCA As EditText";
_busca = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=17956884;
 //BA.debugLineNum = 17956884;BA.debugLine="Dim ya_entro As String";
_ya_entro = "";
RDebugUtils.currentLine=17956885;
 //BA.debugLineNum = 17956885;BA.debugLine="Dim TIENE_PROMOS As String";
_tiene_promos = "";
RDebugUtils.currentLine=17956886;
 //BA.debugLineNum = 17956886;BA.debugLine="Dim RES As String";
_res = "";
RDebugUtils.currentLine=17956887;
 //BA.debugLineNum = 17956887;BA.debugLine="Dim S1 As Cursor";
_s1 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=17956888;
 //BA.debugLineNum = 17956888;BA.debugLine="Dim bmp As Bitmap";
_bmp = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper();
RDebugUtils.currentLine=17956889;
 //BA.debugLineNum = 17956889;BA.debugLine="Dim ciclo As String";
_ciclo = "";
RDebugUtils.currentLine=17956890;
 //BA.debugLineNum = 17956890;BA.debugLine="Private b_qr As Button";
_b_qr = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=17956891;
 //BA.debugLineNum = 17956891;BA.debugLine="Private p_productos As Panel";
_p_productos = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=17956892;
 //BA.debugLineNum = 17956892;BA.debugLine="Dim clv_productos As CustomListView";
_clv_productos = new b4a.example3.customlistview();
RDebugUtils.currentLine=17956893;
 //BA.debugLineNum = 17956893;BA.debugLine="Private ImageView1 As ImageView";
_imageview1 = new anywheresoftware.b4a.objects.ImageViewWrapper();
RDebugUtils.currentLine=17956894;
 //BA.debugLineNum = 17956894;BA.debugLine="Private Panel3 As Panel";
_panel3 = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=17956895;
 //BA.debugLineNum = 17956895;BA.debugLine="Private p_prods As Panel";
_p_prods = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=17956896;
 //BA.debugLineNum = 17956896;BA.debugLine="Private i_prod As ImageView";
_i_prod = new anywheresoftware.b4a.objects.ImageViewWrapper();
RDebugUtils.currentLine=17956897;
 //BA.debugLineNum = 17956897;BA.debugLine="Private l_prodX As Label";
_l_prodx = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=17956898;
 //BA.debugLineNum = 17956898;BA.debugLine="Private b_prodMas As Button";
_b_prodmas = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=17956899;
 //BA.debugLineNum = 17956899;BA.debugLine="Private l_pCant As Label";
_l_pcant = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=17956900;
 //BA.debugLineNum = 17956900;BA.debugLine="Private et_pCant As EditText";
_et_pcant = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=17956901;
 //BA.debugLineNum = 17956901;BA.debugLine="Private b_prodMenos As Button";
_b_prodmenos = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=17956902;
 //BA.debugLineNum = 17956902;BA.debugLine="Dim b_terminar1 As Button";
_b_terminar1 = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=17956903;
 //BA.debugLineNum = 17956903;BA.debugLine="Dim b_continuar As Button";
_b_continuar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=17956904;
 //BA.debugLineNum = 17956904;BA.debugLine="Private l_total As Label";
_l_total = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=17956905;
 //BA.debugLineNum = 17956905;BA.debugLine="Private l_totProds As Label";
_l_totprods = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=17956906;
 //BA.debugLineNum = 17956906;BA.debugLine="Dim totalProds As Int = 0";
_totalprods = (int) (0);
RDebugUtils.currentLine=17956907;
 //BA.debugLineNum = 17956907;BA.debugLine="Dim totalCompra As Float = 0";
_totalcompra = (float) (0);
RDebugUtils.currentLine=17956908;
 //BA.debugLineNum = 17956908;BA.debugLine="Dim etCantHasFocus As Boolean = False";
_etcanthasfocus = __c.False;
RDebugUtils.currentLine=17956909;
 //BA.debugLineNum = 17956909;BA.debugLine="Dim prodsMap As Map";
_prodsmap = new anywheresoftware.b4a.objects.collections.Map();
RDebugUtils.currentLine=17956910;
 //BA.debugLineNum = 17956910;BA.debugLine="Private l_Cargando As Label";
_l_cargando = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=17956911;
 //BA.debugLineNum = 17956911;BA.debugLine="Private l_info As Label";
_l_info = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=17956912;
 //BA.debugLineNum = 17956912;BA.debugLine="Private b_buscar As Button";
_b_buscar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=17956913;
 //BA.debugLineNum = 17956913;BA.debugLine="Private p_botonesVenta As Panel";
_p_botonesventa = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=17956914;
 //BA.debugLineNum = 17956914;BA.debugLine="Private lv_tipo As ListView";
_lv_tipo = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=17956915;
 //BA.debugLineNum = 17956915;BA.debugLine="Private lv_subtipo As ListView";
_lv_subtipo = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=17956916;
 //BA.debugLineNum = 17956916;BA.debugLine="Private p_vistaPreviaTrans As Panel";
_p_vistapreviatrans = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=17956917;
 //BA.debugLineNum = 17956917;BA.debugLine="Private lv_prodsPedido As ListView";
_lv_prodspedido = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=17956918;
 //BA.debugLineNum = 17956918;BA.debugLine="Private b_rechazar As Button";
_b_rechazar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=17956919;
 //BA.debugLineNum = 17956919;BA.debugLine="Private b_aceptar As Button";
_b_aceptar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=17956920;
 //BA.debugLineNum = 17956920;BA.debugLine="Private p_vistaPrevia As Panel";
_p_vistaprevia = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=17956921;
 //BA.debugLineNum = 17956921;BA.debugLine="Dim folio As String";
_folio = "";
RDebugUtils.currentLine=17956922;
 //BA.debugLineNum = 17956922;BA.debugLine="Dim result As String";
_result = "";
RDebugUtils.currentLine=17956923;
 //BA.debugLineNum = 17956923;BA.debugLine="Private l_cant As Label";
_l_cant = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=17956924;
 //BA.debugLineNum = 17956924;BA.debugLine="Private l_total2 As Label";
_l_total2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=17956925;
 //BA.debugLineNum = 17956925;BA.debugLine="Dim prodsPedidoActual As String";
_prodspedidoactual = "";
RDebugUtils.currentLine=17956926;
 //BA.debugLineNum = 17956926;BA.debugLine="Dim montoPedidoActual As String";
_montopedidoactual = "";
RDebugUtils.currentLine=17956927;
 //BA.debugLineNum = 17956927;BA.debugLine="Dim clv_prods_ll As CustomListView";
_clv_prods_ll = new b4a.example3.customlistview();
RDebugUtils.currentLine=17956928;
 //BA.debugLineNum = 17956928;BA.debugLine="Private PCLV As PreoptimizedCLV";
_pclv = new SHARK2.keymon.com.mx.preoptimizedclv();
RDebugUtils.currentLine=17956929;
 //BA.debugLineNum = 17956929;BA.debugLine="Dim listaProds As List";
_listaprods = new anywheresoftware.b4a.objects.collections.List();
RDebugUtils.currentLine=17956931;
 //BA.debugLineNum = 17956931;BA.debugLine="Dim pedidoMap As Map";
_pedidomap = new anywheresoftware.b4a.objects.collections.Map();
RDebugUtils.currentLine=17956932;
 //BA.debugLineNum = 17956932;BA.debugLine="Private p_botMasMen As Panel";
_p_botmasmen = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=17956933;
 //BA.debugLineNum = 17956933;BA.debugLine="Dim reiniciarlistaProds As Boolean= False";
_reiniciarlistaprods = __c.False;
RDebugUtils.currentLine=17956935;
 //BA.debugLineNum = 17956935;BA.debugLine="Dim listaTiempos As List";
_listatiempos = new anywheresoftware.b4a.objects.collections.List();
RDebugUtils.currentLine=17956936;
 //BA.debugLineNum = 17956936;BA.debugLine="Dim clienteId As String";
_clienteid = "";
RDebugUtils.currentLine=17956937;
 //BA.debugLineNum = 17956937;BA.debugLine="Dim rutaUsuario As String";
_rutausuario = "";
RDebugUtils.currentLine=17956938;
 //BA.debugLineNum = 17956938;BA.debugLine="Dim hayPedido As Boolean";
_haypedido = false;
RDebugUtils.currentLine=17956939;
 //BA.debugLineNum = 17956939;BA.debugLine="Dim listaHints As List";
_listahints = new anywheresoftware.b4a.objects.collections.List();
RDebugUtils.currentLine=17956940;
 //BA.debugLineNum = 17956940;BA.debugLine="Dim r As Cursor";
_r = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=17956941;
 //BA.debugLineNum = 17956941;BA.debugLine="Dim vamoaver As List";
_vamoaver = new anywheresoftware.b4a.objects.collections.List();
RDebugUtils.currentLine=17956942;
 //BA.debugLineNum = 17956942;BA.debugLine="Dim j3 As Cursor";
_j3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=17956943;
 //BA.debugLineNum = 17956943;BA.debugLine="Dim invTotal As Int";
_invtotal = 0;
RDebugUtils.currentLine=17956944;
 //BA.debugLineNum = 17956944;BA.debugLine="Private et_pCantc As EditText";
_et_pcantc = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=17956945;
 //BA.debugLineNum = 17956945;BA.debugLine="Private b_prodMenosc As Button";
_b_prodmenosc = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=17956946;
 //BA.debugLineNum = 17956946;BA.debugLine="Private b_prodMasc As Button";
_b_prodmasc = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=17956947;
 //BA.debugLineNum = 17956947;BA.debugLine="Dim totalcajasmaspiezas As Int";
_totalcajasmaspiezas = 0;
RDebugUtils.currentLine=17956948;
 //BA.debugLineNum = 17956948;BA.debugLine="Dim cajas As Int";
_cajas = 0;
RDebugUtils.currentLine=17956949;
 //BA.debugLineNum = 17956949;BA.debugLine="Dim piezas As Int";
_piezas = 0;
RDebugUtils.currentLine=17956950;
 //BA.debugLineNum = 17956950;BA.debugLine="Private p_botMasMenc As Panel";
_p_botmasmenc = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=17956953;
 //BA.debugLineNum = 17956953;BA.debugLine="Dim tipoClienteActual As String = \"DETALLE\"";
_tipoclienteactual = "DETALLE";
RDebugUtils.currentLine=17956954;
 //BA.debugLineNum = 17956954;BA.debugLine="Dim cantsMap As Map";
_cantsmap = new anywheresoftware.b4a.objects.collections.Map();
RDebugUtils.currentLine=17956955;
 //BA.debugLineNum = 17956955;BA.debugLine="End Sub";
return "";
}
public String  _clv_prods_ll_itemclick(SHARK2.keymon.com.mx.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=19922944;
 //BA.debugLineNum = 19922944;BA.debugLine="Private Sub clv_prods_ll_ItemClick (Index As Int,";
RDebugUtils.currentLine=19922945;
 //BA.debugLineNum = 19922945;BA.debugLine="End Sub";
return "";
}
public String  _clv_prods_ll_visiblerangechanged(SHARK2.keymon.com.mx.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 _i = 0;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl = null;
anywheresoftware.b4a.objects.collections.Map _data = null;
anywheresoftware.b4a.objects.B4XViewWrapper _base = null;
anywheresoftware.b4a.objects.CSBuilder _cs = null;
anywheresoftware.b4a.objects.LabelWrapper _lblinfo = null;
anywheresoftware.b4a.objects.B4XViewWrapper _xlbl = null;
anywheresoftware.b4a.objects.collections.List _presentaciones = null;
int _vtop = 0;
anywheresoftware.b4a.objects.collections.Map _pres = null;
anywheresoftware.b4a.objects.LabelWrapper _lbltipo = null;
int _cantpiezas = 0;
int _factorumv = 0;
int _unidadesexistentes = 0;
anywheresoftware.b4a.objects.LabelWrapper _lblprice = null;
anywheresoftware.b4a.objects.ButtonWrapper _bm = null;
anywheresoftware.b4a.objects.EditTextWrapper _et = null;
anywheresoftware.b4a.objects.ButtonWrapper _bp = null;
anywheresoftware.b4a.objects.collections.Map _taginfo = null;
RDebugUtils.currentLine=20054016;
 //BA.debugLineNum = 20054016;BA.debugLine="Private Sub clv_prods_ll_VisibleRangeChanged (Firs";
RDebugUtils.currentLine=20054017;
 //BA.debugLineNum = 20054017;BA.debugLine="For i = Max(0, FirstIndex - 2) To Min(LastIndex +";
{
final int step1 = 1;
final int limit1 = (int) (__c.Min(_lastindex+2,__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._getsize()-1));
_i = (int) (__c.Max(0,_firstindex-2)) ;
for (;_i <= limit1 ;_i = _i + step1 ) {
RDebugUtils.currentLine=20054018;
 //BA.debugLineNum = 20054018;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=20054020;
 //BA.debugLineNum = 20054020;BA.debugLine="If i >= FirstIndex And i <= LastIndex Then";
if (_i>=_firstindex && _i<=_lastindex) { 
RDebugUtils.currentLine=20054021;
 //BA.debugLineNum = 20054021;BA.debugLine="If Pnl.NumberOfViews = 0 Then";
if (_pnl.getNumberOfViews()==0) { 
RDebugUtils.currentLine=20054022;
 //BA.debugLineNum = 20054022;BA.debugLine="Dim data As Map = clv_prods_ll.GetValue(i)";
_data = new anywheresoftware.b4a.objects.collections.Map();
_data = (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)));
RDebugUtils.currentLine=20054025;
 //BA.debugLineNum = 20054025;BA.debugLine="Dim base As B4XView = xui.CreatePanel(\"\")";
_base = new anywheresoftware.b4a.objects.B4XViewWrapper();
_base = __ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .CreatePanel(ba,"");
RDebugUtils.currentLine=20054029;
 //BA.debugLineNum = 20054029;BA.debugLine="base.SetColorAndBorder(xui.Color_White, 1dip,";
_base.SetColorAndBorder(__ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .Color_White,__c.DipToCurrent((int) (1)),__ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .Color_Black,__c.DipToCurrent((int) (8)));
RDebugUtils.currentLine=20054032;
 //BA.debugLineNum = 20054032;BA.debugLine="Pnl.AddView(base, 5dip, 2dip, Pnl.Width - 10di";
_pnl.AddView((android.view.View)(_base.getObject()),__c.DipToCurrent((int) (5)),__c.DipToCurrent((int) (2)),(int) (_pnl.getWidth()-__c.DipToCurrent((int) (10))),(int) (_pnl.getHeight()-__c.DipToCurrent((int) (4))));
RDebugUtils.currentLine=20054035;
 //BA.debugLineNum = 20054035;BA.debugLine="Dim cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=20054036;
 //BA.debugLineNum = 20054036;BA.debugLine="cs.Initialize.Color(Colors.Red).Bold.Append(da";
_cs.Initialize().Color(__c.Colors.Red).Bold().Append(BA.ObjectToCharSequence(_data.Get((Object)("prod")))).Pop().Pop().Append(BA.ObjectToCharSequence(__c.CRLF)).Size((int) (12)).Color(__c.Colors.Black).Append(BA.ObjectToCharSequence("Existencias: "+BA.ObjectToString(_data.Get((Object)("almacen"))))).Pop();
RDebugUtils.currentLine=20054039;
 //BA.debugLineNum = 20054039;BA.debugLine="Dim lblInfo As Label : lblInfo.Initialize(\"\")";
_lblinfo = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=20054039;
 //BA.debugLineNum = 20054039;BA.debugLine="Dim lblInfo As Label : lblInfo.Initialize(\"\")";
_lblinfo.Initialize(ba,"");
RDebugUtils.currentLine=20054040;
 //BA.debugLineNum = 20054040;BA.debugLine="Dim xlbl As B4XView = lblInfo";
_xlbl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_xlbl = (anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_lblinfo.getObject()));
RDebugUtils.currentLine=20054041;
 //BA.debugLineNum = 20054041;BA.debugLine="xlbl.Text = cs";
_xlbl.setText(BA.ObjectToCharSequence(_cs.getObject()));
RDebugUtils.currentLine=20054042;
 //BA.debugLineNum = 20054042;BA.debugLine="lblInfo.Gravity = Gravity.TOP";
_lblinfo.setGravity(__c.Gravity.TOP);
RDebugUtils.currentLine=20054043;
 //BA.debugLineNum = 20054043;BA.debugLine="base.AddView(xlbl, 10dip, 8dip, base.Width * 0";
_base.AddView((android.view.View)(_xlbl.getObject()),__c.DipToCurrent((int) (10)),__c.DipToCurrent((int) (8)),(int) (_base.getWidth()*0.55),__c.DipToCurrent((int) (45)));
RDebugUtils.currentLine=20054046;
 //BA.debugLineNum = 20054046;BA.debugLine="Dim presentaciones As List = data.Get(\"present";
_presentaciones = new anywheresoftware.b4a.objects.collections.List();
_presentaciones = (anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(_data.Get((Object)("presentaciones"))));
RDebugUtils.currentLine=20054047;
 //BA.debugLineNum = 20054047;BA.debugLine="Dim vTop As Int = 10dip";
_vtop = __c.DipToCurrent((int) (10));
RDebugUtils.currentLine=20054049;
 //BA.debugLineNum = 20054049;BA.debugLine="For Each pres As Map In presentaciones";
_pres = new anywheresoftware.b4a.objects.collections.Map();
{
final anywheresoftware.b4a.BA.IterableList group19 = _presentaciones;
final int groupLen19 = group19.getSize()
;int index19 = 0;
;
for (; index19 < groupLen19;index19++){
_pres = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(group19.Get(index19)));
RDebugUtils.currentLine=20054051;
 //BA.debugLineNum = 20054051;BA.debugLine="Dim lblTipo As Label : lblTipo.Initialize(\"\")";
_lbltipo = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=20054051;
 //BA.debugLineNum = 20054051;BA.debugLine="Dim lblTipo As Label : lblTipo.Initialize(\"\")";
_lbltipo.Initialize(ba,"");
RDebugUtils.currentLine=20054052;
 //BA.debugLineNum = 20054052;BA.debugLine="lblTipo.Text = pres.Get(\"nombre\")";
_lbltipo.setText(BA.ObjectToCharSequence(_pres.Get((Object)("nombre"))));
RDebugUtils.currentLine=20054053;
 //BA.debugLineNum = 20054053;BA.debugLine="lblTipo.TextColor = Colors.Black  ' <--- Camb";
_lbltipo.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=20054054;
 //BA.debugLineNum = 20054054;BA.debugLine="lblTipo.TextSize = 14             ' <--- Tama";
_lbltipo.setTextSize((float) (14));
RDebugUtils.currentLine=20054056;
 //BA.debugLineNum = 20054056;BA.debugLine="lblTipo.Gravity = Gravity.LEFT";
_lbltipo.setGravity(__c.Gravity.LEFT);
RDebugUtils.currentLine=20054059;
 //BA.debugLineNum = 20054059;BA.debugLine="Dim cantPiezas As Int = pres.Get(\"cantidad\")";
_cantpiezas = (int)(BA.ObjectToNumber(_pres.Get((Object)("cantidad"))));
RDebugUtils.currentLine=20054060;
 //BA.debugLineNum = 20054060;BA.debugLine="Dim factorUmv As Int = pres.Get(\"umv\")";
_factorumv = (int)(BA.ObjectToNumber(_pres.Get((Object)("umv"))));
RDebugUtils.currentLine=20054061;
 //BA.debugLineNum = 20054061;BA.debugLine="Dim unidadesExistentes As Int = 0";
_unidadesexistentes = (int) (0);
RDebugUtils.currentLine=20054064;
 //BA.debugLineNum = 20054064;BA.debugLine="If factorUmv > 0 Then unidadesExistentes = ca";
if (_factorumv>0) { 
_unidadesexistentes = (int) (_cantpiezas/(double)_factorumv);};
RDebugUtils.currentLine=20054066;
 //BA.debugLineNum = 20054066;BA.debugLine="Dim lblTipo As Label : lblTipo.Initialize(\"\")";
_lbltipo = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=20054066;
 //BA.debugLineNum = 20054066;BA.debugLine="Dim lblTipo As Label : lblTipo.Initialize(\"\")";
_lbltipo.Initialize(ba,"");
RDebugUtils.currentLine=20054068;
 //BA.debugLineNum = 20054068;BA.debugLine="lblTipo.Text = pres.Get(\"nombre\").As(String).";
_lbltipo.setText(BA.ObjectToCharSequence((BA.ObjectToString(_pres.Get((Object)("nombre")))).toUpperCase()+": "+BA.NumberToString(_unidadesexistentes)));
RDebugUtils.currentLine=20054069;
 //BA.debugLineNum = 20054069;BA.debugLine="lblTipo.TextColor = Colors.Black";
_lbltipo.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=20054070;
 //BA.debugLineNum = 20054070;BA.debugLine="lblTipo.TextSize = 14";
_lbltipo.setTextSize((float) (14));
RDebugUtils.currentLine=20054071;
 //BA.debugLineNum = 20054071;BA.debugLine="lblTipo.Gravity = Gravity.LEFT";
_lbltipo.setGravity(__c.Gravity.LEFT);
RDebugUtils.currentLine=20054075;
 //BA.debugLineNum = 20054075;BA.debugLine="base.AddView(lblTipo, base.Width - 145dip, vT";
_base.AddView((android.view.View)(_lbltipo.getObject()),(int) (_base.getWidth()-__c.DipToCurrent((int) (145))),_vtop,__c.DipToCurrent((int) (140)),__c.DipToCurrent((int) (22)));
RDebugUtils.currentLine=20054078;
 //BA.debugLineNum = 20054078;BA.debugLine="Dim lblPrice As Label : lblPrice.Initialize(\"";
_lblprice = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=20054078;
 //BA.debugLineNum = 20054078;BA.debugLine="Dim lblPrice As Label : lblPrice.Initialize(\"";
_lblprice.Initialize(ba,"");
RDebugUtils.currentLine=20054079;
 //BA.debugLineNum = 20054079;BA.debugLine="lblPrice.Text = \"$\" & NumberFormat2(pres.Get(";
_lblprice.setText(BA.ObjectToCharSequence("$"+__c.NumberFormat2((double)(BA.ObjectToNumber(_pres.Get((Object)("precio")))),(int) (1),(int) (2),(int) (2),__c.False)));
RDebugUtils.currentLine=20054080;
 //BA.debugLineNum = 20054080;BA.debugLine="lblPrice.TextColor = 0xFF008000";
_lblprice.setTextColor(((int)0xff008000));
RDebugUtils.currentLine=20054081;
 //BA.debugLineNum = 20054081;BA.debugLine="lblPrice.TextSize = 14            ' <--- Tamb";
_lblprice.setTextSize((float) (14));
RDebugUtils.currentLine=20054082;
 //BA.debugLineNum = 20054082;BA.debugLine="lblPrice.Gravity = Gravity.CENTER_VERTICAL";
_lblprice.setGravity(__c.Gravity.CENTER_VERTICAL);
RDebugUtils.currentLine=20054083;
 //BA.debugLineNum = 20054083;BA.debugLine="base.AddView(lblPrice, base.Width - 215dip, v";
_base.AddView((android.view.View)(_lblprice.getObject()),(int) (_base.getWidth()-__c.DipToCurrent((int) (215))),(int) (_vtop+__c.DipToCurrent((int) (22))),__c.DipToCurrent((int) (65)),__c.DipToCurrent((int) (42)));
RDebugUtils.currentLine=20054086;
 //BA.debugLineNum = 20054086;BA.debugLine="Dim bM As Button : bM.Initialize(\"btnMenosDin";
_bm = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=20054086;
 //BA.debugLineNum = 20054086;BA.debugLine="Dim bM As Button : bM.Initialize(\"btnMenosDin";
_bm.Initialize(ba,"btnMenosDinamico");
RDebugUtils.currentLine=20054087;
 //BA.debugLineNum = 20054087;BA.debugLine="bM.Text = \"-\" : bM.TextColor = Colors.White :";
_bm.setText(BA.ObjectToCharSequence("-"));
RDebugUtils.currentLine=20054087;
 //BA.debugLineNum = 20054087;BA.debugLine="bM.Text = \"-\" : bM.TextColor = Colors.White :";
_bm.setTextColor(__c.Colors.White);
RDebugUtils.currentLine=20054087;
 //BA.debugLineNum = 20054087;BA.debugLine="bM.Text = \"-\" : bM.TextColor = Colors.White :";
_bm.setColor(((int)0xfff4511e));
RDebugUtils.currentLine=20054089;
 //BA.debugLineNum = 20054089;BA.debugLine="Dim et As EditText : et.Initialize(\"etCantDin";
_et = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=20054089;
 //BA.debugLineNum = 20054089;BA.debugLine="Dim et As EditText : et.Initialize(\"etCantDin";
_et.Initialize(ba,"etCantDinamico");
RDebugUtils.currentLine=20054090;
 //BA.debugLineNum = 20054090;BA.debugLine="et.Text = pres.Get(\"cantidad\")";
_et.setText(BA.ObjectToCharSequence(_pres.Get((Object)("cantidad"))));
RDebugUtils.currentLine=20054091;
 //BA.debugLineNum = 20054091;BA.debugLine="et.InputType = et.INPUT_TYPE_NUMBERS";
_et.setInputType(_et.INPUT_TYPE_NUMBERS);
RDebugUtils.currentLine=20054092;
 //BA.debugLineNum = 20054092;BA.debugLine="et.Gravity = Gravity.CENTER";
_et.setGravity(__c.Gravity.CENTER);
RDebugUtils.currentLine=20054093;
 //BA.debugLineNum = 20054093;BA.debugLine="et.Background = Null";
_et.setBackground((android.graphics.drawable.Drawable)(__c.Null));
RDebugUtils.currentLine=20054095;
 //BA.debugLineNum = 20054095;BA.debugLine="Dim bP As Button : bP.Initialize(\"btnMasDinam";
_bp = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=20054095;
 //BA.debugLineNum = 20054095;BA.debugLine="Dim bP As Button : bP.Initialize(\"btnMasDinam";
_bp.Initialize(ba,"btnMasDinamico");
RDebugUtils.currentLine=20054096;
 //BA.debugLineNum = 20054096;BA.debugLine="bP.Text = \"+\" : bP.TextColor = Colors.White :";
_bp.setText(BA.ObjectToCharSequence("+"));
RDebugUtils.currentLine=20054096;
 //BA.debugLineNum = 20054096;BA.debugLine="bP.Text = \"+\" : bP.TextColor = Colors.White :";
_bp.setTextColor(__c.Colors.White);
RDebugUtils.currentLine=20054096;
 //BA.debugLineNum = 20054096;BA.debugLine="bP.Text = \"+\" : bP.TextColor = Colors.White :";
_bp.setColor(((int)0xff000080));
RDebugUtils.currentLine=20054098;
 //BA.debugLineNum = 20054098;BA.debugLine="Dim tagInfo As Map = CreateMap(\"id\": data.Get";
_taginfo = new anywheresoftware.b4a.objects.collections.Map();
_taginfo = __c.createMap(new Object[] {(Object)("id"),_data.Get((Object)("id")),(Object)("col"),_pres.Get((Object)("col_index")),(Object)("et"),(Object)(_et.getObject()),(Object)("pres"),(Object)(_pres.getObject()),(Object)("almacen"),_data.Get((Object)("almacen"))});
RDebugUtils.currentLine=20054099;
 //BA.debugLineNum = 20054099;BA.debugLine="bM.Tag = tagInfo : bP.Tag = tagInfo : et.Tag";
_bm.setTag((Object)(_taginfo.getObject()));
RDebugUtils.currentLine=20054099;
 //BA.debugLineNum = 20054099;BA.debugLine="bM.Tag = tagInfo : bP.Tag = tagInfo : et.Tag";
_bp.setTag((Object)(_taginfo.getObject()));
RDebugUtils.currentLine=20054099;
 //BA.debugLineNum = 20054099;BA.debugLine="bM.Tag = tagInfo : bP.Tag = tagInfo : et.Tag";
_et.setTag((Object)(_taginfo.getObject()));
RDebugUtils.currentLine=20054102;
 //BA.debugLineNum = 20054102;BA.debugLine="base.AddView(bM, base.Width - 145dip, vTop +";
_base.AddView((android.view.View)(_bm.getObject()),(int) (_base.getWidth()-__c.DipToCurrent((int) (145))),(int) (_vtop+__c.DipToCurrent((int) (22))),__c.DipToCurrent((int) (38)),__c.DipToCurrent((int) (42)));
RDebugUtils.currentLine=20054103;
 //BA.debugLineNum = 20054103;BA.debugLine="base.AddView(et, base.Width - 105dip, vTop +";
_base.AddView((android.view.View)(_et.getObject()),(int) (_base.getWidth()-__c.DipToCurrent((int) (105))),(int) (_vtop+__c.DipToCurrent((int) (22))),__c.DipToCurrent((int) (45)),__c.DipToCurrent((int) (42)));
RDebugUtils.currentLine=20054104;
 //BA.debugLineNum = 20054104;BA.debugLine="base.AddView(bP, base.Width - 58dip, vTop + 2";
_base.AddView((android.view.View)(_bp.getObject()),(int) (_base.getWidth()-__c.DipToCurrent((int) (58))),(int) (_vtop+__c.DipToCurrent((int) (22))),__c.DipToCurrent((int) (38)),__c.DipToCurrent((int) (42)));
RDebugUtils.currentLine=20054107;
 //BA.debugLineNum = 20054107;BA.debugLine="vTop = vTop + 75dip";
_vtop = (int) (_vtop+__c.DipToCurrent((int) (75)));
RDebugUtils.currentLine=20054108;
 //BA.debugLineNum = 20054108;BA.debugLine="et.Enabled = False";
_et.setEnabled(__c.False);
RDebugUtils.currentLine=20054109;
 //BA.debugLineNum = 20054109;BA.debugLine="et.TextColor = Colors.Black";
_et.setTextColor(__c.Colors.Black);
 }
};
 };
 }else {
RDebugUtils.currentLine=20054113;
 //BA.debugLineNum = 20054113;BA.debugLine="If Pnl.NumberOfViews > 0 Then Pnl.RemoveAllView";
if (_pnl.getNumberOfViews()>0) { 
_pnl.RemoveAllViews();};
 };
 }
};
RDebugUtils.currentLine=20054116;
 //BA.debugLineNum = 20054116;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.objects.PanelWrapper  _createlistitem(SHARK2.keymon.com.mx.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=18677760;
 //BA.debugLineNum = 18677760;BA.debugLine="Sub CreateListItem(Text As String, precioU As Stri";
RDebugUtils.currentLine=18677775;
 //BA.debugLineNum = 18677775;BA.debugLine="End Sub";
return null;
}
public String  _et_pcant_focuschanged(SHARK2.keymon.com.mx.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}));}
int _index = 0;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl0 = null;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lacant = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lacant2 = null;
String _id = "";
RDebugUtils.currentLine=18874368;
 //BA.debugLineNum = 18874368;BA.debugLine="Private Sub et_pCant_FocusChanged (HasFocus As Boo";
RDebugUtils.currentLine=18874369;
 //BA.debugLineNum = 18874369;BA.debugLine="LogColor($\"focus changed=${HasFocus}\"$, Colors.Ma";
__c.LogImpl("518874369",("focus changed="+__c.SmartStringFormatter("",(Object)(_hasfocus))+""),__c.Colors.Magenta);
RDebugUtils.currentLine=18874370;
 //BA.debugLineNum = 18874370;BA.debugLine="If et_pCant.Text = \"\" Then et_pCant.Text = \"0\"";
if ((__ref._et_pcant /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()).equals("")) { 
__ref._et_pcant /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence("0"));};
RDebugUtils.currentLine=18874371;
 //BA.debugLineNum = 18874371;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=18874372;
 //BA.debugLineNum = 18874372;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=18874373;
 //BA.debugLineNum = 18874373;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=18874374;
 //BA.debugLineNum = 18874374;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=18874375;
 //BA.debugLineNum = 18874375;BA.debugLine="Dim laCant2 As B4XView = pnl.GetView(3).GetView(2";
_lacant2 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacant2 = _pnl.GetView((int) (3)).GetView((int) (2));
RDebugUtils.currentLine=18874376;
 //BA.debugLineNum = 18874376;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=18874377;
 //BA.debugLineNum = 18874377;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = \"0\"";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence("0"));};
RDebugUtils.currentLine=18874378;
 //BA.debugLineNum = 18874378;BA.debugLine="etCantHasFocus = HasFocus";
__ref._etcanthasfocus /*boolean*/  = _hasfocus;
RDebugUtils.currentLine=18874379;
 //BA.debugLineNum = 18874379;BA.debugLine="LogColor(laCant.Text,Colors.Red)";
__c.LogImpl("518874379",_lacant.getText(),__c.Colors.Red);
RDebugUtils.currentLine=18874380;
 //BA.debugLineNum = 18874380;BA.debugLine="If laCant2.IsInitialized Then";
if (_lacant2.IsInitialized()) { 
RDebugUtils.currentLine=18874381;
 //BA.debugLineNum = 18874381;BA.debugLine="totalcajasmaspiezas = laCant.Text + laCant2.Text";
__ref._totalcajasmaspiezas /*int*/  = (int) ((double)(Double.parseDouble(_lacant.getText()))+(double)(Double.parseDouble(_lacant2.getText())));
 }else {
RDebugUtils.currentLine=18874383;
 //BA.debugLineNum = 18874383;BA.debugLine="totalcajasmaspiezas = laCant.Text";
__ref._totalcajasmaspiezas /*int*/  = (int)(Double.parseDouble(_lacant.getText()));
 };
RDebugUtils.currentLine=18874385;
 //BA.debugLineNum = 18874385;BA.debugLine="invTotal = totalcajasmaspiezas + Subs.traeinventa";
__ref._invtotal /*int*/  = (int) (__ref._totalcajasmaspiezas /*int*/ +(double)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_id))));
RDebugUtils.currentLine=18874387;
 //BA.debugLineNum = 18874387;BA.debugLine="cuentaProds";
__ref._cuentaprods /*String*/ (null);
RDebugUtils.currentLine=18874388;
 //BA.debugLineNum = 18874388;BA.debugLine="End Sub";
return "";
}
public String  _et_pcant_textchanged(SHARK2.keymon.com.mx.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;
anywheresoftware.b4a.objects.B4XViewWrapper _lacant2 = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lprodx = null;
String _id = "";
String _precio = "";
String _inv = "";
String _nombrex = "";
anywheresoftware.b4a.objects.B4XViewWrapper _panelcajas = null;
anywheresoftware.b4a.objects.B4XViewWrapper _panelpiezas = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _fg = null;
anywheresoftware.b4a.objects.CSBuilder _cs = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _o = null;
String _invactualizado = "";
int _maxcajas = 0;
RDebugUtils.currentLine=18939904;
 //BA.debugLineNum = 18939904;BA.debugLine="Private Sub et_pCant_TextChanged (Old As String, N";
RDebugUtils.currentLine=18939907;
 //BA.debugLineNum = 18939907;BA.debugLine="If etCantHasFocus = True Then";
if (__ref._etcanthasfocus /*boolean*/ ==__c.True) { 
RDebugUtils.currentLine=18939908;
 //BA.debugLineNum = 18939908;BA.debugLine="LogColor($\"txt changed: ${Old}|${New}, hasfocus=";
__c.LogImpl("518939908",("txt changed: "+__c.SmartStringFormatter("",(Object)(_old))+"|"+__c.SmartStringFormatter("",(Object)(_new))+", hasfocus="+__c.SmartStringFormatter("",(Object)(__ref._etcanthasfocus /*boolean*/ ))+""),__c.Colors.Magenta);
RDebugUtils.currentLine=18939909;
 //BA.debugLineNum = 18939909;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=18939910;
 //BA.debugLineNum = 18939910;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=18939911;
 //BA.debugLineNum = 18939911;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=18939912;
 //BA.debugLineNum = 18939912;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=18939913;
 //BA.debugLineNum = 18939913;BA.debugLine="Dim laCant2 As B4XView = pnl.GetView(3).GetView(";
_lacant2 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacant2 = _pnl.GetView((int) (3)).GetView((int) (2));
RDebugUtils.currentLine=18939914;
 //BA.debugLineNum = 18939914;BA.debugLine="Dim lProdX As B4XView = pnl.GetView(1)";
_lprodx = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lprodx = _pnl.GetView((int) (1));
RDebugUtils.currentLine=18939915;
 //BA.debugLineNum = 18939915;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=18939916;
 //BA.debugLineNum = 18939916;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=18939917;
 //BA.debugLineNum = 18939917;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=18939918;
 //BA.debugLineNum = 18939918;BA.debugLine="Private inv As String=Subs.traeinventario(id)";
_inv = _subs._traeinventario /*String*/ (ba,_id);
RDebugUtils.currentLine=18939919;
 //BA.debugLineNum = 18939919;BA.debugLine="Private nombreX As String = Subs.traeProdNombre(";
_nombrex = _subs._traeprodnombre /*String*/ (ba,_id);
RDebugUtils.currentLine=18939920;
 //BA.debugLineNum = 18939920;BA.debugLine="Dim panelcajas As B4XView = pnl.GetView(3)";
_panelcajas = new anywheresoftware.b4a.objects.B4XViewWrapper();
_panelcajas = _pnl.GetView((int) (3));
RDebugUtils.currentLine=18939921;
 //BA.debugLineNum = 18939921;BA.debugLine="Dim panelpiezas As B4XView = pnl.GetView(2)";
_panelpiezas = new anywheresoftware.b4a.objects.B4XViewWrapper();
_panelpiezas = _pnl.GetView((int) (2));
RDebugUtils.currentLine=18939922;
 //BA.debugLineNum = 18939922;BA.debugLine="If(New = \"\" Or New = Null Or New = \"-\") Then New";
if (((_new).equals("") || _new== null || (_new).equals("-"))) { 
_new = BA.NumberToString(0);};
RDebugUtils.currentLine=18939924;
 //BA.debugLineNum = 18939924;BA.debugLine="If(New > invTotal) Then";
if (((double)(Double.parseDouble(_new))>__ref._invtotal /*int*/ )) { 
RDebugUtils.currentLine=18939925;
 //BA.debugLineNum = 18939925;BA.debugLine="Sender.As(EditText).text = invTotal";
((anywheresoftware.b4a.objects.EditTextWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.EditTextWrapper(), (android.widget.EditText)(__c.Sender(ba)))).setText(BA.ObjectToCharSequence(__ref._invtotal /*int*/ ));
 };
RDebugUtils.currentLine=18939928;
 //BA.debugLineNum = 18939928;BA.debugLine="If New = \"\" Then New = 0";
if ((_new).equals("")) { 
_new = BA.NumberToString(0);};
RDebugUtils.currentLine=18939929;
 //BA.debugLineNum = 18939929;BA.debugLine="If Old = \"\" Or Old = Null Then New = 0";
if ((_old).equals("") || _old== null) { 
_new = BA.NumberToString(0);};
RDebugUtils.currentLine=18939930;
 //BA.debugLineNum = 18939930;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=18939931;
 //BA.debugLineNum = 18939931;BA.debugLine="LogColor(laCant.Text,Colors.Red)";
__c.LogImpl("518939931",_lacant.getText(),__c.Colors.Red);
RDebugUtils.currentLine=18939932;
 //BA.debugLineNum = 18939932;BA.debugLine="If New > 0 Then";
if ((double)(Double.parseDouble(_new))>0) { 
RDebugUtils.currentLine=18939933;
 //BA.debugLineNum = 18939933;BA.debugLine="panelcajas.Visible = False";
_panelcajas.setVisible(__c.False);
 }else 
{RDebugUtils.currentLine=18939934;
 //BA.debugLineNum = 18939934;BA.debugLine="Else If New = 0 Then";
if ((_new).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=18939935;
 //BA.debugLineNum = 18939935;BA.debugLine="panelcajas.Visible = True";
_panelcajas.setVisible(__c.True);
 }}
;
RDebugUtils.currentLine=18939937;
 //BA.debugLineNum = 18939937;BA.debugLine="Log(Old)";
__c.LogImpl("518939937",_old,0);
RDebugUtils.currentLine=18939938;
 //BA.debugLineNum = 18939938;BA.debugLine="If Old <> \"\" Then";
if ((_old).equals("") == false) { 
RDebugUtils.currentLine=18939939;
 //BA.debugLineNum = 18939939;BA.debugLine="Log(\"--------------->Credito Disponible: \"&B4XP";
__c.LogImpl("518939939","--------------->Credito Disponible: "+_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*SHARK2.keymon.com.mx.c_cliente*/ ._credito_diponible /*String*/ ,0);
RDebugUtils.currentLine=18939940;
 //BA.debugLineNum = 18939940;BA.debugLine="If B4XPages.MainPage.tipo_venta = \"PREVENTA_CRE";
if ((_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ).equals("PREVENTA_CREDITO")) { 
RDebugUtils.currentLine=18939941;
 //BA.debugLineNum = 18939941;BA.debugLine="Dim fg As Cursor = Starter.skmt.ExecQuery(\"Sel";
_fg = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_fg = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select IFNULL(sum(PE_COSTO_TOT),0) AS COSTO FROM PEDIDO WHERE PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND PE_FOLIO = 'PREVENTA_CREDITO'")));
RDebugUtils.currentLine=18939942;
 //BA.debugLineNum = 18939942;BA.debugLine="fg.Position = 0";
_fg.setPosition((int) (0));
RDebugUtils.currentLine=18939943;
 //BA.debugLineNum = 18939943;BA.debugLine="If Old = \"\" Or Old = Null Then New = 0";
if ((_old).equals("") || _old== null) { 
_new = BA.NumberToString(0);};
RDebugUtils.currentLine=18939944;
 //BA.debugLineNum = 18939944;BA.debugLine="Log(precio &\"     *    \"&Old)";
__c.LogImpl("518939944",_precio+"     *    "+_old,0);
RDebugUtils.currentLine=18939945;
 //BA.debugLineNum = 18939945;BA.debugLine="Log(fg.GetString(\"COSTO\") +(precio*New))";
__c.LogImpl("518939945",BA.NumberToString((double)(Double.parseDouble(_fg.GetString("COSTO")))+((double)(Double.parseDouble(_precio))*(double)(Double.parseDouble(_new)))),0);
RDebugUtils.currentLine=18939946;
 //BA.debugLineNum = 18939946;BA.debugLine="If fg.GetString(\"COSTO\") +((precio*New)-(preci";
if ((double)(Double.parseDouble(_fg.GetString("COSTO")))+(((double)(Double.parseDouble(_precio))*(double)(Double.parseDouble(_new)))-((double)(Double.parseDouble(_precio))*(double)(Double.parseDouble(_old))))<=(double)(Double.parseDouble(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*SHARK2.keymon.com.mx.c_cliente*/ ._credito_diponible /*String*/ ))) { 
RDebugUtils.currentLine=18939952;
 //BA.debugLineNum = 18939952;BA.debugLine="If Not(Old = \"0\" And New = \"\") And laCant.Tex";
if (__c.Not((_old).equals("0") && (_new).equals("")) && _lacant.getText()!= null && (_lacant.getText()).equals("") == false && __ref._etcanthasfocus /*boolean*/ ) { 
RDebugUtils.currentLine=18939953;
 //BA.debugLineNum = 18939953;BA.debugLine="Log(\"actualizamos producto\")";
__c.LogImpl("518939953","actualizamos producto",0);
RDebugUtils.currentLine=18939954;
 //BA.debugLineNum = 18939954;BA.debugLine="Subs.actualizaProducto(Subs.traeAlmacen, pre";
_subs._actualizaproducto /*String*/ (ba,_subs._traealmacen /*String*/ (ba),_precio,(int)(Double.parseDouble(_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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,BA.NumberToString(0),BA.NumberToString(0));
RDebugUtils.currentLine=18939955;
 //BA.debugLineNum = 18939955;BA.debugLine="cuentaProds";
__ref._cuentaprods /*String*/ (null);
 };
RDebugUtils.currentLine=18939966;
 //BA.debugLineNum = 18939966;BA.debugLine="If 1 = 1 Then";
if (1==1) { 
RDebugUtils.currentLine=18939967;
 //BA.debugLineNum = 18939967;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=18939968;
 //BA.debugLineNum = 18939968;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=18939969;
 //BA.debugLineNum = 18939969;BA.debugLine="Private o As Cursor = Starter.skmt.ExecQuery";
_o = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_o = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select CAT_GP_ALMACEN from "+__c.SmartStringFormatter("",(Object)(_starter._tabla /*String*/ ))+" where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_id))+"'"))));
RDebugUtils.currentLine=18939970;
 //BA.debugLineNum = 18939970;BA.debugLine="Private invActualizado As String = \"0\"";
_invactualizado = "0";
RDebugUtils.currentLine=18939972;
 //BA.debugLineNum = 18939972;BA.debugLine="o.Position = 0";
_o.setPosition((int) (0));
RDebugUtils.currentLine=18939973;
 //BA.debugLineNum = 18939973;BA.debugLine="invActualizado = Subs.traeinventario(id)";
_invactualizado = _subs._traeinventario /*String*/ (ba,_id);
RDebugUtils.currentLine=18939974;
 //BA.debugLineNum = 18939974;BA.debugLine="Log(Subs.traeinventario(id))";
__c.LogImpl("518939974",_subs._traeinventario /*String*/ (ba,_id),0);
RDebugUtils.currentLine=18939976;
 //BA.debugLineNum = 18939976;BA.debugLine="If New = \"\" Then New = 0";
if ((_new).equals("")) { 
_new = BA.NumberToString(0);};
RDebugUtils.currentLine=18939977;
 //BA.debugLineNum = 18939977;BA.debugLine="If clv_prods_ll.GetValue(index).As(Map).Get(";
if (((float)(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(_index)))).Get((Object)("precio_caja")))))==0 || ((int)(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(_index)))).Get((Object)("conversion")))))==1) { 
RDebugUtils.currentLine=18939978;
 //BA.debugLineNum = 18939978;BA.debugLine="Private maxcajas As Int = 0";
_maxcajas = (int) (0);
RDebugUtils.currentLine=18939979;
 //BA.debugLineNum = 18939979;BA.debugLine="Log(\"cajas a 0\")";
__c.LogImpl("518939979","cajas a 0",0);
 }else {
RDebugUtils.currentLine=18939981;
 //BA.debugLineNum = 18939981;BA.debugLine="Private maxcajas As Int = invActualizado/cl";
_maxcajas = (int) ((double)(Double.parseDouble(_invactualizado))/(double)(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(_index)))).Get((Object)("conversion")))));
RDebugUtils.currentLine=18939982;
 //BA.debugLineNum = 18939982;BA.debugLine="Log(\"cajas no a 0\")";
__c.LogImpl("518939982","cajas no a 0",0);
 };
RDebugUtils.currentLine=18939984;
 //BA.debugLineNum = 18939984;BA.debugLine="lProdX.Text = cs.Color(Colors.red).append(no";
_lprodx.setText(BA.ObjectToCharSequence(_cs.Color(__c.Colors.Red).Append(BA.ObjectToCharSequence(_nombrex)).Pop().Append(BA.ObjectToCharSequence(__c.CRLF)).Append(BA.ObjectToCharSequence("Existencias: "+(_subs._traeinventario /*String*/ (ba,_id)))).Color(((int)0xff017f01)).Append(BA.ObjectToCharSequence(("   $"+__c.SmartStringFormatter("",(Object)(__c.NumberFormat2((double)(Double.parseDouble(_precio)),(int) (1),(int) (2),(int) (2),__c.False)))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Max. Cajas: "+__c.SmartStringFormatter("",(Object)(_maxcajas))+""))).PopAll().getObject()));
 };
 }else {
RDebugUtils.currentLine=18939987;
 //BA.debugLineNum = 18939987;BA.debugLine="laCant.Text = 0";
_lacant.setText(BA.ObjectToCharSequence(0));
RDebugUtils.currentLine=18939988;
 //BA.debugLineNum = 18939988;BA.debugLine="MsgboxAsync(\"No se puede meter mas venta a cr";
__c.MsgboxAsync(BA.ObjectToCharSequence("No se puede meter mas venta a credito por que supera el limite del credito"),BA.ObjectToCharSequence("Atencion"),ba);
 };
 }else {
RDebugUtils.currentLine=18939996;
 //BA.debugLineNum = 18939996;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("") == false && __ref._etcanthasfocus /*boolean*/ ) { 
RDebugUtils.currentLine=18939997;
 //BA.debugLineNum = 18939997;BA.debugLine="Log(\"actualizamos producto\")";
__c.LogImpl("518939997","actualizamos producto",0);
RDebugUtils.currentLine=18939998;
 //BA.debugLineNum = 18939998;BA.debugLine="Subs.actualizaProducto(Subs.traeAlmacen, prec";
_subs._actualizaproducto /*String*/ (ba,_subs._traealmacen /*String*/ (ba),_precio,(int)(Double.parseDouble(_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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,BA.NumberToString(0),BA.NumberToString(0));
RDebugUtils.currentLine=18939999;
 //BA.debugLineNum = 18939999;BA.debugLine="cuentaProds";
__ref._cuentaprods /*String*/ (null);
 };
RDebugUtils.currentLine=18940010;
 //BA.debugLineNum = 18940010;BA.debugLine="If 1 = 1 Then";
if (1==1) { 
RDebugUtils.currentLine=18940011;
 //BA.debugLineNum = 18940011;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=18940012;
 //BA.debugLineNum = 18940012;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=18940013;
 //BA.debugLineNum = 18940013;BA.debugLine="Private o As Cursor = Starter.skmt.ExecQuery(";
_o = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_o = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select CAT_GP_ALMACEN from "+__c.SmartStringFormatter("",(Object)(_starter._tabla /*String*/ ))+" where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_id))+"'"))));
RDebugUtils.currentLine=18940014;
 //BA.debugLineNum = 18940014;BA.debugLine="Private invActualizado As String = \"0\"";
_invactualizado = "0";
RDebugUtils.currentLine=18940016;
 //BA.debugLineNum = 18940016;BA.debugLine="o.Position = 0";
_o.setPosition((int) (0));
RDebugUtils.currentLine=18940017;
 //BA.debugLineNum = 18940017;BA.debugLine="invActualizado = Subs.traeinventario(id)";
_invactualizado = _subs._traeinventario /*String*/ (ba,_id);
RDebugUtils.currentLine=18940018;
 //BA.debugLineNum = 18940018;BA.debugLine="Log(Subs.traeinventario(id))";
__c.LogImpl("518940018",_subs._traeinventario /*String*/ (ba,_id),0);
RDebugUtils.currentLine=18940020;
 //BA.debugLineNum = 18940020;BA.debugLine="If New = \"\" Then New = 0";
if ((_new).equals("")) { 
_new = BA.NumberToString(0);};
RDebugUtils.currentLine=18940021;
 //BA.debugLineNum = 18940021;BA.debugLine="If clv_prods_ll.GetValue(index).As(Map).Get(\"";
if (((float)(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(_index)))).Get((Object)("precio_caja")))))==0 || ((int)(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(_index)))).Get((Object)("conversion")))))==1) { 
RDebugUtils.currentLine=18940022;
 //BA.debugLineNum = 18940022;BA.debugLine="Private maxcajas As Int = 0";
_maxcajas = (int) (0);
RDebugUtils.currentLine=18940023;
 //BA.debugLineNum = 18940023;BA.debugLine="Log(\"cajas a 0\")";
__c.LogImpl("518940023","cajas a 0",0);
 }else {
RDebugUtils.currentLine=18940025;
 //BA.debugLineNum = 18940025;BA.debugLine="Private maxcajas As Int = invActualizado/clv";
_maxcajas = (int) ((double)(Double.parseDouble(_invactualizado))/(double)(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(_index)))).Get((Object)("conversion")))));
RDebugUtils.currentLine=18940026;
 //BA.debugLineNum = 18940026;BA.debugLine="Log(\"cajas no a 0\")";
__c.LogImpl("518940026","cajas no a 0",0);
 };
RDebugUtils.currentLine=18940028;
 //BA.debugLineNum = 18940028;BA.debugLine="lProdX.Text = cs.Color(Colors.red).append(nom";
_lprodx.setText(BA.ObjectToCharSequence(_cs.Color(__c.Colors.Red).Append(BA.ObjectToCharSequence(_nombrex)).Pop().Append(BA.ObjectToCharSequence(__c.CRLF)).Append(BA.ObjectToCharSequence("Existencias: "+(_subs._traeinventario /*String*/ (ba,_id)))).Color(((int)0xff017f01)).Append(BA.ObjectToCharSequence(("   $"+__c.SmartStringFormatter("",(Object)(__c.NumberFormat2((double)(Double.parseDouble(_precio)),(int) (1),(int) (2),(int) (2),__c.False)))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Max. Cajas: "+__c.SmartStringFormatter("",(Object)(_maxcajas))+""))).PopAll().getObject()));
 };
 };
 };
RDebugUtils.currentLine=18940032;
 //BA.debugLineNum = 18940032;BA.debugLine="If New > 0 Then";
if ((double)(Double.parseDouble(_new))>0) { 
RDebugUtils.currentLine=18940033;
 //BA.debugLineNum = 18940033;BA.debugLine="panelcajas.Visible = False";
_panelcajas.setVisible(__c.False);
 }else 
{RDebugUtils.currentLine=18940034;
 //BA.debugLineNum = 18940034;BA.debugLine="Else If New = 0 Then";
if ((_new).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=18940035;
 //BA.debugLineNum = 18940035;BA.debugLine="If maxcajas = 0 Then";
if (_maxcajas==0) { 
RDebugUtils.currentLine=18940036;
 //BA.debugLineNum = 18940036;BA.debugLine="panelcajas.Visible = False";
_panelcajas.setVisible(__c.False);
 }else {
RDebugUtils.currentLine=18940038;
 //BA.debugLineNum = 18940038;BA.debugLine="panelcajas.Visible = True";
_panelcajas.setVisible(__c.True);
 };
 }}
;
 };
RDebugUtils.currentLine=18940042;
 //BA.debugLineNum = 18940042;BA.debugLine="End Sub";
return "";
}
public String  _et_pcantc_focuschanged(SHARK2.keymon.com.mx.c_productos __ref,boolean _hasfocus) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "et_pcantc_focuschanged", false))
	 {return ((String) Debug.delegate(ba, "et_pcantc_focuschanged", new Object[] {_hasfocus}));}
int _index = 0;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl0 = null;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lacant = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lacant2 = null;
String _id = "";
RDebugUtils.currentLine=20447232;
 //BA.debugLineNum = 20447232;BA.debugLine="Private Sub et_pCantc_FocusChanged (HasFocus As Bo";
RDebugUtils.currentLine=20447233;
 //BA.debugLineNum = 20447233;BA.debugLine="LogColor($\"focus changed=${HasFocus}\"$, Colors.Ma";
__c.LogImpl("520447233",("focus changed="+__c.SmartStringFormatter("",(Object)(_hasfocus))+""),__c.Colors.Magenta);
RDebugUtils.currentLine=20447234;
 //BA.debugLineNum = 20447234;BA.debugLine="If et_pCantc.Text = \"\" Then et_pCantc.Text = \"0\"";
if ((__ref._et_pcantc /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()).equals("")) { 
__ref._et_pcantc /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence("0"));};
RDebugUtils.currentLine=20447235;
 //BA.debugLineNum = 20447235;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=20447236;
 //BA.debugLineNum = 20447236;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=20447237;
 //BA.debugLineNum = 20447237;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=20447238;
 //BA.debugLineNum = 20447238;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=20447239;
 //BA.debugLineNum = 20447239;BA.debugLine="Dim laCant2 As B4XView = pnl.GetView(3).GetView(2";
_lacant2 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacant2 = _pnl.GetView((int) (3)).GetView((int) (2));
RDebugUtils.currentLine=20447240;
 //BA.debugLineNum = 20447240;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=20447241;
 //BA.debugLineNum = 20447241;BA.debugLine="If laCant2.Text = \"\" Then laCant2.Text = \"0\"";
if ((_lacant2.getText()).equals("")) { 
_lacant2.setText(BA.ObjectToCharSequence("0"));};
RDebugUtils.currentLine=20447242;
 //BA.debugLineNum = 20447242;BA.debugLine="etCantHasFocus = HasFocus";
__ref._etcanthasfocus /*boolean*/  = _hasfocus;
RDebugUtils.currentLine=20447249;
 //BA.debugLineNum = 20447249;BA.debugLine="invTotal = totalcajasmaspiezas + Subs.traeinventa";
__ref._invtotal /*int*/  = (int) (__ref._totalcajasmaspiezas /*int*/ +(double)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_id))));
RDebugUtils.currentLine=20447251;
 //BA.debugLineNum = 20447251;BA.debugLine="cuentaProds";
__ref._cuentaprods /*String*/ (null);
RDebugUtils.currentLine=20447252;
 //BA.debugLineNum = 20447252;BA.debugLine="End Sub";
return "";
}
public String  _et_pcantc_textchanged(SHARK2.keymon.com.mx.c_productos __ref,String _old,String _new) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "et_pcantc_textchanged", false))
	 {return ((String) Debug.delegate(ba, "et_pcantc_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;
anywheresoftware.b4a.objects.B4XViewWrapper _lacant2 = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lprodx = null;
String _id = "";
String _precio = "";
String _inv = "";
String _nombrex = "";
anywheresoftware.b4a.objects.B4XViewWrapper _panelcajas = null;
anywheresoftware.b4a.objects.B4XViewWrapper _panelpiezas = null;
String _conversion = "";
String _preciocaja = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _fg = null;
int _totalcajaspermi = 0;
anywheresoftware.b4a.objects.CSBuilder _cs = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _o = null;
String _invactualizado = "";
int _maxcajas2 = 0;
RDebugUtils.currentLine=20512768;
 //BA.debugLineNum = 20512768;BA.debugLine="Private Sub et_pCantc_TextChanged (Old As String,";
RDebugUtils.currentLine=20512771;
 //BA.debugLineNum = 20512771;BA.debugLine="If etCantHasFocus = True Then";
if (__ref._etcanthasfocus /*boolean*/ ==__c.True) { 
RDebugUtils.currentLine=20512774;
 //BA.debugLineNum = 20512774;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=20512775;
 //BA.debugLineNum = 20512775;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=20512776;
 //BA.debugLineNum = 20512776;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=20512777;
 //BA.debugLineNum = 20512777;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=20512778;
 //BA.debugLineNum = 20512778;BA.debugLine="Dim laCant2 As B4XView = pnl.GetView(3).GetView(";
_lacant2 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacant2 = _pnl.GetView((int) (3)).GetView((int) (2));
RDebugUtils.currentLine=20512779;
 //BA.debugLineNum = 20512779;BA.debugLine="Dim lProdX As B4XView = pnl.GetView(1)";
_lprodx = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lprodx = _pnl.GetView((int) (1));
RDebugUtils.currentLine=20512780;
 //BA.debugLineNum = 20512780;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=20512781;
 //BA.debugLineNum = 20512781;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=20512782;
 //BA.debugLineNum = 20512782;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=20512783;
 //BA.debugLineNum = 20512783;BA.debugLine="Private inv As String=Subs.traeinventario(id)";
_inv = _subs._traeinventario /*String*/ (ba,_id);
RDebugUtils.currentLine=20512784;
 //BA.debugLineNum = 20512784;BA.debugLine="Private nombreX As String = Subs.traeProdNombre(";
_nombrex = _subs._traeprodnombre /*String*/ (ba,_id);
RDebugUtils.currentLine=20512785;
 //BA.debugLineNum = 20512785;BA.debugLine="Dim panelcajas As B4XView = pnl.GetView(3)";
_panelcajas = new anywheresoftware.b4a.objects.B4XViewWrapper();
_panelcajas = _pnl.GetView((int) (3));
RDebugUtils.currentLine=20512786;
 //BA.debugLineNum = 20512786;BA.debugLine="Dim panelpiezas As B4XView = pnl.GetView(2)";
_panelpiezas = new anywheresoftware.b4a.objects.B4XViewWrapper();
_panelpiezas = _pnl.GetView((int) (2));
RDebugUtils.currentLine=20512787;
 //BA.debugLineNum = 20512787;BA.debugLine="Private conversion As String = clv_prods_ll.GetV";
_conversion = 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)("conversion")));
RDebugUtils.currentLine=20512788;
 //BA.debugLineNum = 20512788;BA.debugLine="Private preciocaja As String = clv_prods_ll.GetV";
_preciocaja = 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_caja")));
RDebugUtils.currentLine=20512789;
 //BA.debugLineNum = 20512789;BA.debugLine="invTotal = Subs.traeinventario(id)";
__ref._invtotal /*int*/  = (int)(Double.parseDouble(_subs._traeinventario /*String*/ (ba,_id)));
RDebugUtils.currentLine=20512790;
 //BA.debugLineNum = 20512790;BA.debugLine="Log(\"inventario total \"& invTotal)";
__c.LogImpl("520512790","inventario total "+BA.NumberToString(__ref._invtotal /*int*/ ),0);
RDebugUtils.currentLine=20512791;
 //BA.debugLineNum = 20512791;BA.debugLine="If(New = \"\" Or New = Null Or New = \"-\") Then New";
if (((_new).equals("") || _new== null || (_new).equals("-"))) { 
_new = BA.NumberToString(0);};
RDebugUtils.currentLine=20512793;
 //BA.debugLineNum = 20512793;BA.debugLine="Log(($\"new*conversion  ${New * conversion} > ${i";
__c.LogImpl("520512793",(("new*conversion  "+__c.SmartStringFormatter("",(Object)((double)(Double.parseDouble(_new))*(double)(Double.parseDouble(_conversion))))+" > "+__c.SmartStringFormatter("",(Object)(__ref._invtotal /*int*/ ))+" =  "+__c.SmartStringFormatter("",(Object)((((double)(Double.parseDouble(_new))*(double)(Double.parseDouble(_conversion)))>__ref._invtotal /*int*/ )))+"")),0);
RDebugUtils.currentLine=20512794;
 //BA.debugLineNum = 20512794;BA.debugLine="If((New * conversion)  > invTotal) Then";
if ((((double)(Double.parseDouble(_new))*(double)(Double.parseDouble(_conversion)))>__ref._invtotal /*int*/ )) { 
RDebugUtils.currentLine=20512796;
 //BA.debugLineNum = 20512796;BA.debugLine="Sender.As(EditText).text = 0";
((anywheresoftware.b4a.objects.EditTextWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.EditTextWrapper(), (android.widget.EditText)(__c.Sender(ba)))).setText(BA.ObjectToCharSequence(0));
RDebugUtils.currentLine=20512797;
 //BA.debugLineNum = 20512797;BA.debugLine="New = 0";
_new = BA.NumberToString(0);
RDebugUtils.currentLine=20512799;
 //BA.debugLineNum = 20512799;BA.debugLine="pnl.GetView(2).Visible = True";
_pnl.GetView((int) (2)).setVisible(__c.True);
RDebugUtils.currentLine=20512800;
 //BA.debugLineNum = 20512800;BA.debugLine="Log(\"ponemos en 0\")";
__c.LogImpl("520512800","ponemos en 0",0);
 };
RDebugUtils.currentLine=20512802;
 //BA.debugLineNum = 20512802;BA.debugLine="Log(\"--------------->Credito Disponible: \"&B4XPa";
__c.LogImpl("520512802","--------------->Credito Disponible: "+_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*SHARK2.keymon.com.mx.c_cliente*/ ._credito_diponible /*String*/ ,0);
RDebugUtils.currentLine=20512803;
 //BA.debugLineNum = 20512803;BA.debugLine="Dim fg As Cursor = Starter.skmt.ExecQuery(\"Selec";
_fg = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_fg = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select IFNULL(sum(PE_COSTO_TOT),0) AS COSTO FROM PEDIDO WHERE PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND PE_FOLIO = 'PREVENTA_CREDITO'")));
RDebugUtils.currentLine=20512804;
 //BA.debugLineNum = 20512804;BA.debugLine="fg.Position = 0";
_fg.setPosition((int) (0));
RDebugUtils.currentLine=20512805;
 //BA.debugLineNum = 20512805;BA.debugLine="If Old = \"\" Or Old = Null Then New = 0";
if ((_old).equals("") || _old== null) { 
_new = BA.NumberToString(0);};
RDebugUtils.currentLine=20512806;
 //BA.debugLineNum = 20512806;BA.debugLine="Log(preciocaja &\"     *    \"&Old)";
__c.LogImpl("520512806",_preciocaja+"     *    "+_old,0);
RDebugUtils.currentLine=20512807;
 //BA.debugLineNum = 20512807;BA.debugLine="Log((fg.GetString(\"COSTO\") + (preciocaja*New)) &";
__c.LogImpl("520512807",BA.NumberToString(((double)(Double.parseDouble(_fg.GetString("COSTO")))+((double)(Double.parseDouble(_preciocaja))*(double)(Double.parseDouble(_new)))))+" Monto Actual<-------",0);
RDebugUtils.currentLine=20512808;
 //BA.debugLineNum = 20512808;BA.debugLine="If fg.GetString(\"COSTO\") +((preciocaja*New))  >";
if ((double)(Double.parseDouble(_fg.GetString("COSTO")))+(((double)(Double.parseDouble(_preciocaja))*(double)(Double.parseDouble(_new))))>(double)(Double.parseDouble(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*SHARK2.keymon.com.mx.c_cliente*/ ._credito_diponible /*String*/ ))) { 
RDebugUtils.currentLine=20512809;
 //BA.debugLineNum = 20512809;BA.debugLine="laCant2.Text = 0";
_lacant2.setText(BA.ObjectToCharSequence(0));
RDebugUtils.currentLine=20512810;
 //BA.debugLineNum = 20512810;BA.debugLine="MsgboxAsync(\"No se puede meter mas venta a cred";
__c.MsgboxAsync(BA.ObjectToCharSequence("No se puede meter mas venta a credito por que supera el limite del credito"),BA.ObjectToCharSequence("Atencion"),ba);
 };
RDebugUtils.currentLine=20512813;
 //BA.debugLineNum = 20512813;BA.debugLine="Log(\"inventario total despues de max \"& invTotal";
__c.LogImpl("520512813","inventario total despues de max "+BA.NumberToString(__ref._invtotal /*int*/ ),0);
RDebugUtils.currentLine=20512814;
 //BA.debugLineNum = 20512814;BA.debugLine="If New = \"\" Then New = 0";
if ((_new).equals("")) { 
_new = BA.NumberToString(0);};
RDebugUtils.currentLine=20512815;
 //BA.debugLineNum = 20512815;BA.debugLine="If laCant2.Text = \"\" Then laCant2.Text = 0";
if ((_lacant2.getText()).equals("")) { 
_lacant2.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=20512817;
 //BA.debugLineNum = 20512817;BA.debugLine="If New > 0 Then";
if ((double)(Double.parseDouble(_new))>0) { 
RDebugUtils.currentLine=20512818;
 //BA.debugLineNum = 20512818;BA.debugLine="Log(\"lo ocultamos\")";
__c.LogImpl("520512818","lo ocultamos",0);
RDebugUtils.currentLine=20512819;
 //BA.debugLineNum = 20512819;BA.debugLine="panelpiezas.Visible = False";
_panelpiezas.setVisible(__c.False);
 }else 
{RDebugUtils.currentLine=20512820;
 //BA.debugLineNum = 20512820;BA.debugLine="Else If New = 0 Then";
if ((_new).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=20512821;
 //BA.debugLineNum = 20512821;BA.debugLine="panelpiezas.Visible = True";
_panelpiezas.setVisible(__c.True);
 }}
;
RDebugUtils.currentLine=20512828;
 //BA.debugLineNum = 20512828;BA.debugLine="Log(\"InvTotal: \" & invTotal)";
__c.LogImpl("520512828","InvTotal: "+BA.NumberToString(__ref._invtotal /*int*/ ),0);
RDebugUtils.currentLine=20512829;
 //BA.debugLineNum = 20512829;BA.debugLine="If Not(Old = \"0\" And New = \"\") And laCant2.Text";
if (__c.Not((_old).equals("0") && (_new).equals("")) && _lacant2.getText()!= null && (_lacant2.getText()).equals("") == false && __ref._etcanthasfocus /*boolean*/ ) { 
RDebugUtils.currentLine=20512830;
 //BA.debugLineNum = 20512830;BA.debugLine="If invTotal - (laCant2.Text * conversion) >= 0";
if (__ref._invtotal /*int*/ -((double)(Double.parseDouble(_lacant2.getText()))*(double)(Double.parseDouble(_conversion)))>=0) { 
RDebugUtils.currentLine=20512831;
 //BA.debugLineNum = 20512831;BA.debugLine="LogColor(\"validacion inventariio \" & (invTotal";
__c.LogImpl("520512831","validacion inventariio "+BA.NumberToString((__ref._invtotal /*int*/ -((double)(Double.parseDouble(_lacant2.getText()))*(double)(Double.parseDouble(_conversion))))),__c.Colors.Blue);
RDebugUtils.currentLine=20512832;
 //BA.debugLineNum = 20512832;BA.debugLine="Log(\"actualizamos producto\")";
__c.LogImpl("520512832","actualizamos producto",0);
RDebugUtils.currentLine=20512833;
 //BA.debugLineNum = 20512833;BA.debugLine="Subs.actualizaProducto2(Subs.traeAlmacen,  pre";
_subs._actualizaproducto2 /*String*/ (ba,_subs._traealmacen /*String*/ (ba),_preciocaja,(int) (((double)(Double.parseDouble(_lacant2.getText()))*(double)(Double.parseDouble(_conversion)))),_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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,_lacant2.getText(),BA.NumberToString(1));
RDebugUtils.currentLine=20512834;
 //BA.debugLineNum = 20512834;BA.debugLine="cuentaProds";
__ref._cuentaprods /*String*/ (null);
 }else {
RDebugUtils.currentLine=20512836;
 //BA.debugLineNum = 20512836;BA.debugLine="Private totalcajaspermi As Int = invTotal / co";
_totalcajaspermi = (int) (__ref._invtotal /*int*/ /(double)(double)(Double.parseDouble(_conversion)));
RDebugUtils.currentLine=20512837;
 //BA.debugLineNum = 20512837;BA.debugLine="laCant2.Text = totalcajaspermi";
_lacant2.setText(BA.ObjectToCharSequence(_totalcajaspermi));
RDebugUtils.currentLine=20512838;
 //BA.debugLineNum = 20512838;BA.debugLine="Log(\"cajas permitidas total por guerra \"& tota";
__c.LogImpl("520512838","cajas permitidas total por guerra "+BA.NumberToString(_totalcajaspermi),0);
 };
 };
RDebugUtils.currentLine=20512841;
 //BA.debugLineNum = 20512841;BA.debugLine="LogColor(\"la cant2 \" & laCant2.Text,Colors.Green";
__c.LogImpl("520512841","la cant2 "+_lacant2.getText(),__c.Colors.Green);
RDebugUtils.currentLine=20512851;
 //BA.debugLineNum = 20512851;BA.debugLine="If 1 = 1 Then";
if (1==1) { 
RDebugUtils.currentLine=20512852;
 //BA.debugLineNum = 20512852;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=20512853;
 //BA.debugLineNum = 20512853;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=20512854;
 //BA.debugLineNum = 20512854;BA.debugLine="Private o As Cursor = Starter.skmt.ExecQuery($\"";
_o = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_o = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select CAT_GP_ALMACEN from "+__c.SmartStringFormatter("",(Object)(_starter._tabla /*String*/ ))+" where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_id))+"'"))));
RDebugUtils.currentLine=20512855;
 //BA.debugLineNum = 20512855;BA.debugLine="Private invActualizado As String = \"0\"";
_invactualizado = "0";
RDebugUtils.currentLine=20512857;
 //BA.debugLineNum = 20512857;BA.debugLine="o.Position = 0";
_o.setPosition((int) (0));
RDebugUtils.currentLine=20512858;
 //BA.debugLineNum = 20512858;BA.debugLine="invActualizado = Subs.traeinventario(id)";
_invactualizado = _subs._traeinventario /*String*/ (ba,_id);
RDebugUtils.currentLine=20512859;
 //BA.debugLineNum = 20512859;BA.debugLine="Log(Subs.traeinventario(id))";
__c.LogImpl("520512859",_subs._traeinventario /*String*/ (ba,_id),0);
RDebugUtils.currentLine=20512861;
 //BA.debugLineNum = 20512861;BA.debugLine="If New = \"\" Then New = 0";
if ((_new).equals("")) { 
_new = BA.NumberToString(0);};
RDebugUtils.currentLine=20512862;
 //BA.debugLineNum = 20512862;BA.debugLine="Log(clv_prods_ll.GetValue(index).As(Map).Get(\"p";
__c.LogImpl("520512862",BA.NumberToString(((float)(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(_index)))).Get((Object)("precio_caja"))))))+" Precio caja",0);
RDebugUtils.currentLine=20512863;
 //BA.debugLineNum = 20512863;BA.debugLine="Log(clv_prods_ll.GetValue(index).As(Map).Get(\"c";
__c.LogImpl("520512863",BA.NumberToString(((int)(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(_index)))).Get((Object)("conversion"))))))+" Conversion",0);
RDebugUtils.currentLine=20512864;
 //BA.debugLineNum = 20512864;BA.debugLine="If clv_prods_ll.GetValue(index).As(Map).Get(\"pr";
if (((float)(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(_index)))).Get((Object)("precio_caja")))))==0 || ((int)(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(_index)))).Get((Object)("conversion")))))==1) { 
RDebugUtils.currentLine=20512865;
 //BA.debugLineNum = 20512865;BA.debugLine="Private maxcajas2 As Int = 0";
_maxcajas2 = (int) (0);
RDebugUtils.currentLine=20512866;
 //BA.debugLineNum = 20512866;BA.debugLine="Log(\"cajas a 0\")";
__c.LogImpl("520512866","cajas a 0",0);
 }else {
RDebugUtils.currentLine=20512868;
 //BA.debugLineNum = 20512868;BA.debugLine="Private maxcajas2 As Int = invActualizado/clv_";
_maxcajas2 = (int) ((double)(Double.parseDouble(_invactualizado))/(double)(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(_index)))).Get((Object)("conversion")))));
RDebugUtils.currentLine=20512869;
 //BA.debugLineNum = 20512869;BA.debugLine="Log(\"cajas no a 0\")";
__c.LogImpl("520512869","cajas no a 0",0);
 };
RDebugUtils.currentLine=20512871;
 //BA.debugLineNum = 20512871;BA.debugLine="lProdX.Text = cs.Color(Colors.red).append(nombr";
_lprodx.setText(BA.ObjectToCharSequence(_cs.Color(__c.Colors.Red).Append(BA.ObjectToCharSequence(_nombrex)).Pop().Append(BA.ObjectToCharSequence(__c.CRLF)).Append(BA.ObjectToCharSequence("Existencias: "+(_subs._traeinventario /*String*/ (ba,_id)))).Color(((int)0xff017f01)).Append(BA.ObjectToCharSequence(("   $"+__c.SmartStringFormatter("",(Object)(__c.NumberFormat2((double)(Double.parseDouble(_precio)),(int) (1),(int) (2),(int) (2),__c.False)))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Max. Cajas: "+__c.SmartStringFormatter("",(Object)(_maxcajas2))+""))).PopAll().getObject()));
 };
 };
RDebugUtils.currentLine=20512874;
 //BA.debugLineNum = 20512874;BA.debugLine="End Sub";
return "";
}
public String  _l_info_click(SHARK2.keymon.com.mx.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=19333120;
 //BA.debugLineNum = 19333120;BA.debugLine="Private Sub l_info_Click";
RDebugUtils.currentLine=19333121;
 //BA.debugLineNum = 19333121;BA.debugLine="l_info.Visible = False";
__ref._l_info /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=19333122;
 //BA.debugLineNum = 19333122;BA.debugLine="End Sub";
return "";
}
public String  _l_prodx_click(SHARK2.keymon.com.mx.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=19988480;
 //BA.debugLineNum = 19988480;BA.debugLine="Sub l_prodx_click";
RDebugUtils.currentLine=19988481;
 //BA.debugLineNum = 19988481;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=19988482;
 //BA.debugLineNum = 19988482;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=19988483;
 //BA.debugLineNum = 19988483;BA.debugLine="Private p As B4XView = p0.GetView(0)";
_p = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p = _p0.GetView((int) (0));
RDebugUtils.currentLine=19988484;
 //BA.debugLineNum = 19988484;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=19988485;
 //BA.debugLineNum = 19988485;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=19988487;
 //BA.debugLineNum = 19988487;BA.debugLine="Log(cant1.Text)";
__c.LogImpl("519988487",_cant1.getText(),0);
RDebugUtils.currentLine=19988488;
 //BA.debugLineNum = 19988488;BA.debugLine="End Sub";
return "";
}
public String  _l_prodx_longclick(SHARK2.keymon.com.mx.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=19267584;
 //BA.debugLineNum = 19267584;BA.debugLine="Private Sub l_prodX_LongClick";
RDebugUtils.currentLine=19267585;
 //BA.debugLineNum = 19267585;BA.debugLine="Log(\"longclic = \"&Sender.as(Label).tag)";
__c.LogImpl("519267585","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=19267586;
 //BA.debugLineNum = 19267586;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=19267587;
 //BA.debugLineNum = 19267587;BA.debugLine="l_info.Visible = True";
__ref._l_info /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=19267588;
 //BA.debugLineNum = 19267588;BA.debugLine="End Sub";
return "";
}
public String  _llenacatalogo(SHARK2.keymon.com.mx.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=18481152;
 //BA.debugLineNum = 18481152;BA.debugLine="Sub llenaCatalogo(subtipo1 As String)";
RDebugUtils.currentLine=18481175;
 //BA.debugLineNum = 18481175;BA.debugLine="End Sub";
return "";
}
public String  _lv_catalogos_itemclick(SHARK2.keymon.com.mx.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=18284544;
 //BA.debugLineNum = 18284544;BA.debugLine="Sub lv_catalogos_ItemClick (Position As Int, Value";
RDebugUtils.currentLine=18284545;
 //BA.debugLineNum = 18284545;BA.debugLine="If Value = \"CATALOGO\" Then";
if ((_value).equals((Object)("CATALOGO"))) { 
RDebugUtils.currentLine=18284556;
 //BA.debugLineNum = 18284556;BA.debugLine="lv_catalogos.Visible = False";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=18284557;
 //BA.debugLineNum = 18284557;BA.debugLine="lfila.text = \"PRODUCTOS\"";
__ref._lfila /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("PRODUCTOS"));
RDebugUtils.currentLine=18284560;
 //BA.debugLineNum = 18284560;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=18284563;
 //BA.debugLineNum = 18284563;BA.debugLine="clv_prods_ll.AsView.Visible = True";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(__c.True);
RDebugUtils.currentLine=18284564;
 //BA.debugLineNum = 18284564;BA.debugLine="clv_prods_ll.AsView.BringToFront";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().BringToFront();
 }else {
RDebugUtils.currentLine=18284567;
 //BA.debugLineNum = 18284567;BA.debugLine="clv_prods_ll.AsView.Visible = False";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(__c.False);
RDebugUtils.currentLine=18284568;
 //BA.debugLineNum = 18284568;BA.debugLine="lv_promos.Visible = True";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=18284569;
 //BA.debugLineNum = 18284569;BA.debugLine="lfila.text = \"PROMOCIONES\"";
__ref._lfila /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("PROMOCIONES"));
RDebugUtils.currentLine=18284570;
 //BA.debugLineNum = 18284570;BA.debugLine="lv_catalogos.Visible = False";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=18284571;
 //BA.debugLineNum = 18284571;BA.debugLine="lv_promos.Clear";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=18284572;
 //BA.debugLineNum = 18284572;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=18284573;
 //BA.debugLineNum = 18284573;BA.debugLine="label1 = lv_promos.TwoLinesLayout.Label";
_label1 = __ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=18284574;
 //BA.debugLineNum = 18284574;BA.debugLine="label1.TextSize = 12";
_label1.setTextSize((float) (12));
RDebugUtils.currentLine=18284575;
 //BA.debugLineNum = 18284575;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=18284576;
 //BA.debugLineNum = 18284576;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=18284577;
 //BA.debugLineNum = 18284577;BA.debugLine="label2 = lv_promos.TwoLinesLayout.SecondLabel";
_label2 = __ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=18284578;
 //BA.debugLineNum = 18284578;BA.debugLine="label2.TextSize = 12";
_label2.setTextSize((float) (12));
RDebugUtils.currentLine=18284579;
 //BA.debugLineNum = 18284579;BA.debugLine="label2.TextColor = Colors.Black";
_label2.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=18284580;
 //BA.debugLineNum = 18284580;BA.debugLine="Dim label13 As Label";
_label13 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=18284581;
 //BA.debugLineNum = 18284581;BA.debugLine="label13 = lv_promos.TwoLinesAndBitmap.Label";
_label13 = __ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesAndBitmap().Label;
RDebugUtils.currentLine=18284582;
 //BA.debugLineNum = 18284582;BA.debugLine="label13.TextSize = 12";
_label13.setTextSize((float) (12));
RDebugUtils.currentLine=18284583;
 //BA.debugLineNum = 18284583;BA.debugLine="label13.TextColor = Colors.Black";
_label13.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=18284584;
 //BA.debugLineNum = 18284584;BA.debugLine="Dim label14 As Label";
_label14 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=18284585;
 //BA.debugLineNum = 18284585;BA.debugLine="label14 = lv_promos.TwoLinesAndBitmap.SecondLabe";
_label14 = __ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesAndBitmap().SecondLabel;
RDebugUtils.currentLine=18284586;
 //BA.debugLineNum = 18284586;BA.debugLine="label14.TextSize = 12";
_label14.setTextSize((float) (12));
RDebugUtils.currentLine=18284587;
 //BA.debugLineNum = 18284587;BA.debugLine="label14.TextColor = Colors.Black";
_label14.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=18284588;
 //BA.debugLineNum = 18284588;BA.debugLine="lfila.text = \"PROMOS\"";
__ref._lfila /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("PROMOS"));
RDebugUtils.currentLine=18284590;
 //BA.debugLineNum = 18284590;BA.debugLine="c2=B4XPages.MainPage.skmt.ExecQuery2($\"select  C";
__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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2(("select  CAT_GP_ID, CAT_GP_NOMBRE, CAT_GP_PRECIO1, CAT_GP_ALMACEN, CAT_GP_IMG from "+__c.SmartStringFormatter("",(Object)(_starter._tabla /*String*/ ))+" where CAT_GP_PRECIO1 > 0 AND  CAT_GP_ALMACEN > 0 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)})));
RDebugUtils.currentLine=18284592;
 //BA.debugLineNum = 18284592;BA.debugLine="If c2.RowCount > 0 Then";
if (__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=18284593;
 //BA.debugLineNum = 18284593;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=18284594;
 //BA.debugLineNum = 18284594;BA.debugLine="c2.Position = i";
__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=18284595;
 //BA.debugLineNum = 18284595;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=18284597;
 //BA.debugLineNum = 18284597;BA.debugLine="If tm <> Null Then";
if (_tm!= null) { 
RDebugUtils.currentLine=18284598;
 //BA.debugLineNum = 18284598;BA.debugLine="If tm.Get(\"status\") = \"ok\" Then";
if ((_tm.Get((Object)("status"))).equals((Object)("ok"))) { 
RDebugUtils.currentLine=18284599;
 //BA.debugLineNum = 18284599;BA.debugLine="lv_promos.AddTwoLines(c2.GetString(\"CAT_GP_N";
__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_PRECIO1")+" 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=18284602;
 //BA.debugLineNum = 18284602;BA.debugLine="Log(\"El Map devuelto por procesaPromocion es";
__c.LogImpl("518284602","El Map devuelto por procesaPromocion es null para el producto: "+__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_NOMBRE"),0);
 };
 }
};
 }else {
RDebugUtils.currentLine=18284606;
 //BA.debugLineNum = 18284606;BA.debugLine="ToastMessageShow(\"No hay promociones disponible";
__c.ToastMessageShow(BA.ObjectToCharSequence("No hay promociones disponibles."),__c.False);
 };
RDebugUtils.currentLine=18284608;
 //BA.debugLineNum = 18284608;BA.debugLine="c2.Close";
__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=18284609;
 //BA.debugLineNum = 18284609;BA.debugLine="entro = \"4\"";
__ref._entro /*String*/  = "4";
 };
RDebugUtils.currentLine=18284611;
 //BA.debugLineNum = 18284611;BA.debugLine="End Sub";
return "";
}
public void  _lv_catalogos2_itemclick(SHARK2.keymon.com.mx.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(SHARK2.keymon.com.mx.c_productos parent,SHARK2.keymon.com.mx.c_productos __ref,int _position,Object _value) {
this.parent = parent;
this.__ref = __ref;
this._position = _position;
this._value = _value;
this.__ref = parent;
}
SHARK2.keymon.com.mx.c_productos __ref;
SHARK2.keymon.com.mx.c_productos parent;
int _position;
Object _value;
SHARK2.keymon.com.mx.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=18350081;
 //BA.debugLineNum = 18350081;BA.debugLine="clv_prods_ll.AsView.Visible = False";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(parent.__c.False);
RDebugUtils.currentLine=18350082;
 //BA.debugLineNum = 18350082;BA.debugLine="BUSCA.Text = \"\"";
__ref._busca /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=18350083;
 //BA.debugLineNum = 18350083;BA.debugLine="Dim cliente As C_Cliente = B4XPages.GetPage(\"Clie";
_cliente = (SHARK2.keymon.com.mx.c_cliente)(parent._b4xpages._getpage /*Object*/ (ba,"Cliente"));
RDebugUtils.currentLine=18350084;
 //BA.debugLineNum = 18350084;BA.debugLine="Log($\"value=${Value}\"$)";
parent.__c.LogImpl("518350084",("value="+parent.__c.SmartStringFormatter("",_value)+""),0);
RDebugUtils.currentLine=18350085;
 //BA.debugLineNum = 18350085;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=18350089;
 //BA.debugLineNum = 18350089;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=18350086;
 //BA.debugLineNum = 18350086;BA.debugLine="entro = \"3\"";
__ref._entro /*String*/  = "3";
RDebugUtils.currentLine=18350087;
 //BA.debugLineNum = 18350087;BA.debugLine="marca = \"PROMOS\"";
__ref._marca /*String*/  = "PROMOS";
RDebugUtils.currentLine=18350088;
 //BA.debugLineNum = 18350088;BA.debugLine="tipo = \"PROMOS\"";
__ref._tipo /*String*/  = "PROMOS";
 if (true) break;

case 5:
//C
this.state = 6;
RDebugUtils.currentLine=18350090;
 //BA.debugLineNum = 18350090;BA.debugLine="entro = \"5\"";
__ref._entro /*String*/  = "5";
RDebugUtils.currentLine=18350091;
 //BA.debugLineNum = 18350091;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
parent._b4xpages._showpage /*String*/ (ba,"Cliente");
 if (true) break;
;
RDebugUtils.currentLine=18350093;
 //BA.debugLineNum = 18350093;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=18350094;
 //BA.debugLineNum = 18350094;BA.debugLine="LogColor(\"Promos\", Colors.red)";
parent.__c.LogImpl("518350094","Promos",parent.__c.Colors.Red);
RDebugUtils.currentLine=18350095;
 //BA.debugLineNum = 18350095;BA.debugLine="c2=B4XPages.MainPage.skmt.ExecQuery2($\"select  C";
__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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2(("select  CAT_GP_ID, CAT_GP_NOMBRE, CAT_GP_PRECIO1, CAT_GP_ALMACEN, CAT_GP_IMG from "+parent.__c.SmartStringFormatter("",(Object)(parent._starter._tabla /*String*/ ))+" where CAT_GP_PRECIO1 > 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) ) ORDER BY 1"),new String[]{BA.ObjectToString(_value),__ref._marca /*String*/ ,__ref._tipo /*String*/ })));
 if (true) break;

case 10:
//C
this.state = 11;
RDebugUtils.currentLine=18350097;
 //BA.debugLineNum = 18350097;BA.debugLine="LogColor(\"Catalogo\", Colors.red)";
parent.__c.LogImpl("518350097","Catalogo",parent.__c.Colors.Red);
RDebugUtils.currentLine=18350098;
 //BA.debugLineNum = 18350098;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select CAT_GP_ID, CAT_GP_NOMBRE, CAT_GP_PRECIO1, CAT_GP_ALMACEN, CAT_GP_IMG, CAT_GP_TIPOPROD, CAT_GP_INICIATIVA from "+parent.__c.SmartStringFormatter("",(Object)(parent._starter._tabla /*String*/ ))+" where CAT_GP_PRECIO1 > 0 AND CAT_GP_ALMACEN > 0 and CAT_GP_TIPOPROD <> 'PROMOS' "))));
 if (true) break;
;
RDebugUtils.currentLine=18350100;
 //BA.debugLineNum = 18350100;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=18350101;
 //BA.debugLineNum = 18350101;BA.debugLine="lv_catalogos.Visible = False";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=18350102;
 //BA.debugLineNum = 18350102;BA.debugLine="lv_promos.Visible = False";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=18350103;
 //BA.debugLineNum = 18350103;BA.debugLine="lfila.text = \"CATALOGO\"";
__ref._lfila /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("CATALOGO"));
RDebugUtils.currentLine=18350104;
 //BA.debugLineNum = 18350104;BA.debugLine="Log(\"PGS\")";
parent.__c.LogImpl("518350104","PGS",0);
RDebugUtils.currentLine=18350105;
 //BA.debugLineNum = 18350105;BA.debugLine="ProgressDialogShow(\"Cargando catalogo ...\")";
parent.__c.ProgressDialogShow(ba,BA.ObjectToCharSequence("Cargando catalogo ..."));
RDebugUtils.currentLine=18350106;
 //BA.debugLineNum = 18350106;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=18350107;
 //BA.debugLineNum = 18350107;BA.debugLine="Private inicioContador As String = DateTime.Now";
_iniciocontador = BA.NumberToString(parent.__c.DateTime.getNow());
RDebugUtils.currentLine=18350108;
 //BA.debugLineNum = 18350108;BA.debugLine="llenaCatalogo(False)";
__ref._llenacatalogo /*String*/ (null,BA.ObjectToString(parent.__c.False));
RDebugUtils.currentLine=18350109;
 //BA.debugLineNum = 18350109;BA.debugLine="clv_prods_ll.AsView.Visible = True";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(parent.__c.True);
RDebugUtils.currentLine=18350110;
 //BA.debugLineNum = 18350110;BA.debugLine="Log(\"PGH\")";
parent.__c.LogImpl("518350110","PGH",0);
RDebugUtils.currentLine=18350111;
 //BA.debugLineNum = 18350111;BA.debugLine="LogColor(\"TIEMPO DE PROCESO DEL CATALOGO: \" & ((";
parent.__c.LogImpl("518350111","TIEMPO DE PROCESO DEL CATALOGO: "+BA.NumberToString(((parent.__c.DateTime.getNow()-(double)(Double.parseDouble(_iniciocontador)))/(double)1000)),parent.__c.Colors.Red);
RDebugUtils.currentLine=18350112;
 //BA.debugLineNum = 18350112;BA.debugLine="ProgressDialogHide";
parent.__c.ProgressDialogHide();
RDebugUtils.currentLine=18350113;
 //BA.debugLineNum = 18350113;BA.debugLine="c2.Close";
__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 if (true) break;

case 15:
//C
this.state = 16;
RDebugUtils.currentLine=18350115;
 //BA.debugLineNum = 18350115;BA.debugLine="clv_prods_ll.AsView.Visible = False";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(parent.__c.False);
RDebugUtils.currentLine=18350116;
 //BA.debugLineNum = 18350116;BA.debugLine="lv_promos.Visible = True";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.True);
RDebugUtils.currentLine=18350117;
 //BA.debugLineNum = 18350117;BA.debugLine="lv_catalogos.Visible = False";
__ref._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=18350118;
 //BA.debugLineNum = 18350118;BA.debugLine="lv_promos.Clear";
__ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=18350119;
 //BA.debugLineNum = 18350119;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=18350120;
 //BA.debugLineNum = 18350120;BA.debugLine="label1 = lv_promos.TwoLinesLayout.Label";
_label1 = __ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=18350121;
 //BA.debugLineNum = 18350121;BA.debugLine="label1.TextSize = 15";
_label1.setTextSize((float) (15));
RDebugUtils.currentLine=18350122;
 //BA.debugLineNum = 18350122;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(parent.__c.Colors.Black);
RDebugUtils.currentLine=18350123;
 //BA.debugLineNum = 18350123;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=18350124;
 //BA.debugLineNum = 18350124;BA.debugLine="label2 = lv_promos.TwoLinesLayout.SecondLabel";
_label2 = __ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=18350125;
 //BA.debugLineNum = 18350125;BA.debugLine="label2.TextSize = 15";
_label2.setTextSize((float) (15));
RDebugUtils.currentLine=18350126;
 //BA.debugLineNum = 18350126;BA.debugLine="label2.TextColor = Colors.Black";
_label2.setTextColor(parent.__c.Colors.Black);
RDebugUtils.currentLine=18350127;
 //BA.debugLineNum = 18350127;BA.debugLine="Dim label13 As Label";
_label13 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=18350128;
 //BA.debugLineNum = 18350128;BA.debugLine="label13 = lv_promos.TwoLinesAndBitmap.Label";
_label13 = __ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesAndBitmap().Label;
RDebugUtils.currentLine=18350129;
 //BA.debugLineNum = 18350129;BA.debugLine="label13.TextSize = 15";
_label13.setTextSize((float) (15));
RDebugUtils.currentLine=18350130;
 //BA.debugLineNum = 18350130;BA.debugLine="label13.TextColor = Colors.Black";
_label13.setTextColor(parent.__c.Colors.Black);
RDebugUtils.currentLine=18350131;
 //BA.debugLineNum = 18350131;BA.debugLine="Dim label14 As Label";
_label14 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=18350132;
 //BA.debugLineNum = 18350132;BA.debugLine="label14 = lv_promos.TwoLinesAndBitmap.SecondLabe";
_label14 = __ref._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesAndBitmap().SecondLabel;
RDebugUtils.currentLine=18350133;
 //BA.debugLineNum = 18350133;BA.debugLine="label14.TextSize = 15";
_label14.setTextSize((float) (15));
RDebugUtils.currentLine=18350134;
 //BA.debugLineNum = 18350134;BA.debugLine="label14.TextColor = Colors.Black";
_label14.setTextColor(parent.__c.Colors.Black);
RDebugUtils.currentLine=18350135;
 //BA.debugLineNum = 18350135;BA.debugLine="lfila.text = \"PROMOS\"";
__ref._lfila /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("PROMOS"));
RDebugUtils.currentLine=18350136;
 //BA.debugLineNum = 18350136;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=18350137;
 //BA.debugLineNum = 18350137;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=18350138;
 //BA.debugLineNum = 18350138;BA.debugLine="c2.Position=i";
__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=18350139;
 //BA.debugLineNum = 18350139;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=18350140;
 //BA.debugLineNum = 18350140;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=18350141;
 //BA.debugLineNum = 18350141;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=18350145;
 //BA.debugLineNum = 18350145;BA.debugLine="c2.Close";
__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 if (true) break;

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

            }
        }
    }
}
public String  _lv_prodspedido_itemlongclick(SHARK2.keymon.com.mx.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}));}
anywheresoftware.b4a.objects.collections.Map _datos = null;
String _idprod = "";
String _nom = "";
String _presname = "";
int _uvmval = 0;
String _cedis = "";
String _dirtarget = "";
String _folioactual = "";
int _cantregresar = 0;
String _tablainventario = "";
int _j = 0;
String _qdelete = "";
RDebugUtils.currentLine=19791872;
 //BA.debugLineNum = 19791872;BA.debugLine="Private Sub lv_prodsPedido_ItemLongClick (Position";
RDebugUtils.currentLine=19791874;
 //BA.debugLineNum = 19791874;BA.debugLine="If Not(Value Is Map) Then";
if (__c.Not(_value instanceof java.util.Map)) { 
RDebugUtils.currentLine=19791875;
 //BA.debugLineNum = 19791875;BA.debugLine="Log(\"Error: El valor recibido no es un Mapa de d";
__c.LogImpl("519791875","Error: El valor recibido no es un Mapa de datos.",0);
RDebugUtils.currentLine=19791876;
 //BA.debugLineNum = 19791876;BA.debugLine="Return";
if (true) return "";
 };
RDebugUtils.currentLine=19791880;
 //BA.debugLineNum = 19791880;BA.debugLine="Dim datos As Map = Value";
_datos = new anywheresoftware.b4a.objects.collections.Map();
_datos = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(_value));
RDebugUtils.currentLine=19791881;
 //BA.debugLineNum = 19791881;BA.debugLine="Dim idProd As String = datos.Get(\"id\")";
_idprod = BA.ObjectToString(_datos.Get((Object)("id")));
RDebugUtils.currentLine=19791882;
 //BA.debugLineNum = 19791882;BA.debugLine="Dim nom As String = datos.Get(\"nombre\")";
_nom = BA.ObjectToString(_datos.Get((Object)("nombre")));
RDebugUtils.currentLine=19791883;
 //BA.debugLineNum = 19791883;BA.debugLine="Dim presName As String = datos.Get(\"pres\")";
_presname = BA.ObjectToString(_datos.Get((Object)("pres")));
RDebugUtils.currentLine=19791884;
 //BA.debugLineNum = 19791884;BA.debugLine="Dim uvmVal As Int = datos.Get(\"uvm\")";
_uvmval = (int)(BA.ObjectToNumber(_datos.Get((Object)("uvm"))));
RDebugUtils.currentLine=19791885;
 //BA.debugLineNum = 19791885;BA.debugLine="Dim cedis As String = datos.Get(\"cedis\")";
_cedis = BA.ObjectToString(_datos.Get((Object)("cedis")));
RDebugUtils.currentLine=19791886;
 //BA.debugLineNum = 19791886;BA.debugLine="Dim dirTarget As String = datos.Get(\"dir\")";
_dirtarget = BA.ObjectToString(_datos.Get((Object)("dir")));
RDebugUtils.currentLine=19791887;
 //BA.debugLineNum = 19791887;BA.debugLine="Dim folioActual As String = datos.Get(\"folio\")";
_folioactual = BA.ObjectToString(_datos.Get((Object)("folio")));
RDebugUtils.currentLine=19791888;
 //BA.debugLineNum = 19791888;BA.debugLine="Dim cantRegresar As Int = datos.Get(\"cant\")";
_cantregresar = (int)(BA.ObjectToNumber(_datos.Get((Object)("cant"))));
RDebugUtils.currentLine=19791889;
 //BA.debugLineNum = 19791889;BA.debugLine="Log(cedis)";
__c.LogImpl("519791889",_cedis,0);
RDebugUtils.currentLine=19791890;
 //BA.debugLineNum = 19791890;BA.debugLine="Log(folioActual)";
__c.LogImpl("519791890",_folioactual,0);
RDebugUtils.currentLine=19791892;
 //BA.debugLineNum = 19791892;BA.debugLine="Log(\"Intentando borrar -> ID: \" & idProd & \" | No";
__c.LogImpl("519791892","Intentando borrar -> ID: "+_idprod+" | Nombre: "+_nom+" | Almacen: "+_cedis,0);
RDebugUtils.currentLine=19791894;
 //BA.debugLineNum = 19791894;BA.debugLine="result = Msgbox2(\"¿Seguro que desea borrar \" & no";
__ref._result /*String*/  = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("¿Seguro que desea borrar "+_nom+" ("+_presname+")?"),BA.ObjectToCharSequence("Borrar Artículo"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
RDebugUtils.currentLine=19791896;
 //BA.debugLineNum = 19791896;BA.debugLine="If result = DialogResponse.POSITIVE Then";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=19791898;
 //BA.debugLineNum = 19791898;BA.debugLine="Dim tablaInventario As String";
_tablainventario = "";
RDebugUtils.currentLine=19791900;
 //BA.debugLineNum = 19791900;BA.debugLine="If folioActual = \"PREVENTA_CONTADO\" Or folioActu";
if ((_folioactual).equals("PREVENTA_CONTADO") || (_folioactual).equals("ABORDO")) { 
RDebugUtils.currentLine=19791901;
 //BA.debugLineNum = 19791901;BA.debugLine="tablaInventario = \"CAT_GUNAPROD\"";
_tablainventario = "CAT_GUNAPROD";
RDebugUtils.currentLine=19791902;
 //BA.debugLineNum = 19791902;BA.debugLine="Log(\"1\")";
__c.LogImpl("519791902","1",0);
 }else 
{RDebugUtils.currentLine=19791903;
 //BA.debugLineNum = 19791903;BA.debugLine="Else If folioActual = \"VENTA\" Then";
if ((_folioactual).equals("VENTA")) { 
RDebugUtils.currentLine=19791904;
 //BA.debugLineNum = 19791904;BA.debugLine="tablaInventario = \"CAT_GUNAPROD2\"";
_tablainventario = "CAT_GUNAPROD2";
RDebugUtils.currentLine=19791905;
 //BA.debugLineNum = 19791905;BA.debugLine="Log(2)";
__c.LogImpl("519791905",BA.NumberToString(2),0);
 }else 
{RDebugUtils.currentLine=19791906;
 //BA.debugLineNum = 19791906;BA.debugLine="Else If folioActual = \"RECARGA\" Then";
if ((_folioactual).equals("RECARGA")) { 
RDebugUtils.currentLine=19791907;
 //BA.debugLineNum = 19791907;BA.debugLine="tablaInventario = \"CAT_GUNAPROD\"";
_tablainventario = "CAT_GUNAPROD";
RDebugUtils.currentLine=19791908;
 //BA.debugLineNum = 19791908;BA.debugLine="Log(3)";
__c.LogImpl("519791908",BA.NumberToString(3),0);
 }else 
{RDebugUtils.currentLine=19791909;
 //BA.debugLineNum = 19791909;BA.debugLine="Else If folioActual = \"PREVENTA_CREDITO\" Then";
if ((_folioactual).equals("PREVENTA_CREDITO")) { 
RDebugUtils.currentLine=19791910;
 //BA.debugLineNum = 19791910;BA.debugLine="tablaInventario = \"CAT_GUNAPROD4\"";
_tablainventario = "CAT_GUNAPROD4";
RDebugUtils.currentLine=19791911;
 //BA.debugLineNum = 19791911;BA.debugLine="Log(4)";
__c.LogImpl("519791911",BA.NumberToString(4),0);
 }}}}
;
RDebugUtils.currentLine=19791915;
 //BA.debugLineNum = 19791915;BA.debugLine="If cedis <> Subs.traeAlmacen Then";
if ((_cedis).equals(_subs._traealmacen /*String*/ (ba)) == false) { 
RDebugUtils.currentLine=19791916;
 //BA.debugLineNum = 19791916;BA.debugLine="Log(\"entre\")";
__c.LogImpl("519791916","entre",0);
RDebugUtils.currentLine=19791917;
 //BA.debugLineNum = 19791917;BA.debugLine="j3 = B4XPages.MainPage.skmt.ExecQuery2(\"SELECT";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT PE_CEDIS, PE_CANT,PE_PROID, PE_PRONOMBRE, PE_FOLIO FROM PEDIDO WHERE PE_CEDIS IN (SELECT PE_CEDIS FROM PEDIDO WHERE PE_PRONOMBRE = ? and PE_CEDIS = ?) AND PE_FOLIO = ?",new String[]{_nom,_cedis,_folioactual})));
RDebugUtils.currentLine=19791918;
 //BA.debugLineNum = 19791918;BA.debugLine="Log(j3.RowCount)";
__c.LogImpl("519791918",BA.NumberToString(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()),0);
RDebugUtils.currentLine=19791919;
 //BA.debugLineNum = 19791919;BA.debugLine="If j3.RowCount > 0 Then";
if (__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=19791920;
 //BA.debugLineNum = 19791920;BA.debugLine="Log(\"Soy promo\")";
__c.LogImpl("519791920","Soy promo",0);
RDebugUtils.currentLine=19791921;
 //BA.debugLineNum = 19791921;BA.debugLine="For j = 0 To j3.RowCount -1";
{
final int step39 = 1;
final int limit39 = (int) (__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_j = (int) (0) ;
for (;_j <= limit39 ;_j = _j + step39 ) {
RDebugUtils.currentLine=19791922;
 //BA.debugLineNum = 19791922;BA.debugLine="Log(\"aqui tronare?\")";
__c.LogImpl("519791922","aqui tronare?",0);
RDebugUtils.currentLine=19791924;
 //BA.debugLineNum = 19791924;BA.debugLine="j3.Position = j";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_j);
RDebugUtils.currentLine=19791925;
 //BA.debugLineNum = 19791925;BA.debugLine="Log(j3.GetString(\"PE_CANT\"))";
__c.LogImpl("519791925",__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT"),0);
RDebugUtils.currentLine=19791926;
 //BA.debugLineNum = 19791926;BA.debugLine="Log($\"update ${tablaInventario} set CAT_GP_AL";
__c.LogImpl("519791926",("update "+__c.SmartStringFormatter("",(Object)(_tablainventario))+" set CAT_GP_ALMACEN = CAT_GP_ALMACEN + '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))+"' where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"),0);
RDebugUtils.currentLine=19791927;
 //BA.debugLineNum = 19791927;BA.debugLine="If vamoaver.Get(Position) = \"PREVENTA_CREDITO";
if ((__ref._vamoaver /*anywheresoftware.b4a.objects.collections.List*/ .Get(_position)).equals((Object)("PREVENTA_CREDITO"))) { 
RDebugUtils.currentLine=19791928;
 //BA.debugLineNum = 19791928;BA.debugLine="Starter.skmt.ExecNonQuery($\"update CAT_GUNAP";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update CAT_GUNAPROD4 set CAT_GP_ALMACEN = CAT_GP_ALMACEN + "+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))+" where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
RDebugUtils.currentLine=19791929;
 //BA.debugLineNum = 19791929;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"delete";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from pedido where pe_cedis= '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_FOLIO")))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
 }else {
RDebugUtils.currentLine=19791931;
 //BA.debugLineNum = 19791931;BA.debugLine="Starter.skmt.ExecNonQuery($\"update ${tablaIn";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update "+__c.SmartStringFormatter("",(Object)(_tablainventario))+" set CAT_GP_ALMACEN = CAT_GP_ALMACEN + "+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))+" where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
RDebugUtils.currentLine=19791932;
 //BA.debugLineNum = 19791932;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"delete";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from pedido where pe_cedis= '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_FOLIO")))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
 };
 }
};
 };
RDebugUtils.currentLine=19791937;
 //BA.debugLineNum = 19791937;BA.debugLine="j3.Close";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=19791939;
 //BA.debugLineNum = 19791939;BA.debugLine="ActualizarTotalesPedido(clienteId)";
__ref._actualizartotalespedido /*String*/ (null,__ref._clienteid /*String*/ );
RDebugUtils.currentLine=19791940;
 //BA.debugLineNum = 19791940;BA.debugLine="b_terminar1_Click";
__ref._b_terminar1_click /*String*/ (null);
 }else {
RDebugUtils.currentLine=19791944;
 //BA.debugLineNum = 19791944;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"UPDATE ${";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("UPDATE "+__c.SmartStringFormatter("",(Object)(_tablainventario))+" SET CAT_GP_ALMACEN = CAT_GP_ALMACEN + "+__c.SmartStringFormatter("",(Object)(_cantregresar))+" WHERE CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_idprod))+"'"));
RDebugUtils.currentLine=19791947;
 //BA.debugLineNum = 19791947;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT IN";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.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)(_cedis),(Object)(_idprod),(Object)(_cantregresar*-1)}));
RDebugUtils.currentLine=19791951;
 //BA.debugLineNum = 19791951;BA.debugLine="Dim qDelete As String = \"DELETE FROM PEDIDO WHE";
_qdelete = "DELETE FROM PEDIDO WHERE PE_PROID = ? AND PE_PRESENTACION = ? "+"AND PE_UVM = ? AND PE_DIRIGIDA = ? AND PE_CEDIS = ? "+"AND PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND PE_FOLIO = ?";
RDebugUtils.currentLine=19791955;
 //BA.debugLineNum = 19791955;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(qDelete, A";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2(_qdelete,anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_idprod),(Object)(_presname),(Object)(_uvmval),(Object)(_dirtarget),(Object)(_cedis),(Object)(_folioactual)}));
RDebugUtils.currentLine=19791957;
 //BA.debugLineNum = 19791957;BA.debugLine="LogColor(\"Borrado exitoso de base de datos.\", C";
__c.LogImpl("519791957","Borrado exitoso de base de datos.",__c.Colors.Green);
RDebugUtils.currentLine=19791960;
 //BA.debugLineNum = 19791960;BA.debugLine="ActualizarTotalesPedido(clienteId)";
__ref._actualizartotalespedido /*String*/ (null,__ref._clienteid /*String*/ );
RDebugUtils.currentLine=19791961;
 //BA.debugLineNum = 19791961;BA.debugLine="b_terminar1_Click";
__ref._b_terminar1_click /*String*/ (null);
 };
 };
RDebugUtils.currentLine=19791966;
 //BA.debugLineNum = 19791966;BA.debugLine="End Sub";
return "";
}
public String  _lv_promos_itemclick(SHARK2.keymon.com.mx.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}));}
SHARK2.keymon.com.mx.c_cliente _cliente = null;
SHARK2.keymon.com.mx.c_promos _promos = null;
RDebugUtils.currentLine=18415616;
 //BA.debugLineNum = 18415616;BA.debugLine="Sub lv_promos_ItemClick (Position As Int, Value As";
RDebugUtils.currentLine=18415617;
 //BA.debugLineNum = 18415617;BA.debugLine="clv_prods_ll.AsView.Visible = False";
__ref._clv_prods_ll /*b4a.example3.customlistview*/ ._asview().setVisible(__c.False);
RDebugUtils.currentLine=18415618;
 //BA.debugLineNum = 18415618;BA.debugLine="Dim cliente As C_Cliente = B4XPages.GetPage(\"Clie";
_cliente = (SHARK2.keymon.com.mx.c_cliente)(_b4xpages._getpage /*Object*/ (ba,"Cliente"));
RDebugUtils.currentLine=18415620;
 //BA.debugLineNum = 18415620;BA.debugLine="If Value = \"PROMOS\" And cliente.cuenta <> \"N\" The";
if ((_value).equals((Object)("PROMOS")) && (_cliente._cuenta /*String*/ ).equals("N") == false) { 
RDebugUtils.currentLine=18415621;
 //BA.debugLineNum = 18415621;BA.debugLine="entro = \"3\"";
__ref._entro /*String*/  = "3";
RDebugUtils.currentLine=18415622;
 //BA.debugLineNum = 18415622;BA.debugLine="marca = \"PROMOS\"";
__ref._marca /*String*/  = "PROMOS";
RDebugUtils.currentLine=18415623;
 //BA.debugLineNum = 18415623;BA.debugLine="tipo = \"PROMOS\"";
__ref._tipo /*String*/  = "PROMOS";
 }else 
{RDebugUtils.currentLine=18415624;
 //BA.debugLineNum = 18415624;BA.debugLine="Else if Value = \"PROMOS\" And cliente.cuenta = \"N\"";
if ((_value).equals((Object)("PROMOS")) && (_cliente._cuenta /*String*/ ).equals("N")) { 
RDebugUtils.currentLine=18415625;
 //BA.debugLineNum = 18415625;BA.debugLine="entro = \"5\"";
__ref._entro /*String*/  = "5";
RDebugUtils.currentLine=18415626;
 //BA.debugLineNum = 18415626;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 }}
;
RDebugUtils.currentLine=18415628;
 //BA.debugLineNum = 18415628;BA.debugLine="If entro = \"3\" Then";
if ((__ref._entro /*String*/ ).equals("3")) { 
 }else 
{RDebugUtils.currentLine=18415630;
 //BA.debugLineNum = 18415630;BA.debugLine="Else If entro = \"4\" Then";
if ((__ref._entro /*String*/ ).equals("4")) { 
RDebugUtils.currentLine=18415632;
 //BA.debugLineNum = 18415632;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PROID");
RDebugUtils.currentLine=18415633;
 //BA.debugLineNum = 18415633;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PROID VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{_value}));
RDebugUtils.currentLine=18415634;
 //BA.debugLineNum = 18415634;BA.debugLine="Dim promos As C_Promos = B4XPages.GetPage(\"Promo";
_promos = (SHARK2.keymon.com.mx.c_promos)(_b4xpages._getpage /*Object*/ (ba,"Promos"));
RDebugUtils.currentLine=18415635;
 //BA.debugLineNum = 18415635;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=18415636;
 //BA.debugLineNum = 18415636;BA.debugLine="promos.elCliente = Subs.traeUsuarioDeBD";
_promos._elcliente /*String*/  = _subs._traeusuariodebd /*String*/ (ba);
RDebugUtils.currentLine=18415637;
 //BA.debugLineNum = 18415637;BA.debugLine="B4XPages.ShowPage(\"Promos\")";
_b4xpages._showpage /*String*/ (ba,"Promos");
 }}
;
RDebugUtils.currentLine=18415639;
 //BA.debugLineNum = 18415639;BA.debugLine="End Sub";
return "";
}
public String  _lv_promos_itemlongclick(SHARK2.keymon.com.mx.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=19398656;
 //BA.debugLineNum = 19398656;BA.debugLine="Private Sub lv_promos_ItemLongClick (Position As I";
RDebugUtils.currentLine=19398657;
 //BA.debugLineNum = 19398657;BA.debugLine="Log(\"Promo longclic = \"&Value)";
__c.LogImpl("519398657","Promo longclic = "+BA.ObjectToString(_value),0);
RDebugUtils.currentLine=19398658;
 //BA.debugLineNum = 19398658;BA.debugLine="Private id As String = \"\"";
_id = "";
RDebugUtils.currentLine=19398659;
 //BA.debugLineNum = 19398659;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select CAT_GP_ID from "+__c.SmartStringFormatter("",(Object)(_starter._tabla /*String*/ ))+" where CAT_GP_TIPO = 'PROMOS' and CAT_GP_NOMBRE = '"+__c.SmartStringFormatter("",_value)+"'"))));
RDebugUtils.currentLine=19398660;
 //BA.debugLineNum = 19398660;BA.debugLine="If c.RowCount > 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=19398661;
 //BA.debugLineNum = 19398661;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=19398662;
 //BA.debugLineNum = 19398662;BA.debugLine="id = c.GetString(\"CAT_GP_ID\")";
_id = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_ID");
 };
RDebugUtils.currentLine=19398664;
 //BA.debugLineNum = 19398664;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=19398665;
 //BA.debugLineNum = 19398665;BA.debugLine="l_info.Visible = True";
__ref._l_info /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=19398666;
 //BA.debugLineNum = 19398666;BA.debugLine="End Sub";
return "";
}
public String  _lv_subtipo_itemclick(SHARK2.keymon.com.mx.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=19529728;
 //BA.debugLineNum = 19529728;BA.debugLine="Private Sub lv_subtipo_ItemClick (Position As Int,";
RDebugUtils.currentLine=19529742;
 //BA.debugLineNum = 19529742;BA.debugLine="End Sub";
return "";
}
public String  _lv_tipo_itemclick(SHARK2.keymon.com.mx.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=19464192;
 //BA.debugLineNum = 19464192;BA.debugLine="Private Sub lv_tipo_ItemClick (Position As Int, Va";
RDebugUtils.currentLine=19464210;
 //BA.debugLineNum = 19464210;BA.debugLine="End Sub";
return "";
}
public String  _p_vistapreviatrans_click(SHARK2.keymon.com.mx.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=19595264;
 //BA.debugLineNum = 19595264;BA.debugLine="Private Sub p_vistaPreviaTrans_Click";
RDebugUtils.currentLine=19595266;
 //BA.debugLineNum = 19595266;BA.debugLine="End Sub";
return "";
}
public String  _pclv_addprods(SHARK2.keymon.com.mx.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=18219008;
 //BA.debugLineNum = 18219008;BA.debugLine="Sub PCLV_AddProds";
RDebugUtils.currentLine=18219010;
 //BA.debugLineNum = 18219010;BA.debugLine="End Sub";
return "";
}
public Object  _pclv_hintrequested(SHARK2.keymon.com.mx.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=20250624;
 //BA.debugLineNum = 20250624;BA.debugLine="Sub PCLV_HintRequested(Index As Int) As Object";
RDebugUtils.currentLine=20250625;
 //BA.debugLineNum = 20250625;BA.debugLine="Dim word As String = listaHints.get(Index)";
_word = BA.ObjectToString(__ref._listahints /*anywheresoftware.b4a.objects.collections.List*/ .Get(_index));
RDebugUtils.currentLine=20250626;
 //BA.debugLineNum = 20250626;BA.debugLine="Return word";
if (true) return (Object)(_word);
RDebugUtils.currentLine=20250627;
 //BA.debugLineNum = 20250627;BA.debugLine="End Sub";
return null;
}
}