package reparto_mazapa.keymon.lat;


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

public class c_historico 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_historico");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", reparto_mazapa.keymon.lat.c_historico.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 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 String  _gps_locationchanged(reparto_mazapa.keymon.lat.c_historico __ref,anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_historico";
if (Debug.shouldDelegate(ba, "gps_locationchanged", false))
	 {return ((String) Debug.delegate(ba, "gps_locationchanged", new Object[] {_location1}));}
RDebugUtils.currentLine=59768832;
 //BA.debugLineNum = 59768832;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
RDebugUtils.currentLine=59768835;
 //BA.debugLineNum = 59768835;BA.debugLine="End Sub";
return "";
}
public String  _b_guardar_click(reparto_mazapa.keymon.lat.c_historico __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_historico";
if (Debug.shouldDelegate(ba, "b_guardar_click", false))
	 {return ((String) Debug.delegate(ba, "b_guardar_click", null));}
RDebugUtils.currentLine=60358656;
 //BA.debugLineNum = 60358656;BA.debugLine="Private Sub b_guardar_Click";
RDebugUtils.currentLine=60358658;
 //BA.debugLineNum = 60358658;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmas_click(reparto_mazapa.keymon.lat.c_historico __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_historico";
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 = "";
anywheresoftware.b4a.objects.collections.Map _cym = null;
RDebugUtils.currentLine=60227584;
 //BA.debugLineNum = 60227584;BA.debugLine="Sub b_prodMas_Click";
RDebugUtils.currentLine=60227585;
 //BA.debugLineNum = 60227585;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=60227587;
 //BA.debugLineNum = 60227587;BA.debugLine="LogColor(\"b_prodMas_Click\", Colors.Magenta)";
__c.LogImpl("360227587","b_prodMas_Click",__c.Colors.Magenta);
RDebugUtils.currentLine=60227588;
 //BA.debugLineNum = 60227588;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=60227589;
 //BA.debugLineNum = 60227589;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=60227590;
 //BA.debugLineNum = 60227590;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=60227591;
 //BA.debugLineNum = 60227591;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=60227595;
 //BA.debugLineNum = 60227595;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=60227596;
 //BA.debugLineNum = 60227596;BA.debugLine="Log(\"LC_TEXT:\"&laCant.Text&\"|LC_TAG:\"&laCant.Tag&";
__c.LogImpl("360227596","LC_TEXT:"+_lacant.getText()+"|LC_TAG:"+BA.ObjectToString(_lacant.getTag())+"|ET:"+BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=60227597;
 //BA.debugLineNum = 60227597;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=60227599;
 //BA.debugLineNum = 60227599;BA.debugLine="Private maxProds as string = esteTag.Get(1) + est";
_maxprods = BA.NumberToString((double)(BA.ObjectToNumber(_estetag.Get((int) (1))))+(double)(BA.ObjectToNumber(_estetag.Get((int) (4)))));
RDebugUtils.currentLine=60227601;
 //BA.debugLineNum = 60227601;BA.debugLine="LogColor($\"++++++++++++++++++++++++++   ${esteTag";
__c.LogImpl("360227601",("++++++++++++++++++++++++++   "+__c.SmartStringFormatter("",(Object)(_estetag.getObject()))+""),__c.Colors.Green);
RDebugUtils.currentLine=60227603;
 //BA.debugLineNum = 60227603;BA.debugLine="If laCant.Text + 1 <= maxProds Then";
if ((double)(Double.parseDouble(_lacant.getText()))+1<=(double)(Double.parseDouble(_maxprods))) { 
RDebugUtils.currentLine=60227604;
 //BA.debugLineNum = 60227604;BA.debugLine="Log($\"NuevaCant = ${laCant.Text + 1}\"$)";
__c.LogImpl("360227604",("NuevaCant = "+__c.SmartStringFormatter("",(Object)((double)(Double.parseDouble(_lacant.getText()))+1))+""),0);
RDebugUtils.currentLine=60227605;
 //BA.debugLineNum = 60227605;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=60227606;
 //BA.debugLineNum = 60227606;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))}));
RDebugUtils.currentLine=60227607;
 //BA.debugLineNum = 60227607;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=60227608;
 //BA.debugLineNum = 60227608;BA.debugLine="Private cym As Map = Subs.traemosCantYMonto(clv_";
_cym = new anywheresoftware.b4a.objects.collections.Map();
_cym = _subs._traemoscantymonto /*anywheresoftware.b4a.objects.collections.Map*/ (ba,__ref._clv_pedido /*b4a.example3.customlistview*/ );
RDebugUtils.currentLine=60227609;
 //BA.debugLineNum = 60227609;BA.debugLine="L_CANT.Text = cym.Get(\"cantidad\")";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_cym.Get((Object)("cantidad"))));
RDebugUtils.currentLine=60227610;
 //BA.debugLineNum = 60227610;BA.debugLine="L_TOTAL.Text = Round2(cym.Get(\"monto\"), 2)";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.Round2((double)(BA.ObjectToNumber(_cym.Get((Object)("monto")))),(int) (2))));
 };
RDebugUtils.currentLine=60227627;
 //BA.debugLineNum = 60227627;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmenos_click(reparto_mazapa.keymon.lat.c_historico __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_historico";
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;
float _preciou = 0f;
anywheresoftware.b4a.objects.collections.Map _cym = null;
RDebugUtils.currentLine=60162048;
 //BA.debugLineNum = 60162048;BA.debugLine="Sub b_prodMenos_Click";
RDebugUtils.currentLine=60162049;
 //BA.debugLineNum = 60162049;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=60162050;
 //BA.debugLineNum = 60162050;BA.debugLine="Log(\"etCantHasFocus=\" & etCantHasFocus)";
__c.LogImpl("360162050","etCantHasFocus="+BA.ObjectToString(__ref._etcanthasfocus /*boolean*/ ),0);
RDebugUtils.currentLine=60162051;
 //BA.debugLineNum = 60162051;BA.debugLine="LogColor(\"b_prodMenos_Click\", Colors.Magenta)";
__c.LogImpl("360162051","b_prodMenos_Click",__c.Colors.Magenta);
RDebugUtils.currentLine=60162052;
 //BA.debugLineNum = 60162052;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=60162053;
 //BA.debugLineNum = 60162053;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=60162054;
 //BA.debugLineNum = 60162054;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=60162055;
 //BA.debugLineNum = 60162055;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=60162057;
 //BA.debugLineNum = 60162057;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=60162058;
 //BA.debugLineNum = 60162058;BA.debugLine="Log(\"LC_TEXT:\"&laCant.Text&\"|PROMO:\"&esteTag.Get(";
__c.LogImpl("360162058","LC_TEXT:"+_lacant.getText()+"|PROMO:"+BA.ObjectToString(_estetag.Get((int) (3)))+"|LC_TAG:"+BA.ObjectToString(_lacant.getTag())+"|ET:"+BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=60162059;
 //BA.debugLineNum = 60162059;BA.debugLine="If esteTag.Get(3) <> \"1\" Then 'Si es PROMO entonc";
if ((_estetag.Get((int) (3))).equals((Object)("1")) == false) { 
RDebugUtils.currentLine=60162060;
 //BA.debugLineNum = 60162060;BA.debugLine="Log(\"ES PROMO\")";
__c.LogImpl("360162060","ES PROMO",0);
RDebugUtils.currentLine=60162061;
 //BA.debugLineNum = 60162061;BA.debugLine="result =  Msgbox2(\"Si se modifica una promoción,";
__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=60162062;
 //BA.debugLineNum = 60162062;BA.debugLine="If result = DialogResponse.POSITIVE Then 'Quitam";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=60162063;
 //BA.debugLineNum = 60162063;BA.debugLine="prodsMap.Remove(esteTag.Get(3))";
__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Remove(_estetag.Get((int) (3)));
RDebugUtils.currentLine=60162064;
 //BA.debugLineNum = 60162064;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTAS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 1 WHERE HVD_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (3)))+"' and HVD_cliente in (Select CUENTA from cuentaa)"));
RDebugUtils.currentLine=60162065;
 //BA.debugLineNum = 60162065;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTAS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_CODPROMO = '"+__c.SmartStringFormatter("",(Object)(_subs._traealmacen /*String*/ (ba)))+"' WHERE HVD_cliente in (Select CUENTA from cuentaa) AND HVD_CODPROMO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (3)))+"'"));
RDebugUtils.currentLine=60162066;
 //BA.debugLineNum = 60162066;BA.debugLine="LogColor(prodsMap, Colors.red)";
__c.LogImpl("360162066",BA.ObjectToString(__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ ),__c.Colors.Red);
RDebugUtils.currentLine=60162067;
 //BA.debugLineNum = 60162067;BA.debugLine="reconstruirPedido = True";
__ref._reconstruirpedido /*boolean*/  = __c.True;
RDebugUtils.currentLine=60162068;
 //BA.debugLineNum = 60162068;BA.debugLine="promoABorrar = esteTag.Get(3)";
__ref._promoaborrar /*String*/  = BA.ObjectToString(_estetag.Get((int) (3)));
RDebugUtils.currentLine=60162069;
 //BA.debugLineNum = 60162069;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }else {
RDebugUtils.currentLine=60162072;
 //BA.debugLineNum = 60162072;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=60162073;
 //BA.debugLineNum = 60162073;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=60162074;
 //BA.debugLineNum = 60162074;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0";
if ((double)(Double.parseDouble(_lacant.getText()))<0) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=60162075;
 //BA.debugLineNum = 60162075;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))}));
 };
RDebugUtils.currentLine=60162077;
 //BA.debugLineNum = 60162077;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=60162078;
 //BA.debugLineNum = 60162078;BA.debugLine="Log(\"PU: \" & preciou)";
__c.LogImpl("360162078","PU: "+BA.NumberToString(_preciou),0);
RDebugUtils.currentLine=60162084;
 //BA.debugLineNum = 60162084;BA.debugLine="Subs.prodRechazo(esteTag.Get(5), esteTag.Get(2))";
_subs._prodrechazo /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (5))),BA.ObjectToString(_estetag.Get((int) (2))));
RDebugUtils.currentLine=60162085;
 //BA.debugLineNum = 60162085;BA.debugLine="Private cym As Map = Subs.traemosCantYMonto(clv_p";
