<pre>
SET @Presupuesto = 50;
SET @PresupuestoItem = 3;
SET @Lista = 2;
SET @Ancho =1000;
SET @Alto = 1000;
SET @Cantidad = 2;
SET @Coeficiente = 1;
UPDATE
    composicion AS T2,
    vidquoten3 AS T1,
    precios AS T3,
    productos AS T4
SET 
    T1.VidQuotePrecio = CalculoPrecio(
                        @Ancho, 
                        @Alto,
                        (CASE (@Lista)
                          WHEN 0 THEN T3.PrecioProd00
                          WHEN 1 THEN T3.PrecioProd01
                          WHEN 2 THEN T3.PrecioProd02
                          WHEN 3 THEN T3.PrecioProd03
                        END),
                        T4.Magnitud,
                        T2.OffsetVanoAlto,
                        T2.OffsetVanoAncho,
                        T2.CoefVanoAlto,
                        T2.CoefVanoAncho,
                        T2.ValorElemento) * @Coeficiente,
    T1.VidQuotePrecioP= CalculoPrecio(
                        @Ancho, 
                        @Alto,
                        (CASE (@Lista)
                          WHEN 0 THEN T3.PrecioProd00
                          WHEN 1 THEN T3.PrecioProd01
                          WHEN 2 THEN T3.PrecioProd02
                          WHEN 3 THEN T3.PrecioProd03
                        END),
                        T4.Magnitud,
                        T2.OffsetVanoAlto,
                        T2.OffsetVanoAncho,
                        T2.CoefVanoAlto,
                        T2.CoefVanoAncho,
                        T2.ValorElemento) * @Coeficiente * @Cantidad 
WHERE
    T1.VidQuoteID = @Presupuesto AND
    T1.VidQuoteItem = @PresupuestoItem AND
    T1.VidQuoteProdID = T1.VidQuoteElementoID AND 
    T2.ProductoID = T1.VidQuoteProdID AND 
    T2.ElementoID = T1.VidQuoteElementoID AND 
    T2.ComposicID = T1.VidQuoteComposicID AND 
    T3.ProductoID = T2.ElementoID AND 
    T4.ProductoID = T3.ProductoID
</pre>