package reparto_mazapa.keymon.lat;


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

public class c_productos extends B4AClass.ImplB4AClass implements BA.SubDelegator{
    private static java.util.HashMap<String, java.lang.reflect.Method> htSubs;
    private void innerInitialize(BA _ba) throws Exception {
        if (ba == null) {
            ba = new anywheresoftware.b4a.ShellBA(_ba, this, htSubs, "reparto_mazapa.keymon.lat.c_productos");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", reparto_mazapa.keymon.lat.c_productos.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.ButtonWrapper _b_revversar = null;
public anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
public anywheresoftware.b4a.objects.LabelWrapper _label3 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_piezas = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_cajas = null;
public b4a.example.dateutils _dateutils = null;
public reparto_mazapa.keymon.lat.main _main = null;
public reparto_mazapa.keymon.lat.appupdater _appupdater = null;
public reparto_mazapa.keymon.lat.tracker _tracker = null;
public reparto_mazapa.keymon.lat.starter _starter = null;
public reparto_mazapa.keymon.lat.subs _subs = null;
public reparto_mazapa.keymon.lat.firebasemessaging _firebasemessaging = null;
public reparto_mazapa.keymon.lat.foto _foto = null;
public reparto_mazapa.keymon.lat.mapa_cliente _mapa_cliente = null;
public reparto_mazapa.keymon.lat.mapa_rutas _mapa_rutas = null;
public reparto_mazapa.keymon.lat.newinst2 _newinst2 = null;
public reparto_mazapa.keymon.lat.b4xpages _b4xpages = null;
public reparto_mazapa.keymon.lat.b4xcollections _b4xcollections = null;
public reparto_mazapa.keymon.lat.httputils2service _httputils2service = null;
public reparto_mazapa.keymon.lat.xuiviewsutils _xuiviewsutils = null;
public Object  _initialize(reparto_mazapa.keymon.lat.c_productos __ref,anywheresoftware.b4a.BA _ba) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "initialize", false))
	 {return ((Object) Debug.delegate(ba, "initialize", new Object[] {_ba}));}
RDebugUtils.currentLine=14745600;
 //BA.debugLineNum = 14745600;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=14745601;
 //BA.debugLineNum = 14745601;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=14745602;
 //BA.debugLineNum = 14745602;BA.debugLine="End Sub";
return null;
}
public String  _gps_locationchanged(reparto_mazapa.keymon.lat.c_productos __ref,anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "gps_locationchanged", false))
	 {return ((String) Debug.delegate(ba, "gps_locationchanged", new Object[] {_location1}));}
RDebugUtils.currentLine=14942208;
 //BA.debugLineNum = 14942208;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
RDebugUtils.currentLine=14942211;
 //BA.debugLineNum = 14942211;BA.debugLine="End Sub";
return "";
}
public String  _b_guardar_click(reparto_mazapa.keymon.lat.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "b_guardar_click", false))
	 {return ((String) Debug.delegate(ba, "b_guardar_click", null));}
RDebugUtils.currentLine=15859712;
 //BA.debugLineNum = 15859712;BA.debugLine="Private Sub b_guardar_Click";
RDebugUtils.currentLine=15859714;
 //BA.debugLineNum = 15859714;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmas_click(reparto_mazapa.keymon.lat.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
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;
anywheresoftware.b4a.sql.SQL.CursorWrapper _preciocat = null;
String _preciofull = "";
String _pup = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _precioreg = null;
String _precioregalo = "";
String _esregalo = "";
RDebugUtils.currentLine=15466496;
 //BA.debugLineNum = 15466496;BA.debugLine="Sub b_prodMas_Click";
RDebugUtils.currentLine=15466497;
 //BA.debugLineNum = 15466497;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=15466498;
 //BA.debugLineNum = 15466498;BA.debugLine="Dim sDate, sTime As String";
_sdate = "";
_stime = "";
RDebugUtils.currentLine=15466499;
 //BA.debugLineNum = 15466499;BA.debugLine="DateTime.DateFormat = \"dd/MM/yyyy\"";
__c.DateTime.setDateFormat("dd/MM/yyyy");
RDebugUtils.currentLine=15466500;
 //BA.debugLineNum = 15466500;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
__c.DateTime.setTimeFormat("HH:mm:ss");
RDebugUtils.currentLine=15466501;
 //BA.debugLineNum = 15466501;BA.debugLine="sDate = DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=15466502;
 //BA.debugLineNum = 15466502;BA.debugLine="sTime = DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=15466504;
 //BA.debugLineNum = 15466504;BA.debugLine="LogColor(\"b_prodMas_Click\", Colors.Magenta)";
__c.LogImpl("315466504","b_prodMas_Click",__c.Colors.Magenta);
RDebugUtils.currentLine=15466505;
 //BA.debugLineNum = 15466505;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=15466506;
 //BA.debugLineNum = 15466506;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=15466507;
 //BA.debugLineNum = 15466507;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=15466508;
 //BA.debugLineNum = 15466508;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=15466512;
 //BA.debugLineNum = 15466512;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=15466513;
 //BA.debugLineNum = 15466513;BA.debugLine="Log(\"LC_TEXT:\"&laCant.Text&\"|LC_TAG:\"&laCant.Tag&";
__c.LogImpl("315466513","LC_TEXT:"+_lacant.getText()+"|LC_TAG:"+BA.ObjectToString(_lacant.getTag())+"|ET:"+BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=15466514;
 //BA.debugLineNum = 15466514;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=15466516;
 //BA.debugLineNum = 15466516;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=15466518;
 //BA.debugLineNum = 15466518;BA.debugLine="Private minimoadesc As String";
_minimoadesc = "";
RDebugUtils.currentLine=15466519;
 //BA.debugLineNum = 15466519;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=15466520;
 //BA.debugLineNum = 15466520;BA.debugLine="If minimos.RowCount > 0 Then";
if (_minimos.getRowCount()>0) { 
RDebugUtils.currentLine=15466521;
 //BA.debugLineNum = 15466521;BA.debugLine="minimos.Position = 0";
_minimos.setPosition((int) (0));
RDebugUtils.currentLine=15466522;
 //BA.debugLineNum = 15466522;BA.debugLine="minimoadesc = minimos.GetString(\"CAT_DP_CANT_MIN";
_minimoadesc = _minimos.GetString("CAT_DP_CANT_MIN_VENTA");
 }else {
RDebugUtils.currentLine=15466524;
 //BA.debugLineNum = 15466524;BA.debugLine="minimoadesc = \"1\"";
_minimoadesc = "1";
 };
RDebugUtils.currentLine=15466526;
 //BA.debugLineNum = 15466526;BA.debugLine="minimos.Close";
_minimos.Close();
RDebugUtils.currentLine=15466529;
 //BA.debugLineNum = 15466529;BA.debugLine="LogColor($\"++++++++++++++++++++++++++   ${esteTag";
__c.LogImpl("315466529",("++++++++++++++++++++++++++   "+__c.SmartStringFormatter("",(Object)(_estetag.getObject()))+""),__c.Colors.Green);
RDebugUtils.currentLine=15466530;
 //BA.debugLineNum = 15466530;BA.debugLine="Log(esteTag.get(4))";
__c.LogImpl("315466530",BA.ObjectToString(_estetag.Get((int) (4))),0);
RDebugUtils.currentLine=15466531;
 //BA.debugLineNum = 15466531;BA.debugLine="If esteTag.Get(4) = \"0\" Then";
if ((_estetag.Get((int) (4))).equals((Object)("0"))) { 
 }else {
RDebugUtils.currentLine=15466534;
 //BA.debugLineNum = 15466534;BA.debugLine="If laCant.Text + 1 * minimoadesc <= maxProds The";
if ((double)(Double.parseDouble(_lacant.getText()))+1*(double)(Double.parseDouble(_minimoadesc))<=(double)(Double.parseDouble(_maxprods))) { 
RDebugUtils.currentLine=15466535;
 //BA.debugLineNum = 15466535;BA.debugLine="Log($\"NuevaCant = ${laCant.Text + 1}\"$)";
__c.LogImpl("315466535",("NuevaCant = "+__c.SmartStringFormatter("",(Object)((double)(Double.parseDouble(_lacant.getText()))+1))+""),0);
RDebugUtils.currentLine=15466536;
 //BA.debugLineNum = 15466536;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=15466537;
 //BA.debugLineNum = 15466537;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update cat_gunaprod";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen - 1 where cat_gp_id = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{BA.ObjectToString(_estetag.Get((int) (2)))}));
RDebugUtils.currentLine=15466538;
 //BA.debugLineNum = 15466538;BA.debugLine="c = Starter.skmt.ExecQuery2(\"SELECT * FROM PEDI";
__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) (6)))})));
RDebugUtils.currentLine=15466539;
 //BA.debugLineNum = 15466539;BA.debugLine="If c.RowCount > 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=15466540;
 //BA.debugLineNum = 15466540;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 HIST_VENTAS WHERE HVD_PROID = ? AND CONSECUTIVO = ? ",new String[]{BA.ObjectToString(_estetag.Get((int) (2))),BA.ObjectToString(_estetag.Get((int) (6)))})));
RDebugUtils.currentLine=15466541;
 //BA.debugLineNum = 15466541;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=15466542;
 //BA.debugLineNum = 15466542;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=15466544;
 //BA.debugLineNum = 15466544;BA.debugLine="Dim preciocat As Cursor = Starter.skmt.ExecQu";
_preciocat = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_preciocat = (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(CAT_GP_PRECIO,0) AS CAT_GP_PRECIO from CAT_GUNAPROD WHERE CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_c2.GetString("HVD_PROID")))+"'"))));
RDebugUtils.currentLine=15466545;
 //BA.debugLineNum = 15466545;BA.debugLine="If preciocat.RowCount > 0 Then";
if (_preciocat.getRowCount()>0) { 
RDebugUtils.currentLine=15466546;
 //BA.debugLineNum = 15466546;BA.debugLine="preciocat.Position = 0";
_preciocat.setPosition((int) (0));
RDebugUtils.currentLine=15466547;
 //BA.debugLineNum = 15466547;BA.debugLine="Dim preciofull As String = preciocat.GetStri";
_preciofull = _preciocat.GetString("CAT_GP_PRECIO");
 };
RDebugUtils.currentLine=15466549;
 //BA.debugLineNum = 15466549;BA.debugLine="preciocat.Close";
_preciocat.Close();
RDebugUtils.currentLine=15466551;
 //BA.debugLineNum = 15466551;BA.debugLine="If c2.GetString(\"HVD_CODPROMO\") = Subs.traeAl";
