mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-20 11:39:13 +00:00
11/9/23 - Correcciones de inventarios en promociones.
- Se corrigio que la proocion aparecia aun cuando no tenía sufucuente inventario fijo. - Se corrigio que el inventario de los productos variables no tenia descontado el inventario de los fijos.
This commit is contained in:
@@ -87,9 +87,11 @@ Sub muestraPromo(promo As String, cliente As String)
|
||||
estaPromo = promo
|
||||
esteCliente = cliente
|
||||
Private mp As Map = Subs.traePromo(promo, cliente)
|
||||
If thisLog Then LogColor(mp, Colors.blue)
|
||||
Private prodsPromo As Map = mp.Get("productos") 'Los productos de la promoción.
|
||||
Private invDispPromo As Map = Subs.traemosInventarioDisponibleParaPromo(promo)
|
||||
' If thisLog Then Log($"invDispPromo=${invDispPromo}"$)
|
||||
' Private invDispPromo As Map = Subs.traemosInventarioDisponibleParaPromo(promo)
|
||||
Private invDispPromo As Map = Subs.restaFijosPromo(mp)
|
||||
If thisLog Then Log($"invDispPromo=${invDispPromo}"$)
|
||||
If thisLog Then Log("Max promos por inv de prods FIJOS: " & Subs.revisaMaxPromosProdsFijosPorInventario(mp))
|
||||
If thisLog Then Log("Max promos por inv de prods VARIABLES: " & Subs.revisaMaxPromosProdsVariablesPorInventario(mp))
|
||||
maxCantPromos = Subs.revisaMaxPromosProdsVariablesPorInventario(mp)
|
||||
@@ -142,18 +144,20 @@ Sub muestraPromo(promo As String, cliente As String)
|
||||
' Dim jpeg() As Byte
|
||||
|
||||
'Llenamos el listview con los productos variables.
|
||||
If thisLog Then Log(pv)
|
||||
If thisLog Then Log("invDisp=" & invDispPromo)
|
||||
If thisLog Then Log("Prods variables: " & pv)
|
||||
' If thisLog Then Log("invDisp=" & invDispPromo)
|
||||
clv_prodsVariabes.Clear
|
||||
For Each p As String In pv
|
||||
If invDispPromo.ContainsKey(p) Then 'Si no esta en la lista de productos con inventario no lo mostramos.
|
||||
' c2.Position=i
|
||||
' jpeg = c2.GetBlob("CAT_GP_IMG")
|
||||
' ins.InitializeFromBytesArray(jpeg, 0, jpeg.Length)
|
||||
' bmp.Initialize2(ins)
|
||||
If thisLog Then Log("Prod Variable: " & invDispPromo.get(p))
|
||||
Private existenciaProdVariable As String = invDispPromo.get(p)
|
||||
' c2.Position=i
|
||||
' jpeg = c2.GetBlob("CAT_GP_IMG")
|
||||
' ins.InitializeFromBytesArray(jpeg, 0, jpeg.Length)
|
||||
' bmp.Initialize2(ins)
|
||||
Private thisProd As Map = prodsPromo.Get(p)
|
||||
If thisLog Then Log(thisProd)
|
||||
clv_prodsVariabes.Add(CreateListItem(Subs.traeProdNombre(p)&CRLF&"Hay " & invDispPromo.Get(p) & " $" & thisProd.Get("precio"), thisProd.Get("precio"), invDispPromo.Get(p), clv_prodsVariabes.AsView.Width, 50dip, Null, p), p)
|
||||
If existenciaProdVariable > 0 Then clv_prodsVariabes.Add(CreateListItem(Subs.traeProdNombre(p)&CRLF&"Hay " & invDispPromo.Get(p) & " $" & thisProd.Get("precio"), thisProd.Get("precio"), invDispPromo.Get(p), clv_prodsVariabes.AsView.Width, 50dip, Null, p), p)
|
||||
End If
|
||||
Next
|
||||
b_terminar1.Visible = False
|
||||
|
||||
Reference in New Issue
Block a user