08 2024
This commit is contained in:
parent
c1c613a4b9
commit
881fc84207
384 changed files with 50679 additions and 990 deletions
|
|
@ -9,12 +9,12 @@ use Response;
|
|||
use App\Models\Coupon;
|
||||
use App\Services\Util;
|
||||
use App\Models\FewoLodging;
|
||||
use App\Services\CreatePDF;
|
||||
use App\Libraries\CreatePDF;
|
||||
use App\Models\BookingStorno;
|
||||
use App\Services\BookingFewo;
|
||||
use App\Models\BookingVoucher;
|
||||
use App\Models\TravelInsurance;
|
||||
use App\Services\CreateCouponPDF;
|
||||
use App\Libraries\CreateCouponPDF;
|
||||
use App\Models\BookingApplication;
|
||||
use App\Models\BookingConfirmation;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
|
|
@ -46,20 +46,21 @@ class CustomerFileController extends Controller
|
|||
$content_disposition = $cd ? 'attachment' : 'inline';
|
||||
$file = false;
|
||||
$filename = "";
|
||||
|
||||
switch ($model){
|
||||
case 'booking_application':
|
||||
case 'registration':
|
||||
if($booking_application = BookingApplication::find($id)){
|
||||
$filename = "Buchungsauftrag-".$booking_application->booking->getBookingNumber().".pdf";
|
||||
$file = base64_decode($booking_application->binary_data);
|
||||
}
|
||||
break;
|
||||
case 'booking_confirmation':
|
||||
case 'confirmation':
|
||||
if($booking_confirmation = BookingConfirmation::find($id)){
|
||||
$filename = "Reisebestaetigung-".$booking_confirmation->booking->getBookingNumber().".pdf";
|
||||
$file = base64_decode($booking_confirmation->binary_data);
|
||||
}
|
||||
break;
|
||||
case 'booking_storno':
|
||||
case 'storno':
|
||||
if($booking_stornos = BookingStorno::find($id)){
|
||||
$filename = "Reisestornierung-".$booking_stornos->booking->getBookingNumber().".pdf";
|
||||
$file = base64_decode($booking_stornos->binary_data);
|
||||
|
|
@ -68,21 +69,20 @@ class CustomerFileController extends Controller
|
|||
case 'coupon':
|
||||
if($coupon = Coupon::find($id)){
|
||||
$filename = "Gutschein-".$coupon->number.".pdf";
|
||||
|
||||
$pdf = new CreateCouponPDF($coupon);
|
||||
$pdf->create();
|
||||
return $pdf->output($filename, $cd);
|
||||
|
||||
}
|
||||
break;
|
||||
case 'booking_voucher':
|
||||
case 'voucher':
|
||||
if($booking_voucher = BookingVoucher::find($id)){
|
||||
$filename = "Voucher-".$booking_voucher->booking->getBookingNumber().".pdf";
|
||||
$file = base64_decode($booking_voucher->binary_data);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'booking_voucher_agency':
|
||||
case 'voucher_agency':
|
||||
if($booking_voucher_agency = BookingVoucherAgency::find($id)){
|
||||
$filename = "Voucher-Agentur-".$booking_voucher_agency->booking->getBookingNumber().".pdf";
|
||||
$file = base64_decode($booking_voucher_agency->binary_data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue