This commit is contained in:
2023-10-16 19:11:15 -06:00
parent eb76cd60b7
commit 14d09de64d
388 changed files with 2 additions and 9957 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
**/Objects
**/AutoBackups
*/AutoBackups

View File

@@ -1,530 +0,0 @@
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Class
Version=9.85
@EndOfDesignText@
#Region Shared Files
'Ctrl + click to sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
'###########################################################################################################
'###################### PULL #############################################################
'Ctrl + click ide://run?file=%WINDIR%\System32\cmd.exe&Args=/c&Args=git&Args=pull
'###########################################################################################################
'###################### PUSH #############################################################
'Ctrl + click ide://run?file=%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe&Args=github&Args=..\..\
'###########################################################################################################
'###################### PUSH TORTOISE GIT #########################################################
'Ctrl + click ide://run?file=%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe&Args=TortoiseGitProc&Args=/command:commit&Args=/path:"./../../"&Args=/closeonend:2
'###########################################################################################################
#End Region
Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Public login As B4XMainPage
Dim rp As RuntimePermissions
Public principal As C_Principal 'Antes seleccion
Public clientes As C_Clientes 'Antes Colonia
Public cliente As C_Cliente 'Antes fila
' Public productos As C_Productos 'Antes colonia2
' Public updateAvailable As C_updateAvailable
'' Public mapas As C_Mapas
'' Public nuevoCliente As C_NuevoCliente
' Public ticketsDia As C_TicketsDia 'Antes buscar
Public noVenta As C_NoVenta 'Antes nopago
Public nota As C_Nota 'Antes tarjeta
' Public promos As C_Promos
Public historico As C_Historico 'Antes historico
Dim reqManager As DBRequestManager
Dim ultimaActualizacionGPS As String = 235959
Dim almacen, ruta As String
Dim user As EditText
Dim pass As EditText
Dim c As Cursor
Dim D As Cursor
Dim existe As String
Dim paso1 As String
Dim IMEI As String
Dim alterno As String
Private b_menu As Button
' Dim PopupMenu As RSPopupMenu
Dim cmd As DBCommand
Private IMEN As EditText
Private Entrar As Button
Private Panel1 As Panel
Private ImageView4 As ImageView
Private E_SERVER As EditText
Private B_SERVER As Button
Private B_MACIMP As Button
Private CUANTOS As String
Private foto_g () As Byte
Private ListView1 As ListView
Private ImageView1 As ImageView
Private Label1 As Label
Private B_BorrarFinDia As Button
Private b_fdCancelar As Button
Private b_findiaOk As Button
Private p_finDia As Panel
Private et_autSup As EditText
'prueba downloadfile
Dim ProgressBar1 As ProgressBar
Dim Label1 As Label
Dim btnDownload As Button
Dim btnCancel As Button
Private p_download As Panel
Private Label6 As Label
Dim logger As Boolean = True
Dim lat_gps, lon_gps As String
Dim tipo_venta As String
Dim bTerminarClicked As Boolean = False
Private lv_server As ListView
Private l_server As Label
Public rutaBDBackup As String = ""
Private b_envioBD As Button
Dim kh As kms_helperSubs
Private p_login As Panel
Private l_version As Label
End Sub
Public Sub Initialize
B4XPages.GetManager.LogEvents = True
#if not(DEBUG)
Starter.logger = False
#end if
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
If Not(Starter.Logger) Then logger = False
Root = Root1
' Root.LoadLayout("MainPage")
Root.LoadLayout("login")
B4XPages.SetTitle(Me, "Durakelo")
login.Initialize
B4XPages.AddPage("Login", login)
principal.Initialize
B4XPages.AddPage("Principal", principal)
clientes.Initialize
B4XPages.AddPage("Clientes", clientes)
cliente.Initialize
B4XPages.AddPageAndCreate("Cliente", cliente)
' productos.Initialize
' B4XPages.AddPage("Productos", productos)
' updateAvailable.Initialize
' B4XPages.AddPage("updateAvailable", updateAvailable)
' mapas.Initialize
' B4XPages.AddPage("Mapas", mapas)
' nuevoCliente.Initialize
' B4XPages.AddPageAndCreate("NuevoCliente", nuevoCliente)
' ticketsDia.Initialize
' B4XPages.AddPage("TicketsDia", ticketsDia)
noVenta.Initialize
B4XPages.AddPage("NoVenta", noVenta)
nota.Initialize
B4XPages.AddPage("Nota", nota)
' pedidos.Initialize
' B4XPages.AddPage("Pedidos", pedidos)
' promos.Initialize
' B4XPages.AddPage("Promos", promos)
historico.Initialize
B4XPages.AddPage("Historico", historico)
' checklist.Initialize
' B4XPages.AddPage("CheckList", checklist)
' ruta = Starter.ruta
ruta = File.DirInternal
kh.Initialize(Me, "kh")
' If(FirstTime) Then
' g.Initialize("GPS")
' End If
' se crea o no el archivo de la base de ddatos de kmt
'NOTAS SI SE MODIFICA LA ESTRUCTURA SE QUITA EL IF Y SE VA DIRECTO A LA SENTENCIA FILE.COPY PARA QUE
'TOME LA NUEVA ESTRUCTURA ES MUY IMPORTANTE TENER EL IF DE LO CONTRARIO SOLO LO ESCRIBE UNA VEZ Y LO BORRA
'SI SE REGRESA A ESTE ACTIVIDAD.
' Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
' Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
kh.guardaAppInfo(Starter.skmt)
Dim sDate, sTime As String
DateTime.DateFormat = "yyyyMMdd"
sDate=DateTime.Date(DateTime.Now)
Starter.skmt.ExecNonQuery("DROP TABLE IF EXISTS PEDIDO3")
' skmt.ExecNonQuery("DROP VIEW TOTAL_MARCAS")
Starter.skmt.ExecNonQuery("CREATE VIEW IF NOT EXISTS CATALOGO AS Select CAT_GP_CLASIF, CAT_GP_ID FROM CAT_GUNAPROD UNION Select CAT_GP_CLASIF, CAT_GP_ID FROM CAT_GUNAPROD2 GROUP BY CAT_GP_CLASIF, CAT_GP_ID")
Starter.skmt.ExecNonQuery("create view IF NOT EXISTS total_marcas AS Select cat_gp_clasif, sum(pe_costo_tot) As total from CATALOGO, pedido where pe_proid = cat_gp_id And pe_cliente <> 0 group by cat_gp_clasif")
Starter.skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS CAT_EXHIBIDORES (CAT_EX_ID TEXT, CAT_EX_TIPO TEXT, CAT_EX_VALOR TEXT)")
Starter.skmt.ExecNonQuery("CREATE TABLE PEDIDO3 (PE_PRECIO2 TEXT,PE_TIPO TEXT,PE_FOLIO NUMERIC,PE_DESC NUMERIC,PE_COSTO_SIN TEXT,PE_RUTA TEXT,PE_CEDIS TEXT,PE_COSTO_TOT NUMERIC,PE_COSTOU NUMERIC,PE_CANT NUMERIC,PE_PRONOMBRE TEXT,PE_PROID TEXT,PE_CLIENTE TEXT,PE_FECHA TEXT,PE_USUARIO TEXT)")
Starter.skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS RUTA_GPS(FECHA INTEGER, LAT TEXT, LON TEXT)")
If sDate = "20190523" Then
Starter.skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?", Array As Object ("SERVER"))
Starter.skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)", Array As Object ("SERVER",Starter.skmt))
End If
Starter.skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_ENCUESTA (HE_CLIE TEXT, HE_RES TEXT, HE_FECHA TEXT, HE_TIPO TEXT)")
Starter.skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_ENCUESTA2 (HE_CLIE TEXT, HE_RES TEXT, HE_FECHA TEXT, HE_TIPO TEXT, HE_PRECIO TEXT)")
Starter.skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS CAT_ENCUESTA_PREGUNTA (CAT_EP_ID TEXT,CAT_EP_IDTIPOPREGUNTA TEXT,CAT_CE_DESCRIPCION TEXT,CAT_EP_PREGUNTA TEXT,CAT_EP_RES1_PRED TEXT,CAT_EP_RES2_PRED TEXT,CAT_EP_RES3_PRED TEXT,CAT_EP_ORDEN_PREGUNTA TEXT)")
Starter.skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS CAT_ENCUESTA_PREGUNTA5P (CAT_EP_ID TEXT,CAT_EP_IDTIPOPREGUNTA TEXT,CAT_CE_DESCRIPCION TEXT,CAT_EP_PREGUNTA TEXT,CAT_EP_RES1_PRED TEXT,CAT_EP_RES2_PRED TEXT,CAT_EP_RES3_PRED TEXT,CAT_EP_ORDEN_PREGUNTA TEXT)")
c=Starter.skmt.ExecQuery2("select count(*) as CUANTOS from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("SERVER"))
c.Position =0
If c.GetString("CUANTOS") = 0 Then
Starter.skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)", Array As Object ("SERVER",Starter.DBReqServer))
Else
c=Starter.skmt.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("SERVER"))
c.Position =0
Starter.DBReqServer = c.GetString("CAT_VA_VALOR")
End If
Dim P As PhoneId
'user.Text = P.GetDeviceId
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_READ_PHONE_STATE)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
Dim P As PhoneId
'user.Text = P.GetDeviceId
IMEI = P.GetDeviceId
IMEI = ""
Else
If logger Then Log("Sin permisos para leer los datos del celular")
End If
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_ACCESS_FINE_LOCATION)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
StartService(Tracker)
Log("Start Tracker")
End If
p_login.Height = Root.Height
p_login.Width = Root.Width
End Sub
Sub B4XPage_Appear
l_version.Text = Application.VersionName
' copiaDB
' server = "http://10.0.0.205:1782"
reqManager.Initialize(Me, Starter.DBReqServer)
Log(Starter.DBReqServer)
' If g.GPSEnabled=False Then
' ToastMessageShow("Habilitar el GPS", True)
' StartActivity(g.LocationSettingsIntent)
' Else
' g.Start(0,0)
' End If
' user.Text ="GPS"
c = Starter.skmt.ExecQuery2("select count(*) as CUANTOS from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("FECHA"))
c.Position =0
If c.GetString("CUANTOS") = 0 Then
cmd.Initialize
cmd.Name = "select_fechat"
reqManager.ExecuteQuery(cmd , 0, "fecha")
'Msgbox("AJUSTAR FECHA","AVISO")
B4XPage_Appear
Else
c = Starter.skmt.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("FECHA"))
c.Position =0
Dim sDate,sTime As String
DateTime.dateFormat = "yyyyMMddHHmm"
sDate=DateTime.Date(DateTime.Now)
'Msgbox("aaa"& sDate,"aviso")
If c.GetString("CAT_VA_VALOR") > sDate & sTime Then
' Msgbox("AJUSTAR LA FECHA YA QUE ES MENOR AL SISTEMA " & " "& c.GetString("CAT_VA_VALOR") & " " & sDate & sTime ,"AVISO")
DateTime.TimeFormat = "MM/dd/yyyyHH:mm:ss"
B4XPage_Appear
End If
DateTime.TimeFormat = "MM/dd/yyyyHH:mm:ss"
End If
c.Close
c = Starter.skmt.ExecQuery2("select count(*) as CUANTOS from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("CODIGO"))
c.Position =0
CUANTOS = c.GetString("CUANTOS")
c.Close
If CUANTOS > 0 Then
c = Starter.skmt.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("CODIGO"))
c.Position =0
If c.GetString("CAT_VA_VALOR") = "743" Then
Entrar.Visible = True
End If
c.Close
Else
Starter.skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)", Array As Object ("CODIGO","0"))
End If
c=Starter.skmt.ExecQuery2("select COUNT(*) AS CUANTOS from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("MACIMP"))
c.Position =0
If c.GetString("CUANTOS") = 0 Then
Starter.skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)", Array As Object ("MACIMP","0"))
End If
c=Starter.skmt.ExecQuery("select COUNT(*) AS CUANTOS FROM VERSION")
c.Position= 0
If c.GetString("CUANTOS") = 0 Then
Starter.skmt.ExecNonQuery("delete from VERSION")
Starter.skmt.ExecNonQuery2("INSERT INTO VERSION(NOVERSION) VALUES (?)", Array As Object ("2.6"))
End If
c.Close
c=Starter.skmt.ExecQuery("select NOVERSION FROM VERSION")
c.Position = 0
If c.GetString("NOVERSION") <> "2.6" Then
' Msgbox("VERSION INCORRECTA SOLICITAR O DESCARGAR LA NUEVA","ALERTA")
B4XPage_Appear
End If
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_ACCESS_FINE_LOCATION)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
StartService(Tracker)
If logger Then Log("Start Tracker")
Else
ToastMessageShow("No permission", True)
End If
Starter.usuario = kh.traeUsuarioDeDB(Starter.skmt)
' dameUsuario 'Obtenemos el usuario registrado
CallSubDelayed(FirebaseMessaging, "SubscribeToTopics")
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Sub Entrar_Click
If user.Text = "ROOT" Then
Starter.skmt.ExecNonQuery("delete from usuarioa")
Starter.skmt.ExecNonQuery2("INSERT INTO USUARIOA VALUES (?,?)", Array As Object(user.Text, pass.Text))
Starter.skmt.ExecNonQuery("delete from cat_almacen")
Starter.skmt.ExecNonQuery2("INSERT INTO CAT_ALMACEN(ID_ALMACEN) VALUES (?)", Array As Object (pass.Text))
B4XPages.ShowPage("Principal")
End If
c=Starter.skmt.ExecQuery2("select count(*) as EXISTE1 from usuarioa where usuario = ?", Array As String(user.Text))
c.Position=0
existe = c.GetString("EXISTE1")
'existe = 1
If existe = 0 Then
'skmt.ExecNonQuery("delete from usuarioa")
Dim cmd As DBCommand
cmd.Initialize
cmd.Name = "select_usuario_guna_DUR"
cmd.Parameters = Array As Object(user.Text, pass.Text)
reqManager.ExecuteQuery(cmd , 0, "usuario")
Dim cmd As DBCommand
cmd.Initialize
cmd.Name = "select_version_DUR"
reqManager.ExecuteQuery(cmd , 0, "version")
Else
B4XPages.ShowPage("Principal")
End If
End Sub
Sub JobDone(Job As HttpJob)
If Job.Success = False Then
ToastMessageShow("Error: " & Job.ErrorMessage, True)
Else
If Job.JobName = "DBRequest" Then
Dim result As DBResult = reqManager.HandleJob(Job)
If result.Tag = "version" Then 'query tag
For Each records() As Object In result.Rows
Starter.skmt.ExecNonQuery("delete from VERSION")
Dim CAT_VE_VERSION As String = records(result.Columns.Get("CAT_VE_VERSION"))
Starter.skmt.ExecNonQuery2("INSERT INTO VERSION(NOVERSION) VALUES (?)", Array As Object (CAT_VE_VERSION))
If CAT_VE_VERSION <> "2.6" Then
Msgbox("VERSION INCORRECTA SOLICITAR O DESCARGAR LA NUEVA","ALERTA")
B4XPage_Appear
End If
Next
End If
End If
If Job.JobName = "DBRequest" Then
Dim result As DBResult = reqManager.HandleJob(Job)
If result.Tag = "agencia" Then 'query tag
For Each records() As Object In result.Rows
Dim ID_ALMACEN As String = records(result.Columns.Get("ID_ALMACEN"))
Next
End If
End If
If Job.JobName = "DBRequest" Then
Dim result As DBResult = reqManager.HandleJob(Job)
If result.Tag = "fecha" Then 'query tag
For Each records() As Object In result.Rows
Dim FECHA_HOY As String = records(result.Columns.Get("FECHA"))
Starter.skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?", Array As Object ("FECHA"))
Starter.skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)", Array As Object ("FECHA",FECHA_HOY))
Next
End If
End If
If Job.JobName = "DBRequest" Then
Dim result As DBResult = reqManager.HandleJob(Job)
If result.Tag = "usuario" Then 'query tag
For Each records() As Object In result.Rows
Dim name As String = records(result.Columns.Get("USUARIO"))
Dim ID_ALMACEN As String = records(result.Columns.Get("CAT_LO_AGENCIA"))
' Dim IMEI_BASE As String = records(result.Columns.Get("CAT_LO_IDTELEFONO"))
Next
paso1 = 1
End If
End If
Job.Release
End If
If paso1 =1 Then
If name = "OKActivo" & IMEI Then
Starter.skmt.ExecNonQuery("delete from usuarioa")
Starter.skmt.ExecNonQuery2("INSERT INTO USUARIOA VALUES (?,?)", Array As Object(user.Text, pass.Text))
Starter.skmt.ExecNonQuery("delete from cat_almacen")
Starter.skmt.ExecNonQuery2("INSERT INTO CAT_ALMACEN(ID_ALMACEN) VALUES (?)", Array As Object (ID_ALMACEN))
Starter.skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?", Array As Object ("NUMERO_PEDIDO"))
Starter.skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)", Array As Object ("NUMERO_PEDIDO",0))
B4XPages.ShowPage("Principal")
Else If name = "OKExpirado"& IMEI Then
Msgbox("Usuario Expirado llamar al administrador","")
Else If name = "OKCancelado"& IMEI Then
Msgbox("Usuario Cancelado llamar al administrador","")
Else
Msgbox("Usuario o password No validos","")
End If
paso1 = 0
End If
End Sub
Sub Activity_KeyPress (key As Int) As Boolean
' BACK key pressed
If key=KeyCodes.KEYCODE_BACK Then
' I want to capture the key here so I return True
'StartActivity(Main)
ExitApplication
'Return True
End If
' Returning False signals the system to handle the key
Return False
End Sub
Sub GPS_LocationChanged (Location1 As Location)
If user.text = "GPS" Then
'user.Text=Location1.ConvertToMinutes(Location1.Latitude)
'pass.text=Location1.ConvertToMinutes(Location1.Longitude)
user.Text=Location1.Latitude
pass.text=Location1.Longitude
'btnTakePicture.Enabled = True
's.ExecNonQuery2("INSERT INTO HIST_GPS (HGDATE,HGLAT, HGLON) VALUES(?,?,?) ", Array As Object (sDate & sTime, lat_gps, lon_gps))
End If
End Sub
Sub PopupMenu_MenuItemClick (ItemId As Int) As Boolean
ToastMessageShow("Item " & ItemId & " clicked.", False)
Return False
End Sub
Sub PDF_Click
End Sub
Sub user_EnterPressed
If user.Text = "CODIGO" Then
IMEN.Visible = True
user.Text = ""
End If
End Sub
Sub ImageView4_Click
Entrar.Visible = False
ListView1.Clear
Dim Label1 As Label
Label1 = ListView1.SingleLineLayout.Label
Label1.TextSize = 20
Label1.TextColor = Colors.Black
ListView1.AddSingleLine(Starter.DBReqServer)
c=Starter.skmt.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("SERVER"))
c.Position =0
E_SERVER.text = c.GetString("CAT_VA_VALOR")
' Panel1.Visible = True
kh.panelVisible(Panel1, 0, 0)
End Sub
Sub B_SERVER_Click
Starter.skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?", Array As Object ("SERVER"))
Starter.skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)", Array As Object ("SERVER",E_SERVER.text))
reqManager.Initialize(Me, E_SERVER.text.trim)
Starter.DBReqServer = E_SERVER.text.trim
Panel1.Visible = False
Entrar.Visible = True
End Sub
Sub B_FECHA_Click
Starter.skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?", Array As Object ("FECHA"))
Starter.skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?", Array As Object ("MACIMP"))
Starter.skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)", Array As Object ("MACIMP","0"))
Panel1.Visible = False
End Sub
Sub ListView1_ItemClick (Position As Int, Value As Object)
E_SERVER.text = Value
End Sub
Sub B_IMPRESORA_Click
Starter.skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?", Array As Object ("MACIMP"))
Starter.skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)", Array As Object ("MACIMP","0"))
Panel1.Visible = False
End Sub
Sub dameUsuario
c=Starter.skmt.ExecQuery("select count(*) as EXISTE1 from usuarioa")
c.Position=0
existe = c.GetString("EXISTE1")
c.Close
If existe > 0 Then
c=Starter.skmt.ExecQuery("select USUARIO from usuarioa")
c.Position=0
Starter.usuario = c.GetString("USUARIO")
Else
Starter.usuario = "SINUSUARIO"
End If
End Sub
'Copia la base de datos del almacenamiento interno al externo en el directorio kmts
Sub copiaDB
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
Dim theDir As String
Try
File.MakeDir(File.DirRootExternal,"kmts")
theDir = "/kmts"
Catch
theDir = ""
End Try
Try
File.Copy(File.DirInternal,"kmt.db",File.DirRootExternal&theDir,"dura_kmt.db")
ToastMessageShow("Listo, copiada a " & File.DirRootExternal&theDir & "/dura_kmt.db", False)
LogColor("copiado", Colors.red)
Catch
ToastMessageShow("No se pudo hacer la copia: "&LastException, True)
LogColor("no copiado", Colors.red)
End Try
' Log("rootExternal="&p)
' Log("File.DirInternal="&File.DirInternal)
' Log("File.DirRootExternal="&File.DirRootExternal)
Else
ToastMessageShow("Sin permisos", True)
End If
End Sub

