Security fix for invoice view. Also paid status handler for invoice view.