if ((_c2.GetString("HVD_CODPROMO")).equals(_subs._traealmacen /*String*/ (ba))) { 
RDebugUtils.currentLine=15466552;
 //BA.debugLineNum = 15466552;BA.debugLine="Private pup As String = c2.GetString(\"HVD_CO";
_pup = BA.NumberToString((double)(Double.parseDouble(_c2.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_c2.GetString("HVD_CANT"))));
RDebugUtils.currentLine=15466554;
 //BA.debugLineNum = 15466554;BA.debugLine="If c2.GetString(\"HVD_LISTAPRECIO\") = \"2\" The";
if ((_c2.GetString("HVD_LISTAPRECIO")).equals("2")) { 
RDebugUtils.currentLine=15466555;
 //BA.debugLineNum = 15466555;BA.debugLine="Starter.skmt.ExecNonQuery($\"update PEDIDO s";
_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)(_preciofull))+"') WHERE PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (6)))+"'"));
 }else {
RDebugUtils.currentLine=15466557;
 //BA.debugLineNum = 15466557;BA.debugLine="Starter.skmt.ExecNonQuery($\"update PEDIDO s";
_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)(_pup))+"') WHERE PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (6)))+"'"));
 };
 }else {
RDebugUtils.currentLine=15466561;
 //BA.debugLineNum = 15466561;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)(_preciofull))+"') WHERE PE_PROID = '"+__c.SmartStringFormatter("",_estetag.Get((int) (2)))+"' and PE_CLIENTE in (Select CUENTA from cuentaa) AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (6)))+"'"));
 };
 };
 }else {
RDebugUtils.currentLine=15466566;
 //BA.debugLineNum = 15466566;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 HIST_VENTAS WHERE HVD_PROID = ? AND CONSECUTIVO = ? ",new String[]{BA.ObjectToString(_estetag.Get((int) (2))),BA.ObjectToString(_estetag.Get((int) (6)))})));
RDebugUtils.currentLine=15466567;
 //BA.debugLineNum = 15466567;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=15466568;
 //BA.debugLineNum = 15466568;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=15466570;
 //BA.debugLineNum = 15466570;BA.debugLine="Dim preciocat As Cursor = Starter.skmt.ExecQu";
_preciocat = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_preciocat = (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(CAT_GP_PRECIO,0) AS CAT_GP_PRECIO from CAT_GUNAPROD WHERE CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_c2.GetString("HVD_PROID")))+"'"))));
RDebugUtils.currentLine=15466571;
 //BA.debugLineNum = 15466571;BA.debugLine="If preciocat.RowCount > 0 Then";
if (_preciocat.getRowCount()>0) { 
RDebugUtils.currentLine=15466572;
 //BA.debugLineNum = 15466572;BA.debugLine="preciocat.Position = 0";
_preciocat.setPosition((int) (0));
RDebugUtils.currentLine=15466573;
 //BA.debugLineNum = 15466573;BA.debugLine="Dim preciofull As String = preciocat.GetStri";
_preciofull = _preciocat.GetString("CAT_GP_PRECIO");
 };
RDebugUtils.currentLine=15466575;
 //BA.debugLineNum = 15466575;BA.debugLine="preciocat.Close";
_preciocat.Close();
RDebugUtils.currentLine=15466577;
 //BA.debugLineNum = 15466577;BA.debugLine="Dim precioreg As Cursor = Starter.skmt.ExecQu";
_precioreg = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_precioreg = (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(HVD_COSTO_TOT,0) AS HVD_COSTO_TOT, HVD_CANT from HIST_VENTAS WHERE HVD_PROID = '"+__c.SmartStringFormatter("",(Object)(_c2.GetString("HVD_PROID")))+"' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",_estetag.Get((int) (6)))+"'"))));
RDebugUtils.currentLine=15466578;
 //BA.debugLineNum = 15466578;BA.debugLine="If precioreg.RowCount > 0 Then";
if (_precioreg.getRowCount()>0) { 
RDebugUtils.currentLine=15466579;
 //BA.debugLineNum = 15466579;BA.debugLine="precioreg.Position = 0";
_precioreg.setPosition((int) (0));
RDebugUtils.currentLine=15466580;
 //BA.debugLineNum = 15466580;BA.debugLine="Dim precioregalo As String = precioreg.GetSt";
_precioregalo = BA.NumberToString((double)(Double.parseDouble(_precioreg.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_precioreg.GetString("HVD_CANT"))));
RDebugUtils.currentLine=15466581;
 //BA.debugLineNum = 15466581;BA.debugLine="If precioregalo < 1 Then";
if ((double)(Double.parseDouble(_precioregalo))<1) { 
RDebugUtils.currentLine=15466582;
 //BA.debugLineNum = 15466582;BA.debugLine="Dim esregalo As String = 1";
_esregalo = BA.NumberToString(1);
 }else {
RDebugUtils.currentLine=15466584;
 //BA.debugLineNum = 15466584;BA.debugLine="Dim esregalo As String = 0";
_esregalo = BA.NumberToString(0);
 };
 };
RDebugUtils.currentLine=15466587;
 //BA.debugLineNum = 15466587;BA.debugLine="precioreg.Close";
_precioreg.Close();
RDebugUtils.currentLine=15466589;
 //BA.debugLineNum = 15466589;BA.debugLine="If c2.GetString(\"HVD_CODPROMO\") = Subs.traeAl";
if ((_c2.GetString("HVD_CODPROMO")).equals(_subs._traealmacen /*String*/ (ba))) { 
RDebugUtils.currentLine=15466590;
 //BA.debugLineNum = 15466590;BA.debugLine="Private pup As String = c2.GetString(\"HVD_CO";
_pup = BA.NumberToString((double)(Double.parseDouble(_c2.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_c2.GetString("HVD_CANT"))));
RDebugUtils.currentLine=15466592;
 //BA.debugLineNum = 15466592;BA.debugLine="If c2.GetString(\"HVD_LISTAPRECIO\") = \"2\" The";
if ((_c2.GetString("HVD_LISTAPRECIO")).equals("2")) { 
RDebugUtils.currentLine=15466593;
 //BA.debugLineNum = 15466593;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO PED";
_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,PE_RUTA, PE_TIPO,PE_CEDIS,PE_FECHA,PE_USUARIO,FECHA_PREV,RUTA_REP,PE_REGALO) VALUES (?,?,?,?,?,?,?,0,0,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{BA.ObjectToString(_estetag.Get((int) (2))),_c2.GetString("HVD_PRONOMBRE"),BA.NumberToString(1*(double)(Double.parseDouble(_minimoadesc))),BA.ObjectToString(_estetag.Get((int) (5))),_subs._traecliente /*String*/ (ba),(_preciofull),BA.NumberToString(((double)(Double.parseDouble(_preciofull))*(double)(Double.parseDouble(_minimoadesc)))),BA.ObjectToString(_estetag.Get((int) (6))),_subs._traerutaprev /*String*/ (ba),"PREVENTA",_subs._traealmacen /*String*/ (ba),__ref._sdate /*String*/ +" "+__ref._stime /*String*/ ,_subs._traeusuario /*String*/ (ba),_subs._traefechaprev /*String*/ (ba),_subs._traerutareparto /*String*/ (ba),_esregalo}));
 }else {
RDebugUtils.currentLine=15466595;
 //BA.debugLineNum = 15466595;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO PED";
_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,PE_RUTA, PE_TIPO,PE_CEDIS,PE_FECHA,PE_USUARIO,FECHA_PREV,RUTA_REP,PE_REGALO) VALUES (?,?,?,?,?,?,?,0,0,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{BA.ObjectToString(_estetag.Get((int) (2))),_c2.GetString("HVD_PRONOMBRE"),BA.NumberToString(1*(double)(Double.parseDouble(_minimoadesc))),BA.ObjectToString(_estetag.Get((int) (5))),_subs._traecliente /*String*/ (ba),(_pup),BA.NumberToString(((double)(Double.parseDouble(_pup))*(double)(Double.parseDouble(_minimoadesc)))),BA.ObjectToString(_estetag.Get((int) (6))),_subs._traerutaprev /*String*/ (ba),"PREVENTA",_subs._traealmacen /*String*/ (ba),__ref._sdate /*String*/ +" "+__ref._stime /*String*/ ,_subs._traeusuario /*String*/ (ba),_subs._traefechaprev /*String*/ (ba),_subs._traerutareparto /*String*/ (ba),_esregalo}));
 };
 }else {
RDebugUtils.currentLine=15466599;
 //BA.debugLineNum = 15466599;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,PE_RUTA, PE_TIPO,PE_CEDIS,PE_FECHA,PE_USUARIO,FECHA_PREV,RUTA_REP,PE_REGALO) VALUES (?,?,?,?,?,?,?,0,0,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{BA.ObjectToString(_estetag.Get((int) (2))),_c2.GetString("HVD_PRONOMBRE"),BA.NumberToString(1*(double)(Double.parseDouble(_minimoadesc))),BA.ObjectToString(_estetag.Get((int) (5))),_subs._traecliente /*String*/ (ba),(_preciofull),BA.NumberToString(((double)(Double.parseDouble(_preciofull))*(double)(Double.parseDouble(_minimoadesc)))),BA.ObjectToString(_estetag.Get((int) (6))),_subs._traerutaprev /*String*/ (ba),"PREVENTA",_subs._traealmacen /*String*/ (ba),__ref._sdate /*String*/ +" "+__ref._stime /*String*/ ,_subs._traeusuario /*String*/ (ba),_subs._traefechaprev /*String*/ (ba),_subs._traerutareparto /*String*/ (ba),_esregalo}));
 };
 };
 };
RDebugUtils.currentLine=15466606;
 //BA.debugLineNum = 15466606;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=15466611;
 //BA.debugLineNum = 15466611;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 };
RDebugUtils.currentLine=15466628;
 //BA.debugLineNum = 15466628;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear(reparto_mazapa.keymon.lat.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "b4xpage_appear", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_appear", null));}
int _i = 0;
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
int _bgcolor = 0;
int _textcolor = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c2 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _d5 = null;
String _restacant = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _c3 = null;
String _resta = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _preciocat = null;
String _preciofull = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _oc = null;
int _cant2 = 0;
String _puc = "";
RDebugUtils.currentLine=14876672;
 //BA.debugLineNum = 14876672;BA.debugLine="Sub B4XPage_Appear";
RDebugUtils.currentLine=14876673;
 //BA.debugLineNum = 14876673;BA.debugLine="Label2.Visible = False";
__ref._label2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=14876674;
 //BA.debugLineNum = 14876674;BA.debugLine="Label3.Visible = False";
__ref._label3 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=14876675;
 //BA.debugLineNum = 14876675;BA.debugLine="L_TOTAL.Visible = False";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=14876676;
 //BA.debugLineNum = 14876676;BA.debugLine="L_CANT.Visible = False";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=14876677;
 //BA.debugLineNum = 14876677;BA.debugLine="b_revversar.Visible = False";
__ref._b_revversar /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=14876678;
 //BA.debugLineNum = 14876678;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=14876682;
 //BA.debugLineNum = 14876682;BA.debugLine="L_CANT.Text =\"\"";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=14876683;
 //BA.debugLineNum = 14876683;BA.debugLine="L_TOTAL.Text=\"\"";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=14876684;
 //BA.debugLineNum = 14876684;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=14876685;
 //BA.debugLineNum = 14876685;BA.debugLine="C.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=14876686;
 //BA.debugLineNum = 14876686;BA.debugLine="Existe = C.GetString(\"EXISTE\")";
