mirror of
https://github.com/KeymonSoft/Guna_Preventa_Diseno_Viejo.git
synced 2026-04-18 05:09:13 +00:00
- VERSION 5.02.22
- Se agregó que si se borra (en Nota) un producto que pertenezca a una promo "especial", se borre el pedido completo. - Se corrigio el texto de la promo especial de $300 a $350
This commit is contained in:
@@ -822,14 +822,14 @@ Sub B4XPage_Appear
|
||||
c2.Close
|
||||
c3.Close
|
||||
Else If Subs.traemontoprod2 And Subs.traeCliente <> "0" Then
|
||||
Msgbox2Async("El cliente tiene derecho a un descuento de 70 pesos por la compra de mas de $300 en productos participantes" , "Descuento disponible", "Aceptar", "", "", LoadBitmap(File.DirAssets,"alert2.png"), False)
|
||||
Msgbox2Async("El cliente tiene derecho a un descuento de 70 pesos por la compra de mas de $350 en productos participantes" , "Descuento disponible", "Aceptar", "", "", LoadBitmap(File.DirAssets,"alert2.png"), False)
|
||||
Wait For Msgbox_Result (resultado As Int)
|
||||
If resultado = DialogResponse.POSITIVE Then
|
||||
Private c As Cursor = B4XPages.MainPage.skmt.ExecQuery("SELECT SUM(PE_CANT) AS PIEZAS FROM PEDIDO JOIN CAT_PROMO_ESP ON CAT_PE_ID = PE_PROID WHERE PE_CLIENTE IN (Select CUENTA FROM CUENTAA)")
|
||||
If c.RowCount > 0 Then
|
||||
c.Position = 0
|
||||
Private des As Float = NumberFormat2(70/c.GetString("PIEZAS"),0,2,2,False)
|
||||
Log( NumberFormat2(des,0,2,2,False))
|
||||
Private des As Float = NumberFormat2(70/c.GetString("PIEZAS"),0,5,5,False)
|
||||
Log(des)
|
||||
Private c2 As Cursor = B4XPages.MainPage.skmt.ExecQuery2("SELECT Ifnull(SUM(PE_CANT),0) AS PE_CANT FROM PEDIDO JOIN CAT_PROMO_ESP ON CAT_PE_ID = PE_PROID WHERE PE_CLIENTE IN (Select CUENTA FROM CUENTAA) AND PE_COSTOU < ?",Array As String(des))
|
||||
If c2.RowCount > 0 Then
|
||||
c2.Position = 0
|
||||
|
||||
@@ -88,7 +88,7 @@ Sub B4XPage_Appear
|
||||
label1.color = Colors.White
|
||||
Private textColor As Int = Colors.black
|
||||
If c.GetString("PE_CEDIS").Contains("PRO") Then textColor = Colors.RGB(210,105,30) 'Si es promo, cambiamos el color del texto.
|
||||
If not(IsNumber(c.GetString("PE_CEDIS"))) Then textColor = Colors.RGB(210,105,30) 'Si es promo, cambiamos el color del texto.
|
||||
If Not(IsNumber(c.GetString("PE_CEDIS"))) Then textColor = Colors.RGB(210,105,30) 'Si es promo, cambiamos el color del texto.
|
||||
Dim label2 As Label
|
||||
label2 = ListView1.TwoLinesLayout.SecondLabel
|
||||
label2.TextSize = 10
|
||||
@@ -234,6 +234,33 @@ Sub borra_Click
|
||||
End Sub
|
||||
|
||||
Sub ListView1_ItemLongClick (Position As Int, Value As Object)
|
||||
Private X() As String = Regex.Split(" ", Value)
|
||||
Log(X.Length)
|
||||
Private nom As String = ""
|
||||
For i = 0 To X.Length -1
|
||||
If X(i).Contains(CRLF) Then
|
||||
End If
|
||||
If Not(X(i).Contains(CRLF)) Then
|
||||
nom = nom & " " & X(i)
|
||||
Else
|
||||
Exit
|
||||
End If
|
||||
Next
|
||||
nom = nom.Trim
|
||||
Private cedis As String = X(X.Length-1)
|
||||
Log(nom)
|
||||
Dim cx As Cursor = B4XPages.MainPage.skmt.ExecQuery($"select PE_PROID,PE_CANT, PE_FOLIO, PE_CEDIS, PE_PRONOMBRE, PE_CEDIS/1 AS is_numeric FROM PEDIDO where (pe_pronombre = '${nom}' or pe_pronombre = '${nom} ') AND PE_CEDIS = '${cedis}' and is_numeric > 0 and pe_cliente in (Select CUENTA from cuentaa) and PE_RECALCULO > 0"$)
|
||||
Log("Recalculados: " & cx.RowCount)
|
||||
If cx.RowCount > 0 Then ' Si hay recalculo (producto con promocion), al borrar el produto hay que borrar TODO el pedido.
|
||||
result = Msgbox2("Si se borra este producto, se va a borrar el pedido COMPLETO, ¿desea continuar?","Borrar pedido completo", "Si", "", "No",LoadBitmap(File.DirAssets,"alert2.png")) 'ignore
|
||||
If result = DialogResponse.NEGATIVE Then
|
||||
Return
|
||||
Else
|
||||
Starter.skmt.ExecNonQuery("delete from pedido where pe_cliente in (Select CUENTA from cuentaa)")
|
||||
B4XPage_Appear
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
c = B4XPages.MainPage.skmt.ExecQuery("SELECT HABILITADA FROM IMPRESORA")
|
||||
If c.RowCount > 0 Then
|
||||
c.Position = 0
|
||||
@@ -241,26 +268,7 @@ Sub ListView1_ItemLongClick (Position As Int, Value As Object)
|
||||
If Not(Subs.revisaImpreso) Then
|
||||
result = Msgbox2("Seguro que desea borrar este articulo?","Borrar Articulo", "Si", "", "No",LoadBitmap(File.DirAssets,"alert2.png")) 'ignore
|
||||
If result = DialogResponse.POSITIVE Then
|
||||
Private X() As String = Regex.Split(" ", Value)
|
||||
Log(X)
|
||||
Log(X.Length)
|
||||
Private nom As String = ""
|
||||
For i = 0 To X.Length -1
|
||||
' Log(X(i))
|
||||
If X(i).Contains(CRLF) Then
|
||||
' Log("Retorno")
|
||||
End If
|
||||
If Not(X(i).Contains(CRLF)) Then
|
||||
nom = nom & " " & X(i)
|
||||
Else
|
||||
Exit
|
||||
End If
|
||||
' Log(nom)
|
||||
Next
|
||||
' Log(nom)
|
||||
nom = nom.Trim
|
||||
Private cedis As String = X(X.Length-1)
|
||||
c=B4XPages.MainPage.skmt.ExecQuery($"select PE_PROID,PE_CANT, PE_FOLIO, PE_CEDIS, PE_PRONOMBRE FROM PEDIDO where pe_pronombre = '${nom}' AND PE_CEDIS = '${cedis}' and pe_cliente in (Select CUENTA from cuentaa)"$)
|
||||
c=B4XPages.MainPage.skmt.ExecQuery($"select PE_PROID,PE_CANT, PE_FOLIO, PE_CEDIS, PE_PRONOMBRE FROM PEDIDO where (pe_pronombre = '${nom}' or pe_pronombre = '${nom} ') AND PE_CEDIS = '${cedis}' and pe_cliente in (Select CUENTA from cuentaa)"$)
|
||||
Log($"select PE_PROID,PE_CANT, PE_FOLIO, PE_CEDIS FROM PEDIDO where pe_pronombre = '${nom}' AND PE_CEDIS = '${cedis}' and pe_cliente in (Select CUENTA from cuentaa)"$)
|
||||
Log(c.RowCount)
|
||||
c.Position=0
|
||||
@@ -423,7 +431,7 @@ Sub ListView1_ItemLongClick (Position As Int, Value As Object)
|
||||
' Log(nom)
|
||||
nom = nom.Trim
|
||||
Private cedis As String = X(X.Length-1)
|
||||
c=B4XPages.MainPage.skmt.ExecQuery($"select PE_PROID,PE_CANT, PE_FOLIO, PE_CEDIS, PE_PRONOMBRE FROM PEDIDO where pe_pronombre = '${nom}' AND PE_CEDIS = '${cedis}' and pe_cliente in (Select CUENTA from cuentaa)"$)
|
||||
c=B4XPages.MainPage.skmt.ExecQuery($"select PE_PROID,PE_CANT, PE_FOLIO, PE_CEDIS, PE_PRONOMBRE FROM PEDIDO where (pe_pronombre = '${nom}' or pe_pronombre = '${nom} ') AND PE_CEDIS = '${cedis}' and pe_cliente in (Select CUENTA from cuentaa)"$)
|
||||
Log($"select PE_PROID,PE_CANT, PE_FOLIO, PE_CEDIS FROM PEDIDO where pe_pronombre = '${nom}' AND PE_CEDIS = '${cedis}' and pe_cliente in (Select CUENTA from cuentaa)"$)
|
||||
Log(c.RowCount)
|
||||
c.Position=0
|
||||
|
||||
@@ -240,6 +240,7 @@ Sub Class_Globals
|
||||
Private b_abordo As Button
|
||||
Dim bitacora As C_Bitacora
|
||||
Private l_version As Label
|
||||
Dim contadorSubir As Int = 0
|
||||
End Sub
|
||||
|
||||
'You can add more parameters here.
|
||||
@@ -2095,8 +2096,11 @@ Sub JobDone(Job As HttpJob)
|
||||
t1.Enabled = False
|
||||
t1.Initialize("T1", 3000) ' 1000 = 1 second
|
||||
' Log(999)
|
||||
Log("TIMER ENABLED")
|
||||
t1.Enabled = True
|
||||
If contadorSubir < 3 Then ' Si no hacen click en el boton de OK despues de "Enviar", se puede quedar en loop el timer T1.
|
||||
t1.Enabled = True
|
||||
Log("TIMER ENABLED")
|
||||
End If
|
||||
contadorSubir = contadorSubir + 1
|
||||
End If
|
||||
End If
|
||||
Job.Release
|
||||
@@ -2413,13 +2417,11 @@ Sub B_OK_PAS_Click
|
||||
Subs.panelVisible(p_principal, 0, 0)
|
||||
B4XPages.MainPage.skmt.ExecNonQuery2("DELETE FROM CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String("CARGA_DIA"))
|
||||
B4XPages.MainPage.skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)", Array As Object ("CARGA_DIA",1))
|
||||
|
||||
If E_RUTA2.Visible = True Then
|
||||
bitacora.mandaBitacora(Subs.fechanormal(DateTime.Now),usuario,Subs.traeAlmacen, Subs.traeRuta,"Carga día suplencia", "",Subs.fechanormal(DateTime.Now),Subs.fechanormal(DateTime.Now),B4XPages.MainPage.lat_gps,B4XPages.MainPage.lon_gps,"2","","", "")
|
||||
Else
|
||||
bitacora.mandaBitacora(Subs.fechanormal(DateTime.Now),usuario,Subs.traeAlmacen, Subs.traeRuta,"Carga día", "",Subs.fechanormal(DateTime.Now),Subs.fechanormal(DateTime.Now),B4XPages.MainPage.lat_gps,B4XPages.MainPage.lon_gps,"2","","", "")
|
||||
End If
|
||||
|
||||
Else if CARGA = "CARGAR" And (S_CP.Text <> "LISTO" Or S_CC.Text <> "LISTO" Or S_CH.Text <> "LISTO") Then
|
||||
RES = Msgbox2("Seguro que desa abortar el proceso","Cierre", "Si", "", "No",LoadBitmap(File.DirAssets,"alert2.png")) 'ignore
|
||||
If RES = DialogResponse.POSITIVE Then
|
||||
|
||||
Binary file not shown.
@@ -60,7 +60,7 @@ ModuleClosedNodes10=
|
||||
ModuleClosedNodes11=
|
||||
ModuleClosedNodes12=
|
||||
ModuleClosedNodes13=
|
||||
ModuleClosedNodes14=14,15,16,17,18,22,28,29,30
|
||||
ModuleClosedNodes14=14,17,18,22,28,29,30
|
||||
ModuleClosedNodes15=3,17
|
||||
ModuleClosedNodes16=
|
||||
ModuleClosedNodes17=
|
||||
@@ -82,6 +82,6 @@ ModuleClosedNodes6=
|
||||
ModuleClosedNodes7=5,6,8,9,10,11
|
||||
ModuleClosedNodes8=
|
||||
ModuleClosedNodes9=
|
||||
NavigationStack=C_Principal,Subir_Click,736,0,Subs,TraeMontoProd,1236,0,Subs,TraeMontoProd2,1244,0,B4XMainPage,B4XPage_Created,131,0,DBRequestManager,HandleJob,237,0,Diseñador Visual,principal.bal,-100,2,C_Principal,B4XPage_Created,293,0,C_Principal,e_ruta_EnterPressed,2266,0,C_Principal,t1_tick,2331,5,C_Principal,P_RESUMEN_click,2481,0,C_Principal,t2_tick,2262,0
|
||||
NavigationStack=Diseñador Visual,principal.bal,-100,5,C_Principal,JobDone,2101,6,C_Nota,B4XPage_Created,42,0,C_Nota,Initialize,37,0,B4XMainPage,Class_Globals,20,0,C_Cliente,B4XPage_Appear,837,0,C_Principal,Subir_Click,778,0,C_Nota,Class_Globals,32,0,C_Nota,B4XPage_Appear,114,0,C_Nota,ListView1_ItemLongClick,247,6
|
||||
SelectedBuild=0
|
||||
VisibleModules=25,2,14,26,5,10,15,20,4,21
|
||||
VisibleModules=25,2,14,26,5,10,15
|
||||
|
||||
Reference in New Issue
Block a user