14/9/23 - Promos - Precio de fijos en variables

Arregla el caso de que, si un producto esta en fijos y variables, el variable tomaba el precio del fijo.
This commit is contained in:
2023-09-14 02:08:47 -06:00
parent 044c60c876
commit 5bdf238f3f
7 changed files with 105 additions and 33 deletions

View File

@@ -109,6 +109,8 @@ 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")
Dim listaPreciosPV As List = mp.Get("prodsVariablesPrecios")
Logcolor(listaPreciosPV, Colors.red)
If thisLog Then Log(mp)
tpf = 0
For Each pfp As Int In mp.Get("prodsFijosPiezas").As(List)
@@ -155,9 +157,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)
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)
If existenciaProdVariable > 0 Then 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