__ref._existe /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("EXISTE");
RDebugUtils.currentLine=14876687;
 //BA.debugLineNum = 14876687;BA.debugLine="C.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=14876691;
 //BA.debugLineNum = 14876691;BA.debugLine="c=Starter.skmt.ExecQuery(\"select * from HIST_VENT";
__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 * from HIST_VENTAS WHERE hvd_rechazo <> 2 and HVD_RECHAZOCANT > 0 and HVD_CLIENTE NOT IN (SELECT CUENTA FROM CUENTAA) order by HVD_CODPROMO desc, HVD_PRONOMBRE asc")));
RDebugUtils.currentLine=14876694;
 //BA.debugLineNum = 14876694;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=14876695;
 //BA.debugLineNum = 14876695;BA.debugLine="clv_pedido.Clear";
__ref._clv_pedido /*b4a.example3.customlistview*/ ._clear();
RDebugUtils.currentLine=14876696;
 //BA.debugLineNum = 14876696;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=14876697;
 //BA.debugLineNum = 14876697;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=14876698;
 //BA.debugLineNum = 14876698;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=14876700;
 //BA.debugLineNum = 14876700;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=14876703;
 //BA.debugLineNum = 14876703;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step20 = 1;
final int limit20 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit20 ;_i = _i + step20 ) {
RDebugUtils.currentLine=14876704;
 //BA.debugLineNum = 14876704;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=14876706;
 //BA.debugLineNum = 14876706;BA.debugLine="If c.GetString(\"BCAJAS\") = \"0\" Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("BCAJAS")).equals("0")) { 
RDebugUtils.currentLine=14876717;
 //BA.debugLineNum = 14876717;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=14876718;
 //BA.debugLineNum = 14876718;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=14876719;
 //BA.debugLineNum = 14876719;BA.debugLine="label1.TextSize = 12";
_label1.setTextSize((float) (12));
RDebugUtils.currentLine=14876720;
 //BA.debugLineNum = 14876720;BA.debugLine="label1.TextColor = Colors.black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=14876721;
 //BA.debugLineNum = 14876721;BA.debugLine="Dim Label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=14876722;
 //BA.debugLineNum = 14876722;BA.debugLine="Label2 = ListView1.TwoLinesLayout.SecondLabel";
__ref._label2 /*anywheresoftware.b4a.objects.LabelWrapper*/  = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=14876723;
 //BA.debugLineNum = 14876723;BA.debugLine="Label2.TextSize = 12";
__ref._label2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextSize((float) (12));
RDebugUtils.currentLine=14876724;
 //BA.debugLineNum = 14876724;BA.debugLine="Label2.TextColor = Colors.black";
__ref._label2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=14876725;
 //BA.debugLineNum = 14876725;BA.debugLine="Private bgColor, textColor As Int";
_bgcolor = 0;
_textcolor = 0;
RDebugUtils.currentLine=14876726;
 //BA.debugLineNum = 14876726;BA.debugLine="bgColor = Colors.RGB(177, 200, 249)'azul";
_bgcolor = __c.Colors.RGB((int) (177),(int) (200),(int) (249));
RDebugUtils.currentLine=14876727;
 //BA.debugLineNum = 14876727;BA.debugLine="textColor = Colors.black";
_textcolor = __c.Colors.Black;
RDebugUtils.currentLine=14876728;
 //BA.debugLineNum = 14876728;BA.debugLine="If c.GetString(\"HVD_CODPROMO\") <> Subs.traeAlm";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CODPROMO")).equals(_subs._traealmacen /*String*/ (ba)) == false) { 
RDebugUtils.currentLine=14876730;
 //BA.debugLineNum = 14876730;BA.debugLine="bgColor = Colors.White";
_bgcolor = __c.Colors.White;
 };
RDebugUtils.currentLine=14876736;
 //BA.debugLineNum = 14876736;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 IFNULL(PE_CANT,0) AS PE_CANT, CONSECUTIVO, PE_BCAJAS from PEDIDO WHERE PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND PE_PROID ='"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID")))+"' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")))+"'"))));
RDebugUtils.currentLine=14876739;
 //BA.debugLineNum = 14876739;BA.debugLine="Private d5 As Cursor =  Starter.skmt.ExecQuery";
_d5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_d5 = (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(Sum(PE_CANT),0) AS PE_CANT FROM PEDIDO WHERE PE_CLIENTEOR = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CLIENTE")))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID")))+"' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")))+"'"))));
RDebugUtils.currentLine=14876740;
 //BA.debugLineNum = 14876740;BA.debugLine="d5.Position = 0";
_d5.setPosition((int) (0));
RDebugUtils.currentLine=14876741;
 //BA.debugLineNum = 14876741;BA.debugLine="Private restacant As String = d5.GetString(\"PE";
_restacant = _d5.GetString("PE_CANT");
RDebugUtils.currentLine=14876742;
 //BA.debugLineNum = 14876742;BA.debugLine="d5.Close";
_d5.Close();
RDebugUtils.currentLine=14876744;
 //BA.debugLineNum = 14876744;BA.debugLine="If (c.GetString(\"HVD_RECHAZOCANT\")-restacant)";
if (((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_RECHAZOCANT")))-(double)(Double.parseDouble(_restacant)))!=(double)(Double.parseDouble("0"))) { 
RDebugUtils.currentLine=14876745;
 //BA.debugLineNum = 14876745;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=14876746;
 //BA.debugLineNum = 14876746;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=14876748;
 //BA.debugLineNum = 14876748;BA.debugLine="Private c3 As Cursor=Starter.skmt.ExecQuery(";
_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 Ifnull(sum(PE_CANT),0) AS PE_CANT from PEDIDO WHERE PE_CLIENTE NOT IN (SELECT CUENTA FROM CUENTAA) AND PE_CLIENTEOR = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CLIENTE")))+"' AND PE_PROID ='"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID")))+"' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")))+"'"))));
RDebugUtils.currentLine=14876749;
 //BA.debugLineNum = 14876749;BA.debugLine="Private resta As String = 0";
_resta = BA.NumberToString(0);
RDebugUtils.currentLine=14876751;
 //BA.debugLineNum = 14876751;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=14876753;
 //BA.debugLineNum = 14876753;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
RDebugUtils.currentLine=14876754;
 //BA.debugLineNum = 14876754;BA.debugLine="resta =  c3.GetString(\"PE_CANT\")";
_resta = _c3.GetString("PE_CANT");
 }else {
RDebugUtils.currentLine=14876757;
 //BA.debugLineNum = 14876757;BA.debugLine="resta = 0";
_resta = BA.NumberToString(0);
 };
RDebugUtils.currentLine=14876760;
 //BA.debugLineNum = 14876760;BA.debugLine="Dim preciocat As Cursor = Starter.skmt.ExecQ";
_preciocat = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_preciocat = (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(CAT_GP_PRECIO,0) AS CAT_GP_PRECIO from CAT_GUNAPROD WHERE CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID")))+"'"))));
RDebugUtils.currentLine=14876761;
 //BA.debugLineNum = 14876761;BA.debugLine="If preciocat.RowCount > 0 Then";
if (_preciocat.getRowCount()>0) { 
RDebugUtils.currentLine=14876762;
 //BA.debugLineNum = 14876762;BA.debugLine="preciocat.Position = 0";
_preciocat.setPosition((int) (0));
RDebugUtils.currentLine=14876763;
 //BA.debugLineNum = 14876763;BA.debugLine="Dim preciofull As String = preciocat.GetStr";
_preciofull = _preciocat.GetString("CAT_GP_PRECIO");
 };
RDebugUtils.currentLine=14876765;
 //BA.debugLineNum = 14876765;BA.debugLine="preciocat.Close";
_preciocat.Close();
RDebugUtils.currentLine=14876766;
 //BA.debugLineNum = 14876766;BA.debugLine="Log(c.GetString(\"HVD_CODPROMO\"))";
__c.LogImpl("314876766",__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CODPROMO"),0);
RDebugUtils.currentLine=14876767;
 //BA.debugLineNum = 14876767;BA.debugLine="Log(Subs.traeAlmacen)";
__c.LogImpl("314876767",_subs._traealmacen /*String*/ (ba),0);
RDebugUtils.currentLine=14876770;
 //BA.debugLineNum = 14876770;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))) { 
RDebugUtils.currentLine=14876771;
 //BA.debugLineNum = 14876771;BA.debugLine="clv_pedido.Add(CreateListItem(c.GetString(\"";
__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.parseDouble(_c2.GetString("PE_CANT"))),(int) ((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_RECHAZOCANT")))-(double)(Double.parseDouble(_c2.GetString("PE_CANT")))-(double)(Double.parseDouble(_resta))),__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"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CLIENTE"),(int)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")))).getObject())),(Object)(_i));
 }else {
RDebugUtils.currentLine=14876773;
 //BA.debugLineNum = 14876773;BA.debugLine="Log(\"aqui arriba\")";
__c.LogImpl("314876773","aqui arriba",0);
RDebugUtils.currentLine=14876774;
 //BA.debugLineNum = 14876774;BA.debugLine="clv_pedido.Add(CreateListItem(c.GetString(\"";
__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"),_preciofull,(int)(Double.parseDouble(_c2.GetString("PE_CANT"))),(int) ((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_RECHAZOCANT")))-(double)(Double.parseDouble(_c2.GetString("PE_CANT")))-(double)(Double.parseDouble(_resta))),__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"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CLIENTE"),(int)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")))).getObject())),(Object)(_i));
 };
 }else 
{RDebugUtils.currentLine=14876778;
 //BA.debugLineNum = 14876778;BA.debugLine="Else iF c2.RowCount = 0 Then";
if (_c2.getRowCount()==0) { 
RDebugUtils.currentLine=14876779;
 //BA.debugLineNum = 14876779;BA.debugLine="Private c3 As Cursor=Starter.skmt.ExecQuery(";
_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 Ifnull(sum(PE_CANT),0) AS PE_CANT from PEDIDO WHERE PE_CLIENTE NOT IN (SELECT CUENTA FROM CUENTAA) AND PE_CLIENTEOR = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CLIENTE")))+"' AND PE_PROID ='"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID")))+"' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")))+"'"))));
RDebugUtils.currentLine=14876780;
 //BA.debugLineNum = 14876780;BA.debugLine="Private resta As String = 0";
_resta = BA.NumberToString(0);
RDebugUtils.currentLine=14876782;
 //BA.debugLineNum = 14876782;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=14876784;
 //BA.debugLineNum = 14876784;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
RDebugUtils.currentLine=14876785;
 //BA.debugLineNum = 14876785;BA.debugLine="resta =  c3.GetString(\"PE_CANT\")";