_cym = new anywheresoftware.b4a.objects.collections.Map();
_cym = _subs._traemoscantymonto /*anywheresoftware.b4a.objects.collections.Map*/ (ba,__ref._clv_pedido /*b4a.example3.customlistview*/ );
RDebugUtils.currentLine=60162086;
 //BA.debugLineNum = 60162086;BA.debugLine="L_CANT.Text = cym.Get(\"cantidad\")";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_cym.Get((Object)("cantidad"))));
RDebugUtils.currentLine=60162087;
 //BA.debugLineNum = 60162087;BA.debugLine="L_TOTAL.Text = Round2(cym.Get(\"monto\"), 2)";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.Round2((double)(BA.ObjectToNumber(_cym.Get((Object)("monto")))),(int) (2))));
RDebugUtils.currentLine=60162089;
 //BA.debugLineNum = 60162089;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear(reparto_mazapa.keymon.lat.c_historico __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_historico";
if (Debug.shouldDelegate(ba, "b4xpage_appear", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_appear", null));}
int _i = 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 _vc = null;
int _cantco = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _cco = null;
anywheresoftware.b4a.objects.collections.Map _cym = null;
RDebugUtils.currentLine=59703296;
 //BA.debugLineNum = 59703296;BA.debugLine="Sub B4XPage_Appear";
RDebugUtils.currentLine=59703298;
 //BA.debugLineNum = 59703298;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=59703302;
 //BA.debugLineNum = 59703302;BA.debugLine="L_CANT.Text =\"\"";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=59703303;
 //BA.debugLineNum = 59703303;BA.debugLine="L_TOTAL.Text=\"\"";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=59703304;
 //BA.debugLineNum = 59703304;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=59703305;
 //BA.debugLineNum = 59703305;BA.debugLine="C.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=59703306;
 //BA.debugLineNum = 59703306;BA.debugLine="Existe = C.GetString(\"EXISTE\")";
__ref._existe /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("EXISTE");
RDebugUtils.currentLine=59703307;
 //BA.debugLineNum = 59703307;BA.debugLine="C.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=59703309;
 //BA.debugLineNum = 59703309;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, HVD_CLIENTE, HVD_PRONOMBRE, HVD_PROID, HVD_CANT, HVD_COSTO_TOT, HVD_CODPROMO from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) and HVD_RECHAZO = 0 and hvd_cant > 0 order by HVD_CODPROMO desc, HVD_PRONOMBRE asc")));
RDebugUtils.currentLine=59703310;
 //BA.debugLineNum = 59703310;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=59703311;
 //BA.debugLineNum = 59703311;BA.debugLine="clv_pedido.Clear";
__ref._clv_pedido /*b4a.example3.customlistview*/ ._clear();
RDebugUtils.currentLine=59703312;
 //BA.debugLineNum = 59703312;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=59703313;
 //BA.debugLineNum = 59703313;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=59703314;
 //BA.debugLineNum = 59703314;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=59703316;
 //BA.debugLineNum = 59703316;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=59703318;
 //BA.debugLineNum = 59703318;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=59703319;
 //BA.debugLineNum = 59703319;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=59703321;
 //BA.debugLineNum = 59703321;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=59703322;
 //BA.debugLineNum = 59703322;BA.debugLine="Private cant2 As Int = 0";
_cant2 = (int) (0);
RDebugUtils.currentLine=59703323;
 //BA.debugLineNum = 59703323;BA.debugLine="If oc.RowCount > 0 Then";
if (_oc.getRowCount()>0) { 
RDebugUtils.currentLine=59703324;
 //BA.debugLineNum = 59703324;BA.debugLine="oc.Position = 0";
_oc.setPosition((int) (0));
RDebugUtils.currentLine=59703325;
 //BA.debugLineNum = 59703325;BA.debugLine="cant2 = oc.GetString(\"HVD_CANT\")";
_cant2 = (int)(Double.parseDouble(_oc.GetString("HVD_CANT")));
 };
RDebugUtils.currentLine=59703327;
 //BA.debugLineNum = 59703327;BA.debugLine="oc.Close";
_oc.Close();
RDebugUtils.currentLine=59703328;
 //BA.debugLineNum = 59703328;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=59703329;
 //BA.debugLineNum = 59703329;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=59703330;
 //BA.debugLineNum = 59703330;BA.debugLine="label1.TextSize = 12";
_label1.setTextSize((float) (12));
RDebugUtils.currentLine=59703331;
 //BA.debugLineNum = 59703331;BA.debugLine="label1.TextColor = Colors.black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=59703332;
 //BA.debugLineNum = 59703332;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=59703333;
 //BA.debugLineNum = 59703333;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=59703334;
 //BA.debugLineNum = 59703334;BA.debugLine="label2.TextSize = 12";
_label2.setTextSize((float) (12));
RDebugUtils.currentLine=59703335;
 //BA.debugLineNum = 59703335;BA.debugLine="label2.TextColor = Colors.black";
_label2.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=59703336;
 //BA.debugLineNum = 59703336;BA.debugLine="Private bgColor, textColor As Int";
_bgcolor = 0;
_textcolor = 0;
RDebugUtils.currentLine=59703337;
 //BA.debugLineNum = 59703337;BA.debugLine="bgColor = Colors.RGB(177, 200, 249)'azul";
_bgcolor = __c.Colors.RGB((int) (177),(int) (200),(int) (249));
RDebugUtils.currentLine=59703338;
 //BA.debugLineNum = 59703338;BA.debugLine="textColor = Colors.black";
_textcolor = __c.Colors.Black;
RDebugUtils.currentLine=59703339;
 //BA.debugLineNum = 59703339;BA.debugLine="If c.GetString(\"HVD_CODPROMO\") <> \"1\" Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CODPROMO")).equals("1") == false) { 
RDebugUtils.currentLine=59703341;
 //BA.debugLineNum = 59703341;BA.debugLine="bgColor = Colors.White";
_bgcolor = __c.Colors.White;
 };
RDebugUtils.currentLine=59703345;
 //BA.debugLineNum = 59703345;BA.debugLine="clv_pedido.Add(CreateListItem(c.GetString(\"HVD_";
__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._traeprecio /*String*/ (ba,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CODPROMO")),(int)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CANT"))),(int) (0),__ref._clv_pedido /*b4a.example3.customlistview*/ ._asview().getWidth(),__c.DipToCurrent((int) (50)),__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)).getObject())),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PRONOMBRE")));
 }
};
 };
RDebugUtils.currentLine=59703350;
 //BA.debugLineNum = 59703350;BA.debugLine="Private vc As Cursor = Starter.skmt.ExecQuery(\"se";
_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 * from REPARTO where REP_CLIENTE in (select cuenta from cuentaa) and REP_RECHAZO = '0' and REP_CANT > 0 order by REP_PRONOMBRE")));
RDebugUtils.currentLine=59703351;
 //BA.debugLineNum = 59703351;BA.debugLine="Log($\"VENTA: ${vc.RowCount}\"$)";
