I would say:
Sure, the total is not the value you expected because the expression is wrong.
sum(Qty+vQty)*Sum(Unit Price +vPrice)
sums all Quantitys (plus the variable) and multiplizes them tith the sum of all unit prices
The correct expression should be
sum ((Qty+vQty)*(Unit Price+vPrice))
so that in each line the quantity value is multiplized by the unit price and than the aggregation sum is done