Merged getSubtotals and getFavSubtotals into one function.