fixes on mail templates, change order edit layout, add DeliveryTypes, DeliveryTypeCalculations & DeliveryPackages

This commit is contained in:
Ludovic CANDELLIER
2023-05-24 23:30:29 +02:00
parent c677dbd5fa
commit 9f9b7173d7
13 changed files with 220 additions and 43 deletions

View File

@@ -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();