se agrega la parte de las encuestas y se corrige los indicadores
This commit is contained in:
cvaldes1201
2026-04-13 11:29:14 -06:00
parent f483dbb26c
commit 6cbcd3e592
500 changed files with 14426 additions and 12606 deletions

View File

@@ -45,6 +45,21 @@ Sub getPhnId As String 'ignore
Return devModel
End Sub
Sub CreateBitmapWithNumber(OriginalBitmap As Bitmap, Number As Int) As Bitmap 'ignore
Dim NewBitmap As Bitmap
NewBitmap.InitializeMutable(OriginalBitmap.Width, OriginalBitmap.Height)
Dim Canvas As Canvas
Canvas.Initialize2(NewBitmap)
' Definir el rectángulo donde se dibujará el Bitmap
Dim DestRect As Rect
DestRect.Initialize(0, 0, OriginalBitmap.Width, OriginalBitmap.Height)
' Dibujar la imagen original
Canvas.DrawBitmap(OriginalBitmap, Null, DestRect)
' Dibujar el número en el centro del Bitmap y configurar el estilo del texto
Canvas.DrawText(Number, (OriginalBitmap.Width / 2), (OriginalBitmap.Height / 2.4), Typeface.DEFAULT, 15, Colors.White, "CENTER")
Return NewBitmap
End Sub
Sub SetDivider(lv As ListView, Color As Int, Height As Int) 'ignore
Dim r As Reflector
r.Target = lv
@@ -1171,6 +1186,10 @@ Sub revisaMaxPromosProdsFijosPorInventario(pm As Map) As Int
For p = 0 To idProdsFijos.Size -1 'Generamos una lista con las promos disponibles por producto (dividimos el inventario total entre las piezas requeridas).
If thisLog Then Log($"id=${idProdsFijos.Get(p)}, inv=${invDispParaPromo.Get(idProdsFijos.Get(p))}, pzas=${prodsFijosPiezas.Get(p)}"$)
If thisLog Then Log($"${(invDispParaPromo.Get(idProdsFijos.Get(p)) / prodsFijosPiezas.Get(p))}"$)
Log(prodsFijosPiezas.Get(p))
Log(prodsFijosPiezas.Get(p))
Log(idProdsFijos.Get(p))
Log((invDispParaPromo.Get(idProdsFijos.Get(p)) / prodsFijosPiezas.Get(p)))
Private x() As String = Regex.Split("\.", $"${(invDispParaPromo.Get(idProdsFijos.Get(p)) / prodsFijosPiezas.Get(p))}"$) 'Separamos el resultado de la division por el punto decimal.
If thisLog Then Log(x(0))
t.Add(x(0).As(Int)) 'Solo guardamos la parte del entero de la division.
@@ -2250,7 +2269,7 @@ Sub calculaTotalConPromoXRango(idCliente As String) As String
For i = 0 To cx.RowCount - 1
' Log("999999999999999999999999999999999999")
cx.Position = i
Log("***************************************")
' Log("***************************************")
If cx.getstring("RECANT") = "N" Then ' Sin productos dentro de rango.
totalParcial = cx.getstring("PE_COSTO_TOT")
else if cx.getstring("RECANT") = cx.getstring("PE_CANT") Then ' Solo productos dentro de rango.
@@ -2259,13 +2278,13 @@ Sub calculaTotalConPromoXRango(idCliente As String) As String
totalParcial = ((cx.getstring("PE_CANT") - cx.getstring("PE_RECCANT")) * cx.getstring("PE_COSTOU")) + (cx.getstring("PE_RECALCULO") * cx.getstring("PE_RECCANT"))
Log($"${((cx.getstring("PE_CANT") - cx.getstring("PE_RECCANT")) * cx.getstring("PE_COSTOU"))} + ${(cx.getstring("PE_RECALCULO") * cx.getstring("PE_RECCANT"))} "$)
End If
Log($"Total:${total} + Total Parcial: ${totalParcial}"$)
' Log($"Total:${total} + Total Parcial: ${totalParcial}"$)
total = total + totalParcial
Next
End If
cx.Close
total = NumberFormat2(total, 1, 2, 2, False)
Log($"Total con promocXrango = ${total}"$)
' Log($"Total con promocXrango = ${total}"$)
Return total
End Sub
@@ -2321,7 +2340,7 @@ Sub calculaTotalConPromoXRango2(idCliente As String) As String
For i = 0 To cx.RowCount - 1
' Log("999999999999999999999999999999999999")
cx.Position = i
Log("***************************************")
' Log("***************************************")
If cx.getstring("RECANT") = "N" Then ' Sin productos dentro de rango.
totalParcial = cx.getstring("PE_COSTO_TOT")
else if cx.getstring("RECANT") = cx.getstring("PE_CANT") Then ' Solo productos dentro de rango.
@@ -2330,13 +2349,13 @@ Sub calculaTotalConPromoXRango2(idCliente As String) As String
totalParcial = ((cx.getstring("PE_CANT") - cx.getstring("PE_RECCANT")) * cx.getstring("PE_COSTOU")) + (cx.getstring("PE_RECALCULO") * cx.getstring("PE_RECCANT"))
Log($"${((cx.getstring("PE_CANT") - cx.getstring("PE_RECCANT")) * cx.getstring("PE_COSTOU"))} + ${(cx.getstring("PE_RECALCULO") * cx.getstring("PE_RECCANT"))} "$)
End If
Log($"Total:${total} + Total Parcial: ${totalParcial}"$)
' Log($"Total:${total} + Total Parcial: ${totalParcial}"$)
total = total + totalParcial
Next
End If
cx.Close
total = NumberFormat2(total, 1, 2, 2, False)
Log($"Total con promocXrango = ${total}"$)
' Log($"Total con promocXrango = ${total}"$)
Return total
End Sub
@@ -2471,7 +2490,7 @@ Sub calculaTotalConPromoXRango6(idCliente As String) As String
For i = 0 To cx.RowCount - 1
' Log("999999999999999999999999999999999999")
cx.Position = i
Log("***************************************")
' Log("***************************************")
If cx.getstring("RECANT") = "N" Then ' Sin productos dentro de rango.
totalParcial = cx.getstring("PE_COSTO_TOT")
else if cx.getstring("RECANT") = cx.getstring("PE_CANT") Then ' Solo productos dentro de rango.
@@ -2480,13 +2499,13 @@ Sub calculaTotalConPromoXRango6(idCliente As String) As String
totalParcial = ((cx.getstring("PE_CANT") - cx.getstring("PE_RECCANT")) * cx.getstring("PE_COSTOU")) + (cx.getstring("PE_RECALCULO") * cx.getstring("PE_RECCANT"))
Log($"${((cx.getstring("PE_CANT") - cx.getstring("PE_RECCANT")) * cx.getstring("PE_COSTOU"))} + ${(cx.getstring("PE_RECALCULO") * cx.getstring("PE_RECCANT"))} "$)
End If
Log($"Total:${total} + Total Parcial: ${totalParcial}"$)
' Log($"Total:${total} + Total Parcial: ${totalParcial}"$)
total = total + totalParcial
Next
End If
cx.Close
total = NumberFormat2(total, 1, 2, 2, False)
Log($"Total con promocXrango = ${total}"$)
' Log($"Total con promocXrango = ${total}"$)
Return total
End Sub