+ $inv_value = $unit_cost * $quantity;
+ $adj_value = $unit_cost * -($quantity);
+
+ if (is_fixed_asset($mb_flag)) {
+ // get the initial value of the fixed assset.
+ $row = get_fixed_asset_move($stock_id, ST_SUPPRECEIVE);
+ $inv_value = $row['price'] * $quantity;
+ $adj_value = (-($row['price']) + $unit_cost) * $quantity;
+ }
+
+ if ($unit_cost > 0 || is_fixed_asset($mb_flag))