Merge pull request #1722 from pavel-mironchik/document-pdf
Fix downloading a bill's PDF file
This commit is contained in:
commit
8f83e239e8
@ -392,7 +392,7 @@ abstract class DocumentShow extends Component
|
|||||||
$this->routeButtonEdit = $this->getRouteButtonEdit($type, $routeButtonEdit);
|
$this->routeButtonEdit = $this->getRouteButtonEdit($type, $routeButtonEdit);
|
||||||
$this->routeButtonDuplicate = $this->getRouteButtonDuplicate($type, $routeButtonDuplicate);
|
$this->routeButtonDuplicate = $this->getRouteButtonDuplicate($type, $routeButtonDuplicate);
|
||||||
$this->routeButtonPrint = $this->getRouteButtonPrint($type, $routeButtonPrint);
|
$this->routeButtonPrint = $this->getRouteButtonPrint($type, $routeButtonPrint);
|
||||||
$this->routeButtonPdf = $this->getRouteButtonPrint($type, $routeButtonPdf);
|
$this->routeButtonPdf = $this->getRouteButtonPdf($type, $routeButtonPdf);
|
||||||
$this->routeButtonCancelled = $this->getRouteButtonCancelled($type, $routeButtonCancelled);
|
$this->routeButtonCancelled = $this->getRouteButtonCancelled($type, $routeButtonCancelled);
|
||||||
$this->routeButtonCustomize = $this->getRouteButtonCustomize($type, $routeButtonCustomize);
|
$this->routeButtonCustomize = $this->getRouteButtonCustomize($type, $routeButtonCustomize);
|
||||||
$this->routeButtonDelete = $this->getRouteButtonDelete($type, $routeButtonDelete);
|
$this->routeButtonDelete = $this->getRouteButtonDelete($type, $routeButtonDelete);
|
||||||
|
@ -293,7 +293,7 @@ class Bills extends Controller
|
|||||||
$pdf = app('dompdf.wrapper');
|
$pdf = app('dompdf.wrapper');
|
||||||
$pdf->loadHTML($html);
|
$pdf->loadHTML($html);
|
||||||
|
|
||||||
$file_name = $this->getBillFileName($bill);
|
$file_name = $this->getDocumentFileName($bill);
|
||||||
|
|
||||||
return $pdf->download($file_name);
|
return $pdf->download($file_name);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user