package reparto_izca.keymon.lat;


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

public class c_detalleventa extends B4AClass.ImplB4AClass implements BA.SubDelegator{
    private static java.util.HashMap<String, java.lang.reflect.Method> htSubs;
    private void innerInitialize(BA _ba) throws Exception {
        if (ba == null) {
            ba = new anywheresoftware.b4a.ShellBA(_ba, this, htSubs, "reparto_izca.keymon.lat.c_detalleventa");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", reparto_izca.keymon.lat.c_detalleventa.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 
    public void  innerInitializeHelper(anywheresoftware.b4a.BA _ba) throws Exception{
        innerInitialize(_ba);
    }
    public Object callSub(String sub, Object sender, Object[] args) throws Exception {
        return BA.SubDelegator.SubNotFound;
    }
public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _root = null;
public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null;
public anywheresoftware.b4a.gps.GPS _g = null;
public String _clie_id = "";
public String _sdate = "";
public String _stime = "";
public String _usuario = "";
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_regresar = null;
public anywheresoftware.b4a.objects.ListViewWrapper _listview1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_cant = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_total = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_borra = null;
public String _existe = "";
public String _result = "";
public String _cuantos = "";
public String _nombre_prod = "";
public String _cuantos_pedido = "";
public anywheresoftware.b4a.objects.LabelWrapper _titulo = null;
public anywheresoftware.b4a.objects.PanelWrapper _p1 = null;
public anywheresoftware.b4a.objects.ListViewWrapper _lv2 = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_principal = null;
public b4a.example3.customlistview _clv_pedido = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_prods = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_prodx = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_pcant = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_pcant = null;
public anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _bmp = null;
public boolean _etcanthasfocus = false;
public int _totalprods = 0;
public int _totalcompra = 0;
public anywheresoftware.b4a.objects.collections.Map _prodsmap = null;
public boolean _reconstruirpedido = false;
public String _promoaborrar = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_guardar = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_prodmas = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_prodmenos = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_prodmenosc = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_pcantc = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_pcantc = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_prodmasc = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_botmasmenc = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_botmasmen = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_cajas = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_piezas = null;
public b4a.example.dateutils _dateutils = null;
public reparto_izca.keymon.lat.main _main = null;
public reparto_izca.keymon.lat.appupdater _appupdater = null;
public reparto_izca.keymon.lat.subs _subs = null;
public reparto_izca.keymon.lat.foto _foto = null;
public reparto_izca.keymon.lat.mapa_cliente _mapa_cliente = null;
public reparto_izca.keymon.lat.mapa_rutas _mapa_rutas = null;
public reparto_izca.keymon.lat.starter _starter = null;
public reparto_izca.keymon.lat.tracker _tracker = null;
public reparto_izca.keymon.lat.newinst2 _newinst2 = null;
public reparto_izca.keymon.lat.b4xpages _b4xpages = null;
public reparto_izca.keymon.lat.b4xcollections _b4xcollections = null;
public reparto_izca.keymon.lat.httputils2service _httputils2service = null;
public reparto_izca.keymon.lat.xuiviewsutils _xuiviewsutils = null;
public Object  _initialize(reparto_izca.keymon.lat.c_detalleventa __ref,anywheresoftware.b4a.BA _ba) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "initialize", false))
	 {return ((Object) Debug.delegate(ba, "initialize", new Object[] {_ba}));}
RDebugUtils.currentLine=11730944;
 //BA.debugLineNum = 11730944;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=11730945;
 //BA.debugLineNum = 11730945;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=11730946;
 //BA.debugLineNum = 11730946;BA.debugLine="End Sub";
return null;
}
public String  _b_guardar_click(reparto_izca.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "b_guardar_click", false))
	 {return ((String) Debug.delegate(ba, "b_guardar_click", null));}
RDebugUtils.currentLine=12582912;
 //BA.debugLineNum = 12582912;BA.debugLine="Private Sub b_guardar_Click";
RDebugUtils.currentLine=12582914;
 //BA.debugLineNum = 12582914;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmas_click(reparto_izca.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "b_prodmas_click", false))
	 {return ((String) Debug.delegate(ba, "b_prodmas_click", null));}
int _index = 0;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl0 = null;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lacant = null;
anywheresoftware.b4a.objects.collections.List _estetag = null;
String _maxprods = "";
String _minimoadesc = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _minimos = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c2 = null;
RDebugUtils.currentLine=12451840;
 //BA.debugLineNum = 12451840;BA.debugLine="Sub b_prodMas_Click";
RDebugUtils.currentLine=12451841;
 //BA.debugLineNum = 12451841;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=12451843;
 //BA.debugLineNum = 12451843;BA.debugLine="LogColor(\"b_prodMas_Click\", Colors.Magenta)";
__c.LogImpl("812451843","b_prodMas_Click",__c.Colors.Magenta);
RDebugUtils.currentLine=12451844;
 //BA.debugLineNum = 12451844;BA.debugLine="Dim index As Int = clv_pedido.GetItemFromView(Sen";
_index = __ref._clv_pedido /*b4a.example3.customlistview*/ ._getitemfromview((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__c.Sender(ba))));
RDebugUtils.currentLine=12451845;
 //BA.debugLineNum = 12451845;BA.debugLine="Dim pnl0 As B4XView = clv_pedido.GetPanel(index)";
_pnl0 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl0 = __ref._clv_pedido /*b4a.example3.customlistview*/ ._getpanel(_index);
RDebugUtils.currentLine=12451846;
 //BA.debugLineNum = 12451846;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=12451847;
 //BA.debugLineNum = 12451847;BA.debugLine="Dim laCant As B4XView = pnl.GetView(2).GetView(3)";
_lacant = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacant = _pnl.GetView((int) (2)).GetView((int) (3));
RDebugUtils.currentLine=12451851;
 //BA.debugLineNum = 12451851;BA.debugLine="Dim esteTag As List = Regex.Split(\"\\|\", laCant.Ta";
_estetag = new anywheresoftware.b4a.objects.collections.List();
_estetag = anywheresoftware.b4a.keywords.Common.ArrayToList(__c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag())));
RDebugUtils.currentLine=12451852;
 //BA.debugLineNum = 12451852;BA.debugLine="Log(\"LC_TEXT:\"&laCant.Text&\"|LC_TAG:\"&laCant.Tag&";
__c.LogImpl("812451852","LC_TEXT:"+_lacant.getText()+"|LC_TAG:"+BA.ObjectToString(_lacant.getTag())+"|ET:"+BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=12451853;
 //BA.debugLineNum = 12451853;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=12451855;
 //BA.debugLineNum = 12451855;BA.debugLine="Private maxProds = esteTag.Get(1) + esteTag.Get(4";
_maxprods = BA.NumberToString((double)(BA.ObjectToNumber(_estetag.Get((int) (1))))+(double)(BA.ObjectToNumber(_estetag.Get((int) (4)))));
RDebugUtils.currentLine=12451857;
 //BA.debugLineNum = 12451857;BA.debugLine="LogColor($\"++++++++++++++++++++++++++   ${esteTag";
__c.LogImpl("812451857",("++++++++++++++++++++++++++   "+__c.SmartStringFormatter("",(Object)(_estetag.getObject()))+""),__c.Colors.Green);
RDebugUtils.currentLine=12451860;
 //BA.debugLineNum = 12451860;BA.debugLine="Private minimoadesc As String";
_minimoadesc = "";
RDebugUtils.currentLine=12451861;
 //BA.debugLineNum = 12451861;BA.debugLine="Dim minimos As Cursor = Starter.skmt.ExecQuery2(\"";
_minimos = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_minimos = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT * FROM CAT_GUNAPROD3 WHERE CAT_GP_ID = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2)))})));
RDebugUtils.currentLine=12451862;
 //BA.debugLineNum = 12451862;BA.debugLine="If minimos.RowCount > 0 Then";
if (_minimos.getRowCount()>0) { 
RDebugUtils.currentLine=12451863;
 //BA.debugLineNum = 12451863;BA.debugLine="minimos.Position = 0";
_minimos.setPosition((int) (0));
RDebugUtils.currentLine=12451864;
 //BA.debugLineNum = 12451864;BA.debugLine="minimoadesc = minimos.GetString(\"CAT_DP_CANT_MIN";
_minimoadesc = _minimos.GetString("CAT_DP_CANT_MIN_VENTA");
 }else {
RDebugUtils.currentLine=12451866;
 //BA.debugLineNum = 12451866;BA.debugLine="minimoadesc = \"1\"";
_minimoadesc = "1";
 };
RDebugUtils.currentLine=12451868;
 //BA.debugLineNum = 12451868;BA.debugLine="minimos.Close";
_minimos.Close();
RDebugUtils.currentLine=12451870;
 //BA.debugLineNum = 12451870;BA.debugLine="minimoadesc = \"1\"";
_minimoadesc = "1";
RDebugUtils.currentLine=12451871;
 //BA.debugLineNum = 12451871;BA.debugLine="If esteTag.Get(7) <> \"1\" Then";
if ((_estetag.Get((int) (7))).equals((Object)("1")) == false) { 
RDebugUtils.currentLine=12451874;
 //BA.debugLineNum = 12451874;BA.debugLine="If esteTag.Get(5) = esteTag.Get(6) Then";
if ((_estetag.Get((int) (5))).equals(_estetag.Get((int) (6)))) { 
RDebugUtils.currentLine=12451876;
 //BA.debugLineNum = 12451876;BA.debugLine="If laCant.Text + 1 <= maxProds Then";
if ((double)(Double.parseDouble(_lacant.getText()))+1<=(double)(Double.parseDouble(_maxprods))) { 
RDebugUtils.currentLine=12451877;
 //BA.debugLineNum = 12451877;BA.debugLine="Log($\"NuevaCant = ${laCant.Text + 1}\"$)";
__c.LogImpl("812451877",("NuevaCant = "+__c.SmartStringFormatter("",(Object)((double)(Double.parseDouble(_lacant.getText()))+1))+""),0);
RDebugUtils.currentLine=12451878;
 //BA.debugLineNum = 12451878;BA.debugLine="laCant.Text = $\"$1.0{laCant.Text + 1}\"$";
_lacant.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.0",(Object)((double)(Double.parseDouble(_lacant.getText()))+1))+"")));
RDebugUtils.currentLine=12451879;
 //BA.debugLineNum = 12451879;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update cat_gunapro";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen - 1 where cat_gp_id = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{_estetag.Get((int) (2))}));
RDebugUtils.currentLine=12451882;
 //BA.debugLineNum = 12451882;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTAS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 1,  HVD_RECHAZOCANT = HVD_RECHAZOCANT - (1*'"+__c.SmartStringFormatter("",(Object)(_minimoadesc))+"')  WHERE HVD_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and HVD_cliente in (Select CUENTA from cuentaa)  AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
RDebugUtils.currentLine=12451884;
 //BA.debugLineNum = 12451884;BA.debugLine="Subs.prodVenta(esteTag.Get(5), esteTag.Get(2))";
_subs._prodventa /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (5))),BA.ObjectToString(_estetag.Get((int) (2))));
RDebugUtils.currentLine=12451889;
 //BA.debugLineNum = 12451889;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }else {
RDebugUtils.currentLine=12451893;
 //BA.debugLineNum = 12451893;BA.debugLine="If laCant.Text + 1 <= maxProds Then";
if ((double)(Double.parseDouble(_lacant.getText()))+1<=(double)(Double.parseDouble(_maxprods))) { 
RDebugUtils.currentLine=12451894;
 //BA.debugLineNum = 12451894;BA.debugLine="Log($\"NuevaCant = ${laCant.Text + 1}\"$)";
__c.LogImpl("812451894",("NuevaCant = "+__c.SmartStringFormatter("",(Object)((double)(Double.parseDouble(_lacant.getText()))+1))+""),0);
RDebugUtils.currentLine=12451895;
 //BA.debugLineNum = 12451895;BA.debugLine="laCant.Text = $\"$1.0{laCant.Text + 1}\"$";
_lacant.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.0",(Object)((double)(Double.parseDouble(_lacant.getText()))+1))+"")));
RDebugUtils.currentLine=12451896;
 //BA.debugLineNum = 12451896;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update cat_gunapro";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen - 1 where cat_gp_id = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{BA.ObjectToString(_estetag.Get((int) (2)))}));
RDebugUtils.currentLine=12451897;
 //BA.debugLineNum = 12451897;BA.debugLine="c = Starter.skmt.ExecQuery2(\"SELECT * FROM PED";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT * FROM PEDIDO WHERE PE_PROID = ? and PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND CONSECUTIVO = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2))),BA.ObjectToString(_estetag.Get((int) (8)))})));
RDebugUtils.currentLine=12451898;
 //BA.debugLineNum = 12451898;BA.debugLine="If c.RowCount > 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=12451899;
 //BA.debugLineNum = 12451899;BA.debugLine="Private c2 As Cursor = Starter.skmt.ExecQuery";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT * FROM CAT_GUNAPROD WHERE CAT_GP_ID = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2)))})));
RDebugUtils.currentLine=12451900;
 //BA.debugLineNum = 12451900;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=12451901;
 //BA.debugLineNum = 12451901;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=12451903;
 //BA.debugLineNum = 12451903;BA.debugLine="Starter.skmt.ExecNonQuery($\"update PEDIDO se";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update PEDIDO set PE_CANT = IFNULL(PE_CANT,0)+(1*'"+__c.SmartStringFormatter("",(Object)(_minimoadesc))+"'), PE_COSTO_TOT= ((IFNULL(PE_CANT,0)+(1*'"+__c.SmartStringFormatter("",(Object)(_minimoadesc))+"'))*'"+__c.SmartStringFormatter("",(Object)(_c2.GetString("CAT_GP_PRECIO")))+"') WHERE PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa)  AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
 };
 }else {
RDebugUtils.currentLine=12451906;
 //BA.debugLineNum = 12451906;BA.debugLine="Private c2 As Cursor = Starter.skmt.ExecQuery";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT * FROM CAT_GUNAPROD WHERE CAT_GP_ID = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2)))})));
RDebugUtils.currentLine=12451907;
 //BA.debugLineNum = 12451907;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=12451908;
 //BA.debugLineNum = 12451908;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=12451910;
 //BA.debugLineNum = 12451910;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO PEDI";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PEDIDO(PE_PROID,PE_PRONOMBRE,PE_CANT,PE_CLIENTEOR,PE_CLIENTE,PE_COSTOU,PE_COSTO_TOT,PE_CAJAS,PE_BCAJAS,CONSECUTIVO) VALUES (?,?,?,?,?,?,?,0,0,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{BA.ObjectToString(_estetag.Get((int) (2))),_c2.GetString("CAT_GP_NOMBRE"),BA.NumberToString(1*(double)(Double.parseDouble(_minimoadesc))),BA.ObjectToString(_estetag.Get((int) (5))),_subs._traecliente /*String*/ (ba),_c2.GetString("CAT_GP_PRECIO"),_c2.GetString("CAT_GP_PRECIO"),BA.ObjectToString(_estetag.Get((int) (8)))}));
 };
 };
RDebugUtils.currentLine=12451915;
 //BA.debugLineNum = 12451915;BA.debugLine="Subs.prodVenta(esteTag.Get(5), esteTag.Get(2))";
_subs._prodventa /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (5))),BA.ObjectToString(_estetag.Get((int) (2))));
RDebugUtils.currentLine=12451920;
 //BA.debugLineNum = 12451920;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 };
 };
