package medicomed.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 htSubs; private void innerInitialize(BA _ba) throws Exception { if (ba == null) { ba = new BA(_ba, this, htSubs, "medicomed.keymon.com.mx.c_promos"); if (htSubs == null) { ba.loadHtSubs(this.getClass()); htSubs = ba.htSubs; } } if (BA.isShellModeRuntimeCheck(ba)) this.getClass().getMethod("_class_globals", medicomed.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 medicomed.keymon.com.mx.main _main = null; public medicomed.keymon.com.mx.starter _starter = null; public medicomed.keymon.com.mx.appupdater _appupdater = null; public medicomed.keymon.com.mx.mapa_rutas _mapa_rutas = null; public medicomed.keymon.com.mx.mapa_cliente _mapa_cliente = null; public medicomed.keymon.com.mx.notificationservice _notificationservice = null; public medicomed.keymon.com.mx.pendientes _pendientes = null; public medicomed.keymon.com.mx.subs _subs = null; public medicomed.keymon.com.mx.tracker _tracker = null; public medicomed.keymon.com.mx.newinst2 _newinst2 = null; public medicomed.keymon.com.mx.b4xpages _b4xpages = null; public medicomed.keymon.com.mx.b4xcollections _b4xcollections = null; public medicomed.keymon.com.mx.httputils2service _httputils2service = null; public medicomed.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 = 216;BA.debugLine="Sub agregaFijosALista(mp As Map, addListItem As Bo"; //BA.debugLineNum = 217;BA.debugLine="Private thisLog As Boolean = False"; _thislog = __c.False; //BA.debugLineNum = 218;BA.debugLine="Private cont As Int = 0"; _cont = (int) (0); //BA.debugLineNum = 219;BA.debugLine="prodsFijosTot = 0"; _prodsfijostot = (float) (0); //BA.debugLineNum = 220;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 = 221;BA.debugLine="If pf.Size < 1 Then pf.Add(\"Sin productos fijos.\""; if (_pf.getSize()<1) { _pf.Add((Object)("Sin productos fijos."));}; //BA.debugLineNum = 225;BA.debugLine="prodsIds.clear"; _prodsids.Clear(); //BA.debugLineNum = 226;BA.debugLine="prodsCants.clear"; _prodscants.Clear(); //BA.debugLineNum = 227;BA.debugLine="prodsPrecios.clear"; _prodsprecios.Clear(); //BA.debugLineNum = 228;BA.debugLine="prodsIds.Add(estaPromo)"; _prodsids.Add((Object)(_estapromo)); //BA.debugLineNum = 229;BA.debugLine="prodsCants.Add(et_promoCant.text.As(Int))"; _prodscants.Add((Object)(((int)(Double.parseDouble(_et_promocant.getText()))))); //BA.debugLineNum = 230;BA.debugLine="prodsPrecios.Add(0)"; _prodsprecios.Add((Object)(0)); //BA.debugLineNum = 231;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 = 233;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 = 234;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 = 236;BA.debugLine="Private tpi As String = 0"; _tpi = BA.NumberToString(0); }; //BA.debugLineNum = 238;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 = 239;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 = 241;BA.debugLine="Private tpr As String = 0"; _tpr = BA.NumberToString(0); }; //BA.debugLineNum = 243;BA.debugLine="prodsFijosTot = prodsFijosTot + (tpi * tpr)"; _prodsfijostot = (float) (_prodsfijostot+((double)(Double.parseDouble(_tpi))*(double)(Double.parseDouble(_tpr)))); //BA.debugLineNum = 244;BA.debugLine="If thisLog Then Log(\"|\"&tpi&\"|\"&p)"; if (_thislog) { __c.LogImpl("522020124","|"+_tpi+"|"+_p,0);}; //BA.debugLineNum = 245;BA.debugLine="Private ntpi As Int = tpi * et_promoCant.text"; _ntpi = (int) ((double)(Double.parseDouble(_tpi))*(double)(Double.parseDouble(_et_promocant.getText()))); //BA.debugLineNum = 246;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 = 247;BA.debugLine="cont = cont+1"; _cont = (int) (_cont+1); //BA.debugLineNum = 250;BA.debugLine="prodsIds.Add(p)"; _prodsids.Add((Object)(_p)); //BA.debugLineNum = 251;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 = 252;BA.debugLine="prodsPrecios.Add(tpr) '*et_promoCant.text.As(Int"; _prodsprecios.Add((Object)(_tpr)); } }; //BA.debugLineNum = 254;BA.debugLine="End Sub"; return ""; } public String _b_continuar_click() throws Exception{ int _t = 0; String _pn = ""; medicomed.keymon.com.mx.c_productos _prodspage = null; //BA.debugLineNum = 556;BA.debugLine="Private Sub b_continuar_Click"; //BA.debugLineNum = 557;BA.debugLine="cuentaProds"; _cuentaprods(); //BA.debugLineNum = 558;BA.debugLine="Log(\"============================================"; __c.LogImpl("522872066","====================================================================",0); //BA.debugLineNum = 559;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 = 560;BA.debugLine="Private pn As String = Subs.traeProdNombre(prods"; _pn = _subs._traeprodnombre /*String*/ (ba,BA.ObjectToString(_prodsids.Get(_t))); //BA.debugLineNum = 561;BA.debugLine="Subs.guardaProductoSinGestion(estaPromo, prodsPr"; _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,_subs._traecliente /*String*/ (ba)),BA.NumberToString(0),_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,BA.NumberToString(0),BA.NumberToString(0)); } }; //BA.debugLineNum = 563;BA.debugLine="For t = 0 To prodsIds2.Size - 1 'Guardamos los pr"; { final int step7 = 1; final int limit7 = (int) (_prodsids2.getSize()-1); _t = (int) (0) ; for (;_t <= limit7 ;_t = _t + step7 ) { //BA.debugLineNum = 564;BA.debugLine="Private pn As String = Subs.traeProdNombre(prods"; _pn = _subs._traeprodnombre /*String*/ (ba,BA.ObjectToString(_prodsids2.Get(_t))); //BA.debugLineNum = 565;BA.debugLine="Subs.guardaProductoSinGestion(estaPromo, prodsPr"; _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,_subs._traecliente /*String*/ (ba)),BA.NumberToString(0),_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,BA.NumberToString(0),BA.NumberToString(0)); } }; //BA.debugLineNum = 579;BA.debugLine="lv_prodsFijos.Clear"; _lv_prodsfijos.Clear(); //BA.debugLineNum = 582;BA.debugLine="Private prodspage As C_Productos"; _prodspage = new medicomed.keymon.com.mx.c_productos(); //BA.debugLineNum = 583;BA.debugLine="If prodspage.IsInitialized Then"; if (_prodspage.IsInitialized /*boolean*/ ()) { //BA.debugLineNum = 584;BA.debugLine="prodspage.lv_catalogos.Visible = True"; _prodspage._lv_catalogos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.True); //BA.debugLineNum = 585;BA.debugLine="prodspage.lv_promos.Visible = False"; _prodspage._lv_promos /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setVisible(__c.False); //BA.debugLineNum = 586;BA.debugLine="prodspage.clv_productos.AsView.Visible = False"; _prodspage._clv_productos /*b4a.example3.customlistview*/ ._asview().setVisible(__c.False); }; //BA.debugLineNum = 588;BA.debugLine="B4XPages.MainPage.bTerminarClicked = True"; _b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._bterminarclicked /*boolean*/ = __c.True; //BA.debugLineNum = 589;BA.debugLine="B4XPages.ShowPage(\"productos\")"; _b4xpages._showpage /*String*/ (ba,"productos"); //BA.debugLineNum = 590;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 = 321;BA.debugLine="Sub b_prodMas_Click"; //BA.debugLineNum = 322;BA.debugLine="If prodsVar1 < prodsVarReq Then"; if (_prodsvar1<_prodsvarreq) { //BA.debugLineNum = 323;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 = 324;BA.debugLine="Dim pnl0 As B4XView = clv_prodsVariabes.GetPanel"; _pnl0 = new anywheresoftware.b4a.objects.B4XViewWrapper(); _pnl0 = _clv_prodsvariabes._getpanel(_index); //BA.debugLineNum = 325;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)"; _pnl = new anywheresoftware.b4a.objects.B4XViewWrapper(); _pnl = _pnl0.GetView((int) (0)); //BA.debugLineNum = 327;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 = 330;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 = 332;BA.debugLine="Log(esteTag)"; __c.LogImpl("522282251",BA.ObjectToString(_estetag),0); //BA.debugLineNum = 333;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 = 334;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 = 335;BA.debugLine="cuentaProds"; _cuentaprods(); }; //BA.debugLineNum = 339;BA.debugLine="Private precio As String = Regex.Split(\"\\|\", laC"; _precio = __c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag()))[(int) (0)]; //BA.debugLineNum = 341;BA.debugLine="Private prodId As String = Regex.Split(\"\\|\", laC"; _prodid = __c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag()))[(int) (2)]; //BA.debugLineNum = 342;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 = 344;BA.debugLine="promosMap.Put(prodId, tmpMap)"; _promosmap.Put((Object)(_prodid),(Object)(_tmpmap.getObject())); }; //BA.debugLineNum = 350;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 = 376;BA.debugLine="Sub b_prodMas2_Click"; //BA.debugLineNum = 378;BA.debugLine="If prodsVar2 < prodsVarReq2 Then"; if (_prodsvar2<_prodsvarreq2) { //BA.debugLineNum = 379;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 = 380;BA.debugLine="Dim pnl0 As B4XView = clv_prodsVariabes2.GetPane"; _pnl0 = new anywheresoftware.b4a.objects.B4XViewWrapper(); _pnl0 = _clv_prodsvariabes2._getpanel(_index); //BA.debugLineNum = 381;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)"; _pnl = new anywheresoftware.b4a.objects.B4XViewWrapper(); _pnl = _pnl0.GetView((int) (0)); //BA.debugLineNum = 383;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 = 386;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 = 388;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 = 389;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 = 390;BA.debugLine="cuentaProds"; _cuentaprods(); }; //BA.debugLineNum = 394;BA.debugLine="Private precio As String = Regex.Split(\"\\|\", laC"; _precio = __c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag()))[(int) (0)]; //BA.debugLineNum = 396;BA.debugLine="Private prodId As String = Regex.Split(\"\\|\", laC"; _prodid = __c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag()))[(int) (2)]; //BA.debugLineNum = 397;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 = 399;BA.debugLine="promosMap.Put(prodId, tmpMap)"; _promosmap.Put((Object)(_prodid),(Object)(_tmpmap.getObject())); }; //BA.debugLineNum = 405;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 = 297;BA.debugLine="Sub b_prodMenos_Click"; //BA.debugLineNum = 298;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 = 299;BA.debugLine="Dim pnl0 As B4XView = clv_prodsVariabes.GetPanel("; _pnl0 = new anywheresoftware.b4a.objects.B4XViewWrapper(); _pnl0 = _clv_prodsvariabes._getpanel(_index); //BA.debugLineNum = 300;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)"; _pnl = new anywheresoftware.b4a.objects.B4XViewWrapper(); _pnl = _pnl0.GetView((int) (0)); //BA.debugLineNum = 302;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 = 304;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 = 305;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0"; if ((double)(Double.parseDouble(_lacant.getText()))<0) { _lacant.setText(BA.ObjectToCharSequence(0));}; //BA.debugLineNum = 308;BA.debugLine="Private precio As String = Regex.Split(\"\\|\", laCa"; _precio = __c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag()))[(int) (0)]; //BA.debugLineNum = 310;BA.debugLine="Private prodId As String = Regex.Split(\"\\|\", laCa"; _prodid = __c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag()))[(int) (2)]; //BA.debugLineNum = 311;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 = 313;BA.debugLine="promosMap.Put(prodId, tmpMap)"; _promosmap.Put((Object)(_prodid),(Object)(_tmpmap.getObject())); //BA.debugLineNum = 314;BA.debugLine="If laCant.Text = 0 Then promosMap.Remove(prodId)"; if ((_lacant.getText()).equals(BA.NumberToString(0))) { _promosmap.Remove((Object)(_prodid));}; //BA.debugLineNum = 316;BA.debugLine="cuentaProds"; _cuentaprods(); //BA.debugLineNum = 319;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 = 352;BA.debugLine="Sub b_prodMenos2_Click"; //BA.debugLineNum = 353;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 = 354;BA.debugLine="Dim pnl0 As B4XView = clv_prodsVariabes2.GetPanel"; _pnl0 = new anywheresoftware.b4a.objects.B4XViewWrapper(); _pnl0 = _clv_prodsvariabes2._getpanel(_index); //BA.debugLineNum = 355;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)"; _pnl = new anywheresoftware.b4a.objects.B4XViewWrapper(); _pnl = _pnl0.GetView((int) (0)); //BA.debugLineNum = 357;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 = 359;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 = 360;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0"; if ((double)(Double.parseDouble(_lacant.getText()))<0) { _lacant.setText(BA.ObjectToCharSequence(0));}; //BA.debugLineNum = 363;BA.debugLine="Private precio As String = Regex.Split(\"\\|\", laCa"; _precio = __c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag()))[(int) (0)]; //BA.debugLineNum = 365;BA.debugLine="Private prodId As String = Regex.Split(\"\\|\", laCa"; _prodid = __c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag()))[(int) (2)]; //BA.debugLineNum = 366;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 = 368;BA.debugLine="promosMap.Put(prodId, tmpMap)"; _promosmap.Put((Object)(_prodid),(Object)(_tmpmap.getObject())); //BA.debugLineNum = 369;BA.debugLine="If laCant.Text = 0 Then promosMap.Remove(prodId)"; if ((_lacant.getText()).equals(BA.NumberToString(0))) { _promosmap.Remove((Object)(_prodid));}; //BA.debugLineNum = 371;BA.debugLine="cuentaProds"; _cuentaprods(); //BA.debugLineNum = 374;BA.debugLine="End Sub"; return ""; } public String _b_promomas_click() throws Exception{ //BA.debugLineNum = 512;BA.debugLine="Private Sub b_promoMas_Click"; //BA.debugLineNum = 513;BA.debugLine="If et_promoCant.Text < maxCantPromos Then"; if ((double)(Double.parseDouble(_et_promocant.getText()))<_maxcantpromos) { //BA.debugLineNum = 514;BA.debugLine="et_promoCant.Text = et_promoCant.Text.As(Int) +"; _et_promocant.setText(BA.ObjectToCharSequence(((int)(Double.parseDouble(_et_promocant.getText())))+1)); //BA.debugLineNum = 515;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 = 516;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 = 517;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 = 518;BA.debugLine="tpf = tpf2 * et_promoCant.Text.As(Int)"; _tpf = (int) (_tpf2*((int)(Double.parseDouble(_et_promocant.getText())))); //BA.debugLineNum = 519;BA.debugLine="prodsVarReq = prodsVarReq_ * et_promoCant.Text.A"; _prodsvarreq = (int) (_prodsvarreq_*((int)(Double.parseDouble(_et_promocant.getText())))); //BA.debugLineNum = 520;BA.debugLine="prodsVarReq2 = prodsVarReq2_ * et_promoCant.Text"; _prodsvarreq2 = (int) (_prodsvarreq2_*((int)(Double.parseDouble(_et_promocant.getText())))); //BA.debugLineNum = 521;BA.debugLine="Log($\"Max promos=${et_promoCant.Text.As(Int)}, P"; __c.LogImpl("522741001",("Max promos="+__c.SmartStringFormatter("",(Object)(((int)(Double.parseDouble(_et_promocant.getText())))))+", Prods fijos="+__c.SmartStringFormatter("",(Object)(_tpf))+", "),0); }; //BA.debugLineNum = 523;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 = 524;BA.debugLine="cuentaProds"; _cuentaprods(); //BA.debugLineNum = 525;BA.debugLine="End Sub"; return ""; } public String _b_promomenos_click() throws Exception{ //BA.debugLineNum = 498;BA.debugLine="Private Sub b_promoMenos_Click"; //BA.debugLineNum = 499;BA.debugLine="If et_promoCant.Text > 1 Then"; if ((double)(Double.parseDouble(_et_promocant.getText()))>1) { //BA.debugLineNum = 500;BA.debugLine="et_promoCant.Text = et_promoCant.Text.As(Int) -"; _et_promocant.setText(BA.ObjectToCharSequence(((int)(Double.parseDouble(_et_promocant.getText())))-1)); }; //BA.debugLineNum = 502;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 = 503;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 = 504;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 = 505;BA.debugLine="tpf = tpf2 * et_promoCant.Text.As(Int)"; _tpf = (int) (_tpf2*((int)(Double.parseDouble(_et_promocant.getText())))); //BA.debugLineNum = 506;BA.debugLine="prodsVarReq = prodsVarReq_ * et_promoCant.Text.As"; _prodsvarreq = (int) (_prodsvarreq_*((int)(Double.parseDouble(_et_promocant.getText())))); //BA.debugLineNum = 507;BA.debugLine="prodsVarReq2 = prodsVarReq2_ * et_promoCant.Text."; _prodsvarreq2 = (int) (_prodsvarreq2_*((int)(Double.parseDouble(_et_promocant.getText())))); //BA.debugLineNum = 508;BA.debugLine="Log($\"Max promos=${et_promoCant.Text.As(Int)}, Pr"; __c.LogImpl("522675466",("Max promos="+__c.SmartStringFormatter("",(Object)(((int)(Double.parseDouble(_et_promocant.getText())))))+", Prods fijos="+__c.SmartStringFormatter("",(Object)(_tpf))+", "),0); //BA.debugLineNum = 509;BA.debugLine="cuentaProds"; _cuentaprods(); //BA.debugLineNum = 510;BA.debugLine="End Sub"; return ""; } public String _b_terminar1_click() throws Exception{ int _t = 0; String _pn = ""; //BA.debugLineNum = 527;BA.debugLine="Private Sub b_terminar1_Click"; //BA.debugLineNum = 528;BA.debugLine="cuentaProds"; _cuentaprods(); //BA.debugLineNum = 529;BA.debugLine="Log(\"============================================"; __c.LogImpl("522806530","====================================================================",0); //BA.debugLineNum = 530;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 = 531;BA.debugLine="Private pn As String = Subs.traeProdNombre(prods"; _pn = _subs._traeprodnombre /*String*/ (ba,BA.ObjectToString(_prodsids.Get(_t))); //BA.debugLineNum = 532;BA.debugLine="If prodsCants.Get(t) > 0 Then Subs.guardaProduct"; if ((double)(BA.ObjectToNumber(_prodscants.Get(_t)))>0) { _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,_subs._traecliente /*String*/ (ba)),BA.NumberToString(0),_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,BA.NumberToString(0),BA.NumberToString(0));}; } }; //BA.debugLineNum = 534;BA.debugLine="For t = 0 To prodsIds2.Size - 1 'Guardamos los pr"; { final int step7 = 1; final int limit7 = (int) (_prodsids2.getSize()-1); _t = (int) (0) ; for (;_t <= limit7 ;_t = _t + step7 ) { //BA.debugLineNum = 535;BA.debugLine="Private pn As String = Subs.traeProdNombre(prods"; _pn = _subs._traeprodnombre /*String*/ (ba,BA.ObjectToString(_prodsids2.Get(_t))); //BA.debugLineNum = 536;BA.debugLine="Subs.guardaProductoSinGestion(estaPromo, prodsPr"; _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,_subs._traecliente /*String*/ (ba)),BA.NumberToString(0),_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ ,BA.NumberToString(0),BA.NumberToString(0)); } }; //BA.debugLineNum = 550;BA.debugLine="lv_prodsFijos.Clear"; _lv_prodsfijos.Clear(); //BA.debugLineNum = 551;BA.debugLine="B4XPages.MainPage.bTerminarClicked = True"; _b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._bterminarclicked /*boolean*/ = __c.True; //BA.debugLineNum = 552;BA.debugLine="B4XPages.ShowPage(\"productos\")"; _b4xpages._showpage /*String*/ (ba,"productos"); //BA.debugLineNum = 553;BA.debugLine="B4XPages.MainPage.productos.b_terminar1_Click"; _b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._productos /*medicomed.keymon.com.mx.c_productos*/ ._b_terminar1_click /*String*/ (); //BA.debugLineNum = 554;BA.debugLine="End Sub"; return ""; } public String _b4xpage_appear() throws Exception{ anywheresoftware.b4a.objects.collections.Map _m = null; //BA.debugLineNum = 68;BA.debugLine="Sub B4XPage_Appear"; //BA.debugLineNum = 70;BA.debugLine="prodsIds.Initialize"; _prodsids.Initialize(); //BA.debugLineNum = 71;BA.debugLine="prodsCants.Initialize"; _prodscants.Initialize(); //BA.debugLineNum = 72;BA.debugLine="prodsPrecios.Initialize"; _prodsprecios.Initialize(); //BA.debugLineNum = 73;BA.debugLine="prodsIds2.Initialize"; _prodsids2.Initialize(); //BA.debugLineNum = 74;BA.debugLine="prodsCants2.Initialize"; _prodscants2.Initialize(); //BA.debugLineNum = 75;BA.debugLine="prodsPrecios2.Initialize"; _prodsprecios2.Initialize(); //BA.debugLineNum = 76;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 = 77;BA.debugLine="prodsPedidoActual = m.Get(\"productos\")"; _prodspedidoactual = BA.ObjectToString(_m.Get((Object)("productos"))); //BA.debugLineNum = 78;BA.debugLine="montoPedidoActual = m.Get(\"monto\")"; _montopedidoactual = BA.ObjectToString(_m.Get((Object)("monto"))); //BA.debugLineNum = 80;BA.debugLine="If laPromo <> \"\" Then muestraPromo(laPromo, elCli"; if ((_lapromo).equals("") == false) { _muestrapromo(_lapromo,_elcliente);}; //BA.debugLineNum = 81;BA.debugLine="End Sub"; return ""; } public String _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{ //BA.debugLineNum = 53;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)"; //BA.debugLineNum = 54;BA.debugLine="Root = Root1"; _root = _root1; //BA.debugLineNum = 56;BA.debugLine="Root.LoadLayout(\"promociones\")"; _root.LoadLayout("promociones",ba); //BA.debugLineNum = 58;BA.debugLine="p_promociones.Height= Root.Height"; _p_promociones.setHeight(_root.getHeight()); //BA.debugLineNum = 59;BA.debugLine="p_promociones.Width= Root.Width"; _p_promociones.setWidth(_root.getWidth()); //BA.debugLineNum = 61;BA.debugLine="promosMap.Initialize"; _promosmap.Initialize(); //BA.debugLineNum = 62;BA.debugLine="p_promociones.Top=0"; _p_promociones.setTop((int) (0)); //BA.debugLineNum = 63;BA.debugLine="p_promociones.Left=0"; _p_promociones.setLeft((int) (0)); //BA.debugLineNum = 64;BA.debugLine="b_terminar1.Left = Root.Width - (b_terminar1.Widt"; _b_terminar1.setLeft((int) (_root.getWidth()-(_b_terminar1.getWidth()+10))); //BA.debugLineNum = 65;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 = 66;BA.debugLine="End Sub"; return ""; } public String _class_globals() throws Exception{ //BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals"; //BA.debugLineNum = 2;BA.debugLine="Private Root As B4XView 'ignore"; _root = new anywheresoftware.b4a.objects.B4XViewWrapper(); //BA.debugLineNum = 3;BA.debugLine="Private xui As XUI"; _xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI(); //BA.debugLineNum = 4;BA.debugLine="Private l_promoDesc As Label"; _l_promodesc = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 5;BA.debugLine="Private lv_prodsFijos As ListView"; _lv_prodsfijos = new anywheresoftware.b4a.objects.ListViewWrapper(); //BA.debugLineNum = 6;BA.debugLine="Private clv_prodsVariabes, clv_prodsVariabes2 As"; _clv_prodsvariabes = new b4a.example3.customlistview(); _clv_prodsvariabes2 = new b4a.example3.customlistview(); //BA.debugLineNum = 7;BA.debugLine="Private l_prodsFijos As Label"; _l_prodsfijos = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 8;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 = 9;BA.debugLine="Private i_prod As ImageView"; _i_prod = new anywheresoftware.b4a.objects.ImageViewWrapper(); //BA.debugLineNum = 10;BA.debugLine="Private l_prodX As Label"; _l_prodx = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 11;BA.debugLine="Private p_prods As Panel"; _p_prods = new anywheresoftware.b4a.objects.PanelWrapper(); //BA.debugLineNum = 12;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 = 13;BA.debugLine="Private et_pCant As EditText"; _et_pcant = new anywheresoftware.b4a.objects.EditTextWrapper(); //BA.debugLineNum = 14;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 = 15;BA.debugLine="Private l_pCant As Label"; _l_pcant = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 16;BA.debugLine="Dim totalProds As Int = 0"; _totalprods = (int) (0); //BA.debugLineNum = 17;BA.debugLine="Dim prodsVar1 As Int = 0"; _prodsvar1 = (int) (0); //BA.debugLineNum = 18;BA.debugLine="Dim prodsVar2 As Int = 0"; _prodsvar2 = (int) (0); //BA.debugLineNum = 19;BA.debugLine="Dim prodsVarReq As Int = 0"; _prodsvarreq = (int) (0); //BA.debugLineNum = 20;BA.debugLine="Dim prodsVarReq_ As Int = 0"; _prodsvarreq_ = (int) (0); //BA.debugLineNum = 21;BA.debugLine="Dim prodsVarReq2 As Int = 0"; _prodsvarreq2 = (int) (0); //BA.debugLineNum = 22;BA.debugLine="Dim prodsVarReq2_ As Int = 0"; _prodsvarreq2_ = (int) (0); //BA.debugLineNum = 23;BA.debugLine="Dim totalCompra As Float = 0"; _totalcompra = (float) (0); //BA.debugLineNum = 24;BA.debugLine="Dim prodsFijosTot As Float = 0"; _prodsfijostot = (float) (0); //BA.debugLineNum = 25;BA.debugLine="Dim tpf As Int = 0"; _tpf = (int) (0); //BA.debugLineNum = 26;BA.debugLine="Dim tpf2 As Int = 0"; _tpf2 = (int) (0); //BA.debugLineNum = 27;BA.debugLine="Dim maxCantPromos As Int = 1"; _maxcantpromos = (int) (1); //BA.debugLineNum = 28;BA.debugLine="Private l_totProds As Label"; _l_totprods = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 29;BA.debugLine="Private l_total As Label"; _l_total = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 30;BA.debugLine="Private b_terminar1 As Button"; _b_terminar1 = new anywheresoftware.b4a.objects.ButtonWrapper(); //BA.debugLineNum = 31;BA.debugLine="Private p_promociones As Panel"; _p_promociones = new anywheresoftware.b4a.objects.PanelWrapper(); //BA.debugLineNum = 32;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 = 33;BA.debugLine="Dim estaPromo, esteCliente As String"; _estapromo = ""; _estecliente = ""; //BA.debugLineNum = 34;BA.debugLine="Private b_promoMas As Button"; _b_promomas = new anywheresoftware.b4a.objects.ButtonWrapper(); //BA.debugLineNum = 35;BA.debugLine="Private b_promoMenos As Button"; _b_promomenos = new anywheresoftware.b4a.objects.ButtonWrapper(); //BA.debugLineNum = 36;BA.debugLine="Private et_promoCant As EditText"; _et_promocant = new anywheresoftware.b4a.objects.EditTextWrapper(); //BA.debugLineNum = 37;BA.debugLine="Private l_promosCant As Label"; _l_promoscant = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 38;BA.debugLine="Private b_continuar As Button"; _b_continuar = new anywheresoftware.b4a.objects.ButtonWrapper(); //BA.debugLineNum = 39;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 = 40;BA.debugLine="Dim laPromo = \"\", elCliente = \"\" As String"; _lapromo = ""; _elcliente = ""; //BA.debugLineNum = 41;BA.debugLine="Dim prodsPedidoActual As String"; _prodspedidoactual = ""; //BA.debugLineNum = 42;BA.debugLine="Dim montoPedidoActual As String"; _montopedidoactual = ""; //BA.debugLineNum = 43;BA.debugLine="Dim promosMap As Map"; _promosmap = new anywheresoftware.b4a.objects.collections.Map(); //BA.debugLineNum = 44;BA.debugLine="Dim su As StringUtils"; _su = new anywheresoftware.b4a.objects.StringUtils(); //BA.debugLineNum = 45;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 = 256;BA.debugLine="Sub CreateListItem(Text As String, precioU As Stri"; //BA.debugLineNum = 257;BA.debugLine="Dim p As B4XView = xui.CreatePanel(\"\")"; _p = new anywheresoftware.b4a.objects.B4XViewWrapper(); _p = _xui.CreatePanel(ba,""); //BA.debugLineNum = 258;BA.debugLine="p.SetLayoutAnimated(0, 0, 0, Width, Height)"; _p.SetLayoutAnimated((int) (0),(int) (0),(int) (0),_width,_height); //BA.debugLineNum = 259;BA.debugLine="p.LoadLayout(\"prodItem1\")"; _p.LoadLayout("prodItem1",ba); //BA.debugLineNum = 260;BA.debugLine="l_prodX.TextSize = 15"; _l_prodx.setTextSize((float) (15)); //BA.debugLineNum = 261;BA.debugLine="l_prodX.Text = Text"; _l_prodx.setText(BA.ObjectToCharSequence(_text)); //BA.debugLineNum = 262;BA.debugLine="l_prodX.TextSize = 15"; _l_prodx.setTextSize((float) (15)); //BA.debugLineNum = 265;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 = 266;BA.debugLine="If p_prods.Height < Height Then p_prods.Height ="; if (_p_prods.getHeight()<_height) { _p_prods.setHeight(_height);}; //BA.debugLineNum = 267;BA.debugLine="l_prodX.Height = p_prods.Height"; _l_prodx.setHeight(_p_prods.getHeight()); //BA.debugLineNum = 269;BA.debugLine="et_pCant.Tag = precioU&\"|\"&inv&\"|\"&prodId"; _et_pcant.setTag((Object)(_preciou+"|"+BA.NumberToString(_inv)+"|"+_prodid)); //BA.debugLineNum = 270;BA.debugLine="et_pCant.BringToFront"; _et_pcant.BringToFront(); //BA.debugLineNum = 272;BA.debugLine="p.Height = p_prods.Height"; _p.setHeight(_p_prods.getHeight()); //BA.debugLineNum = 273;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 = 274;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 = 276;BA.debugLine="Sub CreateListItem2(Text As String, precioU As Str"; //BA.debugLineNum = 277;BA.debugLine="Dim p As B4XView = xui.CreatePanel(\"\")"; _p = new anywheresoftware.b4a.objects.B4XViewWrapper(); _p = _xui.CreatePanel(ba,""); //BA.debugLineNum = 278;BA.debugLine="p.SetLayoutAnimated(0, 0, 0, Width, Height)"; _p.SetLayoutAnimated((int) (0),(int) (0),(int) (0),_width,_height); //BA.debugLineNum = 279;BA.debugLine="p.LoadLayout(\"prodItem2\")"; _p.LoadLayout("prodItem2",ba); //BA.debugLineNum = 280;BA.debugLine="l_prodX.TextSize = 15"; _l_prodx.setTextSize((float) (15)); //BA.debugLineNum = 281;BA.debugLine="l_prodX.Text = Text"; _l_prodx.setText(BA.ObjectToCharSequence(_text)); //BA.debugLineNum = 282;BA.debugLine="l_prodX.TextSize = 15"; _l_prodx.setTextSize((float) (15)); //BA.debugLineNum = 285;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 = 286;BA.debugLine="If p_prods.Height < Height Then p_prods.Height ="; if (_p_prods.getHeight()<_height) { _p_prods.setHeight(_height);}; //BA.debugLineNum = 287;BA.debugLine="l_prodX.Height = p_prods.Height"; _l_prodx.setHeight(_p_prods.getHeight()); //BA.debugLineNum = 290;BA.debugLine="et_pCant.Tag = precioU&\"|\"&inv&\"|\"&prodId"; _et_pcant.setTag((Object)(_preciou+"|"+BA.NumberToString(_inv)+"|"+_prodid)); //BA.debugLineNum = 291;BA.debugLine="et_pCant.BringToFront"; _et_pcant.BringToFront(); //BA.debugLineNum = 293;BA.debugLine="p.Height = p_prods.Height"; _p.setHeight(_p_prods.getHeight()); //BA.debugLineNum = 294;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 = 295;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 = 413;BA.debugLine="Sub cuentaProds"; //BA.debugLineNum = 416;BA.debugLine="Private thisLog As Boolean = False"; _thislog = __c.False; //BA.debugLineNum = 418;BA.debugLine="prodsIds2.Clear"; _prodsids2.Clear(); //BA.debugLineNum = 419;BA.debugLine="prodsCants2.Clear"; _prodscants2.Clear(); //BA.debugLineNum = 420;BA.debugLine="prodsPrecios2.Clear"; _prodsprecios2.Clear(); //BA.debugLineNum = 421;BA.debugLine="lv_prodsFijos.Clear"; _lv_prodsfijos.Clear(); //BA.debugLineNum = 422;BA.debugLine="prodsVar1 = 0"; _prodsvar1 = (int) (0); //BA.debugLineNum = 423;BA.debugLine="prodsVar2 = 0"; _prodsvar2 = (int) (0); //BA.debugLineNum = 424;BA.debugLine="agregaFijosALista(Subs.traePromo(estaPromo, esteC"; _agregafijosalista(_subs._traepromo /*anywheresoftware.b4a.objects.collections.Map*/ (ba,_estapromo,_estecliente),__c.True); //BA.debugLineNum = 426;BA.debugLine="Private tcpf As Float = 0 'Total de compra de pro"; _tcpf = (float) (0); //BA.debugLineNum = 427;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 = 428;BA.debugLine="If thisLog Then Log($\"${tcpf} + ${prodsCants.Get"; if (_thislog) { __c.LogImpl("522544399",(""+__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 = 429;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 = 432;BA.debugLine="totalCompra = tcpf"; _totalcompra = _tcpf; //BA.debugLineNum = 433;BA.debugLine="totalProds = tpf 'Cantidad total de productos fij"; _totalprods = _tpf; //BA.debugLineNum = 435;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 = 436;BA.debugLine="Private p0 As B4XView = clv_prodsVariabes.GetPan"; _p0 = new anywheresoftware.b4a.objects.B4XViewWrapper(); _p0 = _clv_prodsvariabes._getpanel(_i); //BA.debugLineNum = 437;BA.debugLine="Private p As B4XView = p0.GetView(0)"; _p = new anywheresoftware.b4a.objects.B4XViewWrapper(); _p = _p0.GetView((int) (0)); //BA.debugLineNum = 438;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 = 439;BA.debugLine="If cant1.Text = \"\" Then cant1.Text = 0"; if ((_cant1.getText()).equals("")) { _cant1.setText(BA.ObjectToCharSequence(0));}; //BA.debugLineNum = 440;BA.debugLine="totalProds = totalProds + cant1.Text"; _totalprods = (int) (_totalprods+(double)(Double.parseDouble(_cant1.getText()))); //BA.debugLineNum = 441;BA.debugLine="prodsVar1 = prodsVar1 + cant1.Text"; _prodsvar1 = (int) (_prodsvar1+(double)(Double.parseDouble(_cant1.getText()))); //BA.debugLineNum = 442;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 = 443;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 = 444;BA.debugLine="If cant1.Text > 0 Then"; if ((double)(Double.parseDouble(_cant1.getText()))>0) { //BA.debugLineNum = 446;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 = 447;BA.debugLine="If thisLog Then Log($\"Cant: ${cant1.Text}, Suma"; if (_thislog) { __c.LogImpl("522544418",("Cant: "+__c.SmartStringFormatter("",(Object)(_cant1.getText()))+", Suma: "+__c.SmartStringFormatter("",(Object)(_totalcompra))+""),0);}; //BA.debugLineNum = 448;BA.debugLine="prodsIds2.Add(esteTag.Get(2))"; _prodsids2.Add(_estetag.Get((int) (2))); //BA.debugLineNum = 449;BA.debugLine="prodsCants2.Add(cant1.Text)"; _prodscants2.Add((Object)(_cant1.getText())); //BA.debugLineNum = 450;BA.debugLine="prodsPrecios2.Add(esteTag.get(0))"; _prodsprecios2.Add(_estetag.Get((int) (0))); }; //BA.debugLineNum = 452;BA.debugLine="l_total.Text = $\"Total: $$1.2{totalCompra}\"$"; _l_total.setText(BA.ObjectToCharSequence(("Total: $"+__c.SmartStringFormatter("1.2",(Object)(_totalcompra))+""))); //BA.debugLineNum = 453;BA.debugLine="l_totProds.text = $\"Productos: ${totalProds}\"$"; _l_totprods.setText(BA.ObjectToCharSequence(("Productos: "+__c.SmartStringFormatter("",(Object)(_totalprods))+""))); } }; //BA.debugLineNum = 456;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 = 457;BA.debugLine="Private p0 As B4XView = clv_prodsVariabes2.GetPa"; _p0 = new anywheresoftware.b4a.objects.B4XViewWrapper(); _p0 = _clv_prodsvariabes2._getpanel(_i); //BA.debugLineNum = 458;BA.debugLine="Private p As B4XView = p0.GetView(0)"; _p = new anywheresoftware.b4a.objects.B4XViewWrapper(); _p = _p0.GetView((int) (0)); //BA.debugLineNum = 459;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 = 460;BA.debugLine="totalProds = totalProds + cant2.Text"; _totalprods = (int) (_totalprods+(double)(Double.parseDouble(_cant2.getText()))); //BA.debugLineNum = 461;BA.debugLine="prodsVar2 = prodsVar2 + cant2.Text"; _prodsvar2 = (int) (_prodsvar2+(double)(Double.parseDouble(_cant2.getText()))); //BA.debugLineNum = 462;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 = 463;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 = 464;BA.debugLine="If cant2.Text > 0 Then"; if ((double)(Double.parseDouble(_cant2.getText()))>0) { //BA.debugLineNum = 466;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 = 467;BA.debugLine="If thisLog Then Log($\"Cant: ${cant2.Text}, Suma"; if (_thislog) { __c.LogImpl("522544438",("Cant: "+__c.SmartStringFormatter("",(Object)(_cant2.getText()))+", Suma: "+__c.SmartStringFormatter("",(Object)(_totalcompra))+""),0);}; //BA.debugLineNum = 468;BA.debugLine="prodsIds2.Add(esteTag.Get(2))"; _prodsids2.Add(_estetag.Get((int) (2))); //BA.debugLineNum = 469;BA.debugLine="prodsCants2.Add(cant2.Text)"; _prodscants2.Add((Object)(_cant2.getText())); //BA.debugLineNum = 470;BA.debugLine="prodsPrecios2.Add(esteTag.get(0))"; _prodsprecios2.Add(_estetag.Get((int) (0))); }; //BA.debugLineNum = 472;BA.debugLine="l_total.Text = $\"Total: $$1.2{totalCompra}\"$"; _l_total.setText(BA.ObjectToCharSequence(("Total: $"+__c.SmartStringFormatter("1.2",(Object)(_totalcompra))+""))); //BA.debugLineNum = 473;BA.debugLine="l_totProds.text = $\"Productos: ${totalProds}\"$"; _l_totprods.setText(BA.ObjectToCharSequence(("Productos: "+__c.SmartStringFormatter("",(Object)(_totalprods))+""))); } }; //BA.debugLineNum = 476;BA.debugLine="If thisLog Then Log($\"Total Prods: ${totalProds},"; if (_thislog) { __c.LogImpl("522544447",("Total Prods: "+__c.SmartStringFormatter("",(Object)(_totalprods))+", Total: $"+__c.SmartStringFormatter("1.2",(Object)(_totalcompra))+""),0);}; //BA.debugLineNum = 477;BA.debugLine="l_total.Text = $\"Total: $$1.2{totalCompra}\"$"; _l_total.setText(BA.ObjectToCharSequence(("Total: $"+__c.SmartStringFormatter("1.2",(Object)(_totalcompra))+""))); //BA.debugLineNum = 478;BA.debugLine="l_totProds.text = $\"Productos: ${totalProds}\"$"; _l_totprods.setText(BA.ObjectToCharSequence(("Productos: "+__c.SmartStringFormatter("",(Object)(_totalprods))+""))); //BA.debugLineNum = 479;BA.debugLine="If totalProds < prodsVarReq + prodsVarReq2 + tpf"; if (_totalprods<_prodsvarreq+_prodsvarreq2+_tpf || _totalprods>_prodsvarreq+_prodsvarreq2+_tpf) { //BA.debugLineNum = 481;BA.debugLine="b_terminar1.Visible = False"; _b_terminar1.setVisible(__c.False); //BA.debugLineNum = 482;BA.debugLine="b_continuar.Visible = False"; _b_continuar.setVisible(__c.False); }else { //BA.debugLineNum = 485;BA.debugLine="b_terminar1.Visible = True"; _b_terminar1.setVisible(__c.True); //BA.debugLineNum = 486;BA.debugLine="b_continuar.Visible = True"; _b_continuar.setVisible(__c.True); }; //BA.debugLineNum = 488;BA.debugLine="If thisLog Then LogColor($\"${prodsIds}${CRLF}${pr"; if (_thislog) { __c.LogImpl("522544459",(""+__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 = 489;BA.debugLine="If thisLog Then LogColor($\"${prodsIds2}${CRLF}${p"; if (_thislog) { __c.LogImpl("522544460",(""+__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 = 491;BA.debugLine="End Sub"; return ""; } public String _et_pcant_focuschanged(boolean _hasfocus) throws Exception{ //BA.debugLineNum = 493;BA.debugLine="Private Sub et_pCant_FocusChanged (HasFocus As Boo"; //BA.debugLineNum = 494;BA.debugLine="LogColor(\"focus changed\", Colors.Magenta)"; __c.LogImpl("522609921","focus changed",__c.Colors.Magenta); //BA.debugLineNum = 495;BA.debugLine="cuentaProds"; _cuentaprods(); //BA.debugLineNum = 496;BA.debugLine="End Sub"; return ""; } public String _et_pcant_textchanged(String _old,String _new) throws Exception{ //BA.debugLineNum = 408;BA.debugLine="Private Sub et_pCant_TextChanged (Old As String, N"; //BA.debugLineNum = 410;BA.debugLine="cuentaProds"; _cuentaprods(); //BA.debugLineNum = 411;BA.debugLine="End Sub"; return ""; } public Object _initialize(anywheresoftware.b4a.BA _ba) throws Exception{ innerInitialize(_ba); //BA.debugLineNum = 48;BA.debugLine="Public Sub Initialize As Object"; //BA.debugLineNum = 49;BA.debugLine="Return Me"; if (true) return this; //BA.debugLineNum = 50;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.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 = 84;BA.debugLine="Sub muestraPromo(promo As String, cliente As Strin"; //BA.debugLineNum = 85;BA.debugLine="Private thisLog As Boolean = False"; _thislog = __c.False; //BA.debugLineNum = 87;BA.debugLine="estaPromo = promo"; _estapromo = _promo; //BA.debugLineNum = 88;BA.debugLine="esteCliente = cliente"; _estecliente = _cliente; //BA.debugLineNum = 89;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 = 90;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 = 91;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 = 93;BA.debugLine="If thisLog Then Log(\"Max promos por inv de prods"; if (_thislog) { __c.LogImpl("521954569","Max promos por inv de prods FIJOS: "+BA.NumberToString(_subs._revisamaxpromosprodsfijosporinventario /*int*/ (ba,_mp)),0);}; //BA.debugLineNum = 94;BA.debugLine="If thisLog Then Log(\"Max promos por inv de prods"; if (_thislog) { __c.LogImpl("521954570","Max promos por inv de prods VARIABLES: "+BA.NumberToString(_subs._revisamaxpromosprodsvariablesporinventario /*int*/ (ba,_mp)),0);}; //BA.debugLineNum = 95;BA.debugLine="maxCantPromos = Subs.revisaMaxPromosProdsVariable"; _maxcantpromos = _subs._revisamaxpromosprodsvariablesporinventario /*int*/ (ba,_mp); //BA.debugLineNum = 96;BA.debugLine="et_promoCant.Text = 1"; _et_promocant.setText(BA.ObjectToCharSequence(1)); //BA.debugLineNum = 97;BA.debugLine="l_promosCant.text = \"Max promos: \" & maxCantPromo"; _l_promoscant.setText(BA.ObjectToCharSequence("Max promos: "+BA.NumberToString(_maxcantpromos))); //BA.debugLineNum = 98;BA.debugLine="Private cs As CSBuilder"; _cs = new anywheresoftware.b4a.objects.CSBuilder(); //BA.debugLineNum = 99;BA.debugLine="cs.Initialize"; _cs.Initialize(); //BA.debugLineNum = 100;BA.debugLine="If thisLog Then Log(mp)"; if (_thislog) { __c.LogImpl("521954576",BA.ObjectToString(_mp),0);}; //BA.debugLineNum = 101;BA.debugLine="If thisLog Then Log(prodsPromo)"; if (_thislog) { __c.LogImpl("521954577",BA.ObjectToString(_prodspromo),0);}; //BA.debugLineNum = 102;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 = 103;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 = 104;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 = 105;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 = 110;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 = 111;BA.debugLine="prodsFijosTot = 0"; _prodsfijostot = (float) (0); //BA.debugLineNum = 114;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 = 115;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 = 116;BA.debugLine="If thisLog Then Log(mp)"; if (_thislog) { __c.LogImpl("521954592",BA.ObjectToString(_mp),0);}; //BA.debugLineNum = 117;BA.debugLine="tpf = 0"; _tpf = (int) (0); //BA.debugLineNum = 118;BA.debugLine="For Each pfp As Int In mp.Get(\"prodsFijosPiezas\")"; { final anywheresoftware.b4a.BA.IterableList group26 = ((anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(_mp.Get((Object)("prodsFijosPiezas"))))); final int groupLen26 = group26.getSize() ;int index26 = 0; ; for (; index26 < groupLen26;index26++){ _pfp = (int)(BA.ObjectToNumber(group26.Get(index26))); //BA.debugLineNum = 119;BA.debugLine="tpf = tpf + pfp"; _tpf = (int) (_tpf+_pfp); } }; //BA.debugLineNum = 121;BA.debugLine="tpf2 = tpf"; _tpf2 = _tpf; //BA.debugLineNum = 123;BA.debugLine="l_prodsFijos.Text = $\"Productos fijos (${tpf})\"$"; _l_prodsfijos.setText(BA.ObjectToCharSequence(("Productos fijos ("+__c.SmartStringFormatter("",(Object)(_tpf))+")"))); //BA.debugLineNum = 124;BA.debugLine="prodsVarReq = mp.Get(\"prodsVariablesRequeridos\")"; _prodsvarreq = (int)(BA.ObjectToNumber(_mp.Get((Object)("prodsVariablesRequeridos")))); //BA.debugLineNum = 125;BA.debugLine="prodsVarReq_ = prodsVarReq"; _prodsvarreq_ = _prodsvarreq; //BA.debugLineNum = 126;BA.debugLine="prodsVarReq2 = mp.Get(\"prodsVariables2Requeridos\""; _prodsvarreq2 = (int)(BA.ObjectToNumber(_mp.Get((Object)("prodsVariables2Requeridos")))); //BA.debugLineNum = 127;BA.debugLine="prodsVarReq2_ = prodsVarReq2"; _prodsvarreq2_ = _prodsvarreq2; //BA.debugLineNum = 129;BA.debugLine="l_prodsVariables.Text = $\"Productos variables req"; _l_prodsvariables.setText(BA.ObjectToCharSequence(("Productos variables requeridos: "+__c.SmartStringFormatter("",(Object)(_prodsvarreq))+""))); //BA.debugLineNum = 130;BA.debugLine="l_prodsVariables2.Text = $\"Productos variables2 r"; _l_prodsvariables2.setText(BA.ObjectToCharSequence(("Productos variables2 requeridos: "+__c.SmartStringFormatter("",(Object)(_prodsvarreq2))+""))); //BA.debugLineNum = 131;BA.debugLine="If prodsVarReq = 0 Then"; if (_prodsvarreq==0) { //BA.debugLineNum = 132;BA.debugLine="p_prodsVariables.Visible = False"; _p_prodsvariables.setVisible(__c.False); }else { //BA.debugLineNum = 134;BA.debugLine="p_prodsVariables.Visible = True"; _p_prodsvariables.setVisible(__c.True); }; //BA.debugLineNum = 137;BA.debugLine="Dim label1 As Label"; _label1 = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 138;BA.debugLine="label1 = lv_prodsFijos.SingleLineLayout.Label"; _label1 = _lv_prodsfijos.getSingleLineLayout().Label; //BA.debugLineNum = 139;BA.debugLine="label1.TextSize = 13"; _label1.setTextSize((float) (13)); //BA.debugLineNum = 140;BA.debugLine="label1.TextColor = Colors.black"; _label1.setTextColor(__c.Colors.Black); //BA.debugLineNum = 141;BA.debugLine="lv_prodsFijos.SingleLineLayout.ItemHeight = 30dip"; _lv_prodsfijos.getSingleLineLayout().setItemHeight(__c.DipToCurrent((int) (30))); //BA.debugLineNum = 142;BA.debugLine="lv_prodsFijos.Clear"; _lv_prodsfijos.Clear(); //BA.debugLineNum = 144;BA.debugLine="lv_prodsFijos.Clear"; _lv_prodsfijos.Clear(); //BA.debugLineNum = 145;BA.debugLine="agregaFijosALista(mp, True)"; _agregafijosalista(_mp,__c.True); //BA.debugLineNum = 146;BA.debugLine="If thisLog Then Log(\"Total prods fijos = \" & prod"; if (_thislog) { __c.LogImpl("521954622","Total prods fijos = "+BA.NumberToString(_prodsfijostot),0);}; //BA.debugLineNum = 148;BA.debugLine="l_totProds.text = $\"Productos: ${tpf}\"$"; _l_totprods.setText(BA.ObjectToCharSequence(("Productos: "+__c.SmartStringFormatter("",(Object)(_tpf))+""))); //BA.debugLineNum = 149;BA.debugLine="l_total.Text = $\"Total: $$1.2{prodsFijosTot}\"$"; _l_total.setText(BA.ObjectToCharSequence(("Total: $"+__c.SmartStringFormatter("1.2",(Object)(_prodsfijostot))+""))); //BA.debugLineNum = 155;BA.debugLine="If thisLog Then Log($\"PV1: ${pv.Size}, ${pv}\"$)"; if (_thislog) { __c.LogImpl("521954631",("PV1: "+__c.SmartStringFormatter("",(Object)(_pv.getSize()))+", "+__c.SmartStringFormatter("",(Object)(_pv.getObject()))+""),0);}; //BA.debugLineNum = 156;BA.debugLine="If thisLog Then Log($\"PV2: ${pv2.Size}, ${pv2}\"$)"; if (_thislog) { __c.LogImpl("521954632",("PV2: "+__c.SmartStringFormatter("",(Object)(_pv2.getSize()))+", "+__c.SmartStringFormatter("",(Object)(_pv2.getObject()))+""),0);}; //BA.debugLineNum = 157;BA.debugLine="If thisLog Then Log(\"invDisp=\" & invDispPromo)"; if (_thislog) { __c.LogImpl("521954633","invDisp="+BA.ObjectToString(_invdisppromo),0);}; //BA.debugLineNum = 158;BA.debugLine="clv_prodsVariabes.Clear"; _clv_prodsvariabes._clear(); //BA.debugLineNum = 159;BA.debugLine="clv_prodsVariabes2.Clear"; _clv_prodsvariabes2._clear(); //BA.debugLineNum = 160;BA.debugLine="For Each p As String In pv"; { final anywheresoftware.b4a.BA.IterableList group58 = _pv; final int groupLen58 = group58.getSize() ;int index58 = 0; ; for (; index58 < groupLen58;index58++){ _p = BA.ObjectToString(group58.Get(index58)); //BA.debugLineNum = 161;BA.debugLine="If invDispPromo.ContainsKey(p) Then 'Si no esta"; if (_invdisppromo.ContainsKey((Object)(_p))) { //BA.debugLineNum = 162;BA.debugLine="Private indicePV = listaPV.IndexOf(p)"; _indicepv = BA.NumberToString(_listapv.IndexOf((Object)(_p))); //BA.debugLineNum = 164;BA.debugLine="Private estePrecio = listaPreciosPV.Get(indiceP"; _esteprecio = BA.ObjectToString(_listapreciospv.Get((int)(Double.parseDouble(_indicepv)))); //BA.debugLineNum = 169;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 = 170;BA.debugLine="If thisLog Then Log(thisProd)"; if (_thislog) { __c.LogImpl("521954646",BA.ObjectToString(_thisprod),0);}; //BA.debugLineNum = 171;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 = 174;BA.debugLine="For Each p As String In pv2"; { final anywheresoftware.b4a.BA.IterableList group67 = _pv2; final int groupLen67 = group67.getSize() ;int index67 = 0; ; for (; index67 < groupLen67;index67++){ _p = BA.ObjectToString(group67.Get(index67)); //BA.debugLineNum = 175;BA.debugLine="If invDispPromo.ContainsKey(p) Then 'Si no esta"; if (_invdisppromo.ContainsKey((Object)(_p))) { //BA.debugLineNum = 180;BA.debugLine="Private indicePV2 = listaPV2.IndexOf(p)"; _indicepv2 = BA.NumberToString(_listapv2.IndexOf((Object)(_p))); //BA.debugLineNum = 183;BA.debugLine="Private estePrecio = listaPreciosPV2.Get(indice"; _esteprecio = BA.ObjectToString(_listapreciospv2.Get((int)(Double.parseDouble(_indicepv2)))); //BA.debugLineNum = 188;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 = 189;BA.debugLine="If thisLog Then Log(thisProd)"; if (_thislog) { __c.LogImpl("521954665",BA.ObjectToString(_thisprod),0);}; //BA.debugLineNum = 190;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 = 193;BA.debugLine="If pv2.Size = 0 Then"; if (_pv2.getSize()==0) { //BA.debugLineNum = 195;BA.debugLine="l_prodsVariables2.Visible = False"; _l_prodsvariables2.setVisible(__c.False); //BA.debugLineNum = 196;BA.debugLine="p_prodsVariables2.Visible = False"; _p_prodsvariables2.setVisible(__c.False); //BA.debugLineNum = 198;BA.debugLine="p_prodsVariables.Height = 410dip"; _p_prodsvariables.setHeight(__c.DipToCurrent((int) (410))); //BA.debugLineNum = 199;BA.debugLine="clv_prodsVariabes.GetBase.Height = p_prodsVariab"; _clv_prodsvariabes._getbase().setHeight((int) (_p_prodsvariables.getHeight()-20)); //BA.debugLineNum = 203;BA.debugLine="clv_prodsVariabes.Base_Resize(clv_prodsVariabes."; _clv_prodsvariabes._base_resize(_clv_prodsvariabes._getbase().getWidth(),_p_prodsvariables.getHeight()-20); }else { //BA.debugLineNum = 205;BA.debugLine="l_prodsVariables2.Visible = True"; _l_prodsvariables2.setVisible(__c.True); //BA.debugLineNum = 206;BA.debugLine="p_prodsVariables2.Visible = True"; _p_prodsvariables2.setVisible(__c.True); //BA.debugLineNum = 207;BA.debugLine="p_prodsVariables.Height = 210dip"; _p_prodsvariables.setHeight(__c.DipToCurrent((int) (210))); //BA.debugLineNum = 208;BA.debugLine="clv_prodsVariabes.GetBase.Height = p_prodsVariab"; _clv_prodsvariabes._getbase().setHeight((int) (_p_prodsvariables.getHeight()-20)); }; //BA.debugLineNum = 210;BA.debugLine="b_terminar1.Visible = False"; _b_terminar1.setVisible(__c.False); //BA.debugLineNum = 211;BA.debugLine="b_continuar.Visible = False"; _b_continuar.setVisible(__c.False); //BA.debugLineNum = 212;BA.debugLine="cuentaProds"; _cuentaprods(); //BA.debugLineNum = 213;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; } }