View File

@@ -1,126 +0,0 @@
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Class
Version=10.2
@EndOfDesignText@
'Class module
Sub Class_Globals
Private nativeMe As JavaObject
End Sub
'Initializes the object.
Public Sub Initialize
nativeMe = Me
End Sub
'Return information about the battery status. It returns the following 11 values in an integer Array:
'EXTRA_LEVEL = current battery level, from 0 To EXTRA_SCALE.
'EXTRA_SCALE = the maximum battery level possible.
'EXTRA_HEALTH = the current health constant.
'EXTRA_ICON_SMALL = the resource ID of a small status bar icon indicating the current battery state.
'EXTRA_PLUGGED = whether the device is plugged into a Power source; 0 means it is on battery, other constants are different types of Power sources.
'EXTRA_STATUS = the current status constant.
'EXTRA_TEMPERATURE = the current battery temperature.
'EXTRA_VOLTAGE = the current battery voltage level.
'A value indicating if the battery is being charged or fully charged (If neither it returns 0 Else it returns 1)
'A value indicating if it is charging via USB (0 = Not USB, 2 = USB)
'A value indicating if it is charging via AC (0 = Not AC, 1 = AC)
Public Sub getBatteryInformation () As Int()
Dim batteryInfo(11) As Int
batteryInfo = nativeMe.RunMethod("getBatteryInformation",Null)
Return batteryInfo
End Sub
Public Sub getBatteryTechnolgy() As String
Dim batterytech As String
batterytech = nativeMe.RunMethod("getBatteryTechnology",Null)
Return batterytech
End Sub
#If Java
import android.os.BatteryManager;
import android.os.Bundle;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
public int[] getBatteryInformation() {
int[] mybat = new int[11];
Intent batteryIntent = ba.context.getApplicationContext().registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
int level = batteryIntent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
mybat[0] = level;
int scale = batteryIntent.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
mybat[1] = scale;
int health = batteryIntent.getIntExtra(BatteryManager.EXTRA_HEALTH,-1);
mybat[2] = health;
int icon_small = batteryIntent.getIntExtra(BatteryManager.EXTRA_ICON_SMALL,-1);
mybat[3] = icon_small;
int plugged = batteryIntent.getIntExtra(BatteryManager.EXTRA_PLUGGED,-1);
mybat[4] = plugged;
// boolean present = batteryIntent.getExtras().getBoolean(BatteryManager.EXTRA_PRESENT);
int status = batteryIntent.getIntExtra(BatteryManager.EXTRA_STATUS,-1);
mybat[5] = status;
// String technology = batteryIntent.getExtras().getString(BatteryManager.EXTRA_TECHNOLOGY);
// BA.Log("Technology = " + technology);
int temperature = batteryIntent.getIntExtra(BatteryManager.EXTRA_TEMPERATURE,-1);
mybat[6] = temperature;
int voltage = batteryIntent.getIntExtra(BatteryManager.EXTRA_VOLTAGE,-1);
mybat[7] = voltage;
// int ac = batteryIntent.getIntExtra("plugged",BatteryManager.BATTERY_PLUGGED_AC);
// mybat[8] = ac;
// int usb = batteryIntent.getIntExtra("plugged",BatteryManager.BATTERY_PLUGGED_USB);
// mybat[9] = usb;
boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
status == BatteryManager.BATTERY_STATUS_FULL;
mybat[8] = 0;
if (isCharging == true) {
mybat[8] = 1;
}
// How are we charging?
mybat[9] = 0;
mybat[10] = 0;
int chargePlug = batteryIntent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
boolean usbCharge = chargePlug == BatteryManager.BATTERY_PLUGGED_USB;
if (usbCharge == true) {
mybat[9] = 2;
}
boolean acCharge = chargePlug == BatteryManager.BATTERY_PLUGGED_AC;
if (acCharge == true) {
mybat[10] = 1;
}
return mybat;
}
public String getBatteryTechnology() {
Intent batteryIntent = ba.context.getApplicationContext().registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
String technology = batteryIntent.getExtras().getString(BatteryManager.EXTRA_TECHNOLOGY);
return technology;
}
#End If

