mirror of
https://github.com/KeymonSoft/Guna_Preventa.git
synced 2026-04-18 05:09:23 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user