RDebugUtils.currentLine=12451939;
 //BA.debugLineNum = 12451939;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear(reparto_izca.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "b4xpage_appear", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_appear", null));}
int _i = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c4 = null;
int _cantres = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _oc = null;
int _cant2 = 0;
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
int _bgcolor = 0;
int _textcolor = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c3 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc = null;
String _cuenta = "";
String _arti = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc2 = null;
String _cuenta1 = "";
String _arti1 = "";
float _preu = 0f;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc3 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc4 = null;
String _cuenta2 = "";
String _arti2 = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc5 = null;
String _cuenta3 = "";
String _arti3 = "";
RDebugUtils.currentLine=11862016;
 //BA.debugLineNum = 11862016;BA.debugLine="Sub B4XPage_Appear";
RDebugUtils.currentLine=11862017;
 //BA.debugLineNum = 11862017;BA.debugLine="Subs.centraPanel(p_principal, Root.Width)";
_subs._centrapanel /*String*/ (ba,__ref._p_principal /*anywheresoftware.b4a.objects.PanelWrapper*/ ,__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth());
RDebugUtils.currentLine=11862021;
 //BA.debugLineNum = 11862021;BA.debugLine="L_CANT.Text =\"\"";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=11862022;
 //BA.debugLineNum = 11862022;BA.debugLine="L_TOTAL.Text=\"\"";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=11862023;
 //BA.debugLineNum = 11862023;BA.debugLine="c=Starter.skmt.ExecQuery(\"select count(*) as EXIS";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(*) as EXISTE from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) and HVD_RECHAZO = 0 ")));
RDebugUtils.currentLine=11862024;
 //BA.debugLineNum = 11862024;BA.debugLine="C.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=11862025;
 //BA.debugLineNum = 11862025;BA.debugLine="Existe = C.GetString(\"EXISTE\")";
__ref._existe /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("EXISTE");
RDebugUtils.currentLine=11862026;
 //BA.debugLineNum = 11862026;BA.debugLine="C.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=11862028;
 //BA.debugLineNum = 11862028;BA.debugLine="c=Starter.skmt.ExecQuery(\"select hvd_num_registro";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select hvd_num_registro,CONSECUTIVO, HVD_CLIENTE, HVD_PRONOMBRE, HVD_PROID, HVD_CANT, HVD_COSTO_TOT, HVD_CODPROMO, BCAJAS, CANTC, IFNULL(HVD_RECHAZOCANT,0) AS HVD_RECHAZOCANT from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) and hvd_rechazo <> 2 and hvd_cant > 0 order by HVD_CODPROMO desc, HVD_PRONOMBRE asc")));
RDebugUtils.currentLine=11862029;
 //BA.debugLineNum = 11862029;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=11862030;
 //BA.debugLineNum = 11862030;BA.debugLine="clv_pedido.Clear";
__ref._clv_pedido /*b4a.example3.customlistview*/ ._clear();
RDebugUtils.currentLine=11862031;
 //BA.debugLineNum = 11862031;BA.debugLine="Subs.SetDivider(ListView1, Colors.LightGray, 2)";
_subs._setdivider /*String*/ (ba,__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ ,__c.Colors.LightGray,(int) (2));
RDebugUtils.currentLine=11862032;
 //BA.debugLineNum = 11862032;BA.debugLine="clv_pedido.GetBase.SetLayoutAnimated(100, 0dip, 6";
__ref._clv_pedido /*b4a.example3.customlistview*/ ._getbase().SetLayoutAnimated((int) (100),__c.DipToCurrent((int) (0)),__c.DipToCurrent((int) (60)),(int) (__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth()-50),(int) (__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getHeight()*0.62));
RDebugUtils.currentLine=11862033;
 //BA.debugLineNum = 11862033;BA.debugLine="clv_pedido.Base_Resize(clv_pedido.GetBase.Width,";
__ref._clv_pedido /*b4a.example3.customlistview*/ ._base_resize(__ref._clv_pedido /*b4a.example3.customlistview*/ ._getbase().getWidth(),__ref._clv_pedido /*b4a.example3.customlistview*/ ._getbase().getHeight());
RDebugUtils.currentLine=11862035;
 //BA.debugLineNum = 11862035;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=11862038;
 //BA.debugLineNum = 11862038;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step15 = 1;
final int limit15 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit15 ;_i = _i + step15 ) {
RDebugUtils.currentLine=11862039;
 //BA.debugLineNum = 11862039;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=11862041;
 //BA.debugLineNum = 11862041;BA.debugLine="Private c4 As Cursor = Starter.skmt.ExecQuery($";
_c4 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c4 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("SELECT IFNULL(PE_CANT,0) AS PE_CANT FROM PEDIDO WHERE PE_PROID = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID")))+"' AND PE_CLIENTEOR IN (SELECT CUENTA FROM CUENTAA) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")))+"'"))));
RDebugUtils.currentLine=11862042;
 //BA.debugLineNum = 11862042;BA.debugLine="If c4.RowCount > 0 Then";
if (_c4.getRowCount()>0) { 
RDebugUtils.currentLine=11862043;
 //BA.debugLineNum = 11862043;BA.debugLine="c4.Position = 0";
_c4.setPosition((int) (0));
RDebugUtils.currentLine=11862044;
 //BA.debugLineNum = 11862044;BA.debugLine="Private cantres As Int = c4.GetString(\"PE_CANT";
_cantres = (int)(Double.parseDouble(_c4.GetString("PE_CANT")));
 }else {
RDebugUtils.currentLine=11862046;
 //BA.debugLineNum = 11862046;BA.debugLine="cantres = 0";
_cantres = (int) (0);
 };
RDebugUtils.currentLine=11862049;
 //BA.debugLineNum = 11862049;BA.debugLine="If c.GetString(\"BCAJAS\") = \"0\" Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("BCAJAS")).equals("0")) { 
RDebugUtils.currentLine=11862050;
 //BA.debugLineNum = 11862050;BA.debugLine="If c.GetString(\"HVD_CANT\") <> c.GetString(\"HVD";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CANT")).equals(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_RECHAZOCANT")) == false) { 
RDebugUtils.currentLine=11862052;
 //BA.debugLineNum = 11862052;BA.debugLine="Private oc As Cursor = Starter.skmt.ExecQuery";
_oc = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_oc = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select HVD_CANT from HIST_VENTAS2 WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) and hvd_proid = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID")))+"' and HVD_NUM_REGISTRO = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_NUM_REGISTRO")))+"'"))));
RDebugUtils.currentLine=11862053;
 //BA.debugLineNum = 11862053;BA.debugLine="Private cant2 As Int = 0";
_cant2 = (int) (0);
RDebugUtils.currentLine=11862054;
 //BA.debugLineNum = 11862054;BA.debugLine="If oc.RowCount > 0 Then";
if (_oc.getRowCount()>0) { 
RDebugUtils.currentLine=11862055;
 //BA.debugLineNum = 11862055;BA.debugLine="oc.Position = 0";
_oc.setPosition((int) (0));
RDebugUtils.currentLine=11862056;
 //BA.debugLineNum = 11862056;BA.debugLine="cant2 = oc.GetString(\"HVD_CANT\")";
_cant2 = (int)(Double.parseDouble(_oc.GetString("HVD_CANT")));
 };
RDebugUtils.currentLine=11862058;
 //BA.debugLineNum = 11862058;BA.debugLine="oc.Close";
_oc.Close();
RDebugUtils.currentLine=11862059;
 //BA.debugLineNum = 11862059;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=11862060;
 //BA.debugLineNum = 11862060;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=11862061;
 //BA.debugLineNum = 11862061;BA.debugLine="label1.TextSize = 12";
_label1.setTextSize((float) (12));
RDebugUtils.currentLine=11862062;
 //BA.debugLineNum = 11862062;BA.debugLine="label1.TextColor = Colors.black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=11862063;
 //BA.debugLineNum = 11862063;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=11862064;
 //BA.debugLineNum = 11862064;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=11862065;
 //BA.debugLineNum = 11862065;BA.debugLine="label2.TextSize = 12";
_label2.setTextSize((float) (12));
RDebugUtils.currentLine=11862066;
 //BA.debugLineNum = 11862066;BA.debugLine="label2.TextColor = Colors.black";
_label2.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=11862067;
 //BA.debugLineNum = 11862067;BA.debugLine="Private bgColor, textColor As Int";
_bgcolor = 0;
_textcolor = 0;
RDebugUtils.currentLine=11862068;
 //BA.debugLineNum = 11862068;BA.debugLine="bgColor = Colors.RGB(177, 200, 249)'azul";
_bgcolor = __c.Colors.RGB((int) (177),(int) (200),(int) (249));
RDebugUtils.currentLine=11862069;
 //BA.debugLineNum = 11862069;BA.debugLine="textColor = Colors.black";
_textcolor = __c.Colors.Black;
RDebugUtils.currentLine=11862070;
 //BA.debugLineNum = 11862070;BA.debugLine="If c.GetString(\"HVD_CODPROMO\") <> Subs.traeAl";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CODPROMO")).equals(_subs._traealmacen /*String*/ (ba)) == false) { 
RDebugUtils.currentLine=11862072;
 //BA.debugLineNum = 11862072;BA.debugLine="bgColor = Colors.White";
_bgcolor = __c.Colors.White;
 };
RDebugUtils.currentLine=11862076;
 //BA.debugLineNum = 11862076;BA.debugLine="clv_pedido.Add(CreateListItem(c.GetString(\"HV";
__ref._clv_pedido /*b4a.example3.customlistview*/ ._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__ref._createlistitem /*anywheresoftware.b4a.objects.PanelWrapper*/ (null,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PRONOMBRE"),_subs._traeprecio2 /*String*/ (ba,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CODPROMO"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")),(int) (((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CANT")))-(double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_RECHAZOCANT"))))),(int) ((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_RECHAZOCANT")))-_cantres),__ref._clv_pedido /*b4a.example3.customlistview*/ ._asview().getWidth(),__c.DipToCurrent((int) (118)),__ref._bmp /*anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper*/ ,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID"),_bgcolor,_textcolor,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CODPROMO"),_subs._traecliente /*String*/ (ba),_subs._traecliente /*String*/ (ba),BA.NumberToString(0),(int)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")))).getObject())),(Object)(_i));
 };
 }else 
{RDebugUtils.currentLine=11862079;
 //BA.debugLineNum = 11862079;BA.debugLine="Else If c.GetString(\"BCAJAS\") = \"1\" Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("BCAJAS")).equals("1")) { 
RDebugUtils.currentLine=11862080;
 //BA.debugLineNum = 11862080;BA.debugLine="If c.GetString(\"HVD_CANT\") <> c.GetString(\"HVD";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CANT")).equals(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_RECHAZOCANT")) == false) { 
RDebugUtils.currentLine=11862082;
 //BA.debugLineNum = 11862082;BA.debugLine="Private oc As Cursor = Starter.skmt.ExecQuery";
_oc = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_oc = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select HVD_CANT from HIST_VENTAS2 WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) and hvd_proid = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID")))+"' and HVD_NUM_REGISTRO = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_NUM_REGISTRO")))+"'"))));
RDebugUtils.currentLine=11862083;
 //BA.debugLineNum = 11862083;BA.debugLine="Private cant2 As Int = 0";
_cant2 = (int) (0);
RDebugUtils.currentLine=11862084;
 //BA.debugLineNum = 11862084;BA.debugLine="If oc.RowCount > 0 Then";
if (_oc.getRowCount()>0) { 
RDebugUtils.currentLine=11862085;
 //BA.debugLineNum = 11862085;BA.debugLine="oc.Position = 0";
_oc.setPosition((int) (0));
RDebugUtils.currentLine=11862086;
 //BA.debugLineNum = 11862086;BA.debugLine="cant2 = oc.GetString(\"HVD_CANT\")";
_cant2 = (int)(Double.parseDouble(_oc.GetString("HVD_CANT")));
 };
RDebugUtils.currentLine=11862088;
 //BA.debugLineNum = 11862088;BA.debugLine="oc.Close";
_oc.Close();
RDebugUtils.currentLine=11862089;
 //BA.debugLineNum = 11862089;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=11862090;
 //BA.debugLineNum = 11862090;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=11862091;
 //BA.debugLineNum = 11862091;BA.debugLine="label1.TextSize = 12";
_label1.setTextSize((float) (12));
RDebugUtils.currentLine=11862092;
 //BA.debugLineNum = 11862092;BA.debugLine="label1.TextColor = Colors.black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=11862093;
 //BA.debugLineNum = 11862093;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=11862094;
 //BA.debugLineNum = 11862094;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=11862095;
 //BA.debugLineNum = 11862095;BA.debugLine="label2.TextSize = 12";
_label2.setTextSize((float) (12));
RDebugUtils.currentLine=11862096;
 //BA.debugLineNum = 11862096;BA.debugLine="label2.TextColor = Colors.black";
_label2.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=11862097;
 //BA.debugLineNum = 11862097;BA.debugLine="Private bgColor, textColor As Int";
_bgcolor = 0;
_textcolor = 0;
RDebugUtils.currentLine=11862098;
 //BA.debugLineNum = 11862098;BA.debugLine="bgColor = Colors.RGB(177, 200, 249)'azul";
_bgcolor = __c.Colors.RGB((int) (177),(int) (200),(int) (249));
RDebugUtils.currentLine=11862099;
 //BA.debugLineNum = 11862099;BA.debugLine="textColor = Colors.black";
_textcolor = __c.Colors.Black;
RDebugUtils.currentLine=11862100;
 //BA.debugLineNum = 11862100;BA.debugLine="If c.GetString(\"HVD_CODPROMO\") <> Subs.traeAl";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CODPROMO")).equals(_subs._traealmacen /*String*/ (ba)) == false) { 
RDebugUtils.currentLine=11862102;
 //BA.debugLineNum = 11862102;BA.debugLine="bgColor = Colors.White";
_bgcolor = __c.Colors.White;
 };
RDebugUtils.currentLine=11862106;
 //BA.debugLineNum = 11862106;BA.debugLine="clv_pedido.Add(CreateListItem(c.GetString(\"HV";
__ref._clv_pedido /*b4a.example3.customlistview*/ ._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__ref._createlistitem /*anywheresoftware.b4a.objects.PanelWrapper*/ (null,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PRONOMBRE"),BA.NumberToString(((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANTC"))))),(int) ((((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CANT")))-(double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_RECHAZOCANT")))))),(int)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_RECHAZOCANT"))),__ref._clv_pedido /*b4a.example3.customlistview*/ ._asview().getWidth(),__c.DipToCurrent((int) (118)),__ref._bmp /*anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper*/ ,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID"),_bgcolor,_textcolor,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CODPROMO"),_subs._traecliente /*String*/ (ba),_subs._traecliente /*String*/ (ba),BA.NumberToString(0),(int)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")))).getObject())),(Object)(_i));
 };
 }}
;
 }
};
 };
RDebugUtils.currentLine=11862114;
 //BA.debugLineNum = 11862114;BA.debugLine="Private c3 As Cursor=Starter.skmt.ExecQuery(\"Sele";
