mirror of
https://github.com/KeymonSoft/Intmex_Multiventa.git
synced 2026-04-17 21:06:08 +00:00
Version: 5.05.25
En esta version se ajusto el envio de promociones y el como se estaba guardando la promocion en el movil.
This commit is contained in:
@@ -712,7 +712,7 @@ End Sub
|
|||||||
Sub i_engrane_Click
|
Sub i_engrane_Click
|
||||||
lv_server.Clear
|
lv_server.Clear
|
||||||
ime.HideKeyboard
|
ime.HideKeyboard
|
||||||
lv_server.AddSingleLine("http://keymon.lat:1781")
|
lv_server.AddSingleLine("http://keymon.net:1781")
|
||||||
' lv_server.AddSingleLine("http://keymon.lat:1781")
|
' lv_server.AddSingleLine("http://keymon.lat:1781")
|
||||||
If user.Text = "KMTS1" Then lv_server.AddSingleLine("http://10.0.0.205:1781")
|
If user.Text = "KMTS1" Then lv_server.AddSingleLine("http://10.0.0.205:1781")
|
||||||
' lv_server.AddSingleLine("http://40.123.36.38:1782")
|
' lv_server.AddSingleLine("http://40.123.36.38:1782")
|
||||||
|
|||||||
@@ -172,6 +172,7 @@ Sub borra_Click
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub ListView1_ItemLongClick (Position As Int, Value As Object)
|
Sub ListView1_ItemLongClick (Position As Int, Value As Object)
|
||||||
|
Private sDate,sTime, clie_id, usuario As String
|
||||||
Log(Value)
|
Log(Value)
|
||||||
Private X() As String = Regex.Split(" ", Value)
|
Private X() As String = Regex.Split(" ", Value)
|
||||||
' Log(X.Length)
|
' Log(X.Length)
|
||||||
@@ -192,8 +193,8 @@ Sub ListView1_ItemLongClick (Position As Int, Value As Object)
|
|||||||
If Not(Subs.pedidoGuardado) Then
|
If Not(Subs.pedidoGuardado) Then
|
||||||
result = Msgbox2("Seguro que desea borrar este articulo?","Borrar Articulo", "Si", "", "No",LoadBitmap(File.DirAssets,"alert2.png")) 'ignore
|
result = Msgbox2("Seguro que desea borrar este articulo?","Borrar Articulo", "Si", "", "No",LoadBitmap(File.DirAssets,"alert2.png")) 'ignore
|
||||||
If result = DialogResponse.POSITIVE Then
|
If result = DialogResponse.POSITIVE Then
|
||||||
c=B4XPages.MainPage.skmt.ExecQuery2("select PE_PROID,PE_CANT, PE_FOLIO FROM PEDIDO where pe_pronombre = ? and pe_cliente in (Select CUENTA from cuentaa) AND PE_CEDIS = ? ", Array As String(nom, cedis))
|
c =B4XPages.MainPage.skmt.ExecQuery2("select PE_PROID,PE_CANT, PE_FOLIO FROM PEDIDO where pe_pronombre = ? and pe_cliente in (Select CUENTA from cuentaa) AND PE_CEDIS = ? ", Array As String(nom, cedis))
|
||||||
c.Position=0
|
c.Position = 0
|
||||||
Log(vamoaver.Get(Position))
|
Log(vamoaver.Get(Position))
|
||||||
If vamoaver.Get(Position) = "VENTA" Then
|
If vamoaver.Get(Position) = "VENTA" Then
|
||||||
Log("CAT_GUNAPROD2")
|
Log("CAT_GUNAPROD2")
|
||||||
@@ -208,28 +209,10 @@ Sub ListView1_ItemLongClick (Position As Int, Value As Object)
|
|||||||
End If
|
End If
|
||||||
Log(Subs.traeAlmacen)
|
Log(Subs.traeAlmacen)
|
||||||
' B4XPages.MainPage.skmt.ExecNonQuery2($"update ${Starter.tabla} set cat_gp_almacen = cat_gp_almacen + ? where cat_gp_id = ?"$, Array As Object(c.GetString("PE_CANT"),c.GetString("PE_PROID")))
|
' B4XPages.MainPage.skmt.ExecNonQuery2($"update ${Starter.tabla} set cat_gp_almacen = cat_gp_almacen + ? where cat_gp_id = ?"$, Array As Object(c.GetString("PE_CANT"),c.GetString("PE_PROID")))
|
||||||
|
' Log(c.GetString("PE_CANT"))
|
||||||
B4XPages.MainPage.skmt.ExecNonQuery2("INSERT INTO INVENT_X_ENVIAR (ALMACEN , PROID , CANTIDAD ) VALUES(?,?,?) ", Array As Object (Subs.traeAlmacen,c.GetString("PE_PROID"),c.GetString("PE_CANT")* -1))
|
B4XPages.MainPage.skmt.ExecNonQuery2("INSERT INTO INVENT_X_ENVIAR (ALMACEN , PROID , CANTIDAD ) VALUES(?,?,?) ", Array As Object (Subs.traeAlmacen,c.GetString("PE_PROID"),c.GetString("PE_CANT")* -1))
|
||||||
' c2=B4XPages.MainPage.skmt.ExecQuery2($"select count(*) AS CUANTOS from ${Starter.tabla} 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))
|
' c2=B4XPages.MainPage.skmt.ExecQuery2($"select count(*) AS CUANTOS from ${Starter.tabla} 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))
|
||||||
' c2.Position=0
|
' c2.Position=0
|
||||||
' Log(c2.GetString("CUANTOS"))
|
|
||||||
' If c2.GetString("CUANTOS") > 0 Then
|
|
||||||
' j3 = B4XPages.MainPage.skmt.ExecQuery2("SELECT PE_CEDIS, PE_CANT,PE_PROID, PE_PRONOMBRE FROM PEDIDO WHERE PE_CEDIS IN (SELECT PE_CEDIS FROM PEDIDO WHERE PE_PRONOMBRE = ? AND PE_CEDIS <> ?)",Array As String(Value, Subs.traeAlmacen))
|
|
||||||
' Log(j3.RowCount)
|
|
||||||
' If j3.RowCount > 0 Then
|
|
||||||
' Log("estoy aqui")
|
|
||||||
' For i = 0 To j3.RowCount -1
|
|
||||||
' Log("aqui tronare?")
|
|
||||||
' j3.Position = i
|
|
||||||
' B4XPages.MainPage.skmt.ExecNonQuery($"update ${Starter.tabla} set cat_gp_almacen = cat_gp_almacen + ${j3.GetString("PE_CANT")} where cat_gp_id = '${j3.Getstring("PE_PROID")}'"$)
|
|
||||||
' B4XPages.MainPage.skmt.ExecNonQuery($"delete from pedido where pe_cedis in (select pe_cedis from pedido where pe_pronombre = '${j3.GetString("PE_PRONOMBRE")}') and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = '${c.GetString("PE_FOLIO")}' AND PE_CEDIS <> '${Subs.traeAlmacen}'"$) ' , Array As Object(j3.GetString("PE_PRONOMBRE"), c.GetString("PE_FOLIO"), Subs.traeAlmacen)
|
|
||||||
' Next
|
|
||||||
' End If
|
|
||||||
' j3.Close
|
|
||||||
' Else
|
|
||||||
' B4XPages.MainPage.skmt.ExecNonQuery($"update ${Starter.tabla} set cat_gp_almacen = cat_gp_almacen + ${c.GetString("PE_CANT")} where cat_gp_id = '${c.Getstring("PE_PROID")}'"$)
|
|
||||||
' B4XPages.MainPage.skmt.ExecNonQuery2("delete from pedido where pe_pronombre = ? and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = ? AND PE_CEDIS = ?", Array As Object(Value, c.GetString("PE_FOLIO"), Subs.traeAlmacen))
|
|
||||||
' End If
|
|
||||||
|
|
||||||
If cedis <> Subs.traeAlmacen Then
|
If cedis <> Subs.traeAlmacen Then
|
||||||
j3 = B4XPages.MainPage.skmt.ExecQuery2("SELECT PE_CEDIS, PE_CANT,PE_PROID, PE_PRONOMBRE, PE_FOLIO FROM PEDIDO WHERE PE_CEDIS IN (SELECT PE_CEDIS FROM PEDIDO WHERE PE_PRONOMBRE = ? and PE_CEDIS = ?)",Array As String(nom,cedis))
|
j3 = B4XPages.MainPage.skmt.ExecQuery2("SELECT PE_CEDIS, PE_CANT,PE_PROID, PE_PRONOMBRE, PE_FOLIO FROM PEDIDO WHERE PE_CEDIS IN (SELECT PE_CEDIS FROM PEDIDO WHERE PE_PRONOMBRE = ? and PE_CEDIS = ?)",Array As String(nom,cedis))
|
||||||
Log(j3.RowCount)
|
Log(j3.RowCount)
|
||||||
@@ -253,8 +236,7 @@ Sub ListView1_ItemLongClick (Position As Int, Value As Object)
|
|||||||
B4XPages.MainPage.skmt.ExecNonQuery($"update ${Starter.tabla} set cat_gp_almacen = cat_gp_almacen + ${c.GetString("PE_CANT")} where cat_gp_id = '${c.Getstring("PE_PROID")}'"$)
|
B4XPages.MainPage.skmt.ExecNonQuery($"update ${Starter.tabla} set cat_gp_almacen = cat_gp_almacen + ${c.GetString("PE_CANT")} where cat_gp_id = '${c.Getstring("PE_PROID")}'"$)
|
||||||
B4XPages.MainPage.skmt.ExecNonQuery2("delete from pedido where pe_pronombre = ? and pe_cedis = ? and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = ?", Array As Object(nom, cedis, vamoaver.Get(Position)))
|
B4XPages.MainPage.skmt.ExecNonQuery2("delete from pedido where pe_pronombre = ? and pe_cedis = ? and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = ?", Array As Object(nom, cedis, vamoaver.Get(Position)))
|
||||||
End If
|
End If
|
||||||
|
c.Close
|
||||||
' c.Close
|
|
||||||
' c2.Close
|
' c2.Close
|
||||||
DateTime.DateFormat = "MM/dd/yyyy"
|
DateTime.DateFormat = "MM/dd/yyyy"
|
||||||
sDate=DateTime.Date(DateTime.Now)
|
sDate=DateTime.Date(DateTime.Now)
|
||||||
|
|||||||
@@ -1218,8 +1218,8 @@ End Sub
|
|||||||
|
|
||||||
Private Sub btnGuardaPromo_Click
|
Private Sub btnGuardaPromo_Click
|
||||||
|
|
||||||
Subs.guardaProductoSinGestion(Subs.traeAlmacen, 0, lblSumPromo.Text, Encabezado, estaPromo, Subs.traeCliente, Subs.traeFecha, Subs.traeUsuarioDeBD, Subs.traeRuta, 0, B4XPages.MainPage.tipo_venta)
|
Subs.guardaProductoSinGestion(estaPromo, 0, lblSumPromo.Text, Encabezado, estaPromo, Subs.traeCliente, Subs.traeFecha, Subs.traeUsuarioDeBD, Subs.traeRuta, 0, B4XPages.MainPage.tipo_venta)
|
||||||
|
' Log("Esto es encabezado>>>>>>>>>>" & Encabezado)
|
||||||
If productosFijos > 0 Then
|
If productosFijos > 0 Then
|
||||||
Log("Guardando productos fijos...")
|
Log("Guardando productos fijos...")
|
||||||
For i = 0 To pnlFijos.NumberOfViews - 1
|
For i = 0 To pnlFijos.NumberOfViews - 1
|
||||||
@@ -1312,8 +1312,8 @@ Private Sub btnGuardaPromo_Click
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnContinuar_Click
|
Private Sub btnContinuar_Click
|
||||||
Subs.guardaProductoSinGestion(Subs.traeAlmacen, 0, lblSumPromo.Text, Encabezado, estaPromo, Subs.traeCliente, Subs.traeFecha, Subs.traeUsuarioDeBD, Subs.traeRuta, 0, B4XPages.MainPage.tipo_venta)
|
Subs.guardaProductoSinGestion(estaPromo, 0, lblSumPromo.Text, Encabezado, estaPromo, Subs.traeCliente, Subs.traeFecha, Subs.traeUsuarioDeBD, Subs.traeRuta, 0, B4XPages.MainPage.tipo_venta)
|
||||||
|
' Log(Encabezado)
|
||||||
If productosFijos > 0 Then
|
If productosFijos > 0 Then
|
||||||
For i = 0 To pnlFijos.NumberOfViews - 1
|
For i = 0 To pnlFijos.NumberOfViews - 1
|
||||||
Dim pnlProducto As Panel = pnlFijos.GetView(i)
|
Dim pnlProducto As Panel = pnlFijos.GetView(i)
|
||||||
@@ -1324,6 +1324,7 @@ Private Sub btnContinuar_Click
|
|||||||
Private idProducto As String = lblNombre.tag
|
Private idProducto As String = lblNombre.tag
|
||||||
Dim nomProd() As String = Regex.Split("\r\n|\n", nombreProducto)
|
Dim nomProd() As String = Regex.Split("\r\n|\n", nombreProducto)
|
||||||
Subs.guardaProductoSinGestion(estaPromo, precioProducto, cantidad, nomProd(0), idProducto, Subs.traeCliente, Subs.traeFecha, Subs.traeUsuarioDeBD, Subs.traeRuta, 0, B4XPages.MainPage.tipo_venta)
|
Subs.guardaProductoSinGestion(estaPromo, precioProducto, cantidad, nomProd(0), idProducto, Subs.traeCliente, Subs.traeFecha, Subs.traeUsuarioDeBD, Subs.traeRuta, 0, B4XPages.MainPage.tipo_venta)
|
||||||
|
Log("" & estaPromo & "" & precioProducto & "" & cantidad & "" & nomProd(0) & "" & idProducto & "" & Subs.traeCliente & "" & Subs.traeFecha & "" & Subs.traeUsuarioDeBD & "" & Subs.traeRuta & "" & 0 & "" & B4XPages.MainPage.tipo_venta)
|
||||||
Next
|
Next
|
||||||
Else
|
Else
|
||||||
Log("No hay productos fijos para guardar.")
|
Log("No hay productos fijos para guardar.")
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ Version=13.1
|
|||||||
#Region Project Attributes
|
#Region Project Attributes
|
||||||
#ApplicationLabel: Intmex
|
#ApplicationLabel: Intmex
|
||||||
#VersionCode: 1
|
#VersionCode: 1
|
||||||
#VersionName: 5.05.18
|
#VersionName: 5.05.25
|
||||||
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
||||||
#SupportedOrientations: portrait
|
#SupportedOrientations: portrait
|
||||||
#CanInstallToExternalStorage: False
|
#CanInstallToExternalStorage: False
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ ModuleBreakpoints11=
|
|||||||
ModuleBreakpoints12=
|
ModuleBreakpoints12=
|
||||||
ModuleBreakpoints13=
|
ModuleBreakpoints13=
|
||||||
ModuleBreakpoints14=
|
ModuleBreakpoints14=
|
||||||
ModuleBreakpoints15=1301
|
ModuleBreakpoints15=
|
||||||
ModuleBreakpoints16=
|
ModuleBreakpoints16=
|
||||||
ModuleBreakpoints17=
|
ModuleBreakpoints17=
|
||||||
ModuleBreakpoints18=
|
ModuleBreakpoints18=
|
||||||
@@ -91,6 +91,6 @@ ModuleClosedNodes6=
|
|||||||
ModuleClosedNodes7=
|
ModuleClosedNodes7=
|
||||||
ModuleClosedNodes8=
|
ModuleClosedNodes8=
|
||||||
ModuleClosedNodes9=
|
ModuleClosedNodes9=
|
||||||
NavigationStack=C_Productos,b_terminar1_Click,754,0,Subs,guardaProductoSinGestion,764,0,C_Promos,SumarVariables1,1498,0,C_Promos,btnGuardaPromo_Click,1222,6,C_Promos,btnContinuar_Click,1316,0,C_Promos,muestraPromo,421,6,Starter,Application_Error,139,0,Starter,Process_Globals,22,0,C_Principal,Subir_Click,597,6,Starter,ENVIA_ULTIMA_GPS,107,0
|
NavigationStack=Subs,guardaProductoSinGestion,764,0,C_Promos,btnGuardaPromo_Click,1214,6,C_Promos,btnContinuar_Click,1308,4,C_Productos,b_continuar_Click,793,0,C_Productos,l_prodX_LongClick,808,0,C_Nota,B4XPage_Appear,100,0,C_Productos,b_aceptar_Click,901,0,C_Productos,lv_prodsPedido_ItemLongClick,904,0,C_Nota,borra_Click,157,0,C_Nota,ListView1_ItemLongClick,170,5,Main,Activity_ActionBarHomeClick,37,0
|
||||||
SelectedBuild=0
|
SelectedBuild=0
|
||||||
VisibleModules=28,2,13,20,14,9,4,29,27,17,15,22
|
VisibleModules=28,2,13,20,14,9,4,29,27,17,15
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ Sub Process_Globals
|
|||||||
Public FLP As FusedLocationProvider
|
Public FLP As FusedLocationProvider
|
||||||
' Private flpStarted As Boolean
|
' Private flpStarted As Boolean
|
||||||
Dim reqManager As DBRequestManager
|
Dim reqManager As DBRequestManager
|
||||||
Dim DBReqServer As String = "http://187.189.244.154:1781"
|
Dim DBReqServer As String = "http://keymon.net:1781"
|
||||||
' Dim DBReqServer As String = "http://11.0.0.119:1781"
|
' Dim DBReqServer As String = "http://11.0.0.119:1781"
|
||||||
' Dim DBReqServer As String = "http://10.0.0.205:1783"
|
' Dim DBReqServer As String = "http://10.0.0.205:1783"
|
||||||
' Dim DBReqServer As String = "http://192.168.100.10:1781"
|
' Dim DBReqServer As String = "http://192.168.100.10:1781"
|
||||||
|
|||||||
@@ -771,7 +771,7 @@ End Sub
|
|||||||
Sub guardaProductoSinGestion(cedis As String, costoU As String, cant As String, nombre As String, prodId As String, clienteId As String, fecha As String, usuario As String, rutaV As String, precioSin As String, tipoVenta As String)
|
Sub guardaProductoSinGestion(cedis As String, costoU As String, cant As String, nombre As String, prodId As String, clienteId As String, fecha As String, usuario As String, rutaV As String, precioSin As String, tipoVenta As String)
|
||||||
' LogColor("guardaProducto: "&prodId&", cant="&cant, Colors.Magenta)
|
' LogColor("guardaProducto: "&prodId&", cant="&cant, Colors.Magenta)
|
||||||
Private c As Cursor
|
Private c As Cursor
|
||||||
B4XPages.MainPage.skmt.ExecNonQuery2("INSERT INTO PEDIDO (PE_CEDIS, PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO,PE_RUTA,PE_COSTO_SIN,PE_FOLIO,PE_ENVIO_OK) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,0) ", Array As Object (cedis, (cant * costoU), costoU, cant, nombre, prodId, clienteId, fecha, usuario, rutaV, precioSin, tipoVenta))
|
B4XPages.MainPage.skmt.ExecNonQuery2("INSERT INTO PEDIDO (PE_CEDIS, PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO,PE_RUTA,PE_COSTO_SIN,PE_FOLIO,PE_ENVIO_OK) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,0) ", Array As Object (cedis, (cant * costoU), costoU, cant, nombre, prodId, clienteId, fecha, usuario, rutaV, precioSin, tipoVenta))
|
||||||
'( cedis, (cant * costoU), costoU, cant, nombre, prodId, clienteId, fecha, usuario, rutaV, precioSin,tipoVenta)
|
'( cedis, (cant * costoU), costoU, cant, nombre, prodId, clienteId, fecha, usuario, rutaV, precioSin,tipoVenta)
|
||||||
B4XPages.MainPage.skmt.ExecNonQuery2($"update ${Starter.tabla} set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? "$, Array As Object(cant, prodId))
|
B4XPages.MainPage.skmt.ExecNonQuery2($"update ${Starter.tabla} set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? "$, Array As Object(cant, prodId))
|
||||||
c=B4XPages.MainPage.skmt.ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, SUM(PE_COSTO_SIN) AS TOTAL_CLIE_SIN FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")
|
c=B4XPages.MainPage.skmt.ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, SUM(PE_COSTO_SIN) AS TOTAL_CLIE_SIN FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")
|
||||||
|
|||||||
Reference in New Issue
Block a user