Work on Email and other major consistency work

This commit is contained in:
Deon George
2013-11-22 15:36:50 +11:00
parent 89deb9c97b
commit c18d5a3881
55 changed files with 550 additions and 575 deletions

View File

@@ -22,6 +22,9 @@ class Controller_User_Invoice extends Controller_Invoice {
public function action_download() {
$io = ORM::factory('Invoice',$this->request->param('id'));
if (! $io->loaded() OR ! Auth::instance()->authorised($io->account))
throw HTTP_Exception::factory(403,'Service either doesnt exist, or you are not authorised to see it');
// Log the download
$imo = $io->invoice_memo;
$imo->invoice_id = $io->id;