Updating calculate_total formula to use parameters.

Signed-off-by: Zane M. Kolnik <zanematthew@gmail.com>