package reparto_intmex.keymon.lat;


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

public class c_detalleventa 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, "reparto_intmex.keymon.lat.c_detalleventa");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", reparto_intmex.keymon.lat.c_detalleventa.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 
    public void  innerInitializeHelper(anywheresoftware.b4a.BA _ba) throws Exception{
        innerInitialize(_ba);
    }
    public Object callSub(String sub, Object sender, Object[] args) throws Exception {
        return BA.SubDelegator.SubNotFound;
    }
public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _root = null;
public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null;
public anywheresoftware.b4a.gps.GPS _g = null;
public String _clie_id = "";
public String _sdate = "";
public String _stime = "";
public String _usuario = "";
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_regresar = null;
public anywheresoftware.b4a.objects.ListViewWrapper _listview1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_cant = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_total = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_borra = null;
public String _existe = "";
public String _result = "";
public String _cuantos = "";
public String _nombre_prod = "";
public String _cuantos_pedido = "";
public anywheresoftware.b4a.objects.LabelWrapper _titulo = null;
public anywheresoftware.b4a.objects.PanelWrapper _p1 = null;
public anywheresoftware.b4a.objects.ListViewWrapper _lv2 = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_principal = null;
public b4a.example3.customlistview _clv_pedido = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_prods = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_prodx = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_pcant = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_pcant = null;
public anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _bmp = null;
public boolean _etcanthasfocus = false;
public int _totalprods = 0;
public int _totalcompra = 0;
public anywheresoftware.b4a.objects.collections.Map _prodsmap = null;
public boolean _reconstruirpedido = false;
public String _promoaborrar = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_guardar = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_prodmas = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_prodmenos = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_prodmenosc = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_pcantc = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_pcantc = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_prodmasc = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_botmasmenc = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_botmasmen = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_cajas = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_piezas = null;
public b4a.example.dateutils _dateutils = null;
public reparto_intmex.keymon.lat.main _main = null;
public reparto_intmex.keymon.lat.appupdater _appupdater = null;
public reparto_intmex.keymon.lat.foto _foto = null;
public reparto_intmex.keymon.lat.mapa_cliente _mapa_cliente = null;
public reparto_intmex.keymon.lat.mapa_rutas _mapa_rutas = null;
public reparto_intmex.keymon.lat.starter _starter = null;
public reparto_intmex.keymon.lat.subs _subs = null;
public reparto_intmex.keymon.lat.tracker _tracker = null;
public reparto_intmex.keymon.lat.newinst2 _newinst2 = null;
public reparto_intmex.keymon.lat.b4xpages _b4xpages = null;
public reparto_intmex.keymon.lat.b4xcollections _b4xcollections = null;
public reparto_intmex.keymon.lat.httputils2service _httputils2service = null;
public reparto_intmex.keymon.lat.xuiviewsutils _xuiviewsutils = null;
public Object  _initialize(reparto_intmex.keymon.lat.c_detalleventa __ref,anywheresoftware.b4a.BA _ba) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "initialize", false))
	 {return ((Object) Debug.delegate(ba, "initialize", new Object[] {_ba}));}
RDebugUtils.currentLine=47054848;
 //BA.debugLineNum = 47054848;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=47054849;
 //BA.debugLineNum = 47054849;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=47054850;
 //BA.debugLineNum = 47054850;BA.debugLine="End Sub";
return null;
}
public String  _b_guardar_click(reparto_intmex.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "b_guardar_click", false))
	 {return ((String) Debug.delegate(ba, "b_guardar_click", null));}
RDebugUtils.currentLine=47906816;
 //BA.debugLineNum = 47906816;BA.debugLine="Private Sub b_guardar_Click";
RDebugUtils.currentLine=47906818;
 //BA.debugLineNum = 47906818;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmas_click(reparto_intmex.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
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.collections.List _estetag = null;
String _maxprods = "";
String _minimoadesc = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _minimos = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c2 = null;
RDebugUtils.currentLine=47775744;
 //BA.debugLineNum = 47775744;BA.debugLine="Sub b_prodMas_Click";
RDebugUtils.currentLine=47775745;
 //BA.debugLineNum = 47775745;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=47775747;
 //BA.debugLineNum = 47775747;BA.debugLine="LogColor(\"b_prodMas_Click\", Colors.Magenta)";
__c.LogImpl("247775747","b_prodMas_Click",__c.Colors.Magenta);
RDebugUtils.currentLine=47775748;
 //BA.debugLineNum = 47775748;BA.debugLine="Dim index As Int = clv_pedido.GetItemFromView(Sen";
_index = __ref._clv_pedido /*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=47775749;
 //BA.debugLineNum = 47775749;BA.debugLine="Dim pnl0 As B4XView = clv_pedido.GetPanel(index)";
_pnl0 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl0 = __ref._clv_pedido /*b4a.example3.customlistview*/ ._getpanel(_index);
RDebugUtils.currentLine=47775750;
 //BA.debugLineNum = 47775750;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=47775751;
 //BA.debugLineNum = 47775751;BA.debugLine="Dim laCant As B4XView = pnl.GetView(2).GetView(3)";
_lacant = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacant = _pnl.GetView((int) (2)).GetView((int) (3));
RDebugUtils.currentLine=47775755;
 //BA.debugLineNum = 47775755;BA.debugLine="Dim esteTag As List = Regex.Split(\"\\|\", laCant.Ta";
_estetag = new anywheresoftware.b4a.objects.collections.List();
_estetag = anywheresoftware.b4a.keywords.Common.ArrayToList(__c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag())));
RDebugUtils.currentLine=47775756;
 //BA.debugLineNum = 47775756;BA.debugLine="Log(\"LC_TEXT:\"&laCant.Text&\"|LC_TAG:\"&laCant.Tag&";
__c.LogImpl("247775756","LC_TEXT:"+_lacant.getText()+"|LC_TAG:"+BA.ObjectToString(_lacant.getTag())+"|ET:"+BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=47775757;
 //BA.debugLineNum = 47775757;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=47775759;
 //BA.debugLineNum = 47775759;BA.debugLine="Private maxProds = esteTag.Get(1) + esteTag.Get(4";
_maxprods = BA.NumberToString((double)(BA.ObjectToNumber(_estetag.Get((int) (1))))+(double)(BA.ObjectToNumber(_estetag.Get((int) (4)))));
RDebugUtils.currentLine=47775761;
 //BA.debugLineNum = 47775761;BA.debugLine="LogColor($\"++++++++++++++++++++++++++   ${esteTag";
__c.LogImpl("247775761",("++++++++++++++++++++++++++   "+__c.SmartStringFormatter("",(Object)(_estetag.getObject()))+""),__c.Colors.Green);
RDebugUtils.currentLine=47775764;
 //BA.debugLineNum = 47775764;BA.debugLine="Private minimoadesc As String";
_minimoadesc = "";
RDebugUtils.currentLine=47775765;
 //BA.debugLineNum = 47775765;BA.debugLine="Dim minimos As Cursor = Starter.skmt.ExecQuery2(\"";
_minimos = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_minimos = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT * FROM CAT_GUNAPROD3 WHERE CAT_GP_ID = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2)))})));
RDebugUtils.currentLine=47775766;
 //BA.debugLineNum = 47775766;BA.debugLine="If minimos.RowCount > 0 Then";
if (_minimos.getRowCount()>0) { 
RDebugUtils.currentLine=47775767;
 //BA.debugLineNum = 47775767;BA.debugLine="minimos.Position = 0";
_minimos.setPosition((int) (0));
RDebugUtils.currentLine=47775768;
 //BA.debugLineNum = 47775768;BA.debugLine="minimoadesc = minimos.GetString(\"CAT_DP_CANT_MIN";
_minimoadesc = _minimos.GetString("CAT_DP_CANT_MIN_VENTA");
 }else {
RDebugUtils.currentLine=47775770;
 //BA.debugLineNum = 47775770;BA.debugLine="minimoadesc = \"1\"";
_minimoadesc = "1";
 };
RDebugUtils.currentLine=47775772;
 //BA.debugLineNum = 47775772;BA.debugLine="minimos.Close";
_minimos.Close();
RDebugUtils.currentLine=47775774;
 //BA.debugLineNum = 47775774;BA.debugLine="minimoadesc = \"1\"";
_minimoadesc = "1";
RDebugUtils.currentLine=47775775;
 //BA.debugLineNum = 47775775;BA.debugLine="If esteTag.Get(7) <> \"1\" Then";
if ((_estetag.Get((int) (7))).equals((Object)("1")) == false) { 
RDebugUtils.currentLine=47775778;
 //BA.debugLineNum = 47775778;BA.debugLine="If esteTag.Get(5) = esteTag.Get(6) Then";
if ((_estetag.Get((int) (5))).equals(_estetag.Get((int) (6)))) { 
RDebugUtils.currentLine=47775780;
 //BA.debugLineNum = 47775780;BA.debugLine="If laCant.Text + 1 <= maxProds Then";
if ((double)(Double.parseDouble(_lacant.getText()))+1<=(double)(Double.parseDouble(_maxprods))) { 
RDebugUtils.currentLine=47775781;
 //BA.debugLineNum = 47775781;BA.debugLine="Log($\"NuevaCant = ${laCant.Text + 1}\"$)";
__c.LogImpl("247775781",("NuevaCant = "+__c.SmartStringFormatter("",(Object)((double)(Double.parseDouble(_lacant.getText()))+1))+""),0);
RDebugUtils.currentLine=47775782;
 //BA.debugLineNum = 47775782;BA.debugLine="laCant.Text = $\"$1.0{laCant.Text + 1}\"$";
_lacant.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.0",(Object)((double)(Double.parseDouble(_lacant.getText()))+1))+"")));
RDebugUtils.currentLine=47775783;
 //BA.debugLineNum = 47775783;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update cat_gunapro";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen - 1 where cat_gp_id = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{_estetag.Get((int) (2))}));
RDebugUtils.currentLine=47775786;
 //BA.debugLineNum = 47775786;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTAS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 1,  HVD_RECHAZOCANT = HVD_RECHAZOCANT - (1*'"+__c.SmartStringFormatter("",(Object)(_minimoadesc))+"')  WHERE HVD_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and HVD_cliente in (Select CUENTA from cuentaa)  AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
RDebugUtils.currentLine=47775788;
 //BA.debugLineNum = 47775788;BA.debugLine="Subs.prodVenta(esteTag.Get(5), esteTag.Get(2))";
_subs._prodventa /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (5))),BA.ObjectToString(_estetag.Get((int) (2))));
RDebugUtils.currentLine=47775793;
 //BA.debugLineNum = 47775793;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }else {
RDebugUtils.currentLine=47775797;
 //BA.debugLineNum = 47775797;BA.debugLine="If laCant.Text + 1 <= maxProds Then";
if ((double)(Double.parseDouble(_lacant.getText()))+1<=(double)(Double.parseDouble(_maxprods))) { 
RDebugUtils.currentLine=47775798;
 //BA.debugLineNum = 47775798;BA.debugLine="Log($\"NuevaCant = ${laCant.Text + 1}\"$)";
__c.LogImpl("247775798",("NuevaCant = "+__c.SmartStringFormatter("",(Object)((double)(Double.parseDouble(_lacant.getText()))+1))+""),0);
RDebugUtils.currentLine=47775799;
 //BA.debugLineNum = 47775799;BA.debugLine="laCant.Text = $\"$1.0{laCant.Text + 1}\"$";
_lacant.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.0",(Object)((double)(Double.parseDouble(_lacant.getText()))+1))+"")));
RDebugUtils.currentLine=47775800;
 //BA.debugLineNum = 47775800;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update cat_gunapro";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen - 1 where cat_gp_id = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{BA.ObjectToString(_estetag.Get((int) (2)))}));
RDebugUtils.currentLine=47775801;
 //BA.debugLineNum = 47775801;BA.debugLine="c = Starter.skmt.ExecQuery2(\"SELECT * FROM PED";
__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)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT * FROM PEDIDO WHERE PE_PROID = ? and PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND CONSECUTIVO = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2))),BA.ObjectToString(_estetag.Get((int) (8)))})));
RDebugUtils.currentLine=47775802;
 //BA.debugLineNum = 47775802;BA.debugLine="If c.RowCount > 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=47775803;
 //BA.debugLineNum = 47775803;BA.debugLine="Private c2 As Cursor = Starter.skmt.ExecQuery";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT * FROM CAT_GUNAPROD WHERE CAT_GP_ID = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2)))})));
RDebugUtils.currentLine=47775804;
 //BA.debugLineNum = 47775804;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=47775805;
 //BA.debugLineNum = 47775805;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=47775807;
 //BA.debugLineNum = 47775807;BA.debugLine="Starter.skmt.ExecNonQuery($\"update PEDIDO se";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update PEDIDO set PE_CANT = IFNULL(PE_CANT,0)+(1*'"+__c.SmartStringFormatter("",(Object)(_minimoadesc))+"'), PE_COSTO_TOT= ((IFNULL(PE_CANT,0)+(1*'"+__c.SmartStringFormatter("",(Object)(_minimoadesc))+"'))*'"+__c.SmartStringFormatter("",(Object)(_c2.GetString("CAT_GP_PRECIO")))+"') WHERE PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa)  AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
 };
 }else {
RDebugUtils.currentLine=47775810;
 //BA.debugLineNum = 47775810;BA.debugLine="Private c2 As Cursor = Starter.skmt.ExecQuery";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT * FROM CAT_GUNAPROD WHERE CAT_GP_ID = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2)))})));
RDebugUtils.currentLine=47775811;
 //BA.debugLineNum = 47775811;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=47775812;
 //BA.debugLineNum = 47775812;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=47775814;
 //BA.debugLineNum = 47775814;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO PEDI";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PEDIDO(PE_PROID,PE_PRONOMBRE,PE_CANT,PE_CLIENTEOR,PE_CLIENTE,PE_COSTOU,PE_COSTO_TOT,PE_CAJAS,PE_BCAJAS,CONSECUTIVO) VALUES (?,?,?,?,?,?,?,0,0,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{BA.ObjectToString(_estetag.Get((int) (2))),_c2.GetString("CAT_GP_NOMBRE"),BA.NumberToString(1*(double)(Double.parseDouble(_minimoadesc))),BA.ObjectToString(_estetag.Get((int) (5))),_subs._traecliente /*String*/ (ba),_c2.GetString("CAT_GP_PRECIO"),_c2.GetString("CAT_GP_PRECIO"),BA.ObjectToString(_estetag.Get((int) (8)))}));
 };
 };
RDebugUtils.currentLine=47775819;
 //BA.debugLineNum = 47775819;BA.debugLine="Subs.prodVenta(esteTag.Get(5), esteTag.Get(2))";
_subs._prodventa /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (5))),BA.ObjectToString(_estetag.Get((int) (2))));
RDebugUtils.currentLine=47775824;
 //BA.debugLineNum = 47775824;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 };
 };
RDebugUtils.currentLine=47775843;
 //BA.debugLineNum = 47775843;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear(reparto_intmex.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "b4xpage_appear", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_appear", null));}
