Moved invoice generation into the model

Technically, some of this stuff belongs in a controller, but the breakup
of the all encompassing busLogic class has to start somewhere.
Changed code indentation to be consistent