__c.LogImpl("359703351",("VENTA: "+__c.SmartStringFormatter("",(Object)(_vc.getRowCount()))+""),0);
RDebugUtils.currentLine=59703352;
 //BA.debugLineNum = 59703352;BA.debugLine="If vc.RowCount > 0 Then";
if (_vc.getRowCount()>0) { 
RDebugUtils.currentLine=59703355;
 //BA.debugLineNum = 59703355;BA.debugLine="textColor = Colors.RGB(0,87,142)";
_textcolor = __c.Colors.RGB((int) (0),(int) (87),(int) (142));
RDebugUtils.currentLine=59703356;
 //BA.debugLineNum = 59703356;BA.debugLine="For i=0 To vc.RowCount -1";
{
final int step45 = 1;
final int limit45 = (int) (_vc.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit45 ;_i = _i + step45 ) {
RDebugUtils.currentLine=59703357;
 //BA.debugLineNum = 59703357;BA.debugLine="vc.Position = i";
_vc.setPosition(_i);
RDebugUtils.currentLine=59703358;
 //BA.debugLineNum = 59703358;BA.debugLine="Private cantCO As Int = 0";
_cantco = (int) (0);
RDebugUtils.currentLine=59703360;
 //BA.debugLineNum = 59703360;BA.debugLine="Private cco As Cursor = Starter.skmt.ExecQuery(";
_cco = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_cco = (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 REPARTO where REP_CLIENTE = '"+__c.SmartStringFormatter("",(Object)(_vc.GetString("REP_CLI_ORIG")))+"' and REP_CLI_ORIG = '"+__c.SmartStringFormatter("",(Object)(_vc.GetString("REP_CLI_ORIG")))+"' and REP_PRODID='"+__c.SmartStringFormatter("",(Object)(_vc.GetString("REP_PRODID")))+"' and REP_RECHAZO = '1' and REP_CANT > 0"))));
RDebugUtils.currentLine=59703362;
 //BA.debugLineNum = 59703362;BA.debugLine="If cco.RowCount > 0 Then";
if (_cco.getRowCount()>0) { 
RDebugUtils.currentLine=59703363;
 //BA.debugLineNum = 59703363;BA.debugLine="cco.Position = 0";
_cco.setPosition((int) (0));
RDebugUtils.currentLine=59703364;
 //BA.debugLineNum = 59703364;BA.debugLine="cantCO = cco.GetString(\"REP_CANT\") + vc.GetStr";
_cantco = (int) ((double)(Double.parseDouble(_cco.GetString("REP_CANT")))+(double)(Double.parseDouble(_vc.GetString("REP_CANT"))));
 };
RDebugUtils.currentLine=59703366;
 //BA.debugLineNum = 59703366;BA.debugLine="cantCO = Subs.traeCantidadRechazada(vc.GetStrin";
_cantco = _subs._traecantidadrechazada /*int*/ (ba,_vc.GetString("REP_CLI_ORIG"),_vc.GetString("REP_PRODID"));
RDebugUtils.currentLine=59703369;
 //BA.debugLineNum = 59703369;BA.debugLine="clv_pedido.Add(CreateListItem(vc.GetString(\"REP";
__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,_vc.GetString("REP_PRONOMBRE"),_subs._traeprecio /*String*/ (ba,_vc.GetString("REP_PRODID"),_subs._traealmacen /*String*/ (ba)),(int)(Double.parseDouble(_vc.GetString("REP_CANT"))),_cantco,__ref._clv_pedido /*b4a.example3.customlistview*/ ._asview().getWidth(),__c.DipToCurrent((int) (50)),__ref._bmp /*anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper*/ ,_vc.GetString("REP_PRODID"),_bgcolor,_textcolor,BA.NumberToString(1),_vc.GetString("REP_CLI_ORIG")).getObject())),(Object)(_vc.GetString("REP_PRONOMBRE")));
 }
};
RDebugUtils.currentLine=59703371;
 //BA.debugLineNum = 59703371;BA.debugLine="cco.Close";
_cco.Close();
RDebugUtils.currentLine=59703372;
 //BA.debugLineNum = 59703372;BA.debugLine="vc.Close";
_vc.Close();
 };
RDebugUtils.currentLine=59703375;
 //BA.debugLineNum = 59703375;BA.debugLine="If Existe <> 0 Then";
if ((__ref._existe /*String*/ ).equals(BA.NumberToString(0)) == false) { 
RDebugUtils.currentLine=59703376;
 //BA.debugLineNum = 59703376;BA.debugLine="c = Starter.skmt.ExecQuery(\"select SUM(HVD_CANT)";
__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 SUM(HVD_CANT) AS PC_NOART, SUM(HVD_COSTO_TOT) AS PC_MONTO from HIST_VENTAS where HVD_CLIENTE in (Select CUENTA from cuentaa) and HVD_RECHAZO = 0 ")));
RDebugUtils.currentLine=59703377;
 //BA.debugLineNum = 59703377;BA.debugLine="C.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=59703378;
 //BA.debugLineNum = 59703378;BA.debugLine="L_CANT.Text = c.GetString(\"PC_NOART\")";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_NOART")));
RDebugUtils.currentLine=59703379;
 //BA.debugLineNum = 59703379;BA.debugLine="L_TOTAL.Text = Round2(c.GetString(\"PC_MONTO\"), 2";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.Round2((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_MONTO"))),(int) (2))));
 };
RDebugUtils.currentLine=59703381;
 //BA.debugLineNum = 59703381;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 PEDIDO  WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=59703382;
 //BA.debugLineNum = 59703382;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=59703383;
 //BA.debugLineNum = 59703383;BA.debugLine="Existe = C.GetString(\"EXISTE\")";
__ref._existe /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("EXISTE");
RDebugUtils.currentLine=59703384;
 //BA.debugLineNum = 59703384;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=59703387;
 //BA.debugLineNum = 59703387;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=59703405;
 //BA.debugLineNum = 59703405;BA.debugLine="If Existe <> 0 Then";
if ((__ref._existe /*String*/ ).equals(BA.NumberToString(0)) == false) { 
RDebugUtils.currentLine=59703406;
 //BA.debugLineNum = 59703406;BA.debugLine="c=Starter.skmt.ExecQuery(\"select SUM(PE_CANT) AS";
__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 SUM(PE_CANT) AS PE_CANT, SUM(PE_COSTO_TOT) AS PE_COSTO_TOT FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=59703407;
 //BA.debugLineNum = 59703407;BA.debugLine="C.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=59703408;
 //BA.debugLineNum = 59703408;BA.debugLine="L_CANT.Text = L_CANT.Text + c.GetString(\"PE_CANT";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence((double)(Double.parseDouble(__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()))+(double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))));
RDebugUtils.currentLine=59703409;
 //BA.debugLineNum = 59703409;BA.debugLine="L_TOTAL.Text = Round2(L_TOTAL.Text  + c.GetStrin";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.Round2((double)(Double.parseDouble(__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()))+(double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_COSTO_TOT"))),(int) (2))));
 };
RDebugUtils.currentLine=59703413;
 //BA.debugLineNum = 59703413;BA.debugLine="Private cym As Map = Subs.traemosCantYMonto(clv_p";
_cym = new anywheresoftware.b4a.objects.collections.Map();
_cym = _subs._traemoscantymonto /*anywheresoftware.b4a.objects.collections.Map*/ (ba,__ref._clv_pedido /*b4a.example3.customlistview*/ );
RDebugUtils.currentLine=59703414;
 //BA.debugLineNum = 59703414;BA.debugLine="L_CANT.Text = cym.Get(\"cantidad\")";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_cym.Get((Object)("cantidad"))));
RDebugUtils.currentLine=59703415;
 //BA.debugLineNum = 59703415;BA.debugLine="L_TOTAL.Text = Round2(cym.Get(\"monto\"), 2)";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.Round2((double)(BA.ObjectToNumber(_cym.Get((Object)("monto")))),(int) (2))));
RDebugUtils.currentLine=59703416;
 //BA.debugLineNum = 59703416;BA.debugLine="End Sub";
return "";
}
public String  _b_regresar_click(reparto_mazapa.keymon.lat.c_historico __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_historico";
if (Debug.shouldDelegate(ba, "b_regresar_click", false))
	 {return ((String) Debug.delegate(ba, "b_regresar_click", null));}
RDebugUtils.currentLine=59834368;
 //BA.debugLineNum = 59834368;BA.debugLine="Sub b_regresar_Click";
RDebugUtils.currentLine=59834369;
 //BA.debugLineNum = 59834369;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=59834370;
 //BA.debugLineNum = 59834370;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.objects.PanelWrapper  _createlistitem(reparto_mazapa.keymon.lat.c_historico __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) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_historico";
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}));}
anywheresoftware.b4a.objects.B4XViewWrapper _p = null;
anywheresoftware.b4a.objects.CSBuilder _cs = null;
RDebugUtils.currentLine=60096512;
 //BA.debugLineNum = 60096512;BA.debugLine="Sub CreateListItem(Text As String, precioU As Stri";