int _i = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c4 = null;
int _cantres = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _oc = null;
int _cant2 = 0;
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
int _bgcolor = 0;
int _textcolor = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c3 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc = null;
String _cuenta = "";
String _arti = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc2 = null;
String _cuenta1 = "";
String _arti1 = "";
float _preu = 0f;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc3 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc4 = null;
String _cuenta2 = "";
String _arti2 = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc5 = null;
String _cuenta3 = "";
String _arti3 = "";
RDebugUtils.currentLine=47185920;
 //BA.debugLineNum = 47185920;BA.debugLine="Sub B4XPage_Appear";
RDebugUtils.currentLine=47185921;
 //BA.debugLineNum = 47185921;BA.debugLine="Subs.centraPanel(p_principal, Root.Width)";
_subs._centrapanel /*String*/ (ba,__ref._p_principal /*anywheresoftware.b4a.objects.PanelWrapper*/ ,__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth());
RDebugUtils.currentLine=47185925;
 //BA.debugLineNum = 47185925;BA.debugLine="L_CANT.Text =\"\"";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=47185926;
 //BA.debugLineNum = 47185926;BA.debugLine="L_TOTAL.Text=\"\"";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=47185927;
 //BA.debugLineNum = 47185927;BA.debugLine="c=Starter.skmt.ExecQuery(\"select count(*) as EXIS";
__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)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(*) as EXISTE from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) and HVD_RECHAZO = 0 ")));
RDebugUtils.currentLine=47185928;
 //BA.debugLineNum = 47185928;BA.debugLine="C.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=47185929;
 //BA.debugLineNum = 47185929;BA.debugLine="Existe = C.GetString(\"EXISTE\")";
__ref._existe /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("EXISTE");
RDebugUtils.currentLine=47185930;
 //BA.debugLineNum = 47185930;BA.debugLine="C.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=47185932;
 //BA.debugLineNum = 47185932;BA.debugLine="c=Starter.skmt.ExecQuery(\"select hvd_num_registro";
__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)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select hvd_num_registro,CONSECUTIVO, HVD_CLIENTE, HVD_PRONOMBRE, HVD_PROID, HVD_CANT, HVD_COSTO_TOT, HVD_CODPROMO, BCAJAS, CANTC, IFNULL(HVD_RECHAZOCANT,0) AS HVD_RECHAZOCANT from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) and hvd_rechazo <> 2 and hvd_cant > 0 order by HVD_CODPROMO desc, HVD_PRONOMBRE asc")));
RDebugUtils.currentLine=47185933;
 //BA.debugLineNum = 47185933;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=47185934;
 //BA.debugLineNum = 47185934;BA.debugLine="clv_pedido.Clear";
__ref._clv_pedido /*b4a.example3.customlistview*/ ._clear();
RDebugUtils.currentLine=47185935;
 //BA.debugLineNum = 47185935;BA.debugLine="Subs.SetDivider(ListView1, Colors.LightGray, 2)";
_subs._setdivider /*String*/ (ba,__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ ,__c.Colors.LightGray,(int) (2));
RDebugUtils.currentLine=47185936;
 //BA.debugLineNum = 47185936;BA.debugLine="clv_pedido.GetBase.SetLayoutAnimated(100, 0dip, 6";
__ref._clv_pedido /*b4a.example3.customlistview*/ ._getbase().SetLayoutAnimated((int) (100),__c.DipToCurrent((int) (0)),__c.DipToCurrent((int) (60)),(int) (__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth()-50),(int) (__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getHeight()*0.62));
RDebugUtils.currentLine=47185937;
 //BA.debugLineNum = 47185937;BA.debugLine="clv_pedido.Base_Resize(clv_pedido.GetBase.Width,";
__ref._clv_pedido /*b4a.example3.customlistview*/ ._base_resize(__ref._clv_pedido /*b4a.example3.customlistview*/ ._getbase().getWidth(),__ref._clv_pedido /*b4a.example3.customlistview*/ ._getbase().getHeight());
RDebugUtils.currentLine=47185939;
 //BA.debugLineNum = 47185939;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=47185942;
 //BA.debugLineNum = 47185942;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step15 = 1;
final int limit15 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit15 ;_i = _i + step15 ) {
RDebugUtils.currentLine=47185943;
 //BA.debugLineNum = 47185943;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=47185945;
 //BA.debugLineNum = 47185945;BA.debugLine="Private c4 As Cursor = Starter.skmt.ExecQuery($";
_c4 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c4 = (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(PE_CANT,0) AS PE_CANT FROM PEDIDO WHERE PE_PROID = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID")))+"' AND PE_CLIENTEOR IN (SELECT CUENTA FROM CUENTAA) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")))+"'"))));
RDebugUtils.currentLine=47185946;
 //BA.debugLineNum = 47185946;BA.debugLine="If c4.RowCount > 0 Then";
if (_c4.getRowCount()>0) { 
RDebugUtils.currentLine=47185947;
 //BA.debugLineNum = 47185947;BA.debugLine="c4.Position = 0";
_c4.setPosition((int) (0));
RDebugUtils.currentLine=47185948;
 //BA.debugLineNum = 47185948;BA.debugLine="Private cantres As Int = c4.GetString(\"PE_CANT";
_cantres = (int)(Double.parseDouble(_c4.GetString("PE_CANT")));
 }else {
RDebugUtils.currentLine=47185950;
 //BA.debugLineNum = 47185950;BA.debugLine="cantres = 0";
_cantres = (int) (0);
 };
RDebugUtils.currentLine=47185953;
 //BA.debugLineNum = 47185953;BA.debugLine="If c.GetString(\"BCAJAS\") = \"0\" Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("BCAJAS")).equals("0")) { 
RDebugUtils.currentLine=47185954;
 //BA.debugLineNum = 47185954;BA.debugLine="If c.GetString(\"HVD_CANT\") <> c.GetString(\"HVD";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CANT")).equals(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_RECHAZOCANT")) == false) { 
RDebugUtils.currentLine=47185956;
 //BA.debugLineNum = 47185956;BA.debugLine="Private oc As Cursor = Starter.skmt.ExecQuery";
_oc = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_oc = (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 HVD_CANT from HIST_VENTAS2 WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) and hvd_proid = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID")))+"' and HVD_NUM_REGISTRO = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_NUM_REGISTRO")))+"'"))));
RDebugUtils.currentLine=47185957;
 //BA.debugLineNum = 47185957;BA.debugLine="Private cant2 As Int = 0";
_cant2 = (int) (0);
RDebugUtils.currentLine=47185958;
 //BA.debugLineNum = 47185958;BA.debugLine="If oc.RowCount > 0 Then";
if (_oc.getRowCount()>0) { 
RDebugUtils.currentLine=47185959;
 //BA.debugLineNum = 47185959;BA.debugLine="oc.Position = 0";
_oc.setPosition((int) (0));
RDebugUtils.currentLine=47185960;
 //BA.debugLineNum = 47185960;BA.debugLine="cant2 = oc.GetString(\"HVD_CANT\")";
_cant2 = (int)(Double.parseDouble(_oc.GetString("HVD_CANT")));
 };
RDebugUtils.currentLine=47185962;
 //BA.debugLineNum = 47185962;BA.debugLine="oc.Close";
_oc.Close();
RDebugUtils.currentLine=47185963;
 //BA.debugLineNum = 47185963;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=47185964;
 //BA.debugLineNum = 47185964;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=47185965;
 //BA.debugLineNum = 47185965;BA.debugLine="label1.TextSize = 12";
_label1.setTextSize((float) (12));
RDebugUtils.currentLine=47185966;
 //BA.debugLineNum = 47185966;BA.debugLine="label1.TextColor = Colors.black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=47185967;
 //BA.debugLineNum = 47185967;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=47185968;
 //BA.debugLineNum = 47185968;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=47185969;
 //BA.debugLineNum = 47185969;BA.debugLine="label2.TextSize = 12";
_label2.setTextSize((float) (12));
RDebugUtils.currentLine=47185970;
 //BA.debugLineNum = 47185970;BA.debugLine="label2.TextColor = Colors.black";
_label2.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=47185971;
 //BA.debugLineNum = 47185971;BA.debugLine="Private bgColor, textColor As Int";
_bgcolor = 0;
_textcolor = 0;
RDebugUtils.currentLine=47185972;
 //BA.debugLineNum = 47185972;BA.debugLine="bgColor = Colors.RGB(177, 200, 249)'azul";
_bgcolor = __c.Colors.RGB((int) (177),(int) (200),(int) (249));
RDebugUtils.currentLine=47185973;
 //BA.debugLineNum = 47185973;BA.debugLine="textColor = Colors.black";
_textcolor = __c.Colors.Black;
RDebugUtils.currentLine=47185974;
 //BA.debugLineNum = 47185974;BA.debugLine="If c.GetString(\"HVD_CODPROMO\") <> Subs.traeAl";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CODPROMO")).equals(_subs._traealmacen /*String*/ (ba)) == false) { 
RDebugUtils.currentLine=47185976;
 //BA.debugLineNum = 47185976;BA.debugLine="bgColor = Colors.White";
_bgcolor = __c.Colors.White;
 };
RDebugUtils.currentLine=47185980;
 //BA.debugLineNum = 47185980;BA.debugLine="clv_pedido.Add(CreateListItem(c.GetString(\"HV";
__ref._clv_pedido /*b4a.example3.customlistview*/ ._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__ref._createlistitem /*anywheresoftware.b4a.objects.PanelWrapper*/ (null,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PRONOMBRE"),_subs._traeprecio2 /*String*/ (ba,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CODPROMO"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")),(int) (((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CANT")))-(double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_RECHAZOCANT"))))),(int) ((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_RECHAZOCANT")))-_cantres),__ref._clv_pedido /*b4a.example3.customlistview*/ ._asview().getWidth(),__c.DipToCurrent((int) (118)),__ref._bmp /*anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper*/ ,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID"),_bgcolor,_textcolor,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CODPROMO"),_subs._traecliente /*String*/ (ba),_subs._traecliente /*String*/ (ba),BA.NumberToString(0),(int)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")))).getObject())),(Object)(_i));
 };
 }else 
{RDebugUtils.currentLine=47185983;
 //BA.debugLineNum = 47185983;BA.debugLine="Else If c.GetString(\"BCAJAS\") = \"1\" Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("BCAJAS")).equals("1")) { 
RDebugUtils.currentLine=47185984;
 //BA.debugLineNum = 47185984;BA.debugLine="If c.GetString(\"HVD_CANT\") <> c.GetString(\"HVD";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CANT")).equals(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_RECHAZOCANT")) == false) { 
RDebugUtils.currentLine=47185986;
 //BA.debugLineNum = 47185986;BA.debugLine="Private oc As Cursor = Starter.skmt.ExecQuery";
_oc = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_oc = (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 HVD_CANT from HIST_VENTAS2 WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) and hvd_proid = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID")))+"' and HVD_NUM_REGISTRO = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_NUM_REGISTRO")))+"'"))));
RDebugUtils.currentLine=47185987;
 //BA.debugLineNum = 47185987;BA.debugLine="Private cant2 As Int = 0";
_cant2 = (int) (0);
RDebugUtils.currentLine=47185988;
 //BA.debugLineNum = 47185988;BA.debugLine="If oc.RowCount > 0 Then";
if (_oc.getRowCount()>0) { 
RDebugUtils.currentLine=47185989;
 //BA.debugLineNum = 47185989;BA.debugLine="oc.Position = 0";
_oc.setPosition((int) (0));
RDebugUtils.currentLine=47185990;
 //BA.debugLineNum = 47185990;BA.debugLine="cant2 = oc.GetString(\"HVD_CANT\")";
_cant2 = (int)(Double.parseDouble(_oc.GetString("HVD_CANT")));
 };
RDebugUtils.currentLine=47185992;
 //BA.debugLineNum = 47185992;BA.debugLine="oc.Close";
_oc.Close();
RDebugUtils.currentLine=47185993;
 //BA.debugLineNum = 47185993;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=47185994;
 //BA.debugLineNum = 47185994;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=47185995;
 //BA.debugLineNum = 47185995;BA.debugLine="label1.TextSize = 12";
_label1.setTextSize((float) (12));
RDebugUtils.currentLine=47185996;
 //BA.debugLineNum = 47185996;BA.debugLine="label1.TextColor = Colors.black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=47185997;
 //BA.debugLineNum = 47185997;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=47185998;
 //BA.debugLineNum = 47185998;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=47185999;
 //BA.debugLineNum = 47185999;BA.debugLine="label2.TextSize = 12";
_label2.setTextSize((float) (12));
RDebugUtils.currentLine=47186000;
 //BA.debugLineNum = 47186000;BA.debugLine="label2.TextColor = Colors.black";
_label2.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=47186001;
 //BA.debugLineNum = 47186001;BA.debugLine="Private bgColor, textColor As Int";
_bgcolor = 0;
_textcolor = 0;
RDebugUtils.currentLine=47186002;
 //BA.debugLineNum = 47186002;BA.debugLine="bgColor = Colors.RGB(177, 200, 249)'azul";
_bgcolor = __c.Colors.RGB((int) (177),(int) (200),(int) (249));
RDebugUtils.currentLine=47186003;
 //BA.debugLineNum = 47186003;BA.debugLine="textColor = Colors.black";
_textcolor = __c.Colors.Black;
RDebugUtils.currentLine=47186004;
 //BA.debugLineNum = 47186004;BA.debugLine="If c.GetString(\"HVD_CODPROMO\") <> Subs.traeAl";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CODPROMO")).equals(_subs._traealmacen /*String*/ (ba)) == false) { 
RDebugUtils.currentLine=47186006;
 //BA.debugLineNum = 47186006;BA.debugLine="bgColor = Colors.White";
_bgcolor = __c.Colors.White;
 };
RDebugUtils.currentLine=47186010;
 //BA.debugLineNum = 47186010;BA.debugLine="clv_pedido.Add(CreateListItem(c.GetString(\"HV";
__ref._clv_pedido /*b4a.example3.customlistview*/ ._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__ref._createlistitem /*anywheresoftware.b4a.objects.PanelWrapper*/ (null,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PRONOMBRE"),BA.NumberToString(((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANTC"))))),(int) ((((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CANT")))-(double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_RECHAZOCANT")))))),(int)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_RECHAZOCANT"))),__ref._clv_pedido /*b4a.example3.customlistview*/ ._asview().getWidth(),__c.DipToCurrent((int) (118)),__ref._bmp /*anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper*/ ,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID"),_bgcolor,_textcolor,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CODPROMO"),_subs._traecliente /*String*/ (ba),_subs._traecliente /*String*/ (ba),BA.NumberToString(0),(int)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")))).getObject())),(Object)(_i));
 };
 }}
;
 }
};
 };
RDebugUtils.currentLine=47186018;
 //BA.debugLineNum = 47186018;BA.debugLine="Private c3 As Cursor=Starter.skmt.ExecQuery(\"Sele";