_c3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c3 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select * from PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa) AND PE_TIPO NOT IN ('SOBRANTE','FALTANTE')")));
RDebugUtils.currentLine=11862115;
 //BA.debugLineNum = 11862115;BA.debugLine="If c3.RowCount>0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=11862116;
 //BA.debugLineNum = 11862116;BA.debugLine="For i= 0 To c3.RowCount -1";
{
final int step79 = 1;
final int limit79 = (int) (_c3.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit79 ;_i = _i + step79 ) {
RDebugUtils.currentLine=11862117;
 //BA.debugLineNum = 11862117;BA.debugLine="c3.Position = i";
_c3.setPosition(_i);
RDebugUtils.currentLine=11862118;
 //BA.debugLineNum = 11862118;BA.debugLine="If c3.GetString(\"PE_BCAJAS\") = \"1\" Then";
if ((_c3.GetString("PE_BCAJAS")).equals("1")) { 
RDebugUtils.currentLine=11862119;
 //BA.debugLineNum = 11862119;BA.debugLine="Private bgColor, textColor As Int";
_bgcolor = 0;
_textcolor = 0;
RDebugUtils.currentLine=11862120;
 //BA.debugLineNum = 11862120;BA.debugLine="bgColor = Colors.RGB(221, 132, 132)'rosa";
_bgcolor = __c.Colors.RGB((int) (221),(int) (132),(int) (132));
RDebugUtils.currentLine=11862121;
 //BA.debugLineNum = 11862121;BA.debugLine="textColor = Colors.black";
_textcolor = __c.Colors.Black;
RDebugUtils.currentLine=11862122;
 //BA.debugLineNum = 11862122;BA.debugLine="clv_pedido.Add(CreateListItem2(c3.GetString(\"P";
__ref._clv_pedido /*b4a.example3.customlistview*/ ._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__ref._createlistitem2 /*anywheresoftware.b4a.objects.PanelWrapper*/ (null,_c3.GetString("PE_PRONOMBRE"),_c3.GetString("PE_COSTOU"),(int)(Double.parseDouble(_c3.GetString("PE_CANT"))),(int) (0),__ref._clv_pedido /*b4a.example3.customlistview*/ ._asview().getWidth(),__c.DipToCurrent((int) (118)),__ref._bmp /*anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper*/ ,_c3.GetString("PE_PROID"),_bgcolor,_textcolor,_subs._traealmacen /*String*/ (ba),_subs._traecliente /*String*/ (ba),_c3.GetString("PE_CLIENTEOR"),BA.NumberToString(1),(int)(Double.parseDouble(_c3.GetString("CONSECUTIVO")))).getObject())),(Object)(_i));
RDebugUtils.currentLine=11862123;
 //BA.debugLineNum = 11862123;BA.debugLine="Log(\"#####################\"&c3.GetString(\"PE_P";
__c.LogImpl("811862123","#####################"+_c3.GetString("PE_PRONOMBRE")+","+_c3.GetString("PE_CANT"),0);
 }else {
RDebugUtils.currentLine=11862125;
 //BA.debugLineNum = 11862125;BA.debugLine="Private bgColor, textColor As Int";
_bgcolor = 0;
_textcolor = 0;
RDebugUtils.currentLine=11862126;
 //BA.debugLineNum = 11862126;BA.debugLine="bgColor = Colors.RGB(221, 132, 132)'rosa";
_bgcolor = __c.Colors.RGB((int) (221),(int) (132),(int) (132));
RDebugUtils.currentLine=11862127;
 //BA.debugLineNum = 11862127;BA.debugLine="textColor = Colors.black";
_textcolor = __c.Colors.Black;
RDebugUtils.currentLine=11862128;
 //BA.debugLineNum = 11862128;BA.debugLine="Log(\"#####################\"&c3.GetString(\"PE_P";
__c.LogImpl("811862128","#####################"+_c3.GetString("PE_PRONOMBRE")+","+_c3.GetString("PE_CANT"),0);
RDebugUtils.currentLine=11862129;
 //BA.debugLineNum = 11862129;BA.debugLine="clv_pedido.Add(CreateListItem(c3.GetString(\"PE";
__ref._clv_pedido /*b4a.example3.customlistview*/ ._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__ref._createlistitem /*anywheresoftware.b4a.objects.PanelWrapper*/ (null,_c3.GetString("PE_PRONOMBRE"),_c3.GetString("PE_COSTOU"),(int)(Double.parseDouble(_c3.GetString("PE_CANT"))),(int) (0),__ref._clv_pedido /*b4a.example3.customlistview*/ ._asview().getWidth(),__c.DipToCurrent((int) (118)),__ref._bmp /*anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper*/ ,_c3.GetString("PE_PROID"),_bgcolor,_textcolor,_subs._traealmacen /*String*/ (ba),_subs._traecliente /*String*/ (ba),_c3.GetString("PE_CLIENTEOR"),BA.NumberToString(1),(int)(Double.parseDouble(_c3.GetString("CONSECUTIVO")))).getObject())),(Object)(_i));
 };
 }
};
 };
RDebugUtils.currentLine=11862135;
 //BA.debugLineNum = 11862135;BA.debugLine="Private vc As Cursor = Starter.skmt.ExecQuery($\"s";
_vc = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select HVD_PROID, HVD_CANT,HVD_COSTO_TOT, IFNULL(HVD_RECHAZOCANT, 0) AS HVD_RECHAZOCANT from HIST_VENTAS where BCAJAS = 0 and HVD_CODPROMO ='"+__c.SmartStringFormatter("",(Object)(_subs._traealmacen /*String*/ (ba)))+"' and HVD_CLIENTE in (select cuenta from cuentaa)"))));
RDebugUtils.currentLine=11862137;
 //BA.debugLineNum = 11862137;BA.debugLine="Private Cuenta As String = 0";
_cuenta = BA.NumberToString(0);
RDebugUtils.currentLine=11862138;
 //BA.debugLineNum = 11862138;BA.debugLine="Private arti As String = 0";
_arti = BA.NumberToString(0);
RDebugUtils.currentLine=11862139;
 //BA.debugLineNum = 11862139;BA.debugLine="If vc.RowCount > 0 Then";
if (_vc.getRowCount()>0) { 
RDebugUtils.currentLine=11862140;
 //BA.debugLineNum = 11862140;BA.debugLine="For i = 0 To vc.RowCount - 1";
{
final int step100 = 1;
final int limit100 = (int) (_vc.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit100 ;_i = _i + step100 ) {
RDebugUtils.currentLine=11862141;
 //BA.debugLineNum = 11862141;BA.debugLine="vc.Position = i";
_vc.setPosition(_i);
RDebugUtils.currentLine=11862142;
 //BA.debugLineNum = 11862142;BA.debugLine="Private cantres As Int = 0";
_cantres = (int) (0);
RDebugUtils.currentLine=11862143;
 //BA.debugLineNum = 11862143;BA.debugLine="Private c4 As Cursor = Starter.skmt.ExecQuery($";
_c4 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c4 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("SELECT IFNULL(PE_CANT,0) AS PE_CANT FROM PEDIDO WHERE PE_PROID = '"+__c.SmartStringFormatter("",(Object)(_vc.GetString("HVD_PROID")))+"' AND PE_CLIENTEOR IN (SELECT CUENTA FROM CUENTAA)"))));
RDebugUtils.currentLine=11862144;
 //BA.debugLineNum = 11862144;BA.debugLine="If c4.RowCount > 0 Then";
if (_c4.getRowCount()>0) { 
RDebugUtils.currentLine=11862145;
 //BA.debugLineNum = 11862145;BA.debugLine="c4.Position = 0";
_c4.setPosition((int) (0));
RDebugUtils.currentLine=11862146;
 //BA.debugLineNum = 11862146;BA.debugLine="cantres = c4.GetString(\"PE_CANT\")";
_cantres = (int)(Double.parseDouble(_c4.GetString("PE_CANT")));
RDebugUtils.currentLine=11862147;
 //BA.debugLineNum = 11862147;BA.debugLine="Log(c4.GetString(\"PE_CANT\"))";
__c.LogImpl("811862147",_c4.GetString("PE_CANT"),0);
 }else {
RDebugUtils.currentLine=11862149;
 //BA.debugLineNum = 11862149;BA.debugLine="cantres = 0";
_cantres = (int) (0);
 };
RDebugUtils.currentLine=11862154;
 //BA.debugLineNum = 11862154;BA.debugLine="arti = arti + (vc.GetString(\"HVD_CANT\") - vc.Ge";
_arti = BA.NumberToString((double)(Double.parseDouble(_arti))+((double)(Double.parseDouble(_vc.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc.GetString("HVD_RECHAZOCANT")))));
RDebugUtils.currentLine=11862155;
 //BA.debugLineNum = 11862155;BA.debugLine="Cuenta = Cuenta + ((vc.GetString(\"HVD_CANT\") -";
_cuenta = BA.NumberToString((double)(Double.parseDouble(_cuenta))+(((double)(Double.parseDouble(_vc.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc.GetString("HVD_RECHAZOCANT"))))*((double)(Double.parseDouble(_vc.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_vc.GetString("HVD_CANT"))))));
 }
};
 };
RDebugUtils.currentLine=11862162;
 //BA.debugLineNum = 11862162;BA.debugLine="Private vc2 As Cursor = Starter.skmt.ExecQuery(\"s";
_vc2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select HVD_PROID, HVD_CANT, IFNULL(HVD_RECHAZOCANT, 0) AS HVD_RECHAZOCANT, CANTC,HVD_COSTO_TOT from HIST_VENTAS where HVD_CLIENTE in (select cuenta from cuentaa) AND BCAJAS = 1")));
RDebugUtils.currentLine=11862163;
 //BA.debugLineNum = 11862163;BA.debugLine="Private Cuenta1 As String = 0";
_cuenta1 = BA.NumberToString(0);
RDebugUtils.currentLine=11862164;
 //BA.debugLineNum = 11862164;BA.debugLine="Private arti1 As String = 0";
_arti1 = BA.NumberToString(0);
RDebugUtils.currentLine=11862165;
 //BA.debugLineNum = 11862165;BA.debugLine="If vc2.RowCount > 0 Then";
if (_vc2.getRowCount()>0) { 
RDebugUtils.currentLine=11862166;
 //BA.debugLineNum = 11862166;BA.debugLine="For i = 0 To vc2.RowCount - 1";
{
final int step119 = 1;
final int limit119 = (int) (_vc2.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit119 ;_i = _i + step119 ) {
RDebugUtils.currentLine=11862167;
 //BA.debugLineNum = 11862167;BA.debugLine="vc2.Position = i";
_vc2.setPosition(_i);
RDebugUtils.currentLine=11862168;
 //BA.debugLineNum = 11862168;BA.debugLine="Dim preu As Float = NumberFormat2(vc2.GetString";
_preu = (float)(Double.parseDouble(__c.NumberFormat2((double)(Double.parseDouble(_vc2.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_vc2.GetString("CANTC"))),(int) (0),(int) (2),(int) (2),__c.False)));
RDebugUtils.currentLine=11862169;
 //BA.debugLineNum = 11862169;BA.debugLine="Private vc3 As Cursor = Starter.skmt.ExecQuery(";
_vc3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc3 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select PRECIOCONVER, CONVERSION from CAT_GUNAPROD where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_vc2.GetString("HVD_PROID")))+"'"))));
RDebugUtils.currentLine=11862170;
 //BA.debugLineNum = 11862170;BA.debugLine="If vc3.RowCount > 0 Then";
if (_vc3.getRowCount()>0) { 
RDebugUtils.currentLine=11862171;
 //BA.debugLineNum = 11862171;BA.debugLine="vc3.Position = 0";
_vc3.setPosition((int) (0));
RDebugUtils.currentLine=11862172;
 //BA.debugLineNum = 11862172;BA.debugLine="Cuenta1 = Cuenta1 + ((vc2.GetString(\"CANTC\")-(";
_cuenta1 = BA.NumberToString((double)(Double.parseDouble(_cuenta1))+(((double)(Double.parseDouble(_vc2.GetString("CANTC")))-((double)(Double.parseDouble(_vc2.GetString("HVD_RECHAZOCANT")))/(double)(double)(Double.parseDouble(_vc3.GetString("CONVERSION")))))*_preu));
RDebugUtils.currentLine=11862173;
 //BA.debugLineNum = 11862173;BA.debugLine="arti1 = arti1 + (vc2.GetString(\"HVD_CANT\") - v";
_arti1 = BA.NumberToString((double)(Double.parseDouble(_arti1))+((double)(Double.parseDouble(_vc2.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc2.GetString("HVD_RECHAZOCANT")))));
 };
 }
};
 };
RDebugUtils.currentLine=11862179;
 //BA.debugLineNum = 11862179;BA.debugLine="Private vc4 As Cursor = Starter.skmt.ExecQuery($\"";
_vc4 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc4 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select HVD_PROID, HVD_CANT, IFNULL(HVD_RECHAZOCANT, 0) AS HVD_RECHAZOCANT, CANTC,HVD_COSTO_TOT, HVD_RECHAZO, HVD_CODPROMO from HIST_VENTAS where HVD_CLIENTE in (select cuenta from cuentaa) AND BCAJAS = 0 and HVD_CODPROMO <> '"+__c.SmartStringFormatter("",(Object)(_subs._traealmacen /*String*/ (ba)))+"'"))));
RDebugUtils.currentLine=11862180;
 //BA.debugLineNum = 11862180;BA.debugLine="Private Cuenta2 As String = 0";
_cuenta2 = BA.NumberToString(0);
RDebugUtils.currentLine=11862181;
 //BA.debugLineNum = 11862181;BA.debugLine="Private arti2 As String = 0";
_arti2 = BA.NumberToString(0);
RDebugUtils.currentLine=11862182;
 //BA.debugLineNum = 11862182;BA.debugLine="If vc4.RowCount > 0 Then";
if (_vc4.getRowCount()>0) { 
RDebugUtils.currentLine=11862184;
 //BA.debugLineNum = 11862184;BA.debugLine="For i = 0 To vc4.RowCount - 1";
{
final int step134 = 1;
final int limit134 = (int) (_vc4.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit134 ;_i = _i + step134 ) {
RDebugUtils.currentLine=11862185;
 //BA.debugLineNum = 11862185;BA.debugLine="vc4.Position = i";
_vc4.setPosition(_i);
RDebugUtils.currentLine=11862186;
 //BA.debugLineNum = 11862186;BA.debugLine="If vc4.GetString(\"HVD_PROID\") <> vc4.GetString(";
if ((_vc4.GetString("HVD_PROID")).equals(_vc4.GetString("HVD_CODPROMO")) == false) { 
RDebugUtils.currentLine=11862187;
 //BA.debugLineNum = 11862187;BA.debugLine="If vc4.GetString(\"HVD_RECHAZO\") = 0 Then";
if ((_vc4.GetString("HVD_RECHAZO")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=11862188;
 //BA.debugLineNum = 11862188;BA.debugLine="Cuenta2 = Cuenta2 + vc4.GetString(\"HVD_COSTO_";
_cuenta2 = BA.NumberToString((double)(Double.parseDouble(_cuenta2))+(double)(Double.parseDouble(_vc4.GetString("HVD_COSTO_TOT"))));
RDebugUtils.currentLine=11862189;
 //BA.debugLineNum = 11862189;BA.debugLine="arti2 = arti2 + vc4.GetString(\"HVD_CANT\")";
_arti2 = BA.NumberToString((double)(Double.parseDouble(_arti2))+(double)(Double.parseDouble(_vc4.GetString("HVD_CANT"))));
 }else {
RDebugUtils.currentLine=11862191;
 //BA.debugLineNum = 11862191;BA.debugLine="Private vc5 As Cursor = Starter.skmt.ExecQuer";
_vc5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc5 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select CAT_GP_PRECIO from CAT_GUNAPROD where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_vc4.GetString("HVD_PROID")))+"'"))));
RDebugUtils.currentLine=11862192;
 //BA.debugLineNum = 11862192;BA.debugLine="If vc5.RowCount > 0 Then";
