fix decimal error in portion_of_amount