package gunav2.keymon.com.mx;


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

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

 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.objects.LabelWrapper _l_promodesc = null;
public anywheresoftware.b4a.objects.ListViewWrapper _lv_prodsfijos = null;
public b4a.example3.customlistview _clv_prodsvariabes = null;
public b4a.example3.customlistview _clv_prodsvariabes2 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_prodsfijos = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_prodsvariables = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_prodsvariables2 = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _i_prod = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_prodx = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_prods = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_prodmenos = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_prodmenos2 = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_pcant = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_prodmas = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_prodmas2 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_pcant = null;
public int _totalprods = 0;
public int _prodsvar1 = 0;
public int _prodsvar2 = 0;
public int _prodsvarreq = 0;
public int _prodsvarreq_ = 0;
public int _prodsvarreq2 = 0;
public int _prodsvarreq2_ = 0;
public float _totalcompra = 0f;
public float _prodsfijostot = 0f;
public int _tpf = 0;
public int _tpf2 = 0;
public int _maxcantpromos = 0;
public anywheresoftware.b4a.objects.LabelWrapper _l_totprods = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_total = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_terminar1 = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_promociones = null;
public anywheresoftware.b4a.objects.collections.List _prodsids = null;
public anywheresoftware.b4a.objects.collections.List _prodscants = null;
public anywheresoftware.b4a.objects.collections.List _prodsprecios = null;
public anywheresoftware.b4a.objects.collections.List _prodsids2 = null;
public anywheresoftware.b4a.objects.collections.List _prodscants2 = null;
public anywheresoftware.b4a.objects.collections.List _prodsprecios2 = null;
public String _estapromo = "";
public String _estecliente = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_promomas = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_promomenos = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_promocant = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_promoscant = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_continuar = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_prodsvariables = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_prodsvariables2 = null;
public String _lapromo = "";
public String _elcliente = "";
public String _prodspedidoactual = "";
public String _montopedidoactual = "";
public anywheresoftware.b4a.objects.collections.Map _promosmap = null;
public anywheresoftware.b4a.objects.StringUtils _su = null;
public b4a.example.dateutils _dateutils = null;
public gunav2.keymon.com.mx.main _main = null;
public gunav2.keymon.com.mx.starter _starter = null;
public gunav2.keymon.com.mx.subs _subs = null;
public gunav2.keymon.com.mx.mapa_rutas _mapa_rutas = null;
public gunav2.keymon.com.mx.appupdater _appupdater = null;
public gunav2.keymon.com.mx.firebasemessaging _firebasemessaging = null;
public gunav2.keymon.com.mx.tracker _tracker = null;
public gunav2.keymon.com.mx.newinst2 _newinst2 = null;
public gunav2.keymon.com.mx.b4xpages _b4xpages = null;
public gunav2.keymon.com.mx.b4xcollections _b4xcollections = null;
public gunav2.keymon.com.mx.httputils2service _httputils2service = null;
public gunav2.keymon.com.mx.xuiviewsutils _xuiviewsutils = null;
public String  _agregafijosalista(anywheresoftware.b4a.objects.collections.Map _mp,boolean _addlistitem) throws Exception{
boolean _thislog = false;
int _cont = 0;
anywheresoftware.b4a.objects.collections.List _pf = null;
String _p = "";
String _tpi = "";
String _tpr = "";
int _ntpi = 0;
 //BA.debugLineNum = 638;BA.debugLine="Sub agregaFijosALista(mp As Map, addListItem As Bo";
 //BA.debugLineNum = 639;BA.debugLine="Private thisLog As Boolean = False";
_thislog = __c.False;
 //BA.debugLineNum = 640;BA.debugLine="Private cont As Int = 0";
_cont = (int) (0);
 //BA.debugLineNum = 641;BA.debugLine="prodsFijosTot = 0";
_prodsfijostot = (float) (0);
 //BA.debugLineNum = 642;BA.debugLine="Dim pf As List = mp.Get(\"prodsFijos\")";
_pf = new anywheresoftware.b4a.objects.collections.List();
_pf = (anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(_mp.Get((Object)("prodsFijos"))));
 //BA.debugLineNum = 643;BA.debugLine="If pf.Size < 1 Then pf.Add(\"Sin productos fijos.\"";
if (_pf.getSize()<1) { 
_pf.Add((Object)("Sin productos fijos."));};
 //BA.debugLineNum = 647;BA.debugLine="prodsIds.clear";
_prodsids.Clear();
 //BA.debugLineNum = 648;BA.debugLine="prodsCants.clear";
_prodscants.Clear();
 //BA.debugLineNum = 649;BA.debugLine="prodsPrecios.clear";
_prodsprecios.Clear();
 //BA.debugLineNum = 650;BA.debugLine="prodsIds.Add(estaPromo)";
_prodsids.Add((Object)(_estapromo));
 //BA.debugLineNum = 651;BA.debugLine="prodsCants.Add(et_promoCant.text.As(Int))";
_prodscants.Add((Object)(((int)(Double.parseDouble(_et_promocant.getText())))));
 //BA.debugLineNum = 652;BA.debugLine="prodsPrecios.Add(0)";
_prodsprecios.Add((Object)(0));
 //BA.debugLineNum = 653;BA.debugLine="For Each p As String In pf";
{
final anywheresoftware.b4a.BA.IterableList group12 = _pf;
final int groupLen12 = group12.getSize()
;int index12 = 0;
;
for (; index12 < groupLen12;index12++){
_p = BA.ObjectToString(group12.Get(index12));
 //BA.debugLineNum = 655;BA.debugLine="If mp.Get(\"prodsFijosPiezas\").As(List).Size > 0";
if (((anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(_mp.Get((Object)("prodsFijosPiezas"))))).getSize()>0) { 
 //BA.debugLineNum = 656;BA.debugLine="Private tpi As String = mp.Get(\"prodsFijosPieza";
_tpi = BA.ObjectToString(((anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(_mp.Get((Object)("prodsFijosPiezas"))))).Get(_cont));
 }else {
 //BA.debugLineNum = 658;BA.debugLine="Private tpi As String = 0";
_tpi = BA.NumberToString(0);
 };
 //BA.debugLineNum = 660;BA.debugLine="If mp.Get(\"prodsFijosPrecios\").As(List).Size > 0";
if (((anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(_mp.Get((Object)("prodsFijosPrecios"))))).getSize()>0) { 
 //BA.debugLineNum = 661;BA.debugLine="Private tpr As String = mp.Get(\"prodsFijosPreci";
_tpr = BA.ObjectToString(((anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(_mp.Get((Object)("prodsFijosPrecios"))))).Get(_cont));
 }else {
 //BA.debugLineNum = 663;BA.debugLine="Private tpr As String = 0";
_tpr = BA.NumberToString(0);
 };
 //BA.debugLineNum = 665;BA.debugLine="prodsFijosTot = prodsFijosTot + (tpi * tpr)";
_prodsfijostot = (float) (_prodsfijostot+((double)(Double.parseDouble(_tpi))*(double)(Double.parseDouble(_tpr))));
 //BA.debugLineNum = 666;BA.debugLine="If thisLog Then Log(\"|\"&tpi&\"|\"&p)";
if (_thislog) { 
__c.LogImpl("442926108","|"+_tpi+"|"+_p,0);};
 //BA.debugLineNum = 667;BA.debugLine="Private ntpi As Int = tpi * et_promoCant.text";
_ntpi = (int) ((double)(Double.parseDouble(_tpi))*(double)(Double.parseDouble(_et_promocant.getText())));
 //BA.debugLineNum = 668;BA.debugLine="If addListItem And tpi > 0 Then lv_prodsFijos.Ad";
if (_addlistitem && (double)(Double.parseDouble(_tpi))>0) { 
_lv_prodsfijos.AddSingleLine(BA.ObjectToCharSequence(BA.NumberToString(_ntpi)+" "+_subs._traeprodnombre /*String*/ (ba,_p)+" - $"+_tpr));};
 //BA.debugLineNum = 669;BA.debugLine="cont = cont+1";
_cont = (int) (_cont+1);
 //BA.debugLineNum = 672;BA.debugLine="prodsIds.Add(p)";
_prodsids.Add((Object)(_p));
 //BA.debugLineNum = 673;BA.debugLine="prodsCants.Add(tpi.As(Int)*et_promoCant.text.As(";
_prodscants.Add((Object)(((int)(Double.parseDouble(_tpi)))*((int)(Double.parseDouble(_et_promocant.getText())))));
 //BA.debugLineNum = 674;BA.debugLine="prodsPrecios.Add(tpr) '*et_promoCant.text.As(Int";
_prodsprecios.Add((Object)(_tpr));
 }
};
 //BA.debugLineNum = 676;BA.debugLine="End Sub";
return "";
}
public String  _b_continuar_click() throws Exception{
int _t = 0;
String _pn = "";
gunav2.keymon.com.mx.c_productos _prodspage = null;
 //BA.debugLineNum = 1011;BA.debugLine="Private Sub b_continuar_Click";
 //BA.debugLineNum = 1012;BA.debugLine="cuentaProds";
_cuentaprods();
 //BA.debugLineNum = 1013;BA.debugLine="Log(\"============================================";
__c.LogImpl("443778050","====================================================================",0);
 //BA.debugLineNum = 1014;BA.debugLine="For t = 0 To prodsIds.Size - 1 'Guardamos los pro";
{
final int step3 = 1;
final int limit3 = (int) (_prodsids.getSize()-1);
_t = (int) (0) ;
for (;_t <= limit3 ;_t = _t + step3 ) {
 //BA.debugLineNum = 1015;BA.debugLine="Private pn As String = Subs.traeProdNombre(prods";
_pn = _subs._traeprodnombre /*String*/ (ba,BA.ObjectToString(_prodsids.Get(_t)));
 //BA.debugLineNum = 1016;BA.debugLine="If B4XPages.MainPage.tipo_venta = \"PREVENTA_FUTU";
if ((_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ).equals("PREVENTA_FUTURA")) { 
 //BA.debugLineNum = 1017;BA.debugLine="Subs.guardaProductoSinGestion(estaPromo, prodsP";
_subs._guardaproductosingestion /*String*/ (ba,_estapromo,BA.ObjectToString(_prodsprecios.Get(_t)),BA.ObjectToString(_prodscants.Get(_t)),_pn,BA.ObjectToString(_prodsids.Get(_t)),_subs._traecliente /*String*/ (ba),_subs._traefecha /*String*/ (ba),_subs._traeusuariodebd /*String*/ (ba),_subs._traeruta /*String*/ (ba),BA.NumberToString(0),_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,BA.NumberToString(1),BA.NumberToString(1));
 }else {
 //BA.debugLineNum = 1019;BA.debugLine="Subs.guardaProductoSinGestion(estaPromo, prodsP";
_subs._guardaproductosingestion /*String*/ (ba,_estapromo,BA.ObjectToString(_prodsprecios.Get(_t)),BA.ObjectToString(_prodscants.Get(_t)),_pn,BA.ObjectToString(_prodsids.Get(_t)),_subs._traecliente /*String*/ (ba),_subs._traefecha /*String*/ (ba),_subs._traeusuariodebd /*String*/ (ba),_subs._traeruta /*String*/ (ba),BA.NumberToString(0),_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,BA.NumberToString(0),BA.NumberToString(1));
 };
 }
};
 //BA.debugLineNum = 1022;BA.debugLine="For t = 0 To prodsIds2.Size - 1 'Guardamos los pr";
{
final int step11 = 1;
final int limit11 = (int) (_prodsids2.getSize()-1);
_t = (int) (0) ;
for (;_t <= limit11 ;_t = _t + step11 ) {
 //BA.debugLineNum = 1023;BA.debugLine="Private pn As String = Subs.traeProdNombre(prods";
_pn = _subs._traeprodnombre /*String*/ (ba,BA.ObjectToString(_prodsids2.Get(_t)));
 //BA.debugLineNum = 1024;BA.debugLine="If B4XPages.MainPage.tipo_venta = \"PREVENTA_FUTU";
if ((_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ).equals("PREVENTA_FUTURA")) { 
 //BA.debugLineNum = 1025;BA.debugLine="Subs.guardaProductoSinGestion(estaPromo, prodsP";
_subs._guardaproductosingestion /*String*/ (ba,_estapromo,BA.ObjectToString(_prodsprecios2.Get(_t)),BA.ObjectToString(_prodscants2.Get(_t)),_pn,BA.ObjectToString(_prodsids2.Get(_t)),_subs._traecliente /*String*/ (ba),_subs._traefecha /*String*/ (ba),_subs._traeusuariodebd /*String*/ (ba),_subs._traeruta /*String*/ (ba),BA.NumberToString(0),_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,BA.NumberToString(1),BA.NumberToString(1));
 }else {
 //BA.debugLineNum = 1027;BA.debugLine="Subs.guardaProductoSinGestion(estaPromo, prodsP";
_subs._guardaproductosingestion /*String*/ (ba,_estapromo,BA.ObjectToString(_prodsprecios2.Get(_t)),BA.ObjectToString(_prodscants2.Get(_t)),_pn,BA.ObjectToString(_prodsids2.Get(_t)),_subs._traecliente /*String*/ (ba),_subs._traefecha /*String*/ (ba),_subs._traeusuariodebd /*String*/ (ba),_subs._traeruta /*String*/ (ba),BA.NumberToString(0),_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,BA.NumberToString(0),BA.NumberToString(1));
 };
 }
};
 //BA.debugLineNum = 1042;BA.debugLine="lv_prodsFijos.Clear";
_lv_prodsfijos.Clear();
 //BA.debugLineNum = 1045;BA.debugLine="Private prodspage As C_Productos";
_prodspage = new gunav2.keymon.com.mx.c_productos();
 //BA.debugLineNum = 1046;BA.debugLine="If prodspage.IsInitialized Then";
if (_prodspage.IsInitialized /*boolean*/ ()) { 
 //BA.debugLineNum = 1047;BA.debugLine="prodspage.lv_catalogos.Visible = True";
_prodspage._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.True);
 //BA.debugLineNum = 1048;BA.debugLine="prodspage.lv_promos.Visible = False";
_prodspage._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.False);
 //BA.debugLineNum = 1049;BA.debugLine="prodspage.clv_productos.AsView.Visible = False";