_c3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c3 = (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 * from PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=47186019;
 //BA.debugLineNum = 47186019;BA.debugLine="If c3.RowCount>0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=47186020;
 //BA.debugLineNum = 47186020;BA.debugLine="For i= 0 To c3.RowCount -1";
{
final int step79 = 1;
final int limit79 = (int) (_c3.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit79 ;_i = _i + step79 ) {
RDebugUtils.currentLine=47186021;
 //BA.debugLineNum = 47186021;BA.debugLine="c3.Position = i";
_c3.setPosition(_i);
RDebugUtils.currentLine=47186022;
 //BA.debugLineNum = 47186022;BA.debugLine="If c3.GetString(\"PE_BCAJAS\") = \"1\" Then";
if ((_c3.GetString("PE_BCAJAS")).equals("1")) { 
RDebugUtils.currentLine=47186023;
 //BA.debugLineNum = 47186023;BA.debugLine="Private bgColor, textColor As Int";
_bgcolor = 0;
_textcolor = 0;
RDebugUtils.currentLine=47186024;
 //BA.debugLineNum = 47186024;BA.debugLine="bgColor = Colors.RGB(221, 132, 132)'rosa";
_bgcolor = __c.Colors.RGB((int) (221),(int) (132),(int) (132));
RDebugUtils.currentLine=47186025;
 //BA.debugLineNum = 47186025;BA.debugLine="textColor = Colors.black";
_textcolor = __c.Colors.Black;
RDebugUtils.currentLine=47186026;
 //BA.debugLineNum = 47186026;BA.debugLine="clv_pedido.Add(CreateListItem2(c3.GetString(\"P";
__ref._clv_pedido /*b4a.example3.customlistview*/ ._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__ref._createlistitem2 /*anywheresoftware.b4a.objects.PanelWrapper*/ (null,_c3.GetString("PE_PRONOMBRE"),_c3.GetString("PE_COSTOU"),(int)(Double.parseDouble(_c3.GetString("PE_CANT"))),(int) (0),__ref._clv_pedido /*b4a.example3.customlistview*/ ._asview().getWidth(),__c.DipToCurrent((int) (118)),__ref._bmp /*anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper*/ ,_c3.GetString("PE_PROID"),_bgcolor,_textcolor,_subs._traealmacen /*String*/ (ba),_subs._traecliente /*String*/ (ba),_c3.GetString("PE_CLIENTEOR"),BA.NumberToString(1),(int)(Double.parseDouble(_c3.GetString("CONSECUTIVO")))).getObject())),(Object)(_i));
RDebugUtils.currentLine=47186027;
 //BA.debugLineNum = 47186027;BA.debugLine="Log(\"#####################\"&c3.GetString(\"PE_P";
__c.LogImpl("247186027","#####################"+_c3.GetString("PE_PRONOMBRE")+","+_c3.GetString("PE_CANT"),0);
 }else {
RDebugUtils.currentLine=47186029;
 //BA.debugLineNum = 47186029;BA.debugLine="Private bgColor, textColor As Int";
_bgcolor = 0;
_textcolor = 0;
RDebugUtils.currentLine=47186030;
 //BA.debugLineNum = 47186030;BA.debugLine="bgColor = Colors.RGB(221, 132, 132)'rosa";
_bgcolor = __c.Colors.RGB((int) (221),(int) (132),(int) (132));
RDebugUtils.currentLine=47186031;
 //BA.debugLineNum = 47186031;BA.debugLine="textColor = Colors.black";
_textcolor = __c.Colors.Black;
RDebugUtils.currentLine=47186032;
 //BA.debugLineNum = 47186032;BA.debugLine="Log(\"#####################\"&c3.GetString(\"PE_P";
__c.LogImpl("247186032","#####################"+_c3.GetString("PE_PRONOMBRE")+","+_c3.GetString("PE_CANT"),0);
RDebugUtils.currentLine=47186033;
 //BA.debugLineNum = 47186033;BA.debugLine="clv_pedido.Add(CreateListItem(c3.GetString(\"PE";
__ref._clv_pedido /*b4a.example3.customlistview*/ ._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__ref._createlistitem /*anywheresoftware.b4a.objects.PanelWrapper*/ (null,_c3.GetString("PE_PRONOMBRE"),_c3.GetString("PE_COSTOU"),(int)(Double.parseDouble(_c3.GetString("PE_CANT"))),(int) (0),__ref._clv_pedido /*b4a.example3.customlistview*/ ._asview().getWidth(),__c.DipToCurrent((int) (118)),__ref._bmp /*anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper*/ ,_c3.GetString("PE_PROID"),_bgcolor,_textcolor,_subs._traealmacen /*String*/ (ba),_subs._traecliente /*String*/ (ba),_c3.GetString("PE_CLIENTEOR"),BA.NumberToString(1),(int)(Double.parseDouble(_c3.GetString("CONSECUTIVO")))).getObject())),(Object)(_i));
 };
 }
};
 };
RDebugUtils.currentLine=47186039;
 //BA.debugLineNum = 47186039;BA.debugLine="Private vc As Cursor = Starter.skmt.ExecQuery($\"s";
_vc = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc = (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 HVD_PROID, HVD_CANT,HVD_COSTO_TOT, IFNULL(HVD_RECHAZOCANT, 0) AS HVD_RECHAZOCANT from HIST_VENTAS where BCAJAS = 0 and HVD_CODPROMO ='"+__c.SmartStringFormatter("",(Object)(_subs._traealmacen /*String*/ (ba)))+"' and HVD_CLIENTE in (select cuenta from cuentaa)"))));
RDebugUtils.currentLine=47186041;
 //BA.debugLineNum = 47186041;BA.debugLine="Private Cuenta As String = 0";
_cuenta = BA.NumberToString(0);
RDebugUtils.currentLine=47186042;
 //BA.debugLineNum = 47186042;BA.debugLine="Private arti As String = 0";
_arti = BA.NumberToString(0);
RDebugUtils.currentLine=47186043;
 //BA.debugLineNum = 47186043;BA.debugLine="If vc.RowCount > 0 Then";
if (_vc.getRowCount()>0) { 
RDebugUtils.currentLine=47186044;
 //BA.debugLineNum = 47186044;BA.debugLine="For i = 0 To vc.RowCount - 1";
{
final int step100 = 1;
final int limit100 = (int) (_vc.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit100 ;_i = _i + step100 ) {
RDebugUtils.currentLine=47186045;
 //BA.debugLineNum = 47186045;BA.debugLine="vc.Position = i";
_vc.setPosition(_i);
RDebugUtils.currentLine=47186046;
 //BA.debugLineNum = 47186046;BA.debugLine="Private cantres As Int = 0";
_cantres = (int) (0);
RDebugUtils.currentLine=47186047;
 //BA.debugLineNum = 47186047;BA.debugLine="Private c4 As Cursor = Starter.skmt.ExecQuery($";
_c4 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c4 = (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(PE_CANT,0) AS PE_CANT FROM PEDIDO WHERE PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_vc.GetString("HVD_PROID")))+"' AND PE_CLIENTEOR IN (SELECT CUENTA FROM CUENTAA)"))));
RDebugUtils.currentLine=47186048;
 //BA.debugLineNum = 47186048;BA.debugLine="If c4.RowCount > 0 Then";
if (_c4.getRowCount()>0) { 
RDebugUtils.currentLine=47186049;
 //BA.debugLineNum = 47186049;BA.debugLine="c4.Position = 0";
_c4.setPosition((int) (0));
RDebugUtils.currentLine=47186050;
 //BA.debugLineNum = 47186050;BA.debugLine="cantres = c4.GetString(\"PE_CANT\")";
_cantres = (int)(Double.parseDouble(_c4.GetString("PE_CANT")));
RDebugUtils.currentLine=47186051;
 //BA.debugLineNum = 47186051;BA.debugLine="Log(c4.GetString(\"PE_CANT\"))";
__c.LogImpl("247186051",_c4.GetString("PE_CANT"),0);
 }else {
RDebugUtils.currentLine=47186053;
 //BA.debugLineNum = 47186053;BA.debugLine="cantres = 0";
_cantres = (int) (0);
 };
RDebugUtils.currentLine=47186058;
 //BA.debugLineNum = 47186058;BA.debugLine="arti = arti + (vc.GetString(\"HVD_CANT\") - vc.Ge";
_arti = BA.NumberToString((double)(Double.parseDouble(_arti))+((double)(Double.parseDouble(_vc.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc.GetString("HVD_RECHAZOCANT")))));
RDebugUtils.currentLine=47186059;
 //BA.debugLineNum = 47186059;BA.debugLine="Cuenta = Cuenta + ((vc.GetString(\"HVD_CANT\") -";
_cuenta = BA.NumberToString((double)(Double.parseDouble(_cuenta))+(((double)(Double.parseDouble(_vc.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc.GetString("HVD_RECHAZOCANT"))))*((double)(Double.parseDouble(_vc.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_vc.GetString("HVD_CANT"))))));
 }
};
 };
RDebugUtils.currentLine=47186066;
 //BA.debugLineNum = 47186066;BA.debugLine="Private vc2 As Cursor = Starter.skmt.ExecQuery(\"s";
_vc2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc2 = (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 HVD_PROID, HVD_CANT, IFNULL(HVD_RECHAZOCANT, 0) AS HVD_RECHAZOCANT, CANTC,HVD_COSTO_TOT from HIST_VENTAS where HVD_CLIENTE in (select cuenta from cuentaa) AND BCAJAS = 1")));
RDebugUtils.currentLine=47186067;
 //BA.debugLineNum = 47186067;BA.debugLine="Private Cuenta1 As String = 0";
_cuenta1 = BA.NumberToString(0);
RDebugUtils.currentLine=47186068;
 //BA.debugLineNum = 47186068;BA.debugLine="Private arti1 As String = 0";
_arti1 = BA.NumberToString(0);
RDebugUtils.currentLine=47186069;
 //BA.debugLineNum = 47186069;BA.debugLine="If vc2.RowCount > 0 Then";
if (_vc2.getRowCount()>0) { 
RDebugUtils.currentLine=47186070;
 //BA.debugLineNum = 47186070;BA.debugLine="For i = 0 To vc2.RowCount - 1";
{
final int step119 = 1;
final int limit119 = (int) (_vc2.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit119 ;_i = _i + step119 ) {
RDebugUtils.currentLine=47186071;
 //BA.debugLineNum = 47186071;BA.debugLine="vc2.Position = i";
_vc2.setPosition(_i);
RDebugUtils.currentLine=47186072;
 //BA.debugLineNum = 47186072;BA.debugLine="Dim preu As Float = NumberFormat2(vc2.GetString";
_preu = (float)(Double.parseDouble(__c.NumberFormat2((double)(Double.parseDouble(_vc2.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_vc2.GetString("CANTC"))),(int) (0),(int) (2),(int) (2),__c.False)));
RDebugUtils.currentLine=47186073;
 //BA.debugLineNum = 47186073;BA.debugLine="Private vc3 As Cursor = Starter.skmt.ExecQuery(";
_vc3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc3 = (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 PRECIOCONVER, CONVERSION from CAT_GUNAPROD where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_vc2.GetString("HVD_PROID")))+"'"))));
RDebugUtils.currentLine=47186074;
 //BA.debugLineNum = 47186074;BA.debugLine="If vc3.RowCount > 0 Then";
if (_vc3.getRowCount()>0) { 
RDebugUtils.currentLine=47186075;
 //BA.debugLineNum = 47186075;BA.debugLine="vc3.Position = 0";
_vc3.setPosition((int) (0));
RDebugUtils.currentLine=47186076;
 //BA.debugLineNum = 47186076;BA.debugLine="Cuenta1 = Cuenta1 + ((vc2.GetString(\"CANTC\")-(";
_cuenta1 = BA.NumberToString((double)(Double.parseDouble(_cuenta1))+(((double)(Double.parseDouble(_vc2.GetString("CANTC")))-((double)(Double.parseDouble(_vc2.GetString("HVD_RECHAZOCANT")))/(double)(double)(Double.parseDouble(_vc3.GetString("CONVERSION")))))*_preu));
RDebugUtils.currentLine=47186077;
 //BA.debugLineNum = 47186077;BA.debugLine="arti1 = arti1 + (vc2.GetString(\"HVD_CANT\") - v";
_arti1 = BA.NumberToString((double)(Double.parseDouble(_arti1))+((double)(Double.parseDouble(_vc2.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc2.GetString("HVD_RECHAZOCANT")))));
 };
 }
};
 };
RDebugUtils.currentLine=47186083;
 //BA.debugLineNum = 47186083;BA.debugLine="Private vc4 As Cursor = Starter.skmt.ExecQuery($\"";
_vc4 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc4 = (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 HVD_PROID, HVD_CANT, IFNULL(HVD_RECHAZOCANT, 0) AS HVD_RECHAZOCANT, CANTC,HVD_COSTO_TOT, HVD_RECHAZO, HVD_CODPROMO from HIST_VENTAS where HVD_CLIENTE in (select cuenta from cuentaa) AND BCAJAS = 0 and HVD_CODPROMO <> '"+__c.SmartStringFormatter("",(Object)(_subs._traealmacen /*String*/ (ba)))+"'"))));
RDebugUtils.currentLine=47186084;
 //BA.debugLineNum = 47186084;BA.debugLine="Private Cuenta2 As String = 0";
_cuenta2 = BA.NumberToString(0);
RDebugUtils.currentLine=47186085;
 //BA.debugLineNum = 47186085;BA.debugLine="Private arti2 As String = 0";
_arti2 = BA.NumberToString(0);
RDebugUtils.currentLine=47186086;
 //BA.debugLineNum = 47186086;BA.debugLine="If vc4.RowCount > 0 Then";
if (_vc4.getRowCount()>0) { 
RDebugUtils.currentLine=47186088;
 //BA.debugLineNum = 47186088;BA.debugLine="For i = 0 To vc4.RowCount - 1";
{
final int step134 = 1;
final int limit134 = (int) (_vc4.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit134 ;_i = _i + step134 ) {
RDebugUtils.currentLine=47186089;
 //BA.debugLineNum = 47186089;BA.debugLine="vc4.Position = i";
_vc4.setPosition(_i);
RDebugUtils.currentLine=47186090;
 //BA.debugLineNum = 47186090;BA.debugLine="If vc4.GetString(\"HVD_PROID\") <> vc4.GetString(";
if ((_vc4.GetString("HVD_PROID")).equals(_vc4.GetString("HVD_CODPROMO")) == false) { 
RDebugUtils.currentLine=47186091;
 //BA.debugLineNum = 47186091;BA.debugLine="If vc4.GetString(\"HVD_RECHAZO\") = 0 Then";
if ((_vc4.GetString("HVD_RECHAZO")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=47186092;
 //BA.debugLineNum = 47186092;BA.debugLine="Cuenta2 = Cuenta2 + vc4.GetString(\"HVD_COSTO_";
_cuenta2 = BA.NumberToString((double)(Double.parseDouble(_cuenta2))+(double)(Double.parseDouble(_vc4.GetString("HVD_COSTO_TOT"))));
RDebugUtils.currentLine=47186093;
 //BA.debugLineNum = 47186093;BA.debugLine="arti2 = arti2 + vc4.GetString(\"HVD_CANT\")";
_arti2 = BA.NumberToString((double)(Double.parseDouble(_arti2))+(double)(Double.parseDouble(_vc4.GetString("HVD_CANT"))));
 }else {
RDebugUtils.currentLine=47186095;
 //BA.debugLineNum = 47186095;BA.debugLine="Private vc5 As Cursor = Starter.skmt.ExecQuer";
_vc5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc5 = (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_PRECIO from CAT_GUNAPROD where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_vc4.GetString("HVD_PROID")))+"'"))));
RDebugUtils.currentLine=47186096;
 //BA.debugLineNum = 47186096;BA.debugLine="If vc5.RowCount > 0 Then";
if (_vc5.getRowCount()>0) { 
RDebugUtils.currentLine=47186097;
 //BA.debugLineNum = 47186097;BA.debugLine="vc5.Position= 0";
_vc5.setPosition((int) (0));
RDebugUtils.currentLine=47186099;
 //BA.debugLineNum = 47186099;BA.debugLine="Cuenta2 = Cuenta2 +((vc4.GetString(\"HVD_CANT";
_cuenta2 = BA.NumberToString((double)(Double.parseDouble(_cuenta2))+(((double)(Double.parseDouble(_vc4.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc4.GetString("HVD_RECHAZOCANT"))))*(double)(Double.parseDouble(_vc5.GetString("CAT_GP_PRECIO")))));
RDebugUtils.currentLine=47186100;
 //BA.debugLineNum = 47186100;BA.debugLine="arti2 = arti2 +(vc4.GetString(\"HVD_CANT\")- v";
_arti2 = BA.NumberToString((double)(Double.parseDouble(_arti2))+((double)(Double.parseDouble(_vc4.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc4.GetString("HVD_RECHAZOCANT")))));
 };
 };
 };
 }
};
 };
