Added AHA Report to download in Preorder Index

This commit is contained in:
Frank Schubert
2024-11-08 16:40:47 +01:00
parent 482e1a4989
commit 95e36d1626
8 changed files with 64 additions and 35 deletions

View File

@@ -11,7 +11,7 @@ class RimoWorkorderController extends mfBaseController {
}
protected function downloadAhAction() {
protected function downloadAhaAction() {
$workorder_id = $this->request->id;
if(!$workorder_id || $workorder_id < 1) {
@@ -27,7 +27,7 @@ class RimoWorkorderController extends mfBaseController {
exit;
}
$return = $workorder->downloadAh();
$return = $workorder->getAha();
if($return === false) {
header("HTTP/1.1 500 Not Found");
echo "Fehler beim Herunterladen des AHA-Reports aus Rimo.";
@@ -35,7 +35,7 @@ class RimoWorkorderController extends mfBaseController {
}
header("Content-type: text/pdf");
header("Content-disposition: attachment; filename=".$workorder->name."_AHA.pdf");
header('Content-disposition: attachment; filename="'.$workorder->rimo_name.'_AHA.pdf"');
echo $return;
exit;
}