mirror of
https://github.com/KeymonSoft/Intmex_Multiventa.git
synced 2026-04-17 21:06:08 +00:00
Version: 5.03.20.MV
Se agregaron las promociones de 3 niveles, se corrigieron problemas al momento de borrar pedido en nota, al finalizar el pedido y al borrar por completo desde nota.
This commit is contained in:
34
B4A/Subs.bas
34
B4A/Subs.bas
@@ -664,12 +664,13 @@ End Sub
|
||||
|
||||
'Regresa el almacen actual de la base de datos.
|
||||
Sub traeAlmacen As String 'ignore
|
||||
Private c As Cursor
|
||||
Private c2 As Cursor
|
||||
Private a As String
|
||||
c=B4XPages.MainPage.skmt.ExecQuery("select ID_ALMACEN from CAT_ALMACEN")
|
||||
c.Position = 0
|
||||
a = C.GetString("ID_ALMACEN")
|
||||
c.Close
|
||||
c2=B4XPages.MainPage.skmt.ExecQuery("select ID_ALMACEN from CAT_ALMACEN")
|
||||
|
||||
c2.Position = 0
|
||||
a = c2.GetString("ID_ALMACEN")
|
||||
|
||||
Return a
|
||||
End Sub
|
||||
|
||||
@@ -1121,6 +1122,29 @@ Sub traeMaxPromos(pm As Map) As Int
|
||||
Return maxPromos.Get(0) - vendidas 'Regresamos el numero mas pequeño de las opciones.
|
||||
End Sub
|
||||
|
||||
Sub MaxPromQuery(promo As String) As Int
|
||||
Private cMaxPromo As Cursor
|
||||
Private minValue As Int
|
||||
|
||||
cMaxPromo = B4XPages.MainPage.skmt.ExecQuery($"SELECT CAT_PA_ID, CAT_PA_MAXPROM, CAT_PA_MAXPROMREC, CAT_PA_MAXPROMCLIE FROM PROMOS_COMP where CAT_PA_ID = '${promo}'"$)
|
||||
|
||||
If cMaxPromo.RowCount > 0 Then
|
||||
cMaxPromo.Position = 0
|
||||
|
||||
Dim val1 As Int = cMaxPromo.GetInt("CAT_PA_MAXPROM")
|
||||
Dim val2 As Int = cMaxPromo.GetInt("CAT_PA_MAXPROMREC")
|
||||
Dim val3 As Int = cMaxPromo.GetInt("CAT_PA_MAXPROMCLIE")
|
||||
|
||||
minValue = val1
|
||||
If val2 < minValue Then minValue = val2
|
||||
If val3 < minValue Then minValue = val3
|
||||
Else
|
||||
minValue = 0
|
||||
End If
|
||||
|
||||
Return minValue
|
||||
End Sub
|
||||
|
||||
'Regresa la cantidad de promos que se le han vendido al cliente.
|
||||
Sub traePromosVendidas(promo As String, cliente As String) As Int
|
||||
Private c As Cursor
|
||||
|
||||
Reference in New Issue
Block a user