RDebugUtils.currentLine=60096513;
 //BA.debugLineNum = 60096513;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=60096514;
 //BA.debugLineNum = 60096514;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=60096515;
 //BA.debugLineNum = 60096515;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=60096516;
 //BA.debugLineNum = 60096516;BA.debugLine="p.SetLayoutAnimated(0, 0, 0, Width, Height)";
_p.SetLayoutAnimated((int) (0),(int) (0),(int) (0),_width,_height);
RDebugUtils.currentLine=60096517;
 //BA.debugLineNum = 60096517;BA.debugLine="p.LoadLayout(\"prodItem\")";
_p.LoadLayout("prodItem",ba);
RDebugUtils.currentLine=60096518;
 //BA.debugLineNum = 60096518;BA.debugLine="p_prods.Color = bc";
__ref._p_prods /*anywheresoftware.b4a.objects.PanelWrapper*/ .setColor(_bc);
RDebugUtils.currentLine=60096519;
 //BA.debugLineNum = 60096519;BA.debugLine="l_prodX.TextColor = tc";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor(_tc);
RDebugUtils.currentLine=60096520;
 //BA.debugLineNum = 60096520;BA.debugLine="precioU = $\"$1.2{precioU}\"$";
_preciou = (""+__c.SmartStringFormatter("1.2",(Object)(_preciou))+"");
RDebugUtils.currentLine=60096521;
 //BA.debugLineNum = 60096521;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=60096522;
 //BA.debugLineNum = 60096522;BA.debugLine="If promo <> \"1\" And precioU = 0 Then";
if ((_promo).equals("1") == false && (_preciou).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=60096523;
 //BA.debugLineNum = 60096523;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=60096525;
 //BA.debugLineNum = 60096525;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=60096527;
 //BA.debugLineNum = 60096527;BA.debugLine="l_pCant.Tag = Round2(precioU,2)&\"|\"&inv&\"|\"&prodI";
__ref._l_pcant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTag((Object)(BA.NumberToString(__c.Round2((double)(Double.parseDouble(_preciou)),(int) (2)))+"|"+BA.NumberToString(_inv)+"|"+_prodid+"|"+_promo+"|"+BA.NumberToString(_inv2)+"|"+_cliente_original));
RDebugUtils.currentLine=60096528;
 //BA.debugLineNum = 60096528;BA.debugLine="et_pCant.Tag = Round2(precioU,2)&\"|\"&inv&\"|\"&prod";
__ref._et_pcant /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setTag((Object)(BA.NumberToString(__c.Round2((double)(Double.parseDouble(_preciou)),(int) (2)))+"|"+BA.NumberToString(_inv)+"|"+_prodid+"|"+_promo+"|"+BA.NumberToString(_inv2)+"|"+_cliente_original));
RDebugUtils.currentLine=60096529;
 //BA.debugLineNum = 60096529;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=60096531;
 //BA.debugLineNum = 60096531;BA.debugLine="l_pCant.Text = inv";
__ref._l_pcant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_inv));
RDebugUtils.currentLine=60096535;
 //BA.debugLineNum = 60096535;BA.debugLine="l_pCant.BringToFront";
__ref._l_pcant /*anywheresoftware.b4a.objects.LabelWrapper*/ .BringToFront();
RDebugUtils.currentLine=60096536;
 //BA.debugLineNum = 60096536;BA.debugLine="et_pCant.SendToBack";
__ref._et_pcant /*anywheresoftware.b4a.objects.EditTextWrapper*/ .SendToBack();
RDebugUtils.currentLine=60096539;
 //BA.debugLineNum = 60096539;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=60096540;
 //BA.debugLineNum = 60096540;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest(reparto_mazapa.keymon.lat.c_historico __ref) throws Exception{