_resta = _c3.GetString("PE_CANT");
 }else {
RDebugUtils.currentLine=14876788;
 //BA.debugLineNum = 14876788;BA.debugLine="resta = 0";
_resta = BA.NumberToString(0);
 };
RDebugUtils.currentLine=14876792;
 //BA.debugLineNum = 14876792;BA.debugLine="Dim preciocat As Cursor = Starter.skmt.ExecQ";
_preciocat = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_preciocat = (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(CAT_GP_PRECIO,0) AS CAT_GP_PRECIO from CAT_GUNAPROD WHERE CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID")))+"'"))));
RDebugUtils.currentLine=14876793;
 //BA.debugLineNum = 14876793;BA.debugLine="If preciocat.RowCount > 0 Then";
if (_preciocat.getRowCount()>0) { 
RDebugUtils.currentLine=14876794;
 //BA.debugLineNum = 14876794;BA.debugLine="preciocat.Position = 0";
_preciocat.setPosition((int) (0));
RDebugUtils.currentLine=14876795;
 //BA.debugLineNum = 14876795;BA.debugLine="Dim preciofull As String = preciocat.GetStr";
_preciofull = _preciocat.GetString("CAT_GP_PRECIO");
 };
RDebugUtils.currentLine=14876797;
 //BA.debugLineNum = 14876797;BA.debugLine="preciocat.Close";
_preciocat.Close();
RDebugUtils.currentLine=14876798;
 //BA.debugLineNum = 14876798;BA.debugLine="Log(c.GetString(\"HVD_CODPROMO\"))";
__c.LogImpl("314876798",__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CODPROMO"),0);
RDebugUtils.currentLine=14876799;
 //BA.debugLineNum = 14876799;BA.debugLine="Log(Subs.traeAlmacen)";
__c.LogImpl("314876799",_subs._traealmacen /*String*/ (ba),0);
RDebugUtils.currentLine=14876801;
 //BA.debugLineNum = 14876801;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))) { 
RDebugUtils.currentLine=14876802;
 //BA.debugLineNum = 14876802;BA.debugLine="clv_pedido.Add(CreateListItem(c.GetString(\"";
__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) (0),(int) ((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_RECHAZOCANT")))-(double)(Double.parseDouble(_resta))),__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"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CLIENTE"),(int)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")))).getObject())),(Object)(_i));
 }else {
RDebugUtils.currentLine=14876804;
 //BA.debugLineNum = 14876804;BA.debugLine="Log(\"aqui abajo\")";
__c.LogImpl("314876804","aqui abajo",0);
RDebugUtils.currentLine=14876805;
 //BA.debugLineNum = 14876805;BA.debugLine="clv_pedido.Add(CreateListItem(c.GetString(\"";
__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"),_preciofull,(int) (0),(int) ((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_RECHAZOCANT")))-(double)(Double.parseDouble(_resta))),__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"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CLIENTE"),(int)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")))).getObject())),(Object)(_i));
 };
 }}
;
 };
RDebugUtils.currentLine=14876812;
 //BA.debugLineNum = 14876812;BA.debugLine="c2.Close";
_c2.Close();
 }else 
{RDebugUtils.currentLine=14876815;
 //BA.debugLineNum = 14876815;BA.debugLine="Else If c.GetString(\"BCAJAS\") = \"1\" Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("BCAJAS")).equals("1")) { 
RDebugUtils.currentLine=14876816;
 //BA.debugLineNum = 14876816;BA.debugLine="Log(\"AQUI1\")";
__c.LogImpl("314876816","AQUI1",0);
RDebugUtils.currentLine=14876819;
 //BA.debugLineNum = 14876819;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_VENTAS 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=14876820;
 //BA.debugLineNum = 14876820;BA.debugLine="Private cant2 As Int = 0";
_cant2 = (int) (0);
RDebugUtils.currentLine=14876821;
 //BA.debugLineNum = 14876821;BA.debugLine="If oc.RowCount > 0 Then";
if (_oc.getRowCount()>0) { 
RDebugUtils.currentLine=14876822;
 //BA.debugLineNum = 14876822;BA.debugLine="oc.Position = 0";
_oc.setPosition((int) (0));
RDebugUtils.currentLine=14876823;
 //BA.debugLineNum = 14876823;BA.debugLine="cant2 = oc.GetString(\"HVD_CANT\")";
_cant2 = (int)(Double.parseDouble(_oc.GetString("HVD_CANT")));
 };
RDebugUtils.currentLine=14876825;
 //BA.debugLineNum = 14876825;BA.debugLine="oc.Close";
_oc.Close();
RDebugUtils.currentLine=14876826;
 //BA.debugLineNum = 14876826;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=14876827;
 //BA.debugLineNum = 14876827;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=14876828;
 //BA.debugLineNum = 14876828;BA.debugLine="label1.TextSize = 12";
_label1.setTextSize((float) (12));
RDebugUtils.currentLine=14876829;
 //BA.debugLineNum = 14876829;BA.debugLine="label1.TextColor = Colors.black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=14876830;
 //BA.debugLineNum = 14876830;BA.debugLine="Dim Label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=14876831;
 //BA.debugLineNum = 14876831;BA.debugLine="Label2 = ListView1.TwoLinesLayout.SecondLabel";
__ref._label2 /*anywheresoftware.b4a.objects.LabelWrapper*/  = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=14876832;
 //BA.debugLineNum = 14876832;BA.debugLine="Label2.TextSize = 12";
__ref._label2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextSize((float) (12));
RDebugUtils.currentLine=14876833;
 //BA.debugLineNum = 14876833;BA.debugLine="Label2.TextColor = Colors.black";
__ref._label2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=14876834;
 //BA.debugLineNum = 14876834;BA.debugLine="Private bgColor, textColor As Int";
_bgcolor = 0;
_textcolor = 0;
RDebugUtils.currentLine=14876835;
 //BA.debugLineNum = 14876835;BA.debugLine="bgColor = Colors.RGB(177, 200, 249)'azul";
_bgcolor = __c.Colors.RGB((int) (177),(int) (200),(int) (249));
RDebugUtils.currentLine=14876836;
 //BA.debugLineNum = 14876836;BA.debugLine="textColor = Colors.black";
_textcolor = __c.Colors.Black;
RDebugUtils.currentLine=14876837;
 //BA.debugLineNum = 14876837;BA.debugLine="If c.GetString(\"HVD_CODPROMO\") <> Subs.traeAlm";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CODPROMO")).equals(_subs._traealmacen /*String*/ (ba)) == false) { 
RDebugUtils.currentLine=14876839;
 //BA.debugLineNum = 14876839;BA.debugLine="bgColor = Colors.White";
_bgcolor = __c.Colors.White;
 };
RDebugUtils.currentLine=14876844;
 //BA.debugLineNum = 14876844;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 * from PEDIDO WHERE PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA)"))));
RDebugUtils.currentLine=14876846;
 //BA.debugLineNum = 14876846;BA.debugLine="Private d5 As Cursor =  Starter.skmt.ExecQuery";
_d5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_d5 = (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(Sum(PE_CANT),0) AS PE_CANT FROM PEDIDO WHERE PE_CLIENTEOR = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CLIENTE")))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID")))+"' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")))+"'"))));
RDebugUtils.currentLine=14876847;
 //BA.debugLineNum = 14876847;BA.debugLine="d5.Position = 0";
_d5.setPosition((int) (0));
RDebugUtils.currentLine=14876848;
 //BA.debugLineNum = 14876848;BA.debugLine="Private restacant As String = d5.GetString(\"PE";
_restacant = _d5.GetString("PE_CANT");
RDebugUtils.currentLine=14876849;
 //BA.debugLineNum = 14876849;BA.debugLine="d5.Close";
_d5.Close();
RDebugUtils.currentLine=14876851;
 //BA.debugLineNum = 14876851;BA.debugLine="If (c.GetString(\"HVD_RECHAZOCANT\")-restacant)";
if (((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_RECHAZOCANT")))-(double)(Double.parseDouble(_restacant)))!=(double)(Double.parseDouble("0"))) { 
RDebugUtils.currentLine=14876852;
 //BA.debugLineNum = 14876852;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=14876853;
 //BA.debugLineNum = 14876853;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=14876854;
 //BA.debugLineNum = 14876854;BA.debugLine="Log(\"SI ENTRO A PONER CAJAS BIEN \")";
__c.LogImpl("314876854","SI ENTRO A PONER CAJAS BIEN ",0);
RDebugUtils.currentLine=14876855;
 //BA.debugLineNum = 14876855;BA.debugLine="Log(c2.GetString(\"PE_CAJAS\"))";
__c.LogImpl("314876855",_c2.GetString("PE_CAJAS"),0);
RDebugUtils.currentLine=14876856;
 //BA.debugLineNum = 14876856;BA.debugLine="Private c3 As Cursor=Starter.skmt.ExecQuery(";
_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 Ifnull(sum(PE_CANT),0) AS PE_CANT from PEDIDO WHERE PE_CLIENTE NOT IN (SELECT CUENTA FROM CUENTAA) AND PE_CLIENTEOR = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CLIENTE")))+"' AND PE_PROID ='"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID")))+"' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")))+"'"))));
RDebugUtils.currentLine=14876857;
 //BA.debugLineNum = 14876857;BA.debugLine="Private resta As String = 0";
_resta = BA.NumberToString(0);
RDebugUtils.currentLine=14876859;
 //BA.debugLineNum = 14876859;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=14876861;
 //BA.debugLineNum = 14876861;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
RDebugUtils.currentLine=14876862;
 //BA.debugLineNum = 14876862;BA.debugLine="resta =  c3.GetString(\"PE_CANT\")";
_resta = _c3.GetString("PE_CANT");
 }else {
RDebugUtils.currentLine=14876865;
 //BA.debugLineNum = 14876865;BA.debugLine="resta = 0";
_resta = BA.NumberToString(0);
 };
RDebugUtils.currentLine=14876867;
 //BA.debugLineNum = 14876867;BA.debugLine="Private puc As String = c.GetString(\"HVD_COS";
_puc = 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"))));
RDebugUtils.currentLine=14876868;
 //BA.debugLineNum = 14876868;BA.debugLine="LogColor((restacant/Subs.traeConversion(c.Ge";