RDebugUtils.currentLine=47186111;
 //BA.debugLineNum = 47186111;BA.debugLine="Private c4 As Cursor = Starter.skmt.ExecQuery($\"S";
_c4 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c4 = (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(PE_CANT,0) AS PE_CANT, iFNULL(PE_COSTO_TOT,0) AS PE_COSTO_TOT FROM PEDIDO WHERE PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA)"))));
RDebugUtils.currentLine=47186112;
 //BA.debugLineNum = 47186112;BA.debugLine="Private Cuenta3 As String = 0";
_cuenta3 = BA.NumberToString(0);
RDebugUtils.currentLine=47186113;
 //BA.debugLineNum = 47186113;BA.debugLine="Private arti3 As String = 0";
_arti3 = BA.NumberToString(0);
RDebugUtils.currentLine=47186114;
 //BA.debugLineNum = 47186114;BA.debugLine="If c4.RowCount > 0 Then";
if (_c4.getRowCount()>0) { 
RDebugUtils.currentLine=47186115;
 //BA.debugLineNum = 47186115;BA.debugLine="For i = 0 To c4.RowCount -1";
{
final int step155 = 1;
final int limit155 = (int) (_c4.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit155 ;_i = _i + step155 ) {
RDebugUtils.currentLine=47186116;
 //BA.debugLineNum = 47186116;BA.debugLine="c4.Position = i";
_c4.setPosition(_i);
RDebugUtils.currentLine=47186117;
 //BA.debugLineNum = 47186117;BA.debugLine="arti3 = arti3 + c4.GetString(\"PE_CANT\")";
_arti3 = BA.NumberToString((double)(Double.parseDouble(_arti3))+(double)(Double.parseDouble(_c4.GetString("PE_CANT"))));
RDebugUtils.currentLine=47186118;
 //BA.debugLineNum = 47186118;BA.debugLine="Cuenta3 = Cuenta3 + c4.GetString(\"PE_COSTO_TOT\"";
_cuenta3 = BA.NumberToString((double)(Double.parseDouble(_cuenta3))+(double)(Double.parseDouble(_c4.GetString("PE_COSTO_TOT"))));
 }
};
 };
RDebugUtils.currentLine=47186122;
 //BA.debugLineNum = 47186122;BA.debugLine="If Cuenta < 0 Then";
if ((double)(Double.parseDouble(_cuenta))<0) { 
RDebugUtils.currentLine=47186123;
 //BA.debugLineNum = 47186123;BA.debugLine="Cuenta = 0";
_cuenta = BA.NumberToString(0);
 };
RDebugUtils.currentLine=47186125;
 //BA.debugLineNum = 47186125;BA.debugLine="If Cuenta1 < 0 Then";
if ((double)(Double.parseDouble(_cuenta1))<0) { 
RDebugUtils.currentLine=47186126;
 //BA.debugLineNum = 47186126;BA.debugLine="Cuenta = 0";
_cuenta = BA.NumberToString(0);
 };
RDebugUtils.currentLine=47186128;
 //BA.debugLineNum = 47186128;BA.debugLine="If Cuenta2 < 0 Then";
if ((double)(Double.parseDouble(_cuenta2))<0) { 
RDebugUtils.currentLine=47186129;
 //BA.debugLineNum = 47186129;BA.debugLine="Cuenta = 0";
_cuenta = BA.NumberToString(0);
 };
RDebugUtils.currentLine=47186131;
 //BA.debugLineNum = 47186131;BA.debugLine="If Cuenta3 < 0 Then";
if ((double)(Double.parseDouble(_cuenta3))<0) { 
RDebugUtils.currentLine=47186132;
 //BA.debugLineNum = 47186132;BA.debugLine="Cuenta = 0";
_cuenta = BA.NumberToString(0);
 };
RDebugUtils.currentLine=47186135;
 //BA.debugLineNum = 47186135;BA.debugLine="If arti < 0 Then";
if ((double)(Double.parseDouble(_arti))<0) { 
RDebugUtils.currentLine=47186136;
 //BA.debugLineNum = 47186136;BA.debugLine="arti = 0";
_arti = BA.NumberToString(0);
 };
RDebugUtils.currentLine=47186138;
 //BA.debugLineNum = 47186138;BA.debugLine="If arti1 < 0 Then";
if ((double)(Double.parseDouble(_arti1))<0) { 
RDebugUtils.currentLine=47186139;
 //BA.debugLineNum = 47186139;BA.debugLine="arti = 0";
_arti = BA.NumberToString(0);
 };
RDebugUtils.currentLine=47186141;
 //BA.debugLineNum = 47186141;BA.debugLine="If arti2 < 0 Then";
if ((double)(Double.parseDouble(_arti2))<0) { 
RDebugUtils.currentLine=47186142;
 //BA.debugLineNum = 47186142;BA.debugLine="arti = 0";
_arti = BA.NumberToString(0);
 };
RDebugUtils.currentLine=47186144;
 //BA.debugLineNum = 47186144;BA.debugLine="If arti3 < 0 Then";
if ((double)(Double.parseDouble(_arti3))<0) { 
RDebugUtils.currentLine=47186145;
 //BA.debugLineNum = 47186145;BA.debugLine="arti = 0";
_arti = BA.NumberToString(0);
 };
RDebugUtils.currentLine=47186148;
 //BA.debugLineNum = 47186148;BA.debugLine="Log(Cuenta&\",\"&Cuenta1&\",\"&Cuenta2&\",\"&Cuenta3)";
__c.LogImpl("247186148",_cuenta+","+_cuenta1+","+_cuenta2+","+_cuenta3,0);
RDebugUtils.currentLine=47186149;
 //BA.debugLineNum = 47186149;BA.debugLine="Log(arti&\",\"&arti1&\",\"&arti2&\",\"&arti3)";
__c.LogImpl("247186149",_arti+","+_arti1+","+_arti2+","+_arti3,0);
RDebugUtils.currentLine=47186150;
 //BA.debugLineNum = 47186150;BA.debugLine="If Cuenta + Cuenta1 + Cuenta2 + Cuenta3 < 0 Then";
if ((double)(Double.parseDouble(_cuenta))+(double)(Double.parseDouble(_cuenta1))+(double)(Double.parseDouble(_cuenta2))+(double)(Double.parseDouble(_cuenta3))<0) { 
RDebugUtils.currentLine=47186151;
 //BA.debugLineNum = 47186151;BA.debugLine="L_TOTAL.Text = 0";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(0));
 }else {
RDebugUtils.currentLine=47186153;
 //BA.debugLineNum = 47186153;BA.debugLine="L_TOTAL.Text = NumberFormat2((Cuenta + Cuenta1 +";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.NumberFormat2(((double)(Double.parseDouble(_cuenta))+(double)(Double.parseDouble(_cuenta1))+(double)(Double.parseDouble(_cuenta2))+(double)(Double.parseDouble(_cuenta3))),(int) (0),(int) (2),(int) (2),__c.True)));
 };
RDebugUtils.currentLine=47186155;
 //BA.debugLineNum = 47186155;BA.debugLine="If arti + arti1 +arti2 + arti3 < 0 Then";
if ((double)(Double.parseDouble(_arti))+(double)(Double.parseDouble(_arti1))+(double)(Double.parseDouble(_arti2))+(double)(Double.parseDouble(_arti3))<0) { 
RDebugUtils.currentLine=47186156;
 //BA.debugLineNum = 47186156;BA.debugLine="L_CANT.Text = 0";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(0));
 }else {
RDebugUtils.currentLine=47186158;
 //BA.debugLineNum = 47186158;BA.debugLine="L_CANT.Text = NumberFormat2((arti + arti1 +arti2";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.NumberFormat2(((double)(Double.parseDouble(_arti))+(double)(Double.parseDouble(_arti1))+(double)(Double.parseDouble(_arti2))+(double)(Double.parseDouble(_arti3))),(int) (0),(int) (0),(int) (0),__c.True)));
 };
RDebugUtils.currentLine=47186162;
 //BA.debugLineNum = 47186162;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmasc_click(reparto_intmex.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
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 _lacantc = null;
anywheresoftware.b4a.objects.collections.List _estetag = null;
String _maxprods = "";
RDebugUtils.currentLine=48103424;
 //BA.debugLineNum = 48103424;BA.debugLine="Private Sub b_prodMasC_Click";
RDebugUtils.currentLine=48103425;
 //BA.debugLineNum = 48103425;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=48103427;
 //BA.debugLineNum = 48103427;BA.debugLine="LogColor(\"b_prodMas_Click\", Colors.Magenta)";
__c.LogImpl("248103427","b_prodMas_Click",__c.Colors.Magenta);
RDebugUtils.currentLine=48103428;
 //BA.debugLineNum = 48103428;BA.debugLine="Dim index As Int = clv_pedido.GetItemFromView(Sen";
_index = __ref._clv_pedido /*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=48103429;
 //BA.debugLineNum = 48103429;BA.debugLine="Dim pnl0 As B4XView = clv_pedido.GetPanel(index)";
_pnl0 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl0 = __ref._clv_pedido /*b4a.example3.customlistview*/ ._getpanel(_index);
RDebugUtils.currentLine=48103430;
 //BA.debugLineNum = 48103430;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=48103431;
 //BA.debugLineNum = 48103431;BA.debugLine="Dim laCantc As B4XView = pnl.GetView(3).GetView(3";
_lacantc = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacantc = _pnl.GetView((int) (3)).GetView((int) (3));
RDebugUtils.currentLine=48103435;
 //BA.debugLineNum = 48103435;BA.debugLine="Dim esteTag As List = Regex.Split(\"\\|\", laCantc.T";
_estetag = new anywheresoftware.b4a.objects.collections.List();
_estetag = anywheresoftware.b4a.keywords.Common.ArrayToList(__c.Regex.Split("\\|",BA.ObjectToString(_lacantc.getTag())));
RDebugUtils.currentLine=48103436;
 //BA.debugLineNum = 48103436;BA.debugLine="Log(\"LC_TEXT:\"&laCantc.Text&\"|LC_TAG:\"&laCantc.Ta";
__c.LogImpl("248103436","LC_TEXT:"+_lacantc.getText()+"|LC_TAG:"+BA.ObjectToString(_lacantc.getTag())+"|ET:"+BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=48103437;
 //BA.debugLineNum = 48103437;BA.debugLine="If laCantc.Text = \"\" Then laCantc.Text = 0";
if ((_lacantc.getText()).equals("")) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=48103439;
 //BA.debugLineNum = 48103439;BA.debugLine="Private maxProds As String = (esteTag.Get(1) + es";
_maxprods = BA.NumberToString(((double)(BA.ObjectToNumber(_estetag.Get((int) (1))))+(double)(BA.ObjectToNumber(_estetag.Get((int) (4))))));
RDebugUtils.currentLine=48103440;
 //BA.debugLineNum = 48103440;BA.debugLine="LogColor(esteTag.Get(1),Colors.Red)";
__c.LogImpl("248103440",BA.ObjectToString(_estetag.Get((int) (1))),__c.Colors.Red);
RDebugUtils.currentLine=48103441;
 //BA.debugLineNum = 48103441;BA.debugLine="LogColor(esteTag.Get(4),Colors.Red)";
__c.LogImpl("248103441",BA.ObjectToString(_estetag.Get((int) (4))),__c.Colors.Red);
RDebugUtils.currentLine=48103442;
 //BA.debugLineNum = 48103442;BA.debugLine="LogColor($\"++++++++++++++++++++++++++   ${esteTag";
__c.LogImpl("248103442",("++++++++++++++++++++++++++   "+__c.SmartStringFormatter("",(Object)(_estetag.getObject()))+""),__c.Colors.Green);
RDebugUtils.currentLine=48103444;
 //BA.debugLineNum = 48103444;BA.debugLine="Log(maxProds)";
__c.LogImpl("248103444",_maxprods,0);
RDebugUtils.currentLine=48103447;
 //BA.debugLineNum = 48103447;BA.debugLine="If esteTag.Get(7) <> \"1\" Then";
if ((_estetag.Get((int) (7))).equals((Object)("1")) == false) { 
RDebugUtils.currentLine=48103450;
 //BA.debugLineNum = 48103450;BA.debugLine="If laCantc.Text + 1 <= maxProds Then";
if ((double)(Double.parseDouble(_lacantc.getText()))+1<=(double)(Double.parseDouble(_maxprods))) { 
RDebugUtils.currentLine=48103451;
 //BA.debugLineNum = 48103451;BA.debugLine="Log($\"NuevaCant = ${laCantc.Text + 1}\"$)";
__c.LogImpl("248103451",("NuevaCant = "+__c.SmartStringFormatter("",(Object)((double)(Double.parseDouble(_lacantc.getText()))+1))+""),0);
RDebugUtils.currentLine=48103452;
 //BA.debugLineNum = 48103452;BA.debugLine="laCantc.Text = $\"$1.0{laCantc.Text + 1}\"$";
_lacantc.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.0",(Object)((double)(Double.parseDouble(_lacantc.getText()))+1))+"")));
RDebugUtils.currentLine=48103454;
 //BA.debugLineNum = 48103454;BA.debugLine="Log(laCantc.Text)";
__c.LogImpl("248103454",_lacantc.getText(),0);
RDebugUtils.currentLine=48103455;
 //BA.debugLineNum = 48103455;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTAS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 1,  HVD_RECHAZOCANT = IFNULL(HVD_RECHAZOCANT,0) -(1 * "+__c.SmartStringFormatter("",(Object)(_subs._traeconversion /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (2))))))+")  WHERE HVD_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and HVD_cliente in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
RDebugUtils.currentLine=48103463;
 //BA.debugLineNum = 48103463;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 };
RDebugUtils.currentLine=48103466;
 //BA.debugLineNum = 48103466;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmenos_click(reparto_intmex.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "b_prodmenos_click", false))
	 {return ((String) Debug.delegate(ba, "b_prodmenos_click", null));}
int _index = 0;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl0 = null;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lacant = null;
anywheresoftware.b4a.objects.collections.List _estetag = null;
String _minimoadesc = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _minimos = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c3 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c2 = null;
float _preciou = 0f;
RDebugUtils.currentLine=47710208;
 //BA.debugLineNum = 47710208;BA.debugLine="Sub b_prodMenos_Click";
RDebugUtils.currentLine=47710209;
 //BA.debugLineNum = 47710209;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=47710210;
 //BA.debugLineNum = 47710210;BA.debugLine="Log(\"etCantHasFocus=\" & etCantHasFocus)";
__c.LogImpl("247710210","etCantHasFocus="+BA.ObjectToString(__ref._etcanthasfocus /*boolean*/ ),0);
RDebugUtils.currentLine=47710211;
 //BA.debugLineNum = 47710211;BA.debugLine="LogColor(\"b_prodMenos_Click\", Colors.Magenta)";
__c.LogImpl("247710211","b_prodMenos_Click",__c.Colors.Magenta);
RDebugUtils.currentLine=47710212;
 //BA.debugLineNum = 47710212;BA.debugLine="Dim index As Int = clv_pedido.GetItemFromView(Sen";
_index = __ref._clv_pedido /*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=47710213;
 //BA.debugLineNum = 47710213;BA.debugLine="Dim pnl0 As B4XView = clv_pedido.GetPanel(index)";
_pnl0 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl0 = __ref._clv_pedido /*b4a.example3.customlistview*/ ._getpanel(_index);
RDebugUtils.currentLine=47710214;
 //BA.debugLineNum = 47710214;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=47710215;
 //BA.debugLineNum = 47710215;BA.debugLine="Dim laCant As B4XView = pnl.GetView(2).GetView(3)";
_lacant = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacant = _pnl.GetView((int) (2)).GetView((int) (3));
RDebugUtils.currentLine=47710217;
 //BA.debugLineNum = 47710217;BA.debugLine="Dim esteTag As List = Regex.Split(\"\\|\", laCant.Ta";
_estetag = new anywheresoftware.b4a.objects.collections.List();
_estetag = anywheresoftware.b4a.keywords.Common.ArrayToList(__c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag())));
RDebugUtils.currentLine=47710218;
 //BA.debugLineNum = 47710218;BA.debugLine="Log(\"LC_TEXT:\"&laCant.Text&\"|PROMO:\"&esteTag.Get(";
__c.LogImpl("247710218","LC_TEXT:"+_lacant.getText()+"|PROMO:"+BA.ObjectToString(_estetag.Get((int) (3)))+"|LC_TAG:"+BA.ObjectToString(_lacant.getTag())+"|ET:"+BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=47710219;
 //BA.debugLineNum = 47710219;BA.debugLine="Private minimoadesc As String";
_minimoadesc = "";
RDebugUtils.currentLine=47710220;
 //BA.debugLineNum = 47710220;BA.debugLine="Dim minimos As Cursor = Starter.skmt.ExecQuery2(\"";
_minimos = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_minimos = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT * FROM CAT_GUNAPROD3 WHERE CAT_GP_ID = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2)))})));
RDebugUtils.currentLine=47710221;
 //BA.debugLineNum = 47710221;BA.debugLine="If minimos.RowCount > 0 Then";
