fixes on mail templates, change order edit layout, add DeliveryTypes, DeliveryTypeCalculations & DeliveryPackages
This commit is contained in:
@@ -10,6 +10,27 @@ use Symfony\Component\Process\Process;
|
||||
|
||||
class PDF
|
||||
{
|
||||
public function convertView($view, $data, $filename)
|
||||
{
|
||||
try {
|
||||
Browsershot::html(view($view, $data)->render())
|
||||
->noSandbox()
|
||||
->waitUntilNetworkIdle()
|
||||
->format('A4')
|
||||
->showBackground()
|
||||
->savePdf("temp.pdf");
|
||||
|
||||
$postRoute = URL::signedRoute('orderinvoices.store', ['order' => $this->order]);
|
||||
Http::attach('invoice', file_get_contents('temp.pdf'), $filename)
|
||||
->post($postRoute)
|
||||
->throw();
|
||||
}
|
||||
catch (\Exception $exception )
|
||||
{
|
||||
Log::error($exception);
|
||||
}
|
||||
}
|
||||
|
||||
public static function view($view, $data, $filename = 'file.pdf')
|
||||
{
|
||||
\Debugbar::disable();
|
||||
|
||||
Reference in New Issue
Block a user