move activity of purchase order out of certification.rb, into controller