if (_minimos.getRowCount()>0) { 
RDebugUtils.currentLine=47710222;
 //BA.debugLineNum = 47710222;BA.debugLine="minimos.Position = 0";
_minimos.setPosition((int) (0));
RDebugUtils.currentLine=47710223;
 //BA.debugLineNum = 47710223;BA.debugLine="minimoadesc = minimos.GetString(\"CAT_DP_CANT_MIN";
_minimoadesc = _minimos.GetString("CAT_DP_CANT_MIN_VENTA");
 }else {
RDebugUtils.currentLine=47710225;
 //BA.debugLineNum = 47710225;BA.debugLine="minimoadesc = \"1\"";
_minimoadesc = "1";
 };
RDebugUtils.currentLine=47710227;
 //BA.debugLineNum = 47710227;BA.debugLine="minimos.Close";
_minimos.Close();
RDebugUtils.currentLine=47710229;
 //BA.debugLineNum = 47710229;BA.debugLine="minimoadesc = \"1\"";
_minimoadesc = "1";
RDebugUtils.currentLine=47710230;
 //BA.debugLineNum = 47710230;BA.debugLine="If esteTag.Get(7) = \"1\" Then";
if ((_estetag.Get((int) (7))).equals((Object)("1"))) { 
RDebugUtils.currentLine=47710231;
 //BA.debugLineNum = 47710231;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=47710232;
 //BA.debugLineNum = 47710232;BA.debugLine="laCant.Text = $\"$1.0{laCant.Text-1}\"$";
_lacant.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.0",(Object)((double)(Double.parseDouble(_lacant.getText()))-1))+"")));
RDebugUtils.currentLine=47710233;
 //BA.debugLineNum = 47710233;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0";
if ((double)(Double.parseDouble(_lacant.getText()))<0) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=47710234;
 //BA.debugLineNum = 47710234;BA.debugLine="Private c3 As Cursor = Starter.skmt.ExecQuery2(\"";
_c3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c3 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT PE_CANT FROM PEDIDO WHERE PE_PROID = ? AND PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND CONSECUTIVO = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2))),BA.ObjectToString(_estetag.Get((int) (8)))})));
RDebugUtils.currentLine=47710235;
 //BA.debugLineNum = 47710235;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=47710236;
 //BA.debugLineNum = 47710236;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
RDebugUtils.currentLine=47710237;
 //BA.debugLineNum = 47710237;BA.debugLine="If c3.GetString(\"PE_CANT\") > minimoadesc Then";
if ((double)(Double.parseDouble(_c3.GetString("PE_CANT")))>(double)(Double.parseDouble(_minimoadesc))) { 
RDebugUtils.currentLine=47710238;
 //BA.debugLineNum = 47710238;BA.debugLine="Private c2 As Cursor = Starter.skmt.ExecQuery2";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT * FROM CAT_GUNAPROD WHERE CAT_GP_ID = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2)))})));
RDebugUtils.currentLine=47710239;
 //BA.debugLineNum = 47710239;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=47710240;
 //BA.debugLineNum = 47710240;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=47710242;
 //BA.debugLineNum = 47710242;BA.debugLine="Starter.skmt.ExecNonQuery($\"update PEDIDO set";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update PEDIDO set PE_CANT = IFNULL(PE_CANT,0)-(1*'"+__c.SmartStringFormatter("",(Object)(_minimoadesc))+"'), PE_COSTO_TOT= ((IFNULL(PE_CANT,0) -(1*'"+__c.SmartStringFormatter("",(Object)(_minimoadesc))+"'))*'"+__c.SmartStringFormatter("",(Object)(_c2.GetString("CAT_GP_PRECIO")))+"') WHERE PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa) and CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
 };
 }else 
{RDebugUtils.currentLine=47710244;
 //BA.debugLineNum = 47710244;BA.debugLine="Else If c3.GetString(\"PE_CANT\") = minimoadesc T";
if ((_c3.GetString("PE_CANT")).equals(_minimoadesc)) { 
RDebugUtils.currentLine=47710245;
 //BA.debugLineNum = 47710245;BA.debugLine="Private c2 As Cursor = Starter.skmt.ExecQuery2";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT * FROM CAT_GUNAPROD WHERE CAT_GP_ID = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2)))})));
RDebugUtils.currentLine=47710246;
 //BA.debugLineNum = 47710246;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=47710247;
 //BA.debugLineNum = 47710247;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=47710250;
 //BA.debugLineNum = 47710250;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from PEDID";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from PEDIDO where PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
 };
 }}
;
 };
RDebugUtils.currentLine=47710257;
 //BA.debugLineNum = 47710257;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 }else {
RDebugUtils.currentLine=47710260;
 //BA.debugLineNum = 47710260;BA.debugLine="If esteTag.Get(5) = esteTag.Get(6) Then";
if ((_estetag.Get((int) (5))).equals(_estetag.Get((int) (6)))) { 
RDebugUtils.currentLine=47710261;
 //BA.debugLineNum = 47710261;BA.debugLine="If laCant.Text > 0 Then";
if ((double)(Double.parseDouble(_lacant.getText()))>0) { 
RDebugUtils.currentLine=47710262;
 //BA.debugLineNum = 47710262;BA.debugLine="If esteTag.Get(3) <> Subs.traeAlmacen Then 'Si";
if ((_estetag.Get((int) (3))).equals((Object)(_subs._traealmacen /*String*/ (ba))) == false) { 
RDebugUtils.currentLine=47710263;
 //BA.debugLineNum = 47710263;BA.debugLine="Private c2 As Cursor =Starter.skmt.ExecQuery(";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c2 = (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 HVD_RECHAZO FROM HIST_VENTAS WHERE HVD_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' AND HVD_CLIENTE IN (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"))));
RDebugUtils.currentLine=47710264;
 //BA.debugLineNum = 47710264;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=47710265;
 //BA.debugLineNum = 47710265;BA.debugLine="If c2.GetString(\"HVD_RECHAZO\") = \"0\" Then";
if ((_c2.GetString("HVD_RECHAZO")).equals("0")) { 
RDebugUtils.currentLine=47710268;
 //BA.debugLineNum = 47710268;BA.debugLine="Log(\"ES PROMO\")";
__c.LogImpl("247710268","ES PROMO",0);
RDebugUtils.currentLine=47710269;
 //BA.debugLineNum = 47710269;BA.debugLine="Log(esteTag.Get(3))";
__c.LogImpl("247710269",BA.ObjectToString(_estetag.Get((int) (3))),0);
RDebugUtils.currentLine=47710270;
 //BA.debugLineNum = 47710270;BA.debugLine="result =  Msgbox2(\"Si se modifica una promoc";
__ref._result /*String*/  = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Si se modifica una promoción, la promoción se rompe y solo quedarán los productos sueltos, ¿seguro que desea continuar?"),BA.ObjectToCharSequence("Modificar Promoción"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
RDebugUtils.currentLine=47710271;
 //BA.debugLineNum = 47710271;BA.debugLine="If result = DialogResponse.POSITIVE Then 'Qu";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=47710272;
 //BA.debugLineNum = 47710272;BA.debugLine="prodsMap.Remove(esteTag.Get(3))";
__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Remove(_estetag.Get((int) (3)));
RDebugUtils.currentLine=47710276;
 //BA.debugLineNum = 47710276;BA.debugLine="LogColor(esteTag.Get(3),Colors.Blue)";
__c.LogImpl("247710276",BA.ObjectToString(_estetag.Get((int) (3))),__c.Colors.Blue);
RDebugUtils.currentLine=47710279;
 //BA.debugLineNum = 47710279;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VEN";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 1,  HVD_RECHAZOCANT = HVD_CANT  WHERE  HVD_CODPROMO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (3)))+"' and HVD_CLIENTE in (Select CUENTA from cuentaa)"));
RDebugUtils.currentLine=47710280;
 //BA.debugLineNum = 47710280;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VEN";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 2,  HVD_RECHAZOCANT = HVD_CANT  WHERE HVD_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (3)))+"' and HVD_CODPROMO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (3)))+"' and HVD_CLIENTE in (Select CUENTA from cuentaa)"));
RDebugUtils.currentLine=47710283;
 //BA.debugLineNum = 47710283;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=47710284;
 //BA.debugLineNum = 47710284;BA.debugLine="LogColor(prodsMap, Colors.red)";
__c.LogImpl("247710284",BA.ObjectToString(__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ ),__c.Colors.Red);
RDebugUtils.currentLine=47710285;
 //BA.debugLineNum = 47710285;BA.debugLine="reconstruirPedido = True";
__ref._reconstruirpedido /*boolean*/  = __c.True;
RDebugUtils.currentLine=47710286;
 //BA.debugLineNum = 47710286;BA.debugLine="promoABorrar = esteTag.Get(3)";
__ref._promoaborrar /*String*/  = BA.ObjectToString(_estetag.Get((int) (3)));
RDebugUtils.currentLine=47710287;
 //BA.debugLineNum = 47710287;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }else {
RDebugUtils.currentLine=47710290;
 //BA.debugLineNum = 47710290;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=47710291;
 //BA.debugLineNum = 47710291;BA.debugLine="laCant.Text = $\"$1.0{laCant.Text-1}\"$";
_lacant.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.0",(Object)((double)(Double.parseDouble(_lacant.getText()))-1))+"")));
RDebugUtils.currentLine=47710292;
 //BA.debugLineNum = 47710292;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0";
if ((double)(Double.parseDouble(_lacant.getText()))<0) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=47710293;
 //BA.debugLineNum = 47710293;BA.debugLine="Log(\"NO ES promo\")";
__c.LogImpl("247710293","NO ES promo",0);
RDebugUtils.currentLine=47710294;
 //BA.debugLineNum = 47710294;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENT";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 1,  HVD_RECHAZOCANT = IFNULL(HVD_RECHAZOCANT,0) + (1*'"+__c.SmartStringFormatter("",(Object)(_minimoadesc))+"')  WHERE HVD_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and HVD_cliente in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
RDebugUtils.currentLine=47710295;
 //BA.debugLineNum = 47710295;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update cat_gunap";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen + 1 where cat_gp_id = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{_estetag.Get((int) (2))}));
RDebugUtils.currentLine=47710296;
 //BA.debugLineNum = 47710296;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }else {
RDebugUtils.currentLine=47710299;
 //BA.debugLineNum = 47710299;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=47710300;
 //BA.debugLineNum = 47710300;BA.debugLine="laCant.Text = $\"$1.0{laCant.Text-1}\"$";
_lacant.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.0",(Object)((double)(Double.parseDouble(_lacant.getText()))-1))+"")));
RDebugUtils.currentLine=47710301;
 //BA.debugLineNum = 47710301;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0";
if ((double)(Double.parseDouble(_lacant.getText()))<0) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=47710302;
 //BA.debugLineNum = 47710302;BA.debugLine="Log(\"NO ES promo\")";
__c.LogImpl("247710302","NO ES promo",0);
RDebugUtils.currentLine=47710303;
 //BA.debugLineNum = 47710303;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTA";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 1,  HVD_RECHAZOCANT = IFNULL(HVD_RECHAZOCANT,0) + (1*'"+__c.SmartStringFormatter("",(Object)(_minimoadesc))+"'), BCAJAS = 0, CANTC = 0  WHERE HVD_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and HVD_cliente in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
RDebugUtils.currentLine=47710304;
 //BA.debugLineNum = 47710304;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update cat_gunapr";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen + 1 where cat_gp_id = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{_estetag.Get((int) (2))}));
RDebugUtils.currentLine=47710305;
 //BA.debugLineNum = 47710305;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 };
 }else {
RDebugUtils.currentLine=47710310;
 //BA.debugLineNum = 47710310;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=47710311;
 //BA.debugLineNum = 47710311;BA.debugLine="laCant.Text = $\"$1.0{laCant.Text-1}\"$";
_lacant.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.0",(Object)((double)(Double.parseDouble(_lacant.getText()))-1))+"")));
RDebugUtils.currentLine=47710312;
 //BA.debugLineNum = 47710312;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0";
if ((double)(Double.parseDouble(_lacant.getText()))<0) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=47710313;
 //BA.debugLineNum = 47710313;BA.debugLine="Log(\"NO ES promo\")";
__c.LogImpl("247710313","NO ES promo",0);
RDebugUtils.currentLine=47710318;
 //BA.debugLineNum = 47710318;BA.debugLine="Private c3 As Cursor = Starter.skmt.ExecQuery2(";
_c3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c3 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT PE_CANT FROM PEDIDO WHERE PE_PROID = ? AND PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND CONSECUTIVO = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2))),BA.ObjectToString(_estetag.Get((int) (8)))})));
RDebugUtils.currentLine=47710319;
 //BA.debugLineNum = 47710319;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=47710320;
 //BA.debugLineNum = 47710320;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