if (_vc5.getRowCount()>0) { 
RDebugUtils.currentLine=11862193;
 //BA.debugLineNum = 11862193;BA.debugLine="vc5.Position= 0";
_vc5.setPosition((int) (0));
RDebugUtils.currentLine=11862195;
 //BA.debugLineNum = 11862195;BA.debugLine="Cuenta2 = Cuenta2 +((vc4.GetString(\"HVD_CANT";
_cuenta2 = BA.NumberToString((double)(Double.parseDouble(_cuenta2))+(((double)(Double.parseDouble(_vc4.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc4.GetString("HVD_RECHAZOCANT"))))*(double)(Double.parseDouble(_vc5.GetString("CAT_GP_PRECIO")))));
RDebugUtils.currentLine=11862196;
 //BA.debugLineNum = 11862196;BA.debugLine="arti2 = arti2 +(vc4.GetString(\"HVD_CANT\")- v";
_arti2 = BA.NumberToString((double)(Double.parseDouble(_arti2))+((double)(Double.parseDouble(_vc4.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc4.GetString("HVD_RECHAZOCANT")))));
 };
 };
 };
 }
};
 };
RDebugUtils.currentLine=11862207;
 //BA.debugLineNum = 11862207;BA.debugLine="Private c4 As Cursor = Starter.skmt.ExecQuery($\"S";
_c4 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c4 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("SELECT IFNULL(PE_CANT,0) AS PE_CANT, iFNULL(PE_COSTO_TOT,0) AS PE_COSTO_TOT FROM PEDIDO WHERE PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND PE_TIPO NOT IN ('SOBRANTE','FALTANTE')"))));
RDebugUtils.currentLine=11862208;
 //BA.debugLineNum = 11862208;BA.debugLine="Private Cuenta3 As String = 0";
_cuenta3 = BA.NumberToString(0);
RDebugUtils.currentLine=11862209;
 //BA.debugLineNum = 11862209;BA.debugLine="Private arti3 As String = 0";
_arti3 = BA.NumberToString(0);
RDebugUtils.currentLine=11862210;
 //BA.debugLineNum = 11862210;BA.debugLine="If c4.RowCount > 0 Then";
if (_c4.getRowCount()>0) { 
RDebugUtils.currentLine=11862211;
 //BA.debugLineNum = 11862211;BA.debugLine="For i = 0 To c4.RowCount -1";
{
final int step155 = 1;
final int limit155 = (int) (_c4.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit155 ;_i = _i + step155 ) {
RDebugUtils.currentLine=11862212;
 //BA.debugLineNum = 11862212;BA.debugLine="c4.Position = i";
_c4.setPosition(_i);
RDebugUtils.currentLine=11862213;
 //BA.debugLineNum = 11862213;BA.debugLine="arti3 = arti3 + c4.GetString(\"PE_CANT\")";
_arti3 = BA.NumberToString((double)(Double.parseDouble(_arti3))+(double)(Double.parseDouble(_c4.GetString("PE_CANT"))));
RDebugUtils.currentLine=11862214;
 //BA.debugLineNum = 11862214;BA.debugLine="Cuenta3 = Cuenta3 + c4.GetString(\"PE_COSTO_TOT\"";
_cuenta3 = BA.NumberToString((double)(Double.parseDouble(_cuenta3))+(double)(Double.parseDouble(_c4.GetString("PE_COSTO_TOT"))));
 }
};
 };
RDebugUtils.currentLine=11862218;
 //BA.debugLineNum = 11862218;BA.debugLine="If Cuenta < 0 Then";
if ((double)(Double.parseDouble(_cuenta))<0) { 
RDebugUtils.currentLine=11862219;
 //BA.debugLineNum = 11862219;BA.debugLine="Cuenta = 0";
_cuenta = BA.NumberToString(0);
 };
RDebugUtils.currentLine=11862221;
 //BA.debugLineNum = 11862221;BA.debugLine="If Cuenta1 < 0 Then";
if ((double)(Double.parseDouble(_cuenta1))<0) { 
RDebugUtils.currentLine=11862222;
 //BA.debugLineNum = 11862222;BA.debugLine="Cuenta = 0";
_cuenta = BA.NumberToString(0);
 };
RDebugUtils.currentLine=11862224;
 //BA.debugLineNum = 11862224;BA.debugLine="If Cuenta2 < 0 Then";
if ((double)(Double.parseDouble(_cuenta2))<0) { 
RDebugUtils.currentLine=11862225;
 //BA.debugLineNum = 11862225;BA.debugLine="Cuenta = 0";
_cuenta = BA.NumberToString(0);
 };
RDebugUtils.currentLine=11862227;
 //BA.debugLineNum = 11862227;BA.debugLine="If Cuenta3 < 0 Then";
if ((double)(Double.parseDouble(_cuenta3))<0) { 
RDebugUtils.currentLine=11862228;
 //BA.debugLineNum = 11862228;BA.debugLine="Cuenta = 0";
_cuenta = BA.NumberToString(0);
 };
RDebugUtils.currentLine=11862231;
 //BA.debugLineNum = 11862231;BA.debugLine="If arti < 0 Then";
if ((double)(Double.parseDouble(_arti))<0) { 
RDebugUtils.currentLine=11862232;
 //BA.debugLineNum = 11862232;BA.debugLine="arti = 0";
_arti = BA.NumberToString(0);
 };
RDebugUtils.currentLine=11862234;
 //BA.debugLineNum = 11862234;BA.debugLine="If arti1 < 0 Then";
if ((double)(Double.parseDouble(_arti1))<0) { 
RDebugUtils.currentLine=11862235;
 //BA.debugLineNum = 11862235;BA.debugLine="arti = 0";
_arti = BA.NumberToString(0);
 };
RDebugUtils.currentLine=11862237;
 //BA.debugLineNum = 11862237;BA.debugLine="If arti2 < 0 Then";
if ((double)(Double.parseDouble(_arti2))<0) { 
RDebugUtils.currentLine=11862238;
 //BA.debugLineNum = 11862238;BA.debugLine="arti = 0";
_arti = BA.NumberToString(0);
 };
RDebugUtils.currentLine=11862240;
 //BA.debugLineNum = 11862240;BA.debugLine="If arti3 < 0 Then";
if ((double)(Double.parseDouble(_arti3))<0) { 
RDebugUtils.currentLine=11862241;
 //BA.debugLineNum = 11862241;BA.debugLine="arti = 0";
_arti = BA.NumberToString(0);
 };
RDebugUtils.currentLine=11862244;
 //BA.debugLineNum = 11862244;BA.debugLine="Log(Cuenta&\",\"&Cuenta1&\",\"&Cuenta2&\",\"&Cuenta3)";
__c.LogImpl("811862244",_cuenta+","+_cuenta1+","+_cuenta2+","+_cuenta3,0);
RDebugUtils.currentLine=11862245;
 //BA.debugLineNum = 11862245;BA.debugLine="Log(arti&\",\"&arti1&\",\"&arti2&\",\"&arti3)";
__c.LogImpl("811862245",_arti+","+_arti1+","+_arti2+","+_arti3,0);
RDebugUtils.currentLine=11862246;
 //BA.debugLineNum = 11862246;BA.debugLine="If Cuenta + Cuenta1 + Cuenta2 + Cuenta3 < 0 Then";
if ((double)(Double.parseDouble(_cuenta))+(double)(Double.parseDouble(_cuenta1))+(double)(Double.parseDouble(_cuenta2))+(double)(Double.parseDouble(_cuenta3))<0) { 
RDebugUtils.currentLine=11862247;
 //BA.debugLineNum = 11862247;BA.debugLine="L_TOTAL.Text = 0";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(0));
 }else {
RDebugUtils.currentLine=11862249;
 //BA.debugLineNum = 11862249;BA.debugLine="L_TOTAL.Text = NumberFormat2((Cuenta + Cuenta1 +";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.NumberFormat2(((double)(Double.parseDouble(_cuenta))+(double)(Double.parseDouble(_cuenta1))+(double)(Double.parseDouble(_cuenta2))+(double)(Double.parseDouble(_cuenta3))),(int) (0),(int) (2),(int) (2),__c.True)));
 };
RDebugUtils.currentLine=11862251;
 //BA.debugLineNum = 11862251;BA.debugLine="If arti + arti1 +arti2 + arti3 < 0 Then";
if ((double)(Double.parseDouble(_arti))+(double)(Double.parseDouble(_arti1))+(double)(Double.parseDouble(_arti2))+(double)(Double.parseDouble(_arti3))<0) { 
RDebugUtils.currentLine=11862252;
 //BA.debugLineNum = 11862252;BA.debugLine="L_CANT.Text = 0";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(0));
 }else {
RDebugUtils.currentLine=11862254;
 //BA.debugLineNum = 11862254;BA.debugLine="L_CANT.Text = NumberFormat2((arti + arti1 +arti2";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.NumberFormat2(((double)(Double.parseDouble(_arti))+(double)(Double.parseDouble(_arti1))+(double)(Double.parseDouble(_arti2))+(double)(Double.parseDouble(_arti3))),(int) (0),(int) (0),(int) (0),__c.True)));
 };
RDebugUtils.currentLine=11862258;
 //BA.debugLineNum = 11862258;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmasc_click(reparto_izca.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "b_prodmasc_click", false))
	 {return ((String) Debug.delegate(ba, "b_prodmasc_click", null));}
int _index = 0;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl0 = null;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lacantc = null;
anywheresoftware.b4a.objects.collections.List _estetag = null;
String _maxprods = "";
RDebugUtils.currentLine=12779520;
 //BA.debugLineNum = 12779520;BA.debugLine="Private Sub b_prodMasC_Click";
RDebugUtils.currentLine=12779521;
 //BA.debugLineNum = 12779521;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=12779523;
 //BA.debugLineNum = 12779523;BA.debugLine="LogColor(\"b_prodMas_Click\", Colors.Magenta)";
__c.LogImpl("812779523","b_prodMas_Click",__c.Colors.Magenta);
RDebugUtils.currentLine=12779524;
 //BA.debugLineNum = 12779524;BA.debugLine="Dim index As Int = clv_pedido.GetItemFromView(Sen";
_index = __ref._clv_pedido /*b4a.example3.customlistview*/ ._getitemfromview((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__c.Sender(ba))));
RDebugUtils.currentLine=12779525;
 //BA.debugLineNum = 12779525;BA.debugLine="Dim pnl0 As B4XView = clv_pedido.GetPanel(index)";
_pnl0 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl0 = __ref._clv_pedido /*b4a.example3.customlistview*/ ._getpanel(_index);
RDebugUtils.currentLine=12779526;
 //BA.debugLineNum = 12779526;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=12779527;
 //BA.debugLineNum = 12779527;BA.debugLine="Dim laCantc As B4XView = pnl.GetView(3).GetView(3";
_lacantc = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacantc = _pnl.GetView((int) (3)).GetView((int) (3));
RDebugUtils.currentLine=12779531;
 //BA.debugLineNum = 12779531;BA.debugLine="Dim esteTag As List = Regex.Split(\"\\|\", laCantc.T";
_estetag = new anywheresoftware.b4a.objects.collections.List();
_estetag = anywheresoftware.b4a.keywords.Common.ArrayToList(__c.Regex.Split("\\|",BA.ObjectToString(_lacantc.getTag())));
RDebugUtils.currentLine=12779532;
 //BA.debugLineNum = 12779532;BA.debugLine="Log(\"LC_TEXT:\"&laCantc.Text&\"|LC_TAG:\"&laCantc.Ta";
__c.LogImpl("812779532","LC_TEXT:"+_lacantc.getText()+"|LC_TAG:"+BA.ObjectToString(_lacantc.getTag())+"|ET:"+BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=12779533;
 //BA.debugLineNum = 12779533;BA.debugLine="If laCantc.Text = \"\" Then laCantc.Text = 0";
if ((_lacantc.getText()).equals("")) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=12779535;
 //BA.debugLineNum = 12779535;BA.debugLine="Private maxProds As String = (esteTag.Get(1) + es";
_maxprods = BA.NumberToString(((double)(BA.ObjectToNumber(_estetag.Get((int) (1))))+(double)(BA.ObjectToNumber(_estetag.Get((int) (4))))));
RDebugUtils.currentLine=12779536;
 //BA.debugLineNum = 12779536;BA.debugLine="LogColor(esteTag.Get(1),Colors.Red)";
__c.LogImpl("812779536",BA.ObjectToString(_estetag.Get((int) (1))),__c.Colors.Red);
RDebugUtils.currentLine=12779537;
 //BA.debugLineNum = 12779537;BA.debugLine="LogColor(esteTag.Get(4),Colors.Red)";
__c.LogImpl("812779537",BA.ObjectToString(_estetag.Get((int) (4))),__c.Colors.Red);
RDebugUtils.currentLine=12779538;
 //BA.debugLineNum = 12779538;BA.debugLine="LogColor($\"++++++++++++++++++++++++++   ${esteTag";
__c.LogImpl("812779538",("++++++++++++++++++++++++++   "+__c.SmartStringFormatter("",(Object)(_estetag.getObject()))+""),__c.Colors.Green);
RDebugUtils.currentLine=12779540;
 //BA.debugLineNum = 12779540;BA.debugLine="Log(maxProds)";
__c.LogImpl("812779540",_maxprods,0);
RDebugUtils.currentLine=12779543;
 //BA.debugLineNum = 12779543;BA.debugLine="If esteTag.Get(7) <> \"1\" Then";
if ((_estetag.Get((int) (7))).equals((Object)("1")) == false) { 
RDebugUtils.currentLine=12779546;
 //BA.debugLineNum = 12779546;BA.debugLine="If laCantc.Text + 1 <= maxProds Then";
if ((double)(Double.parseDouble(_lacantc.getText()))+1<=(double)(Double.parseDouble(_maxprods))) { 
RDebugUtils.currentLine=12779547;
 //BA.debugLineNum = 12779547;BA.debugLine="Log($\"NuevaCant = ${laCantc.Text + 1}\"$)";
__c.LogImpl("812779547",("NuevaCant = "+__c.SmartStringFormatter("",(Object)((double)(Double.parseDouble(_lacantc.getText()))+1))+""),0);
RDebugUtils.currentLine=12779548;
 //BA.debugLineNum = 12779548;BA.debugLine="laCantc.Text = $\"$1.0{laCantc.Text + 1}\"$";
_lacantc.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.0",(Object)((double)(Double.parseDouble(_lacantc.getText()))+1))+"")));
RDebugUtils.currentLine=12779550;
 //BA.debugLineNum = 12779550;BA.debugLine="Log(laCantc.Text)";
__c.LogImpl("812779550",_lacantc.getText(),0);
RDebugUtils.currentLine=12779551;
 //BA.debugLineNum = 12779551;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTAS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 1,  HVD_RECHAZOCANT = IFNULL(HVD_RECHAZOCANT,0) -(1 * "+__c.SmartStringFormatter("",(Object)(_subs._traeconversion /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (2))))))+")  WHERE HVD_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and HVD_cliente in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
RDebugUtils.currentLine=12779559;
 //BA.debugLineNum = 12779559;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 };
RDebugUtils.currentLine=12779562;
 //BA.debugLineNum = 12779562;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmenos_click(reparto_izca.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "b_prodmenos_click", false))
	 {return ((String) Debug.delegate(ba, "b_prodmenos_click", null));}
int _index = 0;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl0 = null;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lacant = null;
anywheresoftware.b4a.objects.collections.List _estetag = null;
String _minimoadesc = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _minimos = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c3 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c2 = null;
float _preciou = 0f;
RDebugUtils.currentLine=12386304;
 //BA.debugLineNum = 12386304;BA.debugLine="Sub b_prodMenos_Click";
RDebugUtils.currentLine=12386305;
 //BA.debugLineNum = 12386305;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=12386306;
 //BA.debugLineNum = 12386306;BA.debugLine="Log(\"etCantHasFocus=\" & etCantHasFocus)";
__c.LogImpl("812386306","etCantHasFocus="+BA.ObjectToString(__ref._etcanthasfocus /*boolean*/ ),0);
RDebugUtils.currentLine=12386307;
 //BA.debugLineNum = 12386307;BA.debugLine="LogColor(\"b_prodMenos_Click\", Colors.Magenta)";
__c.LogImpl("812386307","b_prodMenos_Click",__c.Colors.Magenta);
RDebugUtils.currentLine=12386308;
 //BA.debugLineNum = 12386308;BA.debugLine="Dim index As Int = clv_pedido.GetItemFromView(Sen";
_index = __ref._clv_pedido /*b4a.example3.customlistview*/ ._getitemfromview((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__c.Sender(ba))));
RDebugUtils.currentLine=12386309;
 //BA.debugLineNum = 12386309;BA.debugLine="Dim pnl0 As B4XView = clv_pedido.GetPanel(index)";
_pnl0 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl0 = __ref._clv_pedido /*b4a.example3.customlistview*/ ._getpanel(_index);
RDebugUtils.currentLine=12386310;
 //BA.debugLineNum = 12386310;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=12386311;
 //BA.debugLineNum = 12386311;BA.debugLine="Dim laCant As B4XView = pnl.GetView(2).GetView(3)";
_lacant = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacant = _pnl.GetView((int) (2)).GetView((int) (3));
RDebugUtils.currentLine=12386313;
 //BA.debugLineNum = 12386313;BA.debugLine="Dim esteTag As List = Regex.Split(\"\\|\", laCant.Ta";
_estetag = new anywheresoftware.b4a.objects.collections.List();
_estetag = anywheresoftware.b4a.keywords.Common.ArrayToList(__c.Regex.Split("\\|",BA.ObjectToString(_lacant.getTag())));
RDebugUtils.currentLine=12386314;
 //BA.debugLineNum = 12386314;BA.debugLine="Log(\"LC_TEXT:\"&laCant.Text&\"|PROMO:\"&esteTag.Get(";
__c.LogImpl("812386314","LC_TEXT:"+_lacant.getText()+"|PROMO:"+BA.ObjectToString(_estetag.Get((int) (3)))+"|LC_TAG:"+BA.ObjectToString(_lacant.getTag())+"|ET:"+BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=12386315;
 //BA.debugLineNum = 12386315;BA.debugLine="Private minimoadesc As String";
_minimoadesc = "";
RDebugUtils.currentLine=12386316;
 //BA.debugLineNum = 12386316;BA.debugLine="Dim minimos As Cursor = Starter.skmt.ExecQuery2(\"";
_minimos = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_minimos = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT * FROM CAT_GUNAPROD3 WHERE CAT_GP_ID = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2)))})));
RDebugUtils.currentLine=12386317;
 //BA.debugLineNum = 12386317;BA.debugLine="If minimos.RowCount > 0 Then";
