Improved service display
This commit is contained in:
@@ -56,7 +56,9 @@ class Controller_User_Invoice extends Controller_TemplateDefault {
|
||||
public function action_download($id) {
|
||||
$io = ORM::factory('invoice',$id);
|
||||
|
||||
return Invoice::instance()->pdf($io)->Output(sprintf('%s.pdf',$io->refnum()),'D');
|
||||
$this->response->body(Invoice::instance($io)->pdf()->Output(sprintf('%s.pdf',$io->refnum()),'D'));
|
||||
$this->response->headers(array('Content-Type' => 'application/pdf'));
|
||||
$this->auto_render = FALSE;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user