RDebugUtils.currentLine=47710321;
 //BA.debugLineNum = 47710321;BA.debugLine="If c3.GetString(\"PE_CANT\") > 1 Then";
if ((double)(Double.parseDouble(_c3.GetString("PE_CANT")))>1) { 
RDebugUtils.currentLine=47710322;
 //BA.debugLineNum = 47710322;BA.debugLine="Private c2 As Cursor = Starter.skmt.ExecQuery";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT * FROM CAT_GUNAPROD WHERE CAT_GP_ID = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2)))})));
RDebugUtils.currentLine=47710323;
 //BA.debugLineNum = 47710323;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=47710324;
 //BA.debugLineNum = 47710324;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=47710325;
 //BA.debugLineNum = 47710325;BA.debugLine="Starter.skmt.ExecNonQuery($\"update PEDIDO se";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update PEDIDO set PE_CANT = IFNULL(PE_CANT,0)-(1*'"+__c.SmartStringFormatter("",(Object)(_minimoadesc))+"'), PE_COSTO_TOT= ((IFNULL(PE_CANT,0) -(1*'"+__c.SmartStringFormatter("",(Object)(_minimoadesc))+"'))*'"+__c.SmartStringFormatter("",(Object)(_c2.GetString("CAT_GP_PRECIO")))+"') WHERE PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
 };
 }else 
{RDebugUtils.currentLine=47710327;
 //BA.debugLineNum = 47710327;BA.debugLine="Else If c3.GetString(\"PE_CANT\") = 1 Then";
if ((_c3.GetString("PE_CANT")).equals(BA.NumberToString(1))) { 
RDebugUtils.currentLine=47710328;
 //BA.debugLineNum = 47710328;BA.debugLine="Private c2 As Cursor = Starter.skmt.ExecQuery";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT * FROM CAT_GUNAPROD WHERE CAT_GP_ID = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2)))})));
RDebugUtils.currentLine=47710329;
 //BA.debugLineNum = 47710329;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=47710330;
 //BA.debugLineNum = 47710330;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=47710331;
 //BA.debugLineNum = 47710331;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from PEDI";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from PEDIDO where PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
 };
 }}
;
 };
RDebugUtils.currentLine=47710335;
 //BA.debugLineNum = 47710335;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 };
RDebugUtils.currentLine=47710338;
 //BA.debugLineNum = 47710338;BA.debugLine="Dim preciou As Float = esteTag.Get(0)/esteTag.Get";
_preciou = (float) ((double)(BA.ObjectToNumber(_estetag.Get((int) (0))))/(double)(double)(BA.ObjectToNumber(_estetag.Get((int) (1)))));
RDebugUtils.currentLine=47710339;
 //BA.debugLineNum = 47710339;BA.debugLine="Log(\"PU: \" & preciou)";
__c.LogImpl("247710339","PU: "+BA.NumberToString(_preciou),0);
RDebugUtils.currentLine=47710350;
 //BA.debugLineNum = 47710350;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmenosc_click(reparto_intmex.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
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 _lacantc = null;
anywheresoftware.b4a.objects.collections.List _estetag = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c3 = null;
float _preciou = 0f;
RDebugUtils.currentLine=48168960;
 //BA.debugLineNum = 48168960;BA.debugLine="Private Sub b_prodMenosC_Click";
RDebugUtils.currentLine=48168961;
 //BA.debugLineNum = 48168961;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=48168962;
 //BA.debugLineNum = 48168962;BA.debugLine="Log(\"etCantHasFocus=\" & etCantHasFocus)";
__c.LogImpl("248168962","etCantHasFocus="+BA.ObjectToString(__ref._etcanthasfocus /*boolean*/ ),0);
RDebugUtils.currentLine=48168963;
 //BA.debugLineNum = 48168963;BA.debugLine="LogColor(\"b_prodMenos_Click\", Colors.Magenta)";
__c.LogImpl("248168963","b_prodMenos_Click",__c.Colors.Magenta);
RDebugUtils.currentLine=48168964;
 //BA.debugLineNum = 48168964;BA.debugLine="Dim index As Int = clv_pedido.GetItemFromView(Sen";
_index = __ref._clv_pedido /*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=48168965;
 //BA.debugLineNum = 48168965;BA.debugLine="Dim pnl0 As B4XView = clv_pedido.GetPanel(index)";
_pnl0 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl0 = __ref._clv_pedido /*b4a.example3.customlistview*/ ._getpanel(_index);
RDebugUtils.currentLine=48168966;
 //BA.debugLineNum = 48168966;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=48168967;
 //BA.debugLineNum = 48168967;BA.debugLine="Dim laCantc As B4XView = pnl.GetView(3).GetView(3";
_lacantc = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacantc = _pnl.GetView((int) (3)).GetView((int) (3));
RDebugUtils.currentLine=48168969;
 //BA.debugLineNum = 48168969;BA.debugLine="Dim esteTag As List = Regex.Split(\"\\|\", laCantc.T";
_estetag = new anywheresoftware.b4a.objects.collections.List();
_estetag = anywheresoftware.b4a.keywords.Common.ArrayToList(__c.Regex.Split("\\|",BA.ObjectToString(_lacantc.getTag())));
RDebugUtils.currentLine=48168970;
 //BA.debugLineNum = 48168970;BA.debugLine="Log(\"LC_TEXT:\"&laCantc.Text&\"|PROMO:\"&esteTag.Get";
__c.LogImpl("248168970","LC_TEXT:"+_lacantc.getText()+"|PROMO:"+BA.ObjectToString(_estetag.Get((int) (3)))+"|LC_TAG:"+BA.ObjectToString(_lacantc.getTag())+"|ET:"+BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=48168971;
 //BA.debugLineNum = 48168971;BA.debugLine="Log(esteTag)";
__c.LogImpl("248168971",BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=48168973;
 //BA.debugLineNum = 48168973;BA.debugLine="If esteTag.Get(7) = \"1\" Then";
if ((_estetag.Get((int) (7))).equals((Object)("1"))) { 
RDebugUtils.currentLine=48168974;
 //BA.debugLineNum = 48168974;BA.debugLine="Private c3 As Cursor = Starter.skmt.ExecQuery2(\"";
_c3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c3 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT PE_CAJAS, CONSECUTIVO FROM PEDIDO WHERE PE_PROID = ? AND PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND CONSECUTIVO = ? ",new String[]{BA.ObjectToString(_estetag.Get((int) (2))),BA.ObjectToString(_estetag.Get((int) (8)))})));
RDebugUtils.currentLine=48168975;
 //BA.debugLineNum = 48168975;BA.debugLine="Log(c3.RowCount)";
__c.LogImpl("248168975",BA.NumberToString(_c3.getRowCount()),0);
RDebugUtils.currentLine=48168976;
 //BA.debugLineNum = 48168976;BA.debugLine="Log(esteTag.Get(8))";
__c.LogImpl("248168976",BA.ObjectToString(_estetag.Get((int) (8))),0);
RDebugUtils.currentLine=48168977;
 //BA.debugLineNum = 48168977;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=48168978;
 //BA.debugLineNum = 48168978;BA.debugLine="Log(\"AQUI VEMOS SI ACTUALIZAMOS\")";
__c.LogImpl("248168978","AQUI VEMOS SI ACTUALIZAMOS",0);
RDebugUtils.currentLine=48168979;
 //BA.debugLineNum = 48168979;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
RDebugUtils.currentLine=48168980;
 //BA.debugLineNum = 48168980;BA.debugLine="If c3.GetString(\"PE_CAJAS\") > 1 Then";
if ((double)(Double.parseDouble(_c3.GetString("PE_CAJAS")))>1) { 
RDebugUtils.currentLine=48168981;
 //BA.debugLineNum = 48168981;BA.debugLine="Starter.skmt.ExecNonQuery($\"update PEDIDO set";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update PEDIDO set PE_CANT = (IFNULL(PE_CANT,0)-(1 * '"+__c.SmartStringFormatter("",(Object)(_subs._traeconversion /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (2))))))+"')), PE_COSTO_TOT= ((IFNULL(PE_CAJAS,0)-1) *'"+__c.SmartStringFormatter("",(Object)(_subs._traeprecioc /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (2))))))+"'), PE_CAJAS = IFNULL(PE_CAJAS,0) - 1 WHERE PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_c3.GetString("CONSECUTIVO")))+"'"));
 }else 
{RDebugUtils.currentLine=48168982;
 //BA.debugLineNum = 48168982;BA.debugLine="Else If c3.GetString(\"PE_CAJAS\") = 1 Then";
if ((_c3.GetString("PE_CAJAS")).equals(BA.NumberToString(1))) { 
RDebugUtils.currentLine=48168983;
 //BA.debugLineNum = 48168983;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from PEDIDO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from PEDIDO where PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_c3.GetString("CONSECUTIVO")))+"'"));
 }}
;
 };
RDebugUtils.currentLine=48168986;
 //BA.debugLineNum = 48168986;BA.debugLine="Log(\"entre al if o algo asi \")";
__c.LogImpl("248168986","entre al if o algo asi ",0);
RDebugUtils.currentLine=48168987;
 //BA.debugLineNum = 48168987;BA.debugLine="If laCantc.Text = \"\" Then laCantc.Text = 0";
if ((_lacantc.getText()).equals("")) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=48168988;
 //BA.debugLineNum = 48168988;BA.debugLine="laCantc.Text = laCantc.Text - 1";
_lacantc.setText(BA.ObjectToCharSequence((double)(Double.parseDouble(_lacantc.getText()))-1));
RDebugUtils.currentLine=48168989;
 //BA.debugLineNum = 48168989;BA.debugLine="If laCantc.Text < 0 Then laCantc.Text = 0";
if ((double)(Double.parseDouble(_lacantc.getText()))<0) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=48168990;
 //BA.debugLineNum = 48168990;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 }else {
RDebugUtils.currentLine=48168995;
 //BA.debugLineNum = 48168995;BA.debugLine="If esteTag.Get(5) = esteTag.Get(6) Then";
if ((_estetag.Get((int) (5))).equals(_estetag.Get((int) (6)))) { 
RDebugUtils.currentLine=48168997;
 //BA.debugLineNum = 48168997;BA.debugLine="If laCantc.Text > 0 Then";
if ((double)(Double.parseDouble(_lacantc.getText()))>0) { 
RDebugUtils.currentLine=48168998;
 //BA.debugLineNum = 48168998;BA.debugLine="Log(\"entre al if o algo asi \")";
__c.LogImpl("248168998","entre al if o algo asi ",0);
RDebugUtils.currentLine=48168999;
 //BA.debugLineNum = 48168999;BA.debugLine="If laCantc.Text = \"\" Then laCantc.Text = 0";
if ((_lacantc.getText()).equals("")) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=48169000;
 //BA.debugLineNum = 48169000;BA.debugLine="laCantc.Text = laCantc.Text - 1";
_lacantc.setText(BA.ObjectToCharSequence((double)(Double.parseDouble(_lacantc.getText()))-1));
RDebugUtils.currentLine=48169001;
 //BA.debugLineNum = 48169001;BA.debugLine="If laCantc.Text < 0 Then laCantc.Text = 0";
if ((double)(Double.parseDouble(_lacantc.getText()))<0) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=48169002;
 //BA.debugLineNum = 48169002;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTAS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 1,  HVD_RECHAZOCANT = (IFNULL(HVD_RECHAZOCANT,0) +(1 * "+__c.SmartStringFormatter("",(Object)(_subs._traeconversion /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (2))))))+"))  WHERE HVD_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and HVD_cliente in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
RDebugUtils.currentLine=48169003;
 //BA.debugLineNum = 48169003;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update cat_gunapro";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod set cat_gp_almacen = (cat_gp_almacen + (1 * ?)) where cat_gp_id = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{_estetag.Get((int) (2)),(Object)(_subs._traeconversion /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (2)))))}));
RDebugUtils.currentLine=48169004;
 //BA.debugLineNum = 48169004;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 }else 
{RDebugUtils.currentLine=48169005;
 //BA.debugLineNum = 48169005;BA.debugLine="Else If laCantc.Text = 0 Then";
if ((_lacantc.getText()).equals(BA.NumberToString(0))) { 
 }}
;
 }else {
RDebugUtils.currentLine=48169011;
 //BA.debugLineNum = 48169011;BA.debugLine="If laCantc.Text > 0 Then";
if ((double)(Double.parseDouble(_lacantc.getText()))>0) { 
RDebugUtils.currentLine=48169014;
 //BA.debugLineNum = 48169014;BA.debugLine="Private c3 As Cursor = Starter.skmt.ExecQuery2";
_c3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c3 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT PE_CAJAS FROM PEDIDO WHERE PE_PROID = ? AND PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) and CONSECUTIVO = ? ",new String[]{BA.ObjectToString(_estetag.Get((int) (2))),BA.ObjectToString(_estetag.Get((int) (8)))})));
RDebugUtils.currentLine=48169015;
 //BA.debugLineNum = 48169015;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=48169016;
 //BA.debugLineNum = 48169016;BA.debugLine="Log(\"AQUI VEMOS SI ACTUALIZAMOS\")";
__c.LogImpl("248169016","AQUI VEMOS SI ACTUALIZAMOS",0);
RDebugUtils.currentLine=48169017;
 //BA.debugLineNum = 48169017;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
RDebugUtils.currentLine=48169018;
 //BA.debugLineNum = 48169018;BA.debugLine="If c3.GetString(\"PE_CAJAS\") > 1 Then";
if ((double)(Double.parseDouble(_c3.GetString("PE_CAJAS")))>1) { 
RDebugUtils.currentLine=48169019;
 //BA.debugLineNum = 48169019;BA.debugLine="Starter.skmt.ExecNonQuery($\"update PEDIDO se";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update PEDIDO set PE_CANT = (IFNULL(PE_CANT,0)-(1 * '"+__c.SmartStringFormatter("",(Object)(_subs._traeconversion /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (2))))))+"')), PE_COSTO_TOT= ((IFNULL(PE_CAJAS,0)-1) *'"+__c.SmartStringFormatter("",(Object)(_subs._traeprecioc /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (2))))))+"'), PE_CAJAS = IFNULL(PE_CAJAS,0) - 1 WHERE PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
 }else 
{RDebugUtils.currentLine=48169020;
 //BA.debugLineNum = 48169020;BA.debugLine="Else If c3.GetString(\"PE_CAJAS\") = 1 Then";
if ((_c3.GetString("PE_CAJAS")).equals(BA.NumberToString(1))) { 
RDebugUtils.currentLine=48169021;
 //BA.debugLineNum = 48169021;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from PEDI";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from PEDIDO where PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
 }}
;
 };
RDebugUtils.currentLine=48169024;
 //BA.debugLineNum = 48169024;BA.debugLine="Log(\"entre al if o algo asi \")";
__c.LogImpl("248169024","entre al if o algo asi ",0);
RDebugUtils.currentLine=48169025;
 //BA.debugLineNum = 48169025;BA.debugLine="If laCantc.Text = \"\" Then laCantc.Text = 0";
if ((_lacantc.getText()).equals("")) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=48169026;
 //BA.debugLineNum = 48169026;BA.debugLine="laCantc.Text = laCantc.Text - 1";
_lacantc.setText(BA.ObjectToCharSequence((double)(Double.parseDouble(_lacantc.getText()))-1));
RDebugUtils.currentLine=48169027;
 //BA.debugLineNum = 48169027;BA.debugLine="If laCantc.Text < 0 Then laCantc.Text = 0";
if ((double)(Double.parseDouble(_lacantc.getText()))<0) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=48169028;
 //BA.debugLineNum = 48169028;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 }else 
{RDebugUtils.currentLine=48169030;
 //BA.debugLineNum = 48169030;BA.debugLine="Else If laCantc.Text = 0 Then";
if ((_lacantc.getText()).equals(BA.NumberToString(0))) { 
 }}
;
 };
 };
RDebugUtils.currentLine=48169036;
 //BA.debugLineNum = 48169036;BA.debugLine="Dim preciou As Float = esteTag.Get(0)/esteTag.Get";
_preciou = (float) ((double)(BA.ObjectToNumber(_estetag.Get((int) (0))))/(double)(double)(BA.ObjectToNumber(_estetag.Get((int) (1)))));
RDebugUtils.currentLine=48169037;
 //BA.debugLineNum = 48169037;BA.debugLine="Log(\"PU: \" & preciou)";
__c.LogImpl("248169037","PU: "+BA.NumberToString(_preciou),0);
RDebugUtils.currentLine=48169038;
 //BA.debugLineNum = 48169038;BA.debugLine="End Sub";
return "";
}
public String  _b_regresar_click(reparto_intmex.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "b_regresar_click", false))
	 {return ((String) Debug.delegate(ba, "b_regresar_click", null));}