__c.LogImpl("314876868",BA.NumberToString(((double)(Double.parseDouble(_restacant))/(double)(double)(Double.parseDouble(_subs._traeconversion /*String*/ (ba,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID")))))),__c.Colors.Green);
RDebugUtils.currentLine=14876869;
 //BA.debugLineNum = 14876869;BA.debugLine="clv_pedido.Add(CreateListItem2(c.GetString(\"";
__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,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PRONOMBRE"),_puc,(int) (((double)(Double.parseDouble(_restacant))/(double)(double)(Double.parseDouble(_subs._traeconversion /*String*/ (ba,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID")))))),(int) ((((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_RECHAZOCANT")))-(double)(Double.parseDouble(_restacant))-(double)(Double.parseDouble(_resta)))/(double)(double)(Double.parseDouble(_subs._traeconversion /*String*/ (ba,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID")))))),__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"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CLIENTE"),(int)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")))).getObject())),(Object)(_i));
 }else {
RDebugUtils.currentLine=14876871;
 //BA.debugLineNum = 14876871;BA.debugLine="Log(\"NO ENTRO A PONER CAJAS BIEN \")";
__c.LogImpl("314876871","NO ENTRO A PONER CAJAS BIEN ",0);
RDebugUtils.currentLine=14876872;
 //BA.debugLineNum = 14876872;BA.debugLine="Private c3 As Cursor=Starter.skmt.ExecQuery(";
_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 Ifnull(sum(PE_CANT),0) AS PE_CANT from PEDIDO WHERE PE_CLIENTE NOT IN (SELECT CUENTA FROM CUENTAA) AND PE_CLIENTEOR = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CLIENTE")))+"' AND PE_PROID ='"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID")))+"' AND CONSECUTIVO = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")))+"'"))));
RDebugUtils.currentLine=14876873;
 //BA.debugLineNum = 14876873;BA.debugLine="Private resta As String = 0";
_resta = BA.NumberToString(0);
RDebugUtils.currentLine=14876875;
 //BA.debugLineNum = 14876875;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=14876877;
 //BA.debugLineNum = 14876877;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
RDebugUtils.currentLine=14876878;
 //BA.debugLineNum = 14876878;BA.debugLine="resta =  c3.GetString(\"PE_CANT\")";
_resta = _c3.GetString("PE_CANT");
 }else {
RDebugUtils.currentLine=14876881;
 //BA.debugLineNum = 14876881;BA.debugLine="resta = 0";
_resta = BA.NumberToString(0);
 };
RDebugUtils.currentLine=14876883;
 //BA.debugLineNum = 14876883;BA.debugLine="LogColor(resta,Colors.Green)";
__c.LogImpl("314876883",_resta,__c.Colors.Green);
RDebugUtils.currentLine=14876884;
 //BA.debugLineNum = 14876884;BA.debugLine="Private puc As String = c.GetString(\"HVD_COS";
_puc = 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"))));
RDebugUtils.currentLine=14876886;
 //BA.debugLineNum = 14876886;BA.debugLine="clv_pedido.Add(CreateListItem2(c.GetString(\"";
__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,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PRONOMBRE"),_puc,(int) (0),(int) ((((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_RECHAZOCANT")))-(double)(Double.parseDouble(_resta)))/(double)(double)(Double.parseDouble(_subs._traeconversion /*String*/ (ba,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID")))))),__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"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CLIENTE"),(int)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CONSECUTIVO")))).getObject())),(Object)(_i));
 };
 };
RDebugUtils.currentLine=14876889;
 //BA.debugLineNum = 14876889;BA.debugLine="c2.Close";
_c2.Close();
 }}
;
 }
};
 };
RDebugUtils.currentLine=14876958;
 //BA.debugLineNum = 14876958;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmasc_click(reparto_mazapa.keymon.lat.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
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 = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _c2 = null;
String _puc = "";
RDebugUtils.currentLine=15532032;
 //BA.debugLineNum = 15532032;BA.debugLine="Private Sub b_prodMasC_Click";
RDebugUtils.currentLine=15532033;
 //BA.debugLineNum = 15532033;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=15532035;
 //BA.debugLineNum = 15532035;BA.debugLine="LogColor(\"b_prodMas_Click\", Colors.Magenta)";
__c.LogImpl("315532035","b_prodMas_Click",__c.Colors.Magenta);
RDebugUtils.currentLine=15532036;
 //BA.debugLineNum = 15532036;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=15532037;
 //BA.debugLineNum = 15532037;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=15532038;
 //BA.debugLineNum = 15532038;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=15532039;
 //BA.debugLineNum = 15532039;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=15532040;
 //BA.debugLineNum = 15532040;BA.debugLine="LogColor(laCantc.Text&\"--------------------------";
__c.LogImpl("315532040",_lacantc.getText()+"-----------------------------",__c.Colors.Blue);
RDebugUtils.currentLine=15532044;
 //BA.debugLineNum = 15532044;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=15532045;
 //BA.debugLineNum = 15532045;BA.debugLine="Log(\"LC_TEXT:\"&laCantc.Text&\"|LC_TAG:\"&laCantc.Ta";
__c.LogImpl("315532045","LC_TEXT:"+_lacantc.getText()+"|LC_TAG:"+BA.ObjectToString(_lacantc.getTag())+"|ET:"+BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=15532046;
 //BA.debugLineNum = 15532046;BA.debugLine="If laCantc.Text = \"\" Then laCantc.Text = 0";
if ((_lacantc.getText()).equals("")) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=15532048;
 //BA.debugLineNum = 15532048;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=15532049;
 //BA.debugLineNum = 15532049;BA.debugLine="LogColor(esteTag.Get(1),Colors.Red)";
__c.LogImpl("315532049",BA.ObjectToString(_estetag.Get((int) (1))),__c.Colors.Red);
RDebugUtils.currentLine=15532050;
 //BA.debugLineNum = 15532050;BA.debugLine="LogColor(esteTag.Get(4),Colors.Red)";
__c.LogImpl("315532050",BA.ObjectToString(_estetag.Get((int) (4))),__c.Colors.Red);
RDebugUtils.currentLine=15532051;
 //BA.debugLineNum = 15532051;BA.debugLine="LogColor($\"++++++++++++++++++++++++++   ${esteTag";
__c.LogImpl("315532051",("++++++++++++++++++++++++++   "+__c.SmartStringFormatter("",(Object)(_estetag.getObject()))+""),__c.Colors.Green);
RDebugUtils.currentLine=15532053;
 //BA.debugLineNum = 15532053;BA.debugLine="Log(maxProds)";
__c.LogImpl("315532053",_maxprods,0);
RDebugUtils.currentLine=15532056;
 //BA.debugLineNum = 15532056;BA.debugLine="Log(esteTag.Get(4))";
__c.LogImpl("315532056",BA.ObjectToString(_estetag.Get((int) (4))),0);
RDebugUtils.currentLine=15532057;
 //BA.debugLineNum = 15532057;BA.debugLine="If esteTag.Get(4) = \"0\" Then";
if ((_estetag.Get((int) (4))).equals((Object)("0"))) { 
 }else {
RDebugUtils.currentLine=15532060;
 //BA.debugLineNum = 15532060;BA.debugLine="If laCantc.Text + 1 <= maxProds Then";
if ((double)(Double.parseDouble(_lacantc.getText()))+1<=(double)(Double.parseDouble(_maxprods))) { 
RDebugUtils.currentLine=15532061;
 //BA.debugLineNum = 15532061;BA.debugLine="Log($\"NuevaCant = ${laCantc.Text + 1}\"$)";
__c.LogImpl("315532061",("NuevaCant = "+__c.SmartStringFormatter("",(Object)((double)(Double.parseDouble(_lacantc.getText()))+1))+""),0);
RDebugUtils.currentLine=15532063;
 //BA.debugLineNum = 15532063;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=15532064;
 //BA.debugLineNum = 15532064;BA.debugLine="LogColor(esteTag,Colors.Magenta)";
__c.LogImpl("315532064",BA.ObjectToString(_estetag),__c.Colors.Magenta);
RDebugUtils.currentLine=15532066;
 //BA.debugLineNum = 15532066;BA.debugLine="LogColor(laCantc.Text,Colors.Red)";
__c.LogImpl("315532066",_lacantc.getText(),__c.Colors.Red);
RDebugUtils.currentLine=15532069;
 //BA.debugLineNum = 15532069;BA.debugLine="c = Starter.skmt.ExecQuery2(\"SELECT * FROM PEDI";
__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) (6)))})));
RDebugUtils.currentLine=15532070;
 //BA.debugLineNum = 15532070;BA.debugLine="If c.RowCount > 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=15532071;
 //BA.debugLineNum = 15532071;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 HIST_VENTAS WHERE HVD_PROID = ? AND CONSECUTIVO = ? ",new String[]{BA.ObjectToString(_estetag.Get((int) (2))),BA.ObjectToString(_estetag.Get((int) (6)))})));
RDebugUtils.currentLine=15532072;
 //BA.debugLineNum = 15532072;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=15532073;
 //BA.debugLineNum = 15532073;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=15532074;
 //BA.debugLineNum = 15532074;BA.debugLine="Private puc As String = c2.GetString(\"HVD_COS";
_puc = BA.NumberToString((double)(Double.parseDouble(_c2.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_c2.GetString("CANTC"))));
RDebugUtils.currentLine=15532076;
 //BA.debugLineNum = 15532076;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)(_puc))+"', 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) (6)))+"'"));
RDebugUtils.currentLine=15532077;
 //BA.debugLineNum = 15532077;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
RDebugUtils.currentLine=15532078;
 //BA.debugLineNum = 15532078;BA.debugLine="Log(\"aqui2\")";
__c.LogImpl("315532078","aqui2",0);
 };
 }else {
RDebugUtils.currentLine=15532081;
 //BA.debugLineNum = 15532081;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 HIST_VENTAS WHERE HVD_PROID = ? AND CONSECUTIVO = ? ",new String[]{BA.ObjectToString(_estetag.Get((int) (2))),BA.ObjectToString(_estetag.Get((int) (6)))})));
RDebugUtils.currentLine=15532082;
 //BA.debugLineNum = 15532082;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=15532083;
 //BA.debugLineNum = 15532083;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=15532084;
 //BA.debugLineNum = 15532084;BA.debugLine="Private puc As String = c2.GetString(\"HVD_COS";
_puc = BA.NumberToString((double)(Double.parseDouble(_c2.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_c2.GetString("CANTC"))));
RDebugUtils.currentLine=15532085;
 //BA.debugLineNum = 15532085;BA.debugLine="Log(puc)";
__c.LogImpl("315532085",_puc,0);
RDebugUtils.currentLine=15532088;
 //BA.debugLineNum = 15532088;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO PEDID";
_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,PE_RUTA, PE_TIPO,PE_CEDIS,PE_FECHA,PE_USUARIO,FECHA_PREV,RUTA_REP,PE_REGALO) VALUES (?,?,?,?,?,?,?,1,1,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{BA.ObjectToString(_estetag.Get((int) (2))),_c2.GetString("HVD_PRONOMBRE"),_subs._traeconversion /*String*/ (ba,BA.ObjectToString(_estetag.Get((int) (2)))),BA.ObjectToString(_estetag.Get((int) (5))),_subs._traecliente /*String*/ (ba),_puc,_puc,BA.ObjectToString(_estetag.Get((int) (6))),_subs._traerutaprev /*String*/ (ba),"PREVENTA",_subs._traealmacen /*String*/ (ba),__ref._sdate /*String*/ +" "+__ref._stime /*String*/ ,_subs._traeusuario /*String*/ (ba),_subs._traefechaprev /*String*/ (ba),_subs._traerutareparto /*String*/ (ba),BA.NumberToString(0)}));
RDebugUtils.currentLine=15532089;
 //BA.debugLineNum = 15532089;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 };
 };
 };