_prodspage._clv_productos /*b4a.example3.customlistview*/ ._asview().setVisible(__c.False);
 };
 //BA.debugLineNum = 1051;BA.debugLine="B4XPages.MainPage.bTerminarClicked = True";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._bterminarclicked /*boolean*/  = __c.True;
 //BA.debugLineNum = 1052;BA.debugLine="B4XPages.ShowPage(\"productos\")";
_b4xpages._showpage /*String*/ (ba,"productos");
 //BA.debugLineNum = 1053;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmas_click() throws Exception{
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 _precio = "";
String _prodid = "";
anywheresoftware.b4a.objects.collections.Map _tmpmap = null;
 //BA.debugLineNum = 743;BA.debugLine="Sub b_prodMas_Click";
 //BA.debugLineNum = 744;BA.debugLine="If prodsVar1 < prodsVarReq Then";
if (_prodsvar1<_prodsvarreq) { 
 //BA.debugLineNum = 745;BA.debugLine="Dim index As Int = clv_prodsVariabes.GetItemFrom";
_index = _clv_prodsvariabes._getitemfromview((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__c.Sender(ba))));
 //BA.debugLineNum = 746;BA.debugLine="Dim pnl0 As B4XView = clv_prodsVariabes.GetPanel";
_pnl0 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl0 = _clv_prodsvariabes._getpanel(_index);
 //BA.debugLineNum = 747;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
 //BA.debugLineNum = 749;BA.debugLine="Dim laCant As B4XView = pnl.GetView(2).GetView(4";
_lacant = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacant = _pnl.GetView((int) (2)).GetView((int) (4));
 //BA.debugLineNum = 752;BA.debugLine="Dim esteTag As List = Regex.Split(\"\\|\", laCant.T";
_estetag = new anywheresoftware.b4a.objects.collections.List();
_estetag = anywheresoftware.b4a.keywords.Common.ArrayToList(__c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag())));
 //BA.debugLineNum = 755;BA.debugLine="If laCant.Text + 1 <= esteTag.get(1) Then";
if ((double)(Double.parseDouble(_lacant.getText()))+1<=(double)(BA.ObjectToNumber(_estetag.Get((int) (1))))) { 
 //BA.debugLineNum = 756;BA.debugLine="laCant.Text = $\"$1.0{laCant.Text+1}\"$";
_lacant.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.0",(Object)((double)(Double.parseDouble(_lacant.getText()))+1))+"")));
 //BA.debugLineNum = 757;BA.debugLine="cuentaProds";
_cuentaprods();
 };
 //BA.debugLineNum = 761;BA.debugLine="Private precio As String = Regex.Split(\"\\|\", laC";
_precio = __c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag()))[(int) (0)];
 //BA.debugLineNum = 763;BA.debugLine="Private prodId As String = Regex.Split(\"\\|\", laC";
_prodid = __c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag()))[(int) (2)];
 //BA.debugLineNum = 764;BA.debugLine="Private tmpMap As Map = CreateMap(\"precio\":preci";
_tmpmap = new anywheresoftware.b4a.objects.collections.Map();
_tmpmap = __c.createMap(new Object[] {(Object)("precio"),(Object)(_precio),(Object)("cant"),(Object)(_lacant.getText()),(Object)("almacen"),(Object)(_estapromo)});
 //BA.debugLineNum = 766;BA.debugLine="promosMap.Put(prodId, tmpMap)";
_promosmap.Put((Object)(_prodid),(Object)(_tmpmap.getObject()));
 };
 //BA.debugLineNum = 772;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmas2_click() throws Exception{
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 _precio = "";
String _prodid = "";
anywheresoftware.b4a.objects.collections.Map _tmpmap = null;
 //BA.debugLineNum = 799;BA.debugLine="Sub b_prodMas2_Click";
 //BA.debugLineNum = 801;BA.debugLine="If prodsVar2 < prodsVarReq2 Then";
if (_prodsvar2<_prodsvarreq2) { 
 //BA.debugLineNum = 802;BA.debugLine="Dim index As Int = clv_prodsVariabes2.GetItemFro";
_index = _clv_prodsvariabes2._getitemfromview((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__c.Sender(ba))));
 //BA.debugLineNum = 803;BA.debugLine="Dim pnl0 As B4XView = clv_prodsVariabes2.GetPane";
_pnl0 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl0 = _clv_prodsvariabes2._getpanel(_index);
 //BA.debugLineNum = 804;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
 //BA.debugLineNum = 806;BA.debugLine="Dim laCant As B4XView = pnl.GetView(2).GetView(4";
_lacant = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacant = _pnl.GetView((int) (2)).GetView((int) (4));
 //BA.debugLineNum = 809;BA.debugLine="Dim esteTag As List = Regex.Split(\"\\|\", laCant.T";
_estetag = new anywheresoftware.b4a.objects.collections.List();
_estetag = anywheresoftware.b4a.keywords.Common.ArrayToList(__c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag())));
 //BA.debugLineNum = 811;BA.debugLine="If laCant.Text + 1 <= esteTag.get(1) Then";
if ((double)(Double.parseDouble(_lacant.getText()))+1<=(double)(BA.ObjectToNumber(_estetag.Get((int) (1))))) { 
 //BA.debugLineNum = 812;BA.debugLine="laCant.Text = $\"$1.0{laCant.Text+1}\"$";
_lacant.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.0",(Object)((double)(Double.parseDouble(_lacant.getText()))+1))+"")));
 //BA.debugLineNum = 813;BA.debugLine="cuentaProds";
_cuentaprods();
 };
 //BA.debugLineNum = 817;BA.debugLine="Private precio As String = Regex.Split(\"\\|\", laC";
_precio = __c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag()))[(int) (0)];
 //BA.debugLineNum = 819;BA.debugLine="Private prodId As String = Regex.Split(\"\\|\", laC";
_prodid = __c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag()))[(int) (2)];
 //BA.debugLineNum = 820;BA.debugLine="Private tmpMap As Map = CreateMap(\"precio\":preci";
_tmpmap = new anywheresoftware.b4a.objects.collections.Map();
_tmpmap = __c.createMap(new Object[] {(Object)("precio"),(Object)(_precio),(Object)("cant"),(Object)(_lacant.getText()),(Object)("almacen"),(Object)(_estapromo)});
 //BA.debugLineNum = 822;BA.debugLine="promosMap.Put(prodId, tmpMap)";
_promosmap.Put((Object)(_prodid),(Object)(_tmpmap.getObject()));
 };
 //BA.debugLineNum = 828;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmenos_click() throws Exception{
int _index = 0;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl0 = null;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lacant = null;
String _precio = "";
String _prodid = "";
anywheresoftware.b4a.objects.collections.Map _tmpmap = null;
 //BA.debugLineNum = 719;BA.debugLine="Sub b_prodMenos_Click";
 //BA.debugLineNum = 720;BA.debugLine="Dim index As Int = clv_prodsVariabes.GetItemFromV";
_index = _clv_prodsvariabes._getitemfromview((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__c.Sender(ba))));
 //BA.debugLineNum = 721;BA.debugLine="Dim pnl0 As B4XView = clv_prodsVariabes.GetPanel(";
_pnl0 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl0 = _clv_prodsvariabes._getpanel(_index);
 //BA.debugLineNum = 722;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
 //BA.debugLineNum = 724;BA.debugLine="Dim laCant As B4XView = pnl.GetView(2).GetView(4)";
_lacant = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacant = _pnl.GetView((int) (2)).GetView((int) (4));
 //BA.debugLineNum = 726;BA.debugLine="laCant.Text = $\"$1.0{laCant.Text-1}\"$";
_lacant.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.0",(Object)((double)(Double.parseDouble(_lacant.getText()))-1))+"")));
 //BA.debugLineNum = 727;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0";
if ((double)(Double.parseDouble(_lacant.getText()))<0) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
 //BA.debugLineNum = 730;BA.debugLine="Private precio As String = Regex.Split(\"\\|\", laCa";
_precio = __c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag()))[(int) (0)];
 //BA.debugLineNum = 732;BA.debugLine="Private prodId As String = Regex.Split(\"\\|\", laCa";
_prodid = __c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag()))[(int) (2)];
 //BA.debugLineNum = 733;BA.debugLine="Private tmpMap As Map = CreateMap(\"precio\":precio";
_tmpmap = new anywheresoftware.b4a.objects.collections.Map();
_tmpmap = __c.createMap(new Object[] {(Object)("precio"),(Object)(_precio),(Object)("cant"),(Object)(_lacant.getText()),(Object)("almacen"),(Object)(_estapromo)});
 //BA.debugLineNum = 735;BA.debugLine="promosMap.Put(prodId, tmpMap)";
_promosmap.Put((Object)(_prodid),(Object)(_tmpmap.getObject()));
 //BA.debugLineNum = 736;BA.debugLine="If laCant.Text = 0 Then promosMap.Remove(prodId)";
