Implemented the PDF functionality in Purchase Orders and Sales Orders

Added couple of functions in purchasesController and SalesController.
Also added two functions in helperscontroller.