RDebugUtils.currentModule="c_historico";
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_historico parent,reparto_mazapa.keymon.lat.c_historico __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
reparto_mazapa.keymon.lat.c_historico __ref;
reparto_mazapa.keymon.lat.c_historico parent;

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

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

            }
        }
    }
}
public String  _b4xpage_created(reparto_mazapa.keymon.lat.c_historico __ref,anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_historico";
if (Debug.shouldDelegate(ba, "b4xpage_created", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_created", new Object[] {_root1}));}
RDebugUtils.currentLine=59637760;
 //BA.debugLineNum = 59637760;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=59637761;
 //BA.debugLineNum = 59637761;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=59637763;
 //BA.debugLineNum = 59637763;BA.debugLine="g.Initialize(\"GPS\")";
__ref._g /*anywheresoftware.b4a.gps.GPS*/ .Initialize("GPS");
RDebugUtils.currentLine=59637764;
 //BA.debugLineNum = 59637764;BA.debugLine="Root.LoadLayout(\"historico\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("historico",ba);
RDebugUtils.currentLine=59637765;
 //BA.debugLineNum = 59637765;BA.debugLine="b_borra.Visible = False";
__ref._b_borra /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=59637766;
 //BA.debugLineNum = 59637766;BA.debugLine="Titulo.Text = \"Pedido\"";
__ref._titulo /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("Pedido"));
RDebugUtils.currentLine=59637767;
 //BA.debugLineNum = 59637767;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(reparto_mazapa.keymon.lat.c_historico __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_historico";
RDebugUtils.currentLine=59506688;
 //BA.debugLineNum = 59506688;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=59506689;
 //BA.debugLineNum = 59506689;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=59506690;
 //BA.debugLineNum = 59506690;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=59506691;
 //BA.debugLineNum = 59506691;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
RDebugUtils.currentLine=59506692;
 //BA.debugLineNum = 59506692;BA.debugLine="Dim clie_id As String";
_clie_id = "";
RDebugUtils.currentLine=59506693;
 //BA.debugLineNum = 59506693;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
RDebugUtils.currentLine=59506694;
 //BA.debugLineNum = 59506694;BA.debugLine="Dim usuario As String";
_usuario = "";
RDebugUtils.currentLine=59506695;
 //BA.debugLineNum = 59506695;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=59506697;
 //BA.debugLineNum = 59506697;BA.debugLine="Dim b_regresar As Button";
_b_regresar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=59506698;
 //BA.debugLineNum = 59506698;BA.debugLine="Dim ListView1 As ListView";
_listview1 = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=59506699;
 //BA.debugLineNum = 59506699;BA.debugLine="Dim L_CANT As Label";
_l_cant = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=59506700;
 //BA.debugLineNum = 59506700;BA.debugLine="Dim L_TOTAL As Label";
_l_total = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=59506701;
 //BA.debugLineNum = 59506701;BA.debugLine="Dim b_borra As Button";
_b_borra = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=59506702;
 //BA.debugLineNum = 59506702;BA.debugLine="Dim Existe As String";
_existe = "";
RDebugUtils.currentLine=59506703;
 //BA.debugLineNum = 59506703;BA.debugLine="Dim result As String";
_result = "";
RDebugUtils.currentLine=59506705;
 //BA.debugLineNum = 59506705;BA.debugLine="Dim cuantos As String";
_cuantos = "";
RDebugUtils.currentLine=59506706;
 //BA.debugLineNum = 59506706;BA.debugLine="Dim nombre_prod As String";
_nombre_prod = "";
RDebugUtils.currentLine=59506707;
 //BA.debugLineNum = 59506707;BA.debugLine="Dim cuantos_pedido As String";
_cuantos_pedido = "";
RDebugUtils.currentLine=59506708;
 //BA.debugLineNum = 59506708;BA.debugLine="Private Titulo As Label";
_titulo = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=59506709;
 //BA.debugLineNum = 59506709;BA.debugLine="Private P1 As Panel";
_p1 = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=59506710;
 //BA.debugLineNum = 59506710;BA.debugLine="Private lv2 As ListView";
_lv2 = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=59506711;
 //BA.debugLineNum = 59506711;BA.debugLine="Private p_principal As Panel";
_p_principal = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=59506712;
 //BA.debugLineNum = 59506712;BA.debugLine="Dim clv_pedido As CustomListView";
_clv_pedido = new b4a.example3.customlistview();
RDebugUtils.currentLine=59506713;
 //BA.debugLineNum = 59506713;BA.debugLine="Private p_prods As Panel";
_p_prods = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=59506714;
 //BA.debugLineNum = 59506714;BA.debugLine="Private l_prodX As Label";
_l_prodx = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=59506715;
 //BA.debugLineNum = 59506715;BA.debugLine="Private l_pCant As Label";
_l_pcant = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=59506716;
 //BA.debugLineNum = 59506716;BA.debugLine="Private et_pCant As EditText";
_et_pcant = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=59506717;
 //BA.debugLineNum = 59506717;BA.debugLine="Dim bmp As Bitmap";
_bmp = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper();
RDebugUtils.currentLine=59506718;
 //BA.debugLineNum = 59506718;BA.debugLine="Dim etCantHasFocus As Boolean = False";
_etcanthasfocus = __c.False;
RDebugUtils.currentLine=59506719;
 //BA.debugLineNum = 59506719;BA.debugLine="Dim totalProds As Int = 0";
_totalprods = (int) (0);
RDebugUtils.currentLine=59506720;
 //BA.debugLineNum = 59506720;BA.debugLine="Dim totalCompra As Int = 0";
_totalcompra = (int) (0);
RDebugUtils.currentLine=59506721;
 //BA.debugLineNum = 59506721;BA.debugLine="Dim prodsMap As Map";
_prodsmap = new anywheresoftware.b4a.objects.collections.Map();
RDebugUtils.currentLine=59506722;
 //BA.debugLineNum = 59506722;BA.debugLine="Dim reconstruirPedido As Boolean = False";
_reconstruirpedido = __c.False;
RDebugUtils.currentLine=59506723;
 //BA.debugLineNum = 59506723;BA.debugLine="Dim promoABorrar As String";
_promoaborrar = "";
RDebugUtils.currentLine=59506724;
 //BA.debugLineNum = 59506724;BA.debugLine="Private b_guardar As Button";
_b_guardar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=59506725;
 //BA.debugLineNum = 59506725;BA.debugLine="Private b_prodMas As Button";
_b_prodmas = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=59506726;
 //BA.debugLineNum = 59506726;BA.debugLine="Private b_prodMenos As Button";
_b_prodmenos = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=59506727;
 //BA.debugLineNum = 59506727;BA.debugLine="End Sub";
return "";
}
public String  _cuentaprods(reparto_mazapa.keymon.lat.c_historico __ref,String _accion) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_historico";
if (Debug.shouldDelegate(ba, "cuentaprods", false))
	 {return ((String) Debug.delegate(ba, "cuentaprods", new Object[] {_accion}));}
int _cantrechazada = 0;
int _i = 0;
anywheresoftware.b4a.objects.B4XViewWrapper _p0 = null;
anywheresoftware.b4a.objects.B4XViewWrapper _p = null;
anywheresoftware.b4a.objects.B4XViewWrapper _cant1 = null;
anywheresoftware.b4a.objects.collections.List _estetag = null;
String _esteprod = "";
int _estacant = 0;
int _estacantoriginal = 0;
String _estecliente = "";
String _esteprodnombre = "";
int _esteclienteoriginal = 0;
String _fechareparto = "";
String _maxprods = "";
String _esteprecio = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _rr = null;
anywheresoftware.b4a.objects.collections.Map _m = null;
int _bgcolor = 0;
int _textcolor = 0;
String _newpromo = "";
String _newprecio = "";
String _pr = "";
anywheresoftware.b4a.objects.collections.Map _pr1 = null;
String _cantidad1 = "";
String _totalfinal = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _x = null;
String _cantidady = "";
String _preciou = "";
String _costototalhist = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _z = null;
String _cantidad2 = "";
RDebugUtils.currentLine=60293120;
 //BA.debugLineNum = 60293120;BA.debugLine="Sub cuentaProds(accion As String)";
RDebugUtils.currentLine=60293122;
 //BA.debugLineNum = 60293122;BA.debugLine="Log(\"*********************************************";
__c.LogImpl("360293122","*******************************************************",0);
RDebugUtils.currentLine=60293123;
 //BA.debugLineNum = 60293123;BA.debugLine="Private cantRechazada As Int = 0";
_cantrechazada = (int) (0);
RDebugUtils.currentLine=60293124;
 //BA.debugLineNum = 60293124;BA.debugLine="If Not(reconstruirPedido) Then";
if (__c.Not(__ref._reconstruirpedido /*boolean*/ )) { 
RDebugUtils.currentLine=60293125;
 //BA.debugLineNum = 60293125;BA.debugLine="Log(\"***********  CUENTAPRODS - NO RECONSTRUIR\")";
__c.LogImpl("360293125","***********  CUENTAPRODS - NO RECONSTRUIR",0);
RDebugUtils.currentLine=60293126;
 //BA.debugLineNum = 60293126;BA.debugLine="prodsMap.Initialize";
__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
RDebugUtils.currentLine=60293127;
 //BA.debugLineNum = 60293127;BA.debugLine="For i = 0 To clv_pedido.GetSize - 1";
{
final int step6 = 1;
final int limit6 = (int) (__ref._clv_pedido /*b4a.example3.customlistview*/ ._getsize()-1);
_i = (int) (0) ;
for (;_i <= limit6 ;_i = _i + step6 ) {
RDebugUtils.currentLine=60293128;
 //BA.debugLineNum = 60293128;BA.debugLine="Private p0 As B4XView = clv_pedido.GetPanel(i)";
_p0 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p0 = __ref._clv_pedido /*b4a.example3.customlistview*/ ._getpanel(_i);
RDebugUtils.currentLine=60293129;
 //BA.debugLineNum = 60293129;BA.debugLine="Private p As B4XView = p0.GetView(0)";
_p = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p = _p0.GetView((int) (0));
RDebugUtils.currentLine=60293130;
 //BA.debugLineNum = 60293130;BA.debugLine="Private cant1 As B4XView = p.GetView(2).GetView";
_cant1 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_cant1 = _p.GetView((int) (2)).GetView((int) (3));
RDebugUtils.currentLine=60293131;
 //BA.debugLineNum = 60293131;BA.debugLine="If cant1.Text = \"\" Then cant1.Text = 0";
if ((_cant1.getText()).equals("")) { 
_cant1.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=60293133;
 //BA.debugLineNum = 60293133;BA.debugLine="Private esteTag As List = Regex.Split(\"\\|\", can";
_estetag = new anywheresoftware.b4a.objects.collections.List();
_estetag = anywheresoftware.b4a.keywords.Common.ArrayToList(__c.Regex.Split("\\|",BA.ObjectToString(_cant1.getTag())));
RDebugUtils.currentLine=60293134;
 //BA.debugLineNum = 60293134;BA.debugLine="Log(\"-------------------------------------\")";
__c.LogImpl("360293134","-------------------------------------",0);
RDebugUtils.currentLine=60293135;
 //BA.debugLineNum = 60293135;BA.debugLine="Log($\"ET: ${esteTag}\"$)";
__c.LogImpl("360293135",("ET: "+__c.SmartStringFormatter("",(Object)(_estetag.getObject()))+""),0);
RDebugUtils.currentLine=60293136;
 //BA.debugLineNum = 60293136;BA.debugLine="Private esteProd As String = esteTag.Get(2)";
_esteprod = BA.ObjectToString(_estetag.Get((int) (2)));
RDebugUtils.currentLine=60293137;
 //BA.debugLineNum = 60293137;BA.debugLine="Private estaCant As Int = cant1.Text";
_estacant = (int)(Double.parseDouble(_cant1.getText()));
RDebugUtils.currentLine=60293138;
 //BA.debugLineNum = 60293138;BA.debugLine="Private estaCantOriginal As Int = esteTag.Get(1";
_estacantoriginal = (int)(BA.ObjectToNumber(_estetag.Get((int) (1))));
RDebugUtils.currentLine=60293139;
 //BA.debugLineNum = 60293139;BA.debugLine="Private esteCliente = Subs.traeCliente";
_estecliente = _subs._traecliente /*String*/ (ba);
RDebugUtils.currentLine=60293140;
 //BA.debugLineNum = 60293140;BA.debugLine="Private esteProdNombre = Subs.traeNombre(estePr";
_esteprodnombre = _subs._traenombre /*String*/ (ba,_esteprod);
RDebugUtils.currentLine=60293141;
 //BA.debugLineNum = 60293141;BA.debugLine="Private esteClienteOriginal As Int = esteTag.Ge";
_esteclienteoriginal = (int)(BA.ObjectToNumber(_estetag.Get((int) (5))));
RDebugUtils.currentLine=60293142;
 //BA.debugLineNum = 60293142;BA.debugLine="Private fechaReparto As String = Subs.traeFecha";
_fechareparto = _subs._traefechareparto /*String*/ (ba);
RDebugUtils.currentLine=60293143;
 //BA.debugLineNum = 60293143;BA.debugLine="Private maxProds = Subs.traeMaxCantidad(esteTag";
_maxprods = BA.NumberToString(_subs._traemaxcantidad /*int*/ (ba,BA.ObjectToString(_estetag.Get((int) (5))),BA.ObjectToString(_estetag.Get((int) (2)))));
RDebugUtils.currentLine=60293145;
 //BA.debugLineNum = 60293145;BA.debugLine="If cant1.Text > maxProds Then cant1.Text = maxP";
if ((double)(Double.parseDouble(_cant1.getText()))>(double)(Double.parseDouble(_maxprods))) { 
_cant1.setText(BA.ObjectToCharSequence(_maxprods));};
RDebugUtils.currentLine=60293147;
 //BA.debugLineNum = 60293147;BA.debugLine="cantRechazada = esteTag.Get(4) - cant1.Text";
_cantrechazada = (int) ((double)(BA.ObjectToNumber(_estetag.Get((int) (4))))-(double)(Double.parseDouble(_cant1.getText())));
RDebugUtils.currentLine=60293150;
 //BA.debugLineNum = 60293150;BA.debugLine="Log($\"${Subs.traeCantidadRechazada(esteClienteO";
__c.LogImpl("360293150",(""+__c.SmartStringFormatter("",(Object)(_subs._traecantidadrechazada /*int*/ (ba,BA.NumberToString(_esteclienteoriginal),_esteprod)))+", "+__c.SmartStringFormatter("",(Object)(_subs._traecantidadvendida /*int*/ (ba,BA.NumberToString(_esteclienteoriginal),_esteprod)))+""),0);
RDebugUtils.currentLine=60293153;
 //BA.debugLineNum = 60293153;BA.debugLine="LogColor($\"cantRechazada = ${cantRechazada}\"$,";
__c.LogImpl("360293153",("cantRechazada = "+__c.SmartStringFormatter("",(Object)(_cantrechazada))+""),__c.Colors.Magenta);
RDebugUtils.currentLine=60293154;
 //BA.debugLineNum = 60293154;BA.debugLine="Private estePrecio As String = 0";
_esteprecio = BA.NumberToString(0);
RDebugUtils.currentLine=60293155;
 //BA.debugLineNum = 60293155;BA.debugLine="If Subs.traePrecio(esteProd, 1) <> Null Then es";
if (_subs._traeprecio /*String*/ (ba,_esteprod,BA.NumberToString(1))!= null) { 
_esteprecio = BA.NumberToString((double)(Double.parseDouble(_subs._traeprecio /*String*/ (ba,_esteprod,_subs._traealmacen /*String*/ (ba))))*_cantrechazada);};
RDebugUtils.currentLine=60293160;
 //BA.debugLineNum = 60293160;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update HIST_VENTAS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update HIST_VENTAS set HVD_PARCIAL = 1, HVD_CANT = ? WHERE HVD_PROID = ? and HVD_CLIENTE in (Select CUENTA from cuentaa)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_cant1.getText(),_esteprod}));
RDebugUtils.currentLine=60293161;
 //BA.debugLineNum = 60293161;BA.debugLine="Private rr As Cursor = Starter.skmt.ExecQuery($";
_rr = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_rr = (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(REP_CLIENTE) as hayRechazo from REPARTO where rep_prodid = '"+__c.SmartStringFormatter("",(Object)(_esteprod))+"' and REP_CLIENTE in (Select CUENTA from cuentaa)"))));
RDebugUtils.currentLine=60293162;
 //BA.debugLineNum = 60293162;BA.debugLine="rr.Position = 0";
_rr.setPosition((int) (0));
RDebugUtils.currentLine=60293164;
 //BA.debugLineNum = 60293164;BA.debugLine="If rr.GetString(\"hayRechazo\") = 0 Then";
if ((_rr.GetString("hayRechazo")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=60293165;
 //BA.debugLineNum = 60293165;BA.debugLine="Log(\"INSERTAMOS EN REPARTO\")";
__c.LogImpl("360293165","INSERTAMOS EN REPARTO",0);
RDebugUtils.currentLine=60293166;
 //BA.debugLineNum = 60293166;BA.debugLine="Starter.skmt.ExecNonQuery2(\"insert into repart";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into reparto(REP_CLIENTE, REP_PRONOMBRE, REP_CANT, REP_COSTO_TOT, REP_FECHA, REP_RECHAZO, REP_PRODID, REP_PRECIO, REP_CLI_ORIG)  VALUES (?,?,?,?,?,1,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_estecliente,_esteprodnombre,BA.NumberToString(0),_esteprecio,_fechareparto,_esteprod,_esteprecio,_estecliente}));
RDebugUtils.currentLine=60293167;
 //BA.debugLineNum = 60293167;BA.debugLine="Starter.skmt.ExecNonQuery2(\"insert into repart";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into reparto(REP_CLIENTE, REP_PRONOMBRE, REP_CANT, REP_COSTO_TOT, REP_FECHA, REP_RECHAZO, REP_PRODID, REP_PRECIO, REP_CLI_ORIG)  VALUES (?,?,?,?,?,0,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_estecliente,_esteprodnombre,BA.NumberToString(_cantrechazada),BA.NumberToString(0),_fechareparto,_esteprod,_esteprecio,_estecliente}));
 }else 
{RDebugUtils.currentLine=60293168;
 //BA.debugLineNum = 60293168;BA.debugLine="Else if esteClienteOriginal = \"0\" Then 'Actuali";
if (_esteclienteoriginal==(double)(Double.parseDouble("0"))) { 
 }else {
RDebugUtils.currentLine=60293172;
 //BA.debugLineNum = 60293172;BA.debugLine="Log($\"Actualizamos REP_CANT RECHAZO = ${cantRe";
__c.LogImpl("360293172",("Actualizamos REP_CANT RECHAZO = "+__c.SmartStringFormatter("",(Object)(_cantrechazada))+""),0);
 }}
;
RDebugUtils.currentLine=60293177;
 //BA.debugLineNum = 60293177;BA.debugLine="If cant1.Text > 0 Then";
if ((double)(Double.parseDouble(_cant1.getText()))>0) { 
RDebugUtils.currentLine=60293180;
 //BA.debugLineNum = 60293180;BA.debugLine="Private m As Map";
_m = new anywheresoftware.b4a.objects.collections.Map();
RDebugUtils.currentLine=60293181;
 //BA.debugLineNum = 60293181;BA.debugLine="m=CreateMap(\"cant\":cant1.Text, \"cant2\":esteTag";
_m = __c.createMap(new Object[] {(Object)("cant"),(Object)(_cant1.getText()),(Object)("cant2"),_estetag.Get((int) (4)),(Object)("precio"),_estetag.Get((int) (0)),(Object)("promo"),_estetag.Get((int) (3)),(Object)("nombre"),(Object)(_subs._traenombre /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (2))))),(Object)("cli_orig"),_estetag.Get((int) (5))});
RDebugUtils.currentLine=60293183;
 //BA.debugLineNum = 60293183;BA.debugLine="prodsMap.Put(esteTag.Get(2), m)";
__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Put(_estetag.Get((int) (2)),(Object)(_m.getObject()));
 };
RDebugUtils.currentLine=60293185;
 //BA.debugLineNum = 60293185;BA.debugLine="Log(\"-------------------------------------\")";
__c.LogImpl("360293185","-------------------------------------",0);
 }
};
 };
RDebugUtils.currentLine=60293188;
 //BA.debugLineNum = 60293188;BA.debugLine="Private bgColor, textColor As Int";
_bgcolor = 0;
_textcolor = 0;
RDebugUtils.currentLine=60293190;
 //BA.debugLineNum = 60293190;BA.debugLine="If reconstruirPedido Then";
if (__ref._reconstruirpedido /*boolean*/ ) { 
RDebugUtils.currentLine=60293191;
 //BA.debugLineNum = 60293191;BA.debugLine="Log(\"***********  CUENTAPRODS - SI RECONSTRUIR\")";
__c.LogImpl("360293191","***********  CUENTAPRODS - SI RECONSTRUIR",0);
RDebugUtils.currentLine=60293192;
 //BA.debugLineNum = 60293192;BA.debugLine="Private newPromo, newPrecio As String";
_newpromo = "";
_newprecio = "";
RDebugUtils.currentLine=60293193;
 //BA.debugLineNum = 60293193;BA.debugLine="clv_pedido.Clear";
__ref._clv_pedido /*b4a.example3.customlistview*/ ._clear();
RDebugUtils.currentLine=60293194;
 //BA.debugLineNum = 60293194;BA.debugLine="Log(\"Usamos PRODSMAP\")";
__c.LogImpl("360293194","Usamos PRODSMAP",0);
RDebugUtils.currentLine=60293195;
 //BA.debugLineNum = 60293195;BA.debugLine="For Each pr As String In prodsMap.Keys";
{
final anywheresoftware.b4a.BA.IterableList group53 = __ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen53 = group53.getSize()
;int index53 = 0;
;
for (; index53 < groupLen53;index53++){
_pr = BA.ObjectToString(group53.Get(index53));
RDebugUtils.currentLine=60293196;
 //BA.debugLineNum = 60293196;BA.debugLine="Private pr1 As Map = prodsMap.Get(pr)";
_pr1 = new anywheresoftware.b4a.objects.collections.Map();
_pr1 = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_pr))));
RDebugUtils.currentLine=60293197;
 //BA.debugLineNum = 60293197;BA.debugLine="Log(\"PPP: \" & pr & \"|PromoABorrar=\" & promoABor";