if ((_lacant.getText()).equals(BA.NumberToString(0))) { 
_promosmap.Remove((Object)(_prodid));};
 //BA.debugLineNum = 738;BA.debugLine="cuentaProds";
_cuentaprods();
 //BA.debugLineNum = 741;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmenos2_click() throws Exception{
int _index = 0;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl0 = null;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lacant = null;
String _precio = "";
String _prodid = "";
anywheresoftware.b4a.objects.collections.Map _tmpmap = null;
 //BA.debugLineNum = 775;BA.debugLine="Sub b_prodMenos2_Click";
 //BA.debugLineNum = 776;BA.debugLine="Dim index As Int = clv_prodsVariabes2.GetItemFrom";
_index = _clv_prodsvariabes2._getitemfromview((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__c.Sender(ba))));
 //BA.debugLineNum = 777;BA.debugLine="Dim pnl0 As B4XView = clv_prodsVariabes2.GetPanel";
_pnl0 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl0 = _clv_prodsvariabes2._getpanel(_index);
 //BA.debugLineNum = 778;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
 //BA.debugLineNum = 780;BA.debugLine="Dim laCant As B4XView = pnl.GetView(2).GetView(4)";
_lacant = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacant = _pnl.GetView((int) (2)).GetView((int) (4));
 //BA.debugLineNum = 782;BA.debugLine="laCant.Text = $\"$1.0{laCant.Text-1}\"$";
_lacant.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.0",(Object)((double)(Double.parseDouble(_lacant.getText()))-1))+"")));
 //BA.debugLineNum = 783;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0";
if ((double)(Double.parseDouble(_lacant.getText()))<0) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
 //BA.debugLineNum = 786;BA.debugLine="Private precio As String = Regex.Split(\"\\|\", laCa";
_precio = __c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag()))[(int) (0)];
 //BA.debugLineNum = 788;BA.debugLine="Private prodId As String = Regex.Split(\"\\|\", laCa";
_prodid = __c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag()))[(int) (2)];
 //BA.debugLineNum = 789;BA.debugLine="Private tmpMap As Map = CreateMap(\"precio\":precio";
_tmpmap = new anywheresoftware.b4a.objects.collections.Map();
_tmpmap = __c.createMap(new Object[] {(Object)("precio"),(Object)(_precio),(Object)("cant"),(Object)(_lacant.getText()),(Object)("almacen"),(Object)(_estapromo)});
 //BA.debugLineNum = 791;BA.debugLine="promosMap.Put(prodId, tmpMap)";
_promosmap.Put((Object)(_prodid),(Object)(_tmpmap.getObject()));
 //BA.debugLineNum = 792;BA.debugLine="If laCant.Text = 0 Then promosMap.Remove(prodId)";
if ((_lacant.getText()).equals(BA.NumberToString(0))) { 
_promosmap.Remove((Object)(_prodid));};
 //BA.debugLineNum = 794;BA.debugLine="cuentaProds";
_cuentaprods();
 //BA.debugLineNum = 797;BA.debugLine="End Sub";
return "";
}
public String  _b_promomas_click() throws Exception{
anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c2 = null;
 //BA.debugLineNum = 935;BA.debugLine="Private Sub b_promoMas_Click";
 //BA.debugLineNum = 937;BA.debugLine="If laPromo = \"MYKONOS_01\" Then";
if ((_lapromo).equals("MYKONOS_01")) { 
 //BA.debugLineNum = 938;BA.debugLine="Private c As Cursor = B4XPages.MainPage.skmt.Exe";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT ifnull( SUM (PE_COSTO_TOT),0) As suma FROM PEDIDO JOIN CAT_PROMO_ESP ON CAT_PE_ID = PE_PROID WHERE PE_CLIENTE IN (Select CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 939;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 940;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 941;BA.debugLine="Private c2 As Cursor = B4XPages.MainPage.skmt.E";
_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)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT DISTINCT CAT_PE_MONTO FROM CAT_PROMO_ESP")));
 //BA.debugLineNum = 942;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
 //BA.debugLineNum = 943;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
 //BA.debugLineNum = 945;BA.debugLine="If c.GetString(\"suma\") >= 300 And c.GetString(";
if ((double)(Double.parseDouble(_c.GetString("suma")))>=300 && (double)(Double.parseDouble(_c.GetString("suma")))<600) { 
 //BA.debugLineNum = 946;BA.debugLine="maxCantPromos = 1";
_maxcantpromos = (int) (1);
 }else if((double)(Double.parseDouble(_c.GetString("suma")))>=600 && (double)(Double.parseDouble(_c.GetString("suma")))<900) { 
 //BA.debugLineNum = 948;BA.debugLine="maxCantPromos = 2";
_maxcantpromos = (int) (2);
 }else if((double)(Double.parseDouble(_c.GetString("suma")))>=900) { 
 //BA.debugLineNum = 950;BA.debugLine="maxCantPromos = 3";
_maxcantpromos = (int) (3);
 };
 };
 };
 };
 //BA.debugLineNum = 958;BA.debugLine="If et_promoCant.Text < maxCantPromos Then";
if ((double)(Double.parseDouble(_et_promocant.getText()))<_maxcantpromos) { 
 //BA.debugLineNum = 959;BA.debugLine="et_promoCant.Text = et_promoCant.Text.As(Int) +";
_et_promocant.setText(BA.ObjectToCharSequence(((int)(Double.parseDouble(_et_promocant.getText())))+1));
 //BA.debugLineNum = 960;BA.debugLine="l_prodsFijos.Text = $\"Productos fijos (${tpf2 *";
_l_prodsfijos.setText(BA.ObjectToCharSequence(("Productos fijos ("+__c.SmartStringFormatter("",(Object)(_tpf2*((int)(Double.parseDouble(_et_promocant.getText())))))+")")));
 //BA.debugLineNum = 961;BA.debugLine="l_prodsVariables.Text = $\"Productos variables re";
_l_prodsvariables.setText(BA.ObjectToCharSequence(("Productos variables requeridos: "+__c.SmartStringFormatter("",(Object)(_prodsvarreq_*((int)(Double.parseDouble(_et_promocant.getText())))))+"")));
 //BA.debugLineNum = 962;BA.debugLine="l_prodsVariables2.Text = $\"Productos variables2";
_l_prodsvariables2.setText(BA.ObjectToCharSequence(("Productos variables2 requeridos: "+__c.SmartStringFormatter("",(Object)(_prodsvarreq2_*((int)(Double.parseDouble(_et_promocant.getText())))))+"")));
 //BA.debugLineNum = 963;BA.debugLine="tpf = tpf2 * et_promoCant.Text.As(Int)";
_tpf = (int) (_tpf2*((int)(Double.parseDouble(_et_promocant.getText()))));
 //BA.debugLineNum = 964;BA.debugLine="prodsVarReq = prodsVarReq_ * et_promoCant.Text.A";
_prodsvarreq = (int) (_prodsvarreq_*((int)(Double.parseDouble(_et_promocant.getText()))));
 //BA.debugLineNum = 965;BA.debugLine="prodsVarReq2 = prodsVarReq2_ * et_promoCant.Text";
_prodsvarreq2 = (int) (_prodsvarreq2_*((int)(Double.parseDouble(_et_promocant.getText()))));
 //BA.debugLineNum = 966;BA.debugLine="Log($\"Max promos=${et_promoCant.Text.As(Int)}, P";
__c.LogImpl("443647007",("Max promos="+__c.SmartStringFormatter("",(Object)(((int)(Double.parseDouble(_et_promocant.getText())))))+", Prods fijos="+__c.SmartStringFormatter("",(Object)(_tpf))+",  "),0);
 };
 //BA.debugLineNum = 968;BA.debugLine="If et_promoCant.text > maxCantPromos Then et_prom";
if ((double)(Double.parseDouble(_et_promocant.getText()))>_maxcantpromos) { 
_et_promocant.setText(BA.ObjectToCharSequence(_maxcantpromos));};
 //BA.debugLineNum = 969;BA.debugLine="cuentaProds";
_cuentaprods();
 //BA.debugLineNum = 970;BA.debugLine="End Sub";
