7/9/20 - Promos, prods fijos y variables

Corrige el error de que, si el producto fijo en una promo también esta en los variables, el variable tomaba el precio del fijo.
This commit is contained in:
2023-09-07 21:04:40 -06:00
parent 485ad9abf4
commit 86e50323b2
3 changed files with 12 additions and 4 deletions

View File

@@ -110,6 +110,7 @@ Sub muestraPromo(promo As String, cliente As String)
'Ponemos el texto en las etiquetas de la cantidad de productos.
' Dim pf As List = mp.Get("prodsFijos")
Dim pv As List = mp.Get("prodsVariables")
Private listaPreciosPV As List = mp.Get("prodsVariablesPrecios")
If thisLog Then Log(mp)
tpf = 0
For Each pfp As Int In mp.Get("prodsFijosPiezas").As(List)
@@ -154,9 +155,11 @@ Sub muestraPromo(promo As String, cliente As String)
' jpeg = c2.GetBlob("CAT_GP_IMG")
' ins.InitializeFromBytesArray(jpeg, 0, jpeg.Length)
' bmp.Initialize2(ins)
Private indicePV = pv.IndexOf(p)
Private estePrecio = listaPreciosPV.Get(indicePV)
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)
clv_prodsVariabes.Add(CreateListItem(Subs.traeProdNombre(p)&CRLF&"Hay " & invDispPromo.Get(p) & " $" & estePrecio, estePrecio, invDispPromo.Get(p), clv_prodsVariabes.AsView.Width, 50dip, Null, p), p)
End If
Next
b_terminar1.Visible = False