if (_minimos.getRowCount()>0) { 
RDebugUtils.currentLine=12386318;
 //BA.debugLineNum = 12386318;BA.debugLine="minimos.Position = 0";
_minimos.setPosition((int) (0));
RDebugUtils.currentLine=12386319;
 //BA.debugLineNum = 12386319;BA.debugLine="minimoadesc = minimos.GetString(\"CAT_DP_CANT_MIN";
_minimoadesc = _minimos.GetString("CAT_DP_CANT_MIN_VENTA");
 }else {
RDebugUtils.currentLine=12386321;
 //BA.debugLineNum = 12386321;BA.debugLine="minimoadesc = \"1\"";
_minimoadesc = "1";
 };
RDebugUtils.currentLine=12386323;
 //BA.debugLineNum = 12386323;BA.debugLine="minimos.Close";
_minimos.Close();
RDebugUtils.currentLine=12386325;
 //BA.debugLineNum = 12386325;BA.debugLine="minimoadesc = \"1\"";
_minimoadesc = "1";
RDebugUtils.currentLine=12386326;
 //BA.debugLineNum = 12386326;BA.debugLine="If esteTag.Get(7) = \"1\" Then";
if ((_estetag.Get((int) (7))).equals((Object)("1"))) { 
RDebugUtils.currentLine=12386327;
 //BA.debugLineNum = 12386327;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=12386328;
 //BA.debugLineNum = 12386328;BA.debugLine="laCant.Text = $\"$1.0{laCant.Text-1}\"$";
_lacant.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.0",(Object)((double)(Double.parseDouble(_lacant.getText()))-1))+"")));
RDebugUtils.currentLine=12386329;
 //BA.debugLineNum = 12386329;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0";
if ((double)(Double.parseDouble(_lacant.getText()))<0) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=12386330;
 //BA.debugLineNum = 12386330;BA.debugLine="Private c3 As Cursor = Starter.skmt.ExecQuery2(\"";
_c3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c3 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT PE_CANT FROM PEDIDO WHERE PE_PROID = ? AND PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND CONSECUTIVO = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2))),BA.ObjectToString(_estetag.Get((int) (8)))})));
RDebugUtils.currentLine=12386331;
 //BA.debugLineNum = 12386331;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=12386332;
 //BA.debugLineNum = 12386332;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
RDebugUtils.currentLine=12386333;
 //BA.debugLineNum = 12386333;BA.debugLine="If c3.GetString(\"PE_CANT\") > minimoadesc Then";
if ((double)(Double.parseDouble(_c3.GetString("PE_CANT")))>(double)(Double.parseDouble(_minimoadesc))) { 
RDebugUtils.currentLine=12386334;
 //BA.debugLineNum = 12386334;BA.debugLine="Private c2 As Cursor = Starter.skmt.ExecQuery2";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT * FROM CAT_GUNAPROD WHERE CAT_GP_ID = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2)))})));
RDebugUtils.currentLine=12386335;
 //BA.debugLineNum = 12386335;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=12386336;
 //BA.debugLineNum = 12386336;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=12386338;
 //BA.debugLineNum = 12386338;BA.debugLine="Starter.skmt.ExecNonQuery($\"update PEDIDO set";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update PEDIDO set PE_CANT = IFNULL(PE_CANT,0)-(1*'"+__c.SmartStringFormatter("",(Object)(_minimoadesc))+"'), PE_COSTO_TOT= ((IFNULL(PE_CANT,0) -(1*'"+__c.SmartStringFormatter("",(Object)(_minimoadesc))+"'))*'"+__c.SmartStringFormatter("",(Object)(_c2.GetString("CAT_GP_PRECIO")))+"') WHERE PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa) and CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
 };
 }else 
{RDebugUtils.currentLine=12386340;
 //BA.debugLineNum = 12386340;BA.debugLine="Else If c3.GetString(\"PE_CANT\") = minimoadesc T";
if ((_c3.GetString("PE_CANT")).equals(_minimoadesc)) { 
RDebugUtils.currentLine=12386341;
 //BA.debugLineNum = 12386341;BA.debugLine="Private c2 As Cursor = Starter.skmt.ExecQuery2";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT * FROM CAT_GUNAPROD WHERE CAT_GP_ID = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2)))})));
RDebugUtils.currentLine=12386342;
 //BA.debugLineNum = 12386342;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=12386343;
 //BA.debugLineNum = 12386343;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=12386346;
 //BA.debugLineNum = 12386346;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from PEDID";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from PEDIDO where PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
 };
 }}
;
 };
RDebugUtils.currentLine=12386353;
 //BA.debugLineNum = 12386353;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 }else {
RDebugUtils.currentLine=12386356;
 //BA.debugLineNum = 12386356;BA.debugLine="If esteTag.Get(5) = esteTag.Get(6) Then";
if ((_estetag.Get((int) (5))).equals(_estetag.Get((int) (6)))) { 
RDebugUtils.currentLine=12386357;
 //BA.debugLineNum = 12386357;BA.debugLine="If laCant.Text > 0 Then";
if ((double)(Double.parseDouble(_lacant.getText()))>0) { 
RDebugUtils.currentLine=12386358;
 //BA.debugLineNum = 12386358;BA.debugLine="If esteTag.Get(3) <> Subs.traeAlmacen Then 'Si";
if ((_estetag.Get((int) (3))).equals((Object)(_subs._traealmacen /*String*/ (ba))) == false) { 
RDebugUtils.currentLine=12386359;
 //BA.debugLineNum = 12386359;BA.debugLine="Private c2 As Cursor =Starter.skmt.ExecQuery(";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select HVD_RECHAZO FROM HIST_VENTAS WHERE HVD_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' AND HVD_CLIENTE IN (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"))));
RDebugUtils.currentLine=12386360;
 //BA.debugLineNum = 12386360;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=12386361;
 //BA.debugLineNum = 12386361;BA.debugLine="If c2.GetString(\"HVD_RECHAZO\") = \"0\" Then";
if ((_c2.GetString("HVD_RECHAZO")).equals("0")) { 
RDebugUtils.currentLine=12386364;
 //BA.debugLineNum = 12386364;BA.debugLine="Log(\"ES PROMO\")";
__c.LogImpl("812386364","ES PROMO",0);
RDebugUtils.currentLine=12386365;
 //BA.debugLineNum = 12386365;BA.debugLine="Log(esteTag.Get(3))";
__c.LogImpl("812386365",BA.ObjectToString(_estetag.Get((int) (3))),0);
RDebugUtils.currentLine=12386366;
 //BA.debugLineNum = 12386366;BA.debugLine="result =  Msgbox2(\"Si se modifica una promoc";
__ref._result /*String*/  = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Si se modifica una promoción, la promoción se rompe y solo quedarán los productos sueltos, ¿seguro que desea continuar?"),BA.ObjectToCharSequence("Modificar Promoción"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
RDebugUtils.currentLine=12386367;
 //BA.debugLineNum = 12386367;BA.debugLine="If result = DialogResponse.POSITIVE Then 'Qu";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=12386368;
 //BA.debugLineNum = 12386368;BA.debugLine="prodsMap.Remove(esteTag.Get(3))";
__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Remove(_estetag.Get((int) (3)));
RDebugUtils.currentLine=12386372;
 //BA.debugLineNum = 12386372;BA.debugLine="LogColor(esteTag.Get(3),Colors.Blue)";
__c.LogImpl("812386372",BA.ObjectToString(_estetag.Get((int) (3))),__c.Colors.Blue);
RDebugUtils.currentLine=12386375;
 //BA.debugLineNum = 12386375;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VEN";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 1,  HVD_RECHAZOCANT = HVD_CANT  WHERE  HVD_CODPROMO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (3)))+"' and HVD_CLIENTE in (Select CUENTA from cuentaa)"));
RDebugUtils.currentLine=12386376;
 //BA.debugLineNum = 12386376;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VEN";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 2,  HVD_RECHAZOCANT = HVD_CANT  WHERE HVD_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (3)))+"' and HVD_CODPROMO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (3)))+"' and HVD_CLIENTE in (Select CUENTA from cuentaa)"));
RDebugUtils.currentLine=12386379;
 //BA.debugLineNum = 12386379;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=12386380;
 //BA.debugLineNum = 12386380;BA.debugLine="LogColor(prodsMap, Colors.red)";
__c.LogImpl("812386380",BA.ObjectToString(__ref._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ ),__c.Colors.Red);
RDebugUtils.currentLine=12386381;
 //BA.debugLineNum = 12386381;BA.debugLine="reconstruirPedido = True";
__ref._reconstruirpedido /*boolean*/  = __c.True;
RDebugUtils.currentLine=12386382;
 //BA.debugLineNum = 12386382;BA.debugLine="promoABorrar = esteTag.Get(3)";
__ref._promoaborrar /*String*/  = BA.ObjectToString(_estetag.Get((int) (3)));
RDebugUtils.currentLine=12386383;
 //BA.debugLineNum = 12386383;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }else {
RDebugUtils.currentLine=12386386;
 //BA.debugLineNum = 12386386;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=12386387;
 //BA.debugLineNum = 12386387;BA.debugLine="laCant.Text = $\"$1.0{laCant.Text-1}\"$";
_lacant.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.0",(Object)((double)(Double.parseDouble(_lacant.getText()))-1))+"")));
RDebugUtils.currentLine=12386388;
 //BA.debugLineNum = 12386388;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0";
if ((double)(Double.parseDouble(_lacant.getText()))<0) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=12386389;
 //BA.debugLineNum = 12386389;BA.debugLine="Log(\"NO ES promo\")";
__c.LogImpl("812386389","NO ES promo",0);
RDebugUtils.currentLine=12386390;
 //BA.debugLineNum = 12386390;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENT";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 1,  HVD_RECHAZOCANT = IFNULL(HVD_RECHAZOCANT,0) + (1*'"+__c.SmartStringFormatter("",(Object)(_minimoadesc))+"')  WHERE HVD_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and HVD_cliente in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
RDebugUtils.currentLine=12386391;
 //BA.debugLineNum = 12386391;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update cat_gunap";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen + 1 where cat_gp_id = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{_estetag.Get((int) (2))}));
RDebugUtils.currentLine=12386392;
 //BA.debugLineNum = 12386392;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }else {
RDebugUtils.currentLine=12386395;
 //BA.debugLineNum = 12386395;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=12386396;
 //BA.debugLineNum = 12386396;BA.debugLine="laCant.Text = $\"$1.0{laCant.Text-1}\"$";
_lacant.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.0",(Object)((double)(Double.parseDouble(_lacant.getText()))-1))+"")));
RDebugUtils.currentLine=12386397;
 //BA.debugLineNum = 12386397;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0";
if ((double)(Double.parseDouble(_lacant.getText()))<0) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=12386398;
 //BA.debugLineNum = 12386398;BA.debugLine="Log(\"NO ES promo\")";
__c.LogImpl("812386398","NO ES promo",0);
RDebugUtils.currentLine=12386399;
 //BA.debugLineNum = 12386399;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTA";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 1,  HVD_RECHAZOCANT = IFNULL(HVD_RECHAZOCANT,0) + (1*'"+__c.SmartStringFormatter("",(Object)(_minimoadesc))+"'), BCAJAS = 0, CANTC = 0  WHERE HVD_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and HVD_cliente in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
RDebugUtils.currentLine=12386400;
 //BA.debugLineNum = 12386400;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update cat_gunapr";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen + 1 where cat_gp_id = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{_estetag.Get((int) (2))}));
RDebugUtils.currentLine=12386401;
 //BA.debugLineNum = 12386401;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 };
 }else {
RDebugUtils.currentLine=12386406;
 //BA.debugLineNum = 12386406;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=12386407;
 //BA.debugLineNum = 12386407;BA.debugLine="laCant.Text = $\"$1.0{laCant.Text-1}\"$";
_lacant.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.0",(Object)((double)(Double.parseDouble(_lacant.getText()))-1))+"")));
RDebugUtils.currentLine=12386408;
 //BA.debugLineNum = 12386408;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0";
if ((double)(Double.parseDouble(_lacant.getText()))<0) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=12386409;
 //BA.debugLineNum = 12386409;BA.debugLine="Log(\"NO ES promo\")";
__c.LogImpl("812386409","NO ES promo",0);
RDebugUtils.currentLine=12386414;
 //BA.debugLineNum = 12386414;BA.debugLine="Private c3 As Cursor = Starter.skmt.ExecQuery2(";
_c3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c3 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT PE_CANT FROM PEDIDO WHERE PE_PROID = ? AND PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND CONSECUTIVO = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2))),BA.ObjectToString(_estetag.Get((int) (8)))})));
RDebugUtils.currentLine=12386415;
 //BA.debugLineNum = 12386415;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=12386416;
 //BA.debugLineNum = 12386416;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