File diff suppressed because it is too large Load Diff

View File

@@ -1,213 +0,0 @@
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Class
Version=11.5
@EndOfDesignText@
Sub Class_Globals
Private Root As B4XView 'ignore
Private xui As XUI 'ignore
'//Process Globals
Dim ruta As String
Dim q_buscar As String
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim skmt As SQL
Dim c As Cursor
Dim c2 As Cursor
Dim s As Cursor
Dim ListView1 As ListView
Dim entro As String
Dim gest As Button
Dim lfila As Label
Dim busca As EditText
Dim colonia As String
Private b_qr As Button
Private qr As QRCode
' Dim sc As Zxing_scanner
Dim CODIGO As String
End Sub
Sub initialize
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Root = Root1
Root.LoadLayout("Clientes")
entro ="2"
' valido donde escribo el archivo de la base de datos de kmt
ruta = File.DirInternal
If File.Exists(ruta, "kmt.db") = False Then
File.Copy(File.DirAssets, "kmt.db", ruta, "kmt.db")
End If
' qr.initialize
End Sub
Sub B4XPage_Appear
b_qr.Visible = False ' No usamos el lector QR en esta app - CHV
busca.Text = ""
skmt.Initialize(ruta,"kmt.db", True)
entro ="2"
colonia = 0
' esto es para rutas se quito por colonia c=skmt.ExecQuery("select CAT_CL_RUTA, count(*) as cuantos from kmt_info where gestion = 0 group by CAT_CL_RUTA order by CAT_CL_RUTA asc")
'SE COMENTA EL SIGUIENTE CODIGO PARA QUE TODAS LAS TIENDAS APARESCAN.
' c=skmt.ExecQuery("select CAT_CL_COLONIA, count(*) as cuantos from kmt_info where gestion = 0 group by CAT_CL_COLONIA order by CAT_CL_COLONIA asc")
c=skmt.ExecQuery("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO,CAT_CL_NUM_SERIEFISICO from kmt_info where gestion = 0 and cat_cl_codigo <> 0 ORDER BY CAST(CAT_CL_NUM_SERIEFISICO AS DECIMAL)")
ListView1.Clear
lfila.Text = "NOMBRE"
If c.RowCount>0 Then
For i=0 To c.RowCount -1
c.Position=i
Dim label1 As Label
label1 = ListView1.TwoLinesLayout.Label
label1.TextSize = 10
label1.TextColor = Colors.Black
Dim label2 As Label
label2 = ListView1.TwoLinesLayout.SecondLabel
label2.TextSize = 10
label2.TextColor = Colors.Black
ListView1.AddTwoLines(c.GetString("CAT_CL_CODIGO"), c.GetString("CAT_CL_NUM_SERIEFISICO") & " " & c.GetString("CAT_CL_NOMBRE"))
Next
End If
entro = "4"
' ESTE FUE EL FIN DEL CODIGO COMENTADO
End Sub
Sub ListView1_ItemClick (Position As Int, Value As Object)
If colonia = 0 Then
colonia = Value
End If
If entro = "2" Then
c2=skmt.ExecQuery2("select CAT_CL_CALLE, CAT_CL_COLONIA, count(*) as cuantos from kmt_info where gestion = 0 and CAT_CL_COLONIA = ? GROUP BY CAT_CL_CALLE, CAT_CL_COLONIA order by CAT_CL_CALLE ", Array As String(Value))
ListView1.Clear
lfila.text = "Calle"
If c2.RowCount>0 Then
For i=0 To c2.RowCount -1
c2.Position=i
ListView1.AddTwoLines(c2.GetString("CAT_CL_CALLE"),c2.GetString("cuantos") )
Next
End If
entro = "3"
Else If entro = "3" Then
c2=skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where gestion = 0 and CAT_CL_CALLE = ? AND CAT_CL_COLONIA = ? order by CAT_CL_NOMBRE ", Array As String(Value, colonia))
ListView1.Clear
lfila.text = "Nombre"
If c2.RowCount>0 Then
For i=0 To c2.RowCount -1
c2.Position=i
ListView1.AddTwoLines(c2.GetString("CAT_CL_CODIGO"), c2.GetString("CAT_CL_NOMBRE"))
Next
End If
entro = "4"
Else If entro = "4" Then
skmt.ExecNonQuery("delete from CUENTAA")
skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object(Value))
' StartActivity(fila)
B4XPages.ShowPage("Cliente")
End If
End Sub
Sub Activity_KeyPress (key As Int) As Boolean
' BACK key pressed
If key=KeyCodes.KEYCODE_BACK Then
' If entro = "3" Then
'entro = "2"
'B4XPage_Appear
'Return True
'Else If entro = "2" Then
'entro = "1"
'B4XPage_Appear
'Return True
'Else If entro = "1" Then
' I want to capture the key here so I return True
' StartActivity(seleccion)
B4XPages.ShowPage("Principal")
Return False
'End If
End If
' Returning False signals the system to handle the key
End Sub
Sub BUSCA_TextChanged (Old As String, New As String)
q_buscar = "%" & busca.Text & "%"
skmt.Initialize(ruta,"kmt.db", True)
c2=skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where (CAT_CL_NOMBRE like ? OR CAT_CL_CODIGO LIKE ?)and gestion = 0 order by CAT_CL_NOMBRE ", Array As String(q_buscar,q_buscar))
ListView1.Clear
lfila.text = "Nombre y Calle"
If c2.RowCount>0 Then
For i=0 To c2.RowCount -1
c2.Position=i
Dim label1 As Label
label1 = ListView1.TwoLinesLayout.Label
label1.TextSize = 10
label1.TextColor = Colors.White
Dim label2 As Label
label2 = ListView1.TwoLinesLayout.SecondLabel
label2.TextSize = 10
label2.TextColor = Colors.White
ListView1.AddTwoLines(c2.GetString("CAT_CL_CODIGO"), c2.GetString("CAT_CL_NOMBRE") &" CALLE: "& c2.GetString("CAT_CL_CALLE"))
Next
End If
entro = "4"
c2.Close
End Sub
Sub b_qr_Click
'StartActivity(QR_MODULE)
Dim scan_width As Int
Dim scan_height As Int
scan_width = 400
scan_height = 400
' sc.BeginScan("sc","CODIGO CLIENTE",scan_width,scan_height)
End Sub
Sub sc_result(atype As String,Values As String)
'Log("Type : " & atype)
'Log("Value : " & Values)
CODIGO = Values
c2=skmt.ExecQuery2("select COUNT(*) AS ENCONTRADO from kmt_info where CAT_CL_NUM_SERIEFISICO = ? order by CAT_CL_NOMBRE ", Array As String(CODIGO))
c2.Position =0
If c2.GetString("ENCONTRADO") > 0 Then
s=skmt.ExecQuery2("select CAT_CL_CODIGO from kmt_info where CAT_CL_NUM_SERIEFISICO = ? order by CAT_CL_NOMBRE ", Array As String(CODIGO))
s.Position =0
skmt.ExecNonQuery("delete from CUENTAA")
skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object(s.GetString("CAT_CL_CODIGO")))
s.Close
b_qr.Visible = False
' StartActivity(fila)
Else
Msgbox("CODIGO " & CODIGO & " NO ENCONTRADO","AVISO")
End If
End Sub
Sub sc_noScan
Log("nothing returned from the scan !!!!!")
End Sub
Sub calc_ean_checksum(number As String) As String 'this has now become redundant as I am only interested in QR Codes
Dim i As Int
Dim cO As Char
Dim soma As Int
Dim n As Int
Dim digit As Float
soma = 0
For i=0 To number.Length - 1
digit = number.SubString2(i,i+1)
n= digit * ((i Mod 2) * 2 + 1)
soma=soma+n
Next
Return number & ( ( 10 - ( soma Mod 10 )) Mod 10 )
End Sub

View File