RDebugUtils.currentLine=15532095;
 //BA.debugLineNum = 15532095;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmenos_click(reparto_mazapa.keymon.lat.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
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=15400960;
 //BA.debugLineNum = 15400960;BA.debugLine="Sub b_prodMenos_Click";
RDebugUtils.currentLine=15400961;
 //BA.debugLineNum = 15400961;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=15400962;
 //BA.debugLineNum = 15400962;BA.debugLine="Log(\"etCantHasFocus=\" & etCantHasFocus)";
__c.LogImpl("315400962","etCantHasFocus="+BA.ObjectToString(__ref._etcanthasfocus /*boolean*/ ),0);
RDebugUtils.currentLine=15400963;
 //BA.debugLineNum = 15400963;BA.debugLine="LogColor(\"b_prodMenos_Click\", Colors.Magenta)";
__c.LogImpl("315400963","b_prodMenos_Click",__c.Colors.Magenta);
RDebugUtils.currentLine=15400964;
 //BA.debugLineNum = 15400964;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=15400965;
 //BA.debugLineNum = 15400965;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=15400966;
 //BA.debugLineNum = 15400966;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=15400967;
 //BA.debugLineNum = 15400967;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=15400969;
 //BA.debugLineNum = 15400969;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=15400970;
 //BA.debugLineNum = 15400970;BA.debugLine="Log(\"LC_TEXT:\"&laCant.Text&\"|PROMO:\"&esteTag.Get(";
__c.LogImpl("315400970","LC_TEXT:"+_lacant.getText()+"|PROMO:"+BA.ObjectToString(_estetag.Get((int) (3)))+"|LC_TAG:"+BA.ObjectToString(_lacant.getTag())+"|ET:"+BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=15400972;
 //BA.debugLineNum = 15400972;BA.debugLine="Private minimoadesc As String";
_minimoadesc = "";
RDebugUtils.currentLine=15400973;
 //BA.debugLineNum = 15400973;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=15400974;
 //BA.debugLineNum = 15400974;BA.debugLine="If minimos.RowCount > 0 Then";
if (_minimos.getRowCount()>0) { 
RDebugUtils.currentLine=15400975;
 //BA.debugLineNum = 15400975;BA.debugLine="minimos.Position = 0";
_minimos.setPosition((int) (0));
RDebugUtils.currentLine=15400976;
 //BA.debugLineNum = 15400976;BA.debugLine="minimoadesc = minimos.GetString(\"CAT_DP_CANT_MIN";
_minimoadesc = _minimos.GetString("CAT_DP_CANT_MIN_VENTA");
 }else {
RDebugUtils.currentLine=15400978;
 //BA.debugLineNum = 15400978;BA.debugLine="minimoadesc = \"1\"";
_minimoadesc = "1";
 };
RDebugUtils.currentLine=15400980;
 //BA.debugLineNum = 15400980;BA.debugLine="minimos.Close";
_minimos.Close();
RDebugUtils.currentLine=15400983;
 //BA.debugLineNum = 15400983;BA.debugLine="If laCant.Text > 0 Then";
if ((double)(Double.parseDouble(_lacant.getText()))>0) { 
RDebugUtils.currentLine=15401018;
 //BA.debugLineNum = 15401018;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
if ((_lacant.getText()).equals("")) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=15401019;
 //BA.debugLineNum = 15401019;BA.debugLine="laCant.Text = $\"$1.0{laCant.Text-(1*minimoadesc)";
_lacant.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.0",(Object)((double)(Double.parseDouble(_lacant.getText()))-(1*(double)(Double.parseDouble(_minimoadesc)))))+"")));
RDebugUtils.currentLine=15401020;
 //BA.debugLineNum = 15401020;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0";
if ((double)(Double.parseDouble(_lacant.getText()))<0) { 
_lacant.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=15401021;
 //BA.debugLineNum = 15401021;BA.debugLine="Log(\"NO ES promo\")";
__c.LogImpl("315401021","NO ES promo",0);
RDebugUtils.currentLine=15401026;
 //BA.debugLineNum = 15401026;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) (6)))})));
RDebugUtils.currentLine=15401027;
 //BA.debugLineNum = 15401027;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=15401028;
 //BA.debugLineNum = 15401028;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
RDebugUtils.currentLine=15401029;
 //BA.debugLineNum = 15401029;BA.debugLine="If c3.GetString(\"PE_CANT\")> minimoadesc Then";
if ((double)(Double.parseDouble(_c3.GetString("PE_CANT")))>(double)(Double.parseDouble(_minimoadesc))) { 
RDebugUtils.currentLine=15401030;
 //BA.debugLineNum = 15401030;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=15401031;
 //BA.debugLineNum = 15401031;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=15401032;
 //BA.debugLineNum = 15401032;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=15401034;
 //BA.debugLineNum = 15401034;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) (6)))+"'"));
 };
 }else 
{RDebugUtils.currentLine=15401036;
 //BA.debugLineNum = 15401036;BA.debugLine="Else If c3.GetString(\"PE_CANT\") = minimoadesc T";
if ((_c3.GetString("PE_CANT")).equals(_minimoadesc)) { 
RDebugUtils.currentLine=15401037;
 //BA.debugLineNum = 15401037;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=15401038;
 //BA.debugLineNum = 15401038;BA.debugLine="If c2.RowCount > 0 Then";
if (_c2.getRowCount()>0) { 
RDebugUtils.currentLine=15401039;
 //BA.debugLineNum = 15401039;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
RDebugUtils.currentLine=15401042;
 //BA.debugLineNum = 15401042;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) (6)))+"'"));
 };
 }}
;
 };
RDebugUtils.currentLine=15401049;
 //BA.debugLineNum = 15401049;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
RDebugUtils.currentLine=15401052;
 //BA.debugLineNum = 15401052;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=15401053;
 //BA.debugLineNum = 15401053;BA.debugLine="Log(\"PU: \" & preciou)";
__c.LogImpl("315401053","PU: "+BA.NumberToString(_preciou),0);
RDebugUtils.currentLine=15401064;
 //BA.debugLineNum = 15401064;BA.debugLine="End Sub";
return "";
}
public String  _b_prodmenosc_click(reparto_mazapa.keymon.lat.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
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=15597568;
 //BA.debugLineNum = 15597568;BA.debugLine="Private Sub b_prodMenosC_Click";
RDebugUtils.currentLine=15597569;
 //BA.debugLineNum = 15597569;BA.debugLine="etCantHasFocus = False";
__ref._etcanthasfocus /*boolean*/  = __c.False;
RDebugUtils.currentLine=15597570;
 //BA.debugLineNum = 15597570;BA.debugLine="Log(\"etCantHasFocus=\" & etCantHasFocus)";
__c.LogImpl("315597570","etCantHasFocus="+BA.ObjectToString(__ref._etcanthasfocus /*boolean*/ ),0);
RDebugUtils.currentLine=15597571;
 //BA.debugLineNum = 15597571;BA.debugLine="LogColor(\"b_prodMenos_Click\", Colors.Magenta)";
__c.LogImpl("315597571","b_prodMenos_Click",__c.Colors.Magenta);
RDebugUtils.currentLine=15597572;
 //BA.debugLineNum = 15597572;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=15597573;
 //BA.debugLineNum = 15597573;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=15597574;
 //BA.debugLineNum = 15597574;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_pnl = _pnl0.GetView((int) (0));
RDebugUtils.currentLine=15597575;
 //BA.debugLineNum = 15597575;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=15597577;
 //BA.debugLineNum = 15597577;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=15597578;
 //BA.debugLineNum = 15597578;BA.debugLine="Log(\"LC_TEXT:\"&laCantc.Text&\"|PROMO:\"&esteTag.Get";
__c.LogImpl("315597578","LC_TEXT:"+_lacantc.getText()+"|PROMO:"+BA.ObjectToString(_estetag.Get((int) (3)))+"|LC_TAG:"+BA.ObjectToString(_lacantc.getTag())+"|ET:"+BA.ObjectToString(_estetag),0);
RDebugUtils.currentLine=15597582;
 //BA.debugLineNum = 15597582;BA.debugLine="If laCantc.Text > 0 Then";
if ((double)(Double.parseDouble(_lacantc.getText()))>0) { 
RDebugUtils.currentLine=15597585;
 //BA.debugLineNum = 15597585;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) (6)))})));
RDebugUtils.currentLine=15597586;
 //BA.debugLineNum = 15597586;BA.debugLine="If c3.RowCount > 0 Then";
if (_c3.getRowCount()>0) { 
RDebugUtils.currentLine=15597587;
 //BA.debugLineNum = 15597587;BA.debugLine="c3.Position = 0";
_c3.setPosition((int) (0));
RDebugUtils.currentLine=15597588;
 //BA.debugLineNum = 15597588;BA.debugLine="If c3.GetString(\"PE_CAJAS\") > 1 Then";
if ((double)(Double.parseDouble(_c3.GetString("PE_CAJAS")))>1) { 
RDebugUtils.currentLine=15597589;
 //BA.debugLineNum = 15597589;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("",_estetag.Get((int) (6)))+"'"));
 }else 
{RDebugUtils.currentLine=15597590;
 //BA.debugLineNum = 15597590;BA.debugLine="Else If c3.GetString(\"PE_CAJAS\") = 1 Then";
if ((_c3.GetString("PE_CAJAS")).equals(BA.NumberToString(1))) { 
RDebugUtils.currentLine=15597591;
 //BA.debugLineNum = 15597591;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("",_estetag.Get((int) (6)))+"'"));
 }}
;
 };
RDebugUtils.currentLine=15597594;
 //BA.debugLineNum = 15597594;BA.debugLine="Log(\"entre al if o algo asi \")";
__c.LogImpl("315597594","entre al if o algo asi ",0);
RDebugUtils.currentLine=15597595;
 //BA.debugLineNum = 15597595;BA.debugLine="If laCantc.Text = \"\" Then laCantc.Text = 0";
if ((_lacantc.getText()).equals("")) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=15597596;
 //BA.debugLineNum = 15597596;BA.debugLine="laCantc.Text = laCantc.Text - 1";
_lacantc.setText(BA.ObjectToCharSequence((double)(Double.parseDouble(_lacantc.getText()))-1));
RDebugUtils.currentLine=15597597;
 //BA.debugLineNum = 15597597;BA.debugLine="If laCantc.Text < 0 Then laCantc.Text = 0";
if ((double)(Double.parseDouble(_lacantc.getText()))<0) { 
_lacantc.setText(BA.ObjectToCharSequence(0));};
RDebugUtils.currentLine=15597598;
 //BA.debugLineNum = 15597598;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 }else 
{RDebugUtils.currentLine=15597600;
 //BA.debugLineNum = 15597600;BA.debugLine="Else If laCantc.Text = 0 Then";
if ((_lacantc.getText()).equals(BA.NumberToString(0))) { 
 }}
;
RDebugUtils.currentLine=15597604;
 //BA.debugLineNum = 15597604;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=15597605;
 //BA.debugLineNum = 15597605;BA.debugLine="Log(\"PU: \" & preciou)";
__c.LogImpl("315597605","PU: "+BA.NumberToString(_preciou),0);
RDebugUtils.currentLine=15597606;
 //BA.debugLineNum = 15597606;BA.debugLine="End Sub";
return "";
}
public String  _b_regresar_click(reparto_mazapa.keymon.lat.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "b_regresar_click", false))
	 {return ((String) Debug.delegate(ba, "b_regresar_click", null));}