RDebugUtils.currentLine=12386417;
 //BA.debugLineNum = 12386417;BA.debugLine="If c3.GetString(\"PE_CANT\") > 1 Then";
if ((double)(Double.parseDouble(_c3.GetString("PE_CANT")))>1) { 
RDebugUtils.currentLine=12386418;
 //BA.debugLineNum = 12386418;BA.debugLine="Private c2 As Cursor = Starter.skmt.ExecQuery";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT * FROM CAT_GUNAPROD WHERE CAT_GP_ID = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2)))})));
RDebugUtils.currentLine=12386419;
 //BA.debugLineNum = 12386419;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=12386420;
 //BA.debugLineNum = 12386420;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=12386421;
 //BA.debugLineNum = 12386421;BA.debugLine="Starter.skmt.ExecNonQuery($\"update PEDIDO se";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update PEDIDO set PE_CANT = IFNULL(PE_CANT,0)-(1*'"+__c.SmartStringFormatter("",(Object)(_minimoadesc))+"'), PE_COSTO_TOT= ((IFNULL(PE_CANT,0) -(1*'"+__c.SmartStringFormatter("",(Object)(_minimoadesc))+"'))*'"+__c.SmartStringFormatter("",(Object)(_c2.GetString("CAT_GP_PRECIO")))+"') WHERE PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
 };
 }else 
{RDebugUtils.currentLine=12386423;
 //BA.debugLineNum = 12386423;BA.debugLine="Else If c3.GetString(\"PE_CANT\") = 1 Then";
if ((_c3.GetString("PE_CANT")).equals(BA.NumberToString(1))) { 
RDebugUtils.currentLine=12386424;
 //BA.debugLineNum = 12386424;BA.debugLine="Private c2 As Cursor = Starter.skmt.ExecQuery";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT * FROM CAT_GUNAPROD WHERE CAT_GP_ID = ?",new String[]{BA.ObjectToString(_estetag.Get((int) (2)))})));
RDebugUtils.currentLine=12386425;
 //BA.debugLineNum = 12386425;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=12386426;
 //BA.debugLineNum = 12386426;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=12386427;
 //BA.debugLineNum = 12386427;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from PEDI";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from PEDIDO where PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
 };
 }}
;
 };
RDebugUtils.currentLine=12386431;
 //BA.debugLineNum = 12386431;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 };
RDebugUtils.currentLine=12386434;
 //BA.debugLineNum = 12386434;BA.debugLine="Dim preciou As Float = esteTag.Get(0)/esteTag.Get";
_preciou = (float) ((double)(BA.ObjectToNumber(_estetag.Get((int) (0))))/(double)(double)(BA.ObjectToNumber(_estetag.Get((int) (1)))));
RDebugUtils.currentLine=12386435;
 //BA.debugLineNum = 12386435;BA.debugLine="Log(\"PU: \" & preciou)";
__c.LogImpl("812386435","PU: "+BA.NumberToString(_preciou),0);
RDebugUtils.currentLine=12386446;
 //BA.debugLineNum = 12386446;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmenosc_click(reparto_izca.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "b_prodmenosc_click", false))
	 {return ((String) Debug.delegate(ba, "b_prodmenosc_click", null));}
int _index = 0;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl0 = null;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl = null;
anywheresoftware.b4a.objects.B4XViewWrapper _lacantc = null;
anywheresoftware.b4a.objects.collections.List _estetag = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c3 = null;
float _preciou = 0f;
RDebugUtils.currentLine=12845056;
 //BA.debugLineNum = 12845056;BA.debugLine="Private Sub b_prodMenosC_Click";
RDebugUtils.currentLine=12845057;
 //BA.debugLineNum = 12845057;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=12845058;
 //BA.debugLineNum = 12845058;BA.debugLine="Log(\"etCantHasFocus=\" & etCantHasFocus)";
__c.LogImpl("812845058","etCantHasFocus="+BA.ObjectToString(__ref._etcanthasfocus /*boolean*/ ),0);
RDebugUtils.currentLine=12845059;
 //BA.debugLineNum = 12845059;BA.debugLine="LogColor(\"b_prodMenos_Click\", Colors.Magenta)";
__c.LogImpl("812845059","b_prodMenos_Click",__c.Colors.Magenta);
RDebugUtils.currentLine=12845060;
 //BA.debugLineNum = 12845060;BA.debugLine="Dim index As Int = clv_pedido.GetItemFromView(Sen";
_index = __ref._clv_pedido /*b4a.example3.customlistview*/ ._getitemfromview((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__c.Sender(ba))));
RDebugUtils.currentLine=12845061;
 //BA.debugLineNum = 12845061;BA.debugLine="Dim pnl0 As B4XView = clv_pedido.GetPanel(index)";
_pnl0 = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl0 = __ref._clv_pedido /*b4a.example3.customlistview*/ ._getpanel(_index);
RDebugUtils.currentLine=12845062;
 //BA.debugLineNum = 12845062;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=12845063;
 //BA.debugLineNum = 12845063;BA.debugLine="Dim laCantc As B4XView = pnl.GetView(3).GetView(3";
_lacantc = new anywheresoftware.b4a.objects.B4XViewWrapper();
_lacantc = _pnl.GetView((int) (3)).GetView((int) (3));
RDebugUtils.currentLine=12845065;
 //BA.debugLineNum = 12845065;BA.debugLine="Dim esteTag As List = Regex.Split(\"\\|\", laCantc.T";
_estetag = new anywheresoftware.b4a.objects.collections.List();
_estetag = anywheresoftware.b4a.keywords.Common.ArrayToList(__c.Regex.Split("\\|",BA.ObjectToString(_lacantc.getTag())));
RDebugUtils.currentLine=12845066;
 //BA.debugLineNum = 12845066;BA.debugLine="Log(\"LC_TEXT:\"&laCantc.Text&\"|PROMO:\"&esteTag.Get";
__c.LogImpl("812845066","LC_TEXT:"+_lacantc.getText()+"|PROMO:"+BA.ObjectToString(_estetag.Get((int) (3)))+"|LC_TAG:"+BA.ObjectToString(_lacantc.getTag())+"|ET:"+BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=12845067;
 //BA.debugLineNum = 12845067;BA.debugLine="Log(esteTag)";
__c.LogImpl("812845067",BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=12845069;
 //BA.debugLineNum = 12845069;BA.debugLine="If esteTag.Get(7) = \"1\" Then";
if ((_estetag.Get((int) (7))).equals((Object)("1"))) { 
RDebugUtils.currentLine=12845070;
 //BA.debugLineNum = 12845070;BA.debugLine="Private c3 As Cursor = Starter.skmt.ExecQuery2(\"";
_c3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c3 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT PE_CAJAS, CONSECUTIVO FROM PEDIDO WHERE PE_PROID = ? AND PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND CONSECUTIVO = ? ",new String[]{BA.ObjectToString(_estetag.Get((int) (2))),BA.ObjectToString(_estetag.Get((int) (8)))})));
RDebugUtils.currentLine=12845071;
 //BA.debugLineNum = 12845071;BA.debugLine="Log(c3.RowCount)";
__c.LogImpl("812845071",BA.NumberToString(_c3.getRowCount()),0);
RDebugUtils.currentLine=12845072;
 //BA.debugLineNum = 12845072;BA.debugLine="Log(esteTag.Get(8))";
__c.LogImpl("812845072",BA.ObjectToString(_estetag.Get((int) (8))),0);
RDebugUtils.currentLine=12845073;
 //BA.debugLineNum = 12845073;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=12845074;
 //BA.debugLineNum = 12845074;BA.debugLine="Log(\"AQUI VEMOS SI ACTUALIZAMOS\")";
__c.LogImpl("812845074","AQUI VEMOS SI ACTUALIZAMOS",0);
RDebugUtils.currentLine=12845075;
 //BA.debugLineNum = 12845075;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
RDebugUtils.currentLine=12845076;
 //BA.debugLineNum = 12845076;BA.debugLine="If c3.GetString(\"PE_CAJAS\") > 1 Then";
if ((double)(Double.parseDouble(_c3.GetString("PE_CAJAS")))>1) { 
RDebugUtils.currentLine=12845077;
 //BA.debugLineNum = 12845077;BA.debugLine="Starter.skmt.ExecNonQuery($\"update PEDIDO set";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update PEDIDO set PE_CANT = (IFNULL(PE_CANT,0)-(1 * '"+__c.SmartStringFormatter("",(Object)(_subs._traeconversion /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (2))))))+"')), PE_COSTO_TOT= ((IFNULL(PE_CAJAS,0)-1) *'"+__c.SmartStringFormatter("",(Object)(_subs._traeprecioc /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (2))))))+"'), PE_CAJAS = IFNULL(PE_CAJAS,0) - 1 WHERE PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_c3.GetString("CONSECUTIVO")))+"'"));
 }else 
{RDebugUtils.currentLine=12845078;
 //BA.debugLineNum = 12845078;BA.debugLine="Else If c3.GetString(\"PE_CAJAS\") = 1 Then";
if ((_c3.GetString("PE_CAJAS")).equals(BA.NumberToString(1))) { 
RDebugUtils.currentLine=12845079;
 //BA.debugLineNum = 12845079;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from PEDIDO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from PEDIDO where PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(_c3.GetString("CONSECUTIVO")))+"'"));
 }}
;
 };
RDebugUtils.currentLine=12845082;
 //BA.debugLineNum = 12845082;BA.debugLine="Log(\"entre al if o algo asi \")";
__c.LogImpl("812845082","entre al if o algo asi ",0);
RDebugUtils.currentLine=12845083;
 //BA.debugLineNum = 12845083;BA.debugLine="If laCantc.Text = \"\" Then laCantc.Text = 0";
if ((_lacantc.getText()).equals("")) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=12845084;
 //BA.debugLineNum = 12845084;BA.debugLine="laCantc.Text = laCantc.Text - 1";
_lacantc.setText(BA.ObjectToCharSequence((double)(Double.parseDouble(_lacantc.getText()))-1));
RDebugUtils.currentLine=12845085;
 //BA.debugLineNum = 12845085;BA.debugLine="If laCantc.Text < 0 Then laCantc.Text = 0";
if ((double)(Double.parseDouble(_lacantc.getText()))<0) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=12845086;
 //BA.debugLineNum = 12845086;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 }else {
RDebugUtils.currentLine=12845091;
 //BA.debugLineNum = 12845091;BA.debugLine="If esteTag.Get(5) = esteTag.Get(6) Then";
if ((_estetag.Get((int) (5))).equals(_estetag.Get((int) (6)))) { 
RDebugUtils.currentLine=12845093;
 //BA.debugLineNum = 12845093;BA.debugLine="If laCantc.Text > 0 Then";
if ((double)(Double.parseDouble(_lacantc.getText()))>0) { 
RDebugUtils.currentLine=12845094;
 //BA.debugLineNum = 12845094;BA.debugLine="Log(\"entre al if o algo asi \")";
__c.LogImpl("812845094","entre al if o algo asi ",0);
RDebugUtils.currentLine=12845095;
 //BA.debugLineNum = 12845095;BA.debugLine="If laCantc.Text = \"\" Then laCantc.Text = 0";
if ((_lacantc.getText()).equals("")) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=12845096;
 //BA.debugLineNum = 12845096;BA.debugLine="laCantc.Text = laCantc.Text - 1";
_lacantc.setText(BA.ObjectToCharSequence((double)(Double.parseDouble(_lacantc.getText()))-1));
RDebugUtils.currentLine=12845097;
 //BA.debugLineNum = 12845097;BA.debugLine="If laCantc.Text < 0 Then laCantc.Text = 0";
if ((double)(Double.parseDouble(_lacantc.getText()))<0) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=12845098;
 //BA.debugLineNum = 12845098;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTAS";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 1,  HVD_RECHAZOCANT = (IFNULL(HVD_RECHAZOCANT,0) +(1 * "+__c.SmartStringFormatter("",(Object)(_subs._traeconversion /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (2))))))+"))  WHERE HVD_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and HVD_cliente in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
RDebugUtils.currentLine=12845099;
 //BA.debugLineNum = 12845099;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update cat_gunapro";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod set cat_gp_almacen = (cat_gp_almacen + (1 * ?)) where cat_gp_id = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{_estetag.Get((int) (2)),(Object)(_subs._traeconversion /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (2)))))}));
RDebugUtils.currentLine=12845100;
 //BA.debugLineNum = 12845100;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 }else 
{RDebugUtils.currentLine=12845101;
 //BA.debugLineNum = 12845101;BA.debugLine="Else If laCantc.Text = 0 Then";
if ((_lacantc.getText()).equals(BA.NumberToString(0))) { 
 }}
;
 }else {
RDebugUtils.currentLine=12845107;
 //BA.debugLineNum = 12845107;BA.debugLine="If laCantc.Text > 0 Then";
if ((double)(Double.parseDouble(_lacantc.getText()))>0) { 
RDebugUtils.currentLine=12845110;
 //BA.debugLineNum = 12845110;BA.debugLine="Private c3 As Cursor = Starter.skmt.ExecQuery2";
_c3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c3 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT PE_CAJAS FROM PEDIDO WHERE PE_PROID = ? AND PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) and CONSECUTIVO = ? ",new String[]{BA.ObjectToString(_estetag.Get((int) (2))),BA.ObjectToString(_estetag.Get((int) (8)))})));
RDebugUtils.currentLine=12845111;
 //BA.debugLineNum = 12845111;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=12845112;
 //BA.debugLineNum = 12845112;BA.debugLine="Log(\"AQUI VEMOS SI ACTUALIZAMOS\")";
__c.LogImpl("812845112","AQUI VEMOS SI ACTUALIZAMOS",0);
RDebugUtils.currentLine=12845113;
 //BA.debugLineNum = 12845113;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
RDebugUtils.currentLine=12845114;
 //BA.debugLineNum = 12845114;BA.debugLine="If c3.GetString(\"PE_CAJAS\") > 1 Then";
if ((double)(Double.parseDouble(_c3.GetString("PE_CAJAS")))>1) { 
RDebugUtils.currentLine=12845115;
 //BA.debugLineNum = 12845115;BA.debugLine="Starter.skmt.ExecNonQuery($\"update PEDIDO se";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update PEDIDO set PE_CANT = (IFNULL(PE_CANT,0)-(1 * '"+__c.SmartStringFormatter("",(Object)(_subs._traeconversion /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (2))))))+"')), PE_COSTO_TOT= ((IFNULL(PE_CAJAS,0)-1) *'"+__c.SmartStringFormatter("",(Object)(_subs._traeprecioc /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (2))))))+"'), PE_CAJAS = IFNULL(PE_CAJAS,0) - 1 WHERE PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
 }else 
{RDebugUtils.currentLine=12845116;
 //BA.debugLineNum = 12845116;BA.debugLine="Else If c3.GetString(\"PE_CAJAS\") = 1 Then";
if ((_c3.GetString("PE_CAJAS")).equals(BA.NumberToString(1))) { 
RDebugUtils.currentLine=12845117;
 //BA.debugLineNum = 12845117;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from PEDI";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from PEDIDO where PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (8)))+"'"));
 }}
;
 };
RDebugUtils.currentLine=12845120;
 //BA.debugLineNum = 12845120;BA.debugLine="Log(\"entre al if o algo asi \")";
__c.LogImpl("812845120","entre al if o algo asi ",0);
RDebugUtils.currentLine=12845121;
 //BA.debugLineNum = 12845121;BA.debugLine="If laCantc.Text = \"\" Then laCantc.Text = 0";
if ((_lacantc.getText()).equals("")) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=12845122;
 //BA.debugLineNum = 12845122;BA.debugLine="laCantc.Text = laCantc.Text - 1";
_lacantc.setText(BA.ObjectToCharSequence((double)(Double.parseDouble(_lacantc.getText()))-1));
RDebugUtils.currentLine=12845123;
 //BA.debugLineNum = 12845123;BA.debugLine="If laCantc.Text < 0 Then laCantc.Text = 0";
if ((double)(Double.parseDouble(_lacantc.getText()))<0) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=12845124;
 //BA.debugLineNum = 12845124;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 }else 
{RDebugUtils.currentLine=12845126;
 //BA.debugLineNum = 12845126;BA.debugLine="Else If laCantc.Text = 0 Then";
if ((_lacantc.getText()).equals(BA.NumberToString(0))) { 
 }}
;
 };
 };
RDebugUtils.currentLine=12845132;
 //BA.debugLineNum = 12845132;BA.debugLine="Dim preciou As Float = esteTag.Get(0)/esteTag.Get";
_preciou = (float) ((double)(BA.ObjectToNumber(_estetag.Get((int) (0))))/(double)(double)(BA.ObjectToNumber(_estetag.Get((int) (1)))));
RDebugUtils.currentLine=12845133;
 //BA.debugLineNum = 12845133;BA.debugLine="Log(\"PU: \" & preciou)";
__c.LogImpl("812845133","PU: "+BA.NumberToString(_preciou),0);
RDebugUtils.currentLine=12845134;
 //BA.debugLineNum = 12845134;BA.debugLine="End Sub";
return "";
}
public String  _b_regresar_click(reparto_izca.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "b_regresar_click", false))
	 {return ((String) Debug.delegate(ba, "b_regresar_click", null));}