__c.LogImpl("360293197","PPP: "+_pr+"|PromoABorrar="+__ref._promoaborrar /*String*/ +"|"+BA.ObjectToString(_pr1),0);
RDebugUtils.currentLine=60293198;
 //BA.debugLineNum = 60293198;BA.debugLine="bgColor = Colors.RGB(177, 200, 249)'azul";
_bgcolor = __c.Colors.RGB((int) (177),(int) (200),(int) (249));
RDebugUtils.currentLine=60293199;
 //BA.debugLineNum = 60293199;BA.debugLine="textColor = Colors.black";
_textcolor = __c.Colors.Black;
RDebugUtils.currentLine=60293200;
 //BA.debugLineNum = 60293200;BA.debugLine="newPromo = pr1.Get(\"promo\")";
_newpromo = BA.ObjectToString(_pr1.Get((Object)("promo")));
RDebugUtils.currentLine=60293201;
 //BA.debugLineNum = 60293201;BA.debugLine="newPrecio = pr1.Get(\"precio\")";
_newprecio = BA.ObjectToString(_pr1.Get((Object)("precio")));
RDebugUtils.currentLine=60293202;
 //BA.debugLineNum = 60293202;BA.debugLine="Log(\"AAA: \" & newPromo & \"|\" & promoABorrar)";