return "";
}
public String  _b_promomenos_click() throws Exception{
 //BA.debugLineNum = 921;BA.debugLine="Private Sub b_promoMenos_Click";
 //BA.debugLineNum = 922;BA.debugLine="If et_promoCant.Text > 1 Then";
if ((double)(Double.parseDouble(_et_promocant.getText()))>1) { 
 //BA.debugLineNum = 923;BA.debugLine="et_promoCant.Text = et_promoCant.Text.As(Int) -";
_et_promocant.setText(BA.ObjectToCharSequence(((int)(Double.parseDouble(_et_promocant.getText())))-1));
 };
 //BA.debugLineNum = 925;BA.debugLine="l_prodsFijos.Text = $\"Productos fijos (${tpf2 * e";
_l_prodsfijos.setText(BA.ObjectToCharSequence(("Productos fijos ("+__c.SmartStringFormatter("",(Object)(_tpf2*((int)(Double.parseDouble(_et_promocant.getText())))))+")")));
 //BA.debugLineNum = 926;BA.debugLine="l_prodsVariables.Text = $\"Productos variables req";
_l_prodsvariables.setText(BA.ObjectToCharSequence(("Productos variables requeridos: "+__c.SmartStringFormatter("",(Object)(_prodsvarreq_*((int)(Double.parseDouble(_et_promocant.getText())))))+"")));
 //BA.debugLineNum = 927;BA.debugLine="l_prodsVariables2.Text = $\"Productos variables2 r";
_l_prodsvariables2.setText(BA.ObjectToCharSequence(("Productos variables2 requeridos: "+__c.SmartStringFormatter("",(Object)(_prodsvarreq2_*((int)(Double.parseDouble(_et_promocant.getText())))))+"")));
 //BA.debugLineNum = 928;BA.debugLine="tpf = tpf2 * et_promoCant.Text.As(Int)";
_tpf = (int) (_tpf2*((int)(Double.parseDouble(_et_promocant.getText()))));
 //BA.debugLineNum = 929;BA.debugLine="prodsVarReq = prodsVarReq_ * et_promoCant.Text.As";
_prodsvarreq = (int) (_prodsvarreq_*((int)(Double.parseDouble(_et_promocant.getText()))));
 //BA.debugLineNum = 930;BA.debugLine="prodsVarReq2 = prodsVarReq2_ * et_promoCant.Text.";
_prodsvarreq2 = (int) (_prodsvarreq2_*((int)(Double.parseDouble(_et_promocant.getText()))));
 //BA.debugLineNum = 931;BA.debugLine="Log($\"Max promos=${et_promoCant.Text.As(Int)}, Pr";
__c.LogImpl("443581450",("Max promos="+__c.SmartStringFormatter("",(Object)(((int)(Double.parseDouble(_et_promocant.getText())))))+", Prods fijos="+__c.SmartStringFormatter("",(Object)(_tpf))+",  "),0);
 //BA.debugLineNum = 932;BA.debugLine="cuentaProds";
_cuentaprods();
 //BA.debugLineNum = 933;BA.debugLine="End Sub";
return "";
}
public String  _b_terminar1_click() throws Exception{
int _t = 0;
String _pn = "";
 //BA.debugLineNum = 972;BA.debugLine="Private Sub b_terminar1_Click";
 //BA.debugLineNum = 973;BA.debugLine="cuentaProds";
_cuentaprods();
 //BA.debugLineNum = 974;BA.debugLine="Log(\"============================================";
__c.LogImpl("443712514","====================================================================",0);
 //BA.debugLineNum = 975;BA.debugLine="For t = 0 To prodsIds.Size - 1 'Guardamos los pro";
{
final int step3 = 1;
final int limit3 = (int) (_prodsids.getSize()-1);
_t = (int) (0) ;
for (;_t <= limit3 ;_t = _t + step3 ) {
 //BA.debugLineNum = 976;BA.debugLine="Private pn As String = Subs.traeProdNombre(prods";
_pn = _subs._traeprodnombre /*String*/ (ba,BA.ObjectToString(_prodsids.Get(_t)));
 //BA.debugLineNum = 977;BA.debugLine="If prodsCants.Get(t) > 0 Then";
if ((double)(BA.ObjectToNumber(_prodscants.Get(_t)))>0) { 
 //BA.debugLineNum = 978;BA.debugLine="If B4XPages.MainPage.tipo_venta = \"PREVENTA_FUT";
if ((_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ).equals("PREVENTA_FUTURA")) { 
 //BA.debugLineNum = 979;BA.debugLine="Subs.guardaProductoSinGestion(estaPromo, prods";
_subs._guardaproductosingestion /*String*/ (ba,_estapromo,BA.ObjectToString(_prodsprecios.Get(_t)),BA.ObjectToString(_prodscants.Get(_t)),_pn,BA.ObjectToString(_prodsids.Get(_t)),_subs._traecliente /*String*/ (ba),_subs._traefecha /*String*/ (ba),_subs._traeusuariodebd /*String*/ (ba),_subs._traeruta /*String*/ (ba),BA.NumberToString(0),_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,BA.NumberToString(1),BA.NumberToString(1));
 }else {
 //BA.debugLineNum = 981;BA.debugLine="Subs.guardaProductoSinGestion(estaPromo, prods";
_subs._guardaproductosingestion /*String*/ (ba,_estapromo,BA.ObjectToString(_prodsprecios.Get(_t)),BA.ObjectToString(_prodscants.Get(_t)),_pn,BA.ObjectToString(_prodsids.Get(_t)),_subs._traecliente /*String*/ (ba),_subs._traefecha /*String*/ (ba),_subs._traeusuariodebd /*String*/ (ba),_subs._traeruta /*String*/ (ba),BA.NumberToString(0),_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,BA.NumberToString(0),BA.NumberToString(1));
 };
 };
 }
};
 //BA.debugLineNum = 985;BA.debugLine="For t = 0 To prodsIds2.Size - 1 'Guardamos los pr";
{
final int step13 = 1;
final int limit13 = (int) (_prodsids2.getSize()-1);
_t = (int) (0) ;
for (;_t <= limit13 ;_t = _t + step13 ) {
 //BA.debugLineNum = 986;BA.debugLine="Private pn As String = Subs.traeProdNombre(prods";
_pn = _subs._traeprodnombre /*String*/ (ba,BA.ObjectToString(_prodsids2.Get(_t)));
 //BA.debugLineNum = 987;BA.debugLine="If B4XPages.MainPage.tipo_venta = \"PREVENTA_FUTU";
if ((_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ).equals("PREVENTA_FUTURA")) { 
 //BA.debugLineNum = 988;BA.debugLine="Subs.guardaProductoSinGestion(estaPromo, prodsP";
_subs._guardaproductosingestion /*String*/ (ba,_estapromo,BA.ObjectToString(_prodsprecios2.Get(_t)),BA.ObjectToString(_prodscants2.Get(_t)),_pn,BA.ObjectToString(_prodsids2.Get(_t)),_subs._traecliente /*String*/ (ba),_subs._traefecha /*String*/ (ba),_subs._traeusuariodebd /*String*/ (ba),_subs._traeruta /*String*/ (ba),BA.NumberToString(0),_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,BA.NumberToString(1),BA.NumberToString(1));
 }else {
 //BA.debugLineNum = 990;BA.debugLine="Subs.guardaProductoSinGestion(estaPromo, prodsP";
_subs._guardaproductosingestion /*String*/ (ba,_estapromo,BA.ObjectToString(_prodsprecios2.Get(_t)),BA.ObjectToString(_prodscants2.Get(_t)),_pn,BA.ObjectToString(_prodsids2.Get(_t)),_subs._traecliente /*String*/ (ba),_subs._traefecha /*String*/ (ba),_subs._traeusuariodebd /*String*/ (ba),_subs._traeruta /*String*/ (ba),BA.NumberToString(0),_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,BA.NumberToString(0),BA.NumberToString(1));
 };
 }
};
 //BA.debugLineNum = 1005;BA.debugLine="lv_prodsFijos.Clear";
_lv_prodsfijos.Clear();
 //BA.debugLineNum = 1006;BA.debugLine="B4XPages.MainPage.bTerminarClicked = True";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._bterminarclicked /*boolean*/  = __c.True;
 //BA.debugLineNum = 1007;BA.debugLine="B4XPages.ShowPage(\"productos\")";
_b4xpages._showpage /*String*/ (ba,"productos");
 //BA.debugLineNum = 1008;BA.debugLine="B4XPages.MainPage.productos.b_terminar1_Click";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._productos /*gunav2.keymon.com.mx.c_productos*/ ._b_terminar1_click /*String*/ ();
 //BA.debugLineNum = 1009;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear() throws Exception{
anywheresoftware.b4a.objects.collections.Map _m = null;
 //BA.debugLineNum = 465;BA.debugLine="Sub B4XPage_Appear";
 //BA.debugLineNum = 467;BA.debugLine="prodsIds.Initialize";
_prodsids.Initialize();
 //BA.debugLineNum = 468;BA.debugLine="prodsCants.Initialize";
_prodscants.Initialize();
 //BA.debugLineNum = 469;BA.debugLine="prodsPrecios.Initialize";
_prodsprecios.Initialize();
 //BA.debugLineNum = 470;BA.debugLine="prodsIds2.Initialize";
_prodsids2.Initialize();
 //BA.debugLineNum = 471;BA.debugLine="prodsCants2.Initialize";
_prodscants2.Initialize();
 //BA.debugLineNum = 472;BA.debugLine="prodsPrecios2.Initialize";
_prodsprecios2.Initialize();
 //BA.debugLineNum = 473;BA.debugLine="Dim m As Map = Subs.traeTotalesClienteActual";
_m = new anywheresoftware.b4a.objects.collections.Map();
_m = _subs._traetotalesclienteactual /*anywheresoftware.b4a.objects.collections.Map*/ (ba);
 //BA.debugLineNum = 474;BA.debugLine="prodsPedidoActual = m.Get(\"productos\")";
_prodspedidoactual = BA.ObjectToString(_m.Get((Object)("productos")));
 //BA.debugLineNum = 475;BA.debugLine="montoPedidoActual = m.Get(\"monto\")";
_montopedidoactual = BA.ObjectToString(_m.Get((Object)("monto")));
 //BA.debugLineNum = 477;BA.debugLine="If laPromo <> \"\" Then muestraPromo(laPromo, elCli";
if ((_lapromo).equals("") == false) { 
_muestrapromo(_lapromo,_elcliente);};
 //BA.debugLineNum = 478;BA.debugLine="Log(laPromo)";
__c.LogImpl("442795021",_lapromo,0);
 //BA.debugLineNum = 479;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
 //BA.debugLineNum = 450;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
 //BA.debugLineNum = 451;BA.debugLine="Root = Root1";
_root = _root1;
 //BA.debugLineNum = 453;BA.debugLine="Root.LoadLayout(\"promociones\")";
_root.LoadLayout("promociones",ba);
 //BA.debugLineNum = 455;BA.debugLine="p_promociones.Height= Root.Height";
_p_promociones.setHeight(_root.getHeight());
 //BA.debugLineNum = 456;BA.debugLine="p_promociones.Width= Root.Width";
_p_promociones.setWidth(_root.getWidth());
 //BA.debugLineNum = 457;BA.debugLine="promosMap.Initialize";
_promosmap.Initialize();
 //BA.debugLineNum = 458;BA.debugLine="p_promociones.Top=0";
_p_promociones.setTop((int) (0));
 //BA.debugLineNum = 459;BA.debugLine="p_promociones.Left=0";
_p_promociones.setLeft((int) (0));
 //BA.debugLineNum = 460;BA.debugLine="b_terminar1.Left = Root.Width - (b_terminar1.Widt";
_b_terminar1.setLeft((int) (_root.getWidth()-(_b_terminar1.getWidth()+10)));
 //BA.debugLineNum = 461;BA.debugLine="b_continuar.Left = Root.Width - b_terminar1.Width";
_b_continuar.setLeft((int) (_root.getWidth()-_b_terminar1.getWidth()-(_b_continuar.getWidth()+20)));
 //BA.debugLineNum = 462;BA.debugLine="Subs.centraPanel(p_promociones,Root.Width)";
_subs._centrapanel /*String*/ (ba,_p_promociones,_root.getWidth());
 //BA.debugLineNum = 463;BA.debugLine="End Sub";
return "";
}
public String  _class_globals() throws Exception{
 //BA.debugLineNum = 398;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 399;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
 //BA.debugLineNum = 400;BA.debugLine="Private xui As XUI";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
 //BA.debugLineNum = 401;BA.debugLine="Private l_promoDesc As Label";
_l_promodesc = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 402;BA.debugLine="Private lv_prodsFijos As ListView";
_lv_prodsfijos = new anywheresoftware.b4a.objects.ListViewWrapper();
 //BA.debugLineNum = 403;BA.debugLine="Private clv_prodsVariabes, clv_prodsVariabes2 As";
_clv_prodsvariabes = new b4a.example3.customlistview();
_clv_prodsvariabes2 = new b4a.example3.customlistview();
 //BA.debugLineNum = 404;BA.debugLine="Private l_prodsFijos As Label";
_l_prodsfijos = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 405;BA.debugLine="Private l_prodsVariables, l_prodsVariables2 As La";
_l_prodsvariables = new anywheresoftware.b4a.objects.LabelWrapper();
_l_prodsvariables2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 406;BA.debugLine="Private i_prod As ImageView";
_i_prod = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 407;BA.debugLine="Private l_prodX As Label";
_l_prodx = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 408;BA.debugLine="Private p_prods As Panel";
_p_prods = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 409;BA.debugLine="Private b_prodMenos, b_prodMenos2 As Button";
_b_prodmenos = new anywheresoftware.b4a.objects.ButtonWrapper();
_b_prodmenos2 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 410;BA.debugLine="Private et_pCant As EditText";
_et_pcant = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 411;BA.debugLine="Private b_prodMas, b_prodMas2 As Button";
_b_prodmas = new anywheresoftware.b4a.objects.ButtonWrapper();
_b_prodmas2 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 412;BA.debugLine="Private l_pCant As Label";
_l_pcant = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 413;BA.debugLine="Dim totalProds As Int = 0";
_totalprods = (int) (0);
 //BA.debugLineNum = 414;BA.debugLine="Dim prodsVar1 As Int = 0";
_prodsvar1 = (int) (0);
 //BA.debugLineNum = 415;BA.debugLine="Dim prodsVar2 As Int = 0";
_prodsvar2 = (int) (0);
 //BA.debugLineNum = 416;BA.debugLine="Dim prodsVarReq As Int = 0";
_prodsvarreq = (int) (0);
 //BA.debugLineNum = 417;BA.debugLine="Dim prodsVarReq_ As Int = 0";
_prodsvarreq_ = (int) (0);
 //BA.debugLineNum = 418;BA.debugLine="Dim prodsVarReq2 As Int = 0";
_prodsvarreq2 = (int) (0);
 //BA.debugLineNum = 419;BA.debugLine="Dim prodsVarReq2_ As Int = 0";
_prodsvarreq2_ = (int) (0);
 //BA.debugLineNum = 420;BA.debugLine="Dim totalCompra As Float = 0";
_totalcompra = (float) (0);
 //BA.debugLineNum = 421;BA.debugLine="Dim prodsFijosTot As Float = 0";
_prodsfijostot = (float) (0);
 //BA.debugLineNum = 422;BA.debugLine="Dim tpf As Int = 0";
_tpf = (int) (0);
 //BA.debugLineNum = 423;BA.debugLine="Dim tpf2 As Int = 0";
_tpf2 = (int) (0);
 //BA.debugLineNum = 424;BA.debugLine="Dim maxCantPromos As Int = 1";
_maxcantpromos = (int) (1);
 //BA.debugLineNum = 425;BA.debugLine="Private l_totProds As Label";
_l_totprods = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 426;BA.debugLine="Private l_total As Label";
_l_total = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 427;BA.debugLine="Private b_terminar1 As Button";
_b_terminar1 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 428;BA.debugLine="Private p_promociones As Panel";
_p_promociones = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 429;BA.debugLine="Dim prodsIds, prodsCants, prodsPrecios, prodsIds2";
_prodsids = new anywheresoftware.b4a.objects.collections.List();
_prodscants = new anywheresoftware.b4a.objects.collections.List();
_prodsprecios = new anywheresoftware.b4a.objects.collections.List();
_prodsids2 = new anywheresoftware.b4a.objects.collections.List();
_prodscants2 = new anywheresoftware.b4a.objects.collections.List();
_prodsprecios2 = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 430;BA.debugLine="Dim estaPromo, esteCliente As String";
_estapromo = "";
_estecliente = "";
 //BA.debugLineNum = 431;BA.debugLine="Private b_promoMas As Button";
_b_promomas = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 432;BA.debugLine="Private b_promoMenos As Button";
_b_promomenos = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 433;BA.debugLine="Private et_promoCant As EditText";
_et_promocant = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 434;BA.debugLine="Private l_promosCant As Label";
_l_promoscant = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 435;BA.debugLine="Private b_continuar As Button";
_b_continuar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 436;BA.debugLine="Private p_prodsVariables, p_prodsVariables2 As Pa";
_p_prodsvariables = new anywheresoftware.b4a.objects.PanelWrapper();
_p_prodsvariables2 = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 437;BA.debugLine="Dim laPromo = \"\", elCliente = \"\" As String";
_lapromo = "";
_elcliente = "";
 //BA.debugLineNum = 438;BA.debugLine="Dim prodsPedidoActual As String";
_prodspedidoactual = "";
 //BA.debugLineNum = 439;BA.debugLine="Dim montoPedidoActual As String";
_montopedidoactual = "";
 //BA.debugLineNum = 440;BA.debugLine="Dim promosMap As Map";
_promosmap = new anywheresoftware.b4a.objects.collections.Map();
 //BA.debugLineNum = 441;BA.debugLine="Dim su As StringUtils";
_su = new anywheresoftware.b4a.objects.StringUtils();
 //BA.debugLineNum = 442;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.objects.PanelWrapper  _createlistitem(String _text,String _preciou,int _inv,int _width,int _height,anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _img,String _prodid) throws Exception{
anywheresoftware.b4a.objects.B4XViewWrapper _p = null;
 //BA.debugLineNum = 678;BA.debugLine="Sub CreateListItem(Text As String, precioU As Stri";
 //BA.debugLineNum = 679;BA.debugLine="Dim p As B4XView = xui.CreatePanel(\"\")";
_p = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p = _xui.CreatePanel(ba,"");
 //BA.debugLineNum = 680;BA.debugLine="p.SetLayoutAnimated(0, 0, 0, Width, Height)";
_p.SetLayoutAnimated((int) (0),(int) (0),(int) (0),_width,_height);
 //BA.debugLineNum = 681;BA.debugLine="p.LoadLayout(\"prodItem1\")";
_p.LoadLayout("prodItem1",ba);
 //BA.debugLineNum = 682;BA.debugLine="l_prodX.TextSize = 15";
_l_prodx.setTextSize((float) (15));
 //BA.debugLineNum = 683;BA.debugLine="l_prodX.Text = Text";
_l_prodx.setText(BA.ObjectToCharSequence(_text));
 //BA.debugLineNum = 684;BA.debugLine="l_prodX.TextSize = 15";
_l_prodx.setTextSize((float) (15));
 //BA.debugLineNum = 687;BA.debugLine="p_prods.height = su.MeasureMultilineTextHeight(l_";
_p_prods.setHeight((int) (_su.MeasureMultilineTextHeight((android.widget.TextView)(_l_prodx.getObject()),BA.ObjectToCharSequence(_l_prodx.getText()))+20));
 //BA.debugLineNum = 688;BA.debugLine="If p_prods.Height < Height Then p_prods.Height =";
if (_p_prods.getHeight()<_height) { 
_p_prods.setHeight(_height);};
 //BA.debugLineNum = 689;BA.debugLine="l_prodX.Height = p_prods.Height";
_l_prodx.setHeight(_p_prods.getHeight());
 //BA.debugLineNum = 690;BA.debugLine="l_pCant.Tag = precioU&\"|\"&inv&\"|\"&prodId";
_l_pcant.setTag((Object)(_preciou+"|"+BA.NumberToString(_inv)+"|"+_prodid));
 //BA.debugLineNum = 691;BA.debugLine="et_pCant.Tag = precioU&\"|\"&inv&\"|\"&prodId";
_et_pcant.setTag((Object)(_preciou+"|"+BA.NumberToString(_inv)+"|"+_prodid));
 //BA.debugLineNum = 692;BA.debugLine="et_pCant.BringToFront";
_et_pcant.BringToFront();
 //BA.debugLineNum = 694;BA.debugLine="p.Height = p_prods.Height";
_p.setHeight(_p_prods.getHeight());
 //BA.debugLineNum = 695;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()));
 //BA.debugLineNum = 696;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4a.objects.PanelWrapper  _createlistitem2(String _text,String _preciou,int _inv,int _width,int _height,anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _img,String _prodid) throws Exception{
anywheresoftware.b4a.objects.B4XViewWrapper _p = null;
 //BA.debugLineNum = 698;BA.debugLine="Sub CreateListItem2(Text As String, precioU As Str";
 //BA.debugLineNum = 699;BA.debugLine="Dim p As B4XView = xui.CreatePanel(\"\")";
_p = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p = _xui.CreatePanel(ba,"");
 //BA.debugLineNum = 700;BA.debugLine="p.SetLayoutAnimated(0, 0, 0, Width, Height)";
_p.SetLayoutAnimated((int) (0),(int) (0),(int) (0),_width,_height);
 //BA.debugLineNum = 701;BA.debugLine="p.LoadLayout(\"prodItem2\")";
_p.LoadLayout("prodItem2",ba);
 //BA.debugLineNum = 702;BA.debugLine="l_prodX.TextSize = 15";
_l_prodx.setTextSize((float) (15));
 //BA.debugLineNum = 703;BA.debugLine="l_prodX.Text = Text";
_l_prodx.setText(BA.ObjectToCharSequence(_text));
 //BA.debugLineNum = 704;BA.debugLine="l_prodX.TextSize = 15";
_l_prodx.setTextSize((float) (15));
 //BA.debugLineNum = 707;BA.debugLine="p_prods.height = su.MeasureMultilineTextHeight(l_";
_p_prods.setHeight((int) (_su.MeasureMultilineTextHeight((android.widget.TextView)(_l_prodx.getObject()),BA.ObjectToCharSequence(_l_prodx.getText()))+20));
 //BA.debugLineNum = 708;BA.debugLine="If p_prods.Height < Height Then p_prods.Height =";
if (_p_prods.getHeight()<_height) { 
_p_prods.setHeight(_height);};
 //BA.debugLineNum = 709;BA.debugLine="l_prodX.Height = p_prods.Height";
_l_prodx.setHeight(_p_prods.getHeight());
 //BA.debugLineNum = 711;BA.debugLine="l_pCant.Tag = precioU&\"|\"&inv&\"|\"&prodId";
_l_pcant.setTag((Object)(_preciou+"|"+BA.NumberToString(_inv)+"|"+_prodid));
 //BA.debugLineNum = 712;BA.debugLine="et_pCant.Tag = precioU&\"|\"&inv&\"|\"&prodId";
_et_pcant.setTag((Object)(_preciou+"|"+BA.NumberToString(_inv)+"|"+_prodid));
 //BA.debugLineNum = 713;BA.debugLine="et_pCant.BringToFront";
_et_pcant.BringToFront();
 //BA.debugLineNum = 715;BA.debugLine="p.Height = p_prods.Height";
_p.setHeight(_p_prods.getHeight());
 //BA.debugLineNum = 716;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()));
 //BA.debugLineNum = 717;BA.debugLine="End Sub";
return null;
}
public String  _cuentaprods() throws Exception{
boolean _thislog = false;
float _tcpf = 0f;
int _pf = 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;
anywheresoftware.b4a.objects.B4XViewWrapper _cant2 = null;
 //BA.debugLineNum = 836;BA.debugLine="Sub cuentaProds";
 //BA.debugLineNum = 839;BA.debugLine="Private thisLog As Boolean = False";
_thislog = __c.False;
 //BA.debugLineNum = 841;BA.debugLine="prodsIds2.Clear";
_prodsids2.Clear();
 //BA.debugLineNum = 842;BA.debugLine="prodsCants2.Clear";
_prodscants2.Clear();
 //BA.debugLineNum = 843;BA.debugLine="prodsPrecios2.Clear";
_prodsprecios2.Clear();
 //BA.debugLineNum = 844;BA.debugLine="lv_prodsFijos.Clear";
_lv_prodsfijos.Clear();
 //BA.debugLineNum = 845;BA.debugLine="prodsVar1 = 0";
_prodsvar1 = (int) (0);
 //BA.debugLineNum = 846;BA.debugLine="prodsVar2 = 0";
_prodsvar2 = (int) (0);
 //BA.debugLineNum = 847;BA.debugLine="agregaFijosALista(Subs.traePromo(estaPromo, esteC";
_agregafijosalista(_subs._traepromo /*anywheresoftware.b4a.objects.collections.Map*/ (ba,_estapromo,_estecliente),__c.True);
 //BA.debugLineNum = 849;BA.debugLine="Private tcpf As Float = 0 'Total de compra de pro";
_tcpf = (float) (0);
 //BA.debugLineNum = 850;BA.debugLine="For pf = 0 To prodsIds.Size - 1";
{
final int step10 = 1;
final int limit10 = (int) (_prodsids.getSize()-1);
_pf = (int) (0) ;
for (;_pf <= limit10 ;_pf = _pf + step10 ) {
 //BA.debugLineNum = 851;BA.debugLine="If thisLog Then Log($\"${tcpf} + ${prodsCants.Get";
if (_thislog) { 
__c.LogImpl("443450383",(""+__c.SmartStringFormatter("",(Object)(_tcpf))+" + "+__c.SmartStringFormatter("",_prodscants.Get(_pf))+" * "+__c.SmartStringFormatter("",_prodsprecios.Get(_pf))+" = "+__c.SmartStringFormatter("",(Object)(((double)(BA.ObjectToNumber(_prodsprecios.Get(_pf)))*(double)(BA.ObjectToNumber(_prodscants.Get(_pf))))))+""),0);};
 //BA.debugLineNum = 852;BA.debugLine="tcpf = tcpf + (prodsPrecios.Get(pf) * prodsCants";
_tcpf = (float) (_tcpf+((double)(BA.ObjectToNumber(_prodsprecios.Get(_pf)))*(double)(BA.ObjectToNumber(_prodscants.Get(_pf)))));
 }
};
 //BA.debugLineNum = 855;BA.debugLine="totalCompra = tcpf";
_totalcompra = _tcpf;
 //BA.debugLineNum = 856;BA.debugLine="totalProds = tpf 'Cantidad total de productos fij";
_totalprods = _tpf;
 //BA.debugLineNum = 858;BA.debugLine="For i = 0 To clv_prodsVariabes.GetSize - 1";
{
final int step16 = 1;
final int limit16 = (int) (_clv_prodsvariabes._getsize()-1);
_i = (int) (0) ;
for (;_i <= limit16 ;_i = _i + step16 ) {
 //BA.debugLineNum = 859;BA.debugLine="Private p0 As B4XView = clv_prodsVariabes.GetPan";
_p0 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p0 = _clv_prodsvariabes._getpanel(_i);
 //BA.debugLineNum = 860;BA.debugLine="Private p As B4XView = p0.GetView(0)";
_p = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p = _p0.GetView((int) (0));
 //BA.debugLineNum = 861;BA.debugLine="Private cant1 As B4XView = p.GetView(2).GetView(";
_cant1 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_cant1 = _p.GetView((int) (2)).GetView((int) (4));
 //BA.debugLineNum = 862;BA.debugLine="If cant1.Text = \"\" Then cant1.Text = 0";
if ((_cant1.getText()).equals("")) { 
_cant1.setText(BA.ObjectToCharSequence(0));};
 //BA.debugLineNum = 863;BA.debugLine="totalProds = totalProds + cant1.Text";
_totalprods = (int) (_totalprods+(double)(Double.parseDouble(_cant1.getText())));
 //BA.debugLineNum = 864;BA.debugLine="prodsVar1 = prodsVar1 + cant1.Text";
_prodsvar1 = (int) (_prodsvar1+(double)(Double.parseDouble(_cant1.getText())));
 //BA.debugLineNum = 865;BA.debugLine="Private esteTag As List = Regex.Split(\"\\|\", cant";
_estetag = new anywheresoftware.b4a.objects.collections.List();
_estetag = anywheresoftware.b4a.keywords.Common.ArrayToList(__c.Regex.Split("\\|",BA.ObjectToString(_cant1.getTag())));
 //BA.debugLineNum = 866;BA.debugLine="If cant1.Text > esteTag.Get(1) Then cant1.Text =";
if ((double)(Double.parseDouble(_cant1.getText()))>(double)(BA.ObjectToNumber(_estetag.Get((int) (1))))) { 
_cant1.setText(BA.ObjectToCharSequence(_estetag.Get((int) (1))));};
 //BA.debugLineNum = 867;BA.debugLine="If cant1.Text > 0 Then";
if ((double)(Double.parseDouble(_cant1.getText()))>0) { 
 //BA.debugLineNum = 869;BA.debugLine="totalCompra = totalCompra + (esteTag.get(0) * c";
_totalcompra = (float) (_totalcompra+((double)(BA.ObjectToNumber(_estetag.Get((int) (0))))*(double)(Double.parseDouble(_cant1.getText()))));
 //BA.debugLineNum = 870;BA.debugLine="If thisLog Then Log($\"Cant: ${cant1.Text}, Suma";
if (_thislog) { 
__c.LogImpl("443450402",("Cant: "+__c.SmartStringFormatter("",(Object)(_cant1.getText()))+", Suma: "+__c.SmartStringFormatter("",(Object)(_totalcompra))+""),0);};
 //BA.debugLineNum = 871;BA.debugLine="prodsIds2.Add(esteTag.Get(2))";
_prodsids2.Add(_estetag.Get((int) (2)));
 //BA.debugLineNum = 872;BA.debugLine="prodsCants2.Add(cant1.Text)";
_prodscants2.Add((Object)(_cant1.getText()));
 //BA.debugLineNum = 873;BA.debugLine="prodsPrecios2.Add(esteTag.get(0))";
_prodsprecios2.Add(_estetag.Get((int) (0)));
 };
 //BA.debugLineNum = 875;BA.debugLine="l_total.Text = $\"Total: $$1.2{totalCompra}\"$";
_l_total.setText(BA.ObjectToCharSequence(("Total: $"+__c.SmartStringFormatter("1.2",(Object)(_totalcompra))+"")));
 //BA.debugLineNum = 876;BA.debugLine="l_totProds.text = $\"Productos: ${totalProds}\"$";
_l_totprods.setText(BA.ObjectToCharSequence(("Productos: "+__c.SmartStringFormatter("",(Object)(_totalprods))+"")));
 }
};
 //BA.debugLineNum = 879;BA.debugLine="For i = 0 To clv_prodsVariabes2.GetSize - 1";
{
final int step35 = 1;
final int limit35 = (int) (_clv_prodsvariabes2._getsize()-1);
_i = (int) (0) ;
for (;_i <= limit35 ;_i = _i + step35 ) {
 //BA.debugLineNum = 880;BA.debugLine="Private p0 As B4XView = clv_prodsVariabes2.GetPa";
_p0 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p0 = _clv_prodsvariabes2._getpanel(_i);
 //BA.debugLineNum = 881;BA.debugLine="Private p As B4XView = p0.GetView(0)";
_p = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p = _p0.GetView((int) (0));
 //BA.debugLineNum = 882;BA.debugLine="Private cant2 As B4XView = p.GetView(2).GetView(";
_cant2 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_cant2 = _p.GetView((int) (2)).GetView((int) (4));
 //BA.debugLineNum = 883;BA.debugLine="totalProds = totalProds + cant2.Text";
_totalprods = (int) (_totalprods+(double)(Double.parseDouble(_cant2.getText())));
 //BA.debugLineNum = 884;BA.debugLine="prodsVar2 = prodsVar2 + cant2.Text";
_prodsvar2 = (int) (_prodsvar2+(double)(Double.parseDouble(_cant2.getText())));
 //BA.debugLineNum = 885;BA.debugLine="Private esteTag As List = Regex.Split(\"\\|\", cant";
_estetag = new anywheresoftware.b4a.objects.collections.List();
_estetag = anywheresoftware.b4a.keywords.Common.ArrayToList(__c.Regex.Split("\\|",BA.ObjectToString(_cant2.getTag())));
 //BA.debugLineNum = 886;BA.debugLine="If cant2.Text > esteTag.Get(1) Then cant2.Text =";
if ((double)(Double.parseDouble(_cant2.getText()))>(double)(BA.ObjectToNumber(_estetag.Get((int) (1))))) { 
_cant2.setText(BA.ObjectToCharSequence(_estetag.Get((int) (1))));};
 //BA.debugLineNum = 887;BA.debugLine="If cant2.Text > 0 Then";
if ((double)(Double.parseDouble(_cant2.getText()))>0) { 
 //BA.debugLineNum = 889;BA.debugLine="totalCompra = totalCompra + (esteTag.get(0) * c";
_totalcompra = (float) (_totalcompra+((double)(BA.ObjectToNumber(_estetag.Get((int) (0))))*(double)(Double.parseDouble(_cant2.getText()))));
 //BA.debugLineNum = 890;BA.debugLine="If thisLog Then Log($\"Cant: ${cant2.Text}, Suma";
if (_thislog) { 
__c.LogImpl("443450422",("Cant: "+__c.SmartStringFormatter("",(Object)(_cant2.getText()))+", Suma: "+__c.SmartStringFormatter("",(Object)(_totalcompra))+""),0);};
 //BA.debugLineNum = 891;BA.debugLine="prodsIds2.Add(esteTag.Get(2))";
_prodsids2.Add(_estetag.Get((int) (2)));
 //BA.debugLineNum = 892;BA.debugLine="prodsCants2.Add(cant2.Text)";
_prodscants2.Add((Object)(_cant2.getText()));
 //BA.debugLineNum = 893;BA.debugLine="prodsPrecios2.Add(esteTag.get(0))";
_prodsprecios2.Add(_estetag.Get((int) (0)));
 };
 //BA.debugLineNum = 895;BA.debugLine="l_total.Text = $\"Total: $$1.2{totalCompra}\"$";
_l_total.setText(BA.ObjectToCharSequence(("Total: $"+__c.SmartStringFormatter("1.2",(Object)(_totalcompra))+"")));
 //BA.debugLineNum = 896;BA.debugLine="l_totProds.text = $\"Productos: ${totalProds}\"$";
_l_totprods.setText(BA.ObjectToCharSequence(("Productos: "+__c.SmartStringFormatter("",(Object)(_totalprods))+"")));
 }
};
 //BA.debugLineNum = 899;BA.debugLine="If thisLog Then Log($\"Total Prods: ${totalProds},";
if (_thislog) { 
__c.LogImpl("443450431",("Total Prods: "+__c.SmartStringFormatter("",(Object)(_totalprods))+", Total: $"+__c.SmartStringFormatter("1.2",(Object)(_totalcompra))+""),0);};
 //BA.debugLineNum = 900;BA.debugLine="l_total.Text = $\"Total: $$1.2{totalCompra}\"$";
_l_total.setText(BA.ObjectToCharSequence(("Total: $"+__c.SmartStringFormatter("1.2",(Object)(_totalcompra))+"")));
 //BA.debugLineNum = 901;BA.debugLine="l_totProds.text = $\"Productos: ${totalProds}\"$";
_l_totprods.setText(BA.ObjectToCharSequence(("Productos: "+__c.SmartStringFormatter("",(Object)(_totalprods))+"")));
 //BA.debugLineNum = 902;BA.debugLine="If totalProds < prodsVarReq + prodsVarReq2 + tpf";
if (_totalprods<_prodsvarreq+_prodsvarreq2+_tpf || _totalprods>_prodsvarreq+_prodsvarreq2+_tpf) { 
 //BA.debugLineNum = 904;BA.debugLine="b_terminar1.Visible = False";
_b_terminar1.setVisible(__c.False);
 //BA.debugLineNum = 905;BA.debugLine="b_continuar.Visible = False";
_b_continuar.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 908;BA.debugLine="b_terminar1.Visible = True";
_b_terminar1.setVisible(__c.True);
 //BA.debugLineNum = 909;BA.debugLine="b_continuar.Visible = True";
_b_continuar.setVisible(__c.True);
 };
 //BA.debugLineNum = 911;BA.debugLine="If thisLog Then LogColor($\"${prodsIds}${CRLF}${pr";
if (_thislog) { 
__c.LogImpl("443450443",(""+__c.SmartStringFormatter("",(Object)(_prodsids.getObject()))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+""+__c.SmartStringFormatter("",(Object)(_prodscants.getObject()))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+""+__c.SmartStringFormatter("",(Object)(_prodsprecios.getObject()))+""),__c.Colors.Blue);};
 //BA.debugLineNum = 912;BA.debugLine="If thisLog Then LogColor($\"${prodsIds2}${CRLF}${p";
if (_thislog) { 
__c.LogImpl("443450444",(""+__c.SmartStringFormatter("",(Object)(_prodsids2.getObject()))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+""+__c.SmartStringFormatter("",(Object)(_prodscants2.getObject()))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+""+__c.SmartStringFormatter("",(Object)(_prodsprecios2.getObject()))+""),__c.Colors.Magenta);};
 //BA.debugLineNum = 914;BA.debugLine="End Sub";
return "";
}
public String  _et_pcant_focuschanged(boolean _hasfocus) throws Exception{
 //BA.debugLineNum = 916;BA.debugLine="Private Sub et_pCant_FocusChanged (HasFocus As Boo";
 //BA.debugLineNum = 917;BA.debugLine="LogColor(\"focus changed\", Colors.Magenta)";
__c.LogImpl("443515905","focus changed",__c.Colors.Magenta);
 //BA.debugLineNum = 918;BA.debugLine="cuentaProds";
_cuentaprods();
 //BA.debugLineNum = 919;BA.debugLine="End Sub";
return "";
}
public String  _et_pcant_textchanged(String _old,String _new) throws Exception{
 //BA.debugLineNum = 831;BA.debugLine="Private Sub et_pCant_TextChanged (Old As String, N";
 //BA.debugLineNum = 833;BA.debugLine="cuentaProds";
_cuentaprods();
 //BA.debugLineNum = 834;BA.debugLine="End Sub";
return "";
}
public Object  _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
 //BA.debugLineNum = 445;BA.debugLine="Public Sub Initialize As Object";
 //BA.debugLineNum = 446;BA.debugLine="Return Me";