@@ -1,148 +0,0 @@
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Class
Version=11.5
@EndOfDesignText@
Sub Class_Globals
Private Root As B4XView 'ignore
Private xui As XUI 'ignore
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
' Dim skmt As SQL
Dim g As GPS
Dim clie_id As String
Dim sDate,sTime As String
Dim usuario As String
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim c As Cursor
Dim ruta As String
Dim Regresar As Button
Dim ListView1 As ListView
Dim L_CANT As Label
Dim L_TOTAL As Label
Dim borra As Button
Dim Existe As String
Dim result As String
' Dim lat_gps, lon_gps As String
Private Titulo As Label
Private b_desc As Button
Private ListView2 As ListView
Private B_RMI As Button
End Sub
Sub initialize
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("Historico")
borra.Visible = False
Titulo.Text = "Acumulado"
b_desc.Visible = False
g.Initialize("gps")
End Sub
Sub B4XPage_Appear
B_RMI.Visible = True
If g.GPSEnabled=False Then
ToastMessageShow("Habilitar el GPS", True)
StartActivity(g.LocationSettingsIntent)
Else
g.Start(0,0)
End If
L_CANT.Text =""
L_TOTAL.Text=""
c=Starter.skmt.ExecQuery("select count(*) as EXISTE from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa)")
C.Position=0
Existe = C.GetString("EXISTE")
C.Close
c=Starter.skmt.ExecQuery("select HVD_CLIENTE,HVD_PRONOMBRE,HVD_CANT,HVD_COSTO_TOT, HVD_FECHA from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) order by HVD_FECHA asc")
ListView1.Clear
If c.RowCount>0 Then
For i=0 To c.RowCount -1
c.Position=i
Dim label1 As Label
label1 = ListView1.TwoLinesLayout.Label
label1.TextSize = 15
label1.TextColor = Colors.Black
Dim label2 As Label
label2 = ListView1.TwoLinesLayout.SecondLabel
label2.TextSize = 10
label2.TextColor = Colors.Blue
ListView1.AddTwoLines(c.GetString("HVD_PRONOMBRE"),"Cantidad #"& c.GetString("HVD_CANT")& " SubTotal $"& c.GetString("HVD_COSTO_TOT")& " FECHA " &c.GetString("HVD_FECHA") )
Next
End If
If Existe <> 0 Then
c=Starter.skmt.ExecQuery("select SUM(HVD_CANT) AS PC_NOART, SUM(HVD_COSTO_TOT) AS PC_MONTO from HIST_VENTAS where HVD_CLIENTE in (Select CUENTA from cuentaa)")
C.Position=0
L_CANT.Text = c.GetString("PC_NOART")
L_TOTAL.Text = c.GetString("PC_MONTO")
End If
'la_no_ird.Text = c.GetString("PR_CF_SALDO_ACORT")
End Sub
Sub GPS_LocationChanged (Location1 As Location)
'lat_gps=Location1.ConvertToSeconds(Location1.Latitude)
'lon_gps=Location1.ConvertToSeconds(Location1.Longitude)
End Sub
Sub Regresar_Click
B_RMI.Visible = False
' StartActivity(fila)
B4XPages.ShowPage("Cliente")
End Sub
Sub Activity_KeyPress (key As Int) As Boolean
' BACK key pressed
If key=KeyCodes.KEYCODE_BACK Then
' I want to capture the key here so I return True
' StartActivity(seleccion)
'Return True
End If
' Returning False signals the system to handle the key
Return False
End Sub
Sub ListView2_ItemClick (Position As Int, Value As Object)
ListView2.Visible = False
ListView1.Visible = True
End Sub
Sub ListView1_ItemClick (Position As Int, Value As Object)
ListView2.Visible = True
ListView1.Visible = False
Dim label1 As Label
ListView2.Clear
For i=0 To 20
label1 = ListView2.SingleLineLayout.Label
label1.TextSize = 15
label1.TextColor = Colors.Black
ListView2.AddSingleLine(i)
Next
End Sub
Sub B_RMI_Click
c=Starter.skmt.ExecQuery("select HR_CLIENTE,HR_PRONOMBRE,HR_CANT from HIST_RMI WHERE HR_CLIENTE IN (Select CUENTA from cuentaa)")
ListView1.Clear
If c.RowCount > 0 Then
For i=0 To c.RowCount -1
c.Position=i
Dim label1 As Label
label1 = ListView1.TwoLinesLayout.Label
label1.TextSize = 15
label1.TextColor = Colors.Black
Dim label2 As Label
label2 = ListView1.TwoLinesLayout.SecondLabel
label2.TextSize = 10
label2.TextColor = Colors.Blue
ListView1.AddTwoLines(c.GetString("HR_PRONOMBRE"),"Cantidad #"& c.GetString("HR_CANT") )
Next
End If
End Sub

View File

@@ -1,6 +0,0 @@
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Class
Version=11.5
@EndOfDesignText@

View File

@@ -1,95 +0,0 @@
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Class
Version=11.5
@EndOfDesignText@
Sub Class_Globals
Private Root As B4XView 'ignore
Private xui As XUI 'ignore
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim g As GPS
Dim ruta As String
Dim skmt As SQL
Dim c As Cursor
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim CANCELA As Button
Dim GUARDA As Button
Dim r_1 As RadioButton
Dim r_2 As RadioButton
Dim r_3 As RadioButton
Dim e_comm As EditText
Dim motivo As String
Dim cuenta As String
Dim usuario As String
Dim sDate,sTime As String
' Dim lat_gps, lon_gps As String
Dim r_4 As RadioButton
End Sub
Sub initialize
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("NoVenta")
g.Initialize("gps")
End Sub
Sub B4XPage_Appear
e_comm.Text = ""
If g.GPSEnabled = False Then
ToastMessageShow("Habilitar el GPS", True)
StartActivity(g.LocationSettingsIntent)
Else
g.Start(0,0)
End If
End Sub
Sub GPS_LocationChanged (Location1 As Location)
'lat_gps=Location1.ConvertToSeconds(Location1.Latitude)
'lon_gps=Location1.ConvertToSeconds(Location1.Longitude)
End Sub
Sub CANCELA_Click
' StartActivity(fila)
B4XPages.ShowPage("Cliente")
End Sub
Sub GUARDA_Click
If r_1.Checked Then
motivo = "CERRADO"
Else If r_2.Checked Then
motivo = "NO COMPRA"
Else If r_3.Checked Then
motivo = "CON PRODUCTO"
Else
motivo = "NO ESTA EL ENCARGADO"
End If
DateTime.DateFormat = "MM/dd/yyyy"
sDate=DateTime.Date(DateTime.Now)
sTime=DateTime.Time(DateTime.Now)
c=Starter.skmt.ExecQuery("select CUENTA from cuentaa")
c.Position = 0
cuenta = c.GetString("CUENTA")
c=Starter.skmt.ExecQuery("select usuario from usuarioa")
c.Position = 0
usuario = c.GetString("USUARIO")
c=Starter.skmt.ExecQuery("select PE_PROID,PE_CANT FROM PEDIDO where pe_cliente in (Select CUENTA from cuentaa) ")
If c.RowCount>0 Then
For i=0 To c.RowCount -1
c.Position=i
Starter.skmt.ExecNonQuery2("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen + ? where cat_gp_id = ?", Array As Object(c.GetString("PE_CANT"),c.GetString("PE_PROID")))
Next
End If
Starter.skmt.ExecNonQuery("delete from pedido_cliente where pc_cliente in (Select CUENTA from cuentaa)")
Starter.skmt.ExecNonQuery("delete from pedido where pe_cliente in (Select CUENTA from cuentaa)")
Starter.skmt.ExecNonQuery2("INSERT INTO NOVENTA (NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON) VALUES(?,?,?,?,?,?,?) ", Array As Object (cuenta,sDate & sTime, usuario, motivo,e_comm.text,Starter.lat_gps,Starter.lon_gps))
Starter.skmt.ExecNonQuery("UPDATE kmt_info set gestion = 3 where CAT_CL_CODIGO In (select cuenta from cuentaa)")
' StartActivity(seleccion)
B4XPages.ShowPage("Principal")
End Sub

View File

