Files
Medicomed_Preventa/B4A/Objects/src/keymon/lat/medicomed/c_cliente.java
IsR0d f9f3ff7d6e Version: 4:11:02
Se arrglo el resumen dia, ahora puedes entrar sin necesidad de hacer algun pedido sin que truene, se muestra la cantidad de clientes visitados sin importar si tienen o no tienen venta y tambien se le agrego la cantidad de clientes que si tienen venta.
2024-11-04 12:41:26 -06:00

2042 lines
114 KiB
Java

package keymon.lat.medicomed;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;
public class c_cliente extends B4AClass.ImplB4AClass implements BA.SubDelegator{
private static java.util.HashMap<String, java.lang.reflect.Method> htSubs;
private void innerInitialize(BA _ba) throws Exception {
if (ba == null) {
ba = new BA(_ba, this, htSubs, "keymon.lat.medicomed.c_cliente");
if (htSubs == null) {
ba.loadHtSubs(this.getClass());
htSubs = ba.htSubs;
}
}
if (BA.isShellModeRuntimeCheck(ba))
this.getClass().getMethod("_class_globals", keymon.lat.medicomed.c_cliente.class).invoke(this, new Object[] {null});
else
ba.raiseEvent2(null, true, "class_globals", false);
}
public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _root = null;
public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_cliente = null;
public keymon.lat.medicomed.dbrequestmanager _reqmanager = null;
public keymon.lat.medicomed.dbrequestmanager._dbcommand _cmd = null;
public anywheresoftware.b4a.objects.IME _ime = null;
public anywheresoftware.b4a.gps.GPS _g = null;
public String _ruta = "";
public anywheresoftware.b4a.sql.SQL _skmt = null;
public String _clie_id = "";
public String _sdate = "";
public String _stime = "";
public String _usuario = "";
public String _total_cliente = "";
public String _m_lat = "";
public String _m_lon = "";
public anywheresoftware.b4a.objects.Serial.BluetoothAdmin _btadmin = null;
public anywheresoftware.b4a.objects.Serial _cmp20 = null;
public anywheresoftware.b4a.objects.streams.File.TextWriterWrapper _printer = null;
public anywheresoftware.b4a.objects.collections.Map _paireddevices = null;
public anywheresoftware.b4a.objects.collections.List _l = null;
public int _tamano = 0;
public int _espacio = 0;
public String _blanco = "";
public String _cuenta = "";
public String _tipo_venta = "";
public String _mac_impresora = "";
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _s = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _dd = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c2 = null;
public anywheresoftware.b4a.objects.ListViewWrapper _listview1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_cuenta = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_nombre = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_calle = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_numero = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_nint = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_edo = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_pob = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_col = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_cp = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_zona = null;
public anywheresoftware.b4a.objects.ButtonWrapper _gest = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_saldotot = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_saldooper = null;
public anywheresoftware.b4a.objects.ButtonWrapper _tels = null;
public anywheresoftware.b4a.objects.LabelWrapper _label10 = null;
public anywheresoftware.b4a.objects.LabelWrapper _label11 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _tar = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_comm = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_actdte = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_usuario = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_resultado = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_entre1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_entre2 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_atiende = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_atiende2 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _datos = null;
public anywheresoftware.b4a.objects.ButtonWrapper _guardar = null;
public anywheresoftware.b4a.objects.ButtonWrapper _nuevo = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_total = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _s2 = null;
public String _res = "";
public anywheresoftware.b4a.objects.ButtonWrapper _hist = null;
public String _monto_compra = "";
public String _meta = "";
public String _meta2 = "";
public String _verifica = "";
public anywheresoftware.b4a.objects.LabelWrapper _l_qr = null;
public anywheresoftware.b4a.objects.ButtonWrapper _bt_qr = null;
public String _codigo = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_mapa = null;
public String _cuantos = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_imp = null;
public com.rootsoft.togglelibrary.ToggleLibrary _toggla = null;
public com.rootsoft.togglelibrary.ToggleLibrary _tgl = null;
public anywheresoftware.b4a.objects.PanelWrapper _panel1 = null;
public anywheresoftware.b4a.objects.EditTextWrapper _i_compra = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_guarda_c = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_venta = null;
public String _almacen = "";
public anywheresoftware.b4a.objects.LabelWrapper _la_gps = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_e_next = null;
public anywheresoftware.b4a.objects.EditTextWrapper _e_res_e = null;
public anywheresoftware.b4a.objects.LabelWrapper _t_tenc = null;
public anywheresoftware.b4a.objects.PanelWrapper _panel2 = null;
public String _contador_e = "";
public String _hr_res1 = "";
public String _hr_res2 = "";
public String _hr_res3 = "";
public String _existe = "";
public String _telefono = "";
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _rb1 = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _rb2 = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _rb3 = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _rb4 = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _rb5 = null;
public String _stay_hh = "";
public String _stay_mi = "";
public String _stay_ss = "";
public anywheresoftware.b4a.objects.LabelWrapper _la_geo = null;
public int _result = 0;
public String _cercavalor = "";
public String _la_ruta = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_like = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_gps = null;
public ice.zxing.b4aZXingLib _sc = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.CheckBoxWrapper _cb_factura = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_cbfactura = null;
public boolean _venimosdeticketsdia = false;
public anywheresoftware.b4a.objects.PanelWrapper _p_abono = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_abono = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_abono = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_cancelar = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_abono1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _label20 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_calle1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_ubicacion2 = null;
public boolean _dentrodegeocerca = false;
public anywheresoftware.b4a.objects.ButtonWrapper _b_iniciofinventa = null;
public int _precision = 0;
public String _motivonoventa = "";
public String _motivonovisita = "";
public String _id_almacen = "";
public String _ruta_tienda = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_clintesinventa = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_clienteventa = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_monto_venta = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_monto_venta = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_can_monto_venta = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_gu_monto_venta = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_inv = null;
public b4a.example.dateutils _dateutils = null;
public keymon.lat.medicomed.main _main = null;
public keymon.lat.medicomed.starter _starter = null;
public keymon.lat.medicomed.subs _subs = null;
public keymon.lat.medicomed.appupdater _appupdater = null;
public keymon.lat.medicomed.mapa_rutas _mapa_rutas = null;
public keymon.lat.medicomed.tracker _tracker = null;
public keymon.lat.medicomed.newinst2 _newinst2 = null;
public keymon.lat.medicomed.b4xpages _b4xpages = null;
public keymon.lat.medicomed.b4xcollections _b4xcollections = null;
public keymon.lat.medicomed.httputils2service _httputils2service = null;
public keymon.lat.medicomed.xuiviewsutils _xuiviewsutils = null;
public void _b_abono_click() throws Exception{
ResumableSub_b_abono_Click rsub = new ResumableSub_b_abono_Click(this);
rsub.resume(ba, null);
}
public static class ResumableSub_b_abono_Click extends BA.ResumableSub {
public ResumableSub_b_abono_Click(keymon.lat.medicomed.c_cliente parent) {
this.parent = parent;
}
keymon.lat.medicomed.c_cliente parent;
int _resultado = 0;
@Override
public void resume(BA ba, Object[] result) throws Exception{
while (true) {
switch (state) {
case -1:
return;
case 0:
//C
this.state = 1;
//BA.debugLineNum = 966;BA.debugLine="p_abono.Visible = False";
parent._p_abono.setVisible(parent.__c.False);
//BA.debugLineNum = 967;BA.debugLine="If et_abono.Text <> \"\" Then";
if (true) break;
case 1:
//if
this.state = 8;
if ((parent._et_abono.getText()).equals("") == false) {
this.state = 3;
}if (true) break;
case 3:
//C
this.state = 4;
//BA.debugLineNum = 968;BA.debugLine="Msgbox2Async($\"¿Seguro que quieres realizar un a";
parent.__c.Msgbox2Async(BA.ObjectToCharSequence(("¿Seguro que quieres realizar un abono de $"+parent.__c.SmartStringFormatter("",(Object)(parent._et_abono.getText()))+" para este cliente?")),BA.ObjectToCharSequence("Guardar Abono"),"Guardar","Cancelar","",(anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper(), (android.graphics.Bitmap)(parent.__c.Null)),ba,parent.__c.True);
//BA.debugLineNum = 969;BA.debugLine="Wait For Msgbox_Result (resultado As Int)";
parent.__c.WaitFor("msgbox_result", ba, this, null);
this.state = 9;
return;
case 9:
//C
this.state = 4;
_resultado = (Integer) result[0];
;
//BA.debugLineNum = 970;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
if (true) break;
case 4:
//if
this.state = 7;
if (_resultado==parent.__c.DialogResponse.POSITIVE) {
this.state = 6;
}if (true) break;
case 6:
//C
this.state = 7;
//BA.debugLineNum = 971;BA.debugLine="skmt.ExecNonQuery($\"INSERT INTO ABONOS(a_usuari";
parent._skmt.ExecNonQuery(("INSERT INTO ABONOS(a_usuario, a_ruta, a_cliente, a_abono, a_fecha) VALUES ('"+parent.__c.SmartStringFormatter("",(Object)(parent._subs._traeusuariodebd /*String*/ (ba)))+"', '"+parent.__c.SmartStringFormatter("",(Object)(parent._subs._traeruta /*String*/ (ba)))+"', '"+parent.__c.SmartStringFormatter("",(Object)(parent._subs._traecliente /*String*/ (ba)))+"' ,'"+parent.__c.SmartStringFormatter("",(Object)(parent._et_abono.getText()))+"', '"+parent.__c.SmartStringFormatter("",(Object)(parent._subs._fechakmt /*String*/ (ba,BA.NumberToString(parent.__c.DateTime.getNow()))))+"')"));
//BA.debugLineNum = 972;BA.debugLine="ToastMessageShow(\"Abono guardado\", False)";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Abono guardado"),parent.__c.False);
if (true) break;
case 7:
//C
this.state = 8;
;
if (true) break;
case 8:
//C
this.state = -1;
;
//BA.debugLineNum = 975;BA.debugLine="et_abono.Text = \"\"";
parent._et_abono.setText(BA.ObjectToCharSequence(""));
//BA.debugLineNum = 976;BA.debugLine="ime.HideKeyboard";
parent._ime.HideKeyboard(ba);
//BA.debugLineNum = 977;BA.debugLine="End Sub";
if (true) break;
}
}
}
}
public void _msgbox_result(int _resultado) throws Exception{
}
public String _b_abono1_click() throws Exception{
//BA.debugLineNum = 985;BA.debugLine="Private Sub b_abono1_Click";
//BA.debugLineNum = 986;BA.debugLine="p_abono.Visible = True";
_p_abono.setVisible(__c.True);
//BA.debugLineNum = 987;BA.debugLine="End Sub";
return "";
}
public String _b_can_monto_venta_click() throws Exception{
//BA.debugLineNum = 1096;BA.debugLine="Private Sub b_can_monto_venta_Click";
//BA.debugLineNum = 1097;BA.debugLine="p_monto_venta.Visible = False";
_p_monto_venta.setVisible(__c.False);
//BA.debugLineNum = 1098;BA.debugLine="p_inv.BringToFront";
_p_inv.BringToFront();
//BA.debugLineNum = 1099;BA.debugLine="p_inv.Visible = False";
_p_inv.setVisible(__c.False);
//BA.debugLineNum = 1100;BA.debugLine="End Sub";
return "";
}
public String _b_cancelar_click() throws Exception{
//BA.debugLineNum = 979;BA.debugLine="Private Sub b_cancelar_Click";
//BA.debugLineNum = 980;BA.debugLine="et_abono.Text = \"\"";
_et_abono.setText(BA.ObjectToCharSequence(""));
//BA.debugLineNum = 981;BA.debugLine="p_abono.Visible = False";
_p_abono.setVisible(__c.False);
//BA.debugLineNum = 982;BA.debugLine="ime.HideKeyboard";
_ime.HideKeyboard(ba);
//BA.debugLineNum = 983;BA.debugLine="End Sub";
return "";
}
public String _b_clienteventa_click() throws Exception{
//BA.debugLineNum = 1024;BA.debugLine="Private Sub b_clienteVenta_Click";
//BA.debugLineNum = 1026;BA.debugLine="et_monto_venta.Text = \"\"";
_et_monto_venta.setText(BA.ObjectToCharSequence(""));
//BA.debugLineNum = 1027;BA.debugLine="p_monto_venta.Visible = True";
_p_monto_venta.setVisible(__c.True);
//BA.debugLineNum = 1028;BA.debugLine="p_inv.BringToFront";
_p_inv.BringToFront();
//BA.debugLineNum = 1029;BA.debugLine="p_inv.Visible = True";
_p_inv.setVisible(__c.True);
//BA.debugLineNum = 1030;BA.debugLine="End Sub";
return "";
}
public String _b_clintesinventa_click() throws Exception{
//BA.debugLineNum = 1032;BA.debugLine="Private Sub b_clinteSinVenta_Click";
//BA.debugLineNum = 1034;BA.debugLine="Guardar_Click";
_guardar_click();
//BA.debugLineNum = 1035;BA.debugLine="et_monto_venta.Text = \"0\"";
_et_monto_venta.setText(BA.ObjectToCharSequence("0"));
//BA.debugLineNum = 1036;BA.debugLine="Subs.ventaNoVenta(usuario, Id_Almacen, ruta_tiend";
_subs._ventanoventa /*String*/ (ba,_usuario,_id_almacen,_ruta_tienda,"SinVenta",_subs._traecliente /*String*/ (ba),_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ ,_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/ ,_et_monto_venta.getText());
//BA.debugLineNum = 1038;BA.debugLine="Try";
try { //BA.debugLineNum = 1039;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"Select CUE";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
//BA.debugLineNum = 1040;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
//BA.debugLineNum = 1041;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
_clie_id = _c.GetString("CUENTA");
//BA.debugLineNum = 1042;BA.debugLine="c.Close";
_c.Close();
//BA.debugLineNum = 1047;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info set gestion = 3 where CAT_CL_CODIGO In (select cuenta from cuentaa)");
//BA.debugLineNum = 1052;BA.debugLine="ToastMessageShow(\"Cliente con venta eliminado co";
__c.ToastMessageShow(BA.ObjectToCharSequence("Cliente con venta eliminado correctamente."),__c.False);
}
catch (Exception e12) {
ba.setLastException(e12); //BA.debugLineNum = 1055;BA.debugLine="ToastMessageShow(\"Error eliminando cliente con v";
__c.ToastMessageShow(BA.ObjectToCharSequence("Error eliminando cliente con venta."),__c.True);
};
//BA.debugLineNum = 1058;BA.debugLine="End Sub";
return "";
}
public String _b_e_next_click() throws Exception{
//BA.debugLineNum = 759;BA.debugLine="Sub B_E_NEXT_Click";
//BA.debugLineNum = 760;BA.debugLine="If E_RES_E.Text <> \"\" Then";
if ((_e_res_e.getText()).equals("") == false) {
//BA.debugLineNum = 761;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert int";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into HIST_ENCUESTA(HE_CLIE, HE_RES, HE_FECHA, HE_TIPO) VALUES (?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_la_cuenta.getText()),(Object)(_e_res_e.getText()),(Object)(_sdate+_stime),(Object)("DONDE")}));
//BA.debugLineNum = 762;BA.debugLine="Panel2.Visible = False";
_panel2.setVisible(__c.False);
//BA.debugLineNum = 763;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
}else {
//BA.debugLineNum = 765;BA.debugLine="Msgbox(\"SIN RESPUESTA\",\"AVISO\") 'Ignore";
__c.Msgbox(BA.ObjectToCharSequence("SIN RESPUESTA"),BA.ObjectToCharSequence("AVISO"),ba);
};
//BA.debugLineNum = 767;BA.debugLine="End Sub";
return "";
}
public String _b_gu_monto_venta_click() throws Exception{
//BA.debugLineNum = 1061;BA.debugLine="Private Sub b_gu_monto_venta_Click";
//BA.debugLineNum = 1063;BA.debugLine="If et_monto_venta.Text.Trim = \"\" Or et_monto_vent";
if ((_et_monto_venta.getText().trim()).equals("") || _et_monto_venta.getText().trim().startsWith("0") || (_et_monto_venta.getText().trim()).equals("0")) {
//BA.debugLineNum = 1064;BA.debugLine="ToastMessageShow(\"El monto de venta no puede est";
__c.ToastMessageShow(BA.ObjectToCharSequence("El monto de venta no puede estar vacío o empezar con ceros."),__c.True);
}else {
//BA.debugLineNum = 1066;BA.debugLine="Guardar_Click";
_guardar_click();
//BA.debugLineNum = 1067;BA.debugLine="Subs.ventaNoVenta(usuario, Id_Almacen, ruta_tien";
_subs._ventanoventa /*String*/ (ba,_usuario,_id_almacen,_ruta_tienda,"ConVenta",_subs._traecliente /*String*/ (ba),_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ ,_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/ ,_et_monto_venta.getText());
//BA.debugLineNum = 1069;BA.debugLine="Try";
try { //BA.debugLineNum = 1070;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"Select CU";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
//BA.debugLineNum = 1071;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
//BA.debugLineNum = 1072;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
_clie_id = _c.GetString("CUENTA");
//BA.debugLineNum = 1073;BA.debugLine="c.Close";
_c.Close();
//BA.debugLineNum = 1078;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info set gestion = 2 where CAT_CL_CODIGO In (select cuenta from cuentaa)");
//BA.debugLineNum = 1083;BA.debugLine="ToastMessageShow(\"Cliente con venta eliminado c";
__c.ToastMessageShow(BA.ObjectToCharSequence("Cliente con venta eliminado correctamente."),__c.False);
}
catch (Exception e14) {
ba.setLastException(e14); //BA.debugLineNum = 1086;BA.debugLine="ToastMessageShow(\"Error eliminando cliente con";
__c.ToastMessageShow(BA.ObjectToCharSequence("Error eliminando cliente con venta."),__c.True);
};
//BA.debugLineNum = 1089;BA.debugLine="p_monto_venta.Visible = False";
_p_monto_venta.setVisible(__c.False);
//BA.debugLineNum = 1090;BA.debugLine="p_inv.BringToFront";
_p_inv.BringToFront();
//BA.debugLineNum = 1091;BA.debugLine="p_inv.Visible = False";
_p_inv.setVisible(__c.False);
};
//BA.debugLineNum = 1093;BA.debugLine="End Sub";
return "";
}
public String _b_guarda_c_click() throws Exception{
//BA.debugLineNum = 703;BA.debugLine="Sub B_GUARDA_C_Click";
//BA.debugLineNum = 704;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
//BA.debugLineNum = 705;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
//BA.debugLineNum = 706;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
//BA.debugLineNum = 707;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENTA";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
//BA.debugLineNum = 708;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
//BA.debugLineNum = 709;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
_clie_id = _c.GetString("CUENTA");
//BA.debugLineNum = 710;BA.debugLine="c.Close";
_c.Close();
//BA.debugLineNum = 711;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUARI";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
//BA.debugLineNum = 712;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
//BA.debugLineNum = 713;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
//BA.debugLineNum = 714;BA.debugLine="c.Close";
_c.Close();
//BA.debugLineNum = 715;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PEDIDO (PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO,PE_RUTA) VALUES(?,?,?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("4"),(Object)(.01),(Object)(.01),(Object)(2),(Object)("KNORR RINDE MAS 70 GR"),(Object)("GUNA2"),(Object)(_la_cuenta.getText()),(Object)(_sdate+_stime),(Object)(_usuario),(Object)(_la_ruta)}));
//BA.debugLineNum = 716;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO HIST_FACE(HFCLIENTE, HFALIAS,HFRUTA,HFALMACEN) VALUES (?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_la_cuenta.getText()),(Object)(_i_compra.getText()),(Object)(_la_ruta),(Object)(_almacen)}));
//BA.debugLineNum = 717;BA.debugLine="Panel1.Visible = False";
_panel1.setVisible(__c.False);
//BA.debugLineNum = 719;BA.debugLine="Tar.Visible = False";
_tar.setVisible(__c.False);
//BA.debugLineNum = 720;BA.debugLine="Tels.Visible = False";
_tels.setVisible(__c.False);
//BA.debugLineNum = 721;BA.debugLine="gest.Visible = False";
_gest.setVisible(__c.False);
//BA.debugLineNum = 723;BA.debugLine="Guardar.Visible = True";
_guardar.setVisible(__c.True);
//BA.debugLineNum = 724;BA.debugLine="End Sub";
return "";
}
public String _b_imp_click() throws Exception{
int _i = 0;
int _e = 0;
//BA.debugLineNum = 611;BA.debugLine="Sub B_IMP_Click";
//BA.debugLineNum = 612;BA.debugLine="TAMANO = 0";
_tamano = (int) (0);
//BA.debugLineNum = 613;BA.debugLine="ESPACIO = 21";
_espacio = (int) (21);
//BA.debugLineNum = 614;BA.debugLine="BLANCO = \" \"";
_blanco = " ";
//BA.debugLineNum = 615;BA.debugLine="printer.Initialize(cmp20.OutputStream)";
_printer.Initialize(_cmp20.getOutputStream());
//BA.debugLineNum = 616;BA.debugLine="printer.WriteLine(\"DURAKELO S.A. de C.V.\")";
_printer.WriteLine("DURAKELO S.A. de C.V.");
//BA.debugLineNum = 617;BA.debugLine="printer.WriteLine(\"RFC: DUR-011025-T12\")";
_printer.WriteLine("RFC: DUR-011025-T12");
//BA.debugLineNum = 618;BA.debugLine="printer.WriteLine(\"Tel.: 618-826-0104\")";
_printer.WriteLine("Tel.: 618-826-0104");
//BA.debugLineNum = 619;BA.debugLine="printer.WriteLine(\"Vendedor: KMTS \")";
_printer.WriteLine("Vendedor: KMTS ");
//BA.debugLineNum = 620;BA.debugLine="printer.WriteLine(\"Tienda: \" & La_nombre.Text)";
_printer.WriteLine("Tienda: "+_la_nombre.getText());
//BA.debugLineNum = 621;BA.debugLine="printer.WriteLine(\"-----------PREVENTA-----------";
_printer.WriteLine("-----------PREVENTA-----------");
//BA.debugLineNum = 622;BA.debugLine="s=B4XPages.MainPage.skmt.ExecQuery(\"select PE_PRO";
_s = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select PE_PRONOMBRE, PE_CANT, length(pe_cant) as L_CANT, PE_COSTOU, length(PE_COSTOU) as L_COSTOU, PE_COSTO_TOT, length(PE_COSTO_TOT) as L_COSTO_TOT FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")));
//BA.debugLineNum = 623;BA.debugLine="If S.RowCount>0 Then";
if (_s.getRowCount()>0) {
//BA.debugLineNum = 624;BA.debugLine="For i=0 To S.RowCount -1";
{
final int step13 = 1;
final int limit13 = (int) (_s.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit13 ;_i = _i + step13 ) {
//BA.debugLineNum = 625;BA.debugLine="S.Position=i";
_s.setPosition(_i);
//BA.debugLineNum = 626;BA.debugLine="printer.WriteLine(s.GetString(\"PE_CANT\") & \" \"";
_printer.WriteLine(_s.GetString("PE_CANT")+" "+_s.GetString("PE_PRONOMBRE"));
//BA.debugLineNum = 627;BA.debugLine="TAMANO = s.GetLong(\"L_CANT\") + TAMANO";
_tamano = (int) (_s.GetLong("L_CANT")+_tamano);
//BA.debugLineNum = 628;BA.debugLine="TAMANO = s.GetLong(\"L_COSTOU\") + TAMANO";
_tamano = (int) (_s.GetLong("L_COSTOU")+_tamano);
//BA.debugLineNum = 629;BA.debugLine="TAMANO = s.GetLong(\"L_COSTO_TOT\") + TAMANO";
_tamano = (int) (_s.GetLong("L_COSTO_TOT")+_tamano);
//BA.debugLineNum = 630;BA.debugLine="ESPACIO = ESPACIO - TAMANO";
_espacio = (int) (_espacio-_tamano);
//BA.debugLineNum = 631;BA.debugLine="For E=0 To ESPACIO -1";
{
final int step20 = 1;
final int limit20 = (int) (_espacio-1);
_e = (int) (0) ;
for (;_e <= limit20 ;_e = _e + step20 ) {
//BA.debugLineNum = 632;BA.debugLine="BLANCO = \" \" & BLANCO";
_blanco = " "+_blanco;
}
};
//BA.debugLineNum = 634;BA.debugLine="printer.WriteLine(BLANCO & s.GETSTRING(\"PE_CANT";
_printer.WriteLine(_blanco+_s.GetString("PE_CANT")+" X $"+_s.GetString("PE_COSTOU")+" $"+_s.GetString("PE_COSTO_TOT"));
//BA.debugLineNum = 635;BA.debugLine="TAMANO = 0";
_tamano = (int) (0);
//BA.debugLineNum = 636;BA.debugLine="ESPACIO = 21";
_espacio = (int) (21);
//BA.debugLineNum = 637;BA.debugLine="BLANCO = \" \"";
_blanco = " ";
}
};
};
//BA.debugLineNum = 640;BA.debugLine="s.Close";
_s.Close();
//BA.debugLineNum = 641;BA.debugLine="printer.WriteLine(\"Total Preventa: $\" & total_c";
_printer.WriteLine("Total Preventa: $"+_total_cliente);
//BA.debugLineNum = 642;BA.debugLine="printer.WriteLine(\"------------VENTA-------------";
_printer.WriteLine("------------VENTA-------------");
//BA.debugLineNum = 643;BA.debugLine="printer.WriteLine(\" \")";
_printer.WriteLine(" ");
//BA.debugLineNum = 644;BA.debugLine="printer.WriteLine(\"TOTAL: $\" & total_cliente)";
_printer.WriteLine("TOTAL: $"+_total_cliente);
//BA.debugLineNum = 645;BA.debugLine="printer.WriteLine(\" \")";
_printer.WriteLine(" ");
//BA.debugLineNum = 646;BA.debugLine="printer.WriteLine(\"----ESTE TICKET NO ES UN -----";
_printer.WriteLine("----ESTE TICKET NO ES UN -----");
//BA.debugLineNum = 647;BA.debugLine="printer.WriteLine(\"--COMPROBANTE FISCAL, SOLO ES-";
_printer.WriteLine("--COMPROBANTE FISCAL, SOLO ES-");
//BA.debugLineNum = 648;BA.debugLine="printer.WriteLine(\"--------INFORMATIVO-----------";
_printer.WriteLine("--------INFORMATIVO-----------");
//BA.debugLineNum = 649;BA.debugLine="printer.WriteLine(\"------------------------------";
_printer.WriteLine("------------------------------");
//BA.debugLineNum = 650;BA.debugLine="printer.WriteLine(\" \")";
_printer.WriteLine(" ");
//BA.debugLineNum = 651;BA.debugLine="printer.Flush";
_printer.Flush();
//BA.debugLineNum = 653;BA.debugLine="End Sub";
return "";
}
public String _b_iniciofinventa_click() throws Exception{
//BA.debugLineNum = 989;BA.debugLine="Private Sub b_inicioFinVenta_Click";
//BA.debugLineNum = 990;BA.debugLine="usuario = Subs.traeUsuarioDeBD";
_usuario = _subs._traeusuariodebd /*String*/ (ba);
//BA.debugLineNum = 991;BA.debugLine="Id_Almacen = Subs.traeAlmacen";
_id_almacen = _subs._traealmacen /*String*/ (ba);
//BA.debugLineNum = 993;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"select CAT_";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_RUTA from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
//BA.debugLineNum = 994;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
//BA.debugLineNum = 995;BA.debugLine="ruta_tienda = c.GetString(\"CAT_CL_RUTA\")";
_ruta_tienda = _c.GetString("CAT_CL_RUTA");
//BA.debugLineNum = 997;BA.debugLine="If dentroDeGeocerca Then precision = 1";
if (_dentrodegeocerca) {
_precision = (int) (1);};
//BA.debugLineNum = 998;BA.debugLine="motivoNoVenta = \"\"";
_motivonoventa = "";
//BA.debugLineNum = 999;BA.debugLine="motivoNoVisita = \"\"";
_motivonovisita = "";
//BA.debugLineNum = 1001;BA.debugLine="If Starter.enVenta Then";
if (_starter._enventa /*boolean*/ ) {
//BA.debugLineNum = 1002;BA.debugLine="b_inicioFinVenta.Visible = True";
_b_iniciofinventa.setVisible(__c.True);
//BA.debugLineNum = 1003;BA.debugLine="Subs.bitacora(Subs.fechanormal(DateTime.Now), us";
_subs._bitacora /*String*/ (ba,_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),_usuario,_id_almacen,_ruta_tienda,"Termina Venta",_subs._traecliente /*String*/ (ba),"",_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ ,_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/ ,BA.NumberToString(_precision),_motivonoventa,_motivonovisita);
//BA.debugLineNum = 1004;BA.debugLine="Starter.enVenta = False";
_starter._enventa /*boolean*/ = __c.False;
//BA.debugLineNum = 1005;BA.debugLine="LogColor($\">>>>>> TERMINA VENTA: ${Starter.enVen";
__c.LogImpl("345219856",(">>>>>> TERMINA VENTA: "+__c.SmartStringFormatter("",(Object)(_starter._enventa /*boolean*/ ))+" - "+__c.SmartStringFormatter("",(Object)(_subs._traecliente /*String*/ (ba)))+""),__c.Colors.Red);
//BA.debugLineNum = 1006;BA.debugLine="Subs.iniciaActividad(\"principal\")";
_subs._iniciaactividad /*String*/ (ba,"principal");
//BA.debugLineNum = 1007;BA.debugLine="B4XPages.ShowPageAndRemovePreviousPages(\"Princip";
_b4xpages._showpageandremovepreviouspages /*String*/ (ba,"Principal");
//BA.debugLineNum = 1008;BA.debugLine="Guardar2_Click";
_guardar2_click();
}else {
//BA.debugLineNum = 1012;BA.debugLine="b_inicioFinVenta.Width = Root.Width";
_b_iniciofinventa.setWidth(_root.getWidth());
//BA.debugLineNum = 1013;BA.debugLine="Subs.bitacora(Subs.fechanormal(DateTime.Now), us";
_subs._bitacora /*String*/ (ba,_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),_usuario,_id_almacen,_ruta_tienda,"Inicia Venta",_subs._traecliente /*String*/ (ba),_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),"",_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ ,_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/ ,BA.NumberToString(_precision),_motivonoventa,"");
//BA.debugLineNum = 1014;BA.debugLine="Starter.enVenta = True";
_starter._enventa /*boolean*/ = __c.True;
//BA.debugLineNum = 1015;BA.debugLine="LogColor($\">>>>>> INICIA VENTA: ${Starter.enVent";
__c.LogImpl("345219866",(">>>>>> INICIA VENTA: "+__c.SmartStringFormatter("",(Object)(_starter._enventa /*boolean*/ ))+" - "+__c.SmartStringFormatter("",(Object)(_subs._traecliente /*String*/ (ba)))+""),__c.Colors.Red);
//BA.debugLineNum = 1016;BA.debugLine="b_inicioFinVenta.Visible = False";
_b_iniciofinventa.setVisible(__c.False);
};
//BA.debugLineNum = 1020;BA.debugLine="c.Close";
_c.Close();
//BA.debugLineNum = 1022;BA.debugLine="End Sub";
return "";
}
public String _b_mapa_click() throws Exception{
//BA.debugLineNum = 607;BA.debugLine="Sub b_mapa_Click";
//BA.debugLineNum = 608;BA.debugLine="B4XPages.ShowPage(\"mapas\")";
_b4xpages._showpage /*String*/ (ba,"mapas");
//BA.debugLineNum = 609;BA.debugLine="End Sub";
return "";
}
public String _b_venta_click() throws Exception{
//BA.debugLineNum = 726;BA.debugLine="Sub b_venta_Click";
//BA.debugLineNum = 727;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
//BA.debugLineNum = 728;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
//BA.debugLineNum = 729;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
//BA.debugLineNum = 757;BA.debugLine="End Sub";
return "";
}
public String _b4xpage_appear() throws Exception{
String _factura = "";
//BA.debugLineNum = 204;BA.debugLine="Sub B4XPage_Appear";
//BA.debugLineNum = 206;BA.debugLine="b_clinteSinVenta.Enabled = False";
_b_clintesinventa.setEnabled(__c.False);
//BA.debugLineNum = 207;BA.debugLine="b_clienteVenta.Enabled = False";
_b_clienteventa.setEnabled(__c.False);
//BA.debugLineNum = 213;BA.debugLine="p_inv.Width = Root.Width : p_inv.Height = Root.He";
_p_inv.setWidth(_root.getWidth());
//BA.debugLineNum = 213;BA.debugLine="p_inv.Width = Root.Width : p_inv.Height = Root.He";
_p_inv.setHeight(_root.getHeight());
//BA.debugLineNum = 214;BA.debugLine="b_inicioFinVenta.Width = Root.Width";
_b_iniciofinventa.setWidth(_root.getWidth());
//BA.debugLineNum = 215;BA.debugLine="LA_GPS.TextColor = Colors.Red";
_la_gps.setTextColor(__c.Colors.Red);
//BA.debugLineNum = 216;BA.debugLine="LA_GPS.Text = \"SIN UBICACION GPS\"";
_la_gps.setText(BA.ObjectToCharSequence("SIN UBICACION GPS"));
//BA.debugLineNum = 217;BA.debugLine="cercavalor = 0";
_cercavalor = BA.NumberToString(0);
//BA.debugLineNum = 218;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then";
if (__c.Not(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled())) {
//BA.debugLineNum = 219;BA.debugLine="ToastMessageShow(\"Es necesario tener el GPS ence";
__c.ToastMessageShow(BA.ObjectToCharSequence("Es necesario tener el GPS encendido"),__c.True);
//BA.debugLineNum = 220;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent";
__c.StartActivity(ba,(Object)(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent()));
};
//BA.debugLineNum = 222;BA.debugLine="cb_factura.Checked = False";
_cb_factura.setChecked(__c.False);
//BA.debugLineNum = 223;BA.debugLine="p_abono.Visible = False";
_p_abono.setVisible(__c.False);
//BA.debugLineNum = 224;BA.debugLine="Subs.centraPanel(p_abono, Root.Width)";
_subs._centrapanel /*String*/ (ba,_p_abono,_root.getWidth());
//BA.debugLineNum = 225;BA.debugLine="skmt.Initialize(ruta,\"kmt.db\", True)";
_skmt.Initialize(_ruta,"kmt.db",__c.True);
//BA.debugLineNum = 226;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_CL";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_CODIGO,CAT_CL_RUTA,CAT_CL_NOMBRE,CAT_CL_ATIENDE1,CAT_CL_ATIENTE2,CAT_CL_TELEFONO,CAT_CL_EMAIL,CAT_CL_CALLE,CAT_CL_NOEXT,CAT_CL_NOINT,CAT_CL_CALLE1,CAT_CL_CALLE2,CAT_CL_COLONIA,CAT_CL_MUNI,CAT_CL_EDO,CAT_CL_CP,CAT_CL_LONG,CAT_CL_LAT,CAT_CL_MTOCOMPRA,CAT_CL_NUM_SERIEFISICO from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
//BA.debugLineNum = 227;BA.debugLine="s=B4XPages.MainPage.skmt.ExecQuery(\"Select SUM(PE";
_s = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select SUM(PE_COSTO_TOT) As TOTAL_CLIE, SUM(PE_CANT) As CANT_CLIE, PC_FACTURA FROM PEDIDO_CLIENTE INNER JOIN PEDIDO ON PEDIDO_CLIENTE.PC_CLIENTE = PEDIDO.PE_CLIENTE WHERE (PE_CLIENTE IN (Select cuenta from cuentaa))")));
//BA.debugLineNum = 228;BA.debugLine="s.Position=0";
_s.setPosition((int) (0));
//BA.debugLineNum = 229;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) {
//BA.debugLineNum = 230;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
//BA.debugLineNum = 231;BA.debugLine="la_cuenta.Text = c.GetString(\"CAT_CL_CODIGO\")";
_la_cuenta.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CODIGO")));
//BA.debugLineNum = 232;BA.debugLine="La_nombre.Text = c.GetString(\"CAT_CL_NOMBRE\")";
_la_nombre.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_NOMBRE")));
//BA.debugLineNum = 233;BA.debugLine="la_Calle.Text = c.GetString(\"CAT_CL_CALLE\")";
_la_calle.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE")));
//BA.debugLineNum = 234;BA.debugLine="la_col.Text = c.GetString(\"CAT_CL_COLONIA\")";
_la_col.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_COLONIA")));
//BA.debugLineNum = 235;BA.debugLine="la_edo.Text = c.GetString(\"CAT_CL_EDO\")";
_la_edo.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_EDO")));
//BA.debugLineNum = 236;BA.debugLine="l_entre1.Text = c.GetString(\"CAT_CL_NOEXT\")";
_l_entre1.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_NOEXT")));
//BA.debugLineNum = 237;BA.debugLine="l_entre2.Text = c.GetString(\"CAT_CL_NOINT\")";
_l_entre2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_NOINT")));
//BA.debugLineNum = 238;BA.debugLine="l_atiende.Text = c.GetString(\"CAT_CL_ATIENDE1\")";
_l_atiende.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENDE1")));
//BA.debugLineNum = 239;BA.debugLine="l_atiende2.Text = c.GetString(\"CAT_CL_ATIENTE2\")";
_l_atiende2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENTE2")));
//BA.debugLineNum = 240;BA.debugLine="Label20.Text = c.GetString(\"CAT_CL_CP\")";
_label20.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CP")));
//BA.debugLineNum = 241;BA.debugLine="l_calle1.Text = c.GetString(\"CAT_CL_CALLE1\")";
_l_calle1.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE1")));
//BA.debugLineNum = 242;BA.debugLine="TELEFONO = c.GetString(\"CAT_CL_TELEFONO\")";
_telefono = _c.GetString("CAT_CL_TELEFONO");
//BA.debugLineNum = 243;BA.debugLine="l_total.Text = s.GetString(\"TOTAL_CLIE\")";
_l_total.setText(BA.ObjectToCharSequence(_s.GetString("TOTAL_CLIE")));
//BA.debugLineNum = 244;BA.debugLine="total_cliente = s.GetString(\"TOTAL_CLIE\")";
_total_cliente = _s.GetString("TOTAL_CLIE");
//BA.debugLineNum = 245;BA.debugLine="Private factura As String = 0";
_factura = BA.NumberToString(0);
//BA.debugLineNum = 246;BA.debugLine="If s.GetString(\"PC_FACTURA\") <> Null And IsNumbe";
if (_s.GetString("PC_FACTURA")!= null && __c.IsNumber(_s.GetString("PC_FACTURA"))) {
_factura = _s.GetString("PC_FACTURA");};
//BA.debugLineNum = 247;BA.debugLine="If factura = \"1\" Then cb_factura.Checked = True";
if ((_factura).equals("1")) {
_cb_factura.setChecked(__c.True);};
//BA.debugLineNum = 248;BA.debugLine="m_lat = \"0\"";
_m_lat = "0";
//BA.debugLineNum = 249;BA.debugLine="If c.GetString(\"CAT_CL_LAT\") <> \"\" Then m_lat =c";
if ((_c.GetString("CAT_CL_LAT")).equals("") == false) {
_m_lat = _c.GetString("CAT_CL_LAT");};
//BA.debugLineNum = 250;BA.debugLine="If m_lat.Length < 5 Then m_lat = \"0\"";
if (_m_lat.length()<5) {
_m_lat = "0";};
//BA.debugLineNum = 251;BA.debugLine="m_lon = \"0\"";
_m_lon = "0";
//BA.debugLineNum = 252;BA.debugLine="If c.GetString(\"CAT_CL_LONG\") <> \"\" Then m_lon =";
if ((_c.GetString("CAT_CL_LONG")).equals("") == false) {
_m_lon = _c.GetString("CAT_CL_LONG");};
//BA.debugLineNum = 253;BA.debugLine="If m_lon.Length < 5 Then m_lon = \"0\"";
if (_m_lon.length()<5) {
_m_lon = "0";};
//BA.debugLineNum = 254;BA.debugLine="LA_RUTA = c.GetString(\"CAT_CL_RUTA\")";
_la_ruta = _c.GetString("CAT_CL_RUTA");
//BA.debugLineNum = 256;BA.debugLine="If c.GetString(\"CAT_CL_NUM_SERIEFISICO\") = \"0\"";
if ((_c.GetString("CAT_CL_NUM_SERIEFISICO")).equals("0")) {
//BA.debugLineNum = 257;BA.debugLine="L_QR.TEXT = \"SIN CODIGO\"";
_l_qr.setText(BA.ObjectToCharSequence("SIN CODIGO"));
//BA.debugLineNum = 258;BA.debugLine="L_QR.TextColor = Colors.Red";
_l_qr.setTextColor(__c.Colors.Red);
//BA.debugLineNum = 259;BA.debugLine="gest.VISIBLE = False";
_gest.setVisible(__c.False);
//BA.debugLineNum = 260;BA.debugLine="BT_QR.Visible = True";
_bt_qr.setVisible(__c.True);
}else {
//BA.debugLineNum = 262;BA.debugLine="L_QR.TEXT = c.GetString(\"CAT_CL_NUM_SERIEFISICO";
_l_qr.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_NUM_SERIEFISICO")));
//BA.debugLineNum = 263;BA.debugLine="L_QR.TextColor = Colors.Blue";
_l_qr.setTextColor(__c.Colors.Blue);
//BA.debugLineNum = 264;BA.debugLine="BT_QR.Visible = False";
_bt_qr.setVisible(__c.False);
};
};
//BA.debugLineNum = 267;BA.debugLine="c.Close";
_c.Close();
//BA.debugLineNum = 268;BA.debugLine="s.Close";
_s.Close();
//BA.debugLineNum = 269;BA.debugLine="S2=B4XPages.MainPage.skmt.ExecQuery(\"select count";
_s2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(*) AS CUANTOS from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa)")));
//BA.debugLineNum = 270;BA.debugLine="S2.Position =0";
_s2.setPosition((int) (0));
//BA.debugLineNum = 271;BA.debugLine="CUANTOS = S2.GetString(\"CUANTOS\")";
_cuantos = _s2.GetString("CUANTOS");
//BA.debugLineNum = 272;BA.debugLine="S2.Close";
_s2.Close();
//BA.debugLineNum = 273;BA.debugLine="If CUANTOS > 0 Then";
if ((double)(Double.parseDouble(_cuantos))>0) {
//BA.debugLineNum = 274;BA.debugLine="c2=B4XPages.MainPage.skmt.ExecQuery(\"select sum(";
_c2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(HVD_COSTO_TOT) AS TOTAL from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa)")));
//BA.debugLineNum = 275;BA.debugLine="c2.Position =0";
_c2.setPosition((int) (0));
//BA.debugLineNum = 276;BA.debugLine="MONTO_COMPRA = c2.GetString(\"TOTAL\")";
_monto_compra = _c2.GetString("TOTAL");
//BA.debugLineNum = 277;BA.debugLine="c2.Close";
_c2.Close();
}else {
//BA.debugLineNum = 279;BA.debugLine="MONTO_COMPRA = \"0\"";
_monto_compra = "0";
};
//BA.debugLineNum = 282;BA.debugLine="la_saldotot.Text = MONTO_COMPRA";
_la_saldotot.setText(BA.ObjectToCharSequence(_monto_compra));
//BA.debugLineNum = 283;BA.debugLine="If MONTO_COMPRA <> \"0\" Then";
if ((_monto_compra).equals("0") == false) {
//BA.debugLineNum = 284;BA.debugLine="META2 = 1200 - MONTO_COMPRA";
_meta2 = BA.NumberToString(1200-(double)(Double.parseDouble(_monto_compra)));
}else {
//BA.debugLineNum = 286;BA.debugLine="META2 = 1200";
_meta2 = BA.NumberToString(1200);
};
//BA.debugLineNum = 288;BA.debugLine="If META2 < 1 Then";
if ((double)(Double.parseDouble(_meta2))<1) {
//BA.debugLineNum = 289;BA.debugLine="META2 = \"CUBIERTO\"";
_meta2 = "CUBIERTO";
};
//BA.debugLineNum = 291;BA.debugLine="la_saldooper.Text = META2";
_la_saldooper.setText(BA.ObjectToCharSequence(_meta2));
//BA.debugLineNum = 292;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select ID_ALM";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select ID_ALMACEN from CAT_ALMACEN")));
//BA.debugLineNum = 293;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) {
//BA.debugLineNum = 294;BA.debugLine="C.Position=0";
_c.setPosition((int) (0));
//BA.debugLineNum = 295;BA.debugLine="ALMACEN = C.GetString(\"ID_ALMACEN\")";
_almacen = _c.GetString("ID_ALMACEN");
};
//BA.debugLineNum = 297;BA.debugLine="c.Close";
_c.Close();
//BA.debugLineNum = 298;BA.debugLine="If ALMACEN = \"1\" Then";
if ((_almacen).equals("1")) {
//BA.debugLineNum = 299;BA.debugLine="Tels.Visible = False";
_tels.setVisible(__c.False);
//BA.debugLineNum = 300;BA.debugLine="gest.Visible = False";
_gest.setVisible(__c.False);
};
//BA.debugLineNum = 303;BA.debugLine="If ALMACEN = \"4\" Then";
if ((_almacen).equals("4")) {
//BA.debugLineNum = 305;BA.debugLine="DD=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT COU";
_dd = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT COUNT(*) AS CUANTOS FROM HIST_VENTAS WHERE HVD_CLIENTE IN (Select cuenta from cuentaa) AND HVD_PRONOMBRE =?",new String[]{"KNORR RINDE MAS 70 GR"})));
//BA.debugLineNum = 306;BA.debugLine="DD.Position =0";
_dd.setPosition((int) (0));
//BA.debugLineNum = 307;BA.debugLine="If DD.GetString(\"CUANTOS\") = 0 Then";
if ((_dd.GetString("CUANTOS")).equals(BA.NumberToString(0))) {
//BA.debugLineNum = 308;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT COU";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT COUNT(*) AS CUANTOS FROM PEDIDO WHERE PE_CLIENTE IN (Select cuenta from cuentaa) AND PE_PRONOMBRE =?",new String[]{"KNORR RINDE MAS 70 GR"})));
//BA.debugLineNum = 309;BA.debugLine="c.Position =0";
_c.setPosition((int) (0));
//BA.debugLineNum = 315;BA.debugLine="c.Close";
_c.Close();
}else {
};
//BA.debugLineNum = 319;BA.debugLine="DD.Close";
_dd.Close();
}else {
};
//BA.debugLineNum = 323;BA.debugLine="If ALMACEN = \"16\" Or ALMACEN = \"13\" Then";
if ((_almacen).equals("16") || (_almacen).equals("13")) {
//BA.debugLineNum = 324;BA.debugLine="Tels.Visible = False";
_tels.setVisible(__c.False);
//BA.debugLineNum = 325;BA.debugLine="gest.Visible = False";
_gest.setVisible(__c.False);
};
//BA.debugLineNum = 327;BA.debugLine="CallSubDelayed(Tracker, \"Track\")";
__c.CallSubDelayed(ba,(Object)(_tracker.getObject()),"Track");
//BA.debugLineNum = 329;BA.debugLine="If Not(Starter.GPS.GPSEnabled) Then";
if (__c.Not(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled())) {
//BA.debugLineNum = 330;BA.debugLine="ToastMessageShow(\"Debe Activar el GPS del Equipo";
__c.ToastMessageShow(BA.ObjectToCharSequence("Debe Activar el GPS del Equipo."),__c.True);
//BA.debugLineNum = 331;BA.debugLine="StartActivity(Starter.GPS.LocationSettingsIntent";
__c.StartActivity(ba,(Object)(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent()));
}else {
//BA.debugLineNum = 333;BA.debugLine="Starter.GPS.Start(0, 0)";
_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .Start(ba,(long) (0),(float) (0));
};
//BA.debugLineNum = 336;BA.debugLine="CallSubDelayed(Tracker, \"StartFLPSmall\")";
__c.CallSubDelayed(ba,(Object)(_tracker.getObject()),"StartFLPSmall");
//BA.debugLineNum = 337;BA.debugLine="If Tracker.FLP.IsInitialized And Tracker.FLP.GetL";
if (_tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .IsInitialized() && _tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation().IsInitialized()) {
//BA.debugLineNum = 338;BA.debugLine="B4XPages.MainPage.lat_gps = Tracker.FLP.GetLastK";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ = BA.NumberToString(_tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation().getLatitude());
//BA.debugLineNum = 339;BA.debugLine="B4XPages.MainPage.lon_gps = Tracker.FLP.GetLastK";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/ = BA.NumberToString(_tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation().getLongitude());
//BA.debugLineNum = 341;BA.debugLine="GPS_LocationChanged(Tracker.FLP.GetLastKnownLoca";
_gps_locationchanged(_tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation());
};
//BA.debugLineNum = 343;BA.debugLine="Tels.Visible = False";
_tels.setVisible(__c.False);
//BA.debugLineNum = 344;BA.debugLine="gest.Visible = False";
_gest.setVisible(__c.False);
//BA.debugLineNum = 346;BA.debugLine="If la_cuenta.text.SubString2(0,1) = \"N\" Then gest";
if ((_la_cuenta.getText().substring((int) (0),(int) (1))).equals("N")) {
_gest.setVisible(__c.False);};
//BA.debugLineNum = 348;BA.debugLine="b_inicioFinVenta.Text = \"INICIAR VENTA\"";
_b_iniciofinventa.setText(BA.ObjectToCharSequence("INICIAR VENTA"));
//BA.debugLineNum = 349;BA.debugLine="b_inicioFinVenta.BringToFront";
_b_iniciofinventa.BringToFront();
//BA.debugLineNum = 351;BA.debugLine="If Not(Starter.enVenta) And la_cuenta.Text <> \"0\"";
if (__c.Not(_starter._enventa /*boolean*/ ) && (_la_cuenta.getText()).equals("0") == false) {
//BA.debugLineNum = 352;BA.debugLine="b_inicioFinVenta.Visible = True";
_b_iniciofinventa.setVisible(__c.True);
}else {
//BA.debugLineNum = 356;BA.debugLine="b_inicioFinVenta.Visible = False";
_b_iniciofinventa.setVisible(__c.False);
};
//BA.debugLineNum = 360;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper _b4xpage_closerequest() throws Exception{
ResumableSub_B4XPage_CloseRequest rsub = new ResumableSub_B4XPage_CloseRequest(this);
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(keymon.lat.medicomed.c_cliente parent) {
this.parent = parent;
}
keymon.lat.medicomed.c_cliente parent;
int _resultado1 = 0;
@Override
public void resume(BA ba, Object[] result) throws Exception{
while (true) {
switch (state) {
case -1:
{
parent.__c.ReturnFromResumableSub(this,null);return;}
case 0:
//C
this.state = 1;
//BA.debugLineNum = 428;BA.debugLine="If IsNumber(l_total.text) And l_total.text <> \"0\"";
if (true) break;
case 1:
//if
this.state = 10;
if (parent.__c.IsNumber(parent._l_total.getText()) && (parent._l_total.getText()).equals("0") == false && parent.__c.Not(parent._subs._pedidoguardado /*boolean*/ (ba))) {
this.state = 3;
}if (true) break;
case 3:
//C
this.state = 4;
//BA.debugLineNum = 429;BA.debugLine="LogColor(\"Hay Venta\", Colors.Red)";
parent.__c.LogImpl("343122693","Hay Venta",parent.__c.Colors.Red);
//BA.debugLineNum = 430;BA.debugLine="Private resultado1 As Int = Msgbox2($\"Va salir s";
_resultado1 = parent.__c.Msgbox2(BA.ObjectToCharSequence(("Va salir sin haber guardado la venta, si continua, la venta se BORRARA."+parent.__c.SmartStringFormatter("",(Object)(parent.__c.CRLF))+""+parent.__c.SmartStringFormatter("",(Object)(parent.__c.CRLF))+"¿Esta seguro que desea continuar?")),BA.ObjectToCharSequence("SE VA A BORRAR LA VENTA"),"Borrar Venta","Guardar Venta","",(android.graphics.Bitmap)(parent.__c.LoadBitmap(parent.__c.File.getDirAssets(),"alert2.png").getObject()),ba);
//BA.debugLineNum = 431;BA.debugLine="If resultado1 = DialogResponse.POSITIVE Then";
if (true) break;
case 4:
//if
this.state = 9;
if (_resultado1==parent.__c.DialogResponse.POSITIVE) {
this.state = 6;
}else if(_resultado1==parent.__c.DialogResponse.CANCEL) {
this.state = 8;
}if (true) break;
case 6:
//C
this.state = 9;
//BA.debugLineNum = 432;BA.debugLine="Log(\"Borrra venta\")";
parent.__c.LogImpl("343122696","Borrra venta",0);
//BA.debugLineNum = 433;BA.debugLine="Subs.borraPedidoClienteActual";
parent._subs._borrapedidoclienteactual /*String*/ (ba);
//BA.debugLineNum = 434;BA.debugLine="ToastMessageShow(\"Venta Borrada\", False)";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Venta Borrada"),parent.__c.False);
//BA.debugLineNum = 436;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
parent._b4xpages._showpage /*String*/ (ba,"Principal");
if (true) break;
case 8:
//C
this.state = 9;
//BA.debugLineNum = 438;BA.debugLine="Log(\"Pedido guardado\")";
parent.__c.LogImpl("343122702","Pedido guardado",0);
//BA.debugLineNum = 439;BA.debugLine="Guardar_Click";
parent._guardar_click();
//BA.debugLineNum = 440;BA.debugLine="ToastMessageShow(\"Venta Guardada\", False)";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Venta Guardada"),parent.__c.False);
if (true) break;
case 9:
//C
this.state = 10;
;
if (true) break;
case 10:
//C
this.state = -1;
;
//BA.debugLineNum = 443;BA.debugLine="ToastMessageShow(\"Por favor presione GUARDAR para";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Por favor presione GUARDAR para continuar"),parent.__c.True);
//BA.debugLineNum = 447;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
//BA.debugLineNum = 448;BA.debugLine="End Sub";
if (true) break;
}
}
}
}
public String _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
//BA.debugLineNum = 162;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
//BA.debugLineNum = 163;BA.debugLine="Root = Root1";
_root = _root1;
//BA.debugLineNum = 166;BA.debugLine="Root.LoadLayout(\"cliente\")";
_root.LoadLayout("cliente",ba);
//BA.debugLineNum = 167;BA.debugLine="ruta = File.DirInternal";
_ruta = __c.File.getDirInternal();
//BA.debugLineNum = 168;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
if (__c.File.Exists(_ruta,"kmt.db")==__c.False) {
//BA.debugLineNum = 169;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", ruta, \"kmt.d";
__c.File.Copy(__c.File.getDirAssets(),"kmt.db",_ruta,"kmt.db");
};
//BA.debugLineNum = 171;BA.debugLine="skmt.Initialize(ruta,\"kmt.db\", True)";
_skmt.Initialize(_ruta,"kmt.db",__c.True);
//BA.debugLineNum = 172;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_CL";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_CODIGO,CAT_CL_RUTA,CAT_CL_NOMBRE,CAT_CL_ATIENDE1,CAT_CL_ATIENTE2,CAT_CL_TELEFONO,CAT_CL_EMAIL,CAT_CL_CALLE,CAT_CL_NOEXT,CAT_CL_NOINT,CAT_CL_CALLE1,CAT_CL_CALLE2,CAT_CL_COLONIA,CAT_CL_MUNI,CAT_CL_EDO,CAT_CL_CP,CAT_CL_LONG,CAT_CL_LAT,CAT_CL_MTOCOMPRA from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
//BA.debugLineNum = 173;BA.debugLine="s=B4XPages.MainPage.skmt.ExecQuery(\"select sum(pe";
_s = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")));
//BA.debugLineNum = 174;BA.debugLine="s.Position=0";
_s.setPosition((int) (0));
//BA.debugLineNum = 175;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) {
//BA.debugLineNum = 176;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
//BA.debugLineNum = 177;BA.debugLine="la_cuenta.Text = c.GetString(\"CAT_CL_CODIGO\")";
_la_cuenta.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CODIGO")));
//BA.debugLineNum = 178;BA.debugLine="cuenta = c.GetString(\"CAT_CL_CODIGO\")";
_cuenta = _c.GetString("CAT_CL_CODIGO");
//BA.debugLineNum = 179;BA.debugLine="La_nombre.Text = c.GetString(\"CAT_CL_NOMBRE\")";
_la_nombre.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_NOMBRE")));
//BA.debugLineNum = 180;BA.debugLine="la_Calle.Text = c.GetString(\"CAT_CL_CALLE\") & c.";
_la_calle.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE")+_c.GetString("CAT_CL_NOEXT")));
//BA.debugLineNum = 181;BA.debugLine="la_col.Text = c.GetString(\"CAT_CL_COLONIA\")";
_la_col.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_COLONIA")));
//BA.debugLineNum = 182;BA.debugLine="la_edo.Text = c.GetString(\"CAT_CL_EDO\")";
_la_edo.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_EDO")));
//BA.debugLineNum = 184;BA.debugLine="l_entre1.Text = c.GetString(\"CAT_CL_NOEXT\")";
_l_entre1.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_NOEXT")));
//BA.debugLineNum = 185;BA.debugLine="l_entre2.Text = c.GetString(\"CAT_CL_NOINT\")";
_l_entre2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_NOINT")));
//BA.debugLineNum = 186;BA.debugLine="l_atiende.Text = c.GetString(\"CAT_CL_ATIENDE1\")";
_l_atiende.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENDE1")));
//BA.debugLineNum = 187;BA.debugLine="l_atiende2.Text = c.GetString(\"CAT_CL_ATIENTE2\")";
_l_atiende2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENTE2")));
//BA.debugLineNum = 188;BA.debugLine="la_saldotot.Text = c.GetString(\"CAT_CL_TELEFONO\"";
_la_saldotot.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_TELEFONO")));
//BA.debugLineNum = 189;BA.debugLine="la_saldooper.Text = c.GetString(\"CAT_CL_EMAIL\")";
_la_saldooper.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_EMAIL")));
//BA.debugLineNum = 190;BA.debugLine="l_total.Text = s.GetString(\"TOTAL_CLIE\")";
_l_total.setText(BA.ObjectToCharSequence(_s.GetString("TOTAL_CLIE")));
//BA.debugLineNum = 191;BA.debugLine="total_cliente = s.GetString(\"TOTAL_CLIE\")";
_total_cliente = _s.GetString("TOTAL_CLIE");
//BA.debugLineNum = 192;BA.debugLine="MONTO_COMPRA = c.GetString(\"CAT_CL_MTOCOMPRA\")";
_monto_compra = _c.GetString("CAT_CL_MTOCOMPRA");
//BA.debugLineNum = 193;BA.debugLine="Label20.Text = c.GetString(\"CAT_CL_CP\")";
_label20.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CP")));
};
//BA.debugLineNum = 195;BA.debugLine="c.Close";
_c.Close();
//BA.debugLineNum = 196;BA.debugLine="s.Close";
_s.Close();
//BA.debugLineNum = 197;BA.debugLine="btAdmin.Initialize(\"BlueTeeth\")";
_btadmin.Initialize(ba,"BlueTeeth");
//BA.debugLineNum = 198;BA.debugLine="cmp20.Initialize(\"Printer\")";
_cmp20.Initialize("Printer");
//BA.debugLineNum = 199;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.SERVE";
_reqmanager._initialize /*String*/ (ba,this,_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._server /*String*/ );
//BA.debugLineNum = 200;BA.debugLine="End Sub";
return "";
}
public String _bt_qr_click() throws Exception{
//BA.debugLineNum = 549;BA.debugLine="Sub BT_QR_Click";
//BA.debugLineNum = 550;BA.debugLine="sc.isportrait = True";
_sc.isportrait = __c.True;
//BA.debugLineNum = 551;BA.debugLine="sc.timeoutDuration = 45";
_sc.timeoutDuration = (int) (45);
//BA.debugLineNum = 552;BA.debugLine="sc.theViewFinderXfactor = 0.7";
_sc.theViewFinderXfactor = 0.7;
//BA.debugLineNum = 553;BA.debugLine="sc.theViewFinderYfactor = 0.5";
_sc.theViewFinderYfactor = 0.5;
//BA.debugLineNum = 554;BA.debugLine="sc.theResultColor = Colors.Green";
_sc.theResultColor = __c.Colors.Green;
//BA.debugLineNum = 555;BA.debugLine="sc.mustVibrate = True";
_sc.mustVibrate = __c.True;
//BA.debugLineNum = 556;BA.debugLine="sc.BeginScan(\"sc\")";
_sc.BeginScan(ba,"sc");
//BA.debugLineNum = 557;BA.debugLine="End Sub";
return "";
}
public String _calc_ean_checksum(String _number) throws Exception{
int _i = 0;
char _co = '\0';
int _soma = 0;
int _n = 0;
float _digit = 0f;
//BA.debugLineNum = 592;BA.debugLine="Sub calc_ean_checksum(number As String) As String";
//BA.debugLineNum = 593;BA.debugLine="Dim i As Int";
_i = 0;
//BA.debugLineNum = 594;BA.debugLine="Dim cO As Char";
_co = '\0';
//BA.debugLineNum = 595;BA.debugLine="Dim soma As Int";
_soma = 0;
//BA.debugLineNum = 596;BA.debugLine="Dim n As Int";
_n = 0;
//BA.debugLineNum = 597;BA.debugLine="Dim digit As Float";
_digit = 0f;
//BA.debugLineNum = 598;BA.debugLine="soma = 0";
_soma = (int) (0);
//BA.debugLineNum = 599;BA.debugLine="For i=0 To number.Length - 1";
{
final int step7 = 1;
final int limit7 = (int) (_number.length()-1);
_i = (int) (0) ;
for (;_i <= limit7 ;_i = _i + step7 ) {
//BA.debugLineNum = 600;BA.debugLine="digit = number.SubString2(i,i+1)";
_digit = (float)(Double.parseDouble(_number.substring(_i,(int) (_i+1))));
//BA.debugLineNum = 601;BA.debugLine="n= digit * ((i Mod 2) * 2 + 1)";
_n = (int) (_digit*((_i%2)*2+1));
//BA.debugLineNum = 602;BA.debugLine="soma=soma+n";
_soma = (int) (_soma+_n);
}
};
//BA.debugLineNum = 604;BA.debugLine="Return number & ( ( 10 - ( soma Mod 10 )) Mod 10";
if (true) return _number+BA.NumberToString(((10-(_soma%10))%10));
//BA.debugLineNum = 605;BA.debugLine="End Sub";
return "";
}
public String _cb_factura_checkedchange(boolean _checked) throws Exception{
//BA.debugLineNum = 816;BA.debugLine="Private Sub cb_factura_CheckedChange(Checked As Bo";
//BA.debugLineNum = 818;BA.debugLine="If Checked Then p_cbFactura.Color = Colors.Green";
if (_checked) {
_p_cbfactura.setColor(__c.Colors.Green);}
else {
_p_cbfactura.setColor(__c.Colors.Red);};
//BA.debugLineNum = 819;BA.debugLine="End Sub";
return "";
}
public String _class_globals() throws Exception{
//BA.debugLineNum = 5;BA.debugLine="Sub Class_Globals";
//BA.debugLineNum = 6;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
//BA.debugLineNum = 7;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
//BA.debugLineNum = 8;BA.debugLine="Private p_cliente As Panel";
_p_cliente = new anywheresoftware.b4a.objects.PanelWrapper();
//BA.debugLineNum = 9;BA.debugLine="Dim reqManager As DBRequestManager";
_reqmanager = new keymon.lat.medicomed.dbrequestmanager();
//BA.debugLineNum = 10;BA.debugLine="Dim cmd As DBCommand";
_cmd = new keymon.lat.medicomed.dbrequestmanager._dbcommand();
//BA.debugLineNum = 11;BA.debugLine="Dim ime As IME";
_ime = new anywheresoftware.b4a.objects.IME();
//BA.debugLineNum = 13;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
//BA.debugLineNum = 14;BA.debugLine="Dim ruta As String";
_ruta = "";
//BA.debugLineNum = 15;BA.debugLine="Dim skmt As SQL";
_skmt = new anywheresoftware.b4a.sql.SQL();
//BA.debugLineNum = 16;BA.debugLine="Dim clie_id As String";
_clie_id = "";
//BA.debugLineNum = 17;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
//BA.debugLineNum = 18;BA.debugLine="Dim usuario As String";
_usuario = "";
//BA.debugLineNum = 19;BA.debugLine="Dim total_cliente As String";
_total_cliente = "";
//BA.debugLineNum = 20;BA.debugLine="Dim m_lat, m_lon As String";
_m_lat = "";
_m_lon = "";
//BA.debugLineNum = 21;BA.debugLine="Dim btAdmin As BluetoothAdmin";
_btadmin = new anywheresoftware.b4a.objects.Serial.BluetoothAdmin();
//BA.debugLineNum = 22;BA.debugLine="Dim cmp20 As Serial";
_cmp20 = new anywheresoftware.b4a.objects.Serial();
//BA.debugLineNum = 23;BA.debugLine="Dim printer As TextWriter";
_printer = new anywheresoftware.b4a.objects.streams.File.TextWriterWrapper();
//BA.debugLineNum = 24;BA.debugLine="Dim PairedDevices As Map";
_paireddevices = new anywheresoftware.b4a.objects.collections.Map();
//BA.debugLineNum = 25;BA.debugLine="Dim L As List";
_l = new anywheresoftware.b4a.objects.collections.List();
//BA.debugLineNum = 26;BA.debugLine="Dim TAMANO As Int";
_tamano = 0;
//BA.debugLineNum = 27;BA.debugLine="Dim ESPACIO As Int";
_espacio = 0;
//BA.debugLineNum = 28;BA.debugLine="Dim BLANCO As String";
_blanco = "";
//BA.debugLineNum = 29;BA.debugLine="Dim cuenta As String";
_cuenta = "";
//BA.debugLineNum = 30;BA.debugLine="Dim tipo_venta As String = \"PREVENTA\"";
_tipo_venta = "PREVENTA";
//BA.debugLineNum = 31;BA.debugLine="Dim MAC_IMPRESORA As String";
_mac_impresora = "";
//BA.debugLineNum = 33;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
//BA.debugLineNum = 34;BA.debugLine="Dim s As Cursor";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
//BA.debugLineNum = 35;BA.debugLine="Dim DD As Cursor";
_dd = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
//BA.debugLineNum = 36;BA.debugLine="Dim c2 As Cursor";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
//BA.debugLineNum = 37;BA.debugLine="Dim ListView1 As ListView";
_listview1 = new anywheresoftware.b4a.objects.ListViewWrapper();
//BA.debugLineNum = 38;BA.debugLine="Dim la_cuenta As Label";
_la_cuenta = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 39;BA.debugLine="Dim La_nombre As Label";
_la_nombre = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 40;BA.debugLine="Dim la_Calle As Label";
_la_calle = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 41;BA.debugLine="Dim la_numero As Label";
_la_numero = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 42;BA.debugLine="Dim la_nint As Label";
_la_nint = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 43;BA.debugLine="Dim la_edo As Label";
_la_edo = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 44;BA.debugLine="Dim la_pob As Label";
_la_pob = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 45;BA.debugLine="Dim la_col As Label";
_la_col = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 46;BA.debugLine="Dim la_cp As Label";
_la_cp = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 47;BA.debugLine="Dim la_zona As Label";
_la_zona = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 48;BA.debugLine="Dim gest As Button";
_gest = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 49;BA.debugLine="Dim la_saldotot As Label";
_la_saldotot = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 50;BA.debugLine="Dim la_saldooper As Label";
_la_saldooper = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 52;BA.debugLine="Dim Tels As Button";
_tels = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 53;BA.debugLine="Dim Label10 As Label";
_label10 = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 54;BA.debugLine="Dim Label11 As Label";
_label11 = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 56;BA.debugLine="Dim Tar As Button";
_tar = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 58;BA.debugLine="Dim la_comm As Label";
_la_comm = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 59;BA.debugLine="Dim la_actdte As Label";
_la_actdte = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 60;BA.debugLine="Dim la_usuario As Label";
_la_usuario = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 61;BA.debugLine="Dim la_resultado As Label";
_la_resultado = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 62;BA.debugLine="Dim l_entre1 As Label";
_l_entre1 = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 63;BA.debugLine="Dim l_entre2 As Label";
_l_entre2 = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 64;BA.debugLine="Dim l_atiende As Label";
_l_atiende = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 65;BA.debugLine="Dim l_atiende2 As Label";
_l_atiende2 = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 66;BA.debugLine="Dim DATOS As Button";
_datos = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 67;BA.debugLine="Dim Guardar As Button";
_guardar = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 68;BA.debugLine="Dim NUEVO As Button";
_nuevo = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 71;BA.debugLine="Dim l_total As Label";
_l_total = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 72;BA.debugLine="Dim c2 As Cursor";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
//BA.debugLineNum = 73;BA.debugLine="Dim S2 As Cursor";
_s2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
//BA.debugLineNum = 74;BA.debugLine="Private s As Cursor";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
//BA.debugLineNum = 75;BA.debugLine="Dim res As String";
_res = "";
//BA.debugLineNum = 76;BA.debugLine="Private HIST As Button";
_hist = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 77;BA.debugLine="Private MONTO_COMPRA As String";
_monto_compra = "";
//BA.debugLineNum = 78;BA.debugLine="Private META As String";
_meta = "";
//BA.debugLineNum = 79;BA.debugLine="Private META2 As String";
_meta2 = "";
//BA.debugLineNum = 80;BA.debugLine="Private VERIFICA As String";
_verifica = "";
//BA.debugLineNum = 81;BA.debugLine="Private L_QR As Label";
_l_qr = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 82;BA.debugLine="Private BT_QR As Button";
_bt_qr = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 84;BA.debugLine="Dim CODIGO As String";
_codigo = "";
//BA.debugLineNum = 86;BA.debugLine="Private b_mapa As Button";
_b_mapa = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 87;BA.debugLine="Dim CUANTOS As String";
_cuantos = "";
//BA.debugLineNum = 88;BA.debugLine="Private B_IMP As Button";
_b_imp = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 89;BA.debugLine="Dim Toggla As Toggle";
_toggla = new com.rootsoft.togglelibrary.ToggleLibrary();
//BA.debugLineNum = 90;BA.debugLine="Dim tgl As Toggle";
_tgl = new com.rootsoft.togglelibrary.ToggleLibrary();
//BA.debugLineNum = 91;BA.debugLine="Private Panel1 As Panel";
_panel1 = new anywheresoftware.b4a.objects.PanelWrapper();
//BA.debugLineNum = 92;BA.debugLine="Private I_COMPRA As EditText";
_i_compra = new anywheresoftware.b4a.objects.EditTextWrapper();
//BA.debugLineNum = 93;BA.debugLine="Private B_GUARDA_C As Button";
_b_guarda_c = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 94;BA.debugLine="Private b_venta As Button";
_b_venta = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 95;BA.debugLine="Dim ALMACEN As String";
_almacen = "";
//BA.debugLineNum = 96;BA.debugLine="Private LA_GPS As Label";
_la_gps = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 97;BA.debugLine="Private B_E_NEXT As Button";
_b_e_next = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 98;BA.debugLine="Private E_RES_E As EditText";
_e_res_e = new anywheresoftware.b4a.objects.EditTextWrapper();
//BA.debugLineNum = 99;BA.debugLine="Private t_tenc As Label";
_t_tenc = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 100;BA.debugLine="Private Panel2 As Panel";
_panel2 = new anywheresoftware.b4a.objects.PanelWrapper();
//BA.debugLineNum = 101;BA.debugLine="Private CONTADOR_E As String";
_contador_e = "";
//BA.debugLineNum = 102;BA.debugLine="Private HR_RES1 As String";
_hr_res1 = "";
//BA.debugLineNum = 103;BA.debugLine="Private HR_RES2 As String";
_hr_res2 = "";
//BA.debugLineNum = 104;BA.debugLine="Private HR_RES3 As String";
_hr_res3 = "";
//BA.debugLineNum = 105;BA.debugLine="Private EXISTE As String";
_existe = "";
//BA.debugLineNum = 106;BA.debugLine="Private TELEFONO As String";
_telefono = "";
//BA.debugLineNum = 108;BA.debugLine="Private RB1 As RadioButton";
_rb1 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
//BA.debugLineNum = 109;BA.debugLine="Private RB2 As RadioButton";
_rb2 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
//BA.debugLineNum = 110;BA.debugLine="Private RB3 As RadioButton";
_rb3 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
//BA.debugLineNum = 111;BA.debugLine="Private RB4 As RadioButton";
_rb4 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
//BA.debugLineNum = 112;BA.debugLine="Private RB5 As RadioButton";
_rb5 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
//BA.debugLineNum = 114;BA.debugLine="Private stay_hh As String";
_stay_hh = "";
//BA.debugLineNum = 115;BA.debugLine="Private stay_mi As String";
_stay_mi = "";
//BA.debugLineNum = 116;BA.debugLine="Private stay_ss As String";
_stay_ss = "";
//BA.debugLineNum = 118;BA.debugLine="Private LA_GEO As Label";
_la_geo = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 119;BA.debugLine="Dim result As Int";
_result = 0;
//BA.debugLineNum = 120;BA.debugLine="Private cercavalor As String";
_cercavalor = "";
//BA.debugLineNum = 121;BA.debugLine="Private LA_RUTA As String";
_la_ruta = "";
//BA.debugLineNum = 123;BA.debugLine="Private b_like As Button";
_b_like = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 124;BA.debugLine="Private B_GPS As Button";
_b_gps = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 125;BA.debugLine="Dim sc As JhsIceZxing1";
_sc = new ice.zxing.b4aZXingLib();
//BA.debugLineNum = 126;BA.debugLine="Dim CODIGO As String";
_codigo = "";
//BA.debugLineNum = 127;BA.debugLine="Private cb_factura As CheckBox";
_cb_factura = new anywheresoftware.b4a.objects.CompoundButtonWrapper.CheckBoxWrapper();
//BA.debugLineNum = 128;BA.debugLine="Private p_cbFactura As Panel";
_p_cbfactura = new anywheresoftware.b4a.objects.PanelWrapper();
//BA.debugLineNum = 129;BA.debugLine="Dim venimosDeTicketsDia As Boolean = False";
_venimosdeticketsdia = __c.False;
//BA.debugLineNum = 130;BA.debugLine="Private p_abono As Panel";
_p_abono = new anywheresoftware.b4a.objects.PanelWrapper();
//BA.debugLineNum = 131;BA.debugLine="Private et_abono As EditText";
_et_abono = new anywheresoftware.b4a.objects.EditTextWrapper();
//BA.debugLineNum = 132;BA.debugLine="Private b_abono As Button";
_b_abono = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 133;BA.debugLine="Private b_cancelar As Button";
_b_cancelar = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 134;BA.debugLine="Private b_abono1 As Button";
_b_abono1 = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 135;BA.debugLine="Private Label20 As Label";
_label20 = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 136;BA.debugLine="Private l_calle1 As Label";
_l_calle1 = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 137;BA.debugLine="Private l_ubicacion2 As Label";
_l_ubicacion2 = new anywheresoftware.b4a.objects.LabelWrapper();
//BA.debugLineNum = 139;BA.debugLine="Dim dentroDeGeocerca As Boolean = False";
_dentrodegeocerca = __c.False;
//BA.debugLineNum = 140;BA.debugLine="Dim b_inicioFinVenta As Button";
_b_iniciofinventa = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 141;BA.debugLine="Dim precision As Int = 0";
_precision = (int) (0);
//BA.debugLineNum = 142;BA.debugLine="Dim motivoNoVenta, motivoNoVisita As String";
_motivonoventa = "";
_motivonovisita = "";
//BA.debugLineNum = 143;BA.debugLine="Dim usuario As String = \"\"";
_usuario = "";
//BA.debugLineNum = 144;BA.debugLine="Dim Id_Almacen As String";
_id_almacen = "";
//BA.debugLineNum = 145;BA.debugLine="Dim ruta_tienda As String";
_ruta_tienda = "";
//BA.debugLineNum = 147;BA.debugLine="Private b_clinteSinVenta As Button";
_b_clintesinventa = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 148;BA.debugLine="Private b_clienteVenta As Button";
_b_clienteventa = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 149;BA.debugLine="Private p_monto_venta As Panel";
_p_monto_venta = new anywheresoftware.b4a.objects.PanelWrapper();
//BA.debugLineNum = 150;BA.debugLine="Private et_monto_venta As EditText";
_et_monto_venta = new anywheresoftware.b4a.objects.EditTextWrapper();
//BA.debugLineNum = 151;BA.debugLine="Private b_can_monto_venta As Button";
_b_can_monto_venta = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 152;BA.debugLine="Private b_gu_monto_venta As Button";
_b_gu_monto_venta = new anywheresoftware.b4a.objects.ButtonWrapper();
//BA.debugLineNum = 153;BA.debugLine="Private p_inv As Panel";
_p_inv = new anywheresoftware.b4a.objects.PanelWrapper();
//BA.debugLineNum = 154;BA.debugLine="End Sub";
return "";
}
public String _datos_click() throws Exception{
//BA.debugLineNum = 458;BA.debugLine="Sub DATOS_Click";
//BA.debugLineNum = 459;BA.debugLine="B4XPages.ShowPage(\"telefonos\")";
_b4xpages._showpage /*String*/ (ba,"telefonos");
//BA.debugLineNum = 460;BA.debugLine="End Sub";
return "";
}
public String _gest_click() throws Exception{
//BA.debugLineNum = 411;BA.debugLine="Sub gest_Click";
//BA.debugLineNum = 412;BA.debugLine="B4XPages.MainPage.tipo_venta = \"PREVENTA\"";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._tipo_venta /*String*/ = "PREVENTA";
//BA.debugLineNum = 417;BA.debugLine="B4XPages.ShowPage(\"productos\")";
_b4xpages._showpage /*String*/ (ba,"productos");
//BA.debugLineNum = 418;BA.debugLine="End Sub";
return "";
}
public String _gps_locationchanged(anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
anywheresoftware.b4a.gps.LocationWrapper _l1 = null;
anywheresoftware.b4a.gps.LocationWrapper _l2 = null;
long _distance = 0L;
//BA.debugLineNum = 362;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
//BA.debugLineNum = 364;BA.debugLine="If Tracker.FLP.GetLastKnownLocation.IsInitialized";
if (_tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation().IsInitialized() && _tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation().getLatitude()!=0) {
//BA.debugLineNum = 365;BA.debugLine="B4XPages.MainPage.lat_gps = Tracker.FLP.GetLastK";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ = BA.NumberToString(_tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation().getLatitude());
//BA.debugLineNum = 366;BA.debugLine="B4XPages.MainPage.lon_gps = Tracker.FLP.GetLastK";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/ = BA.NumberToString(_tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation().getLongitude());
};
//BA.debugLineNum = 370;BA.debugLine="Dim l1, l2 As Location";
_l1 = new anywheresoftware.b4a.gps.LocationWrapper();
_l2 = new anywheresoftware.b4a.gps.LocationWrapper();
//BA.debugLineNum = 371;BA.debugLine="l1.Initialize2(B4XPages.MainPage.lat_gps, B4XPage";
_l1.Initialize2(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ ,_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/ );
//BA.debugLineNum = 373;BA.debugLine="l2.Initialize2(m_lat, m_lon)";
_l2.Initialize2(_m_lat,_m_lon);
//BA.debugLineNum = 375;BA.debugLine="BT_QR.Enabled = True";
_bt_qr.setEnabled(__c.True);
//BA.debugLineNum = 376;BA.debugLine="LA_GPS.TextColor = Colors.Blue";
_la_gps.setTextColor(__c.Colors.Blue);
//BA.debugLineNum = 377;BA.debugLine="LA_GPS.Text = \"CON UBICACION GPS\"";
_la_gps.setText(BA.ObjectToCharSequence("CON UBICACION GPS"));
//BA.debugLineNum = 378;BA.debugLine="b_clinteSinVenta.Enabled = True";
_b_clintesinventa.setEnabled(__c.True);
//BA.debugLineNum = 379;BA.debugLine="b_clienteVenta.Enabled = True";
_b_clienteventa.setEnabled(__c.True);
//BA.debugLineNum = 382;BA.debugLine="Dim distance As Long";
_distance = 0L;
//BA.debugLineNum = 383;BA.debugLine="distance = l1.DistanceTo(l2) 'the result is i";
_distance = (long) (_l1.DistanceTo((android.location.Location)(_l2.getObject())));
//BA.debugLineNum = 384;BA.debugLine="gest.Visible = False";
_gest.setVisible(__c.False);
//BA.debugLineNum = 386;BA.debugLine="LA_GEO.TextColor = Colors.Blue";
_la_geo.setTextColor(__c.Colors.Blue);
//BA.debugLineNum = 387;BA.debugLine="Tels.Visible = False";
_tels.setVisible(__c.False);
//BA.debugLineNum = 388;BA.debugLine="gest.Visible = False";
_gest.setVisible(__c.False);
//BA.debugLineNum = 392;BA.debugLine="LA_GEO.Text= $\"$1.2{distance/1000} kms\"$";
_la_geo.setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.2",(Object)(_distance/(double)1000))+" kms")));
//BA.debugLineNum = 393;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM HIST_GPS");
//BA.debugLineNum = 394;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO HIST_GPS (HGDATE, HGLAT, HGLON) VALUES(?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_sdate+_stime),(Object)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/ )}));
//BA.debugLineNum = 396;BA.debugLine="l_ubicacion2.TextSize = 13";
_l_ubicacion2.setTextSize((float) (13));
//BA.debugLineNum = 397;BA.debugLine="l_ubicacion2.Text = $\"Precisión GPS $1.0{Location";
_l_ubicacion2.setText(BA.ObjectToCharSequence(("Precisión GPS "+__c.SmartStringFormatter("1.0",(Object)(_location1.getAccuracy()))+" m")));
//BA.debugLineNum = 398;BA.debugLine="If Location1.Accuracy > 200 Then";
if (_location1.getAccuracy()>200) {
//BA.debugLineNum = 399;BA.debugLine="l_ubicacion2.TextColor = Colors.Red";
_l_ubicacion2.setTextColor(__c.Colors.Red);
//BA.debugLineNum = 400;BA.debugLine="l_ubicacion2.TextSize = 16";
_l_ubicacion2.setTextSize((float) (16));
//BA.debugLineNum = 401;BA.debugLine="l_ubicacion2.Text = $\"Mala señal $1.0{Location1.";
_l_ubicacion2.setText(BA.ObjectToCharSequence(("Mala señal "+__c.SmartStringFormatter("1.0",(Object)(_location1.getAccuracy()))+" m")));
};
//BA.debugLineNum = 404;BA.debugLine="CallSubDelayed(Tracker, \"CreateLocationRequest\")";
__c.CallSubDelayed(ba,(Object)(_tracker.getObject()),"CreateLocationRequest");
//BA.debugLineNum = 405;BA.debugLine="End Sub";
return "";
}
public String _guardar_click() throws Exception{
//BA.debugLineNum = 462;BA.debugLine="Sub Guardar_Click";
//BA.debugLineNum = 463;BA.debugLine="b_inicioFinVenta.Text = \"FIN VENTA\"";
_b_iniciofinventa.setText(BA.ObjectToCharSequence("FIN VENTA"));
//BA.debugLineNum = 464;BA.debugLine="b_inicioFinVenta.Visible = True";
_b_iniciofinventa.setVisible(__c.True);
//BA.debugLineNum = 465;BA.debugLine="End Sub";
return "";
}
public String _guardar2_click() throws Exception{
//BA.debugLineNum = 467;BA.debugLine="Sub Guardar2_Click";
//BA.debugLineNum = 539;BA.debugLine="End Sub";
return "";
}
public String _hist_click() throws Exception{
//BA.debugLineNum = 545;BA.debugLine="Sub HIST_Click";
//BA.debugLineNum = 546;BA.debugLine="B4XPages.ShowPage(\"Historico\")";
_b4xpages._showpage /*String*/ (ba,"Historico");
//BA.debugLineNum = 547;BA.debugLine="End Sub";
return "";
}
public Object _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
//BA.debugLineNum = 157;BA.debugLine="Public Sub Initialize As Object";
//BA.debugLineNum = 158;BA.debugLine="Return Me";
if (true) return this;
//BA.debugLineNum = 159;BA.debugLine="End Sub";
return null;
}
public String _jobdone(keymon.lat.medicomed.httpjob _job) throws Exception{
keymon.lat.medicomed.dbrequestmanager._dbresult _resultado = null;
String _cliente = "";
Object[] _records = null;
String _k = "";
//BA.debugLineNum = 895;BA.debugLine="Sub JobDone(Job As HttpJob)";
//BA.debugLineNum = 896;BA.debugLine="Log(Job.Success)";
__c.LogImpl("344892161",BA.ObjectToString(_job._success /*boolean*/ ),0);
//BA.debugLineNum = 897;BA.debugLine="If Job.Success = False Then";
if (_job._success /*boolean*/ ==__c.False) {
}else {
//BA.debugLineNum = 900;BA.debugLine="LogColor(\"JobDone: '\" & reqManager.HandleJob(Job";
__c.LogImpl("344892165","JobDone: '"+BA.ObjectToString(_reqmanager._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (_job).Tag /*Object*/ )+"' - Registros: "+BA.NumberToString(_reqmanager._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (_job).Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),__c.Colors.Green);
//BA.debugLineNum = 901;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) {
//BA.debugLineNum = 902;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = _reqmanager._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (_job);
//BA.debugLineNum = 903;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"ins_pedido";
if ((BA.ObjectToString(_resultado.Tag /*Object*/ )).indexOf("ins_pedidosPendientes_head_")>-1) {
//BA.debugLineNum = 904;BA.debugLine="Private cliente As String= resultado.Tag";
_cliente = BA.ObjectToString(_resultado.Tag /*Object*/ );
//BA.debugLineNum = 905;BA.debugLine="cliente = cliente.SubString(cliente.IndexOf(\"_";
_cliente = _cliente.substring((int) (_cliente.indexOf("_")+24));
//BA.debugLineNum = 906;BA.debugLine="Log($\"Cliente1:${cliente}\"$)";
__c.LogImpl("344892171",("Cliente1:"+__c.SmartStringFormatter("",(Object)(_cliente))+""),0);
//BA.debugLineNum = 907;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update P";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update PEDIDO_CLIENTE SET pc_envio_ok = ? WHERE PC_CLIENTE = ? AND pc_envio_ok <> 1",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{"1",_cliente}));
//BA.debugLineNum = 908;BA.debugLine="For Each records() As Object In resultado.Rows";
{
final anywheresoftware.b4a.BA.IterableList group12 = _resultado.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen12 = group12.getSize()
;int index12 = 0;
;
for (; index12 < groupLen12;index12++){
_records = (Object[])(group12.Get(index12));
//BA.debugLineNum = 909;BA.debugLine="For Each k As String In resultado.Columns.Key";
{
final anywheresoftware.b4a.BA.IterableList group13 = _resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen13 = group13.getSize()
;int index13 = 0;
;
for (; index13 < groupLen13;index13++){
_k = BA.ObjectToString(group13.Get(index13));
//BA.debugLineNum = 910;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & record";
__c.LogImpl("344892175",BA.ObjectToString(_resultado.Tag /*Object*/ )+": "+_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
}
};
}
};
};
};
//BA.debugLineNum = 916;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) {
//BA.debugLineNum = 917;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = _reqmanager._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (_job);
//BA.debugLineNum = 918;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"ins_pedido";
if ((BA.ObjectToString(_resultado.Tag /*Object*/ )).indexOf("ins_pedidosPendientes_prods_")>-1) {
//BA.debugLineNum = 919;BA.debugLine="Private cliente As String= resultado.Tag";
_cliente = BA.ObjectToString(_resultado.Tag /*Object*/ );
//BA.debugLineNum = 920;BA.debugLine="cliente = cliente.SubString(cliente.IndexOf(\"_";
_cliente = _cliente.substring((int) (_cliente.indexOf("_")+25));
//BA.debugLineNum = 921;BA.debugLine="Log($\"Cliente2:${cliente}\"$)";
__c.LogImpl("344892186",("Cliente2:"+__c.SmartStringFormatter("",(Object)(_cliente))+""),0);
//BA.debugLineNum = 922;BA.debugLine="For Each records() As Object In resultado.Rows";
{
final anywheresoftware.b4a.BA.IterableList group25 = _resultado.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen25 = group25.getSize()
;int index25 = 0;
;
for (; index25 < groupLen25;index25++){
_records = (Object[])(group25.Get(index25));
//BA.debugLineNum = 923;BA.debugLine="For Each k As String In resultado.Columns.Key";
{
final anywheresoftware.b4a.BA.IterableList group26 = _resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen26 = group26.getSize()
;int index26 = 0;
;
for (; index26 < groupLen26;index26++){
_k = BA.ObjectToString(group26.Get(index26));
//BA.debugLineNum = 924;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & record";
__c.LogImpl("344892189",BA.ObjectToString(_resultado.Tag /*Object*/ )+": "+_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
}
};
}
};
};
};
//BA.debugLineNum = 930;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) {
//BA.debugLineNum = 931;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = _reqmanager._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (_job);
//BA.debugLineNum = 932;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"ins_abonos";
if ((BA.ObjectToString(_resultado.Tag /*Object*/ )).indexOf("ins_abonosPendientes_")>-1) {
//BA.debugLineNum = 933;BA.debugLine="Private cliente As String= resultado.Tag";
_cliente = BA.ObjectToString(_resultado.Tag /*Object*/ );
//BA.debugLineNum = 934;BA.debugLine="cliente = cliente.SubString(cliente.IndexOf(\"_";
_cliente = _cliente.substring((int) (_cliente.indexOf("_")+18));
//BA.debugLineNum = 935;BA.debugLine="Log($\"Cliente2:${cliente}\"$)";
__c.LogImpl("344892200",("Cliente2:"+__c.SmartStringFormatter("",(Object)(_cliente))+""),0);
//BA.debugLineNum = 936;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"UPDATE A";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("UPDATE ABONOS set a_enviado = 1 where a_cliente = '"+__c.SmartStringFormatter("",(Object)(_cliente))+"'"));
//BA.debugLineNum = 937;BA.debugLine="For Each records() As Object In resultado.Rows";
{
final anywheresoftware.b4a.BA.IterableList group39 = _resultado.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen39 = group39.getSize()
;int index39 = 0;
;
for (; index39 < groupLen39;index39++){
_records = (Object[])(group39.Get(index39));
//BA.debugLineNum = 938;BA.debugLine="For Each k As String In resultado.Columns.Key";
{
final anywheresoftware.b4a.BA.IterableList group40 = _resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen40 = group40.getSize()
;int index40 = 0;
;
for (; index40 < groupLen40;index40++){
_k = BA.ObjectToString(group40.Get(index40));
//BA.debugLineNum = 939;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & record";
__c.LogImpl("344892204",BA.ObjectToString(_resultado.Tag /*Object*/ )+": "+_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
}
};
}
};
};
};
//BA.debugLineNum = 944;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) {
//BA.debugLineNum = 945;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = _reqmanager._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (_job);
//BA.debugLineNum = 946;BA.debugLine="If resultado.Tag= \"mandaBitacora\" Then";
if ((_resultado.Tag /*Object*/ ).equals((Object)("mandaBitacora"))) {
//BA.debugLineNum = 947;BA.debugLine="Log(\"mandaBitacora\")";
__c.LogImpl("344892212","mandaBitacora",0);
};
};
//BA.debugLineNum = 950;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) {
//BA.debugLineNum = 951;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = _reqmanager._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (_job);
//BA.debugLineNum = 952;BA.debugLine="If resultado.Tag= \"ventaNoVenta\" Then";
if ((_resultado.Tag /*Object*/ ).equals((Object)("ventaNoVenta"))) {
//BA.debugLineNum = 953;BA.debugLine="Log(\"ventaNoVenta\")";
__c.LogImpl("344892218","ventaNoVenta",0);
};
};
//BA.debugLineNum = 956;BA.debugLine="Job.Release";
_job._release /*String*/ ();
};
//BA.debugLineNum = 959;BA.debugLine="End Sub";
return "";
}
public String _listview1_itemlongclick(int _position,Object _value) throws Exception{
//BA.debugLineNum = 407;BA.debugLine="Sub ListView1_ItemLongClick (Position As Int, Valu";
//BA.debugLineNum = 409;BA.debugLine="End Sub";
return "";
}
public String _mandapendientes() throws Exception{
int _i = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _ab = null;
//BA.debugLineNum = 821;BA.debugLine="Sub mandaPendientes";
//BA.debugLineNum = 823;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"SELECT PC_CLI";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT, PC_COSTO_SIN, PC_RUTA, PC_ALMACEN, PC_FACTURA FROM PEDIDO_CLIENTE where pc_envio_ok <> 1")));
//BA.debugLineNum = 825;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) {
//BA.debugLineNum = 826;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step3 = 1;
final int limit3 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit3 ;_i = _i + step3 ) {
//BA.debugLineNum = 827;BA.debugLine="c.Position=i";
_c.setPosition(_i);
//BA.debugLineNum = 828;BA.debugLine="Dim cmd As DBCommand";
_cmd = new keymon.lat.medicomed.dbrequestmanager._dbcommand();
//BA.debugLineNum = 834;BA.debugLine="Dim cmd As DBCommand";
_cmd = new keymon.lat.medicomed.dbrequestmanager._dbcommand();
//BA.debugLineNum = 835;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
//BA.debugLineNum = 836;BA.debugLine="cmd.Name = \"insert_pedidos_MEDI\"";
_cmd.Name /*String*/ = "insert_pedidos_MEDI";
//BA.debugLineNum = 837;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"P";
_cmd.Parameters /*Object[]*/ = new Object[]{(Object)(_c.GetString("PC_CLIENTE")),(Object)(_c.GetString("PC_FECHA")),(Object)(_c.GetString("PC_USER")),(Object)(_c.GetString("PC_NOART")),(Object)(_c.GetString("PC_MONTO")),(Object)(_c.GetString("PC_LON")),(Object)(_c.GetString("PC_LAT")),(Object)(_almacen),(Object)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._principal /*keymon.lat.medicomed.c_principal*/ ._l_ruta /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(_c.GetString("PC_COSTO_SIN")),(Object)(_c.GetString("PC_FACTURA"))};
//BA.debugLineNum = 838;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"ins_pedidosPe";
_reqmanager._executecommand /*String*/ (_cmd,(Object)(("ins_pedidosPendientes_head_"+__c.SmartStringFormatter("",(Object)(_c.GetString("PC_CLIENTE")))+"")));
}
};
};
//BA.debugLineNum = 843;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"SELECT PC_ENV";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT PC_ENVIO_OK, PE_CEDIS, PE_COSTO_TOT, PE_COSTOU, PE_CANT, PE_PRONOMBRE, PE_PROID, PE_CLIENTE, PE_FECHA, PE_USUARIO, PE_COSTO_SIN, PE_RUTA, PE_DESC, PE_FOLIO FROM pedido_cliente left join PEDIDO where pc_cliente = pe_cliente and pc_envio_ok <> 1")));
//BA.debugLineNum = 845;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) {
//BA.debugLineNum = 846;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step15 = 1;
final int limit15 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit15 ;_i = _i + step15 ) {
//BA.debugLineNum = 847;BA.debugLine="c.Position=i";
_c.setPosition(_i);
//BA.debugLineNum = 848;BA.debugLine="Dim cmd As DBCommand";
_cmd = new keymon.lat.medicomed.dbrequestmanager._dbcommand();
//BA.debugLineNum = 855;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
//BA.debugLineNum = 856;BA.debugLine="cmd.Name = \"insert_pedido_MEDI\"";
_cmd.Name /*String*/ = "insert_pedido_MEDI";
//BA.debugLineNum = 857;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"P";
_cmd.Parameters /*Object[]*/ = new Object[]{(Object)(_c.GetString("PE_CEDIS")),(Object)(_almacen),(Object)(_c.GetString("PE_COSTO_TOT")),(Object)(_c.GetString("PE_COSTOU")),(Object)(_c.GetString("PE_CANT")),(Object)(_c.GetString("PE_PRONOMBRE")),(Object)(_c.GetString("PE_PROID")),(Object)(_c.GetString("PE_CLIENTE")),(Object)(_c.GetString("PE_FECHA")),(Object)(_c.GetString("PE_USUARIO")),(Object)(_c.GetString("PE_RUTA")),(Object)(_c.GetString("PE_COSTO_SIN")),(Object)(_c.GetString("PE_DESC")),(Object)(_c.GetString("PE_FOLIO"))};
//BA.debugLineNum = 858;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"ins_pedidosPe";
_reqmanager._executecommand /*String*/ (_cmd,(Object)(("ins_pedidosPendientes_prods_"+__c.SmartStringFormatter("",(Object)(_c.GetString("PE_CLIENTE")))+"")));
}
};
};
//BA.debugLineNum = 863;BA.debugLine="Dim ab As Cursor = B4XPages.MainPage.skmt.ExecQue";
_ab = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_ab = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("SELECT * from ABONOS where a_enviado is null"))));
//BA.debugLineNum = 865;BA.debugLine="If ab.RowCount > 0 Then";
if (_ab.getRowCount()>0) {
//BA.debugLineNum = 866;BA.debugLine="For i=0 To ab.RowCount -1";
{
final int step26 = 1;
final int limit26 = (int) (_ab.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit26 ;_i = _i + step26 ) {
//BA.debugLineNum = 867;BA.debugLine="ab.Position = i";
_ab.setPosition(_i);
//BA.debugLineNum = 868;BA.debugLine="Dim cmd As DBCommand";
_cmd = new keymon.lat.medicomed.dbrequestmanager._dbcommand();
//BA.debugLineNum = 869;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
//BA.debugLineNum = 870;BA.debugLine="cmd.Name = \"insert_abono_MEDI\"";
_cmd.Name /*String*/ = "insert_abono_MEDI";
//BA.debugLineNum = 871;BA.debugLine="cmd.Parameters = Array As Object( ab.GetString(";
_cmd.Parameters /*Object[]*/ = new Object[]{(Object)(_ab.GetString("a_usuario")),(Object)(_ab.GetString("a_ruta")),(Object)(_ab.GetString("a_cliente")),(Object)(_ab.GetString("a_abono")),(Object)(_ab.GetString("a_fecha"))};
//BA.debugLineNum = 872;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"ins_abonosPen";
_reqmanager._executecommand /*String*/ (_cmd,(Object)(("ins_abonosPendientes_"+__c.SmartStringFormatter("",(Object)(_ab.GetString("a_cliente")))+"")));
//BA.debugLineNum = 873;BA.debugLine="Log($\"ins_abonosPendientes_${ab.GetString(\"a_cl";
__c.LogImpl("344826676",("ins_abonosPendientes_"+__c.SmartStringFormatter("",(Object)(_ab.GetString("a_cliente")))+""),0);
}
};
};
//BA.debugLineNum = 876;BA.debugLine="ab.Close";
_ab.Close();
//BA.debugLineNum = 893;BA.debugLine="End Sub";
return "";
}
public String _mods() throws Exception{
//BA.debugLineNum = 1;BA.debugLine="Sub MODS 'ignore";
//BA.debugLineNum = 3;BA.debugLine="End Sub";
return "";
}
public String _nuevo_click() throws Exception{
//BA.debugLineNum = 541;BA.debugLine="Sub NUEVO_Click";
//BA.debugLineNum = 542;BA.debugLine="B4XPages.ShowPage(\"NuevoCliente\")";
_b4xpages._showpage /*String*/ (ba,"NuevoCliente");
//BA.debugLineNum = 543;BA.debugLine="End Sub";
return "";
}
public String _p_abono_click() throws Exception{
//BA.debugLineNum = 961;BA.debugLine="Private Sub p_abono_Click";
//BA.debugLineNum = 963;BA.debugLine="End Sub";
return "";
}
public String _p_cliente_click() throws Exception{
//BA.debugLineNum = 812;BA.debugLine="Private Sub p_cliente_Click";
//BA.debugLineNum = 814;BA.debugLine="End Sub";
return "";
}
public String _printer_connected(boolean _success) throws Exception{
//BA.debugLineNum = 655;BA.debugLine="Sub Printer_Connected (Success As Boolean)";
//BA.debugLineNum = 656;BA.debugLine="If Success Then";
if (_success) {
//BA.debugLineNum = 657;BA.debugLine="B_IMP.Enabled = True";
_b_imp.setEnabled(__c.True);
}else {
//BA.debugLineNum = 659;BA.debugLine="B_IMP.Enabled = False";
_b_imp.setEnabled(__c.False);
//BA.debugLineNum = 660;BA.debugLine="If Msgbox2(\"\", \"Printer Error\",\"Reprint\",\"Cancel";
if (__c.Msgbox2(BA.ObjectToCharSequence(""),BA.ObjectToCharSequence("Printer Error"),"Reprint","Cancel","",(android.graphics.Bitmap)(__c.Null),ba)==__c.DialogResponse.POSITIVE) {
//BA.debugLineNum = 661;BA.debugLine="StartPrinter";
_startprinter();
};
};
//BA.debugLineNum = 664;BA.debugLine="End Sub";
return "";
}
public String _rb1_checkedchange(boolean _checked) throws Exception{
//BA.debugLineNum = 769;BA.debugLine="Sub RB1_CheckedChange(Checked As Boolean)";
//BA.debugLineNum = 770;BA.debugLine="If RB1.Checked = True Then";
if (_rb1.getChecked()==__c.True) {
//BA.debugLineNum = 771;BA.debugLine="E_RES_E.Text = \"CENTRAL DE ABASTOS\"";
_e_res_e.setText(BA.ObjectToCharSequence("CENTRAL DE ABASTOS"));
};
//BA.debugLineNum = 773;BA.debugLine="End Sub";
return "";
}
public String _rb2_checkedchange(boolean _checked) throws Exception{
//BA.debugLineNum = 775;BA.debugLine="Sub RB2_CheckedChange(Checked As Boolean)";
//BA.debugLineNum = 776;BA.debugLine="If RB2.Checked = True Then";
if (_rb2.getChecked()==__c.True) {
//BA.debugLineNum = 777;BA.debugLine="E_RES_E.Text = \"AUTOSERVICIO\"";
_e_res_e.setText(BA.ObjectToCharSequence("AUTOSERVICIO"));
};
//BA.debugLineNum = 779;BA.debugLine="End Sub";
return "";
}
public String _rb3_checkedchange(boolean _checked) throws Exception{
//BA.debugLineNum = 781;BA.debugLine="Sub RB3_CheckedChange(Checked As Boolean)";
//BA.debugLineNum = 782;BA.debugLine="If RB3.Checked = True Then";
if (_rb3.getChecked()==__c.True) {
//BA.debugLineNum = 783;BA.debugLine="E_RES_E.Text = \"CLUB DE PRECIO\"";
_e_res_e.setText(BA.ObjectToCharSequence("CLUB DE PRECIO"));
};
//BA.debugLineNum = 785;BA.debugLine="End Sub";
return "";
}
public String _rb4_checkedchange(boolean _checked) throws Exception{
//BA.debugLineNum = 787;BA.debugLine="Sub RB4_CheckedChange(Checked As Boolean)";
//BA.debugLineNum = 788;BA.debugLine="If RB4.Checked = True Then";
if (_rb4.getChecked()==__c.True) {
//BA.debugLineNum = 789;BA.debugLine="E_RES_E.Text = \"DIRECTO PEDEGREE\"";
_e_res_e.setText(BA.ObjectToCharSequence("DIRECTO PEDEGREE"));
};
//BA.debugLineNum = 791;BA.debugLine="End Sub";
return "";
}
public void _sc_result(String _atype,String _values,anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _image) throws Exception{
ResumableSub_sc_result rsub = new ResumableSub_sc_result(this,_atype,_values,_image);
rsub.resume(ba, null);
}
public static class ResumableSub_sc_result extends BA.ResumableSub {
public ResumableSub_sc_result(keymon.lat.medicomed.c_cliente parent,String _atype,String _values,anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _image) {
this.parent = parent;
this._atype = _atype;
this._values = _values;
this._image = _image;
}
keymon.lat.medicomed.c_cliente parent;
String _atype;
String _values;
anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _image;
int _resultado = 0;
@Override
public void resume(BA ba, Object[] result) throws Exception{
while (true) {
switch (state) {
case -1:
return;
case 0:
//C
this.state = 1;
//BA.debugLineNum = 562;BA.debugLine="CODIGO = Values";
parent._codigo = _values;
//BA.debugLineNum = 563;BA.debugLine="DD=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT COUN";
parent._dd = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT COUNT(*) AS CUANTOS FROM kmt_info WHERE CAT_CL_NUM_SERIEFISICO = ?",new String[]{parent._codigo})));
//BA.debugLineNum = 564;BA.debugLine="DD.Position =0";
parent._dd.setPosition((int) (0));
//BA.debugLineNum = 565;BA.debugLine="If DD.GetString(\"CUANTOS\") > 0 Then";
if (true) break;
case 1:
//if
this.state = 16;
if ((double)(Double.parseDouble(parent._dd.GetString("CUANTOS")))>0) {
this.state = 3;
}else {
this.state = 5;
}if (true) break;
case 3:
//C
this.state = 16;
//BA.debugLineNum = 566;BA.debugLine="MsgboxAsync(\"Código ya asignado\", \"AVISO\")";
parent.__c.MsgboxAsync(BA.ObjectToCharSequence("Código ya asignado"),BA.ObjectToCharSequence("AVISO"),ba);
if (true) break;
case 5:
//C
this.state = 6;
//BA.debugLineNum = 568;BA.debugLine="If CODIGO.Length = 7 Then";
if (true) break;
case 6:
//if
this.state = 15;
if (parent._codigo.length()==7) {
this.state = 8;
}else {
this.state = 14;
}if (true) break;
case 8:
//C
this.state = 9;
//BA.debugLineNum = 569;BA.debugLine="Msgbox2Async(\"El código \"& CODIGO & \" es correc";
parent.__c.Msgbox2Async(BA.ObjectToCharSequence("El código "+parent._codigo+" es correcto?"),BA.ObjectToCharSequence("Title"),"Yes","Cancel","No",(anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper(), (android.graphics.Bitmap)(parent.__c.Null)),ba,parent.__c.False);
//BA.debugLineNum = 570;BA.debugLine="Wait For Msgbox_Result (resultado As Int)";
parent.__c.WaitFor("msgbox_result", ba, this, null);
this.state = 17;
return;
case 17:
//C
this.state = 9;
_resultado = (Integer) result[0];
;
//BA.debugLineNum = 571;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
if (true) break;
case 9:
//if
this.state = 12;
if (_resultado==parent.__c.DialogResponse.POSITIVE) {
this.state = 11;
}if (true) break;
case 11:
//C
this.state = 12;
//BA.debugLineNum = 572;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE k";
parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE kmt_info set CAT_CL_NUM_SERIEFISICO = ?, CAT_CL_LONG = ?, CAT_CL_LAT =? where CAT_CL_CODIGO In (select cuenta from cuentaa)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(parent._codigo),(Object)(parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ )}));
//BA.debugLineNum = 573;BA.debugLine="L_QR.TEXT =CODIGO";
parent._l_qr.setText(BA.ObjectToCharSequence(parent._codigo));
//BA.debugLineNum = 574;BA.debugLine="L_QR.TextColor = Colors.Blue";
parent._l_qr.setTextColor(parent.__c.Colors.Blue);
//BA.debugLineNum = 575;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert i";
parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into HIST_CODIGO_BARRAS(CODIGOKMTS, CODIGOB, LAT, LON) VALUES (?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(parent._la_cuenta.getText()),(Object)(parent._codigo),(Object)(parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ )}));
if (true) break;
case 12:
//C
this.state = 15;
;
if (true) break;
case 14:
//C
this.state = 15;
//BA.debugLineNum = 578;BA.debugLine="MsgboxAsync(\"Código No Valido\", \"AVISO\")";
parent.__c.MsgboxAsync(BA.ObjectToCharSequence("Código No Valido"),BA.ObjectToCharSequence("AVISO"),ba);
if (true) break;
case 15:
//C
this.state = 16;
;
if (true) break;
case 16:
//C
this.state = -1;
;
//BA.debugLineNum = 581;BA.debugLine="DD.Close";
parent._dd.Close();
//BA.debugLineNum = 582;BA.debugLine="End Sub";
if (true) break;
}
}
}
}
public String _sc_timedout(boolean _timedout) throws Exception{
//BA.debugLineNum = 584;BA.debugLine="Sub sc_timedout(timedOut As Boolean)";
//BA.debugLineNum = 585;BA.debugLine="Log(\"timedOut \" & timedOut)";
__c.LogImpl("343778049","timedOut "+BA.ObjectToString(_timedout),0);
//BA.debugLineNum = 586;BA.debugLine="End Sub";
return "";
}
public String _sc_usercancelled(boolean _usercancelled) throws Exception{
//BA.debugLineNum = 588;BA.debugLine="Sub sc_usercancelled(userCancelled As Boolean)";
//BA.debugLineNum = 589;BA.debugLine="Log(\"userCancelled \" & userCancelled)";
__c.LogImpl("343843585","userCancelled "+BA.ObjectToString(_usercancelled),0);
//BA.debugLineNum = 590;BA.debugLine="End Sub";
return "";
}
public String _startprinter() throws Exception{
int _resimp = 0;
int _i = 0;
//BA.debugLineNum = 666;BA.debugLine="Sub StartPrinter";
//BA.debugLineNum = 667;BA.debugLine="Dim PairedDevices As Map";
_paireddevices = new anywheresoftware.b4a.objects.collections.Map();
//BA.debugLineNum = 668;BA.debugLine="Dim L As List";
_l = new anywheresoftware.b4a.objects.collections.List();
//BA.debugLineNum = 669;BA.debugLine="Dim resimp As Int";
_resimp = 0;
//BA.debugLineNum = 670;BA.debugLine="ToastMessageShow(\"Printing.....\",True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Printing....."),__c.True);
//BA.debugLineNum = 671;BA.debugLine="PairedDevices.Initialize";
_paireddevices.Initialize();
//BA.debugLineNum = 672;BA.debugLine="Try";
try { //BA.debugLineNum = 673;BA.debugLine="PairedDevices = cmp20.GetPairedDevices";
_paireddevices = _cmp20.GetPairedDevices();
}
catch (Exception e9) {
ba.setLastException(e9); //BA.debugLineNum = 675;BA.debugLine="Msgbox(\"Getting Paired Devices\",\"Printer Error\")";
__c.Msgbox(BA.ObjectToCharSequence("Getting Paired Devices"),BA.ObjectToCharSequence("Printer Error"),ba);
//BA.debugLineNum = 676;BA.debugLine="printer.Close";
_printer.Close();
//BA.debugLineNum = 677;BA.debugLine="cmp20.Disconnect";
_cmp20.Disconnect();
};
//BA.debugLineNum = 679;BA.debugLine="If PairedDevices.Size = 0 Then";
if (_paireddevices.getSize()==0) {
//BA.debugLineNum = 680;BA.debugLine="Msgbox(\"Error Connecting to Printer - Printer No";
__c.Msgbox(BA.ObjectToCharSequence("Error Connecting to Printer - Printer Not Found"),BA.ObjectToCharSequence(""),ba);
//BA.debugLineNum = 681;BA.debugLine="Return";
if (true) return "";
};
//BA.debugLineNum = 683;BA.debugLine="If PairedDevices.Size = 1 Then";
if (_paireddevices.getSize()==1) {
//BA.debugLineNum = 684;BA.debugLine="Try";
try { //BA.debugLineNum = 685;BA.debugLine="cmp20.ConnectInsecure(btAdmin,PairedDevices.Get";
_cmp20.ConnectInsecure(ba,_btadmin,BA.ObjectToString(_paireddevices.Get(_paireddevices.GetKeyAt((int) (0)))),(int) (1));
}
catch (Exception e21) {
ba.setLastException(e21); //BA.debugLineNum = 687;BA.debugLine="Msgbox(\"Connecting\",\"Printer Error\") 'Ignore";
__c.Msgbox(BA.ObjectToCharSequence("Connecting"),BA.ObjectToCharSequence("Printer Error"),ba);
//BA.debugLineNum = 688;BA.debugLine="printer.Close";
_printer.Close();
//BA.debugLineNum = 689;BA.debugLine="cmp20.Disconnect";
_cmp20.Disconnect();
};
}else {
//BA.debugLineNum = 692;BA.debugLine="L.Initialize";
_l.Initialize();
//BA.debugLineNum = 693;BA.debugLine="For i = 0 To PairedDevices.Size - 1";
{
final int step27 = 1;
final int limit27 = (int) (_paireddevices.getSize()-1);
_i = (int) (0) ;
for (;_i <= limit27 ;_i = _i + step27 ) {
//BA.debugLineNum = 694;BA.debugLine="L.Add(PairedDevices.GetKeyAt(i))";
_l.Add(_paireddevices.GetKeyAt(_i));
}
};
//BA.debugLineNum = 696;BA.debugLine="resimp = InputList(L, \"Choose device\", -1) 'Igno";
_resimp = __c.InputList(_l,BA.ObjectToCharSequence("Choose device"),(int) (-1),ba);
//BA.debugLineNum = 697;BA.debugLine="If resimp <> DialogResponse.CANCEL Then";
if (_resimp!=__c.DialogResponse.CANCEL) {
//BA.debugLineNum = 698;BA.debugLine="cmp20.Connect(PairedDevices.Get(L.Get(resimp)))";
_cmp20.Connect(ba,BA.ObjectToString(_paireddevices.Get(_l.Get(_resimp))));
};
};
//BA.debugLineNum = 701;BA.debugLine="End Sub";
return "";
}
public String _tar_click() throws Exception{
//BA.debugLineNum = 450;BA.debugLine="Sub Tar_Click";
//BA.debugLineNum = 451;BA.debugLine="B4XPages.ShowPage(\"Nota\")";
_b4xpages._showpage /*String*/ (ba,"Nota");
//BA.debugLineNum = 452;BA.debugLine="End Sub";
return "";
}
public String _tar_longclick() throws Exception{
//BA.debugLineNum = 454;BA.debugLine="Sub Tar_LongClick";
//BA.debugLineNum = 455;BA.debugLine="p_abono.Visible = True";
_p_abono.setVisible(__c.True);
//BA.debugLineNum = 456;BA.debugLine="End Sub";
return "";
}
public String _tels_click() throws Exception{
//BA.debugLineNum = 420;BA.debugLine="Sub Tels_Click";
//BA.debugLineNum = 421;BA.debugLine="B4XPages.ShowPage(\"NoVenta\")";
_b4xpages._showpage /*String*/ (ba,"NoVenta");
//BA.debugLineNum = 422;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
if (BA.fastSubCompare(sub, "B4XPAGE_CREATED"))
return _b4xpage_created((anywheresoftware.b4a.objects.B4XViewWrapper) args[0]);
if (BA.fastSubCompare(sub, "GPS_LOCATIONCHANGED"))
return _gps_locationchanged((anywheresoftware.b4a.gps.LocationWrapper) args[0]);
if (BA.fastSubCompare(sub, "JOBDONE"))
return _jobdone((keymon.lat.medicomed.httpjob) args[0]);
return BA.SubDelegator.SubNotFound;
}
}