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

@ -76,4 +76,29 @@ class BookingFewo
}
return [];
}
public static function getFeWoInstructionPDFName($fewo){
return "HINWEISE-FERIENWOHNUNG-".$fewo->pdf_name.".pdf";
}
public static function getFeWoCMSContent($content, $identifier_fewo){
return CMSContent::where('identifier', '=', $identifier_fewo)->where('integer', $content->id)->get()->sortBy('pos');
}
public static function getFeWoCMSContentForPDF($identifier_content, $identifier_fewo){
$pdf_content = [];
$contents = CMSContent::where('identifier', '=', $identifier_content)->get()->sortBy('pos');
foreach ($contents as $content){
if($content->decimal > 0){ //in_pdf
$pdf_content[] = $content;
}
if($fewo_contents = BookingFewo::getFeWoCMSContent($content, $identifier_fewo)){
foreach ($fewo_contents as $fewo_content){
if($fewo_content->decimal > 0){ //in_pdf
$pdf_content[] = $fewo_content;
}
}
}
}
return $pdf_content;
}
}