mirror of
https://github.com/KeymonSoft/ADM.git
synced 2026-04-18 03:39:19 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 003e50a6b1 |
@@ -1121,7 +1121,7 @@ Version=12.8
|
||||
#Region Project Attributes
|
||||
#ApplicationLabel: ADM
|
||||
#VersionCode: 1
|
||||
#VersionName: 5.09.02
|
||||
#VersionName: 5.09.03
|
||||
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
||||
#SupportedOrientations: portrait
|
||||
#CanInstallToExternalStorage: False
|
||||
|
||||
@@ -84,7 +84,7 @@ ModuleClosedNodes23=
|
||||
ModuleClosedNodes24=
|
||||
ModuleClosedNodes25=
|
||||
ModuleClosedNodes26=
|
||||
ModuleClosedNodes27=
|
||||
ModuleClosedNodes27=29
|
||||
ModuleClosedNodes28=
|
||||
ModuleClosedNodes29=
|
||||
ModuleClosedNodes3=
|
||||
@@ -93,10 +93,10 @@ ModuleClosedNodes31=
|
||||
ModuleClosedNodes32=15,16,17,18,19
|
||||
ModuleClosedNodes4=
|
||||
ModuleClosedNodes5=
|
||||
ModuleClosedNodes6=
|
||||
ModuleClosedNodes6=3
|
||||
ModuleClosedNodes7=
|
||||
ModuleClosedNodes8=
|
||||
ModuleClosedNodes9=
|
||||
NavigationStack=Tracker,guardaYEnviaUbicacion,309,6,Tracker,revisaUUG,298,0,Subs,guardaPeso,804,0,Subs,guardaProductoSinGestion,797,0,C_Clientes,JobDone,943,0,Diseñador Visual,ticketsdia.bal,-100,1,C_Clientes,b_noVenta_Click,673,0,C_Clientes,b_guardaNoVenta_Click,713,0,Diseñador Visual,clientes.bal,-100,4,Subs,bitacora,1607,5,Starter,JobDone,210,0
|
||||
NavigationStack=C_TicketsDia,b_guardaNoVenta_Click,300,1,C_TicketsDia,GPS_LocationChanged,218,0,C_TicketsDia,ListView1_ItemLongClick,213,0,Diseñador Visual,mapa_rutas.bal,-100,2,C_TicketsDia,b_noventa0_Click,229,0,MAPA_RUTAS,b_guardaNoVenta_Click,575,0,Diseñador Visual,clientes.bal,-100,3,C_Clientes,B4XPage_Appear,141,6,Diseñador Visual,datosclienteBotones.bal,-100,2,C_Clientes,CreateListItem,210,0,Starter,reinicializaReqManager,164,0
|
||||
SelectedBuild=0
|
||||
VisibleModules=30,2,14,5,6,19,31,27,18,11,32
|
||||
VisibleModules=30,2,14,5,6,19,31,27,18,32,8,11
|
||||
|
||||
@@ -22,7 +22,6 @@ Version=9.85
|
||||
|
||||
'Ctrl + click ide://run?file=%WINDIR%\System32\cmd.exe&Args=/c&Args=github&Args=..\..\
|
||||
|
||||
|
||||
' ###################################################################
|
||||
' ################## Pendientes ##################
|
||||
' ###################################################################
|
||||
|
||||
@@ -74,6 +74,8 @@ Sub Class_Globals
|
||||
Private p_botonesCam As Panel
|
||||
Dim reqManager As DBRequestManager
|
||||
Private p_clientesLista As Panel
|
||||
Private p_transparenciaEsperaGPS As Panel
|
||||
Private p_esperaGPS As Panel
|
||||
End Sub
|
||||
|
||||
'You can add more parameters here.
|
||||
@@ -100,7 +102,9 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
Subs.centraPanel(p_inicioFinVenta, Root.Width)
|
||||
p_guardarPeso.Top = p_inicioFinVenta.top : p_guardarPeso.left = p_inicioFinVenta.left
|
||||
Subs.centraPanel(p_noVenta, Root.Width)
|
||||
|
||||
p_transparenciaEsperaGPS.Width = Root.Width : p_transparenciaEsperaGPS.Height = Root.Height
|
||||
p_transparenciaEsperaGPS.Top = 0 : p_transparenciaEsperaGPS.Left = 0
|
||||
Subs.centraPanel(p_esperaGPS, p_transparenciaEsperaGPS.Width)
|
||||
' 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
|
||||
@@ -114,6 +118,18 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
End Sub
|
||||
|
||||
Sub B4XPage_Appear
|
||||
' p_transparenciaEsperaGPS.Visible = True
|
||||
Log("################ Iniciando revision de ubicación #############")
|
||||
Log($"${B4XPages.MainPage.lat_gps},${B4XPages.MainPage.lon_gps}"$)
|
||||
If B4XPages.MainPage.lat_gps.Length < 4 Or B4XPages.MainPage.lon_gps.Length < 4 Then
|
||||
ProgressDialogShow2("Buscando ubicación ...", False)
|
||||
CallSubDelayed(Tracker, "Track")
|
||||
CallSubDelayed(Tracker, "StartFLPSmall")
|
||||
wait for GPS_LocationChanged (location1 As Location)
|
||||
ProgressDialogHide
|
||||
End If
|
||||
Log("############### Terminando revision de ubicación #############")
|
||||
|
||||
l_baseodia.Text = "Clientes del día de visita"
|
||||
p_clientes.Width = Root.Width : p_clientes.Height = Root.Height
|
||||
p_clientes.Top = 0 : p_clientes.Left = 0
|
||||
@@ -128,7 +144,7 @@ Sub B4XPage_Appear
|
||||
c = B4XPages.MainPage.skmt.ExecQuery($"select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where gestion = 0 AND CAT_CL_CODIGO <> ${"0"} AND CAT_CL_CODIGO <> ${"1"} ORDER BY CAST(CAT_CL_NUM_SERIEFISICO AS INTEGER) ASC"$)
|
||||
ListView1.Clear
|
||||
lfila.Text = "NOMBRE"
|
||||
|
||||
|
||||
CustomListView1.Clear
|
||||
For i = 0 To c.RowCount - 1
|
||||
c.Position = i
|
||||
@@ -188,12 +204,17 @@ Sub B4XPage_Appear
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Sub GPS_LocationChanged (Location1 As Location)
|
||||
' If p_transparenciaEsperaGPS.IsInitialized Then p_transparenciaEsperaGPS.Visible = False
|
||||
ProgressDialogHide
|
||||
End Sub
|
||||
|
||||
Sub CreateListItem(nombre As String, direccion0 As String, cliente As String) As Panel
|
||||
Dim p As B4XView = xui.CreatePanel("")
|
||||
p.SetLayoutAnimated(0, 0, 0, 1, 220)
|
||||
' p.LoadLayout("datoscliente")
|
||||
p.LoadLayout("datosclienteBotones")
|
||||
p.Height = 90dip
|
||||
p.Height = 95dip
|
||||
b_inicioVenta.Tag = cliente
|
||||
' p.Width = clv_orden.GetBase.Width
|
||||
nombrecliente.Text = nombre
|
||||
@@ -285,8 +306,7 @@ Sub BUSCA_TextChanged (Old As String, New As String)
|
||||
Else
|
||||
cxc.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
d = B4XPages.MainPage.skmt.ExecQuery($"select IFNULL(CAT_CL_BCREDITO,0) AS CAT_CL_BCREDITO FROM kmt_info WHERE CAT_CL_CODIGO = '${c2.GetString("CAT_CL_CODIGO")}'"$)
|
||||
' LogColor(d.RowCount,Colors.Blue)
|
||||
If d.RowCount > 0 Then
|
||||
@@ -302,8 +322,7 @@ Sub BUSCA_TextChanged (Old As String, New As String)
|
||||
CREDITO.Visible = False
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
|
||||
If c2.RowCount>0 Then
|
||||
For i=0 To c2.RowCount -1
|
||||
c2.Position=i
|
||||
@@ -351,8 +370,7 @@ Sub BUSCA_TextChanged (Old As String, New As String)
|
||||
CREDITO.Visible = False
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
|
||||
If c2.RowCount>0 Then
|
||||
For i=0 To c2.RowCount -1
|
||||
c2.Position=i
|
||||
@@ -495,7 +513,7 @@ Private Sub b_buscar_Click
|
||||
End If
|
||||
|
||||
d = B4XPages.MainPage.skmt.ExecQuery($"select IFNULL(CAT_CL_BCREDITO,0) AS CAT_CL_BCREDITO FROM kmt_info WHERE CAT_CL_CODIGO = '${c.GetString("CAT_CL_CODIGO")}'"$)
|
||||
' LogColor(d.RowCount,Colors.Blue)
|
||||
' LogColor(d.RowCount,Colors.Blue)
|
||||
If d.RowCount > 0 Then
|
||||
d.Position = 0
|
||||
LogColor(d.GetString("CAT_CL_BCREDITO"),Colors.Blue)
|
||||
@@ -598,7 +616,7 @@ Private Sub b_inicioVenta_Click
|
||||
Else
|
||||
p_transparenciaIniciaInicioFinVenta.Visible = True
|
||||
b_finVenta.Enabled = True
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, Subs.traeAlmacen, Subs.traeRuta, "Inicia Venta", cliente, Subs.fechanormal(DateTime.Now), "", Starter.lat_gps, Starter.lon_gps, "2", "", "", "")
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, Subs.traeAlmacen, Subs.traeRuta, "Inicia Venta", cliente, Subs.fechanormal(DateTime.Now), "", B4XPages.MainPage.lat_gps, B4XPages.MainPage.lon_gps, "2", "", "", "")
|
||||
Starter.enVenta = True
|
||||
Subs.enVenta(1, "CLIENTES")
|
||||
LogColor($">>>>>> INICIA VENTA: ${Starter.enVenta} - ${cliente}"$, Colors.red)
|
||||
@@ -623,7 +641,7 @@ Private Sub ventaIniciada
|
||||
' Log($"insert into cuentaa (cuenta) values ('${cliente}')"$)
|
||||
p_transparenciaIniciaInicioFinVenta.Visible = True
|
||||
b_finVenta.Enabled = True
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, Subs.traeAlmacen, Subs.traeRuta, "Inicia Venta", Subs.traeCliente, Subs.fechanormal(DateTime.Now), "", Starter.lat_gps, Starter.lon_gps, "2", "", "", "")
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, Subs.traeAlmacen, Subs.traeRuta, "Inicia Venta", Subs.traeCliente, Subs.fechanormal(DateTime.Now), "", B4XPages.MainPage.lat_gps, B4XPages.MainPage.lon_gps, "2", "", "", "")
|
||||
Starter.enVenta = True
|
||||
Subs.enVenta(1, "CLIENTES")
|
||||
LogColor($">>>>>> INICIA VENTA: ${Starter.enVenta} - ${Subs.traeCliente}"$, Colors.red)
|
||||
@@ -652,7 +670,7 @@ Private Sub b_guardarPeso_Click
|
||||
et_guardarPeso.Text = peso
|
||||
|
||||
Subs.guardaPeso("VENTA", Subs.traeAlmacen, Subs.traeRuta2(Subs.traeCliente), Subs.traeUsuarioDeBD, Subs.traeCliente, peso, "", "", "")
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, Subs.traeAlmacen, Subs.traeRuta2(Subs.traeCliente), "Termina Venta", Subs.traeCliente, "", Subs.fechanormal(DateTime.Now), Starter.lat_gps, Starter.lon_gps, 2, "", "", $"Venta:${et_guardarPeso.text}"$)
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, Subs.traeAlmacen, Subs.traeRuta2(Subs.traeCliente), "Termina Venta", Subs.traeCliente, "", Subs.fechanormal(DateTime.Now), B4XPages.MainPage.lat_gps, B4XPages.MainPage.lon_gps, 2, "", "", $"Venta:${et_guardarPeso.text}"$)
|
||||
Starter.skmt.ExecNonQuery("UPDATE kmt_info set gestion = 2 where CAT_CL_CODIGO In (select cuenta from cuentaa)")
|
||||
Starter.enVenta = False
|
||||
Subs.enVenta(0, "")
|
||||
@@ -662,6 +680,7 @@ Private Sub b_guardarPeso_Click
|
||||
b_finVenta.Enabled = False
|
||||
B4XPages.MainPage.clientes.B4XPage_Appear
|
||||
Subs.mandaPendientes
|
||||
B4XPage_Appear
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -717,7 +736,7 @@ Private Sub b_guardaNoVenta_Click
|
||||
DateTime.DateFormat="yy-MM-dd HH:mm:ss"
|
||||
Dim fecha As String=DateTime.Date(DateTime.Now)
|
||||
Subs.guardaPeso("NO VENTA", Subs.traeAlmacen, Subs.traeRuta2(Subs.traeCliente), Subs.traeUsuarioDeBD, Subs.traeCliente, "0", motivo, et_comentarioNoVenta.text, fotoCerrado)
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, Subs.traeAlmacen, Subs.traeRuta, "No Venta", Subs.traeCliente, "", Subs.fechanormal(DateTime.Now), Starter.lat_gps, Starter.lon_gps, 2, motivo, et_comentarioNoVenta.text, $"Venta:${et_guardarPeso.text}"$)
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, Subs.traeAlmacen, Subs.traeRuta, "No Venta", Subs.traeCliente, "", Subs.fechanormal(DateTime.Now), B4XPages.MainPage.lat_gps, B4XPages.MainPage.lon_gps, 2, motivo, et_comentarioNoVenta.text, $"Venta:${et_guardarPeso.text}"$)
|
||||
Starter.enVenta = False
|
||||
Subs.enVenta(0, "")
|
||||
Starter.skmt.ExecNonQuery("UPDATE kmt_info set gestion = 3 where CAT_CL_CODIGO In (select cuenta from cuentaa)")
|
||||
@@ -726,7 +745,7 @@ Private Sub b_guardaNoVenta_Click
|
||||
p_transparenciaIniciaInicioFinVenta.Visible = False
|
||||
End If
|
||||
Subs.mandaPendientes
|
||||
|
||||
B4XPage_Appear
|
||||
' DateTime.DateFormat="yy-MM-dd HH:mm:ss"
|
||||
' Dim fecha As String=DateTime.Date(DateTime.Now)
|
||||
'
|
||||
@@ -970,4 +989,8 @@ Sub JobDone(Job As HttpJob)
|
||||
End If
|
||||
LogColor(">>>>> Job.Release Clientes - " & Job.Tag, Colors.RGB(179, 146, 0))
|
||||
Job.Release
|
||||
End Sub
|
||||
|
||||
Private Sub p_transparenciaEsperaGPS_Click
|
||||
|
||||
End Sub
|
||||
@@ -131,7 +131,7 @@ Sub GUARDA_Click
|
||||
B4XPages.MainPage.skmt.ExecNonQuery2("update PEDIDO_INICIO_FINAL set PIF_HORA_FINAL = ? where PIF_CLIENTE = ? and PIF_HORA_FINAL = 0", Array As Object (DateTime.Now, cuenta))
|
||||
LogColor($"actualizamos "${cuenta}, hora_final=${DateTime.now}"$,Colors.Red)
|
||||
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), usuario, Subs.traeAlmacen, Subs.traeRuta, "No Venta", Subs.traeCliente, "", Subs.fechanormal(DateTime.Now), Starter.lat_gps, Starter.lon_gps, B4XPages.MainPage.cliente.precision, motivo, e_comm.text, "")
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), usuario, Subs.traeAlmacen, Subs.traeRuta, "No Venta", Subs.traeCliente, "", Subs.fechanormal(DateTime.Now), B4XPages.MainPage.lat_gps, B4XPages.MainPage.lon_gps, B4XPages.MainPage.cliente.precision, motivo, e_comm.text, "")
|
||||
|
||||
mandaPendientesnoventa
|
||||
B4XPages.ShowPage("Principal")
|
||||
|
||||
@@ -592,7 +592,7 @@ Sub B4XPage_Appear
|
||||
End Sub
|
||||
|
||||
Sub b_subir_Click
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, ALMACEN, l_ruta.Text, "Enviar Dia", "", Subs.fechanormal(DateTime.Now), Subs.fechanormal(DateTime.Now), Starter.lat_gps, Starter.lon_gps, "2", "", "", "")
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, ALMACEN, l_ruta.Text, "Enviar Dia", "", Subs.fechanormal(DateTime.Now), Subs.fechanormal(DateTime.Now), B4XPages.MainPage.lat_gps, B4XPages.MainPage.lon_gps, "2", "", "", "")
|
||||
CARGA = "SUBIR"
|
||||
p_mandaInfo.Width = Root.Width
|
||||
p_mandaInfo.Height = Root.Height
|
||||
@@ -2353,7 +2353,6 @@ Sub B_OK_PAS_Click
|
||||
img2.Visible=False
|
||||
Subs.panelVisible(p_principal, 0, 0)
|
||||
If E_RUTA2.Text <> "" Then
|
||||
|
||||
B4XPages.MainPage.skmt.ExecNonQuery2("INSERT INTO RUTA_SUPLENCIA(RS_RUTA) VALUES(?)",Array As String(E_RUTA2.Text))
|
||||
End If
|
||||
B4XPages.MainPage.skmt.ExecNonQuery2("INSERT INTO RUTAA(RUTAA) VALUES(?)",Array As String(e_ruta.Text))
|
||||
@@ -2442,7 +2441,7 @@ Sub resdia_Click
|
||||
Private utr As Cursor = Starter.skmt.ExecQuery($"select ifnull(sum(pe_peso),0) as totalPesoActual,
|
||||
(select count(pe_cliente) from pesos where pe_tipo = 'VENTA') as conVenta,
|
||||
(select count(distinct pe_cliente) from pesos) as visitados,
|
||||
(select count(cat_cl_codigo) from kmt_info) as totalAVisitar
|
||||
(select count(cat_cl_codigo) from kmt_info where cat_cl_codigo not in ('0', '1')) as totalAVisitar
|
||||
from pesos"$)
|
||||
If utr.RowCount > 0 Then
|
||||
utr.position = 0
|
||||
@@ -2847,8 +2846,6 @@ Private Sub p_mandaInfo_Click
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub iv_abordo_Click
|
||||
Starter.skmt.ExecNonQuery("delete from CUENTAA")
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object("0"))
|
||||
|
||||
@@ -133,7 +133,7 @@ Sub B4XPage_Appear
|
||||
label2.TextColor = Colors.Blue
|
||||
label2.Height = 88dip
|
||||
label2.Width = ListView1.Width - 10dip
|
||||
ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),c.GetString("NOMBRE") &" SubTotal "& c.GetString("PC_MONTO") & " kgs.")
|
||||
ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),c.GetString("NOMBRE") &" Total "& c.GetString("PC_MONTO") & " kgs.")
|
||||
Next
|
||||
End If
|
||||
c.Close
|
||||
@@ -158,6 +158,16 @@ Sub Activity_KeyPress (key As Int) As Boolean
|
||||
End Sub
|
||||
|
||||
Sub ListView1_ItemLongClick (Position As Int, Value As Object)
|
||||
Log("################ Iniciando revision de ubicación #############")
|
||||
Log($"${B4XPages.MainPage.lat_gps},${B4XPages.MainPage.lon_gps}"$)
|
||||
If B4XPages.MainPage.lat_gps.Length < 4 Or B4XPages.MainPage.lon_gps.Length < 4 Then
|
||||
ProgressDialogShow2("Buscando ubicación ...", False)
|
||||
CallSubDelayed(Tracker, "Track")
|
||||
CallSubDelayed(Tracker, "StartFLPSmall")
|
||||
wait for GPS_LocationChanged (location1 As Location)
|
||||
ProgressDialogHide
|
||||
End If
|
||||
Log("############### Terminando revision de ubicación #############")
|
||||
Private cliente As String = Value
|
||||
Log(Value)
|
||||
Starter.skmt.ExecNonQuery($"delete from cuentaa"$)
|
||||
@@ -174,7 +184,7 @@ Sub ListView1_ItemLongClick (Position As Int, Value As Object)
|
||||
Else
|
||||
p_transparenciaIniciaInicioFinVenta.Visible = True
|
||||
b_finVenta.Enabled = True
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, Subs.traeAlmacen, Subs.traeRuta, "Inicia Venta", cliente, Subs.fechanormal(DateTime.Now), "", Starter.lat_gps, Starter.lon_gps, "2", "", "", "Tickets Día")
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, Subs.traeAlmacen, Subs.traeRuta, "Inicia Venta", cliente, Subs.fechanormal(DateTime.Now), "", B4XPages.MainPage.lat_gps, B4XPages.MainPage.lon_gps, "2", "", "", "Tickets Día")
|
||||
Starter.enVenta = True
|
||||
Subs.enVenta(1, "CLIENTES")
|
||||
LogColor($">>>>>> INICIA VENTA: ${Starter.enVenta} - ${cliente}"$, Colors.red)
|
||||
@@ -189,8 +199,6 @@ Sub ListView1_ItemLongClick (Position As Int, Value As Object)
|
||||
c.Close
|
||||
Log("CLIENTE: " & cliente)
|
||||
|
||||
|
||||
|
||||
' B4XPages.MainPage.skmt.ExecNonQuery("delete from CUENTAA")
|
||||
' B4XPages.MainPage.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object(Value))
|
||||
' DateTime.TimeFormat = "HHmmss"
|
||||
@@ -210,6 +218,11 @@ Sub ListView1_ItemLongClick (Position As Int, Value As Object)
|
||||
' B4XPages.ShowPage("cliente")
|
||||
End Sub
|
||||
|
||||
Sub GPS_LocationChanged (Location1 As Location)
|
||||
' If p_transparenciaEsperaGPS.IsInitialized Then p_transparenciaEsperaGPS.Visible = False
|
||||
ProgressDialogHide
|
||||
End Sub
|
||||
|
||||
Sub b_noventa0_Click
|
||||
If nombre_boton = "NOVENTA" Then
|
||||
nombre_boton = "VENTA"
|
||||
@@ -249,7 +262,7 @@ Sub b_noventa0_Click
|
||||
label2 = ListView1.TwoLinesLayout.SecondLabel
|
||||
label2.TextSize = 13
|
||||
label2.TextColor = Colors.Blue
|
||||
ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),c.GetString("NOMBRE") &" SubTotal "& c.GetString("PC_MONTO") & " kgs.")
|
||||
ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),c.GetString("NOMBRE") &" Total "& c.GetString("PC_MONTO") & " kgs.")
|
||||
Next
|
||||
End If
|
||||
c.Close
|
||||
@@ -284,7 +297,7 @@ Private Sub b_guardaNoVenta_Click
|
||||
DateTime.DateFormat="yy-MM-dd HH:mm:ss"
|
||||
Dim fecha As String=DateTime.Date(DateTime.Now)
|
||||
Subs.guardaPeso("NO VENTA", Subs.traeAlmacen, Subs.traeRuta2(Subs.traeCliente), Subs.traeUsuarioDeBD, Subs.traeCliente, "0", motivo, et_comentarioNoVenta.text, fotoCerrado)
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, Subs.traeAlmacen, Subs.traeRuta, "No Venta", Subs.traeCliente, "", Subs.fechanormal(DateTime.Now), Starter.lat_gps, Starter.lon_gps, 2, motivo, et_comentarioNoVenta.text, $"Tickets Día Venta:${et_guardarPeso.text}"$)
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, Subs.traeAlmacen, Subs.traeRuta, "No Venta", Subs.traeCliente, "", Subs.fechanormal(DateTime.Now), B4XPages.MainPage.lat_gps, B4XPages.MainPage.lon_gps, 2, motivo, et_comentarioNoVenta.text, $"Tickets Día Venta:${et_guardarPeso.text}"$)
|
||||
Starter.enVenta = False
|
||||
Subs.enVenta(0, "")
|
||||
Starter.skmt.ExecNonQuery("UPDATE kmt_info set gestion = 3 where CAT_CL_CODIGO In (select cuenta from cuentaa)")
|
||||
@@ -293,6 +306,7 @@ Private Sub b_guardaNoVenta_Click
|
||||
p_transparenciaIniciaInicioFinVenta.Visible = False
|
||||
End If
|
||||
Subs.mandaPendientes
|
||||
B4XPage_Appear
|
||||
End Sub
|
||||
|
||||
Private Sub b_cancelaNoVenta_Click
|
||||
@@ -305,7 +319,7 @@ Private Sub b_guardarPeso_Click
|
||||
et_guardarPeso.Text = peso
|
||||
|
||||
Subs.guardaPeso("VENTA", Subs.traeAlmacen, Subs.traeRuta2(Subs.traeCliente), Subs.traeUsuarioDeBD, Subs.traeCliente, peso, "", "", "")
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, Subs.traeAlmacen, Subs.traeRuta2(Subs.traeCliente), "Termina Venta", Subs.traeCliente, "", Subs.fechanormal(DateTime.Now), Starter.lat_gps, Starter.lon_gps, 2, "", "", $"Tickets Día Venta:${et_guardarPeso.text}"$)
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, Subs.traeAlmacen, Subs.traeRuta2(Subs.traeCliente), "Termina Venta", Subs.traeCliente, "", Subs.fechanormal(DateTime.Now), B4XPages.MainPage.lat_gps, B4XPages.MainPage.lon_gps, 2, "", "", $"Tickets Día Venta:${et_guardarPeso.text}"$)
|
||||
Starter.skmt.ExecNonQuery("UPDATE kmt_info set gestion = 2 where CAT_CL_CODIGO In (select cuenta from cuentaa)")
|
||||
Starter.enVenta = False
|
||||
Subs.enVenta(0, "")
|
||||
@@ -315,6 +329,7 @@ Private Sub b_guardarPeso_Click
|
||||
b_finVenta.Enabled = False
|
||||
B4XPages.MainPage.ticketsDia.B4XPage_Appear
|
||||
Subs.mandaPendientes
|
||||
B4XPage_Appear
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -418,6 +418,7 @@ Sub GPS_LocationChanged (Parametro As Location)
|
||||
' gmap.AnimateCamera(cp)
|
||||
' End If
|
||||
' End If
|
||||
ProgressDialogHide
|
||||
End Sub
|
||||
|
||||
Sub Activity_Pause (UserClosed As Boolean)
|
||||
@@ -468,7 +469,7 @@ Private Sub b_inicioVenta_Click
|
||||
r_opcion3.Checked = False
|
||||
r_opcion4.Checked = False
|
||||
b_finVenta.Enabled = True
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, Subs.traeAlmacen, Subs.traeRuta, "Inicia Venta", Subs.traeCliente, Subs.fechanormal(DateTime.Now), "", Starter.lat_gps, Starter.lon_gps, "2", "", "", "")
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, Subs.traeAlmacen, Subs.traeRuta, "Inicia Venta", Subs.traeCliente, Subs.fechanormal(DateTime.Now), "", B4XPages.MainPage.lat_gps, B4XPages.MainPage.lon_gps, "2", "", "", "")
|
||||
Starter.enVenta = True
|
||||
Subs.enVenta(1, "MAPA")
|
||||
l_venta.Text = "Ve a tu app de venta y cuando termines regresa aqui y presiona el botón para ingresar ""Peso"" o ""No Venta"""
|
||||
@@ -516,7 +517,7 @@ Private Sub b_guardarPeso_Click
|
||||
et_guardarPeso.Text = peso
|
||||
|
||||
Subs.guardaPeso("VENTA", Subs.traeAlmacen, Subs.traeRuta2(Subs.traeCliente), Subs.traeUsuarioDeBD, Subs.traeCliente, peso, "", "", "")
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, Subs.traeAlmacen, Subs.traeRuta, "Termina Venta", Subs.traeCliente, "", Subs.fechanormal(DateTime.Now), Starter.lat_gps, Starter.lon_gps, 2, "", "", $"Venta:${et_guardarPeso.text}"$)
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, Subs.traeAlmacen, Subs.traeRuta, "Termina Venta", Subs.traeCliente, "", Subs.fechanormal(DateTime.Now), B4XPages.MainPage.lat_gps, B4XPages.MainPage.lon_gps, 2, "", "", $"Venta:${et_guardarPeso.text}"$)
|
||||
Starter.skmt.ExecNonQuery("UPDATE kmt_info set gestion = 2 where CAT_CL_CODIGO In (select cuenta from cuentaa)")
|
||||
Starter.enVenta = False
|
||||
Subs.enVenta(0, "")
|
||||
@@ -578,7 +579,7 @@ Private Sub b_guardaNoVenta_Click
|
||||
DateTime.DateFormat="yy-MM-dd HH:mm:ss"
|
||||
Dim fecha As String=DateTime.Date(DateTime.Now)
|
||||
Subs.guardaPeso("NO VENTA", Subs.traeAlmacen, Subs.traeRuta2(Subs.traeCliente), Subs.traeUsuarioDeBD, Subs.traeCliente, "0", motivo, et_comentarioNoVenta.text, fotoCerrado)
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, Subs.traeAlmacen, Subs.traeRuta, "No Venta", Subs.traeCliente, "", Subs.fechanormal(DateTime.Now), Starter.lat_gps, Starter.lon_gps, 2, motivo, et_comentarioNoVenta.text, $"Venta:${et_guardarPeso.text}"$)
|
||||
Subs.bitacora(Subs.fechanormal(DateTime.Now), Subs.traeUsuarioDeBD, Subs.traeAlmacen, Subs.traeRuta, "No Venta", Subs.traeCliente, "", Subs.fechanormal(DateTime.Now), B4XPages.MainPage.lat_gps, B4XPages.MainPage.lon_gps, 2, motivo, et_comentarioNoVenta.text, $"Venta:${et_guardarPeso.text}"$)
|
||||
Starter.enVenta = False
|
||||
Subs.enVenta(0, "")
|
||||
Starter.skmt.ExecNonQuery("UPDATE kmt_info set gestion = 3 where CAT_CL_CODIGO In (select cuenta from cuentaa)")
|
||||
|
||||
@@ -170,6 +170,10 @@ Sub reinicializaReqManager(srv As String)
|
||||
LogColor(srv, Colors.red)
|
||||
End Sub
|
||||
|
||||
public Sub Tracker_UbicacionActualizada (Location1 As Location)
|
||||
|
||||
End Sub
|
||||
|
||||
Sub JobDone(Job As HttpJob)
|
||||
Log("JOBDONE STARTER")
|
||||
Try
|
||||
|
||||
12
B4A/Subs.bas
12
B4A/Subs.bas
@@ -1584,6 +1584,18 @@ End Sub
|
||||
'Mandar fecha de sync(sysdate)
|
||||
Sub bitacora(fechab As String, usuariob As String, almacenb As String, rutab As String, eventob As String, clienteb As String, iniciob As String, finb As String, latitudb As String, longitudb As String, precision As String, motivonoventa As String, motivonovisita As String, otro As String)
|
||||
Log($"Bitacora: ${eventob}, mnven: ${motivonoventa}, mnvis: ${motivonovisita}"$)
|
||||
|
||||
If latitudb.Length < 4 Then
|
||||
ProgressDialogShow2("Buscando ubicación ...", False)
|
||||
CallSubDelayed(Tracker, "Track")
|
||||
CallSubDelayed(Tracker, "StartFLPSmall")
|
||||
Log($"Coords actuales: ${B4XPages.MainPage.lat_gps}, ${B4XPages.MainPage.lon_gps}"$)
|
||||
If B4XPages.MainPage.lat_gps.Length > 3 And B4XPages.MainPage.lon_gps.Length > 3 Then
|
||||
ProgressDialogHide
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Starter.Logger Then Log("bitacora")
|
||||
Private cmd As DBCommand
|
||||
Private id As String
|
||||
|
||||
@@ -158,9 +158,9 @@ Public Sub StopFLP
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Sub flp_LocationChanged (Location1 As Location)
|
||||
public Sub flp_LocationChanged (Location1 As Location)
|
||||
' ToastMessageShow("Loc changed", False)
|
||||
Log($"Loc changed:${Location1.Longitude},${Location1.Latitude}"$)
|
||||
LogColor($">>> Loc changed:${Location1.Longitude},${Location1.Latitude}"$, Colors.red)
|
||||
B4XPages.MainPage.lat_gps = Location1.Latitude
|
||||
B4XPages.MainPage.lon_gps = Location1.Longitude
|
||||
Starter.lat_gps = Location1.Latitude
|
||||
@@ -196,6 +196,8 @@ Sub flp_LocationChanged (Location1 As Location)
|
||||
End If
|
||||
|
||||
CallSub2(Starter, "GPS_LocationChanged", Location1)
|
||||
CallSub2(B4XPages.MainPage.clientes, "GPS_LocationChanged", Location1)
|
||||
' CallSub2(B4XPages.MainPage.clientes, "Tracker_UbicacionActualizada", Location1)
|
||||
' CallSub2(B4XPages.MainPage.cliente, "GPS_LocationChanged", Location1)
|
||||
' CallSub2(gestion, "GPS_LocationChanged", Location1)
|
||||
If B4XPages.MainPage.cliente.BT_QR.IsInitialized Then
|
||||
@@ -306,7 +308,7 @@ End Sub
|
||||
Sub guardaYEnviaUbicacion(lat As String, lon As String)
|
||||
LogColor("#######################################", Colors.Magenta)
|
||||
LogColor("#######################################", Colors.Magenta)
|
||||
LogColor("#######################################", Colors.Magenta)
|
||||
' LogColor("#######################################", Colors.Magenta)
|
||||
DateTime.DateFormat="yy-MM-dd HH:mm:ss"
|
||||
Private fecha As String = DateTime.Date(DateTime.Now)
|
||||
DateTime.DateFormat="yyMMddHHmmss"
|
||||
@@ -318,6 +320,6 @@ Sub guardaYEnviaUbicacion(lat As String, lon As String)
|
||||
cmd.Name = "guardaHistorialUbicaciones"
|
||||
If B4XPages.MainPage.lat_gps.Length < 15 Then B4XPages.MainPage.lat_gps = B4XPages.MainPage.lat_gps&"0"
|
||||
cmd.Parameters = Array As Object(Subs.traeAlmacen, Subs.traeRuta, usuario, lat, lon, fecha)
|
||||
Log($"${Subs.traeAlmacen}, ${Subs.traeRuta}, ${usuario}, ${lat}, ${lon}, ${fecha}"$)
|
||||
' Log($"${Subs.traeAlmacen}, ${Subs.traeRuta}, ${usuario}, ${lat}, ${lon}, ${fecha}"$)
|
||||
Starter.reqManager.ExecuteCommand(cmd, $"guardaHistorialUbicaciones_${id}"$)
|
||||
End Sub
|
||||
Reference in New Issue
Block a user