__c.LogImpl("360293202","AAA: "+_newpromo+"|"+__ref._promoaborrar /*String*/ ,0);
RDebugUtils.currentLine=60293203;
 //BA.debugLineNum = 60293203;BA.debugLine="If newPromo = promoABorrar Then";
if ((_newpromo).equals(__ref._promoaborrar /*String*/ )) { 
RDebugUtils.currentLine=60293204;
 //BA.debugLineNum = 60293204;BA.debugLine="newPromo = 1";
_newpromo = BA.NumberToString(1);
RDebugUtils.currentLine=60293205;
 //BA.debugLineNum = 60293205;BA.debugLine="newPrecio = Subs.traePrecio(pr, False) * pr1.G";
_newprecio = BA.NumberToString((double)(Double.parseDouble(_subs._traeprecio /*String*/ (ba,_pr,BA.ObjectToString(__c.False))))*(double)(BA.ObjectToNumber(_pr1.Get((Object)("cant")))));
RDebugUtils.currentLine=60293207;
 //BA.debugLineNum = 60293207;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTAS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_COSTO_TOT = "+__c.SmartStringFormatter("",(Object)(_newprecio))+", HVD_CODPROMO = '"+__c.SmartStringFormatter("",(Object)(_subs._traealmacen /*String*/ (ba)))+"' WHERE HVD_PRONOMBRE = '"+__c.SmartStringFormatter("",_pr1.Get((Object)("nombre")))+"' and HVD_cliente in (Select CUENTA from cuentaa)"));
RDebugUtils.currentLine=60293208;
 //BA.debugLineNum = 60293208;BA.debugLine="LogColor(\"CAMBIAMOS PROMO: \" & newPromo, Color";
__c.LogImpl("360293208","CAMBIAMOS PROMO: "+_newpromo,__c.Colors.Magenta);
 };
RDebugUtils.currentLine=60293210;
 //BA.debugLineNum = 60293210;BA.debugLine="If newPromo <> \"1\" Then";
if ((_newpromo).equals("1") == false) { 
RDebugUtils.currentLine=60293212;
 //BA.debugLineNum = 60293212;BA.debugLine="bgColor = Colors.White";
_bgcolor = __c.Colors.White;
 };
RDebugUtils.currentLine=60293214;
 //BA.debugLineNum = 60293214;BA.debugLine="Log($\"CLI: ${pr1.Get(\"nombre\")}, ${newPrecio},";
__c.LogImpl("360293214",("CLI: "+__c.SmartStringFormatter("",_pr1.Get((Object)("nombre")))+", "+__c.SmartStringFormatter("",(Object)(_newprecio))+", "+__c.SmartStringFormatter("",_pr1.Get((Object)("cant")))+", "+__c.SmartStringFormatter("",_pr1.Get((Object)("cant2")))+""),0);
RDebugUtils.currentLine=60293215;
 //BA.debugLineNum = 60293215;BA.debugLine="clv_pedido.Add(CreateListItem(pr1.Get(\"nombre\")";
__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,BA.ObjectToString(_pr1.Get((Object)("nombre"))),_newprecio,(int)(BA.ObjectToNumber(_pr1.Get((Object)("cant")))),(int)(BA.ObjectToNumber(_pr1.Get((Object)("cant2")))),__ref._clv_pedido /*b4a.example3.customlistview*/ ._asview().getWidth(),__c.DipToCurrent((int) (50)),__ref._bmp /*anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper*/ ,_pr,_bgcolor,_textcolor,_newpromo,BA.ObjectToString(_pr1.Get((Object)("cli_orig")))).getObject())),_pr1.Get((Object)("nombre")));
RDebugUtils.currentLine=60293216;
 //BA.debugLineNum = 60293216;BA.debugLine="reconstruirPedido = False";
__ref._reconstruirpedido /*boolean*/  = __c.False;
 }
};
RDebugUtils.currentLine=60293218;
 //BA.debugLineNum = 60293218;BA.debugLine="promoABorrar = \"\"";
__ref._promoaborrar /*String*/  = "";
 };
RDebugUtils.currentLine=60293220;
 //BA.debugLineNum = 60293220;BA.debugLine="Log($\"Total Prods: ${totalProds}, Total Compra: $";
__c.LogImpl("360293220",("Total Prods: "+__c.SmartStringFormatter("",(Object)(__ref._totalprods /*int*/ ))+", Total Compra: $"+__c.SmartStringFormatter("1.2",(Object)(__ref._totalcompra /*int*/ ))+""),0);
RDebugUtils.currentLine=60293221;
 //BA.debugLineNum = 60293221;BA.debugLine="LogColor(\"prodsMap=\" & prodsMap, Colors.Green)";
__c.LogImpl("360293221","prodsMap="+BA.ObjectToString(__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ ),__c.Colors.Green);
RDebugUtils.currentLine=60293224;
 //BA.debugLineNum = 60293224;BA.debugLine="LogColor(prodsMap, Colors.Blue)";
__c.LogImpl("360293224",BA.ObjectToString(__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ ),__c.Colors.Blue);
RDebugUtils.currentLine=60293225;
 //BA.debugLineNum = 60293225;BA.debugLine="c = Starter.skmt.ExecQuery($\"SELECT sum(HVD_CANT)";
__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 sum(HVD_CANT) as CANTIDAD FROM HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)"))));
RDebugUtils.currentLine=60293226;
 //BA.debugLineNum = 60293226;BA.debugLine="Dim cantidad1 As String = 0";
_cantidad1 = BA.NumberToString(0);
RDebugUtils.currentLine=60293227;
 //BA.debugLineNum = 60293227;BA.debugLine="If c.RowCount > 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=60293228;
 //BA.debugLineNum = 60293228;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=60293229;
 //BA.debugLineNum = 60293229;BA.debugLine="cantidad1 = c.GetString(\"CANTIDAD\")";
_cantidad1 = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANTIDAD");
RDebugUtils.currentLine=60293230;
 //BA.debugLineNum = 60293230;BA.debugLine="L_CANT.Text = Round(cantidad1)";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.Round((double)(Double.parseDouble(_cantidad1)))));
 };
RDebugUtils.currentLine=60293232;
 //BA.debugLineNum = 60293232;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=60293234;
 //BA.debugLineNum = 60293234;BA.debugLine="Dim totalfinal As String = 0";
