Script added to calculate invoice