@@ -1,319 +0,0 @@
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Class
Version=11.5
@EndOfDesignText@
Sub Class_Globals
Private Root As B4XView 'ignore
Private xui As XUI 'ignore
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim skmt As SQL
Dim g As GPS
Dim clie_id As String
Dim sDate,sTime As String
Dim usuario As String
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim c As Cursor
Dim d As Cursor
Dim ruta As String
Dim Regresar As Button
Dim ListView1 As ListView
Dim L_CANT As Label
Dim L_TOTAL As Label
Dim borra As Button
Dim Existe As String
Dim result As String
' Dim lat_gps, lon_gps As String
Dim DESC As String
Private Titulo As Label
Private b_desc As Button
Dim DESCUENTO As String
Dim folio As String
Dim TIPO As String
End Sub
Sub initialize
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Root = Root1
g.Initialize("GPS")
ruta = File.DirInternal
Root.LoadLayout("historico")
borra.Visible = True
Titulo.Text = "Pedido Actual"
Starter.skmt.ExecNonQuery("update pedido set pe_folio = 0 where pe_folio is null")
c=Starter.skmt.ExecQuery("select count(*) as EXISTE from pedido_cliente WHERE pc_cliente IN (Select CUENTA from cuentaa)")
C.Position=0
Existe = C.GetString("EXISTE")
C.Close
c=Starter.skmt.ExecQuery("select PE_PRONOMBRE,PE_COSTO_TOT, PE_CANT, PE_FOLIO FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa) order by PE_PRONOMBRE asc")
ListView1.Clear
If c.RowCount>0 Then
For i=0 To c.RowCount -1
c.Position=i
Dim label1 As Label
label1 = ListView1.TwoLinesLayout.Label
label1.TextSize = 15
label1.TextColor = Colors.Black
Dim label2 As Label
label2 = ListView1.TwoLinesLayout.SecondLabel
label2.TextSize = 10
label2.TextColor = Colors.Blue
ListView1.AddTwoLines(c.GetString("PE_PRONOMBRE"),"Cantidad #"& c.GetString("PE_CANT")& " SubTotal $"& c.GetString("PE_COSTO_TOT")& " Folio "& c.GetString("PE_FOLIO"))
folio = c.GetString("PE_FOLIO")
Next
End If
If Existe <> 0 Then
c=Starter.skmt.ExecQuery("select pc_noart, pc_monto from pedido_cliente where pc_cliente in (Select CUENTA from cuentaa)")
C.Position=0
L_CANT.Text = c.GetString("PC_NOART")
L_TOTAL.Text = c.GetString("PC_MONTO")
End If
End Sub
Sub B4XPage_Appear
If g.GPSEnabled=False Then
ToastMessageShow("Habilitar el GPS", True)
StartActivity(g.LocationSettingsIntent)
Else
g.Start(0,0)
End If
L_CANT.Text =""
L_TOTAL.Text=""
Starter.skmt.ExecNonQuery("update pedido set pe_folio = 0 where pe_folio is null")
c=Starter.skmt.ExecQuery("select count(*) as EXISTE from pedido_cliente WHERE pc_cliente IN (Select CUENTA from cuentaa)")
C.Position=0
Existe = C.GetString("EXISTE")
C.Close
c=Starter.skmt.ExecQuery("select PE_PRONOMBRE,PE_COSTO_TOT, PE_CANT, PE_FOLIO FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa) order by PE_PRONOMBRE asc")
ListView1.Clear
If c.RowCount>0 Then
For i=0 To c.RowCount -1
c.Position=i
Dim label1 As Label
label1 = ListView1.TwoLinesLayout.Label
label1.TextSize = 15
label1.TextColor = Colors.Black
Dim label2 As Label
label2 = ListView1.TwoLinesLayout.SecondLabel
label2.TextSize = 10
label2.TextColor = Colors.Blue
ListView1.AddTwoLines(c.GetString("PE_PRONOMBRE"),"Cantidad #"& c.GetString("PE_CANT")& " SubTotal $"& c.GetString("PE_COSTO_TOT")& " Folio "& c.GetString("PE_FOLIO"))
folio = c.GetString("PE_FOLIO")
Next
End If
If Existe <> 0 Then
c=Starter.skmt.ExecQuery("select pc_noart, pc_monto from pedido_cliente where pc_cliente in (Select CUENTA from cuentaa)")
C.Position=0
L_CANT.Text = c.GetString("PC_NOART")
L_TOTAL.Text = c.GetString("PC_MONTO")
c.Close
c=Starter.skmt.ExecQuery("select SUM(IFNULL(PE_DESC,0)) AS DESCUENTO FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")
c.Position=0
DESC = c.GetString("DESCUENTO")
'If L_TOTAL.Text > 1000 And DESC = 0 Then
'b_desc.Visible = True
'b_desc.Text = "- 5% DESC"
'DESCUENTO = "MENOS"
'Else if L_TOTAL.Text > 1000 Then
'b_desc.Visible = True
'b_desc.Text = "Cancela Desc"
'DESCUENTO = "MAS"
'Else
b_desc.Visible = False
'End If
End If
'la_no_ird.Text = c.GetString("PR_CF_SALDO_ACORT")
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub GPS_LocationChanged (Location1 As Location)
'lat_gps=Location1.ConvertToSeconds(Location1.Latitude)
'lon_gps=Location1.ConvertToSeconds(Location1.Longitude)
End Sub
Sub Regresar_Click
' StartActivity(fila)
B4XPages.ShowPage("Cliente")
End Sub
Sub Activity_KeyPress (key As Int) As Boolean
' BACK key pressed
If key=KeyCodes.KEYCODE_BACK Then
' I want to capture the key here so I return True
' StartActivity(seleccion)
'Return True
End If
' Returning False signals the system to handle the key
Return False
End Sub
Sub borra_Click
If folio <> "" Then
result = Msgbox2("Seguro que desa borrar el pedido?","Cancelar pedido", "Si", "", "No",LoadBitmap(File.DirAssets,"alert2.png")) 'ignore
If result = DialogResponse.POSITIVE Then
c=Starter.skmt.ExecQuery("select PE_PROID,PE_CANT, PE_TIPO FROM PEDIDO where pe_cliente in (Select CUENTA from cuentaa) ")
If c.RowCount>0 Then
For i=0 To c.RowCount -1
c.Position=i
TIPO = c.GetString("PE_TIPO")
If c.GetString("PE_TIPO") = "VENTA" Then
Starter.skmt.ExecNonQuery2("update cat_gunaprod2 set cat_gp_almacen = cat_gp_almacen + ? where cat_gp_id = ?", Array As Object(c.GetString("PE_CANT"),c.GetString("PE_PROID")))
Else
Starter.skmt.ExecNonQuery2("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen + ? where cat_gp_id = ?", Array As Object(c.GetString("PE_CANT"),c.GetString("PE_PROID")))
End If
Next
End If
Starter.skmt.ExecNonQuery("delete from pedido_cliente where pc_cliente in (Select CUENTA from cuentaa)")
Starter.skmt.ExecNonQuery("delete from pedido where pe_cliente in (Select CUENTA from cuentaa)")
Starter.skmt.ExecNonQuery("UPDATE kmt_info set gestion = 0 where CAT_CL_CODIGO In (select cuenta from cuentaa)")
B4XPage_Appear
End If
Else
Msgbox("CLIENTE YA SE TRANSMITIO, FAVOR DE LLAMAR A SOPORTE PARA ASISTENCIA","AVISO") 'ignore
End If
End Sub
Sub ListView1_ItemLongClick (Position As Int, Value As Object)
result = Msgbox2("Seguro que desa borrar este articulo?","Borrar Articulo", "Si", "", "No",LoadBitmap(File.DirAssets,"alert2.png")) 'ignore
If result = DialogResponse.POSITIVE Then
' If TIPO = "VENTA" Then
' c=Starter.skmt.ExecQuery2("select count(*) AS CUANTOS from cat_gunaprod2 where CAT_GP_ID in (select pe_cedis from pedido where pe_pronombre = ? and pe_cliente in (Select CUENTA from cuentaa)) and CAT_GP_CLASIF = 'PROMOS' AND CAT_GP_TIPO = 'PROMOS' AND CAT_GP_SUBTIPO = 'PROMOS'", Array As String(Value))
' Else
' c=Starter.skmt.ExecQuery2("select count(*) AS CUANTOS from cat_gunaprod where CAT_GP_ID in (select pe_cedis from pedido where pe_pronombre = ? and pe_cliente in (Select CUENTA from cuentaa)) and CAT_GP_CLASIF = 'PROMOS' AND CAT_GP_TIPO = 'PROMOS' AND CAT_GP_SUBTIPO = 'PROMOS'", Array As String(Value))
' End If
c=Starter.skmt.ExecQuery2("SELECT COUNT(*) as CUANTOS FROM PEDIDO WHERE pe_cedis in (select pe_cedis from pedido where pe_pronombre = ?) and pe_cliente in (Select CUENTA from cuentaa) and length(pe_cedis) > 3 ", Array As String(Value))
c.Position=0
If c.GetString("CUANTOS") > 0 Then
d=Starter.skmt.ExecQuery2("select PE_PROID,PE_CANT, PE_TIPO FROM PEDIDO where pe_cedis in (select pe_cedis from pedido where pe_pronombre = ?) and pe_cliente in (Select CUENTA from cuentaa) and length(pe_cedis) > 3", Array As String(Value))
If d.RowCount>0 Then
For i=0 To d.RowCount -1
d.Position=i
TIPO = d.GetString("PE_TIPO")
If d.GetString("PE_TIPO") = "VENTA" Then
Starter.skmt.ExecNonQuery2("update cat_gunaprod2 set cat_gp_almacen = cat_gp_almacen + ? where cat_gp_id = ?", Array As Object(d.GetString("PE_CANT"),d.GetString("PE_PROID")))
Else
Starter.skmt.ExecNonQuery2("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen + ? where cat_gp_id = ?", Array As Object(d.GetString("PE_CANT"),d.GetString("PE_PROID")))
End If
Next
End If
d.Close
Starter.skmt.ExecNonQuery2("delete from pedido where pe_cedis in (select pe_cedis from pedido where pe_pronombre = ?) and pe_cliente in (Select CUENTA from cuentaa)", Array As Object(Value))
Else
d=Starter.skmt.ExecQuery2("select PE_PROID,PE_CANT, PE_TIPO FROM PEDIDO where pe_pronombre = ? and pe_cliente in (Select CUENTA from cuentaa) ", Array As String(Value))
d.Position = 0
TIPO = d.GetString("PE_TIPO")
If d.GetString("PE_TIPO") = "VENTA" Then
Starter.skmt.ExecNonQuery2("update cat_gunaprod2 set cat_gp_almacen = cat_gp_almacen + ? where cat_gp_id = ?", Array As Object(d.GetString("PE_CANT"),d.GetString("PE_PROID")))
Else
Starter.skmt.ExecNonQuery2("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen + ? where cat_gp_id = ?", Array As Object(d.GetString("PE_CANT"),d.GetString("PE_PROID")))
End If
d.Close
Starter.skmt.ExecNonQuery2("delete from pedido where pe_pronombre = ? and pe_cliente in (Select CUENTA from cuentaa)", Array As Object(Value))
End If
DateTime.DateFormat = "MM/dd/yyyy"
sDate=DateTime.Date(DateTime.Now)
sTime=DateTime.Time(DateTime.Now)
c=Starter.skmt.ExecQuery("Select CUENTA from cuentaa")
c.Position=0
clie_id = c.GetString("CUENTA")
c=Starter.skmt.ExecQuery("select USUARIO from usuarioa")
c.Position=0
usuario = c.GetString("USUARIO")
c=Starter.skmt.ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, count(*) as CUANTOS FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")
c.Position=0
If c.GetString("CUANTOS") > 0 Then
Starter.skmt.ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)")
Starter.skmt.ExecNonQuery2("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT) VALUES (?,?,?,?,?,?,?)", Array As Object(clie_id, sDate & sTime, usuario, c.GetString("CANT_CLIE"),c.GetString("TOTAL_CLIE"), Starter.lon_gps, Starter.lat_gps))
Starter.skmt.ExecNonQuery("UPDATE kmt_info set gestion = 2 where CAT_CL_CODIGO In (select cuenta from cuentaa)")
Else
Starter.skmt.ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)")
Starter.skmt.ExecNonQuery("UPDATE kmt_info set gestion = 0 where CAT_CL_CODIGO In (select cuenta from cuentaa)")
End If
B4XPage_Appear
End If
End Sub
Sub b_desc_Click
If DESCUENTO = "MENOS" Then
DateTime.DateFormat = "MM/dd/yyyy"
sDate=DateTime.Date(DateTime.Now)
sTime=DateTime.Time(DateTime.Now)
c=Starter.skmt.ExecQuery("Select CUENTA from cuentaa")
c.Position=0
clie_id = c.GetString("CUENTA")
c.Close
c=Starter.skmt.ExecQuery("select USUARIO from usuarioa")
c.Position=0
usuario = c.GetString("USUARIO")
c.Close
result = Msgbox2("Seguro que desa dar descuento del 5%?","Dar descuento", "Si", "", "No",LoadBitmap(File.DirAssets,"alert2.png")) 'ignore
If result = DialogResponse.POSITIVE Then
Starter.skmt.ExecNonQuery("UPDATE pedido SET PE_COSTO_TOT = PE_COSTO_TOT * .95, PE_DESC = 5 WHERE PE_CLIENTE In (select cuenta from cuentaa)")
c=Starter.skmt.ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, count(*) as CUANTOS FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")
c.Position=0
Starter.skmt.ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)")
Starter.skmt.ExecNonQuery2("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT) VALUES (?,?,?,?,?,?,?)", Array As Object(clie_id, sDate & sTime, usuario, c.GetString("CANT_CLIE"),c.GetString("TOTAL_CLIE"), Starter.lon_gps, Starter.lat_gps))
c.Close
B4XPage_Appear
End If
ELSE IF DESCUENTO = "MAS" Then
DateTime.DateFormat = "MM/dd/yyyy"
sDate=DateTime.Date(DateTime.Now)
sTime=DateTime.Time(DateTime.Now)
c=Starter.skmt.ExecQuery("Select CUENTA from cuentaa")
c.Position=0
clie_id = c.GetString("CUENTA")
c.Close
c=Starter.skmt.ExecQuery("select USUARIO from usuarioa")
c.Position=0
usuario = c.GetString("USUARIO")
c.Close
result = Msgbox2("Seguro que desa CANCELAR el descuento?","Cancelar descuento", "Si", "", "No",LoadBitmap(File.DirAssets,"alert2.png")) 'ignore
If result = DialogResponse.POSITIVE Then
Starter.skmt.ExecNonQuery("UPDATE pedido SET PE_COSTO_TOT = PE_COSTO_TOT / .95, PE_DESC = 0 WHERE PE_CLIENTE In (select cuenta from cuentaa)")
c=Starter.skmt.ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, count(*) as CUANTOS FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")
c.Position=0
Starter.skmt.ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)")
Starter.skmt.ExecNonQuery2("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT) VALUES (?,?,?,?,?,?,?)", Array As Object(clie_id, sDate & sTime, usuario, c.GetString("CANT_CLIE"),c.GetString("TOTAL_CLIE"),Starter.lon_gps, Starter.lat_gps))
c.Close
B4XPage_Appear
End If
End If
End Sub

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,149 +0,0 @@
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Class
Version=11.5
@EndOfDesignText@
Sub Class_Globals
Private Root As B4XView 'ignore
Private xui As XUI 'ignore
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim skmt As SQL
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim c As Cursor
Dim ruta As String
Dim ListView1 As ListView
Dim b_noventa As Button
Dim nombre_boton As String
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("buscar")
ruta = File.DirInternal
' se crea o no el archivo de la base de ddatos de kmt
'NOTAS SI SE MODIFICA LA ESTRUCTURA SE QUITA EL IF Y SE VA DIRECTO A LA SENTENCIA FILE.COPY PARA QUE
'TOME LA NUEVA ESTRUCTURA ES MUY IMPORTANTE TENER EL IF DE LO CONTRARIO SOLO LO ESCRIBE UNA VEZ Y LO BORRA
'SI SE REGRESA A ESTE ACTIVIDAD.
If File.Exists(ruta, "kmt.db") = False Then
File.Copy(File.DirAssets, "kmt.db", ruta, "kmt.db")
End If
skmt.Initialize(ruta,"kmt.db", True)
c=skmt.ExecQuery("select PC_CLIENTE,PC_MONTO,PC_NOART FROM PEDIDO_CLIENTE ORDER BY PC_FECHA asc")
ListView1.Clear
If c.RowCount>0 Then
For i=0 To c.RowCount -1
c.Position=i
Dim label1 As Label
label1 = ListView1.TwoLinesLayout.Label
label1.TextSize = 10
label1.TextColor = Colors.Black
Dim label2 As Label
label2 = ListView1.TwoLinesLayout.SecondLabel
label2.TextSize = 15
label2.TextColor = Colors.Blue
ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),"Cantidad #"& c.GetString("PC_NOART")& " SubTotal $"& c.GetString("PC_MONTO"))
Next
End If
'la_no_ird.Text = c.GetString("PR_CF_SALDO_ACORT")
'ListView1.AddTwoLines(c.GetString("pr_cd_nombre"),c.GetString("pr_cd_colonia"))
' Next
'End If
End Sub
Sub B4XPage_Appear
nombre_boton = "NOVENTA"
c=skmt.ExecQuery("select PC_CLIENTE,PC_MONTO,PC_NOART,(select CAT_CL_NOMBRE from kmt_info where cat_cl_codigo = pc_cliente ) as NOMBRE FROM PEDIDO_CLIENTE ORDER BY PC_FECHA asc")
ListView1.Clear
If c.RowCount>0 Then
For i=0 To c.RowCount -1
c.Position=i
Dim label1 As Label
label1 = ListView1.TwoLinesLayout.Label
label1.TextSize = 15
label1.TextColor = Colors.Black
Dim label2 As Label
label2 = ListView1.TwoLinesLayout.SecondLabel
label2.TextSize = 10
label2.TextColor = Colors.Blue
ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),c.GetString("NOMBRE") &" Cantidad #"& c.GetString("PC_NOART")& " SubTotal $"& c.GetString("PC_MONTO"))
Next
End If
c.Close
End Sub
Sub Regresar_Click
' StartActivity(fila)
End Sub
Sub Activity_KeyPress (key As Int) As Boolean
' BACK key pressed
If key=KeyCodes.KEYCODE_BACK Then
' I want to capture the key here so I return True
' StartActivity(seleccion)
'Return True
End If
' Returning False signals the system to handle the key
Return False
End Sub
Sub ListView1_ItemLongClick (Position As Int, Value As Object)
skmt.ExecNonQuery("delete from CUENTAA")
skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object(Value))
' StartActivity(fila)
End Sub
Sub b_noventa_Click
If nombre_boton = "NOVENTA" Then
nombre_boton = "VENTA"
b_noventa.Text ="VENTA"
c=skmt.ExecQuery("select NV_CLIENTE,NV_MOTIVO,NV_COMM FROM NOVENTA ORDER BY NV_CLIENTE asc")
ListView1.Clear
If c.RowCount>0 Then
For i=0 To c.RowCount -1
c.Position=i
Dim label1 As Label
label1 = ListView1.TwoLinesLayout.Label
label1.TextSize = 15
label1.TextColor = Colors.Black
Dim label2 As Label
label2 = ListView1.TwoLinesLayout.SecondLabel
label2.TextSize = 10
label2.TextColor = Colors.Blue
ListView1.AddTwoLines(c.GetString("NV_CLIENTE"),"Motivo #"& c.GetString("NV_MOTIVO")& " Comentario $"& c.GetString("NV_COMM"))
Next
End If
Else
nombre_boton = "NOVENTA"
b_noventa.Text ="NO VENTA"
c=skmt.ExecQuery("select PC_CLIENTE,PC_MONTO,PC_NOART,(select CAT_CL_NOMBRE from kmt_info where cat_cl_codigo = pc_cliente ) as NOMBRE FROM PEDIDO_CLIENTE ORDER BY PC_FECHA asc")
ListView1.Clear
If c.RowCount>0 Then
For i=0 To c.RowCount -1
c.Position=i
Dim label1 As Label
label1 = ListView1.TwoLinesLayout.Label
label1.TextSize = 15
label1.TextColor = Colors.Black
Dim label2 As Label
label2 = ListView1.TwoLinesLayout.SecondLabel
label2.TextSize = 10
label2.TextColor = Colors.Blue
ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),c.GetString("NOMBRE") &" Cantidad #"& c.GetString("PC_NOART")& " SubTotal $"& c.GetString("PC_MONTO"))
Next
End If
c.Close
End If
End Sub