RDebugUtils.currentLine=11993088;
 //BA.debugLineNum = 11993088;BA.debugLine="Sub b_regresar_Click";
RDebugUtils.currentLine=11993089;
 //BA.debugLineNum = 11993089;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=11993090;
 //BA.debugLineNum = 11993090;BA.debugLine="End Sub";
return "";
}
public String  _b_revversar_click(reparto_izca.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "b_revversar_click", false))
	 {return ((String) Debug.delegate(ba, "b_revversar_click", null));}
anywheresoftware.b4a.sql.SQL.CursorWrapper _c3 = null;
RDebugUtils.currentLine=12976128;
 //BA.debugLineNum = 12976128;BA.debugLine="Private Sub b_revversar_Click";
RDebugUtils.currentLine=12976129;
 //BA.debugLineNum = 12976129;BA.debugLine="Private c3 As Cursor = Starter.skmt.ExecQuery(\"SE";
_c3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c3 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT * FROM PEDIDO WHERE PE_CLIENTEOR IN (SELECT CUENTA FROM CUENTAA)")));
RDebugUtils.currentLine=12976130;
 //BA.debugLineNum = 12976130;BA.debugLine="If c3.RowCount = 0 Then";
if (_c3.getRowCount()==0) { 
RDebugUtils.currentLine=12976131;
 //BA.debugLineNum = 12976131;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTAS s";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 0,  HVD_RECHAZOCANT = 0, BCAJAS = BCAJAS_OR, CANTC = CANTC_OR  WHERE HVD_cliente in (Select CUENTA from cuentaa)"));
RDebugUtils.currentLine=12976132;
 //BA.debugLineNum = 12976132;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 }else {
RDebugUtils.currentLine=12976134;
 //BA.debugLineNum = 12976134;BA.debugLine="MsgboxAsync(\"Hay productos que ya se vendieron,";
__c.MsgboxAsync(BA.ObjectToCharSequence("Hay productos que ya se vendieron, no se puede regresar la venta"),BA.ObjectToCharSequence("Atención"),ba);
 };
RDebugUtils.currentLine=12976138;
 //BA.debugLineNum = 12976138;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.objects.PanelWrapper  _createlistitem(reparto_izca.keymon.lat.c_detalleventa __ref,String _text,String _preciou,int _inv,int _inv2,int _width,int _height,anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _img,String _prodid,int _bc,int _tc,String _promo,String _cliente_original,String _clienterecha,String _bandera,int _consecutivo) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "createlistitem", false))
	 {return ((anywheresoftware.b4a.objects.PanelWrapper) Debug.delegate(ba, "createlistitem", new Object[] {_text,_preciou,_inv,_inv2,_width,_height,_img,_prodid,_bc,_tc,_promo,_cliente_original,_clienterecha,_bandera,_consecutivo}));}
anywheresoftware.b4a.objects.B4XViewWrapper _p = null;
anywheresoftware.b4a.objects.CSBuilder _cs = null;
RDebugUtils.currentLine=12255232;
 //BA.debugLineNum = 12255232;BA.debugLine="Sub CreateListItem(Text As String, precioU As Stri";
RDebugUtils.currentLine=12255233;
 //BA.debugLineNum = 12255233;BA.debugLine="Dim p As B4XView = xui.CreatePanel(\"\")";
_p = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p = __ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .CreatePanel(ba,"");
RDebugUtils.currentLine=12255234;
 //BA.debugLineNum = 12255234;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=12255235;
 //BA.debugLineNum = 12255235;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=12255236;
 //BA.debugLineNum = 12255236;BA.debugLine="p.SetLayoutAnimated(0, 0, 0, Width, Height)";
_p.SetLayoutAnimated((int) (0),(int) (0),(int) (0),_width,_height);
RDebugUtils.currentLine=12255237;
 //BA.debugLineNum = 12255237;BA.debugLine="p.LoadLayout(\"prodItem2\")";
_p.LoadLayout("prodItem2",ba);
RDebugUtils.currentLine=12255238;
 //BA.debugLineNum = 12255238;BA.debugLine="p_prods.Color = bc";
__ref._p_prods /*anywheresoftware.b4a.objects.PanelWrapper*/ .setColor(_bc);
RDebugUtils.currentLine=12255239;
 //BA.debugLineNum = 12255239;BA.debugLine="l_prodX.TextColor = tc";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor(_tc);
RDebugUtils.currentLine=12255240;
 //BA.debugLineNum = 12255240;BA.debugLine="precioU = $\"$1.2{precioU}\"$";
_preciou = (""+__c.SmartStringFormatter("1.2",(Object)(_preciou))+"");
RDebugUtils.currentLine=12255241;
 //BA.debugLineNum = 12255241;BA.debugLine="l_prodX.Text = Text&CRLF&\"Cant: \" & inv2 & \"   $\"";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_text+__c.CRLF+"Cant: "+BA.NumberToString(_inv2)+"   $"+_preciou));
RDebugUtils.currentLine=12255242;
 //BA.debugLineNum = 12255242;BA.debugLine="If promo <> \"1\" And precioU = 0 Then";
if ((_promo).equals("1") == false && (_preciou).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=12255243;
 //BA.debugLineNum = 12255243;BA.debugLine="l_prodX.Text = cs.Color(Colors.RGB(123,0,0)).app";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_cs.Color(__c.Colors.RGB((int) (123),(int) (0),(int) (0))).Append(BA.ObjectToCharSequence(_text+__c.CRLF+"Cant: "+BA.NumberToString(_inv2)+"   $"+_preciou)).PopAll().getObject()));
 };
RDebugUtils.currentLine=12255245;
 //BA.debugLineNum = 12255245;BA.debugLine="l_prodX.Tag = $\"ID: ${prodId}${CRLF}${Text}${CRLF";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTag((Object)(("ID: "+__c.SmartStringFormatter("",(Object)(_prodid))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+""+__c.SmartStringFormatter("",(Object)(_text))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Precio: $"+__c.SmartStringFormatter("1.2",(Object)(_preciou))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Inv: "+__c.SmartStringFormatter("",(Object)(_inv))+" pzs")));
RDebugUtils.currentLine=12255248;
 //BA.debugLineNum = 12255248;BA.debugLine="l_pCant.Tag = Round2(precioU.Replace(\",\",\"\"),2)&\"";
__ref._l_pcant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTag((Object)(BA.NumberToString(__c.Round2((double)(Double.parseDouble(_preciou.replace(",",""))),(int) (2)))+"|"+BA.NumberToString(_inv)+"|"+_prodid+"|"+_promo+"|"+BA.NumberToString(_inv2)+"|"+_cliente_original+"|"+_clienterecha+"|"+_bandera+"|"+BA.NumberToString(_consecutivo)));
RDebugUtils.currentLine=12255249;
 //BA.debugLineNum = 12255249;BA.debugLine="et_pCant.Tag = Round2(precioU.Replace(\",\",\"\"),2)&";
__ref._et_pcant /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setTag((Object)(BA.NumberToString(__c.Round2((double)(Double.parseDouble(_preciou.replace(",",""))),(int) (2)))+"|"+BA.NumberToString(_inv)+"|"+_prodid+"|"+_promo+"|"+BA.NumberToString(_inv2)+"|"+_cliente_original+"|"+_clienterecha+"|"+_bandera+"|"+BA.NumberToString(_consecutivo)));
RDebugUtils.currentLine=12255250;
 //BA.debugLineNum = 12255250;BA.debugLine="p_prods.Tag = l_pCant.tag";
__ref._p_prods /*anywheresoftware.b4a.objects.PanelWrapper*/ .setTag(__ref._l_pcant /*anywheresoftware.b4a.objects.LabelWrapper*/ .getTag());
RDebugUtils.currentLine=12255252;
 //BA.debugLineNum = 12255252;BA.debugLine="l_pCant.Text = inv";
__ref._l_pcant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_inv));
RDebugUtils.currentLine=12255256;
 //BA.debugLineNum = 12255256;BA.debugLine="l_pCant.BringToFront";
__ref._l_pcant /*anywheresoftware.b4a.objects.LabelWrapper*/ .BringToFront();
RDebugUtils.currentLine=12255257;
 //BA.debugLineNum = 12255257;BA.debugLine="et_pCant.SendToBack";
__ref._et_pcant /*anywheresoftware.b4a.objects.EditTextWrapper*/ .SendToBack();
RDebugUtils.currentLine=12255258;
 //BA.debugLineNum = 12255258;BA.debugLine="p_botMasMenC.Visible = False";
__ref._p_botmasmenc /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=12255259;
 //BA.debugLineNum = 12255259;BA.debugLine="l_cajas.Visible = False";
__ref._l_cajas /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=12255261;
 //BA.debugLineNum = 12255261;BA.debugLine="Return p";
if (true) return (anywheresoftware.b4a.objects.PanelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.PanelWrapper(), (android.view.ViewGroup)(_p.getObject()));
RDebugUtils.currentLine=12255262;
 //BA.debugLineNum = 12255262;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4a.objects.PanelWrapper  _createlistitem2(reparto_izca.keymon.lat.c_detalleventa __ref,String _text,String _preciou,int _inv,int _inv2,int _width,int _height,anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _img,String _prodid,int _bc,int _tc,String _promo,String _cliente_original,String _clienterecha,String _bandera,int _consecutivo) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "createlistitem2", false))
	 {return ((anywheresoftware.b4a.objects.PanelWrapper) Debug.delegate(ba, "createlistitem2", new Object[] {_text,_preciou,_inv,_inv2,_width,_height,_img,_prodid,_bc,_tc,_promo,_cliente_original,_clienterecha,_bandera,_consecutivo}));}
anywheresoftware.b4a.objects.B4XViewWrapper _p = null;
anywheresoftware.b4a.objects.CSBuilder _cs = null;
RDebugUtils.currentLine=12320768;
 //BA.debugLineNum = 12320768;BA.debugLine="Sub CreateListItem2(Text As String, precioU As Str";
RDebugUtils.currentLine=12320769;
 //BA.debugLineNum = 12320769;BA.debugLine="Dim p As B4XView = xui.CreatePanel(\"\")";
_p = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p = __ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .CreatePanel(ba,"");
RDebugUtils.currentLine=12320770;
 //BA.debugLineNum = 12320770;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=12320771;
 //BA.debugLineNum = 12320771;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=12320772;
 //BA.debugLineNum = 12320772;BA.debugLine="p.SetLayoutAnimated(0, 0, 0, Width, Height)";
_p.SetLayoutAnimated((int) (0),(int) (0),(int) (0),_width,_height);
RDebugUtils.currentLine=12320773;
 //BA.debugLineNum = 12320773;BA.debugLine="p.LoadLayout(\"prodItem2\")";
_p.LoadLayout("prodItem2",ba);
RDebugUtils.currentLine=12320774;
 //BA.debugLineNum = 12320774;BA.debugLine="p_prods.Color = bc";
__ref._p_prods /*anywheresoftware.b4a.objects.PanelWrapper*/ .setColor(_bc);
RDebugUtils.currentLine=12320775;
 //BA.debugLineNum = 12320775;BA.debugLine="l_prodX.TextColor = tc";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor(_tc);
RDebugUtils.currentLine=12320776;
 //BA.debugLineNum = 12320776;BA.debugLine="precioU = $\"$1.2{precioU}\"$";
_preciou = (""+__c.SmartStringFormatter("1.2",(Object)(_preciou))+"");
RDebugUtils.currentLine=12320777;
 //BA.debugLineNum = 12320777;BA.debugLine="l_prodX.Text = Text&CRLF&\"Cant: \" & inv2 & \"   $\"";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_text+__c.CRLF+"Cant: "+BA.NumberToString(_inv2)+"   $"+_preciou));
RDebugUtils.currentLine=12320779;
 //BA.debugLineNum = 12320779;BA.debugLine="If promo <> \"1\" And precioU = 0 Then";
if ((_promo).equals("1") == false && (_preciou).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=12320780;
 //BA.debugLineNum = 12320780;BA.debugLine="l_prodX.Text = cs.Color(Colors.RGB(123,0,0)).app";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_cs.Color(__c.Colors.RGB((int) (123),(int) (0),(int) (0))).Append(BA.ObjectToCharSequence(_text+__c.CRLF+"Cant: "+BA.NumberToString(_inv2)+"   $"+_preciou)).PopAll().getObject()));
 };
RDebugUtils.currentLine=12320782;
 //BA.debugLineNum = 12320782;BA.debugLine="l_prodX.Tag = $\"ID: ${prodId}${CRLF}${Text}${CRLF";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTag((Object)(("ID: "+__c.SmartStringFormatter("",(Object)(_prodid))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+""+__c.SmartStringFormatter("",(Object)(_text))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Precio: $"+__c.SmartStringFormatter("1.2",(Object)(_preciou))+""+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Inv: "+__c.SmartStringFormatter("",(Object)(_inv))+" pzs")));