RDebugUtils.currentLine=15007744;
 //BA.debugLineNum = 15007744;BA.debugLine="Sub b_regresar_Click";
RDebugUtils.currentLine=15007745;
 //BA.debugLineNum = 15007745;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=15007746;
 //BA.debugLineNum = 15007746;BA.debugLine="End Sub";
return "";
}
public String  _b_revversar_click(reparto_mazapa.keymon.lat.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "b_revversar_click", false))
	 {return ((String) Debug.delegate(ba, "b_revversar_click", null));}
RDebugUtils.currentLine=15728640;
 //BA.debugLineNum = 15728640;BA.debugLine="Private Sub b_revversar_Click";
RDebugUtils.currentLine=15728641;
 //BA.debugLineNum = 15728641;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTAS se";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 0,  HVD_RECHAZOCANT = 0  WHERE HVD_cliente in (Select CUENTA from cuentaa)"));
RDebugUtils.currentLine=15728642;
 //BA.debugLineNum = 15728642;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
RDebugUtils.currentLine=15728643;
 //BA.debugLineNum = 15728643;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.objects.PanelWrapper  _createlistitem(reparto_mazapa.keymon.lat.c_productos __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,int _consecutivo) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
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,_consecutivo}));}
anywheresoftware.b4a.objects.B4XViewWrapper _p = null;
anywheresoftware.b4a.objects.CSBuilder _cs = null;
RDebugUtils.currentLine=15269888;
 //BA.debugLineNum = 15269888;BA.debugLine="Sub CreateListItem(Text As String, precioU As Stri";
RDebugUtils.currentLine=15269889;
 //BA.debugLineNum = 15269889;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=15269890;
 //BA.debugLineNum = 15269890;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=15269891;
 //BA.debugLineNum = 15269891;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=15269892;
 //BA.debugLineNum = 15269892;BA.debugLine="p.SetLayoutAnimated(0, 0, 0, Width, Height)";
_p.SetLayoutAnimated((int) (0),(int) (0),(int) (0),_width,_height);
RDebugUtils.currentLine=15269893;
 //BA.debugLineNum = 15269893;BA.debugLine="p.LoadLayout(\"prodItem2\")";
_p.LoadLayout("prodItem2",ba);
RDebugUtils.currentLine=15269894;
 //BA.debugLineNum = 15269894;BA.debugLine="p_prods.Color = bc";
__ref._p_prods /*anywheresoftware.b4a.objects.PanelWrapper*/ .setColor(_bc);
RDebugUtils.currentLine=15269895;
 //BA.debugLineNum = 15269895;BA.debugLine="l_prodX.TextColor = tc";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor(_tc);
RDebugUtils.currentLine=15269896;
 //BA.debugLineNum = 15269896;BA.debugLine="precioU = $\"$1.2{precioU}\"$";
_preciou = (""+__c.SmartStringFormatter("1.2",(Object)(_preciou))+"");
RDebugUtils.currentLine=15269897;
 //BA.debugLineNum = 15269897;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=15269898;
 //BA.debugLineNum = 15269898;BA.debugLine="If promo <> \"1\" And precioU = 0 Then";
if ((_promo).equals("1") == false && (_preciou).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=15269899;
 //BA.debugLineNum = 15269899;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=15269901;
 //BA.debugLineNum = 15269901;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=15269904;
 //BA.debugLineNum = 15269904;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+"|"+BA.NumberToString(_consecutivo)));
RDebugUtils.currentLine=15269905;
 //BA.debugLineNum = 15269905;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+"|"+BA.NumberToString(_consecutivo)));
RDebugUtils.currentLine=15269906;
 //BA.debugLineNum = 15269906;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=15269908;
 //BA.debugLineNum = 15269908;BA.debugLine="l_pCant.Text = inv";
__ref._l_pcant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_inv));
RDebugUtils.currentLine=15269912;
 //BA.debugLineNum = 15269912;BA.debugLine="l_pCant.BringToFront";
__ref._l_pcant /*anywheresoftware.b4a.objects.LabelWrapper*/ .BringToFront();
RDebugUtils.currentLine=15269913;
 //BA.debugLineNum = 15269913;BA.debugLine="et_pCant.SendToBack";
__ref._et_pcant /*anywheresoftware.b4a.objects.EditTextWrapper*/ .SendToBack();
RDebugUtils.currentLine=15269914;
 //BA.debugLineNum = 15269914;BA.debugLine="p_botMasMenC.Visible = False";
__ref._p_botmasmenc /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=15269915;
 //BA.debugLineNum = 15269915;BA.debugLine="l_cajas.Visible = False";
__ref._l_cajas /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=15269917;
 //BA.debugLineNum = 15269917;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=15269918;
 //BA.debugLineNum = 15269918;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4a.objects.PanelWrapper  _createlistitem2(reparto_mazapa.keymon.lat.c_productos __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,int _consecutivo) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
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,_consecutivo}));}
anywheresoftware.b4a.objects.B4XViewWrapper _p = null;
anywheresoftware.b4a.objects.CSBuilder _cs = null;
RDebugUtils.currentLine=15335424;
 //BA.debugLineNum = 15335424;BA.debugLine="Sub CreateListItem2(Text As String, precioU As Str";
RDebugUtils.currentLine=15335425;
 //BA.debugLineNum = 15335425;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=15335426;
 //BA.debugLineNum = 15335426;BA.debugLine="Private cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=15335427;
 //BA.debugLineNum = 15335427;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=15335428;
 //BA.debugLineNum = 15335428;BA.debugLine="p.SetLayoutAnimated(0, 0, 0, Width, Height)";
_p.SetLayoutAnimated((int) (0),(int) (0),(int) (0),_width,_height);
RDebugUtils.currentLine=15335429;
 //BA.debugLineNum = 15335429;BA.debugLine="p.LoadLayout(\"prodItem2\")";
_p.LoadLayout("prodItem2",ba);
RDebugUtils.currentLine=15335430;
 //BA.debugLineNum = 15335430;BA.debugLine="p_prods.Color = bc";
__ref._p_prods /*anywheresoftware.b4a.objects.PanelWrapper*/ .setColor(_bc);
RDebugUtils.currentLine=15335431;
 //BA.debugLineNum = 15335431;BA.debugLine="l_prodX.TextColor = tc";
__ref._l_prodx /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor(_tc);
RDebugUtils.currentLine=15335432;
 //BA.debugLineNum = 15335432;BA.debugLine="precioU = $\"$1.2{precioU}\"$";
_preciou = (""+__c.SmartStringFormatter("1.2",(Object)(_preciou))+"");
RDebugUtils.currentLine=15335433;
 //BA.debugLineNum = 15335433;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=15335434;
 //BA.debugLineNum = 15335434;BA.debugLine="If promo <> \"1\" And precioU = 0 Then";
if ((_promo).equals("1") == false && (_preciou).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=15335435;
 //BA.debugLineNum = 15335435;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=15335438;
 //BA.debugLineNum = 15335438;BA.debugLine="Log(inv&\" inventario 1\")";
__c.LogImpl("315335438",BA.NumberToString(_inv)+" inventario 1",0);
RDebugUtils.currentLine=15335439;
 //BA.debugLineNum = 15335439;BA.debugLine="Log(inv2&\" inventario 2\")";
__c.LogImpl("315335439",BA.NumberToString(_inv2)+" inventario 2",0);
RDebugUtils.currentLine=15335440;
 //BA.debugLineNum = 15335440;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=15335442;
 //BA.debugLineNum = 15335442;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+"|"+BA.NumberToString(_consecutivo)));
RDebugUtils.currentLine=15335443;
 //BA.debugLineNum = 15335443;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+"|"+BA.NumberToString(_consecutivo)));
RDebugUtils.currentLine=15335444;
 //BA.debugLineNum = 15335444;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=15335446;
 //BA.debugLineNum = 15335446;BA.debugLine="l_pCantC.Text = NumberFormat2(inv,0,0,0,False)";
__ref._l_pcantc /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.NumberFormat2(_inv,(int) (0),(int) (0),(int) (0),__c.False)));
RDebugUtils.currentLine=15335450;
 //BA.debugLineNum = 15335450;BA.debugLine="l_pCantC.BringToFront";
__ref._l_pcantc /*anywheresoftware.b4a.objects.LabelWrapper*/ .BringToFront();
RDebugUtils.currentLine=15335451;
 //BA.debugLineNum = 15335451;BA.debugLine="et_pCantC.SendToBack";
__ref._et_pcantc /*anywheresoftware.b4a.objects.EditTextWrapper*/ .SendToBack();
RDebugUtils.currentLine=15335452;
 //BA.debugLineNum = 15335452;BA.debugLine="p_botMasMen.Visible = False";
__ref._p_botmasmen /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=15335453;
 //BA.debugLineNum = 15335453;BA.debugLine="l_piezas.Visible = False";
__ref._l_piezas /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=15335455;
 //BA.debugLineNum = 15335455;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=15335456;
 //BA.debugLineNum = 15335456;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest(reparto_mazapa.keymon.lat.c_productos __ref) throws Exception{
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "b4xpage_closerequest", false))
	 {return ((anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) Debug.delegate(ba, "b4xpage_closerequest", null));}
ResumableSub_B4XPage_CloseRequest rsub = new ResumableSub_B4XPage_CloseRequest(this,__ref);
rsub.resume(ba, null);
return (anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.keywords.Common.ResumableSubWrapper(), rsub);
}
public static class ResumableSub_B4XPage_CloseRequest extends BA.ResumableSub {
public ResumableSub_B4XPage_CloseRequest(reparto_mazapa.keymon.lat.c_productos parent,reparto_mazapa.keymon.lat.c_productos __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
reparto_mazapa.keymon.lat.c_productos __ref;
reparto_mazapa.keymon.lat.c_productos parent;

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

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

            }
        }
    }
}
public String  _b4xpage_created(reparto_mazapa.keymon.lat.c_productos __ref,anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "b4xpage_created", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_created", new Object[] {_root1}));}
RDebugUtils.currentLine=14811136;
 //BA.debugLineNum = 14811136;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=14811137;
 //BA.debugLineNum = 14811137;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=14811138;
 //BA.debugLineNum = 14811138;BA.debugLine="B4XPages.SetTitle(Me, \"Productos\")";
_b4xpages._settitle /*String*/ (ba,this,(Object)("Productos"));
RDebugUtils.currentLine=14811140;
 //BA.debugLineNum = 14811140;BA.debugLine="g.Initialize(\"GPS\")";
__ref._g /*anywheresoftware.b4a.gps.GPS*/ .Initialize("GPS");
RDebugUtils.currentLine=14811141;
 //BA.debugLineNum = 14811141;BA.debugLine="Root.LoadLayout(\"detalleVenta\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("detalleVenta",ba);
RDebugUtils.currentLine=14811142;
 //BA.debugLineNum = 14811142;BA.debugLine="b_borra.Visible = False";
__ref._b_borra /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=14811143;
 //BA.debugLineNum = 14811143;BA.debugLine="Titulo.Text = \"Pedido\"";
__ref._titulo /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("Pedido"));
RDebugUtils.currentLine=14811144;
 //BA.debugLineNum = 14811144;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(reparto_mazapa.keymon.lat.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