View File

@@ -1,24 +0,0 @@
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Class
Version=11.5
@EndOfDesignText@
Sub Class_Globals
Private Root As B4XView 'ignore
Private xui As XUI 'ignore
End Sub
'You can add more parameters here.
Public Sub Initialize As Object
Return Me
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
'load the layout to Root
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.

View File

@@ -1,290 +0,0 @@
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Class
Version=6.8
@EndOfDesignText@
'Class module
'version 1.20
'See this page for the list of constants:
'http://developer.android.com/intl/fr/reference/android/hardware/Camera.Parameters.html
'Note that you should use the constant values instead of the names.
Sub Class_Globals
Private nativeCam As Object
Private cam As Camera
Private r As Reflector
Private target As Object
Private event As String
Public Front As Boolean
Type CameraInfoAndId (CameraInfo As Object, Id As Int)
Type CameraSize (Width As Int, Height As Int)
Private parameters As Object
End Sub
Public Sub Initialize (Panel1 As Panel, FrontCamera As Boolean, TargetModule As Object, EventName As String)
target = TargetModule
event = EventName
Front = FrontCamera
Dim id As Int
id = FindCamera(Front).id
If id = -1 Then
Front = Not(Front) 'try different camera
id = FindCamera(Front).id
If id = -1 Then
ToastMessageShow("No camera found.", True)
Return
End If
End If
cam.Initialize2(Panel1, "camera", id)
End Sub
Private Sub FindCamera (frontCamera As Boolean) As CameraInfoAndId
Dim ci As CameraInfoAndId
Dim cameraInfo As Object
Dim cameraValue As Int
If frontCamera Then cameraValue = 1 Else cameraValue = 0
cameraInfo = r.CreateObject("android.hardware.Camera$CameraInfo")
Dim numberOfCameras As Int = r.RunStaticMethod("android.hardware.Camera", "getNumberOfCameras", Null, Null)
For i = 0 To numberOfCameras - 1
r.RunStaticMethod("android.hardware.Camera", "getCameraInfo", Array As Object(i, cameraInfo), _
Array As String("java.lang.int", "android.hardware.Camera$CameraInfo"))
r.target = cameraInfo
If r.GetField("facing") = cameraValue Then
ci.cameraInfo = r.target
ci.Id = i
Return ci
End If
Next
ci.id = -1
Return ci
End Sub
Private Sub SetDisplayOrientation
r.target = r.GetActivity
r.target = r.RunMethod("getWindowManager")
r.target = r.RunMethod("getDefaultDisplay")
r.target = r.RunMethod("getRotation")
Dim previewResult, result, degrees As Int = r.target * 90
Dim ci As CameraInfoAndId = FindCamera(Front)
r.target = ci.CameraInfo
Dim orientation As Int = r.GetField("orientation")
If Front Then
previewResult = (orientation + degrees) Mod 360
result = previewResult
previewResult = (360 - previewResult) Mod 360
Else
previewResult = (orientation - degrees + 360) Mod 360
result = previewResult
Log(previewResult)
End If
r.target = nativeCam
r.RunMethod2("setDisplayOrientation", previewResult, "java.lang.int")
r.target = parameters
r.RunMethod2("setRotation", result, "java.lang.int")
CommitParameters
End Sub
Private Sub Camera_Ready (Success As Boolean)
If Success Then
r.target = cam
nativeCam = r.GetField("camera")
r.target = nativeCam
parameters = r.RunMethod("getParameters")
SetDisplayOrientation
Else
Log("success = false, " & LastException)
End If
CallSub2(target, event & "_ready", Success)
End Sub
Sub Camera_Preview (Data() As Byte)
If SubExists(target, event & "_preview") Then
CallSub2(target, event & "_preview", Data)
End If
End Sub
Public Sub TakePicture
cam.TakePicture
End Sub
Private Sub Camera_PictureTaken (Data() As Byte)
CallSub2(target, event & "_PictureTaken", Data)
End Sub
Public Sub StartPreview
cam.StartPreview
End Sub
Public Sub StopPreview
cam.StopPreview
End Sub
Public Sub Release
cam.Release
End Sub
'Saves the data received from PictureTaken event
Public Sub SavePictureToFile(Data() As Byte, Dir As String, FileName As String)
Dim out As OutputStream = File.OpenOutput(Dir, FileName, False)
out.WriteBytes(Data, 0, Data.Length)
out.Close
End Sub
Public Sub SetParameter(Key As String, Value As String)
r.target = parameters
r.RunMethod3("set", Key, "java.lang.String", Value, "java.lang.String")
End Sub
Public Sub GetParameter(Key As String) As String
r.target = parameters
Return r.RunMethod2("get", Key, "java.lang.String")
End Sub
Public Sub CommitParameters
Try
r.target = nativeCam
r.RunMethod4("setParameters", Array As Object(parameters), Array As String("android.hardware.Camera$Parameters"))
Catch
ToastMessageShow("Error setting parameters.", True)
Log(LastException)
End Try
End Sub
Public Sub GetColorEffect As String
Return GetParameter("effect")
End Sub
Public Sub SetColorEffect(Effect As String)
SetParameter("effect", Effect)
End Sub
Public Sub GetSupportedPicturesSizes As CameraSize()
r.target = parameters
Dim list1 As List = r.RunMethod("getSupportedPictureSizes")
Dim cs(list1.Size) As CameraSize
For i = 0 To list1.Size - 1
r.target = list1.Get(i)
cs(i).Width = r.GetField("width")
cs(i).Height = r.GetField("height")
Next
Return cs
End Sub
Public Sub SetPictureSize(Width As Int, Height As Int)
r.target = parameters
r.RunMethod3("setPictureSize", Width, "java.lang.int", Height, "java.lang.int")
End Sub
Public Sub SetJpegQuality(Quality As Int)
r.target = parameters
r.RunMethod2("setJpegQuality", Quality, "java.lang.int")
End Sub
Public Sub SetFlashMode(Mode As String)
r.target = parameters
r.RunMethod2("setFlashMode", Mode, "java.lang.String")
End Sub
Public Sub GetFlashMode As String
r.target = parameters
Return r.RunMethod("getFlashMode")
End Sub
Public Sub GetSupportedFlashModes As List
r.target = parameters
Return r.RunMethod("getSupportedFlashModes")
End Sub
Public Sub GetSupportedColorEffects As List
r.target = parameters
Return r.RunMethod("getSupportedColorEffects")
End Sub
Public Sub GetPreviewSize As CameraSize
r.target = parameters
r.target = r.RunMethod("getPreviewSize")
Dim cs As CameraSize
cs.Width = r.GetField("width")
cs.Height = r.GetField("height")
Return cs
End Sub
Public Sub GetPictureSize As CameraSize
r.target = parameters
r.target = r.RunMethod("getPictureSize")
Dim cs As CameraSize
cs.Width = r.GetField("width")
cs.Height = r.GetField("height")
Return cs
End Sub
'Converts a preview image formatted in YUV format to JPEG.
'Note that you should not save every preview image as it will slow down the whole process.
Public Sub PreviewImageToJpeg(data() As Byte, quality As Int) As Byte()
Dim size, previewFormat As Object
r.target = parameters
size = r.RunMethod("getPreviewSize")
previewFormat = r.RunMethod("getPreviewFormat")
r.target = size
Dim width = r.GetField("width"), height = r.GetField("height") As Int
Dim yuvImage As Object = r.CreateObject2("android.graphics.YuvImage", _
Array As Object(data, previewFormat, width, height, Null), _
Array As String("[B", "java.lang.int", "java.lang.int", "java.lang.int", "[I"))
r.target = yuvImage
Dim rect1 As Rect
rect1.Initialize(0, 0, r.RunMethod("getWidth"), r.RunMethod("getHeight"))
Dim out As OutputStream
out.InitializeToBytesArray(100)
r.RunMethod4("compressToJpeg", Array As Object(rect1, quality, out), _
Array As String("android.graphics.Rect", "java.lang.int", "java.io.OutputStream"))
Return out.ToBytesArray
End Sub
Public Sub GetSupportedFocusModes As List
r.target = parameters
Return r.RunMethod("getSupportedFocusModes")
End Sub
Public Sub SetContinuousAutoFocus
Dim modes As List = GetSupportedFocusModes
If modes.IndexOf("continuous-picture") > -1 Then
SetFocusMode("continuous-picture")
Else If modes.IndexOf("continuous-video") > -1 Then
SetFocusMode("continuous-video")
Else
Log("Continuous focus mode is not available")
End If
End Sub
Public Sub SetFocusMode(Mode As String)
r.target = parameters
r.RunMethod2("setFocusMode", Mode, "java.lang.String")
End Sub
Public Sub GetFocusDistances As Float()
Dim F(3) As Float
r.target = parameters
r.RunMethod4("getFocusDistances", Array As Object(F), Array As String("[F"))
Return F
End Sub
'This method should only be called if you need to immediately release the camera.
'For example if you need to start another application that depends on the camera.
Public Sub CloseNow
cam.Release
r.target = cam
r.RunMethod2("releaseCameras", True, "java.lang.boolean")
End Sub
'Calls AutoFocus and then takes the picture if focus was successfull.
Public Sub FocusAndTakePicture
cam.AutoFocus
End Sub
Private Sub Camera_FocusDone (Success As Boolean)
If Success Then
TakePicture
Else
Log("AutoFocus error.")
End If
End Sub