if (true) return this;
 //BA.debugLineNum = 447;BA.debugLine="End Sub";
return null;
}
public String  _muestrapromo(String _promo,String _cliente) throws Exception{
boolean _thislog = false;
anywheresoftware.b4a.objects.collections.Map _mp = null;
anywheresoftware.b4a.objects.collections.Map _prodspromo = null;
anywheresoftware.b4a.objects.collections.Map _invdisppromo = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c2 = null;
anywheresoftware.b4a.objects.CSBuilder _cs = null;
anywheresoftware.b4a.objects.collections.List _listapv = null;
anywheresoftware.b4a.objects.collections.List _listapreciospv = null;
anywheresoftware.b4a.objects.collections.List _listapv2 = null;
anywheresoftware.b4a.objects.collections.List _listapreciospv2 = null;
anywheresoftware.b4a.objects.collections.List _pv = null;
anywheresoftware.b4a.objects.collections.List _pv2 = null;
int _pfp = 0;
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
String _p = "";
String _indicepv = "";
String _esteprecio = "";
anywheresoftware.b4a.objects.collections.Map _thisprod = null;
String _indicepv2 = "";
 //BA.debugLineNum = 482;BA.debugLine="Sub muestraPromo(promo As String, cliente As Strin";
 //BA.debugLineNum = 483;BA.debugLine="Private thisLog As Boolean = False";
_thislog = __c.False;
 //BA.debugLineNum = 485;BA.debugLine="estaPromo = promo";
_estapromo = _promo;
 //BA.debugLineNum = 486;BA.debugLine="esteCliente = cliente";
_estecliente = _cliente;
 //BA.debugLineNum = 487;BA.debugLine="Private mp As Map = Subs.traePromo(promo, cliente";
_mp = new anywheresoftware.b4a.objects.collections.Map();
_mp = _subs._traepromo /*anywheresoftware.b4a.objects.collections.Map*/ (ba,_promo,_cliente);
 //BA.debugLineNum = 488;BA.debugLine="Private prodsPromo As Map = mp.Get(\"productos\") '";
_prodspromo = new anywheresoftware.b4a.objects.collections.Map();
_prodspromo = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(_mp.Get((Object)("productos"))));
 //BA.debugLineNum = 489;BA.debugLine="Private invDispPromo As Map = Subs.traemosInventa";
