the total price calculation should have parenthesis around the Price and price increment addition:
([ProductPrice] + [OptionPriceIncrement]) * [Quantity]
$itmObj->TotalPrice = ($itmObj->ProductPrice + $itmObj->OptionPriceIncrement) * $itmObj->Quantity;//c
your original expresion was:
[ProductPrice] + [OptionPriceIncrement] * [Quantity]
lets use dummy numbers for an example:
276 + 0 * 2
the math order of operations is to evaluate parenthesis first, then multiply, divide, add, subtract.
so the multiplication is done first:
0 * 2 = 0
then addition is done using that result:
276 + 0 = 276
by adding parenthesis
([ProductPrice] + [OptionPriceIncrement]) * [Quantity]
or:
(276 + 0) * 2
we tell it to do the addition first:
276 + 0 = 276
the multiply the result by the quantity:
276 * 2 = 552
see this page for an order of operations calculator.