Generalized sales report function

Wanted to make the primary function more general so I could use it to call all sales in a time frame in a different view file.