_invdisppromo = new anywheresoftware.b4a.objects.collections.Map();
_invdisppromo = _subs._traemosinventariodisponibleparapromo /*anywheresoftware.b4a.objects.collections.Map*/ (ba,_promo);
 //BA.debugLineNum = 491;BA.debugLine="If thisLog Then Log(\"Max promos por inv de prods";
if (_thislog) { 
__c.LogImpl("442860553","Max promos por inv de prods FIJOS: "+BA.NumberToString(_subs._revisamaxpromosprodsfijosporinventario /*int*/ (ba,_mp)),0);};
 //BA.debugLineNum = 492;BA.debugLine="If thisLog Then Log(\"Max promos por inv de prods";
if (_thislog) { 
__c.LogImpl("442860554","Max promos por inv de prods VARIABLES: "+BA.NumberToString(_subs._revisamaxpromosprodsvariablesporinventario /*int*/ (ba,_mp)),0);};
 //BA.debugLineNum = 493;BA.debugLine="maxCantPromos = Subs.revisaMaxPromosProdsVariable";
_maxcantpromos = _subs._revisamaxpromosprodsvariablesporinventario /*int*/ (ba,_mp);
 //BA.debugLineNum = 494;BA.debugLine="et_promoCant.Text = 1";
_et_promocant.setText(BA.ObjectToCharSequence(1));
 //BA.debugLineNum = 496;BA.debugLine="If laPromo = \"MYKONOS_01\" Then";