RDebugUtils.currentLine=14680064;
 //BA.debugLineNum = 14680064;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=14680065;
 //BA.debugLineNum = 14680065;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=14680066;
 //BA.debugLineNum = 14680066;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=14680067;
 //BA.debugLineNum = 14680067;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
RDebugUtils.currentLine=14680068;
 //BA.debugLineNum = 14680068;BA.debugLine="Dim clie_id As String";
_clie_id = "";
RDebugUtils.currentLine=14680069;
 //BA.debugLineNum = 14680069;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
RDebugUtils.currentLine=14680070;
 //BA.debugLineNum = 14680070;BA.debugLine="Dim usuario As String";
_usuario = "";
RDebugUtils.currentLine=14680071;
 //BA.debugLineNum = 14680071;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=14680073;
 //BA.debugLineNum = 14680073;BA.debugLine="Dim b_regresar As Button";
_b_regresar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=14680074;
 //BA.debugLineNum = 14680074;BA.debugLine="Dim ListView1 As ListView";
_listview1 = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=14680075;
 //BA.debugLineNum = 14680075;BA.debugLine="Dim L_CANT As Label";
_l_cant = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=14680076;
 //BA.debugLineNum = 14680076;BA.debugLine="Dim L_TOTAL As Label";
_l_total = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=14680077;
 //BA.debugLineNum = 14680077;BA.debugLine="Dim b_borra As Button";
_b_borra = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=14680078;
 //BA.debugLineNum = 14680078;BA.debugLine="Dim Existe As String";
_existe = "";
RDebugUtils.currentLine=14680079;
 //BA.debugLineNum = 14680079;BA.debugLine="Dim result As String";
_result = "";
RDebugUtils.currentLine=14680081;
 //BA.debugLineNum = 14680081;BA.debugLine="Dim cuantos As String";
_cuantos = "";
RDebugUtils.currentLine=14680082;
 //BA.debugLineNum = 14680082;BA.debugLine="Dim nombre_prod As String";
_nombre_prod = "";
RDebugUtils.currentLine=14680083;
 //BA.debugLineNum = 14680083;BA.debugLine="Dim cuantos_pedido As String";
_cuantos_pedido = "";
RDebugUtils.currentLine=14680084;
 //BA.debugLineNum = 14680084;BA.debugLine="Private Titulo As Label";
_titulo = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=14680085;
 //BA.debugLineNum = 14680085;BA.debugLine="Private P1 As Panel";
_p1 = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=14680086;
 //BA.debugLineNum = 14680086;BA.debugLine="Private lv2 As ListView";
_lv2 = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=14680087;
 //BA.debugLineNum = 14680087;BA.debugLine="Private p_principal As Panel";
_p_principal = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=14680088;
 //BA.debugLineNum = 14680088;BA.debugLine="Dim clv_pedido As CustomListView";
_clv_pedido = new b4a.example3.customlistview();
RDebugUtils.currentLine=14680089;
 //BA.debugLineNum = 14680089;BA.debugLine="Private p_prods As Panel";
_p_prods = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=14680090;
 //BA.debugLineNum = 14680090;BA.debugLine="Private l_prodX As Label";
_l_prodx = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=14680091;
 //BA.debugLineNum = 14680091;BA.debugLine="Private l_pCant As Label";
_l_pcant = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=14680092;
 //BA.debugLineNum = 14680092;BA.debugLine="Private et_pCant As EditText";
_et_pcant = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=14680093;
 //BA.debugLineNum = 14680093;BA.debugLine="Dim bmp As Bitmap";
_bmp = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper();
RDebugUtils.currentLine=14680094;
 //BA.debugLineNum = 14680094;BA.debugLine="Dim etCantHasFocus As Boolean = False";
_etcanthasfocus = __c.False;
RDebugUtils.currentLine=14680095;
 //BA.debugLineNum = 14680095;BA.debugLine="Dim totalProds As Int = 0";
_totalprods = (int) (0);
RDebugUtils.currentLine=14680096;
 //BA.debugLineNum = 14680096;BA.debugLine="Dim totalCompra As Int = 0";
_totalcompra = (int) (0);
RDebugUtils.currentLine=14680097;
 //BA.debugLineNum = 14680097;BA.debugLine="Dim prodsMap As Map";
_prodsmap = new anywheresoftware.b4a.objects.collections.Map();
RDebugUtils.currentLine=14680098;
 //BA.debugLineNum = 14680098;BA.debugLine="Dim reconstruirPedido As Boolean = False";
_reconstruirpedido = __c.False;
RDebugUtils.currentLine=14680099;
 //BA.debugLineNum = 14680099;BA.debugLine="Dim promoABorrar As String";
_promoaborrar = "";
RDebugUtils.currentLine=14680100;
 //BA.debugLineNum = 14680100;BA.debugLine="Private b_guardar As Button";
_b_guardar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=14680101;
 //BA.debugLineNum = 14680101;BA.debugLine="Private b_prodMas As Button";
_b_prodmas = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=14680102;
 //BA.debugLineNum = 14680102;BA.debugLine="Private b_prodMenos As Button";
_b_prodmenos = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=14680103;
 //BA.debugLineNum = 14680103;BA.debugLine="Private b_prodMenosC As Button";
_b_prodmenosc = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=14680104;
 //BA.debugLineNum = 14680104;BA.debugLine="Private l_pCantC As Label";
_l_pcantc = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=14680105;
 //BA.debugLineNum = 14680105;BA.debugLine="Private et_pCantC As EditText";
_et_pcantc = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=14680106;
 //BA.debugLineNum = 14680106;BA.debugLine="Private b_prodMasC As Button";
_b_prodmasc = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=14680107;
 //BA.debugLineNum = 14680107;BA.debugLine="Private p_botMasMenC As Panel";
_p_botmasmenc = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=14680108;
 //BA.debugLineNum = 14680108;BA.debugLine="Private p_botMasMen As Panel";
_p_botmasmen = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=14680109;
 //BA.debugLineNum = 14680109;BA.debugLine="Private b_revversar As Button";
_b_revversar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=14680110;
 //BA.debugLineNum = 14680110;BA.debugLine="Private Label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=14680111;
 //BA.debugLineNum = 14680111;BA.debugLine="Private Label3 As Label";
_label3 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=14680112;
 //BA.debugLineNum = 14680112;BA.debugLine="Private l_piezas As Label";
_l_piezas = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=14680113;
 //BA.debugLineNum = 14680113;BA.debugLine="Private l_cajas As Label";
_l_cajas = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=14680115;
 //BA.debugLineNum = 14680115;BA.debugLine="Private l_cajas As Label";
_l_cajas = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=14680116;
 //BA.debugLineNum = 14680116;BA.debugLine="Private l_piezas As Label";
_l_piezas = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=14680117;
 //BA.debugLineNum = 14680117;BA.debugLine="End Sub";
return "";
}
public String  _cuentaprods(reparto_mazapa.keymon.lat.c_productos __ref,String _accion) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "cuentaprods", false))
	 {return ((String) Debug.delegate(ba, "cuentaprods", new Object[] {_accion}));}
RDebugUtils.currentLine=15794176;
 //BA.debugLineNum = 15794176;BA.debugLine="Sub cuentaProds(accion As String)";
RDebugUtils.currentLine=15794338;
 //BA.debugLineNum = 15794338;BA.debugLine="End Sub";
return "";
}
public String  _l_pcant_click(reparto_mazapa.keymon.lat.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "l_pcant_click", false))
	 {return ((String) Debug.delegate(ba, "l_pcant_click", null));}
RDebugUtils.currentLine=15925248;
 //BA.debugLineNum = 15925248;BA.debugLine="Private Sub l_pCant_Click";
RDebugUtils.currentLine=15925250;
 //BA.debugLineNum = 15925250;BA.debugLine="End Sub";
return "";
}
public String  _l_pcantc_click(reparto_mazapa.keymon.lat.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "l_pcantc_click", false))
	 {return ((String) Debug.delegate(ba, "l_pcantc_click", null));}
RDebugUtils.currentLine=15663104;
 //BA.debugLineNum = 15663104;BA.debugLine="Private Sub l_pCantC_Click";
RDebugUtils.currentLine=15663106;
 //BA.debugLineNum = 15663106;BA.debugLine="End Sub";
return "";
}
public String  _listview1_itemlongclick(reparto_mazapa.keymon.lat.c_productos __ref,int _position,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "listview1_itemlongclick", false))
	 {return ((String) Debug.delegate(ba, "listview1_itemlongclick", new Object[] {_position,_value}));}
RDebugUtils.currentLine=15138816;
 //BA.debugLineNum = 15138816;BA.debugLine="Sub ListView1_ItemLongClick (Position As Int, Valu";
RDebugUtils.currentLine=15138860;
 //BA.debugLineNum = 15138860;BA.debugLine="End Sub";
return "";
}
public String  _lv2_itemclick(reparto_mazapa.keymon.lat.c_productos __ref,int _position,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "lv2_itemclick", false))
	 {return ((String) Debug.delegate(ba, "lv2_itemclick", new Object[] {_position,_value}));}
RDebugUtils.currentLine=15204352;
 //BA.debugLineNum = 15204352;BA.debugLine="Sub lv2_ItemClick (Position As Int, Value As Objec";
RDebugUtils.currentLine=15204413;
 //BA.debugLineNum = 15204413;BA.debugLine="End Sub";
return "";
}
public String  _p_prods_click(reparto_mazapa.keymon.lat.c_productos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_productos";
if (Debug.shouldDelegate(ba, "p_prods_click", false))
	 {return ((String) Debug.delegate(ba, "p_prods_click", null));}
RDebugUtils.currentLine=15990784;
 //BA.debugLineNum = 15990784;BA.debugLine="Sub p_prods_Click";
RDebugUtils.currentLine=15990785;
 //BA.debugLineNum = 15990785;BA.debugLine="Log(Sender.As(Panel).tag)";
__c.LogImpl("315990785",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=15990786;
 //BA.debugLineNum = 15990786;BA.debugLine="End Sub";
return "";
}
}