View File

@@ -1,275 +0,0 @@
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Class
Version=6.8
@EndOfDesignText@
'Necesita la libreria RandomAccessFile, ByteConverter
'Class module
Sub Class_Globals
Private mTarget As Object
Type DBResult (Tag As Object, Columns As Map, Rows As List)
Type DBCommand (Name As String, Parameters() As Object)
Private link As String
Private bc As ByteConverter
Private T_NULL = 0, T_STRING = 1, T_SHORT = 2, T_INT = 3, T_LONG = 4, T_FLOAT = 5 _
,T_DOUBLE = 6, T_BOOLEAN = 7, T_BLOB = 8 As Byte
Private VERSION As Float = 0.9
Private tempArray(1) As Object
Dim jobTagAnterior As String = "" 'Mod por CHV - 211027
End Sub
'Target - The module that handles JobDone (usually Me).
'ConnectorLink - URL of the Java server.
Public Sub Initialize (Target As Object, ConnectorLink As String)
mTarget = Target
link = ConnectorLink
End Sub
'Sends a query request.
'Command - Query name and parameters.
'Limit - Maximum rows to return or 0 for no limit.
'Tag - An object that will be returned in the result.
Public Sub ExecuteQuery(Command As DBCommand, Limit As Int, Tag As Object)
Dim j As HttpJob
Dim ms As OutputStream
Dim out2 As OutputStream = StartJob(j,ms, Tag)
WriteObject(Command.Name, out2)
WriteInt(Limit, out2)
WriteList(Command.Parameters, out2)
out2.Close
j.PostBytes(link & "?method=query", ms.ToBytesArray)
End Sub
'Executes a batch of (non-select) commands.
'ListOfCommands - List of the commands that will be executes.
'Tag - An object that will be returned in the result.
Public Sub ExecuteBatch(ListOfCommands As List, Tag As Object)
Dim j As HttpJob
Dim ms As OutputStream
Dim out2 As OutputStream = StartJob(j,ms, Tag)
WriteInt(ListOfCommands.Size, out2)
For Each Command As DBCommand In ListOfCommands
WriteObject(Command.Name, out2)
WriteList(Command.Parameters, out2)
Next
out2.Close
j.PostBytes(link & "?method=batch", ms.ToBytesArray)
End Sub
'Similar to ExecuteBatch. Sends a single command.
Public Sub ExecuteCommand(Command As DBCommand, Tag As Object)
ExecuteBatch(Array As DBCommand(Command), Tag)
End Sub
Private Sub StartJob(j As HttpJob, MemoryStream As OutputStream, Tag As Object) As OutputStream
j.Initialize("DBRequest", mTarget)
j.Tag = Tag
MemoryStream.InitializeToBytesArray(0)
Dim compress As CompressedStreams
Dim out As OutputStream = compress.WrapOutputStream(MemoryStream, "gzip")
WriteObject(VERSION, out)
Return out
End Sub
Private Sub WriteList(Parameters As List, out As OutputStream)
Dim data() As Byte
If Parameters = Null Or Parameters.IsInitialized = False Then
Dim Parameters As List
Parameters.Initialize
End If
data = bc.IntsToBytes(Array As Int(Parameters.Size))
out.WriteBytes(data, 0, data.Length)
For Each o As Object In Parameters
WriteObject(o, out)
Next
End Sub
Private Sub WriteObject(o As Object, out As OutputStream)
Dim data() As Byte
tempArray(0) = o
If tempArray(0) = Null Then
out.WriteBytes(Array As Byte(T_NULL), 0, 1)
Else If tempArray(0) Is Short Then
out.WriteBytes(Array As Byte(T_SHORT), 0, 1)
data = bc.ShortsToBytes(Array As Short(o))
Else If tempArray(0) Is Int Then
out.WriteBytes(Array As Byte(T_INT), 0, 1)
data = bc.IntsToBytes(Array As Int(o))
Else If tempArray(0) Is Float Then
out.WriteBytes(Array As Byte(T_FLOAT), 0, 1)
data = bc.FloatsToBytes(Array As Float(o))
Else If tempArray(0) Is Double Then
out.WriteBytes(Array As Byte(T_DOUBLE), 0, 1)
data = bc.DoublesToBytes(Array As Double(o))
Else If tempArray(0) Is Long Then
out.WriteBytes(Array As Byte(T_LONG), 0, 1)
data = bc.LongsToBytes(Array As Long(o))
Else If tempArray(0) Is Boolean Then
out.WriteBytes(Array As Byte(T_BOOLEAN), 0, 1)
Dim b As Boolean = 0
Dim data(1) As Byte
If b Then data(0) = 1 Else data(0) = 0
Else If GetType(tempArray(0)) = "[B" Then
data = o
out.WriteBytes(Array As Byte(T_BLOB), 0, 1)
WriteInt(data.Length, out)
Else 'If o Is String Then (treat all other values as string)
out.WriteBytes(Array As Byte(T_STRING), 0, 1)
data = bc.StringToBytes(o, "UTF8")
WriteInt(data.Length, out)
End If
If data.Length > 0 Then out.WriteBytes(data, 0, data.Length)
End Sub
Private Sub ReadObject(In As InputStream) As Object
Dim data(1) As Byte
In.ReadBytes(data, 0, 1)
Select data(0)
Case T_NULL
Return Null
Case T_SHORT
Dim data(2) As Byte
Return bc.ShortsFromBytes(ReadBytesFully(In, data, data.Length))(0)
Case T_INT
Dim data(4) As Byte
Return bc.IntsFromBytes(ReadBytesFully(In, data, data.Length))(0)
Case T_LONG
Dim data(8) As Byte
Return bc.LongsFromBytes(ReadBytesFully(In, data, data.Length))(0)
Case T_FLOAT
Dim data(4) As Byte
Return bc.FloatsFromBytes(ReadBytesFully(In, data, data.Length))(0)
Case T_DOUBLE
Dim data(8) As Byte
Return bc.DoublesFromBytes(ReadBytesFully(In, data, data.Length))(0)
Case T_BOOLEAN
Dim b As Byte = ReadByte(In)
Return b = 1
Case T_BLOB
Dim len As Int = ReadInt(In)
Dim data(len) As Byte
Return ReadBytesFully(In, data, data.Length)
Case Else
Dim len As Int = ReadInt(In)
Dim data(len) As Byte
ReadBytesFully(In, data, data.Length)
Return BytesToString(data, 0, data.Length, "UTF8")
End Select
End Sub
Private Sub ReadBytesFully(In As InputStream, Data() As Byte, Len As Int) As Byte()
Dim count = 0, read As Int
Do While count < Len And read > -1
read = In.ReadBytes(Data, count, Len - count)
count = count + read
Loop
Return Data
End Sub
Private Sub WriteInt(i As Int, out As OutputStream)
Dim data() As Byte
data = bc.IntsToBytes(Array As Int(i))
out.WriteBytes(data, 0, data.Length)
End Sub
Private Sub ReadInt(In As InputStream) As Int
Dim data(4) As Byte
Return bc.IntsFromBytes(ReadBytesFully(In, data, data.Length))(0)
End Sub
Private Sub ReadByte(In As InputStream) As Byte
Dim data(1) As Byte
In.ReadBytes(data, 0, 1)
Return data(0)
End Sub
'Handles the Job result and returns a DBResult.
Public Sub HandleJob(Job As HttpJob) As DBResult
' Dim start As Long = DateTime.Now
Dim In As InputStream = Job.GetInputStream
Dim cs As CompressedStreams
In = cs.WrapInputStream(In, "gzip")
Dim serverVersion As Float = ReadObject(In) 'ignore
Dim method As String = ReadObject(In)
Dim table As DBResult
table.Initialize
table.Columns.Initialize
table.rows.Initialize
table.Tag = Job.Tag
If jobTagAnterior <> Job.Tag Then LogColor("HandleJob: '"&Job.Tag&"'", Colors.Blue) 'Mod por CHV - 211023
jobTagAnterior = Job.Tag 'Mod por CHV - 211023
If method = "query" Then
Dim numberOfColumns As Int = ReadInt(In)
For i = 0 To numberOfColumns - 1
table.Columns.Put(ReadObject(In), i)
Next
Do While ReadByte(In) = 1
Dim rowObjects(numberOfColumns) As Object
table.rows.Add(rowObjects)
For col = 0 To numberOfColumns - 1
Dim o As Object = ReadObject(In)
rowObjects(col) = o
Next
Loop
Else If method = "batch" Then
table.Columns.Put("AffectedRows", 0)
Dim rows As Int = ReadInt(In)
For i = 0 To rows - 1
table.rows.Add(Array As Object(ReadInt(In)))
Next
End If
In.Close
' Log("HandleJob: " & (DateTime.Now - start))
Return table
End Sub
'Reads a file and returns the file as a bytes array.
Public Sub FileToBytes(Dir As String, FileName As String) As Byte()
Dim out As OutputStream
out.InitializeToBytesArray(0)
Dim In As InputStream = File.OpenInput(Dir, FileName)
File.Copy2(In, out)
out.Close
Return out.ToBytesArray
End Sub
'Converts an image to a bytes array (for BLOB fields).
Public Sub ImageToBytes(Image As Bitmap) As Byte()
Dim out As OutputStream
out.InitializeToBytesArray(0)
Image.WriteToStream(out, 100, "JPEG")
out.Close
Return out.ToBytesArray
End Sub
'Converts a bytes array to an image (for BLOB fields).
Public Sub BytesToImage(bytes() As Byte) As Bitmap
Dim In As InputStream
In.InitializeFromBytesArray(bytes, 0, bytes.Length)
Dim bmp As Bitmap
bmp.Initialize2(In)
Return bmp
End Sub
'Prints the table to the logs.
Public Sub PrintTable(Table As DBResult)
Log("Tag: " & Table.Tag & ", Columns: " & Table.Columns.Size & ", Rows: " & Table.Rows.Size)
Dim sb As StringBuilder
sb.Initialize
For Each col In Table.Columns.Keys
sb.Append(col).Append(TAB)
Next
Log(sb.ToString)
For Each row() As Object In Table.Rows
Dim sb As StringBuilder
sb.Initialize
For Each record As Object In row
sb.Append(record).Append(TAB)
Next
ToastMessageShow(sb.ToString, True)
Next
End Sub