if ((_lapromo).equals("MYKONOS_01")) { 
 //BA.debugLineNum = 497;BA.debugLine="Private c As Cursor = B4XPages.MainPage.skmt.Exe";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT ifnull( SUM (PE_COSTO_TOT),0) As suma FROM PEDIDO JOIN CAT_PROMO_ESP ON CAT_PE_ID = PE_PROID WHERE PE_CLIENTE IN (Select CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 498;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 499;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 500;BA.debugLine="Private c2 As Cursor = B4XPages.MainPage.skmt.E";
_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)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT DISTINCT CAT_PE_MONTO FROM CAT_PROMO_ESP")));
 //BA.debugLineNum = 501;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
 //BA.debugLineNum = 502;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
 //BA.debugLineNum = 504;BA.debugLine="If c.GetString(\"suma\") >= 300 And c.GetString(";
if ((double)(Double.parseDouble(_c.GetString("suma")))>=300 && (double)(Double.parseDouble(_c.GetString("suma")))<600) { 
 //BA.debugLineNum = 505;BA.debugLine="l_promosCant.text = \"Max promos: \" & 1";
_l_promoscant.setText(BA.ObjectToCharSequence("Max promos: "+BA.NumberToString(1)));
 }else if((double)(Double.parseDouble(_c.GetString("suma")))>=600 && (double)(Double.parseDouble(_c.GetString("suma")))<900) { 
 //BA.debugLineNum = 507;BA.debugLine="l_promosCant.text = \"Max promos: \" & 2";
_l_promoscant.setText(BA.ObjectToCharSequence("Max promos: "+BA.NumberToString(2)));
 }else if((double)(Double.parseDouble(_c.GetString("suma")))>=900) { 
 //BA.debugLineNum = 509;BA.debugLine="l_promosCant.text = \"Max promos: \" & 3";
_l_promoscant.setText(BA.ObjectToCharSequence("Max promos: "+BA.NumberToString(3)));
 };
 };
 };
 }else {
 //BA.debugLineNum = 515;BA.debugLine="l_promosCant.text = \"Max promos: \" & maxCantProm";
_l_promoscant.setText(BA.ObjectToCharSequence("Max promos: "+BA.NumberToString(_maxcantpromos)));
 };
 //BA.debugLineNum = 519;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
 //BA.debugLineNum = 520;BA.debugLine="cs.Initialize";
_cs.Initialize();
 //BA.debugLineNum = 521;BA.debugLine="If thisLog Then Log(mp)";
if (_thislog) { 
__c.LogImpl("442860583",BA.ObjectToString(_mp),0);};
 //BA.debugLineNum = 522;BA.debugLine="If thisLog Then Log(prodsPromo)";
if (_thislog) { 
__c.LogImpl("442860584",BA.ObjectToString(_prodspromo),0);};
 //BA.debugLineNum = 523;BA.debugLine="Private listaPV As List = mp.Get(\"prodsVariables\"";
_listapv = new anywheresoftware.b4a.objects.collections.List();
_listapv = (anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(_mp.Get((Object)("prodsVariables"))));
 //BA.debugLineNum = 524;BA.debugLine="Private listaPreciosPV As List = mp.Get(\"prodsVar";
_listapreciospv = new anywheresoftware.b4a.objects.collections.List();
_listapreciospv = (anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(_mp.Get((Object)("prodsVariablesPrecios"))));
 //BA.debugLineNum = 525;BA.debugLine="Private listaPV2 As List = mp.Get(\"prodsVariables";
_listapv2 = new anywheresoftware.b4a.objects.collections.List();
_listapv2 = (anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(_mp.Get((Object)("prodsVariables2"))));
 //BA.debugLineNum = 526;BA.debugLine="Private listaPreciosPV2 As List = mp.Get(\"prodsVa";
_listapreciospv2 = new anywheresoftware.b4a.objects.collections.List();
_listapreciospv2 = (anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(_mp.Get((Object)("prodsVariablesPrecios2"))));
 //BA.debugLineNum = 531;BA.debugLine="l_promoDesc.Text = cs.Color(Colors.RGB(100,149,23";
_l_promodesc.setText(BA.ObjectToCharSequence(_cs.Color(__c.Colors.RGB((int) (100),(int) (149),(int) (237))).Append(BA.ObjectToCharSequence("Promocion: ")).Pop().Append(BA.ObjectToCharSequence(__c.CRLF)).Append(BA.ObjectToCharSequence(_promo)).Append(BA.ObjectToCharSequence(__c.CRLF)).Append(BA.ObjectToCharSequence(_mp.Get((Object)("descripcion")))).PopAll().getObject()));
 //BA.debugLineNum = 532;BA.debugLine="prodsFijosTot = 0";
_prodsfijostot = (float) (0);
 //BA.debugLineNum = 535;BA.debugLine="Dim pv As List = mp.Get(\"prodsVariables\")";
_pv = new anywheresoftware.b4a.objects.collections.List();
_pv = (anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(_mp.Get((Object)("prodsVariables"))));
 //BA.debugLineNum = 536;BA.debugLine="Dim pv2 As List = mp.Get(\"prodsVariables2\")";
_pv2 = new anywheresoftware.b4a.objects.collections.List();
_pv2 = (anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(_mp.Get((Object)("prodsVariables2"))));
 //BA.debugLineNum = 537;BA.debugLine="If thisLog Then Log(mp)";
if (_thislog) { 
__c.LogImpl("442860599",BA.ObjectToString(_mp),0);};
 //BA.debugLineNum = 538;BA.debugLine="tpf = 0";
_tpf = (int) (0);
 //BA.debugLineNum = 539;BA.debugLine="For Each pfp As Int In mp.Get(\"prodsFijosPiezas\")";
{
final anywheresoftware.b4a.BA.IterableList group44 = ((anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(_mp.Get((Object)("prodsFijosPiezas")))));
final int groupLen44 = group44.getSize()
;int index44 = 0;
;
for (; index44 < groupLen44;index44++){
_pfp = (int)(BA.ObjectToNumber(group44.Get(index44)));
 //BA.debugLineNum = 540;BA.debugLine="tpf = tpf + pfp";
_tpf = (int) (_tpf+_pfp);
 }
};
 //BA.debugLineNum = 542;BA.debugLine="tpf2 = tpf";
_tpf2 = _tpf;
 //BA.debugLineNum = 544;BA.debugLine="l_prodsFijos.Text = $\"Productos fijos (${tpf})\"$";
_l_prodsfijos.setText(BA.ObjectToCharSequence(("Productos fijos ("+__c.SmartStringFormatter("",(Object)(_tpf))+")")));
 //BA.debugLineNum = 545;BA.debugLine="prodsVarReq = mp.Get(\"prodsVariablesRequeridos\")";
_prodsvarreq = (int)(BA.ObjectToNumber(_mp.Get((Object)("prodsVariablesRequeridos"))));
 //BA.debugLineNum = 546;BA.debugLine="prodsVarReq_ = prodsVarReq";