RDebugUtils.currentLine=12320784;
 //BA.debugLineNum = 12320784;BA.debugLine="l_pCantC.Tag = Round2(precioU.Replace(\",\",\"\"),2)&";
__ref._l_pcantc /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTag((Object)(BA.NumberToString(__c.Round2((double)(Double.parseDouble(_preciou.replace(",",""))),(int) (2)))+"|"+BA.NumberToString(_inv)+"|"+_prodid+"|"+_promo+"|"+BA.NumberToString(_inv2)+"|"+_cliente_original+"|"+_clienterecha+"|"+_bandera+"|"+BA.NumberToString(_consecutivo)));
RDebugUtils.currentLine=12320785;
 //BA.debugLineNum = 12320785;BA.debugLine="et_pCantC.Tag = Round2(precioU.Replace(\",\",\"\"),2)";
__ref._et_pcantc /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setTag((Object)(BA.NumberToString(__c.Round2((double)(Double.parseDouble(_preciou.replace(",",""))),(int) (2)))+"|"+BA.NumberToString(_inv)+"|"+_prodid+"|"+_promo+"|"+BA.NumberToString(_inv2)+"|"+_cliente_original+"|"+_clienterecha+"|"+_bandera+"|"+BA.NumberToString(_consecutivo)));
RDebugUtils.currentLine=12320786;
 //BA.debugLineNum = 12320786;BA.debugLine="p_prods.Tag = l_pCantC.tag";
__ref._p_prods /*anywheresoftware.b4a.objects.PanelWrapper*/ .setTag(__ref._l_pcantc /*anywheresoftware.b4a.objects.LabelWrapper*/ .getTag());
RDebugUtils.currentLine=12320788;
 //BA.debugLineNum = 12320788;BA.debugLine="l_pCantC.Text = NumberFormat2(inv/Subs.traeConver";
__ref._l_pcantc /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.NumberFormat2(_inv/(double)(double)(Double.parseDouble(_subs._traeconversion /*String*/ (ba,_prodid))),(int) (0),(int) (0),(int) (0),__c.False)));
RDebugUtils.currentLine=12320792;
 //BA.debugLineNum = 12320792;BA.debugLine="l_pCantC.BringToFront";
__ref._l_pcantc /*anywheresoftware.b4a.objects.LabelWrapper*/ .BringToFront();
RDebugUtils.currentLine=12320793;
 //BA.debugLineNum = 12320793;BA.debugLine="et_pCantC.SendToBack";
__ref._et_pcantc /*anywheresoftware.b4a.objects.EditTextWrapper*/ .SendToBack();
RDebugUtils.currentLine=12320794;
 //BA.debugLineNum = 12320794;BA.debugLine="p_botMasMen.Visible = False";
__ref._p_botmasmen /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=12320795;
 //BA.debugLineNum = 12320795;BA.debugLine="l_piezas.Visible = False";
__ref._l_piezas /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=12320797;
 //BA.debugLineNum = 12320797;BA.debugLine="Return p";
if (true) return (anywheresoftware.b4a.objects.PanelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.PanelWrapper(), (android.view.ViewGroup)(_p.getObject()));
RDebugUtils.currentLine=12320798;
 //BA.debugLineNum = 12320798;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest(reparto_izca.keymon.lat.c_detalleventa __ref) throws Exception{
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "b4xpage_closerequest", false))
	 {return ((anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) Debug.delegate(ba, "b4xpage_closerequest", null));}
ResumableSub_B4XPage_CloseRequest rsub = new ResumableSub_B4XPage_CloseRequest(this,__ref);
rsub.resume(ba, null);
return (anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.keywords.Common.ResumableSubWrapper(), rsub);
}
public static class ResumableSub_B4XPage_CloseRequest extends BA.ResumableSub {
public ResumableSub_B4XPage_CloseRequest(reparto_izca.keymon.lat.c_detalleventa parent,reparto_izca.keymon.lat.c_detalleventa __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
reparto_izca.keymon.lat.c_detalleventa __ref;
reparto_izca.keymon.lat.c_detalleventa parent;

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

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

            }
        }
    }
}
public String  _b4xpage_created(reparto_izca.keymon.lat.c_detalleventa __ref,anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "b4xpage_created", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_created", new Object[] {_root1}));}
RDebugUtils.currentLine=11796480;
 //BA.debugLineNum = 11796480;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=11796481;
 //BA.debugLineNum = 11796481;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=11796482;
 //BA.debugLineNum = 11796482;BA.debugLine="B4XPages.SetTitle(Me, \"Detalle de venta\")";
_b4xpages._settitle /*String*/ (ba,this,(Object)("Detalle de venta"));
RDebugUtils.currentLine=11796484;
 //BA.debugLineNum = 11796484;BA.debugLine="g.Initialize(\"GPS\")";
__ref._g /*anywheresoftware.b4a.gps.GPS*/ .Initialize("GPS");
RDebugUtils.currentLine=11796485;
 //BA.debugLineNum = 11796485;BA.debugLine="Root.LoadLayout(\"detalleVenta\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("detalleVenta",ba);
RDebugUtils.currentLine=11796486;
 //BA.debugLineNum = 11796486;BA.debugLine="b_borra.Visible = False";
__ref._b_borra /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=11796487;
 //BA.debugLineNum = 11796487;BA.debugLine="Titulo.Text = \"Pedido\"";
__ref._titulo /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("Pedido"));
RDebugUtils.currentLine=11796488;
 //BA.debugLineNum = 11796488;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(reparto_izca.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
RDebugUtils.currentLine=11665408;
 //BA.debugLineNum = 11665408;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=11665409;
 //BA.debugLineNum = 11665409;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=11665410;
 //BA.debugLineNum = 11665410;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=11665411;
 //BA.debugLineNum = 11665411;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
RDebugUtils.currentLine=11665412;
 //BA.debugLineNum = 11665412;BA.debugLine="Dim clie_id As String";
_clie_id = "";
RDebugUtils.currentLine=11665413;
 //BA.debugLineNum = 11665413;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
RDebugUtils.currentLine=11665414;
 //BA.debugLineNum = 11665414;BA.debugLine="Dim usuario As String";
_usuario = "";
RDebugUtils.currentLine=11665415;
 //BA.debugLineNum = 11665415;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=11665417;
 //BA.debugLineNum = 11665417;BA.debugLine="Dim b_regresar As Button";
_b_regresar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=11665418;
 //BA.debugLineNum = 11665418;BA.debugLine="Dim ListView1 As ListView";
_listview1 = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=11665419;
 //BA.debugLineNum = 11665419;BA.debugLine="Dim L_CANT As Label";
_l_cant = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=11665420;
 //BA.debugLineNum = 11665420;BA.debugLine="Dim L_TOTAL As Label";
_l_total = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=11665421;
 //BA.debugLineNum = 11665421;BA.debugLine="Dim b_borra As Button";
_b_borra = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=11665422;
 //BA.debugLineNum = 11665422;BA.debugLine="Dim Existe As String";
_existe = "";
RDebugUtils.currentLine=11665423;
 //BA.debugLineNum = 11665423;BA.debugLine="Dim result As String";
_result = "";
RDebugUtils.currentLine=11665425;
 //BA.debugLineNum = 11665425;BA.debugLine="Dim cuantos As String";
_cuantos = "";
RDebugUtils.currentLine=11665426;
 //BA.debugLineNum = 11665426;BA.debugLine="Dim nombre_prod As String";
_nombre_prod = "";
RDebugUtils.currentLine=11665427;
 //BA.debugLineNum = 11665427;BA.debugLine="Dim cuantos_pedido As String";
_cuantos_pedido = "";
RDebugUtils.currentLine=11665428;
 //BA.debugLineNum = 11665428;BA.debugLine="Private Titulo As Label";
_titulo = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=11665429;
 //BA.debugLineNum = 11665429;BA.debugLine="Private P1 As Panel";
_p1 = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=11665430;
 //BA.debugLineNum = 11665430;BA.debugLine="Private lv2 As ListView";
_lv2 = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=11665431;
 //BA.debugLineNum = 11665431;BA.debugLine="Private p_principal As Panel";
_p_principal = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=11665432;
 //BA.debugLineNum = 11665432;BA.debugLine="Dim clv_pedido As CustomListView";
_clv_pedido = new b4a.example3.customlistview();
RDebugUtils.currentLine=11665433;
 //BA.debugLineNum = 11665433;BA.debugLine="Private p_prods As Panel";
_p_prods = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=11665434;
 //BA.debugLineNum = 11665434;BA.debugLine="Private l_prodX As Label";
_l_prodx = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=11665435;
 //BA.debugLineNum = 11665435;BA.debugLine="Private l_pCant As Label";
_l_pcant = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=11665436;
 //BA.debugLineNum = 11665436;BA.debugLine="Private et_pCant As EditText";
_et_pcant = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=11665437;
 //BA.debugLineNum = 11665437;BA.debugLine="Dim bmp As Bitmap";
_bmp = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper();
RDebugUtils.currentLine=11665438;
 //BA.debugLineNum = 11665438;BA.debugLine="Dim etCantHasFocus As Boolean = False";
_etcanthasfocus = __c.False;
RDebugUtils.currentLine=11665439;
 //BA.debugLineNum = 11665439;BA.debugLine="Dim totalProds As Int = 0";
_totalprods = (int) (0);
RDebugUtils.currentLine=11665440;
 //BA.debugLineNum = 11665440;BA.debugLine="Dim totalCompra As Int = 0";
_totalcompra = (int) (0);
RDebugUtils.currentLine=11665441;
 //BA.debugLineNum = 11665441;BA.debugLine="Dim prodsMap As Map";
_prodsmap = new anywheresoftware.b4a.objects.collections.Map();
RDebugUtils.currentLine=11665442;
 //BA.debugLineNum = 11665442;BA.debugLine="Dim reconstruirPedido As Boolean = False";
_reconstruirpedido = __c.False;
RDebugUtils.currentLine=11665443;
 //BA.debugLineNum = 11665443;BA.debugLine="Dim promoABorrar As String";
_promoaborrar = "";
RDebugUtils.currentLine=11665444;
 //BA.debugLineNum = 11665444;BA.debugLine="Private b_guardar As Button";
_b_guardar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=11665445;
 //BA.debugLineNum = 11665445;BA.debugLine="Private b_prodMas As Button";
_b_prodmas = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=11665446;
 //BA.debugLineNum = 11665446;BA.debugLine="Private b_prodMenos As Button";
_b_prodmenos = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=11665447;
 //BA.debugLineNum = 11665447;BA.debugLine="Private b_prodMenosC As Button";
_b_prodmenosc = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=11665448;
 //BA.debugLineNum = 11665448;BA.debugLine="Private l_pCantC As Label";
_l_pcantc = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=11665449;
 //BA.debugLineNum = 11665449;BA.debugLine="Private et_pCantC As EditText";
_et_pcantc = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=11665450;
 //BA.debugLineNum = 11665450;BA.debugLine="Private b_prodMasC As Button";
_b_prodmasc = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=11665451;
 //BA.debugLineNum = 11665451;BA.debugLine="Private p_botMasMenC As Panel";
_p_botmasmenc = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=11665452;
 //BA.debugLineNum = 11665452;BA.debugLine="Private p_botMasMen As Panel";
_p_botmasmen = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=11665453;
 //BA.debugLineNum = 11665453;BA.debugLine="Private l_cajas As Label";
_l_cajas = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=11665454;
 //BA.debugLineNum = 11665454;BA.debugLine="Private l_piezas As Label";
_l_piezas = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=11665455;
 //BA.debugLineNum = 11665455;BA.debugLine="End Sub";
return "";
}
public String  _cuentaprods(reparto_izca.keymon.lat.c_detalleventa __ref,String _accion) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "cuentaprods", false))
	 {return ((String) Debug.delegate(ba, "cuentaprods", new Object[] {_accion}));}
RDebugUtils.currentLine=12517376;
 //BA.debugLineNum = 12517376;BA.debugLine="Sub cuentaProds(accion As String)";
RDebugUtils.currentLine=12517538;
 //BA.debugLineNum = 12517538;BA.debugLine="End Sub";
return "";
}
public String  _gps_locationchanged(reparto_izca.keymon.lat.c_detalleventa __ref,anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "gps_locationchanged", false))
	 {return ((String) Debug.delegate(ba, "gps_locationchanged", new Object[] {_location1}));}
RDebugUtils.currentLine=11927552;
 //BA.debugLineNum = 11927552;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
RDebugUtils.currentLine=11927555;
 //BA.debugLineNum = 11927555;BA.debugLine="End Sub";
return "";
}
public String  _l_pcant_click(reparto_izca.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "l_pcant_click", false))
	 {return ((String) Debug.delegate(ba, "l_pcant_click", null));}
RDebugUtils.currentLine=12648448;
 //BA.debugLineNum = 12648448;BA.debugLine="Private Sub l_pCant_Click";
RDebugUtils.currentLine=12648450;
 //BA.debugLineNum = 12648450;BA.debugLine="End Sub";
return "";
}
public String  _l_pcantc_click(reparto_izca.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "l_pcantc_click", false))
	 {return ((String) Debug.delegate(ba, "l_pcantc_click", null));}
RDebugUtils.currentLine=12910592;
 //BA.debugLineNum = 12910592;BA.debugLine="Private Sub l_pCantC_Click";
RDebugUtils.currentLine=12910594;
 //BA.debugLineNum = 12910594;BA.debugLine="End Sub";
return "";
}
public String  _listview1_itemlongclick(reparto_izca.keymon.lat.c_detalleventa __ref,int _position,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "listview1_itemlongclick", false))
	 {return ((String) Debug.delegate(ba, "listview1_itemlongclick", new Object[] {_position,_value}));}
RDebugUtils.currentLine=12124160;
 //BA.debugLineNum = 12124160;BA.debugLine="Sub ListView1_ItemLongClick (Position As Int, Valu";
RDebugUtils.currentLine=12124204;
 //BA.debugLineNum = 12124204;BA.debugLine="End Sub";
return "";
}
public String  _lv2_itemclick(reparto_izca.keymon.lat.c_detalleventa __ref,int _position,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "lv2_itemclick", false))
	 {return ((String) Debug.delegate(ba, "lv2_itemclick", new Object[] {_position,_value}));}
RDebugUtils.currentLine=12189696;
 //BA.debugLineNum = 12189696;BA.debugLine="Sub lv2_ItemClick (Position As Int, Value As Objec";
RDebugUtils.currentLine=12189757;
 //BA.debugLineNum = 12189757;BA.debugLine="End Sub";
return "";
}
public String  _p_prods_click(reparto_izca.keymon.lat.c_detalleventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_detalleventa";
if (Debug.shouldDelegate(ba, "p_prods_click", false))
	 {return ((String) Debug.delegate(ba, "p_prods_click", null));}
RDebugUtils.currentLine=12713984;
 //BA.debugLineNum = 12713984;BA.debugLine="Sub p_prods_Click";
RDebugUtils.currentLine=12713985;
 //BA.debugLineNum = 12713985;BA.debugLine="Log(Sender.As(Panel).tag)";
__c.LogImpl("812713985",BA.ObjectToString(((anywheresoftware.b4a.objects.PanelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.PanelWrapper(), (android.view.ViewGroup)(__c.Sender(ba)))).getTag()),0);
RDebugUtils.currentLine=12713986;
 //BA.debugLineNum = 12713986;BA.debugLine="End Sub";
return "";
}
}