mirror of
https://github.com/KeymonSoft/Mariana.git
synced 2026-04-20 06:09:16 +00:00
22/9/23 - Cambios en Nota y nuevo servicio "NotificationService"
- Se modifico "Nota" para que cuando ya este guardado el pedido, ya no se puedan borrar los productos individuales. - Se agregó el servicio "NotificationService" para interceptar notificaciones y por medio de un mensaje de WhatsApp (#NS http://10.0.0.205:1782), cambiar el servidor de DBReq. - Se estandarizó el DBreqServer en Starter.DBReqServer.
This commit is contained in:
@@ -68,7 +68,7 @@ Sub B4XPage_Appear
|
||||
busca.Text = ""
|
||||
entro ="2"
|
||||
colonia = 0
|
||||
c=B4XPages.MainPage.skmt.ExecQuery("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO, CAT_CL_NOEXT, CAT_CL_CALLE1, CAT_CL_SECUENCIA from kmt_info where gestion = 0 ORDER BY CAT_CL_SECUENCIA, CAT_CL_CODIGO")
|
||||
c=Starter.skmt.ExecQuery("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO, CAT_CL_NOEXT, CAT_CL_CALLE1, CAT_CL_SECUENCIA from kmt_info where gestion = 0 ORDER BY CAT_CL_SECUENCIA, CAT_CL_CODIGO")
|
||||
ListView1.Clear
|
||||
' Log("LIMPIAMOS LISTVIEW")
|
||||
lfila.Text = "NOMBRE"
|
||||
@@ -107,7 +107,7 @@ Sub ListView1_ItemClick (Position As Int, Value As Object)
|
||||
Log("-------------------------------" & value2(0))
|
||||
|
||||
If entro = "2" Then
|
||||
c2=B4XPages.MainPage.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(value2(0)))
|
||||
c2=Starter.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(value2(0)))
|
||||
ListView1.Clear
|
||||
lfila.text = "Calle"
|
||||
If c2.RowCount>0 Then
|
||||
@@ -118,7 +118,7 @@ Sub ListView1_ItemClick (Position As Int, Value As Object)
|
||||
End If
|
||||
entro = "3"
|
||||
Else If entro = "3" Then
|
||||
c2=B4XPages.MainPage.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(value2(0), colonia))
|
||||
c2=Starter.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(value2(0), colonia))
|
||||
ListView1.Clear
|
||||
lfila.text = "Nombre"
|
||||
If c2.RowCount>0 Then
|
||||
@@ -129,20 +129,20 @@ Sub ListView1_ItemClick (Position As Int, Value As Object)
|
||||
End If
|
||||
entro = "4"
|
||||
Else If entro = "4" Then
|
||||
B4XPages.MainPage.skmt.ExecNonQuery("delete from CUENTAA")
|
||||
B4XPages.MainPage.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object(value2(0)))
|
||||
Starter.skmt.ExecNonQuery("delete from CUENTAA")
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object(value2(0)))
|
||||
DateTime.TimeFormat = "HHmmss"
|
||||
STIME=DateTime.Time(DateTime.Now)
|
||||
|
||||
s=B4XPages.MainPage.skmt.ExecQuery2("SELECT COUNT(*) AS CUANTOS FROM HIST_STAY_STORE WHERE HSS_IN = ? AND HSS_CODIGO In (select cuenta from cuentaa)", Array As String("0"))
|
||||
s=Starter.skmt.ExecQuery2("SELECT COUNT(*) AS CUANTOS FROM HIST_STAY_STORE WHERE HSS_IN = ? AND HSS_CODIGO In (select cuenta from cuentaa)", Array As String("0"))
|
||||
s.Position = 0
|
||||
If s.GetString("CUANTOS") = 1 Then
|
||||
B4XPages.MainPage.skmt.ExecNonQuery2("UPDATE HIST_STAY_STORE set HSS_IN = ? where HSS_IN = 0 AND HSS_CODIGO In (select cuenta from cuentaa)", Array As Object(STIME))
|
||||
Starter.skmt.ExecNonQuery2("UPDATE HIST_STAY_STORE set HSS_IN = ? where HSS_IN = 0 AND HSS_CODIGO In (select cuenta from cuentaa)", Array As Object(STIME))
|
||||
Else
|
||||
B4XPages.MainPage.skmt.ExecNonQuery2("INSERT INTO HIST_STAY_STORE(HSS_CODIGO, HSS_IN , HSS_OUT , HSS_TOT) VALUES (?,0,0,0)", Array As Object (value2(0)))
|
||||
B4XPages.MainPage.skmt.ExecNonQuery2("UPDATE HIST_STAY_STORE set HSS_IN = ? where HSS_IN = 0 AND HSS_CODIGO In (select cuenta from cuentaa)", Array As Object(STIME))
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO HIST_STAY_STORE(HSS_CODIGO, HSS_IN , HSS_OUT , HSS_TOT) VALUES (?,0,0,0)", Array As Object (value2(0)))
|
||||
Starter.skmt.ExecNonQuery2("UPDATE HIST_STAY_STORE set HSS_IN = ? where HSS_IN = 0 AND HSS_CODIGO In (select cuenta from cuentaa)", Array As Object(STIME))
|
||||
End If
|
||||
B4XPages.MainPage.skmt.ExecNonQuery2("UPDATE HIST_STAY_OUT set HSO_INI = ? where HSO_INI = 0 ", Array As Object(STIME))
|
||||
Starter.skmt.ExecNonQuery2("UPDATE HIST_STAY_OUT set HSO_INI = ? where HSO_INI = 0 ", Array As Object(STIME))
|
||||
DateTime.TimeFormat = "HH:mm:ss"
|
||||
|
||||
Subs.guardaClienteHoraInicio(value2(0))
|
||||
@@ -166,7 +166,7 @@ Sub BUSCA_TextChanged (Old As String, New As String)
|
||||
If Old <> "" And New <> "" Then
|
||||
' Log("BUSCA_TEXTCHANGED")
|
||||
q_buscar = "%" & busca.Text & "%"
|
||||
c2=B4XPages.MainPage.skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO,CAT_CL_SECUENCIA, CAT_CL_CALLE1 from kmt_info where (CAT_CL_NOMBRE like ? OR CAT_CL_CODIGO LIKE ? OR CAT_CL_CALLE1 LIKE ?)and gestion = 0 order by CAT_CL_NOMBRE ", Array As String(q_buscar,q_buscar,q_buscar))
|
||||
c2=Starter.skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO,CAT_CL_SECUENCIA, CAT_CL_CALLE1 from kmt_info where (CAT_CL_NOMBRE like ? OR CAT_CL_CODIGO LIKE ? OR CAT_CL_CALLE1 LIKE ?)and gestion = 0 order by CAT_CL_NOMBRE ", Array As String(q_buscar,q_buscar,q_buscar))
|
||||
ListView1.Clear
|
||||
lfila.text = "Nombre y Calle"
|
||||
' Log("=========================================================================")
|
||||
@@ -203,13 +203,13 @@ End Sub
|
||||
|
||||
Sub sc_result(atype As String,Values As String)
|
||||
CODIGO = Values
|
||||
c2=B4XPages.MainPage.skmt.ExecQuery2("select COUNT(*) AS ENCONTRADO from kmt_info where CAT_CL_NUM_SERIEFISICO = ? order by CAT_CL_NOMBRE ", Array As String(CODIGO))
|
||||
c2=Starter.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=B4XPages.MainPage.skmt.ExecQuery2("select CAT_CL_CODIGO from kmt_info where CAT_CL_NUM_SERIEFISICO = ? order by CAT_CL_NOMBRE ", Array As String(CODIGO))
|
||||
s=Starter.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
|
||||
B4XPages.MainPage.skmt.ExecNonQuery("delete from CUENTAA")
|
||||
B4XPages.MainPage.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object(s.GetString("CAT_CL_CODIGO")))
|
||||
Starter.skmt.ExecNonQuery("delete from CUENTAA")
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object(s.GetString("CAT_CL_CODIGO")))
|
||||
s.Close
|
||||
' b_qr.Visible = False
|
||||
B4XPages.ShowPage("clientes")
|
||||
|
||||
Reference in New Issue
Block a user