_prodsvarreq_ = _prodsvarreq;
 //BA.debugLineNum = 547;BA.debugLine="prodsVarReq2 = mp.Get(\"prodsVariables2Requeridos\"";
_prodsvarreq2 = (int)(BA.ObjectToNumber(_mp.Get((Object)("prodsVariables2Requeridos"))));
 //BA.debugLineNum = 548;BA.debugLine="prodsVarReq2_ = prodsVarReq2";
_prodsvarreq2_ = _prodsvarreq2;
 //BA.debugLineNum = 550;BA.debugLine="l_prodsVariables.Text = $\"Productos variables req";
_l_prodsvariables.setText(BA.ObjectToCharSequence(("Productos variables requeridos: "+__c.SmartStringFormatter("",(Object)(_prodsvarreq))+"")));
 //BA.debugLineNum = 551;BA.debugLine="l_prodsVariables2.Text = $\"Productos variables2 r";
_l_prodsvariables2.setText(BA.ObjectToCharSequence(("Productos variables2 requeridos: "+__c.SmartStringFormatter("",(Object)(_prodsvarreq2))+"")));
 //BA.debugLineNum = 552;BA.debugLine="If prodsVarReq = 0 Then";
if (_prodsvarreq==0) { 
 //BA.debugLineNum = 553;BA.debugLine="p_prodsVariables.Visible = False";
_p_prodsvariables.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 555;BA.debugLine="p_prodsVariables.Visible = True";
_p_prodsvariables.setVisible(__c.True);
 };
 //BA.debugLineNum = 558;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 559;BA.debugLine="label1 = lv_prodsFijos.SingleLineLayout.Label";
_label1 = _lv_prodsfijos.getSingleLineLayout().Label;
 //BA.debugLineNum = 560;BA.debugLine="label1.TextSize = 13";
_label1.setTextSize((float) (13));
 //BA.debugLineNum = 561;BA.debugLine="label1.TextColor = Colors.black";
_label1.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 562;BA.debugLine="lv_prodsFijos.SingleLineLayout.ItemHeight = 30dip";
_lv_prodsfijos.getSingleLineLayout().setItemHeight(__c.DipToCurrent((int) (30)));
 //BA.debugLineNum = 563;BA.debugLine="lv_prodsFijos.Clear";
_lv_prodsfijos.Clear();
 //BA.debugLineNum = 565;BA.debugLine="lv_prodsFijos.Clear";
_lv_prodsfijos.Clear();
 //BA.debugLineNum = 566;BA.debugLine="agregaFijosALista(mp, True)";
_agregafijosalista(_mp,__c.True);
 //BA.debugLineNum = 567;BA.debugLine="If thisLog Then Log(\"Total prods fijos = \" & prod";
if (_thislog) { 
__c.LogImpl("442860629","Total prods fijos = "+BA.NumberToString(_prodsfijostot),0);};
 //BA.debugLineNum = 569;BA.debugLine="l_totProds.text = $\"Productos: ${tpf}\"$";
_l_totprods.setText(BA.ObjectToCharSequence(("Productos: "+__c.SmartStringFormatter("",(Object)(_tpf))+"")));
 //BA.debugLineNum = 570;BA.debugLine="l_total.Text = $\"Total: $$1.2{prodsFijosTot}\"$";
_l_total.setText(BA.ObjectToCharSequence(("Total: $"+__c.SmartStringFormatter("1.2",(Object)(_prodsfijostot))+"")));
 //BA.debugLineNum = 576;BA.debugLine="If thisLog Then Log($\"PV1: ${pv.Size}, ${pv}\"$)";
if (_thislog) { 
__c.LogImpl("442860638",("PV1: "+__c.SmartStringFormatter("",(Object)(_pv.getSize()))+", "+__c.SmartStringFormatter("",(Object)(_pv.getObject()))+""),0);};
 //BA.debugLineNum = 577;BA.debugLine="If thisLog Then Log($\"PV2: ${pv2.Size}, ${pv2}\"$)";
if (_thislog) { 
__c.LogImpl("442860639",("PV2: "+__c.SmartStringFormatter("",(Object)(_pv2.getSize()))+", "+__c.SmartStringFormatter("",(Object)(_pv2.getObject()))+""),0);};
 //BA.debugLineNum = 578;BA.debugLine="If thisLog Then Log(\"invDisp=\" & invDispPromo)";
if (_thislog) { 
__c.LogImpl("442860640","invDisp="+BA.ObjectToString(_invdisppromo),0);};
 //BA.debugLineNum = 579;BA.debugLine="clv_prodsVariabes.Clear";
_clv_prodsvariabes._clear();
 //BA.debugLineNum = 580;BA.debugLine="clv_prodsVariabes2.Clear";
_clv_prodsvariabes2._clear();
 //BA.debugLineNum = 581;BA.debugLine="For Each p As String In pv";
{
final anywheresoftware.b4a.BA.IterableList group76 = _pv;
final int groupLen76 = group76.getSize()
;int index76 = 0;
;
for (; index76 < groupLen76;index76++){
_p = BA.ObjectToString(group76.Get(index76));
 //BA.debugLineNum = 582;BA.debugLine="If invDispPromo.ContainsKey(p) Then 'Si no esta";
if (_invdisppromo.ContainsKey((Object)(_p))) { 
 //BA.debugLineNum = 583;BA.debugLine="Private indicePV = listaPV.IndexOf(p)";
_indicepv = BA.NumberToString(_listapv.IndexOf((Object)(_p)));
 //BA.debugLineNum = 585;BA.debugLine="Private estePrecio = listaPreciosPV.Get(indiceP";
_esteprecio = BA.ObjectToString(_listapreciospv.Get((int)(Double.parseDouble(_indicepv))));
 //BA.debugLineNum = 590;BA.debugLine="Private thisProd As Map = prodsPromo.Get(p)";
_thisprod = new anywheresoftware.b4a.objects.collections.Map();
_thisprod = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(_prodspromo.Get((Object)(_p))));
 //BA.debugLineNum = 591;BA.debugLine="If thisLog Then Log(thisProd)";
if (_thislog) { 
__c.LogImpl("442860653",BA.ObjectToString(_thisprod),0);};
 //BA.debugLineNum = 592;BA.debugLine="clv_prodsVariabes.Add(CreateListItem(Subs.traeP";
_clv_prodsvariabes._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_createlistitem(_subs._traeprodnombre /*String*/ (ba,_p)+__c.CRLF+"Hay "+BA.ObjectToString(_invdisppromo.Get((Object)(_p)))+" $"+_esteprecio,_esteprecio,(int)(BA.ObjectToNumber(_invdisppromo.Get((Object)(_p)))),_clv_prodsvariabes._asview().getWidth(),__c.DipToCurrent((int) (50)),(anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper(), (android.graphics.Bitmap)(__c.Null)),_p).getObject())),(Object)(_p));
 };
 }
};
 //BA.debugLineNum = 596;BA.debugLine="For Each p As String In pv2";
{
final anywheresoftware.b4a.BA.IterableList group85 = _pv2;
final int groupLen85 = group85.getSize()
;int index85 = 0;
;
for (; index85 < groupLen85;index85++){
_p = BA.ObjectToString(group85.Get(index85));
 //BA.debugLineNum = 597;BA.debugLine="If invDispPromo.ContainsKey(p) Then 'Si no esta";
if (_invdisppromo.ContainsKey((Object)(_p))) { 
 //BA.debugLineNum = 602;BA.debugLine="Private indicePV2 = listaPV2.IndexOf(p)";
_indicepv2 = BA.NumberToString(_listapv2.IndexOf((Object)(_p)));
 //BA.debugLineNum = 605;BA.debugLine="Private estePrecio = listaPreciosPV2.Get(indice";
_esteprecio = BA.ObjectToString(_listapreciospv2.Get((int)(Double.parseDouble(_indicepv2))));
 //BA.debugLineNum = 610;BA.debugLine="Private thisProd As Map = prodsPromo.Get(p)";
_thisprod = new anywheresoftware.b4a.objects.collections.Map();
_thisprod = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(_prodspromo.Get((Object)(_p))));
 //BA.debugLineNum = 611;BA.debugLine="If thisLog Then Log(thisProd)";
if (_thislog) { 
__c.LogImpl("442860673",BA.ObjectToString(_thisprod),0);};
 //BA.debugLineNum = 612;BA.debugLine="clv_prodsVariabes2.Add(CreateListItem2(Subs.tra";
_clv_prodsvariabes2._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_createlistitem2(_subs._traeprodnombre /*String*/ (ba,_p)+__c.CRLF+"Hay "+BA.ObjectToString(_invdisppromo.Get((Object)(_p)))+" $"+_esteprecio,_esteprecio,(int)(BA.ObjectToNumber(_invdisppromo.Get((Object)(_p)))),_clv_prodsvariabes2._asview().getWidth(),__c.DipToCurrent((int) (50)),(anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper(), (android.graphics.Bitmap)(__c.Null)),_p).getObject())),(Object)(_p));
 };
 }
};
 //BA.debugLineNum = 615;BA.debugLine="If pv2.Size = 0 Then";
if (_pv2.getSize()==0) { 
 //BA.debugLineNum = 617;BA.debugLine="l_prodsVariables2.Visible = False";
_l_prodsvariables2.setVisible(__c.False);
 //BA.debugLineNum = 618;BA.debugLine="p_prodsVariables2.Visible = False";
_p_prodsvariables2.setVisible(__c.False);
 //BA.debugLineNum = 620;BA.debugLine="p_prodsVariables.Height = 410dip";
_p_prodsvariables.setHeight(__c.DipToCurrent((int) (410)));
 //BA.debugLineNum = 621;BA.debugLine="clv_prodsVariabes.GetBase.Height = p_prodsVariab";
_clv_prodsvariabes._getbase().setHeight((int) (_p_prodsvariables.getHeight()-20));
 //BA.debugLineNum = 625;BA.debugLine="clv_prodsVariabes.Base_Resize(clv_prodsVariabes.";
_clv_prodsvariabes._base_resize(_clv_prodsvariabes._getbase().getWidth(),_p_prodsvariables.getHeight()-20);
 }else {
 //BA.debugLineNum = 627;BA.debugLine="l_prodsVariables2.Visible = True";
_l_prodsvariables2.setVisible(__c.True);
 //BA.debugLineNum = 628;BA.debugLine="p_prodsVariables2.Visible = True";
_p_prodsvariables2.setVisible(__c.True);
 //BA.debugLineNum = 629;BA.debugLine="p_prodsVariables.Height = 210dip";
_p_prodsvariables.setHeight(__c.DipToCurrent((int) (210)));
 //BA.debugLineNum = 630;BA.debugLine="clv_prodsVariabes.GetBase.Height = p_prodsVariab";
_clv_prodsvariabes._getbase().setHeight((int) (_p_prodsvariables.getHeight()-20));
 };
 //BA.debugLineNum = 632;BA.debugLine="b_terminar1.Visible = False";
_b_terminar1.setVisible(__c.False);
 //BA.debugLineNum = 633;BA.debugLine="b_continuar.Visible = False";
_b_continuar.setVisible(__c.False);
 //BA.debugLineNum = 634;BA.debugLine="cuentaProds";
_cuentaprods();
 //BA.debugLineNum = 635;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
if (BA.fastSubCompare(sub, "B4XPAGE_CREATED"))
	return _b4xpage_created((anywheresoftware.b4a.objects.B4XViewWrapper) args[0]);
return BA.SubDelegator.SubNotFound;
}
}
