Fewo PDF Hinweise, Generator, Anhang Mail

This commit is contained in:
Kevin Adametz 2020-06-29 12:23:21 +02:00
parent a3bef8d1aa
commit 730832c8e1
31 changed files with 1786 additions and 147 deletions

View file

@ -8,10 +8,14 @@ use App\Models\BookingConfirmation;
use App\Models\BookingStorno;
use App\Models\BookingVoucher;
use App\Models\Coupon;
use App\Models\FewoLodging;
use App\Models\InsuranceCertificate;
use App\Models\TravelInsurance;
use App\Repositories\CustomerFileRepository;
use App\Services\BookingFewo;
use App\Services\CreateCouponPDF;
use App\Services\CreatePDF;
use App\Services\Util;
use Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Facades\URL;
@ -39,7 +43,6 @@ class CustomerFileController extends Controller
public function show($model, $id, $cd = false){
$content_disposition = $cd ? 'attachment' : 'inline';
$file = false;
$filename = "";
switch ($model){
@ -90,6 +93,18 @@ class CustomerFileController extends Controller
}
break;
case 'fewo_instruction_pdf':
$fewo = FewoLodging::findOrFail($id);
$identifier_content = config('fewo.identifier_content');
$identifier_fewo = config('fewo.identifier_fewo');
$identifier_fewo = $identifier_fewo.Util::sanitize($fewo->single_name);
$pdf_name = \App\Services\BookingFewo::getFeWoInstructionPDFName($fewo);
$pdf_content = BookingFewo::getFeWoCMSContentForPDF($identifier_content, $identifier_fewo);
$pdf_file = new CreatePDF('pdf.fewo_instructions');
return $pdf_file->create($fewo, $pdf_content, $pdf_name, $cd);
break;
}