Doing math in php is pretty straight forward you can add some values and multiply them like this:
$value1 = <amount 1>;
$value2 = <amount 2>;
$value3 = <amount 3>;
$total_val = (($value1 + $value2 + $value3) * (isset($_POST['quantity'])?$_POST['quantity']:0);
The trick will be getting all of the values together, if all that you have is the id values from the dropdown you will need to filter recordsets based on these ids to get the amounts.
As for adding the upload you can add in another form and an upload server behavior on this same page.