RDebugUtils.currentLine=47316992;
 //BA.debugLineNum = 47316992;BA.debugLine="Sub b_regresar_Click";
RDebugUtils.currentLine=47316993;
 //BA.debugLineNum = 47316993;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=47316994;
 //BA.debugLineNum = 47316994;BA.debugLine="End Sub";
return "";
}
public String  _b_revversar_click(reparto_intmex.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "b_revversar_click", false))
	 {return ((String) Debug.delegate(ba, "b_revversar_click", null));}
anywheresoftware.b4a.sql.SQL.CursorWrapper _c3 = null;
RDebugUtils.currentLine=48300032;
 //BA.debugLineNum = 48300032;BA.debugLine="Private Sub b_revversar_Click";
RDebugUtils.currentLine=48300033;
 //BA.debugLineNum = 48300033;BA.debugLine="Private c3 As Cursor = Starter.skmt.ExecQuery(\"SE";
_c3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c3 = (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 * FROM PEDIDO WHERE PE_CLIENTEOR IN (SELECT CUENTA FROM CUENTAA)")));
RDebugUtils.currentLine=48300034;
 //BA.debugLineNum = 48300034;BA.debugLine="If c3.RowCount = 0 Then";
if (_c3.getRowCount()==0) { 
RDebugUtils.currentLine=48300035;
 //BA.debugLineNum = 48300035;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTAS s";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 0,  HVD_RECHAZOCANT = 0, BCAJAS = BCAJAS_OR, CANTC = CANTC_OR  WHERE HVD_cliente in (Select CUENTA from cuentaa)"));
RDebugUtils.currentLine=48300036;
 //BA.debugLineNum = 48300036;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 }else {
RDebugUtils.currentLine=48300038;
 //BA.debugLineNum = 48300038;BA.debugLine="MsgboxAsync(\"Hay productos que ya se vendieron,";
__c.MsgboxAsync(BA.ObjectToCharSequence("Hay productos que ya se vendieron, no se puede regresar la venta"),BA.ObjectToCharSequence("Atención"),ba);
 };
RDebugUtils.currentLine=48300042;
 //BA.debugLineNum = 48300042;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.objects.PanelWrapper  _createlistitem(reparto_intmex.keymon.lat.c_detalleventa __ref,String _text,String _preciou,int _inv,int _inv2,int _width,int _height,anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _img,String _prodid,int _bc,int _tc,String _promo,String _cliente_original,String _clienterecha,String _bandera,int _consecutivo) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "createlistitem", false))
	 {return ((anywheresoftware.b4a.objects.PanelWrapper) Debug.delegate(ba, "createlistitem", new Object[] {_text,_preciou,_inv,_inv2,_width,_height,_img,_prodid,_bc,_tc,_promo,_cliente_original,_clienterecha,_bandera,_consecutivo}));}
anywheresoftware.b4a.objects.B4XViewWrapper _p = null;
anywheresoftware.b4a.objects.CSBuilder _cs = null;
RDebugUtils.currentLine=47579136;
 //BA.debugLineNum = 47579136;BA.debugLine="Sub CreateListItem(Text As String, precioU As Stri";
RDebugUtils.currentLine=47579137;
 //BA.debugLineNum = 47579137;BA.debugLine="Dim p As B4XView = xui.CreatePanel(\"\")";
_p = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p = __ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .CreatePanel(ba,"");
RDebugUtils.currentLine=47579138;
 //BA.debugLineNum = 47579138;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=47579139;
 //BA.debugLineNum = 47579139;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=47579140;
 //BA.debugLineNum = 47579140;BA.debugLine="p.SetLayoutAnimated(0, 0, 0, Width, Height)";
_p.SetLayoutAnimated((int) (0),(int) (0),(int) (0),_width,_height);
RDebugUtils.currentLine=47579141;
 //BA.debugLineNum = 47579141;BA.debugLine="p.LoadLayout(\"prodItem2\")";
_p.LoadLayout("prodItem2",ba);
RDebugUtils.currentLine=47579142;
 //BA.debugLineNum = 47579142;BA.debugLine="p_prods.Color = bc";
__ref._p_prods /*anywheresoftware.b4a.objects.PanelWrapper*/ .setColor(_bc);
RDebugUtils.currentLine=47579143;
 //BA.debugLineNum = 47579143;BA.debugLine="l_prodX.TextColor = tc";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor(_tc);
RDebugUtils.currentLine=47579144;
 //BA.debugLineNum = 47579144;BA.debugLine="precioU = $\"$1.2{precioU}\"$";
_preciou = (""+__c.SmartStringFormatter("1.2",(Object)(_preciou))+"");
RDebugUtils.currentLine=47579145;
 //BA.debugLineNum = 47579145;BA.debugLine="l_prodX.Text = Text&CRLF&\"Cant: \" & inv2 & \"   $\"";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_text+__c.CRLF+"Cant: "+BA.NumberToString(_inv2)+"   $"+_preciou));
RDebugUtils.currentLine=47579146;
 //BA.debugLineNum = 47579146;BA.debugLine="If promo <> \"1\" And precioU = 0 Then";
if ((_promo).equals("1") == false && (_preciou).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=47579147;
 //BA.debugLineNum = 47579147;BA.debugLine="l_prodX.Text = cs.Color(Colors.RGB(123,0,0)).app";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_cs.Color(__c.Colors.RGB((int) (123),(int) (0),(int) (0))).Append(BA.ObjectToCharSequence(_text+__c.CRLF+"Cant: "+BA.NumberToString(_inv2)+"   $"+_preciou)).PopAll().getObject()));
 };
RDebugUtils.currentLine=47579149;
 //BA.debugLineNum = 47579149;BA.debugLine="l_prodX.Tag = $\"ID: ${prodId}${CRLF}${Text}${CRLF";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTag((Object)(("ID: "+__c.SmartStringFormatter("",(Object)(_prodid))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+""+__c.SmartStringFormatter("",(Object)(_text))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Precio: $"+__c.SmartStringFormatter("1.2",(Object)(_preciou))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Inv: "+__c.SmartStringFormatter("",(Object)(_inv))+" pzs")));
RDebugUtils.currentLine=47579152;
 //BA.debugLineNum = 47579152;BA.debugLine="l_pCant.Tag = Round2(precioU.Replace(\",\",\"\"),2)&\"";
__ref._l_pcant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTag((Object)(BA.NumberToString(__c.Round2((double)(Double.parseDouble(_preciou.replace(",",""))),(int) (2)))+"|"+BA.NumberToString(_inv)+"|"+_prodid+"|"+_promo+"|"+BA.NumberToString(_inv2)+"|"+_cliente_original+"|"+_clienterecha+"|"+_bandera+"|"+BA.NumberToString(_consecutivo)));
RDebugUtils.currentLine=47579153;
 //BA.debugLineNum = 47579153;BA.debugLine="et_pCant.Tag = Round2(precioU.Replace(\",\",\"\"),2)&";
__ref._et_pcant /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setTag((Object)(BA.NumberToString(__c.Round2((double)(Double.parseDouble(_preciou.replace(",",""))),(int) (2)))+"|"+BA.NumberToString(_inv)+"|"+_prodid+"|"+_promo+"|"+BA.NumberToString(_inv2)+"|"+_cliente_original+"|"+_clienterecha+"|"+_bandera+"|"+BA.NumberToString(_consecutivo)));
RDebugUtils.currentLine=47579154;
 //BA.debugLineNum = 47579154;BA.debugLine="p_prods.Tag = l_pCant.tag";
__ref._p_prods /*anywheresoftware.b4a.objects.PanelWrapper*/ .setTag(__ref._l_pcant /*anywheresoftware.b4a.objects.LabelWrapper*/ .getTag());
RDebugUtils.currentLine=47579156;
 //BA.debugLineNum = 47579156;BA.debugLine="l_pCant.Text = inv";
__ref._l_pcant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_inv));
RDebugUtils.currentLine=47579160;
 //BA.debugLineNum = 47579160;BA.debugLine="l_pCant.BringToFront";
__ref._l_pcant /*anywheresoftware.b4a.objects.LabelWrapper*/ .BringToFront();
RDebugUtils.currentLine=47579161;
 //BA.debugLineNum = 47579161;BA.debugLine="et_pCant.SendToBack";
__ref._et_pcant /*anywheresoftware.b4a.objects.EditTextWrapper*/ .SendToBack();
RDebugUtils.currentLine=47579162;
 //BA.debugLineNum = 47579162;BA.debugLine="p_botMasMenC.Visible = False";
__ref._p_botmasmenc /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=47579163;
 //BA.debugLineNum = 47579163;BA.debugLine="l_cajas.Visible = False";
__ref._l_cajas /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=47579165;
 //BA.debugLineNum = 47579165;BA.debugLine="Return p";
if (true) return (anywheresoftware.b4a.objects.PanelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.PanelWrapper(), (android.view.ViewGroup)(_p.getObject()));
RDebugUtils.currentLine=47579166;
 //BA.debugLineNum = 47579166;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4a.objects.PanelWrapper  _createlistitem2(reparto_intmex.keymon.lat.c_detalleventa __ref,String _text,String _preciou,int _inv,int _inv2,int _width,int _height,anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _img,String _prodid,int _bc,int _tc,String _promo,String _cliente_original,String _clienterecha,String _bandera,int _consecutivo) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "createlistitem2", false))
	 {return ((anywheresoftware.b4a.objects.PanelWrapper) Debug.delegate(ba, "createlistitem2", new Object[] {_text,_preciou,_inv,_inv2,_width,_height,_img,_prodid,_bc,_tc,_promo,_cliente_original,_clienterecha,_bandera,_consecutivo}));}
anywheresoftware.b4a.objects.B4XViewWrapper _p = null;
anywheresoftware.b4a.objects.CSBuilder _cs = null;
RDebugUtils.currentLine=47644672;
 //BA.debugLineNum = 47644672;BA.debugLine="Sub CreateListItem2(Text As String, precioU As Str";
RDebugUtils.currentLine=47644673;
 //BA.debugLineNum = 47644673;BA.debugLine="Dim p As B4XView = xui.CreatePanel(\"\")";
_p = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p = __ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .CreatePanel(ba,"");
RDebugUtils.currentLine=47644674;
 //BA.debugLineNum = 47644674;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=47644675;
 //BA.debugLineNum = 47644675;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=47644676;
 //BA.debugLineNum = 47644676;BA.debugLine="p.SetLayoutAnimated(0, 0, 0, Width, Height)";
_p.SetLayoutAnimated((int) (0),(int) (0),(int) (0),_width,_height);
RDebugUtils.currentLine=47644677;
 //BA.debugLineNum = 47644677;BA.debugLine="p.LoadLayout(\"prodItem2\")";
_p.LoadLayout("prodItem2",ba);
RDebugUtils.currentLine=47644678;
 //BA.debugLineNum = 47644678;BA.debugLine="p_prods.Color = bc";
__ref._p_prods /*anywheresoftware.b4a.objects.PanelWrapper*/ .setColor(_bc);
RDebugUtils.currentLine=47644679;
 //BA.debugLineNum = 47644679;BA.debugLine="l_prodX.TextColor = tc";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor(_tc);
RDebugUtils.currentLine=47644680;
 //BA.debugLineNum = 47644680;BA.debugLine="precioU = $\"$1.2{precioU}\"$";
_preciou = (""+__c.SmartStringFormatter("1.2",(Object)(_preciou))+"");
RDebugUtils.currentLine=47644681;
 //BA.debugLineNum = 47644681;BA.debugLine="l_prodX.Text = Text&CRLF&\"Cant: \" & inv2 & \"   $\"";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_text+__c.CRLF+"Cant: "+BA.NumberToString(_inv2)+"   $"+_preciou));
RDebugUtils.currentLine=47644683;
 //BA.debugLineNum = 47644683;BA.debugLine="If promo <> \"1\" And precioU = 0 Then";
if ((_promo).equals("1") == false && (_preciou).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=47644684;
 //BA.debugLineNum = 47644684;BA.debugLine="l_prodX.Text = cs.Color(Colors.RGB(123,0,0)).app";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_cs.Color(__c.Colors.RGB((int) (123),(int) (0),(int) (0))).Append(BA.ObjectToCharSequence(_text+__c.CRLF+"Cant: "+BA.NumberToString(_inv2)+"   $"+_preciou)).PopAll().getObject()));
 };
RDebugUtils.currentLine=47644686;
 //BA.debugLineNum = 47644686;BA.debugLine="l_prodX.Tag = $\"ID: ${prodId}${CRLF}${Text}${CRLF";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTag((Object)(("ID: "+__c.SmartStringFormatter("",(Object)(_prodid))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+""+__c.SmartStringFormatter("",(Object)(_text))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Precio: $"+__c.SmartStringFormatter("1.2",(Object)(_preciou))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Inv: "+__c.SmartStringFormatter("",(Object)(_inv))+" pzs")));