View File

@@ -1,178 +0,0 @@
Build1=Default,durakelo.keymon.com.mx,HU2_PUBLIC
File1=alcancia.png
File10=fondo_kmt.jpg
File11=historico.bal
File12=itembuttonblue.png
File13=k.png
File14=K-b27c0809.png
File15=kelloggs.png
File16=login.bal
File17=MainPage.bal
File18=Malo.jpg
File19=NoVenta.bal
File2=alerta_amarilla.png
File20=nuevocliente.bal
File21=palomita_verde.png
File22=planfia_logo.png
File23=principal.bal
File24=rechazo.jpg
File25=salma.jpg
File26=senial.jpg
File27=sync.png
File28=Tiendita.jpg
File29=unilever.jpg
File3=carrito.png
File4=Cliente.bal
File5=Clientes.bal
File6=durakelo.png
File7=durakelo1.png
File8=engrane.jpg
File9=espera.gif
FileGroup1=Default Group
FileGroup10=Default Group
FileGroup11=Default Group
FileGroup12=Default Group
FileGroup13=Default Group
FileGroup14=Default Group
FileGroup15=Default Group
FileGroup16=Default Group
FileGroup17=Default Group
FileGroup18=Default Group
FileGroup19=Default Group
FileGroup2=Default Group
FileGroup20=Default Group
FileGroup21=Default Group
FileGroup22=Default Group
FileGroup23=Default Group
FileGroup24=Default Group
FileGroup25=Default Group
FileGroup26=Default Group
FileGroup27=Default Group
FileGroup28=Default Group
FileGroup29=Default Group
FileGroup3=Default Group
FileGroup4=Default Group
FileGroup5=Default Group
FileGroup6=Default Group
FileGroup7=Default Group
FileGroup8=Default Group
FileGroup9=Default Group
Group=Default Group
Library1=b4xpages
Library10=firebasenotifications
Library11=fusedlocationprovider
Library12=gifdecoder
Library13=googlemaps
Library14=gps
Library15=ime
Library16=javaobject
Library17=json
Library18=okhttputils2
Library19=phone
Library2=baqrcode
Library20=randomaccessfile
Library21=reflection
Library22=runtimepermissions
Library23=serial
Library24=sql
Library25=xcustomlistview
Library26=zxing_scanner
Library27=bitmapcreator
Library3=batteryprogressview
Library4=byteconverter
Library5=camera
Library6=compressstrings
Library7=core
Library8=fileprovider
Library9=firebaseanalytics
ManifestCode='This code will be applied to the manifest file during compilation.~\n~'You do not need to modify it in most cases.~\n~'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136~\n~AddManifestText(~\n~<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="33"/>~\n~<supports-screens android:largeScreens="true" ~\n~ android:normalScreens="true" ~\n~ android:smallScreens="true" ~\n~ android:anyDensity="true"/>)~\n~SetApplicationAttribute(android:icon, "@drawable/icon")~\n~SetApplicationAttribute(android:label, "$LABEL$")~\n~CreateResourceFromFile(Macro, Themes.LightTheme)~\n~'End of default text.~\n~~\n~AddApplicationText(~\n~<meta-data android:name="com.google.android.geo.API_KEY" android:value="AIzaSyBlBnx3O-DncOSv3oFIp-12wgujOYYcl-U"/>~\n~<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />~\n~)~\n~AddManifestText(<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:maxSdkVersion="33" />)~\n~AddManifestText(<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />)~\n~SetApplicationAttribute(android:usesCleartextTraffic, "true")~\n~~\n~~\n~'/////////////// FLP y FBMessageing MOD Inicia /////////////////////~\n~CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)~\n~CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)~\n~CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)~\n~CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)~\n~'CreateResourceFromFile(Macro, FirebaseAnalytics.Crashlytics)~\n~SetServiceAttribute(Tracker, android:foregroundServiceType, "location")~\n~'/////////////// FLP y FBMessageing MOD Termina /////////////////////~\n~~\n~'Si al cargar un mapa de google manda este error "java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion". agregar la siguiente linea:~\n~AddApplicationText(<uses-library android:name="org.apache.http.legacy" android:required="false"/>)~\n~SetApplicationAttribute(android:allowBackup, "false")~\n~SetApplicationAttribute(android:exported, "true")~\n~AddManifestText(<queries><package android:name="com.google.android.apps.maps" /></queries>)
Module1=B4XMainPage
Module10=EscPosPrinter
Module11=FirebaseMessaging
Module12=kms_helperSubs
Module13=ManageExternalStorage
Module14=Starter
Module15=Tracker
Module2=BatteryUtilities
Module3=C_Cliente
Module4=C_Clientes
Module5=C_Historico
Module6=C_Nota
Module7=C_NoVenta
Module8=C_Principal
Module9=DBRequestManager
NumberOfFiles=29
NumberOfLibraries=27
NumberOfModules=15
Version=12.5
@EndOfDesignText@
#Region Project Attributes
#ApplicationLabel: Durakelo
#VersionCode: 1
#VersionName: 3.10.09
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False
#AdditionalJar: com.android.support:support-v4
#AdditionalJar: com.google.android.gms:play-services-location
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
'#BridgeLogger: True
Sub Process_Globals
Public ActionBarHomeClicked As Boolean
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
Dim pm As B4XPagesManager
pm.Initialize(Activity)
End Sub
'Template version: B4A-1.01
#Region Delegates
Sub Activity_ActionBarHomeClick
ActionBarHomeClicked = True
B4XPages.Delegate.Activity_ActionBarHomeClick
ActionBarHomeClicked = False
End Sub
Sub Activity_KeyPress (KeyCode As Int) As Boolean
Return B4XPages.Delegate.Activity_KeyPress(KeyCode)
End Sub
Sub Activity_Resume
B4XPages.Delegate.Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
B4XPages.Delegate.Activity_Pause
End Sub
Sub Activity_PermissionResult (Permission As String, Result As Boolean)
B4XPages.Delegate.Activity_PermissionResult(Permission, Result)
End Sub
Sub Create_Menu (Menu As Object)
B4XPages.Delegate.Create_Menu(Menu)
End Sub
#if Java
public boolean _onCreateOptionsMenu(android.view.Menu menu) {
processBA.raiseEvent(null, "create_menu", menu);
return true;
}
#End If
#End Region
'Program code should go into B4XMainPage and other pages.

View File

@@ -1,51 +0,0 @@
ModuleBookmarks0=
ModuleBookmarks1=
ModuleBookmarks10=
ModuleBookmarks11=
ModuleBookmarks12=
ModuleBookmarks13=
ModuleBookmarks14=
ModuleBookmarks15=
ModuleBookmarks2=
ModuleBookmarks3=
ModuleBookmarks4=
ModuleBookmarks5=
ModuleBookmarks6=
ModuleBookmarks7=
ModuleBookmarks8=
ModuleBookmarks9=
ModuleBreakpoints0=
ModuleBreakpoints1=
ModuleBreakpoints10=
ModuleBreakpoints11=
ModuleBreakpoints12=
ModuleBreakpoints13=
ModuleBreakpoints14=
ModuleBreakpoints15=
ModuleBreakpoints2=
ModuleBreakpoints3=
ModuleBreakpoints4=
ModuleBreakpoints5=
ModuleBreakpoints6=
ModuleBreakpoints7=
ModuleBreakpoints8=
ModuleBreakpoints9=
ModuleClosedNodes0=
ModuleClosedNodes1=
ModuleClosedNodes10=
ModuleClosedNodes11=
ModuleClosedNodes12=
ModuleClosedNodes13=
ModuleClosedNodes14=1
ModuleClosedNodes15=
ModuleClosedNodes2=
ModuleClosedNodes3=
ModuleClosedNodes4=
ModuleClosedNodes5=
ModuleClosedNodes6=
ModuleClosedNodes7=
ModuleClosedNodes8=
ModuleClosedNodes9=
NavigationStack=C_Cliente,Tels_Click,306,0,C_Cliente,B_INV_Click,875,0,C_Cliente,B_IMP_Click,447,0,C_Cliente,B_IMP2_Click,670,0,C_Cliente,Guardar_Click,353,5,C_NoVenta,CANCELA_Click,52,1,C_NoVenta,GUARDA_Click,62,6,C_Cliente,initialize,131,0,Visual Designer,Cliente.bal,-100,6,C_Cliente,B4XPage_Created,162,6
SelectedBuild=0
VisibleModules=14,1,8,12,6,3,7

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Some files were not shown because too many files have changed in this diff Show More