_totalfinal = BA.NumberToString(0);
RDebugUtils.currentLine=60293235;
 //BA.debugLineNum = 60293235;BA.debugLine="For Each pr As String In prodsMap.Keys";
{
final anywheresoftware.b4a.BA.IterableList group88 = __ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen88 = group88.getSize()
;int index88 = 0;
;
for (; index88 < groupLen88;index88++){
_pr = BA.ObjectToString(group88.Get(index88));
RDebugUtils.currentLine=60293236;
 //BA.debugLineNum = 60293236;BA.debugLine="Private pr1 As Map = prodsMap.Get(pr)";
_pr1 = new anywheresoftware.b4a.objects.collections.Map();
_pr1 = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_pr))));
RDebugUtils.currentLine=60293238;
 //BA.debugLineNum = 60293238;BA.debugLine="Dim x As Cursor = Starter.skmt.ExecQuery($\"SELEC";
_x = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_x = (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)(_pr))+"'"))));
RDebugUtils.currentLine=60293239;
 //BA.debugLineNum = 60293239;BA.debugLine="c = Starter.skmt.ExecQuery($\"SELECT HVD_CANT FRO";
__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_CANT FROM HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND HVD_PROID ='"+__c.SmartStringFormatter("",(Object)(_pr))+"' "))));
RDebugUtils.currentLine=60293240;
 //BA.debugLineNum = 60293240;BA.debugLine="Dim cantidady As String = 0";
_cantidady = BA.NumberToString(0);
RDebugUtils.currentLine=60293241;
 //BA.debugLineNum = 60293241;BA.debugLine="If c.RowCount >0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=60293242;
 //BA.debugLineNum = 60293242;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=60293243;
 //BA.debugLineNum = 60293243;BA.debugLine="cantidady = c.GetString(\"HVD_CANT\")";
_cantidady = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CANT");
 };
RDebugUtils.currentLine=60293246;
 //BA.debugLineNum = 60293246;BA.debugLine="If x.RowCount > 0 Then";
if (_x.getRowCount()>0) { 
RDebugUtils.currentLine=60293247;
 //BA.debugLineNum = 60293247;BA.debugLine="x.Position = 0";
_x.setPosition((int) (0));
RDebugUtils.currentLine=60293249;
 //BA.debugLineNum = 60293249;BA.debugLine="Dim preciou As String = x.GetString(\"CAT_GP_PRE";
_preciou = _x.GetString("CAT_GP_PRECIO");
RDebugUtils.currentLine=60293250;
 //BA.debugLineNum = 60293250;BA.debugLine="Dim costototalhist  As String = preciou * canti";
_costototalhist = BA.NumberToString((double)(Double.parseDouble(_preciou))*(double)(Double.parseDouble(_cantidady)));
 };
RDebugUtils.currentLine=60293253;
 //BA.debugLineNum = 60293253;BA.debugLine="totalfinal = totalfinal + costototalhist";
_totalfinal = BA.NumberToString((double)(Double.parseDouble(_totalfinal))+(double)(Double.parseDouble(_costototalhist)));
RDebugUtils.currentLine=60293254;
 //BA.debugLineNum = 60293254;BA.debugLine="x.Close";
_x.Close();
 }
};
RDebugUtils.currentLine=60293256;
 //BA.debugLineNum = 60293256;BA.debugLine="L_TOTAL.Text = Round2(totalfinal, 2)";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.Round2((double)(Double.parseDouble(_totalfinal)),(int) (2))));
RDebugUtils.currentLine=60293257;
 //BA.debugLineNum = 60293257;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=60293259;
 //BA.debugLineNum = 60293259;BA.debugLine="c = Starter.skmt.ExecQuery(\"select COUNT(*) AS CU";
__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 CUANTOS from REPARTO where REP_CLIENTE in (select cuenta from cuentaa) and REP_RECHAZO = '0' and REP_CANT > 0 order by REP_PRONOMBRE")));
RDebugUtils.currentLine=60293260;
 //BA.debugLineNum = 60293260;BA.debugLine="If c.RowCount > 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=60293261;
 //BA.debugLineNum = 60293261;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=60293262;
 //BA.debugLineNum = 60293262;BA.debugLine="If c.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")))>0) { 
RDebugUtils.currentLine=60293264;
 //BA.debugLineNum = 60293264;BA.debugLine="Dim z As Cursor = Starter.skmt.ExecQuery($\"sele";
_z = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_z = (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 SUM(REP_CANT) AS CANTIDAD , SUM(REP_PRECIO) AS PRECIO from REPARTO where REP_CLIENTE in (select cuenta from cuentaa) and REP_RECHAZO = '0' and REP_CANT > 0 order by REP_PRONOMBRE"))));
RDebugUtils.currentLine=60293265;
 //BA.debugLineNum = 60293265;BA.debugLine="Dim cantidad2 As String = 0";
_cantidad2 = BA.NumberToString(0);
RDebugUtils.currentLine=60293267;
 //BA.debugLineNum = 60293267;BA.debugLine="If z.RowCount > 0 Then";
if (_z.getRowCount()>0) { 
RDebugUtils.currentLine=60293268;
 //BA.debugLineNum = 60293268;BA.debugLine="z.Position = 0";
_z.setPosition((int) (0));
RDebugUtils.currentLine=60293269;
 //BA.debugLineNum = 60293269;BA.debugLine="cantidad2= z.GetString(\"CANTIDAD\")";
_cantidad2 = _z.GetString("CANTIDAD");
RDebugUtils.currentLine=60293272;
 //BA.debugLineNum = 60293272;BA.debugLine="L_CANT.Text = Round((cantidad1 + cantidad2))";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.Round(((double)(Double.parseDouble(_cantidad1))+(double)(Double.parseDouble(_cantidad2))))));
 };
RDebugUtils.currentLine=60293274;
 //BA.debugLineNum = 60293274;BA.debugLine="z.Close";
_z.Close();
 };
 };
RDebugUtils.currentLine=60293282;
 //BA.debugLineNum = 60293282;BA.debugLine="End Sub";
return "";
}
public Object  _initialize(reparto_mazapa.keymon.lat.c_historico __ref,anywheresoftware.b4a.BA _ba) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="c_historico";
if (Debug.shouldDelegate(ba, "initialize", false))
	 {return ((Object) Debug.delegate(ba, "initialize", new Object[] {_ba}));}
RDebugUtils.currentLine=59572224;
 //BA.debugLineNum = 59572224;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=59572225;
 //BA.debugLineNum = 59572225;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=59572226;
 //BA.debugLineNum = 59572226;BA.debugLine="End Sub";
return null;
}
public String  _l_pcant_click(reparto_mazapa.keymon.lat.c_historico __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_historico";
if (Debug.shouldDelegate(ba, "l_pcant_click", false))
	 {return ((String) Debug.delegate(ba, "l_pcant_click", null));}
RDebugUtils.currentLine=60424192;
 //BA.debugLineNum = 60424192;BA.debugLine="Private Sub l_pCant_Click";
RDebugUtils.currentLine=60424194;
 //BA.debugLineNum = 60424194;BA.debugLine="End Sub";
return "";
}
public String  _listview1_itemlongclick(reparto_mazapa.keymon.lat.c_historico __ref,int _position,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_historico";
if (Debug.shouldDelegate(ba, "listview1_itemlongclick", false))
	 {return ((String) Debug.delegate(ba, "listview1_itemlongclick", new Object[] {_position,_value}));}
RDebugUtils.currentLine=59965440;
 //BA.debugLineNum = 59965440;BA.debugLine="Sub ListView1_ItemLongClick (Position As Int, Valu";
RDebugUtils.currentLine=59965484;
 //BA.debugLineNum = 59965484;BA.debugLine="End Sub";
return "";
}
public String  _lv2_itemclick(reparto_mazapa.keymon.lat.c_historico __ref,int _position,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_historico";
if (Debug.shouldDelegate(ba, "lv2_itemclick", false))
	 {return ((String) Debug.delegate(ba, "lv2_itemclick", new Object[] {_position,_value}));}
RDebugUtils.currentLine=60030976;
 //BA.debugLineNum = 60030976;BA.debugLine="Sub lv2_ItemClick (Position As Int, Value As Objec";
RDebugUtils.currentLine=60031037;
 //BA.debugLineNum = 60031037;BA.debugLine="End Sub";
return "";
}
public String  _p_prods_click(reparto_mazapa.keymon.lat.c_historico __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_historico";
if (Debug.shouldDelegate(ba, "p_prods_click", false))
	 {return ((String) Debug.delegate(ba, "p_prods_click", null));}
RDebugUtils.currentLine=60489728;
 //BA.debugLineNum = 60489728;BA.debugLine="Sub p_prods_Click";
RDebugUtils.currentLine=60489729;
 //BA.debugLineNum = 60489729;BA.debugLine="Log(Sender.As(Panel).tag)";
__c.LogImpl("360489729",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=60489730;
 //BA.debugLineNum = 60489730;BA.debugLine="End Sub";
return "";
}
}