RDebugUtils.currentLine=47644688;
 //BA.debugLineNum = 47644688;BA.debugLine="l_pCantC.Tag = Round2(precioU.Replace(\",\",\"\"),2)&";
__ref._l_pcantc /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTag((Object)(BA.NumberToString(__c.Round2((double)(Double.parseDouble(_preciou.replace(",",""))),(int) (2)))+"|"+BA.NumberToString(_inv)+"|"+_prodid+"|"+_promo+"|"+BA.NumberToString(_inv2)+"|"+_cliente_original+"|"+_clienterecha+"|"+_bandera+"|"+BA.NumberToString(_consecutivo)));
RDebugUtils.currentLine=47644689;
 //BA.debugLineNum = 47644689;BA.debugLine="et_pCantC.Tag = Round2(precioU.Replace(\",\",\"\"),2)";
__ref._et_pcantc /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setTag((Object)(BA.NumberToString(__c.Round2((double)(Double.parseDouble(_preciou.replace(",",""))),(int) (2)))+"|"+BA.NumberToString(_inv)+"|"+_prodid+"|"+_promo+"|"+BA.NumberToString(_inv2)+"|"+_cliente_original+"|"+_clienterecha+"|"+_bandera+"|"+BA.NumberToString(_consecutivo)));
RDebugUtils.currentLine=47644690;
 //BA.debugLineNum = 47644690;BA.debugLine="p_prods.Tag = l_pCantC.tag";
__ref._p_prods /*anywheresoftware.b4a.objects.PanelWrapper*/ .setTag(__ref._l_pcantc /*anywheresoftware.b4a.objects.LabelWrapper*/ .getTag());
RDebugUtils.currentLine=47644692;
 //BA.debugLineNum = 47644692;BA.debugLine="l_pCantC.Text = NumberFormat2(inv/Subs.traeConver";
__ref._l_pcantc /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.NumberFormat2(_inv/(double)(double)(Double.parseDouble(_subs._traeconversion /*String*/ (ba,_prodid))),(int) (0),(int) (0),(int) (0),__c.False)));
RDebugUtils.currentLine=47644696;
 //BA.debugLineNum = 47644696;BA.debugLine="l_pCantC.BringToFront";
__ref._l_pcantc /*anywheresoftware.b4a.objects.LabelWrapper*/ .BringToFront();
RDebugUtils.currentLine=47644697;
 //BA.debugLineNum = 47644697;BA.debugLine="et_pCantC.SendToBack";
__ref._et_pcantc /*anywheresoftware.b4a.objects.EditTextWrapper*/ .SendToBack();
RDebugUtils.currentLine=47644698;
 //BA.debugLineNum = 47644698;BA.debugLine="p_botMasMen.Visible = False";
__ref._p_botmasmen /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=47644699;
 //BA.debugLineNum = 47644699;BA.debugLine="l_piezas.Visible = False";
__ref._l_piezas /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=47644701;
 //BA.debugLineNum = 47644701;BA.debugLine="Return p";
if (true) return (anywheresoftware.b4a.objects.PanelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.PanelWrapper(), (android.view.ViewGroup)(_p.getObject()));
RDebugUtils.currentLine=47644702;
 //BA.debugLineNum = 47644702;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest(reparto_intmex.keymon.lat.c_detalleventa __ref) throws Exception{
RDebugUtils.currentModule="c_detalleventa";
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(reparto_intmex.keymon.lat.c_detalleventa parent,reparto_intmex.keymon.lat.c_detalleventa __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
reparto_intmex.keymon.lat.c_detalleventa __ref;
reparto_intmex.keymon.lat.c_detalleventa parent;

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

    while (true) {
        switch (state) {
            case -1:
{
parent.__c.ReturnFromResumableSub(this,null);return;}
case 0:
//C
this.state = -1;
RDebugUtils.currentLine=47382531;
 //BA.debugLineNum = 47382531;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
parent._b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=47382533;
 //BA.debugLineNum = 47382533;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
RDebugUtils.currentLine=47382534;
 //BA.debugLineNum = 47382534;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b4xpage_created(reparto_intmex.keymon.lat.c_detalleventa __ref,anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "b4xpage_created", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_created", new Object[] {_root1}));}
RDebugUtils.currentLine=47120384;
 //BA.debugLineNum = 47120384;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=47120385;
 //BA.debugLineNum = 47120385;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=47120386;
 //BA.debugLineNum = 47120386;BA.debugLine="B4XPages.SetTitle(Me, \"Detalle de venta\")";
_b4xpages._settitle /*String*/ (ba,this,(Object)("Detalle de venta"));
RDebugUtils.currentLine=47120388;
 //BA.debugLineNum = 47120388;BA.debugLine="g.Initialize(\"GPS\")";
__ref._g /*anywheresoftware.b4a.gps.GPS*/ .Initialize("GPS");
RDebugUtils.currentLine=47120389;
 //BA.debugLineNum = 47120389;BA.debugLine="Root.LoadLayout(\"detalleVenta\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("detalleVenta",ba);
RDebugUtils.currentLine=47120390;
 //BA.debugLineNum = 47120390;BA.debugLine="b_borra.Visible = False";
__ref._b_borra /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=47120391;
 //BA.debugLineNum = 47120391;BA.debugLine="Titulo.Text = \"Pedido\"";
__ref._titulo /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("Pedido"));
RDebugUtils.currentLine=47120392;
 //BA.debugLineNum = 47120392;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(reparto_intmex.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
RDebugUtils.currentLine=46989312;
 //BA.debugLineNum = 46989312;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=46989313;
 //BA.debugLineNum = 46989313;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=46989314;
 //BA.debugLineNum = 46989314;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=46989315;
 //BA.debugLineNum = 46989315;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
RDebugUtils.currentLine=46989316;
 //BA.debugLineNum = 46989316;BA.debugLine="Dim clie_id As String";
_clie_id = "";
RDebugUtils.currentLine=46989317;
 //BA.debugLineNum = 46989317;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
RDebugUtils.currentLine=46989318;
 //BA.debugLineNum = 46989318;BA.debugLine="Dim usuario As String";
_usuario = "";
RDebugUtils.currentLine=46989319;
 //BA.debugLineNum = 46989319;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=46989321;
 //BA.debugLineNum = 46989321;BA.debugLine="Dim b_regresar As Button";
_b_regresar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=46989322;
 //BA.debugLineNum = 46989322;BA.debugLine="Dim ListView1 As ListView";
_listview1 = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=46989323;
 //BA.debugLineNum = 46989323;BA.debugLine="Dim L_CANT As Label";
_l_cant = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=46989324;
 //BA.debugLineNum = 46989324;BA.debugLine="Dim L_TOTAL As Label";
_l_total = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=46989325;
 //BA.debugLineNum = 46989325;BA.debugLine="Dim b_borra As Button";
_b_borra = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=46989326;
 //BA.debugLineNum = 46989326;BA.debugLine="Dim Existe As String";
_existe = "";
RDebugUtils.currentLine=46989327;
 //BA.debugLineNum = 46989327;BA.debugLine="Dim result As String";
_result = "";
RDebugUtils.currentLine=46989329;
 //BA.debugLineNum = 46989329;BA.debugLine="Dim cuantos As String";
_cuantos = "";
RDebugUtils.currentLine=46989330;
 //BA.debugLineNum = 46989330;BA.debugLine="Dim nombre_prod As String";
_nombre_prod = "";
RDebugUtils.currentLine=46989331;
 //BA.debugLineNum = 46989331;BA.debugLine="Dim cuantos_pedido As String";
_cuantos_pedido = "";
RDebugUtils.currentLine=46989332;
 //BA.debugLineNum = 46989332;BA.debugLine="Private Titulo As Label";
_titulo = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=46989333;
 //BA.debugLineNum = 46989333;BA.debugLine="Private P1 As Panel";
_p1 = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=46989334;
 //BA.debugLineNum = 46989334;BA.debugLine="Private lv2 As ListView";
_lv2 = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=46989335;
 //BA.debugLineNum = 46989335;BA.debugLine="Private p_principal As Panel";
_p_principal = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=46989336;
 //BA.debugLineNum = 46989336;BA.debugLine="Dim clv_pedido As CustomListView";
_clv_pedido = new b4a.example3.customlistview();
RDebugUtils.currentLine=46989337;
 //BA.debugLineNum = 46989337;BA.debugLine="Private p_prods As Panel";
_p_prods = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=46989338;
 //BA.debugLineNum = 46989338;BA.debugLine="Private l_prodX As Label";
_l_prodx = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=46989339;
 //BA.debugLineNum = 46989339;BA.debugLine="Private l_pCant As Label";
_l_pcant = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=46989340;
 //BA.debugLineNum = 46989340;BA.debugLine="Private et_pCant As EditText";
_et_pcant = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=46989341;
 //BA.debugLineNum = 46989341;BA.debugLine="Dim bmp As Bitmap";
_bmp = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper();
RDebugUtils.currentLine=46989342;
 //BA.debugLineNum = 46989342;BA.debugLine="Dim etCantHasFocus As Boolean = False";
_etcanthasfocus = __c.False;
RDebugUtils.currentLine=46989343;
 //BA.debugLineNum = 46989343;BA.debugLine="Dim totalProds As Int = 0";
_totalprods = (int) (0);
RDebugUtils.currentLine=46989344;
 //BA.debugLineNum = 46989344;BA.debugLine="Dim totalCompra As Int = 0";
_totalcompra = (int) (0);
RDebugUtils.currentLine=46989345;
 //BA.debugLineNum = 46989345;BA.debugLine="Dim prodsMap As Map";
_prodsmap = new anywheresoftware.b4a.objects.collections.Map();
RDebugUtils.currentLine=46989346;
 //BA.debugLineNum = 46989346;BA.debugLine="Dim reconstruirPedido As Boolean = False";
_reconstruirpedido = __c.False;
RDebugUtils.currentLine=46989347;
 //BA.debugLineNum = 46989347;BA.debugLine="Dim promoABorrar As String";
_promoaborrar = "";
RDebugUtils.currentLine=46989348;
 //BA.debugLineNum = 46989348;BA.debugLine="Private b_guardar As Button";
_b_guardar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=46989349;
 //BA.debugLineNum = 46989349;BA.debugLine="Private b_prodMas As Button";
_b_prodmas = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=46989350;
 //BA.debugLineNum = 46989350;BA.debugLine="Private b_prodMenos As Button";
_b_prodmenos = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=46989351;
 //BA.debugLineNum = 46989351;BA.debugLine="Private b_prodMenosC As Button";
_b_prodmenosc = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=46989352;
 //BA.debugLineNum = 46989352;BA.debugLine="Private l_pCantC As Label";
_l_pcantc = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=46989353;
 //BA.debugLineNum = 46989353;BA.debugLine="Private et_pCantC As EditText";
_et_pcantc = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=46989354;
 //BA.debugLineNum = 46989354;BA.debugLine="Private b_prodMasC As Button";
_b_prodmasc = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=46989355;
 //BA.debugLineNum = 46989355;BA.debugLine="Private p_botMasMenC As Panel";
_p_botmasmenc = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=46989356;
 //BA.debugLineNum = 46989356;BA.debugLine="Private p_botMasMen As Panel";
_p_botmasmen = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=46989357;
 //BA.debugLineNum = 46989357;BA.debugLine="Private l_cajas As Label";
_l_cajas = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=46989358;
 //BA.debugLineNum = 46989358;BA.debugLine="Private l_piezas As Label";
_l_piezas = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=46989359;
 //BA.debugLineNum = 46989359;BA.debugLine="End Sub";
return "";
}
public String  _cuentaprods(reparto_intmex.keymon.lat.c_detalleventa __ref,String _accion) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "cuentaprods", false))
	 {return ((String) Debug.delegate(ba, "cuentaprods", new Object[] {_accion}));}
RDebugUtils.currentLine=47841280;
 //BA.debugLineNum = 47841280;BA.debugLine="Sub cuentaProds(accion As String)";
RDebugUtils.currentLine=47841442;
 //BA.debugLineNum = 47841442;BA.debugLine="End Sub";
return "";
}
public String  _gps_locationchanged(reparto_intmex.keymon.lat.c_detalleventa __ref,anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "gps_locationchanged", false))
	 {return ((String) Debug.delegate(ba, "gps_locationchanged", new Object[] {_location1}));}
RDebugUtils.currentLine=47251456;
 //BA.debugLineNum = 47251456;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
RDebugUtils.currentLine=47251459;
 //BA.debugLineNum = 47251459;BA.debugLine="End Sub";
return "";
}
public String  _l_pcant_click(reparto_intmex.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "l_pcant_click", false))
	 {return ((String) Debug.delegate(ba, "l_pcant_click", null));}
RDebugUtils.currentLine=47972352;
 //BA.debugLineNum = 47972352;BA.debugLine="Private Sub l_pCant_Click";
RDebugUtils.currentLine=47972354;
 //BA.debugLineNum = 47972354;BA.debugLine="End Sub";
return "";
}
public String  _l_pcantc_click(reparto_intmex.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "l_pcantc_click", false))
	 {return ((String) Debug.delegate(ba, "l_pcantc_click", null));}
RDebugUtils.currentLine=48234496;
 //BA.debugLineNum = 48234496;BA.debugLine="Private Sub l_pCantC_Click";
RDebugUtils.currentLine=48234498;
 //BA.debugLineNum = 48234498;BA.debugLine="End Sub";
return "";
}
public String  _listview1_itemlongclick(reparto_intmex.keymon.lat.c_detalleventa __ref,int _position,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "listview1_itemlongclick", false))
	 {return ((String) Debug.delegate(ba, "listview1_itemlongclick", new Object[] {_position,_value}));}
RDebugUtils.currentLine=47448064;
 //BA.debugLineNum = 47448064;BA.debugLine="Sub ListView1_ItemLongClick (Position As Int, Valu";
RDebugUtils.currentLine=47448108;
 //BA.debugLineNum = 47448108;BA.debugLine="End Sub";
return "";
}
public String  _lv2_itemclick(reparto_intmex.keymon.lat.c_detalleventa __ref,int _position,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "lv2_itemclick", false))
	 {return ((String) Debug.delegate(ba, "lv2_itemclick", new Object[] {_position,_value}));}
RDebugUtils.currentLine=47513600;
 //BA.debugLineNum = 47513600;BA.debugLine="Sub lv2_ItemClick (Position As Int, Value As Objec";
RDebugUtils.currentLine=47513661;
 //BA.debugLineNum = 47513661;BA.debugLine="End Sub";
return "";
}
public String  _p_prods_click(reparto_intmex.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "p_prods_click", false))
	 {return ((String) Debug.delegate(ba, "p_prods_click", null));}
RDebugUtils.currentLine=48037888;
 //BA.debugLineNum = 48037888;BA.debugLine="Sub p_prods_Click";
RDebugUtils.currentLine=48037889;
 //BA.debugLineNum = 48037889;BA.debugLine="Log(Sender.As(Panel).tag)";
__c.LogImpl("248037889",BA.ObjectToString(((anywheresoftware.b4a.objects.PanelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.PanelWrapper(), (android.view.ViewGroup)(__c.Sender(ba)))).getTag()),0);
RDebugUtils.currentLine=48037890;
 //BA.debugLineNum = 48037890;BA.debugLine="End Sub";
return "";
}
}