package reparto_mazapa.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_mazapa.keymon.lat.c_detalleventa");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", reparto_mazapa.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_mazapa.keymon.lat.main _main = null;
public reparto_mazapa.keymon.lat.appupdater _appupdater = null;
public reparto_mazapa.keymon.lat.tracker _tracker = null;
public reparto_mazapa.keymon.lat.starter _starter = null;
public reparto_mazapa.keymon.lat.subs _subs = null;
public reparto_mazapa.keymon.lat.firebasemessaging _firebasemessaging = null;
public reparto_mazapa.keymon.lat.foto _foto = null;
public reparto_mazapa.keymon.lat.mapa_cliente _mapa_cliente = null;
public reparto_mazapa.keymon.lat.mapa_rutas _mapa_rutas = null;
public reparto_mazapa.keymon.lat.newinst2 _newinst2 = null;
public reparto_mazapa.keymon.lat.b4xpages _b4xpages = null;
public reparto_mazapa.keymon.lat.b4xcollections _b4xcollections = null;
public reparto_mazapa.keymon.lat.httputils2service _httputils2service = null;
public reparto_mazapa.keymon.lat.xuiviewsutils _xuiviewsutils = null;
public Object  _initialize(reparto_mazapa.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=57147392;
 //BA.debugLineNum = 57147392;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=57147393;
 //BA.debugLineNum = 57147393;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=57147394;
 //BA.debugLineNum = 57147394;BA.debugLine="End Sub";
return null;
}
public String  _gps_locationchanged(reparto_mazapa.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=57344000;
 //BA.debugLineNum = 57344000;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
RDebugUtils.currentLine=57344003;
 //BA.debugLineNum = 57344003;BA.debugLine="End Sub";
return "";
}
public String  _b_guardar_click(reparto_mazapa.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=57999360;
 //BA.debugLineNum = 57999360;BA.debugLine="Private Sub b_guardar_Click";
RDebugUtils.currentLine=57999362;
 //BA.debugLineNum = 57999362;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmas_click(reparto_mazapa.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=57868288;
 //BA.debugLineNum = 57868288;BA.debugLine="Sub b_prodMas_Click";
RDebugUtils.currentLine=57868289;
 //BA.debugLineNum = 57868289;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=57868291;
 //BA.debugLineNum = 57868291;BA.debugLine="LogColor(\"b_prodMas_Click\", Colors.Magenta)";
__c.LogImpl("357868291","b_prodMas_Click",__c.Colors.Magenta);
RDebugUtils.currentLine=57868292;
 //BA.debugLineNum = 57868292;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=57868293;
 //BA.debugLineNum = 57868293;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=57868294;
 //BA.debugLineNum = 57868294;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=57868295;
 //BA.debugLineNum = 57868295;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=57868299;
 //BA.debugLineNum = 57868299;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=57868300;
 //BA.debugLineNum = 57868300;BA.debugLine="Log(\"LC_TEXT:\"&laCant.Text&\"|LC_TAG:\"&laCant.Tag&";
__c.LogImpl("357868300","LC_TEXT:"+_lacant.getText()+"|LC_TAG:"+BA.ObjectToString(_lacant.getTag())+"|ET:"+BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=57868301;
 //BA.debugLineNum = 57868301;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=57868303;
 //BA.debugLineNum = 57868303;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=57868305;
 //BA.debugLineNum = 57868305;BA.debugLine="LogColor($\"++++++++++++++++++++++++++   ${esteTag";
__c.LogImpl("357868305",("++++++++++++++++++++++++++   "+__c.SmartStringFormatter("",(Object)(_estetag.getObject()))+""),__c.Colors.Green);
RDebugUtils.currentLine=57868308;
 //BA.debugLineNum = 57868308;BA.debugLine="Private minimoadesc As String";
_minimoadesc = "";
RDebugUtils.currentLine=57868309;
 //BA.debugLineNum = 57868309;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=57868310;
 //BA.debugLineNum = 57868310;BA.debugLine="If minimos.RowCount > 0 Then";
if (_minimos.getRowCount()>0) { 
RDebugUtils.currentLine=57868311;
 //BA.debugLineNum = 57868311;BA.debugLine="minimos.Position = 0";
_minimos.setPosition((int) (0));
RDebugUtils.currentLine=57868312;
 //BA.debugLineNum = 57868312;BA.debugLine="minimoadesc = minimos.GetString(\"CAT_DP_CANT_MIN";
_minimoadesc = _minimos.GetString("CAT_DP_CANT_MIN_VENTA");
 }else {
RDebugUtils.currentLine=57868314;
 //BA.debugLineNum = 57868314;BA.debugLine="minimoadesc = \"1\"";
_minimoadesc = "1";
 };
RDebugUtils.currentLine=57868316;
 //BA.debugLineNum = 57868316;BA.debugLine="minimos.Close";
_minimos.Close();
RDebugUtils.currentLine=57868319;
 //BA.debugLineNum = 57868319;BA.debugLine="If esteTag.Get(7) <> \"1\" Then";
if ((_estetag.Get((int) (7))).equals((Object)("1")) == false) { 
RDebugUtils.currentLine=57868322;
 //BA.debugLineNum = 57868322;BA.debugLine="If esteTag.Get(5) = esteTag.Get(6) Then";
if ((_estetag.Get((int) (5))).equals(_estetag.Get((int) (6)))) { 
RDebugUtils.currentLine=57868324;
 //BA.debugLineNum = 57868324;BA.debugLine="If laCant.Text + 1 <= maxProds Then";
if ((double)(Double.parseDouble(_lacant.getText()))+1<=(double)(Double.parseDouble(_maxprods))) { 
RDebugUtils.currentLine=57868325;
 //BA.debugLineNum = 57868325;BA.debugLine="Log($\"NuevaCant = ${laCant.Text + 1}\"$)";
__c.LogImpl("357868325",("NuevaCant = "+__c.SmartStringFormatter("",(Object)((double)(Double.parseDouble(_lacant.getText()))+1))+""),0);
RDebugUtils.currentLine=57868326;
 //BA.debugLineNum = 57868326;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=57868327;
 //BA.debugLineNum = 57868327;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=57868330;
 //BA.debugLineNum = 57868330;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=57868332;
 //BA.debugLineNum = 57868332;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=57868337;
 //BA.debugLineNum = 57868337;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }else {
RDebugUtils.currentLine=57868341;
 //BA.debugLineNum = 57868341;BA.debugLine="If laCant.Text + 1 <= maxProds Then";
if ((double)(Double.parseDouble(_lacant.getText()))+1<=(double)(Double.parseDouble(_maxprods))) { 
RDebugUtils.currentLine=57868342;
 //BA.debugLineNum = 57868342;BA.debugLine="Log($\"NuevaCant = ${laCant.Text + 1}\"$)";
__c.LogImpl("357868342",("NuevaCant = "+__c.SmartStringFormatter("",(Object)((double)(Double.parseDouble(_lacant.getText()))+1))+""),0);
RDebugUtils.currentLine=57868343;
 //BA.debugLineNum = 57868343;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=57868344;
 //BA.debugLineNum = 57868344;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=57868345;
 //BA.debugLineNum = 57868345;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=57868346;
 //BA.debugLineNum = 57868346;BA.debugLine="If c.RowCount > 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=57868347;
 //BA.debugLineNum = 57868347;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=57868348;
 //BA.debugLineNum = 57868348;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=57868349;
 //BA.debugLineNum = 57868349;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=57868351;
 //BA.debugLineNum = 57868351;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=57868354;
 //BA.debugLineNum = 57868354;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=57868355;
 //BA.debugLineNum = 57868355;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=57868356;
 //BA.debugLineNum = 57868356;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=57868358;
 //BA.debugLineNum = 57868358;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=57868363;
 //BA.debugLineNum = 57868363;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=57868368;
 //BA.debugLineNum = 57868368;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 };
 };
RDebugUtils.currentLine=57868387;
 //BA.debugLineNum = 57868387;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear(reparto_mazapa.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=57278464;
 //BA.debugLineNum = 57278464;BA.debugLine="Sub B4XPage_Appear";
RDebugUtils.currentLine=57278465;
 //BA.debugLineNum = 57278465;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=57278469;
 //BA.debugLineNum = 57278469;BA.debugLine="L_CANT.Text =\"\"";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=57278470;
 //BA.debugLineNum = 57278470;BA.debugLine="L_TOTAL.Text=\"\"";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=57278471;
 //BA.debugLineNum = 57278471;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=57278472;
 //BA.debugLineNum = 57278472;BA.debugLine="C.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=57278473;
 //BA.debugLineNum = 57278473;BA.debugLine="Existe = C.GetString(\"EXISTE\")";
__ref._existe /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("EXISTE");
RDebugUtils.currentLine=57278474;
 //BA.debugLineNum = 57278474;BA.debugLine="C.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=57278476;
 //BA.debugLineNum = 57278476;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=57278477;
 //BA.debugLineNum = 57278477;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=57278478;
 //BA.debugLineNum = 57278478;BA.debugLine="clv_pedido.Clear";
__ref._clv_pedido /*b4a.example3.customlistview*/ ._clear();
RDebugUtils.currentLine=57278479;
 //BA.debugLineNum = 57278479;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=57278480;
 //BA.debugLineNum = 57278480;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=57278481;
 //BA.debugLineNum = 57278481;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=57278483;
 //BA.debugLineNum = 57278483;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=57278486;
 //BA.debugLineNum = 57278486;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=57278487;
 //BA.debugLineNum = 57278487;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=57278489;
 //BA.debugLineNum = 57278489;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=57278490;
 //BA.debugLineNum = 57278490;BA.debugLine="If c4.RowCount > 0 Then";
if (_c4.getRowCount()>0) { 
RDebugUtils.currentLine=57278491;
 //BA.debugLineNum = 57278491;BA.debugLine="c4.Position = 0";
_c4.setPosition((int) (0));
RDebugUtils.currentLine=57278492;
 //BA.debugLineNum = 57278492;BA.debugLine="Private cantres As Int = c4.GetString(\"PE_CANT";
_cantres = (int)(Double.parseDouble(_c4.GetString("PE_CANT")));
 }else {
RDebugUtils.currentLine=57278494;
 //BA.debugLineNum = 57278494;BA.debugLine="cantres = 0";
_cantres = (int) (0);
 };
RDebugUtils.currentLine=57278497;
 //BA.debugLineNum = 57278497;BA.debugLine="If c.GetString(\"BCAJAS\") = \"0\" Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("BCAJAS")).equals("0")) { 
RDebugUtils.currentLine=57278498;
 //BA.debugLineNum = 57278498;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=57278500;
 //BA.debugLineNum = 57278500;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=57278501;
 //BA.debugLineNum = 57278501;BA.debugLine="Private cant2 As Int = 0";
_cant2 = (int) (0);
RDebugUtils.currentLine=57278502;
 //BA.debugLineNum = 57278502;BA.debugLine="If oc.RowCount > 0 Then";
if (_oc.getRowCount()>0) { 
RDebugUtils.currentLine=57278503;
 //BA.debugLineNum = 57278503;BA.debugLine="oc.Position = 0";
_oc.setPosition((int) (0));
RDebugUtils.currentLine=57278504;
 //BA.debugLineNum = 57278504;BA.debugLine="cant2 = oc.GetString(\"HVD_CANT\")";
_cant2 = (int)(Double.parseDouble(_oc.GetString("HVD_CANT")));
 };
RDebugUtils.currentLine=57278506;
 //BA.debugLineNum = 57278506;BA.debugLine="oc.Close";
_oc.Close();
RDebugUtils.currentLine=57278507;
 //BA.debugLineNum = 57278507;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=57278508;
 //BA.debugLineNum = 57278508;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=57278509;
 //BA.debugLineNum = 57278509;BA.debugLine="label1.TextSize = 12";
_label1.setTextSize((float) (12));
RDebugUtils.currentLine=57278510;
 //BA.debugLineNum = 57278510;BA.debugLine="label1.TextColor = Colors.black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=57278511;
 //BA.debugLineNum = 57278511;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=57278512;
 //BA.debugLineNum = 57278512;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=57278513;
 //BA.debugLineNum = 57278513;BA.debugLine="label2.TextSize = 12";
_label2.setTextSize((float) (12));
RDebugUtils.currentLine=57278514;
 //BA.debugLineNum = 57278514;BA.debugLine="label2.TextColor = Colors.black";
_label2.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=57278515;
 //BA.debugLineNum = 57278515;BA.debugLine="Private bgColor, textColor As Int";
_bgcolor = 0;
_textcolor = 0;
RDebugUtils.currentLine=57278516;
 //BA.debugLineNum = 57278516;BA.debugLine="bgColor = Colors.RGB(177, 200, 249)'azul";
_bgcolor = __c.Colors.RGB((int) (177),(int) (200),(int) (249));
RDebugUtils.currentLine=57278517;
 //BA.debugLineNum = 57278517;BA.debugLine="textColor = Colors.black";
_textcolor = __c.Colors.Black;
RDebugUtils.currentLine=57278518;
 //BA.debugLineNum = 57278518;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=57278520;
 //BA.debugLineNum = 57278520;BA.debugLine="bgColor = Colors.White";
_bgcolor = __c.Colors.White;
 };
RDebugUtils.currentLine=57278524;
 //BA.debugLineNum = 57278524;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=57278527;
 //BA.debugLineNum = 57278527;BA.debugLine="Else If c.GetString(\"BCAJAS\") = \"1\" Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("BCAJAS")).equals("1")) { 
RDebugUtils.currentLine=57278528;
 //BA.debugLineNum = 57278528;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=57278530;
 //BA.debugLineNum = 57278530;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=57278531;
 //BA.debugLineNum = 57278531;BA.debugLine="Private cant2 As Int = 0";
_cant2 = (int) (0);
RDebugUtils.currentLine=57278532;
 //BA.debugLineNum = 57278532;BA.debugLine="If oc.RowCount > 0 Then";
if (_oc.getRowCount()>0) { 
RDebugUtils.currentLine=57278533;
 //BA.debugLineNum = 57278533;BA.debugLine="oc.Position = 0";
_oc.setPosition((int) (0));
RDebugUtils.currentLine=57278534;
 //BA.debugLineNum = 57278534;BA.debugLine="cant2 = oc.GetString(\"HVD_CANT\")";
_cant2 = (int)(Double.parseDouble(_oc.GetString("HVD_CANT")));
 };
RDebugUtils.currentLine=57278536;
 //BA.debugLineNum = 57278536;BA.debugLine="oc.Close";
_oc.Close();
RDebugUtils.currentLine=57278537;
 //BA.debugLineNum = 57278537;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=57278538;
 //BA.debugLineNum = 57278538;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=57278539;
 //BA.debugLineNum = 57278539;BA.debugLine="label1.TextSize = 12";
_label1.setTextSize((float) (12));
RDebugUtils.currentLine=57278540;
 //BA.debugLineNum = 57278540;BA.debugLine="label1.TextColor = Colors.black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=57278541;
 //BA.debugLineNum = 57278541;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=57278542;
 //BA.debugLineNum = 57278542;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=57278543;
 //BA.debugLineNum = 57278543;BA.debugLine="label2.TextSize = 12";
_label2.setTextSize((float) (12));
RDebugUtils.currentLine=57278544;
 //BA.debugLineNum = 57278544;BA.debugLine="label2.TextColor = Colors.black";
_label2.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=57278545;
 //BA.debugLineNum = 57278545;BA.debugLine="Private bgColor, textColor As Int";
_bgcolor = 0;
_textcolor = 0;
RDebugUtils.currentLine=57278546;
 //BA.debugLineNum = 57278546;BA.debugLine="bgColor = Colors.RGB(177, 200, 249)'azul";
_bgcolor = __c.Colors.RGB((int) (177),(int) (200),(int) (249));
RDebugUtils.currentLine=57278547;
 //BA.debugLineNum = 57278547;BA.debugLine="textColor = Colors.black";
_textcolor = __c.Colors.Black;
RDebugUtils.currentLine=57278548;
 //BA.debugLineNum = 57278548;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=57278550;
 //BA.debugLineNum = 57278550;BA.debugLine="bgColor = Colors.White";
_bgcolor = __c.Colors.White;
 };
RDebugUtils.currentLine=57278554;
 //BA.debugLineNum = 57278554;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=57278562;
 //BA.debugLineNum = 57278562;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=57278563;
 //BA.debugLineNum = 57278563;BA.debugLine="If c3.RowCount>0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=57278564;
 //BA.debugLineNum = 57278564;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=57278565;
 //BA.debugLineNum = 57278565;BA.debugLine="c3.Position = i";
_c3.setPosition(_i);
RDebugUtils.currentLine=57278566;
 //BA.debugLineNum = 57278566;BA.debugLine="If c3.GetString(\"PE_BCAJAS\") = \"1\" Then";
if ((_c3.GetString("PE_BCAJAS")).equals("1")) { 
RDebugUtils.currentLine=57278567;
 //BA.debugLineNum = 57278567;BA.debugLine="Private bgColor, textColor As Int";
_bgcolor = 0;
_textcolor = 0;
RDebugUtils.currentLine=57278568;
 //BA.debugLineNum = 57278568;BA.debugLine="bgColor = Colors.RGB(221, 132, 132)'rosa";
_bgcolor = __c.Colors.RGB((int) (221),(int) (132),(int) (132));
RDebugUtils.currentLine=57278569;
 //BA.debugLineNum = 57278569;BA.debugLine="textColor = Colors.black";
_textcolor = __c.Colors.Black;
RDebugUtils.currentLine=57278570;
 //BA.debugLineNum = 57278570;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=57278571;
 //BA.debugLineNum = 57278571;BA.debugLine="Log(\"#####################\"&c3.GetString(\"PE_P";
__c.LogImpl("357278571","#####################"+_c3.GetString("PE_PRONOMBRE")+","+_c3.GetString("PE_CANT"),0);
 }else {
RDebugUtils.currentLine=57278573;
 //BA.debugLineNum = 57278573;BA.debugLine="Private bgColor, textColor As Int";
_bgcolor = 0;
_textcolor = 0;
RDebugUtils.currentLine=57278574;
 //BA.debugLineNum = 57278574;BA.debugLine="bgColor = Colors.RGB(221, 132, 132)'rosa";
_bgcolor = __c.Colors.RGB((int) (221),(int) (132),(int) (132));
RDebugUtils.currentLine=57278575;
 //BA.debugLineNum = 57278575;BA.debugLine="textColor = Colors.black";
_textcolor = __c.Colors.Black;
RDebugUtils.currentLine=57278576;
 //BA.debugLineNum = 57278576;BA.debugLine="Log(\"#####################\"&c3.GetString(\"PE_P";
__c.LogImpl("357278576","#####################"+_c3.GetString("PE_PRONOMBRE")+","+_c3.GetString("PE_CANT"),0);
RDebugUtils.currentLine=57278577;
 //BA.debugLineNum = 57278577;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=57278583;
 //BA.debugLineNum = 57278583;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=57278585;
 //BA.debugLineNum = 57278585;BA.debugLine="Private Cuenta As String = 0";
_cuenta = BA.NumberToString(0);
RDebugUtils.currentLine=57278586;
 //BA.debugLineNum = 57278586;BA.debugLine="Private arti As String = 0";
_arti = BA.NumberToString(0);
RDebugUtils.currentLine=57278587;
 //BA.debugLineNum = 57278587;BA.debugLine="If vc.RowCount > 0 Then";
if (_vc.getRowCount()>0) { 
RDebugUtils.currentLine=57278588;
 //BA.debugLineNum = 57278588;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=57278589;
 //BA.debugLineNum = 57278589;BA.debugLine="vc.Position = i";
_vc.setPosition(_i);
RDebugUtils.currentLine=57278590;
 //BA.debugLineNum = 57278590;BA.debugLine="Private cantres As Int = 0";
_cantres = (int) (0);
RDebugUtils.currentLine=57278591;
 //BA.debugLineNum = 57278591;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=57278592;
 //BA.debugLineNum = 57278592;BA.debugLine="If c4.RowCount > 0 Then";
if (_c4.getRowCount()>0) { 
RDebugUtils.currentLine=57278593;
 //BA.debugLineNum = 57278593;BA.debugLine="c4.Position = 0";
_c4.setPosition((int) (0));
RDebugUtils.currentLine=57278594;
 //BA.debugLineNum = 57278594;BA.debugLine="cantres = c4.GetString(\"PE_CANT\")";
_cantres = (int)(Double.parseDouble(_c4.GetString("PE_CANT")));
RDebugUtils.currentLine=57278595;
 //BA.debugLineNum = 57278595;BA.debugLine="Log(c4.GetString(\"PE_CANT\"))";
__c.LogImpl("357278595",_c4.GetString("PE_CANT"),0);
 }else {
RDebugUtils.currentLine=57278597;
 //BA.debugLineNum = 57278597;BA.debugLine="cantres = 0";
_cantres = (int) (0);
 };
RDebugUtils.currentLine=57278602;
 //BA.debugLineNum = 57278602;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=57278603;
 //BA.debugLineNum = 57278603;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=57278610;
 //BA.debugLineNum = 57278610;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=57278611;
 //BA.debugLineNum = 57278611;BA.debugLine="Private Cuenta1 As String = 0";
_cuenta1 = BA.NumberToString(0);
RDebugUtils.currentLine=57278612;
 //BA.debugLineNum = 57278612;BA.debugLine="Private arti1 As String = 0";
_arti1 = BA.NumberToString(0);
RDebugUtils.currentLine=57278613;
 //BA.debugLineNum = 57278613;BA.debugLine="If vc2.RowCount > 0 Then";
if (_vc2.getRowCount()>0) { 
RDebugUtils.currentLine=57278614;
 //BA.debugLineNum = 57278614;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=57278615;
 //BA.debugLineNum = 57278615;BA.debugLine="vc2.Position = i";
_vc2.setPosition(_i);
RDebugUtils.currentLine=57278616;
 //BA.debugLineNum = 57278616;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=57278617;
 //BA.debugLineNum = 57278617;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=57278618;
 //BA.debugLineNum = 57278618;BA.debugLine="If vc3.RowCount > 0 Then";
if (_vc3.getRowCount()>0) { 
RDebugUtils.currentLine=57278619;
 //BA.debugLineNum = 57278619;BA.debugLine="vc3.Position = 0";
_vc3.setPosition((int) (0));
RDebugUtils.currentLine=57278620;
 //BA.debugLineNum = 57278620;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=57278621;
 //BA.debugLineNum = 57278621;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=57278627;
 //BA.debugLineNum = 57278627;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=57278628;
 //BA.debugLineNum = 57278628;BA.debugLine="Private Cuenta2 As String = 0";
_cuenta2 = BA.NumberToString(0);
RDebugUtils.currentLine=57278629;
 //BA.debugLineNum = 57278629;BA.debugLine="Private arti2 As String = 0";
_arti2 = BA.NumberToString(0);
RDebugUtils.currentLine=57278630;
 //BA.debugLineNum = 57278630;BA.debugLine="If vc4.RowCount > 0 Then";
if (_vc4.getRowCount()>0) { 
RDebugUtils.currentLine=57278632;
 //BA.debugLineNum = 57278632;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=57278633;
 //BA.debugLineNum = 57278633;BA.debugLine="vc4.Position = i";
_vc4.setPosition(_i);
RDebugUtils.currentLine=57278634;
 //BA.debugLineNum = 57278634;BA.debugLine="If vc4.GetString(\"HVD_PROID\") <> vc4.GetString(";
if ((_vc4.GetString("HVD_PROID")).equals(_vc4.GetString("HVD_CODPROMO")) == false) { 
RDebugUtils.currentLine=57278635;
 //BA.debugLineNum = 57278635;BA.debugLine="If vc4.GetString(\"HVD_RECHAZO\") = 0 Then";
if ((_vc4.GetString("HVD_RECHAZO")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=57278636;
 //BA.debugLineNum = 57278636;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=57278637;
 //BA.debugLineNum = 57278637;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=57278639;
 //BA.debugLineNum = 57278639;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=57278640;
 //BA.debugLineNum = 57278640;BA.debugLine="If vc5.RowCount > 0 Then";
if (_vc5.getRowCount()>0) { 
RDebugUtils.currentLine=57278641;
 //BA.debugLineNum = 57278641;BA.debugLine="vc5.Position= 0";
_vc5.setPosition((int) (0));
RDebugUtils.currentLine=57278643;
 //BA.debugLineNum = 57278643;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=57278644;
 //BA.debugLineNum = 57278644;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=57278655;
 //BA.debugLineNum = 57278655;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=57278656;
 //BA.debugLineNum = 57278656;BA.debugLine="Private Cuenta3 As String = 0";
_cuenta3 = BA.NumberToString(0);
RDebugUtils.currentLine=57278657;
 //BA.debugLineNum = 57278657;BA.debugLine="Private arti3 As String = 0";
_arti3 = BA.NumberToString(0);
RDebugUtils.currentLine=57278658;
 //BA.debugLineNum = 57278658;BA.debugLine="If c4.RowCount > 0 Then";
if (_c4.getRowCount()>0) { 
RDebugUtils.currentLine=57278659;
 //BA.debugLineNum = 57278659;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=57278660;
 //BA.debugLineNum = 57278660;BA.debugLine="c4.Position = i";
_c4.setPosition(_i);
RDebugUtils.currentLine=57278661;
 //BA.debugLineNum = 57278661;BA.debugLine="arti3 = arti3 + c4.GetString(\"PE_CANT\")";
_arti3 = BA.NumberToString((double)(Double.parseDouble(_arti3))+(double)(Double.parseDouble(_c4.GetString("PE_CANT"))));
RDebugUtils.currentLine=57278662;
 //BA.debugLineNum = 57278662;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=57278666;
 //BA.debugLineNum = 57278666;BA.debugLine="If Cuenta < 0 Then";
if ((double)(Double.parseDouble(_cuenta))<0) { 
RDebugUtils.currentLine=57278667;
 //BA.debugLineNum = 57278667;BA.debugLine="Cuenta = 0";
_cuenta = BA.NumberToString(0);
 };
RDebugUtils.currentLine=57278669;
 //BA.debugLineNum = 57278669;BA.debugLine="If Cuenta1 < 0 Then";
if ((double)(Double.parseDouble(_cuenta1))<0) { 
RDebugUtils.currentLine=57278670;
 //BA.debugLineNum = 57278670;BA.debugLine="Cuenta = 0";
_cuenta = BA.NumberToString(0);
 };
RDebugUtils.currentLine=57278672;
 //BA.debugLineNum = 57278672;BA.debugLine="If Cuenta2 < 0 Then";
if ((double)(Double.parseDouble(_cuenta2))<0) { 
RDebugUtils.currentLine=57278673;
 //BA.debugLineNum = 57278673;BA.debugLine="Cuenta = 0";
_cuenta = BA.NumberToString(0);
 };
RDebugUtils.currentLine=57278675;
 //BA.debugLineNum = 57278675;BA.debugLine="If Cuenta3 < 0 Then";
if ((double)(Double.parseDouble(_cuenta3))<0) { 
RDebugUtils.currentLine=57278676;
 //BA.debugLineNum = 57278676;BA.debugLine="Cuenta = 0";
_cuenta = BA.NumberToString(0);
 };
RDebugUtils.currentLine=57278679;
 //BA.debugLineNum = 57278679;BA.debugLine="If arti < 0 Then";
if ((double)(Double.parseDouble(_arti))<0) { 
RDebugUtils.currentLine=57278680;
 //BA.debugLineNum = 57278680;BA.debugLine="arti = 0";
_arti = BA.NumberToString(0);
 };
RDebugUtils.currentLine=57278682;
 //BA.debugLineNum = 57278682;BA.debugLine="If arti1 < 0 Then";
if ((double)(Double.parseDouble(_arti1))<0) { 
RDebugUtils.currentLine=57278683;
 //BA.debugLineNum = 57278683;BA.debugLine="arti = 0";
_arti = BA.NumberToString(0);
 };
RDebugUtils.currentLine=57278685;
 //BA.debugLineNum = 57278685;BA.debugLine="If arti2 < 0 Then";
if ((double)(Double.parseDouble(_arti2))<0) { 
RDebugUtils.currentLine=57278686;
 //BA.debugLineNum = 57278686;BA.debugLine="arti = 0";
_arti = BA.NumberToString(0);
 };
RDebugUtils.currentLine=57278688;
 //BA.debugLineNum = 57278688;BA.debugLine="If arti3 < 0 Then";
if ((double)(Double.parseDouble(_arti3))<0) { 
RDebugUtils.currentLine=57278689;
 //BA.debugLineNum = 57278689;BA.debugLine="arti = 0";
_arti = BA.NumberToString(0);
 };
RDebugUtils.currentLine=57278692;
 //BA.debugLineNum = 57278692;BA.debugLine="Log(Cuenta&\",\"&Cuenta1&\",\"&Cuenta2&\",\"&Cuenta3)";
__c.LogImpl("357278692",_cuenta+","+_cuenta1+","+_cuenta2+","+_cuenta3,0);
RDebugUtils.currentLine=57278693;
 //BA.debugLineNum = 57278693;BA.debugLine="Log(arti&\",\"&arti1&\",\"&arti2&\",\"&arti3)";
__c.LogImpl("357278693",_arti+","+_arti1+","+_arti2+","+_arti3,0);
RDebugUtils.currentLine=57278694;
 //BA.debugLineNum = 57278694;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=57278695;
 //BA.debugLineNum = 57278695;BA.debugLine="L_TOTAL.Text = 0";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(0));
 }else {
RDebugUtils.currentLine=57278697;
 //BA.debugLineNum = 57278697;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=57278699;
 //BA.debugLineNum = 57278699;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=57278700;
 //BA.debugLineNum = 57278700;BA.debugLine="L_CANT.Text = 0";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(0));
 }else {
RDebugUtils.currentLine=57278702;
 //BA.debugLineNum = 57278702;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=57278706;
 //BA.debugLineNum = 57278706;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmasc_click(reparto_mazapa.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=58195968;
 //BA.debugLineNum = 58195968;BA.debugLine="Private Sub b_prodMasC_Click";
RDebugUtils.currentLine=58195969;
 //BA.debugLineNum = 58195969;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=58195971;
 //BA.debugLineNum = 58195971;BA.debugLine="LogColor(\"b_prodMas_Click\", Colors.Magenta)";
__c.LogImpl("358195971","b_prodMas_Click",__c.Colors.Magenta);
RDebugUtils.currentLine=58195972;
 //BA.debugLineNum = 58195972;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=58195973;
 //BA.debugLineNum = 58195973;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=58195974;
 //BA.debugLineNum = 58195974;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=58195975;
 //BA.debugLineNum = 58195975;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=58195979;
 //BA.debugLineNum = 58195979;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=58195980;
 //BA.debugLineNum = 58195980;BA.debugLine="Log(\"LC_TEXT:\"&laCantc.Text&\"|LC_TAG:\"&laCantc.Ta";
__c.LogImpl("358195980","LC_TEXT:"+_lacantc.getText()+"|LC_TAG:"+BA.ObjectToString(_lacantc.getTag())+"|ET:"+BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=58195981;
 //BA.debugLineNum = 58195981;BA.debugLine="If laCantc.Text = \"\" Then laCantc.Text = 0";
if ((_lacantc.getText()).equals("")) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=58195983;
 //BA.debugLineNum = 58195983;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=58195984;
 //BA.debugLineNum = 58195984;BA.debugLine="LogColor(esteTag.Get(1),Colors.Red)";
__c.LogImpl("358195984",BA.ObjectToString(_estetag.Get((int) (1))),__c.Colors.Red);
RDebugUtils.currentLine=58195985;
 //BA.debugLineNum = 58195985;BA.debugLine="LogColor(esteTag.Get(4),Colors.Red)";
__c.LogImpl("358195985",BA.ObjectToString(_estetag.Get((int) (4))),__c.Colors.Red);
RDebugUtils.currentLine=58195986;
 //BA.debugLineNum = 58195986;BA.debugLine="LogColor($\"++++++++++++++++++++++++++   ${esteTag";
__c.LogImpl("358195986",("++++++++++++++++++++++++++   "+__c.SmartStringFormatter("",(Object)(_estetag.getObject()))+""),__c.Colors.Green);
RDebugUtils.currentLine=58195988;
 //BA.debugLineNum = 58195988;BA.debugLine="Log(maxProds)";
__c.LogImpl("358195988",_maxprods,0);
RDebugUtils.currentLine=58195991;
 //BA.debugLineNum = 58195991;BA.debugLine="If esteTag.Get(7) <> \"1\" Then";
if ((_estetag.Get((int) (7))).equals((Object)("1")) == false) { 
RDebugUtils.currentLine=58195994;
 //BA.debugLineNum = 58195994;BA.debugLine="If laCantc.Text + 1 <= maxProds Then";
if ((double)(Double.parseDouble(_lacantc.getText()))+1<=(double)(Double.parseDouble(_maxprods))) { 
RDebugUtils.currentLine=58195995;
 //BA.debugLineNum = 58195995;BA.debugLine="Log($\"NuevaCant = ${laCantc.Text + 1}\"$)";
__c.LogImpl("358195995",("NuevaCant = "+__c.SmartStringFormatter("",(Object)((double)(Double.parseDouble(_lacantc.getText()))+1))+""),0);
RDebugUtils.currentLine=58195996;
 //BA.debugLineNum = 58195996;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=58195998;
 //BA.debugLineNum = 58195998;BA.debugLine="Log(laCantc.Text)";
__c.LogImpl("358195998",_lacantc.getText(),0);
RDebugUtils.currentLine=58195999;
 //BA.debugLineNum = 58195999;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=58196007;
 //BA.debugLineNum = 58196007;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 };
RDebugUtils.currentLine=58196010;
 //BA.debugLineNum = 58196010;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmenos_click(reparto_mazapa.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=57802752;
 //BA.debugLineNum = 57802752;BA.debugLine="Sub b_prodMenos_Click";
RDebugUtils.currentLine=57802753;
 //BA.debugLineNum = 57802753;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=57802754;
 //BA.debugLineNum = 57802754;BA.debugLine="Log(\"etCantHasFocus=\" & etCantHasFocus)";
__c.LogImpl("357802754","etCantHasFocus="+BA.ObjectToString(__ref._etcanthasfocus /*boolean*/ ),0);
RDebugUtils.currentLine=57802755;
 //BA.debugLineNum = 57802755;BA.debugLine="LogColor(\"b_prodMenos_Click\", Colors.Magenta)";
__c.LogImpl("357802755","b_prodMenos_Click",__c.Colors.Magenta);
RDebugUtils.currentLine=57802756;
 //BA.debugLineNum = 57802756;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=57802757;
 //BA.debugLineNum = 57802757;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=57802758;
 //BA.debugLineNum = 57802758;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=57802759;
 //BA.debugLineNum = 57802759;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=57802761;
 //BA.debugLineNum = 57802761;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=57802762;
 //BA.debugLineNum = 57802762;BA.debugLine="Log(\"LC_TEXT:\"&laCant.Text&\"|PROMO:\"&esteTag.Get(";
__c.LogImpl("357802762","LC_TEXT:"+_lacant.getText()+"|PROMO:"+BA.ObjectToString(_estetag.Get((int) (3)))+"|LC_TAG:"+BA.ObjectToString(_lacant.getTag())+"|ET:"+BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=57802763;
 //BA.debugLineNum = 57802763;BA.debugLine="Private minimoadesc As String";
_minimoadesc = "";
RDebugUtils.currentLine=57802764;
 //BA.debugLineNum = 57802764;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=57802765;
 //BA.debugLineNum = 57802765;BA.debugLine="If minimos.RowCount > 0 Then";
if (_minimos.getRowCount()>0) { 
RDebugUtils.currentLine=57802766;
 //BA.debugLineNum = 57802766;BA.debugLine="minimos.Position = 0";
_minimos.setPosition((int) (0));
RDebugUtils.currentLine=57802767;
 //BA.debugLineNum = 57802767;BA.debugLine="minimoadesc = minimos.GetString(\"CAT_DP_CANT_MIN";
_minimoadesc = _minimos.GetString("CAT_DP_CANT_MIN_VENTA");
 }else {
RDebugUtils.currentLine=57802769;
 //BA.debugLineNum = 57802769;BA.debugLine="minimoadesc = \"1\"";
_minimoadesc = "1";
 };
RDebugUtils.currentLine=57802771;
 //BA.debugLineNum = 57802771;BA.debugLine="minimos.Close";
_minimos.Close();
RDebugUtils.currentLine=57802774;
 //BA.debugLineNum = 57802774;BA.debugLine="If esteTag.Get(7) = \"1\" Then";
if ((_estetag.Get((int) (7))).equals((Object)("1"))) { 
RDebugUtils.currentLine=57802775;
 //BA.debugLineNum = 57802775;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=57802776;
 //BA.debugLineNum = 57802776;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=57802777;
 //BA.debugLineNum = 57802777;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0";
if ((double)(Double.parseDouble(_lacant.getText()))<0) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=57802778;
 //BA.debugLineNum = 57802778;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=57802779;
 //BA.debugLineNum = 57802779;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=57802780;
 //BA.debugLineNum = 57802780;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
RDebugUtils.currentLine=57802781;
 //BA.debugLineNum = 57802781;BA.debugLine="If c3.GetString(\"PE_CANT\") > minimoadesc Then";
if ((double)(Double.parseDouble(_c3.GetString("PE_CANT")))>(double)(Double.parseDouble(_minimoadesc))) { 
RDebugUtils.currentLine=57802782;
 //BA.debugLineNum = 57802782;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=57802783;
 //BA.debugLineNum = 57802783;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=57802784;
 //BA.debugLineNum = 57802784;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=57802786;
 //BA.debugLineNum = 57802786;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=57802788;
 //BA.debugLineNum = 57802788;BA.debugLine="Else If c3.GetString(\"PE_CANT\") = minimoadesc T";
if ((_c3.GetString("PE_CANT")).equals(_minimoadesc)) { 
RDebugUtils.currentLine=57802789;
 //BA.debugLineNum = 57802789;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=57802790;
 //BA.debugLineNum = 57802790;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=57802791;
 //BA.debugLineNum = 57802791;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=57802794;
 //BA.debugLineNum = 57802794;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=57802801;
 //BA.debugLineNum = 57802801;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 }else {
RDebugUtils.currentLine=57802804;
 //BA.debugLineNum = 57802804;BA.debugLine="If esteTag.Get(5) = esteTag.Get(6) Then";
if ((_estetag.Get((int) (5))).equals(_estetag.Get((int) (6)))) { 
RDebugUtils.currentLine=57802805;
 //BA.debugLineNum = 57802805;BA.debugLine="If laCant.Text > 0 Then";
if ((double)(Double.parseDouble(_lacant.getText()))>0) { 
RDebugUtils.currentLine=57802806;
 //BA.debugLineNum = 57802806;BA.debugLine="If esteTag.Get(3) <> Subs.traeAlmacen Then 'Si";
if ((_estetag.Get((int) (3))).equals((Object)(_subs._traealmacen /*String*/ (ba))) == false) { 
RDebugUtils.currentLine=57802807;
 //BA.debugLineNum = 57802807;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=57802808;
 //BA.debugLineNum = 57802808;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=57802809;
 //BA.debugLineNum = 57802809;BA.debugLine="If c2.GetString(\"HVD_RECHAZO\") = \"0\" Then";
if ((_c2.GetString("HVD_RECHAZO")).equals("0")) { 
RDebugUtils.currentLine=57802812;
 //BA.debugLineNum = 57802812;BA.debugLine="Log(\"ES PROMO\")";
__c.LogImpl("357802812","ES PROMO",0);
RDebugUtils.currentLine=57802813;
 //BA.debugLineNum = 57802813;BA.debugLine="Log(esteTag.Get(3))";
__c.LogImpl("357802813",BA.ObjectToString(_estetag.Get((int) (3))),0);
RDebugUtils.currentLine=57802814;
 //BA.debugLineNum = 57802814;BA.debugLine="result =  Msgbox2(\"Si se modifica una promoci";
__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=57802815;
 //BA.debugLineNum = 57802815;BA.debugLine="If result = DialogResponse.POSITIVE Then 'Qui";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=57802816;
 //BA.debugLineNum = 57802816;BA.debugLine="prodsMap.Remove(esteTag.Get(3))";
__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Remove(_estetag.Get((int) (3)));
RDebugUtils.currentLine=57802820;
 //BA.debugLineNum = 57802820;BA.debugLine="LogColor(esteTag.Get(3),Colors.Blue)";
__c.LogImpl("357802820",BA.ObjectToString(_estetag.Get((int) (3))),__c.Colors.Blue);
RDebugUtils.currentLine=57802823;
 //BA.debugLineNum = 57802823;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENT";
_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=57802824;
 //BA.debugLineNum = 57802824;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENT";
_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=57802827;
 //BA.debugLineNum = 57802827;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=57802828;
 //BA.debugLineNum = 57802828;BA.debugLine="LogColor(prodsMap, Colors.red)";
__c.LogImpl("357802828",BA.ObjectToString(__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ ),__c.Colors.Red);
RDebugUtils.currentLine=57802829;
 //BA.debugLineNum = 57802829;BA.debugLine="reconstruirPedido = True";
__ref._reconstruirpedido /*boolean*/  = __c.True;
RDebugUtils.currentLine=57802830;
 //BA.debugLineNum = 57802830;BA.debugLine="promoABorrar = esteTag.Get(3)";
__ref._promoaborrar /*String*/  = BA.ObjectToString(_estetag.Get((int) (3)));
RDebugUtils.currentLine=57802831;
 //BA.debugLineNum = 57802831;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }else {
RDebugUtils.currentLine=57802834;
 //BA.debugLineNum = 57802834;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=57802835;
 //BA.debugLineNum = 57802835;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=57802836;
 //BA.debugLineNum = 57802836;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0";
if ((double)(Double.parseDouble(_lacant.getText()))<0) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=57802837;
 //BA.debugLineNum = 57802837;BA.debugLine="Log(\"NO ES promo\")";
__c.LogImpl("357802837","NO ES promo",0);
RDebugUtils.currentLine=57802838;
 //BA.debugLineNum = 57802838;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=57802839;
 //BA.debugLineNum = 57802839;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=57802840;
 //BA.debugLineNum = 57802840;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }else {
RDebugUtils.currentLine=57802843;
 //BA.debugLineNum = 57802843;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=57802844;
 //BA.debugLineNum = 57802844;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=57802845;
 //BA.debugLineNum = 57802845;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0";
if ((double)(Double.parseDouble(_lacant.getText()))<0) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=57802846;
 //BA.debugLineNum = 57802846;BA.debugLine="Log(\"NO ES promo\")";
__c.LogImpl("357802846","NO ES promo",0);
RDebugUtils.currentLine=57802847;
 //BA.debugLineNum = 57802847;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=57802848;
 //BA.debugLineNum = 57802848;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=57802849;
 //BA.debugLineNum = 57802849;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 };
 }else {
RDebugUtils.currentLine=57802854;
 //BA.debugLineNum = 57802854;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=57802855;
 //BA.debugLineNum = 57802855;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=57802856;
 //BA.debugLineNum = 57802856;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0";
if ((double)(Double.parseDouble(_lacant.getText()))<0) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=57802857;
 //BA.debugLineNum = 57802857;BA.debugLine="Log(\"NO ES promo\")";
__c.LogImpl("357802857","NO ES promo",0);
RDebugUtils.currentLine=57802862;
 //BA.debugLineNum = 57802862;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=57802863;
 //BA.debugLineNum = 57802863;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=57802864;
 //BA.debugLineNum = 57802864;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
RDebugUtils.currentLine=57802865;
 //BA.debugLineNum = 57802865;BA.debugLine="If c3.GetString(\"PE_CANT\") > 1 Then";
if ((double)(Double.parseDouble(_c3.GetString("PE_CANT")))>1) { 
RDebugUtils.currentLine=57802866;
 //BA.debugLineNum = 57802866;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=57802867;
 //BA.debugLineNum = 57802867;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=57802868;
 //BA.debugLineNum = 57802868;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=57802869;
 //BA.debugLineNum = 57802869;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=57802871;
 //BA.debugLineNum = 57802871;BA.debugLine="Else If c3.GetString(\"PE_CANT\") = 1 Then";
if ((_c3.GetString("PE_CANT")).equals(BA.NumberToString(1))) { 
RDebugUtils.currentLine=57802872;
 //BA.debugLineNum = 57802872;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=57802873;
 //BA.debugLineNum = 57802873;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=57802874;
 //BA.debugLineNum = 57802874;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=57802875;
 //BA.debugLineNum = 57802875;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=57802879;
 //BA.debugLineNum = 57802879;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 };
RDebugUtils.currentLine=57802882;
 //BA.debugLineNum = 57802882;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=57802883;
 //BA.debugLineNum = 57802883;BA.debugLine="Log(\"PU: \" & preciou)";
__c.LogImpl("357802883","PU: "+BA.NumberToString(_preciou),0);
RDebugUtils.currentLine=57802894;
 //BA.debugLineNum = 57802894;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmenosc_click(reparto_mazapa.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=58261504;
 //BA.debugLineNum = 58261504;BA.debugLine="Private Sub b_prodMenosC_Click";
RDebugUtils.currentLine=58261505;
 //BA.debugLineNum = 58261505;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=58261506;
 //BA.debugLineNum = 58261506;BA.debugLine="Log(\"etCantHasFocus=\" & etCantHasFocus)";
__c.LogImpl("358261506","etCantHasFocus="+BA.ObjectToString(__ref._etcanthasfocus /*boolean*/ ),0);
RDebugUtils.currentLine=58261507;
 //BA.debugLineNum = 58261507;BA.debugLine="LogColor(\"b_prodMenos_Click\", Colors.Magenta)";
__c.LogImpl("358261507","b_prodMenos_Click",__c.Colors.Magenta);
RDebugUtils.currentLine=58261508;
 //BA.debugLineNum = 58261508;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=58261509;
 //BA.debugLineNum = 58261509;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=58261510;
 //BA.debugLineNum = 58261510;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=58261511;
 //BA.debugLineNum = 58261511;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=58261513;
 //BA.debugLineNum = 58261513;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=58261514;
 //BA.debugLineNum = 58261514;BA.debugLine="Log(\"LC_TEXT:\"&laCantc.Text&\"|PROMO:\"&esteTag.Get";
__c.LogImpl("358261514","LC_TEXT:"+_lacantc.getText()+"|PROMO:"+BA.ObjectToString(_estetag.Get((int) (3)))+"|LC_TAG:"+BA.ObjectToString(_lacantc.getTag())+"|ET:"+BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=58261515;
 //BA.debugLineNum = 58261515;BA.debugLine="Log(esteTag)";
__c.LogImpl("358261515",BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=58261517;
 //BA.debugLineNum = 58261517;BA.debugLine="If esteTag.Get(7) = \"1\" Then";
if ((_estetag.Get((int) (7))).equals((Object)("1"))) { 
RDebugUtils.currentLine=58261518;
 //BA.debugLineNum = 58261518;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=58261519;
 //BA.debugLineNum = 58261519;BA.debugLine="Log(c3.RowCount)";
__c.LogImpl("358261519",BA.NumberToString(_c3.getRowCount()),0);
RDebugUtils.currentLine=58261520;
 //BA.debugLineNum = 58261520;BA.debugLine="Log(esteTag.Get(8))";
__c.LogImpl("358261520",BA.ObjectToString(_estetag.Get((int) (8))),0);
RDebugUtils.currentLine=58261521;
 //BA.debugLineNum = 58261521;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=58261522;
 //BA.debugLineNum = 58261522;BA.debugLine="Log(\"AQUI VEMOS SI ACTUALIZAMOS\")";
__c.LogImpl("358261522","AQUI VEMOS SI ACTUALIZAMOS",0);
RDebugUtils.currentLine=58261523;
 //BA.debugLineNum = 58261523;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
RDebugUtils.currentLine=58261524;
 //BA.debugLineNum = 58261524;BA.debugLine="If c3.GetString(\"PE_CAJAS\") > 1 Then";
if ((double)(Double.parseDouble(_c3.GetString("PE_CAJAS")))>1) { 
RDebugUtils.currentLine=58261525;
 //BA.debugLineNum = 58261525;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=58261526;
 //BA.debugLineNum = 58261526;BA.debugLine="Else If c3.GetString(\"PE_CAJAS\") = 1 Then";
if ((_c3.GetString("PE_CAJAS")).equals(BA.NumberToString(1))) { 
RDebugUtils.currentLine=58261527;
 //BA.debugLineNum = 58261527;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=58261530;
 //BA.debugLineNum = 58261530;BA.debugLine="Log(\"entre al if o algo asi \")";
__c.LogImpl("358261530","entre al if o algo asi ",0);
RDebugUtils.currentLine=58261531;
 //BA.debugLineNum = 58261531;BA.debugLine="If laCantc.Text = \"\" Then laCantc.Text = 0";
if ((_lacantc.getText()).equals("")) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=58261532;
 //BA.debugLineNum = 58261532;BA.debugLine="laCantc.Text = laCantc.Text - 1";
_lacantc.setText(BA.ObjectToCharSequence((double)(Double.parseDouble(_lacantc.getText()))-1));
RDebugUtils.currentLine=58261533;
 //BA.debugLineNum = 58261533;BA.debugLine="If laCantc.Text < 0 Then laCantc.Text = 0";
if ((double)(Double.parseDouble(_lacantc.getText()))<0) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=58261534;
 //BA.debugLineNum = 58261534;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 }else {
RDebugUtils.currentLine=58261539;
 //BA.debugLineNum = 58261539;BA.debugLine="If esteTag.Get(5) = esteTag.Get(6) Then";
if ((_estetag.Get((int) (5))).equals(_estetag.Get((int) (6)))) { 
RDebugUtils.currentLine=58261541;
 //BA.debugLineNum = 58261541;BA.debugLine="If laCantc.Text > 0 Then";
if ((double)(Double.parseDouble(_lacantc.getText()))>0) { 
RDebugUtils.currentLine=58261542;
 //BA.debugLineNum = 58261542;BA.debugLine="Log(\"entre al if o algo asi \")";
__c.LogImpl("358261542","entre al if o algo asi ",0);
RDebugUtils.currentLine=58261543;
 //BA.debugLineNum = 58261543;BA.debugLine="If laCantc.Text = \"\" Then laCantc.Text = 0";
if ((_lacantc.getText()).equals("")) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=58261544;
 //BA.debugLineNum = 58261544;BA.debugLine="laCantc.Text = laCantc.Text - 1";
_lacantc.setText(BA.ObjectToCharSequence((double)(Double.parseDouble(_lacantc.getText()))-1));
RDebugUtils.currentLine=58261545;
 //BA.debugLineNum = 58261545;BA.debugLine="If laCantc.Text < 0 Then laCantc.Text = 0";
if ((double)(Double.parseDouble(_lacantc.getText()))<0) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=58261546;
 //BA.debugLineNum = 58261546;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=58261547;
 //BA.debugLineNum = 58261547;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update cat_gunaprod";
_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=58261548;
 //BA.debugLineNum = 58261548;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 }else 
{RDebugUtils.currentLine=58261549;
 //BA.debugLineNum = 58261549;BA.debugLine="Else If laCantc.Text = 0 Then";
if ((_lacantc.getText()).equals(BA.NumberToString(0))) { 
 }}
;
 }else {
RDebugUtils.currentLine=58261555;
 //BA.debugLineNum = 58261555;BA.debugLine="If laCantc.Text > 0 Then";
if ((double)(Double.parseDouble(_lacantc.getText()))>0) { 
RDebugUtils.currentLine=58261558;
 //BA.debugLineNum = 58261558;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=58261559;
 //BA.debugLineNum = 58261559;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=58261560;
 //BA.debugLineNum = 58261560;BA.debugLine="Log(\"AQUI VEMOS SI ACTUALIZAMOS\")";
__c.LogImpl("358261560","AQUI VEMOS SI ACTUALIZAMOS",0);
RDebugUtils.currentLine=58261561;
 //BA.debugLineNum = 58261561;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
RDebugUtils.currentLine=58261562;
 //BA.debugLineNum = 58261562;BA.debugLine="If c3.GetString(\"PE_CAJAS\") > 1 Then";
if ((double)(Double.parseDouble(_c3.GetString("PE_CAJAS")))>1) { 
RDebugUtils.currentLine=58261563;
 //BA.debugLineNum = 58261563;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=58261564;
 //BA.debugLineNum = 58261564;BA.debugLine="Else If c3.GetString(\"PE_CAJAS\") = 1 Then";
if ((_c3.GetString("PE_CAJAS")).equals(BA.NumberToString(1))) { 
RDebugUtils.currentLine=58261565;
 //BA.debugLineNum = 58261565;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=58261568;
 //BA.debugLineNum = 58261568;BA.debugLine="Log(\"entre al if o algo asi \")";
__c.LogImpl("358261568","entre al if o algo asi ",0);
RDebugUtils.currentLine=58261569;
 //BA.debugLineNum = 58261569;BA.debugLine="If laCantc.Text = \"\" Then laCantc.Text = 0";
if ((_lacantc.getText()).equals("")) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=58261570;
 //BA.debugLineNum = 58261570;BA.debugLine="laCantc.Text = laCantc.Text - 1";
_lacantc.setText(BA.ObjectToCharSequence((double)(Double.parseDouble(_lacantc.getText()))-1));
RDebugUtils.currentLine=58261571;
 //BA.debugLineNum = 58261571;BA.debugLine="If laCantc.Text < 0 Then laCantc.Text = 0";
if ((double)(Double.parseDouble(_lacantc.getText()))<0) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=58261572;
 //BA.debugLineNum = 58261572;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 }else 
{RDebugUtils.currentLine=58261574;
 //BA.debugLineNum = 58261574;BA.debugLine="Else If laCantc.Text = 0 Then";
if ((_lacantc.getText()).equals(BA.NumberToString(0))) { 
 }}
;
 };
 };
RDebugUtils.currentLine=58261580;
 //BA.debugLineNum = 58261580;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=58261581;
 //BA.debugLineNum = 58261581;BA.debugLine="Log(\"PU: \" & preciou)";
__c.LogImpl("358261581","PU: "+BA.NumberToString(_preciou),0);
RDebugUtils.currentLine=58261582;
 //BA.debugLineNum = 58261582;BA.debugLine="End Sub";
return "";
}
public String  _b_regresar_click(reparto_mazapa.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=57409536;
 //BA.debugLineNum = 57409536;BA.debugLine="Sub b_regresar_Click";
RDebugUtils.currentLine=57409537;
 //BA.debugLineNum = 57409537;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=57409538;
 //BA.debugLineNum = 57409538;BA.debugLine="End Sub";
return "";
}
public String  _b_revversar_click(reparto_mazapa.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=58392576;
 //BA.debugLineNum = 58392576;BA.debugLine="Private Sub b_revversar_Click";
RDebugUtils.currentLine=58392577;
 //BA.debugLineNum = 58392577;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=58392578;
 //BA.debugLineNum = 58392578;BA.debugLine="If c3.RowCount = 0 Then";
if (_c3.getRowCount()==0) { 
RDebugUtils.currentLine=58392579;
 //BA.debugLineNum = 58392579;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=58392580;
 //BA.debugLineNum = 58392580;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 }else {
RDebugUtils.currentLine=58392582;
 //BA.debugLineNum = 58392582;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=58392586;
 //BA.debugLineNum = 58392586;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.objects.PanelWrapper  _createlistitem(reparto_mazapa.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=57671680;
 //BA.debugLineNum = 57671680;BA.debugLine="Sub CreateListItem(Text As String, precioU As Stri";
RDebugUtils.currentLine=57671681;
 //BA.debugLineNum = 57671681;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=57671682;
 //BA.debugLineNum = 57671682;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=57671683;
 //BA.debugLineNum = 57671683;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=57671684;
 //BA.debugLineNum = 57671684;BA.debugLine="p.SetLayoutAnimated(0, 0, 0, Width, Height)";
_p.SetLayoutAnimated((int) (0),(int) (0),(int) (0),_width,_height);
RDebugUtils.currentLine=57671685;
 //BA.debugLineNum = 57671685;BA.debugLine="p.LoadLayout(\"prodItem2\")";
_p.LoadLayout("prodItem2",ba);
RDebugUtils.currentLine=57671686;
 //BA.debugLineNum = 57671686;BA.debugLine="p_prods.Color = bc";
__ref._p_prods /*anywheresoftware.b4a.objects.PanelWrapper*/ .setColor(_bc);
RDebugUtils.currentLine=57671687;
 //BA.debugLineNum = 57671687;BA.debugLine="l_prodX.TextColor = tc";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor(_tc);
RDebugUtils.currentLine=57671688;
 //BA.debugLineNum = 57671688;BA.debugLine="precioU = $\"$1.2{precioU}\"$";
_preciou = (""+__c.SmartStringFormatter("1.2",(Object)(_preciou))+"");
RDebugUtils.currentLine=57671689;
 //BA.debugLineNum = 57671689;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=57671690;
 //BA.debugLineNum = 57671690;BA.debugLine="If promo <> \"1\" And precioU = 0 Then";
if ((_promo).equals("1") == false && (_preciou).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=57671691;
 //BA.debugLineNum = 57671691;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=57671693;
 //BA.debugLineNum = 57671693;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=57671696;
 //BA.debugLineNum = 57671696;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=57671697;
 //BA.debugLineNum = 57671697;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=57671698;
 //BA.debugLineNum = 57671698;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=57671700;
 //BA.debugLineNum = 57671700;BA.debugLine="l_pCant.Text = inv";
__ref._l_pcant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_inv));
RDebugUtils.currentLine=57671704;
 //BA.debugLineNum = 57671704;BA.debugLine="l_pCant.BringToFront";
__ref._l_pcant /*anywheresoftware.b4a.objects.LabelWrapper*/ .BringToFront();
RDebugUtils.currentLine=57671705;
 //BA.debugLineNum = 57671705;BA.debugLine="et_pCant.SendToBack";
__ref._et_pcant /*anywheresoftware.b4a.objects.EditTextWrapper*/ .SendToBack();
RDebugUtils.currentLine=57671706;
 //BA.debugLineNum = 57671706;BA.debugLine="p_botMasMenC.Visible = False";
__ref._p_botmasmenc /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=57671707;
 //BA.debugLineNum = 57671707;BA.debugLine="l_cajas.Visible = False";
__ref._l_cajas /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=57671709;
 //BA.debugLineNum = 57671709;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=57671710;
 //BA.debugLineNum = 57671710;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4a.objects.PanelWrapper  _createlistitem2(reparto_mazapa.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=57737216;
 //BA.debugLineNum = 57737216;BA.debugLine="Sub CreateListItem2(Text As String, precioU As Str";
RDebugUtils.currentLine=57737217;
 //BA.debugLineNum = 57737217;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=57737218;
 //BA.debugLineNum = 57737218;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=57737219;
 //BA.debugLineNum = 57737219;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=57737220;
 //BA.debugLineNum = 57737220;BA.debugLine="p.SetLayoutAnimated(0, 0, 0, Width, Height)";
_p.SetLayoutAnimated((int) (0),(int) (0),(int) (0),_width,_height);
RDebugUtils.currentLine=57737221;
 //BA.debugLineNum = 57737221;BA.debugLine="p.LoadLayout(\"prodItem2\")";
_p.LoadLayout("prodItem2",ba);
RDebugUtils.currentLine=57737222;
 //BA.debugLineNum = 57737222;BA.debugLine="p_prods.Color = bc";
__ref._p_prods /*anywheresoftware.b4a.objects.PanelWrapper*/ .setColor(_bc);
RDebugUtils.currentLine=57737223;
 //BA.debugLineNum = 57737223;BA.debugLine="l_prodX.TextColor = tc";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor(_tc);
RDebugUtils.currentLine=57737224;
 //BA.debugLineNum = 57737224;BA.debugLine="precioU = $\"$1.2{precioU}\"$";
_preciou = (""+__c.SmartStringFormatter("1.2",(Object)(_preciou))+"");
RDebugUtils.currentLine=57737225;
 //BA.debugLineNum = 57737225;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=57737227;
 //BA.debugLineNum = 57737227;BA.debugLine="If promo <> \"1\" And precioU = 0 Then";
if ((_promo).equals("1") == false && (_preciou).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=57737228;
 //BA.debugLineNum = 57737228;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=57737230;
 //BA.debugLineNum = 57737230;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=57737232;
 //BA.debugLineNum = 57737232;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=57737233;
 //BA.debugLineNum = 57737233;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=57737234;
 //BA.debugLineNum = 57737234;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=57737236;
 //BA.debugLineNum = 57737236;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=57737240;
 //BA.debugLineNum = 57737240;BA.debugLine="l_pCantC.BringToFront";
__ref._l_pcantc /*anywheresoftware.b4a.objects.LabelWrapper*/ .BringToFront();
RDebugUtils.currentLine=57737241;
 //BA.debugLineNum = 57737241;BA.debugLine="et_pCantC.SendToBack";
__ref._et_pcantc /*anywheresoftware.b4a.objects.EditTextWrapper*/ .SendToBack();
RDebugUtils.currentLine=57737242;
 //BA.debugLineNum = 57737242;BA.debugLine="p_botMasMen.Visible = False";
__ref._p_botmasmen /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=57737243;
 //BA.debugLineNum = 57737243;BA.debugLine="l_piezas.Visible = False";
__ref._l_piezas /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=57737245;
 //BA.debugLineNum = 57737245;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=57737246;
 //BA.debugLineNum = 57737246;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest(reparto_mazapa.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_mazapa.keymon.lat.c_detalleventa parent,reparto_mazapa.keymon.lat.c_detalleventa __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
reparto_mazapa.keymon.lat.c_detalleventa __ref;
reparto_mazapa.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=57475075;
 //BA.debugLineNum = 57475075;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
parent._b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=57475077;
 //BA.debugLineNum = 57475077;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
RDebugUtils.currentLine=57475078;
 //BA.debugLineNum = 57475078;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b4xpage_created(reparto_mazapa.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=57212928;
 //BA.debugLineNum = 57212928;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=57212929;
 //BA.debugLineNum = 57212929;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=57212930;
 //BA.debugLineNum = 57212930;BA.debugLine="B4XPages.SetTitle(Me, \"Detalle de venta\")";
_b4xpages._settitle /*String*/ (ba,this,(Object)("Detalle de venta"));
RDebugUtils.currentLine=57212932;
 //BA.debugLineNum = 57212932;BA.debugLine="g.Initialize(\"GPS\")";
__ref._g /*anywheresoftware.b4a.gps.GPS*/ .Initialize("GPS");
RDebugUtils.currentLine=57212933;
 //BA.debugLineNum = 57212933;BA.debugLine="Root.LoadLayout(\"detalleVenta\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("detalleVenta",ba);
RDebugUtils.currentLine=57212934;
 //BA.debugLineNum = 57212934;BA.debugLine="b_borra.Visible = False";
__ref._b_borra /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=57212935;
 //BA.debugLineNum = 57212935;BA.debugLine="Titulo.Text = \"Pedido\"";
__ref._titulo /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("Pedido"));
RDebugUtils.currentLine=57212936;
 //BA.debugLineNum = 57212936;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(reparto_mazapa.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
RDebugUtils.currentLine=57081856;
 //BA.debugLineNum = 57081856;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=57081857;
 //BA.debugLineNum = 57081857;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=57081858;
 //BA.debugLineNum = 57081858;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=57081859;
 //BA.debugLineNum = 57081859;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
RDebugUtils.currentLine=57081860;
 //BA.debugLineNum = 57081860;BA.debugLine="Dim clie_id As String";
_clie_id = "";
RDebugUtils.currentLine=57081861;
 //BA.debugLineNum = 57081861;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
RDebugUtils.currentLine=57081862;
 //BA.debugLineNum = 57081862;BA.debugLine="Dim usuario As String";
_usuario = "";
RDebugUtils.currentLine=57081863;
 //BA.debugLineNum = 57081863;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=57081865;
 //BA.debugLineNum = 57081865;BA.debugLine="Dim b_regresar As Button";
_b_regresar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=57081866;
 //BA.debugLineNum = 57081866;BA.debugLine="Dim ListView1 As ListView";
_listview1 = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=57081867;
 //BA.debugLineNum = 57081867;BA.debugLine="Dim L_CANT As Label";
_l_cant = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=57081868;
 //BA.debugLineNum = 57081868;BA.debugLine="Dim L_TOTAL As Label";
_l_total = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=57081869;
 //BA.debugLineNum = 57081869;BA.debugLine="Dim b_borra As Button";
_b_borra = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=57081870;
 //BA.debugLineNum = 57081870;BA.debugLine="Dim Existe As String";
_existe = "";
RDebugUtils.currentLine=57081871;
 //BA.debugLineNum = 57081871;BA.debugLine="Dim result As String";
_result = "";
RDebugUtils.currentLine=57081873;
 //BA.debugLineNum = 57081873;BA.debugLine="Dim cuantos As String";
_cuantos = "";
RDebugUtils.currentLine=57081874;
 //BA.debugLineNum = 57081874;BA.debugLine="Dim nombre_prod As String";
_nombre_prod = "";
RDebugUtils.currentLine=57081875;
 //BA.debugLineNum = 57081875;BA.debugLine="Dim cuantos_pedido As String";
_cuantos_pedido = "";
RDebugUtils.currentLine=57081876;
 //BA.debugLineNum = 57081876;BA.debugLine="Private Titulo As Label";
_titulo = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=57081877;
 //BA.debugLineNum = 57081877;BA.debugLine="Private P1 As Panel";
_p1 = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=57081878;
 //BA.debugLineNum = 57081878;BA.debugLine="Private lv2 As ListView";
_lv2 = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=57081879;
 //BA.debugLineNum = 57081879;BA.debugLine="Private p_principal As Panel";
_p_principal = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=57081880;
 //BA.debugLineNum = 57081880;BA.debugLine="Dim clv_pedido As CustomListView";
_clv_pedido = new b4a.example3.customlistview();
RDebugUtils.currentLine=57081881;
 //BA.debugLineNum = 57081881;BA.debugLine="Private p_prods As Panel";
_p_prods = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=57081882;
 //BA.debugLineNum = 57081882;BA.debugLine="Private l_prodX As Label";
_l_prodx = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=57081883;
 //BA.debugLineNum = 57081883;BA.debugLine="Private l_pCant As Label";
_l_pcant = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=57081884;
 //BA.debugLineNum = 57081884;BA.debugLine="Private et_pCant As EditText";
_et_pcant = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=57081885;
 //BA.debugLineNum = 57081885;BA.debugLine="Dim bmp As Bitmap";
_bmp = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper();
RDebugUtils.currentLine=57081886;
 //BA.debugLineNum = 57081886;BA.debugLine="Dim etCantHasFocus As Boolean = False";
_etcanthasfocus = __c.False;
RDebugUtils.currentLine=57081887;
 //BA.debugLineNum = 57081887;BA.debugLine="Dim totalProds As Int = 0";
_totalprods = (int) (0);
RDebugUtils.currentLine=57081888;
 //BA.debugLineNum = 57081888;BA.debugLine="Dim totalCompra As Int = 0";
_totalcompra = (int) (0);
RDebugUtils.currentLine=57081889;
 //BA.debugLineNum = 57081889;BA.debugLine="Dim prodsMap As Map";
_prodsmap = new anywheresoftware.b4a.objects.collections.Map();
RDebugUtils.currentLine=57081890;
 //BA.debugLineNum = 57081890;BA.debugLine="Dim reconstruirPedido As Boolean = False";
_reconstruirpedido = __c.False;
RDebugUtils.currentLine=57081891;
 //BA.debugLineNum = 57081891;BA.debugLine="Dim promoABorrar As String";
_promoaborrar = "";
RDebugUtils.currentLine=57081892;
 //BA.debugLineNum = 57081892;BA.debugLine="Private b_guardar As Button";
_b_guardar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=57081893;
 //BA.debugLineNum = 57081893;BA.debugLine="Private b_prodMas As Button";
_b_prodmas = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=57081894;
 //BA.debugLineNum = 57081894;BA.debugLine="Private b_prodMenos As Button";
_b_prodmenos = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=57081895;
 //BA.debugLineNum = 57081895;BA.debugLine="Private b_prodMenosC As Button";
_b_prodmenosc = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=57081896;
 //BA.debugLineNum = 57081896;BA.debugLine="Private l_pCantC As Label";
_l_pcantc = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=57081897;
 //BA.debugLineNum = 57081897;BA.debugLine="Private et_pCantC As EditText";
_et_pcantc = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=57081898;
 //BA.debugLineNum = 57081898;BA.debugLine="Private b_prodMasC As Button";
_b_prodmasc = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=57081899;
 //BA.debugLineNum = 57081899;BA.debugLine="Private p_botMasMenC As Panel";
_p_botmasmenc = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=57081900;
 //BA.debugLineNum = 57081900;BA.debugLine="Private p_botMasMen As Panel";
_p_botmasmen = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=57081901;
 //BA.debugLineNum = 57081901;BA.debugLine="Private l_cajas As Label";
_l_cajas = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=57081902;
 //BA.debugLineNum = 57081902;BA.debugLine="Private l_piezas As Label";
_l_piezas = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=57081903;
 //BA.debugLineNum = 57081903;BA.debugLine="End Sub";
return "";
}
public String  _cuentaprods(reparto_mazapa.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=57933824;
 //BA.debugLineNum = 57933824;BA.debugLine="Sub cuentaProds(accion As String)";
RDebugUtils.currentLine=57933986;
 //BA.debugLineNum = 57933986;BA.debugLine="End Sub";
return "";
}
public String  _l_pcant_click(reparto_mazapa.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=58064896;
 //BA.debugLineNum = 58064896;BA.debugLine="Private Sub l_pCant_Click";
RDebugUtils.currentLine=58064898;
 //BA.debugLineNum = 58064898;BA.debugLine="End Sub";
return "";
}
public String  _l_pcantc_click(reparto_mazapa.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=58327040;
 //BA.debugLineNum = 58327040;BA.debugLine="Private Sub l_pCantC_Click";
RDebugUtils.currentLine=58327042;
 //BA.debugLineNum = 58327042;BA.debugLine="End Sub";
return "";
}
public String  _listview1_itemlongclick(reparto_mazapa.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=57540608;
 //BA.debugLineNum = 57540608;BA.debugLine="Sub ListView1_ItemLongClick (Position As Int, Valu";
RDebugUtils.currentLine=57540652;
 //BA.debugLineNum = 57540652;BA.debugLine="End Sub";
return "";
}
public String  _lv2_itemclick(reparto_mazapa.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=57606144;
 //BA.debugLineNum = 57606144;BA.debugLine="Sub lv2_ItemClick (Position As Int, Value As Objec";
RDebugUtils.currentLine=57606205;
 //BA.debugLineNum = 57606205;BA.debugLine="End Sub";
return "";
}
public String  _p_prods_click(reparto_mazapa.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=58130432;
 //BA.debugLineNum = 58130432;BA.debugLine="Sub p_prods_Click";
RDebugUtils.currentLine=58130433;
 //BA.debugLineNum = 58130433;BA.debugLine="Log(Sender.As(Panel).tag)";
__c.LogImpl("358130433",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=58130434;
 //BA.debugLineNum = 58130434;BA.debugLine="End Sub";
return "";
}
}