A spree auto invoice generator with state machine