Fewo Mail MA, optimation Fewo, view User Fewos

This commit is contained in:
Kevin Adametz 2019-05-08 14:05:35 +02:00
parent e537e47a82
commit 346a7427a5
30 changed files with 915 additions and 963 deletions

View file

@ -139,9 +139,9 @@
<table style="margin: 0 auto;" cellpadding="0" cellspacing="0" width="90%">
<tr>
<td style="color:#37302d; text-align: left">
<br>
<p>
{!! nl2br($content) !!}
<br>
</p>
</td>
</tr>
</table>

View file

@ -171,7 +171,7 @@
{{ __('Mietpreis:') }}
</td>
<td style="color:#37302d; text-align: left; vertical-align: top; border-top:1px solid #E4E4E4;">
<strong>{{ $model->price_travel }} </strong>
<strong>{{ $model->price_travel_total }} </strong>
</td>
</tr>
<tr>
@ -218,13 +218,15 @@
<p>Mietbedingungen und Mietbestätigung / Rechnung finden Sie als PDF im Anhang.</p>
<p>Mit dieser Buchungsbestätigung ist der Mietvertrag für <strong>Sie und uns verbindlich.</strong></p>
<ul>
<li>eine sofort zahlungsfällige Anzahlung von 50% Mietpreis = <strong>{{ $model->getPriceTravelFirstPay() }} </strong></li>
<li>sowie eine Restzahlung von <strong>{{ $model->getPriceTravelSecondPay() }} </strong> bis spätestens 4 Wochen vor Belegungsbeginn inkl. der oben genannten Kaution.</li>
<li>eine sofort zahlungsfällige Anzahlung von 50% Mietpreis = <strong>{{ $model->getPriceTravelTotalFirstPay() }} </strong></li>
<li>sowie eine Restzahlung von <strong>{{ $model->getPriceTravelTotalSecondPay() }} </strong> bis spätestens 4 Wochen vor Belegungsbeginn inkl. der oben genannten Kaution.</li>
</ul>
<p>auf folgendes Bankkonto:<br>
<strong>STERN TOURS GmbH<br>
IBAN: DE83100208900018857111<br>
BIC: HYVEDEMM488</strong>
BIC: HYVEDEMM488<br>
<u>Verwendungszweck: {{$model->invoice_number}}</u>
</strong>
</p>
<p>Mit freundlichen Grüßen<br>
Ihr Team von STERN TOURS</p>

View file

@ -281,13 +281,13 @@
&nbsp; {{ __('Logout') }}</a>
</div>
{{--
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
<h4>{{__('Delete') }}</h4>
<p>{{__('If you no longer want to use our offer, you can delete your account here.')}}</p>
<a href="{{route('user_delete_account')}}" class="btn btn-default">{{__('Delete Account')}}</a>
</div>
--}}
{{--
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
<h4>{{__('Delete') }}</h4>
<p>{{__('If you no longer want to use our offer, you can delete your account here.')}}</p>
<a href="{{route('user_delete_account')}}" class="btn btn-default">{{__('Delete Account')}}</a>
</div>
--}}
@endsection

View file

@ -1,157 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
{!! Html::style('css/invoice_fewo_pdf.css') !!}
<style>
@page {
margin: 90mm 0 30mm 0;
}
.font-weight-bold {
font-weight: 600;
}
#logo_box {
position: absolute;
top:-80mm;
left: 25mm;
right: 25mm;
height: 25mm;
z-index: 1;
font-size: 10pt;
text-align: center;
}
#logo_box img {
width: 65mm;
}
#address_box {
position: absolute;
top:-40mm;
left: 25mm;
width: 100mm;
height: 45mm;
z-index: 1;
font-size: 11pt;
}
#address_box #address_back{
font-size: 7pt;
text-decoration: underline;
margin-bottom: 2mm;
}
#date_box {
position: absolute;
top:-10mm;
right: 15mm;
width: 70mm;
height: 10mm;
z-index: 1;
font-size: 10pt;
line-height: 12pt;
text-align: right;
}
#title_box {
position: absolute;
top:0mm;
left: 25mm;
width: 160mm;
height: 10mm;
z-index: 2;
font-weight: bold;
}
#title_box .title {
font-size: 16pt;
line-height: 12pt;
}
#title_box .subtitle {
font-size: 9pt;
line-height: 9pt;
}
#detail_box {
position: absolute;
top:15mm;
left: 25mm;
right: 15mm;
z-index: 3;
font-size: 9pt;
}
#detail_box table {
width: 100%;
line-height: 9pt;
border-collapse: collapse;
}
#detail_box table td {
border: 0.5pt solid #8c8c8c;
padding: 1mm;
}
#detail_box table td.left {
text-align: right;
width: 50mm;
}
#detail_box table td.right {
text-align: left;
}
.singel-line-top {
border-top: 1pt solid #1a1a18;
}
.double-line {
border-bottom: 2.5pt double #1a1a18;
}
.dotted-line {
border-bottom: 0.8pt dotted #1a1a18;
}
#footer_box {
position: absolute;
bottom:-25mm;
left: 25mm;
right: 15mm;
height: 30mm;
z-index: 6;
font-size: 7pt;
line-height: 8pt;
}
#footer_box table {
margin-top: 2mm;
width: 100%;
}
#footer_box table td {
vertical-align: top;
}
</style>
</head>
<body>
{{--
<div id="brand_paper_background">
<img src="{{ base_path()}}/storage/app/pdf/inno-plan-bg.png" height="100%" width="100%">
</div>
--}}
<div id="logo_box">
<img src="{{asset('images/stern-tours-logo.png')}}">
</div>
@extends('pdf.layout')
@section('content')
<div id="address_box">
<div id="address_back">STERN TOURS GmbH &bull; Emser Str. 3 &bull; 10719 Berlin</div>
{!! nl2br($model->getBookingUserAddress()) !!}
@ -161,15 +10,14 @@
Berlin, den {!! date("d.m.Y") !!}
</div>
<div id="title_box">
Mietbestätigung / Rechnung Nr. {{$model->invoice_number}}
</div>
<div id="title_box">
Mietbestätigung / Rechnung Nr. {{$model->invoice_number}}
</div>
<div id="detail_box">
<p>{{$model->getUserSalutation()}},<br>
<br>
herzlichen Dank für Ihre Online-Buchung vom {{$model->booking_date}} :</p>
herzlichen Dank für Ihre Online-Buchung vom {{$model->booking_date}}.</p>
<p>Auf Grundlage der Beschreibung der gebuchten Unterkunft und unserer im Rahmen des Onlinebuchungsprozesses vertraglich einbezogenen Mietbedingungen
(die Sie auch nochmals beigefügt erhalten ) freuen wir uns, Ihre Anmietung wie folgt verbindlich bestätigen zu können:</p>
@ -190,11 +38,11 @@
<tr>
<td class="left">{{ __('Mietpreis:') }}</td>
<td class="right">
<div class="font-weight-bold">{{ $model->price_travel }} </div>
<div class="font-weight-bold">{{ $model->price_travel_total }} </div>
</td>
</tr>
<tr>
<td class="left">{{ __('Service-Gebühr:') }}??</td>
<td class="left">{{ __('Service-Gebühr:') }}</td>
<td class="right">
<div class="font-weight-bold">{{ $model->price_service }} </div>
</td>
@ -218,13 +66,14 @@
<p>Mit dieser Buchungsbestätigung ist der Mietvertrag für <strong>Sie und uns verbindlich.</strong></p>
<p>Entsprechend der Regelungen unter Ziffer 3.1. und 3.2. unserer Mietbedingungen überweisen Sie uns bitte</p>
<ul>
<li>eine sofort zahlungsfällige Anzahlung von 50% Mietpreis = <strong>{{ $model->getPriceTravelFirstPay() }} </strong></li>
<li>sowie eine Restzahlung von <strong>{{ $model->getPriceTravelSecondPay() }} </strong> bis spätestens 4 Wochen vor Belegungsbeginn inkl. der oben genannten Kaution.</li>
<li>eine sofort zahlungsfällige Anzahlung von 50% Mietpreis = <strong>{{ $model->getPriceTravelTotalFirstPay() }} </strong></li>
<li>sowie eine Restzahlung von <strong>{{ $model->getPriceTravelTotalSecondPay() }} </strong> bis spätestens 4 Wochen vor Belegungsbeginn inkl. der oben genannten Kaution.</li>
</ul>
<p>auf folgendes Bankkonto:<br>
<strong>STERN TOURS GmbH<br>
IBAN: DE83100208900018857111<br>
BIC: HYVEDEMM488</strong>
BIC: HYVEDEMM488<br>
<u>Verwendungszweck: {{$model->invoice_number}}</u></strong>
</p>
<p>Beachten Sie bitte, dass eine Nichtzahlung des Unterkunftspreises zu den genannten Fälligkeitsdaten keine Aufhebung des
@ -233,42 +82,4 @@
<p>Mit freundlichen Grüßen<br>
Ihr Team von STERN TOURS</p>
</div>
<div id="footer_box">
<strong>P.S.: Wir empfehlen dringend, den Abschluss einer Reiserücktrittskostenversicherung.</strong>
<table>
<tr>
<td style="width: 20%">
<strong>STERN TOURS GmbH</strong><br>
Emser Str. 3<br>
10719 Berlin<br>
</td>
<td>
<strong>Fon:</strong> 030 | 88 0 313 0<br>
<strong>Fax:</strong> 030 | 88 0 313 44<br>
<strong>E-Mail:</strong> kontakt@sterntours.de<br>
<strong>Web:</strong> www.sterntours.de
</td>
<td>
<strong>Bankverbindung:</strong><br>
STERN TOURS<br>
Hypo Vereinsbank<br>
IBAN: DE83100208900018857111<br>
BIC-/SWIFT-Code: HYVEDEMM488
</td>
<td>
<strong>Öffnungszeiten:</strong><br>
Mo-Do: 09.00-18.00 Uhr<br>
FR: 09.00-16.00 Uhr<br><br>
UStId: DE192609253<br>
Registernr.: HRB 67111<br>
Amtsgericht Charlottenburg<br>
</td>
</tr>
</table>
</div>
</body>
</html>
@endsection

View file

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
{!! Html::style('css/stern_fewo_pdf.css') !!}
</head>
<body>
<div id="logo_box">
<img src="{{asset('images/stern-tours-logo.png')}}">
</div>
@yield('content')
<div id="footer_box">
<strong>P.S.: Wir empfehlen dringend, den Abschluss einer Reiserücktrittskostenversicherung.</strong>
<table>
<tr>
<td style="width: 20%">
<strong>STERN TOURS GmbH</strong><br>
Emser Str. 3<br>
10719 Berlin<br>
</td>
<td>
<strong>Fon:</strong> 030 | 88 0 313 0<br>
<strong>Fax:</strong> 030 | 88 0 313 44<br>
<strong>E-Mail:</strong> kontakt@sterntours.de<br>
<strong>Web:</strong> www.sterntours.de
</td>
<td>
<strong>Bankverbindung:</strong><br>
STERN TOURS<br>
Hypo Vereinsbank<br>
IBAN: DE83100208900018857111<br>
BIC-/SWIFT-Code: HYVEDEMM488
</td>
<td>
<strong>Öffnungszeiten:</strong><br>
Mo-Do: 09.00-18.00 Uhr<br>
FR: 09.00-16.00 Uhr<br><br>
UStId: DE192609253<br>
Registernr.: HRB 67111<br>
Amtsgericht Charlottenburg<br>
</td>
</tr>
</table>
</div>
</body>
</html>

View file

@ -1,156 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
@extends('pdf.layout')
{!! Html::style('css/invoice_fewo_pdf.css') !!}
<style>
@page {
margin: 90mm 0 30mm 0;
}
.font-weight-bold {
font-weight: 600;
}
#logo_box {
position: absolute;
top:-80mm;
left: 25mm;
right: 25mm;
height: 25mm;
z-index: 1;
font-size: 10pt;
text-align: center;
}
#logo_box img {
width: 65mm;
}
#address_box {
position: absolute;
top:-40mm;
left: 25mm;
width: 100mm;
height: 45mm;
z-index: 1;
font-size: 11pt;
}
#address_box #address_back{
font-size: 7pt;
text-decoration: underline;
margin-bottom: 2mm;
}
#date_box {
position: absolute;
top:-10mm;
right: 15mm;
width: 70mm;
height: 10mm;
z-index: 1;
font-size: 10pt;
line-height: 12pt;
text-align: right;
}
#title_box {
position: absolute;
top:0mm;
left: 25mm;
width: 160mm;
height: 10mm;
z-index: 2;
font-weight: bold;
}
#title_box .title {
font-size: 16pt;
line-height: 12pt;
}
#title_box .subtitle {
font-size: 9pt;
line-height: 9pt;
}
#detail_box {
position: absolute;
top:15mm;
left: 25mm;
right: 15mm;
z-index: 3;
font-size: 9pt;
}
#detail_box table {
width: 100%;
line-height: 9pt;
border-collapse: collapse;
}
#detail_box table td {
border: 0.5pt solid #8c8c8c;
padding: 1mm;
}
#detail_box table td.left {
text-align: right;
width: 50mm;
}
#detail_box table td.right {
text-align: left;
}
.singel-line-top {
border-top: 1pt solid #1a1a18;
}
.double-line {
border-bottom: 2.5pt double #1a1a18;
}
.dotted-line {
border-bottom: 0.8pt dotted #1a1a18;
}
#footer_box {
position: absolute;
bottom:-25mm;
left: 25mm;
right: 15mm;
height: 30mm;
z-index: 6;
font-size: 7pt;
line-height: 8pt;
}
#footer_box table {
margin-top: 2mm;
width: 100%;
}
#footer_box table td {
vertical-align: top;
}
</style>
</head>
<body>
{{--
<div id="brand_paper_background">
<img src="{{ base_path()}}/storage/app/pdf/inno-plan-bg.png" height="100%" width="100%">
</div>
--}}
<div id="logo_box">
<img src="{{asset('images/stern-tours-logo.png')}}">
</div>
@section('content')
<div id="address_box">
<div id="address_back">STERN TOURS GmbH &bull; Emser Str. 3 &bull; 10719 Berlin</div>
@ -161,47 +11,12 @@
Berlin, den {!! date("d.m.Y") !!}
</div>
<div id="title_box">
Anreiseinfo Nr. {{$model->invoice_number}}
</div>
<div id="title_box">
Anreiseinfo Nr. {{$model->invoice_number}}
</div>
<div id="detail_box">
<p>{!! nl2br($travel_info_user_text) !!}</p>
</div>
<div id="footer_box">
<strong>P.S.: Wir empfehlen dringend, den Abschluss einer Reiserücktrittskostenversicherung.</strong>
<table>
<tr>
<td style="width: 20%">
<strong>STERN TOURS GmbH</strong><br>
Emser Str. 3<br>
10719 Berlin<br>
</td>
<td>
<strong>Fon:</strong> 030 | 88 0 313 0<br>
<strong>Fax:</strong> 030 | 88 0 313 44<br>
<strong>E-Mail:</strong> kontakt@sterntours.de<br>
<strong>Web:</strong> www.sterntours.de
</td>
<td>
<strong>Bankverbindung:</strong><br>
STERN TOURS<br>
Hypo Vereinsbank<br>
IBAN: DE83100208900018857111<br>
BIC-/SWIFT-Code: HYVEDEMM488
</td>
<td>
<strong>Öffnungszeiten:</strong><br>
Mo-Do: 09.00-18.00 Uhr<br>
FR: 09.00-16.00 Uhr<br><br>
UStId: DE192609253<br>
Registernr.: HRB 67111<br>
Amtsgericht Charlottenburg<br>
</td>
</tr>
</table>
</div>
</body>
</html>
@endsection

View file

@ -26,7 +26,7 @@
<div class="form-row">
<div class="form-group col-sm-6">
<label class="form-label" for="invoice_number">{{ __('Rechnungsnummer') }}</label>
<label class="form-label" for="invoice_number">{{ __('Rechnungsnummer') }} (unique)</label>@if($travel_user_booking_fewo->isInvoice()) <em class="small">Rechnungsnummer ist PDF-Name der Mietbestätigung</em> @endif
{{ Form::text('invoice_number', $travel_user_booking_fewo->invoice_number, array('placeholder'=>__('Rechnungsnummer'), 'class'=>'form-control')) }}
</div>
<div class="form-group col-sm-6">
@ -68,6 +68,10 @@
<label class="form-label" for="to_date">{{ __('Datum bis') }}*</label>
{{ Form::text('to_date', $travel_user_booking_fewo->to_date, array('placeholder'=>__('Datum bis'), 'class'=>'form-control datepicker-base', 'required'=>true)) }}
</div>
<div class="col-sm-12">
<em><small>Bei Datumsänderungen wird die Verfügbarkeit gerüft sowie die Berechnung der Preise neu ausgeführt.</small></em>
</div>
</div>
<hr>
@ -75,34 +79,50 @@
@if(isset($travel_user_booking_fewo->daily_prices))
@foreach($travel_user_booking_fewo->daily_prices as $s => $d)
<div class="form-group col-sm-12">
{{$s}} | {{$d['fromDay']}} - {{$d['toDay']}} | {{$d['numberDays']}} Tage x {{$d['perNight']}} / pro Nacht | <strong>{{$d['price']}} Gesamt</strong>
{{$s}} | {{$d['fromDay']}} - {!! Carbon::parse($d['toDay'])->modify('+1 day')->format("d.m.Y") !!} | {{$d['numberDays']}} Nächte x {{$d['perNight']}} / pro Nacht | <strong>{{$d['price']}} Gesamt</strong>
</div>
@endforeach
@endif
<div class="form-group col-sm-4 col-md-2">
<label class="form-label" for="price_travel">{{ __('Mitpreis alle Tage') }}</label>
{{ Form::text('price_travel', $travel_user_booking_fewo->price_travel, array('placeholder'=>__('Preis Übernachtungen'), 'class'=>'form-control input-auto-calc')) }}
<div class="form-group col-sm-4 col-md-4 col-lg-3">
<div class="row">
<div class="col-6">
<label class="form-label" for="price_travel">{{ __('Mietpreis alle Tage') }}</label>
{{ Form::text('price_travel', $travel_user_booking_fewo->price_travel, array('placeholder'=>__('Preis Übernachtungen'), 'class'=>'form-control input-auto-calc')) }}
</div>
<div class="col-6">
<label class="form-label" for="price_travel">{{ __('Mietp. zus. P.') }}</label>
{{ Form::text('price_extra', $travel_user_booking_fewo->price_extra, array('placeholder'=>__('zusätzliche Personen'), 'class'=>'form-control input-auto-calc')) }}
</div>
</div>
</div>
<div class="form-group col-sm-4 col-md-2">
<label class="form-label" for="price_service">{{ __('Preis Service-Gebühr') }}</label>
<div class="form-group col-sm-8 col-md-8 col-lg-3">
<label class="form-label" for="price_balance">{{ __('Provisionsausgleich durch Vertriebskanal') }}</label>
<div class="row">
<div class="col-6">
{{ Form::text('price_balance', $travel_user_booking_fewo->price_balance, array('placeholder'=>__(' Provisionsausgleich durch Vertriebskanal'), 'class'=>'form-control input-auto-calc')) }}
</div>
<div class="col-6">
{{ Form::text('price_travel_total', $travel_user_booking_fewo->price_travel_total, array('placeholder'=>__('Gesamt'), 'class'=>'form-control', 'readonly')) }}
</div>
</div>
</div>
<div class="form-group col-6 col-sm-4 col-md-4 col-lg-2">
<label class="form-label" for="price_service">{{ __('Service-Gebühr') }}</label>
{{ Form::text('price_service', $travel_user_booking_fewo->price_service, array('placeholder'=>__('Preis Service-Gebühr'), 'class'=>'form-control input-auto-calc')) }}
</div>
<div class="form-group col-sm-4 col-md-2">
<label class="form-label" for="price_deposit">{{ __('Preis Kaution') }}</label>
<div class="form-group col-6 col-sm-4 col-md-4 col-lg-2">
<label class="form-label" for="price_deposit">{{ __('Kaution') }}</label>
{{ Form::text('price_deposit', $travel_user_booking_fewo->price_deposit, array('placeholder'=>__('Preis Kaution'), 'class'=>'form-control input-auto-calc')) }}
</div>
<div class="form-group col-sm-6 col-md-3">
<label class="form-label" for="price_balance">{{ __('Provisionsausgleich durch Vertriebskanal') }}</label>
{{ Form::text('price_balance', $travel_user_booking_fewo->price_balance, array('placeholder'=>__(' Provisionsausgleich durch Vertriebskanal'), 'class'=>'form-control input-auto-calc')) }}
</div>
<div class="form-group col-sm-6 col-md-3">
<div class="form-group col-sm-4 col-md-4 col-lg-2">
<label class="form-label" for="price_total">{{ __('Preis Gesamt') }}*</label>
{{ Form::text('price_total', $travel_user_booking_fewo->price_total, array('placeholder'=>__('Preis Gesamt'), 'class'=>'form-control')) }}
</div>
</div>
<hr>
<div class="form-row">
<div class="col-sm-12">
@ -154,8 +174,6 @@
</div>
</div>
<hr>
<div class="form-row">
<div class="form-group col-sm-12">
<label class="form-label" for="notice">{{ __('Bemerkung Kunde') }}</label>
@ -169,9 +187,9 @@
<div class="card mb-2">
<div class="card-body">
@if($travel_user_booking_fewo->isInvoice())
<h4>Mietbestätigung / Rechnung
<h4>Mietbestätigung / Rechnung <em style="font-size:60%">bei Preis-/Änderungen überschreiben</em>
<div class="text-right float-right">
<button type="submit" name="action" value="createInvoice" class="btn btn-primary btn-sm" onclick="return confirm('{{__('Rechnung überschreiben?')}}');">{{ __('Mietbestätigung / Rechnung PDF erstellen') }}</button>&nbsp;
<button type="submit" name="action" value="createInvoice" class="btn btn-primary btn-sm" onclick="return confirm('{{__('Rechnung überschreiben?')}}');">{{ __('Mietbestätigung / Rechnung PDF überschreiben') }}</button>&nbsp;
</div>
</h4>
<a class="btn btn-secondary btn-sm" target="_blank" href="{{$travel_user_booking_fewo->getInvoiceUrlFile()}}/file"><i class="fa fa-file-pdf"></i> Mietbestätigung / Rechnung: {{$travel_user_booking_fewo->getInvoiceFileName()}}</a>
@ -197,26 +215,24 @@
</table>
@endif
<div class="form-row">
<div class="form-group col-sm-12">
<label class="form-label" for="send_mail_user_notice">{{ __('Wichtige Hinweise in E-Mail ') }}</label>
{{ Form::textarea('send_mail_user_notice', '', ['class' => 'form-control autoExpand', 'rows'=>1]) }}
<div class="form-group col-sm-12 mt-2">
{{ Form::textarea('send_mail_user_notice', '', ['placeholder'=>'Wichtige Hinweise in E-Mail, werden nur in die aktuelle E-Mail übernommen', 'class' => 'form-control autoExpand', 'rows'=>1]) }}
</div>
</div>
<div class="text-right mt-2">
<button type="submit" name="action" value="sendMailtoUser" class="btn btn-primary btn-sm" onclick="return confirm('{{__('Mail an Mieter versenden?')}}');">{{ __('E-Mail mit Mietbestätigung / Rechnung und Mietbedingungen an Kunden versenden') }}</button>&nbsp;
<div class="text-right mt-0">
<button type="submit" name="action" value="sendMailtoUser" class="btn btn-primary btn-sm" onclick="return confirm('{{__('E-Mail Mietbestätigung an Mieter versenden?')}}');">{{ __('E-Mail mit Mietbestätigung / Rechnung und Mietbedingungen an Kunden versenden') }}</button>&nbsp;
</div>
@endif
</div>
</div>
@if($travel_user_booking_fewo->isInvoice())
<div class="card mb-2">
<div class="card-body">
@if($travel_user_booking_fewo->isTravelInfo())
<h4>Anreiseinfo
<h4>Anreiseinfo <em style="font-size:60%">bei Änderungen überschreiben</em>
<div class="text-right float-right">
<button type="submit" name="action" value="createTravelInfo" class="btn btn-primary btn-sm" onclick="return confirm('{{__('Anreiseinfo überschreiben?')}}');">{{ __('Anreiseinfo speichern und PDF erstellen') }}</button>&nbsp;
<button type="submit" name="action" value="createTravelInfo" class="btn btn-primary btn-sm" onclick="return confirm('{{__('Anreiseinfo überschreiben?')}}');">{{ __('Anreiseinfo speichern und PDF überschreiben') }}</button>&nbsp;
</div>
</h4>
<p><a class="btn btn-secondary btn-sm" target="_blank" href="{{$travel_user_booking_fewo->getTravelInfoUrlFile()}}/file"><i class="fa fa-file-pdf"></i> {{$travel_user_booking_fewo->getTravelInfoFileName()}}</a>
@ -236,6 +252,8 @@
<div class="collapse mt-2" id="collapseTravelInfo">
{{ Form::textarea('info_mail_text', $travel_user_booking_fewo->info_mail_text, ['class' => 'form-control autoExpand', 'rows'=>1, 'id'=>'travel_info_user_text']) }}
<em>Grundtext in ADMIN CMS > <a href="{{route('cms_content')}}">Inhalte</a> > PDF Vorlage Anreiseinfo FeWo</em>
<em class="small">(Änderungen werden hier gespeichert.)</em>
</div>
</div>
</div>
@ -253,7 +271,7 @@
</table>
@endif
<div class="text-right mt-2">
<div class="text-right mt-0">
<button type="submit" name="action" value="sendInfosMailtoUser" class="btn btn-primary btn-sm" onclick="return confirm('{{__('Mail an Mieter versenden?')}}');">{{ __('E-Mail mit Anreiseinfo an Kunden versenden') }}</button>&nbsp;
</div>
@endif
@ -279,17 +297,18 @@
</table>
@endif
<div class="form-row">
<div class="form-group col-md-6">
<label class="form-label" for="send_mail_service_subject">{{ __('Betreff E-Mail ') }}</label>
{{ Form::text('send_mail_service_subject', $travel_user_booking_fewo->getServiceMailSubject(), ['class' => 'form-control']) }}
</div>
<div class="form-group col-md-6">
<label class="form-label" for="send_mail_service_mail">{{ __('E-Mail Adresse Dienstleister') }}</label>
{{ Form::text('send_mail_service_mail', 'langosch.birgit@web.de', array('class'=>'form-control')) }}
</div>
<div class="form-group col-md-6">
<label class="form-label" for="send_mail_service_subject">{{ __('Betreff E-Mail ') }}</label>
{{ Form::text('send_mail_service_subject', $travel_user_booking_fewo->getServiceMailSubject(), ['class' => 'form-control']) }}
</div>
<div class="form-group col-md-12">
<label class="form-label" for="send_mail_service_content">{{ __('Inhalt E-Mail ') }}</label>
{{ Form::textarea('send_mail_service_content', $travel_user_booking_fewo->getServiceMailContent(), ['class' => 'form-control autoExpand', 'rows'=>1]) }}
<em class="small">(Änderungen gelten nur für das senden der aktuellen E-Mail, werden nicht gespeichert.)</em>
</div>
</div>
<div class="text-right mt-2">
@ -299,8 +318,49 @@
</div>
@endif
@if($travel_user_booking_fewo->id > 0)
<div class="card mb-2">
<div class="card-body">
<h4>Mitarbeiter Mail</h4>
@if($travel_user_booking_fewo->send_employee_mail)
<table class="table table-striped border-bottom">
<tbody>
@foreach($travel_user_booking_fewo->send_employee_mail as $send_employee_mail)
<tr>
<td style="width: 25%"><strong>{!! $send_employee_mail['d'] !!}</strong><br>
@if(is_array($send_employee_mail['m']))
{!! implode(",", $send_employee_mail['m']) !!}
@else
{{$send_employee_mail['m']}}
@endif</td>
<td>{{$send_employee_mail['s']}}<br>
<span class="small">{!! nl2br($send_employee_mail['c']) !!}</span></td>
</tr>
@endforeach
</tbody>
</table>
@endif
<div class="form-row">
<div class="form-group col-md-6">
<label class="form-label" for="send_mail_employee_mail">{{ __('E-Mail Adresse Mitarbeiter') }}</label>
{{ Form::text('send_mail_employee_mail', $send_mail_employee_mail, array('class'=>'form-control')) }}
</div>
<div class="form-group col-md-6">
<label class="form-label" for="send_mail_employee_subject">{{ __('Betreff E-Mail ') }}</label>
{{ Form::text('send_mail_employee_subject', $travel_user_booking_fewo->getEmployeeMailSubject(), ['class' => 'form-control']) }}
</div>
<div class="form-group col-md-12">
<label class="form-label" for="send_mail_employee_content">{{ __('Inhalt E-Mail ') }}</label>
{{ Form::textarea('send_mail_employee_content', $travel_user_booking_fewo->getEmployeeMailContent(), ['class' => 'form-control autoExpand', 'rows'=>1]) }}
<em class="small">(Änderungen gelten nur für das senden der aktuellen E-Mail, werden nicht gespeichert.)</em>
</div>
</div>
<div class="text-right mt-2">
<button type="submit" name="action" value="sendMailtoEmployee" class="btn btn-primary btn-sm" onclick="return confirm('{{__('Mail an Mitarbeiter versenden?')}}');">{{ __('E-Mail an Mitarbeiter versenden') }}</button>&nbsp;
</div>
</div>
</div>
@endif
<script>
function floatNumber(n) {
@ -313,29 +373,53 @@
function formatNumber(obj) {
n = obj.val();
n = n.replace(/\./g, '').replace(',', '.');
if(isNaN(parseFloat(n))){
obj.val(0);
n = parseFloat(n).toFixed(2);
console.log(n);
if(isNaN(n)){
return obj.val(0);
}
obj.val(parseFloat(n).toFixed(2).replace(".", ","));
return obj.val(n.replace(".", ","));
}
$( document ).ready(function() {
@if($travel_user_booking_fewo->isInvoice())
$("input[name='invoice_number']").on('focus', function () {
if (!$(this).data('focused')) {
$(this).data('focused', true);
alert('Mietbestätigung/Anreiseinfo sind der Rechnungsnummer zugeordnet, bei Änderungen mussen die PDFs neu erstellt werden.');
}
});
$("input[name='invoice_number']").on('onblur', function () {
$(this).data('focused', false);
});
@endif
$('#collapseTravelInfo').on('shown.bs.collapse', function () {
$('#travel_info_user_text').keyup();
});
$('input.input-auto-calc').on('change', function () {
formatNumber($("input[name='price_travel']"));
formatNumber($("input[name='price_balance']"));
formatNumber($("input[name='price_extra']"));
formatNumber($("input[name='price_travel_total']"));
formatNumber($("input[name='price_service']"));
formatNumber($("input[name='price_deposit']"));
formatNumber($("input[name='price_balance']"));
price_travel = floatNumber($("input[name='price_travel']").val());
price_balance =floatNumber($("input[name='price_balance']").val());
price_extra =floatNumber($("input[name='price_extra']").val());
price_service = floatNumber($("input[name='price_service']").val());
price_deposit = floatNumber($("input[name='price_deposit']").val());
price_balance =floatNumber($("input[name='price_balance']").val());
price_total = parseFloat(price_travel + price_service + price_deposit + price_balance);
price_travel_total = parseFloat(price_travel + price_balance + price_extra);
price_travel_total = parseFloat((Math.round(price_travel_total * 100) / 100)).toFixed(2).replace(".", ",");
$("input[name='price_travel_total']").val(price_travel_total);
price_total = parseFloat(price_travel + price_balance + price_extra + price_service + price_deposit);
price_total = parseFloat((Math.round(price_total * 100) / 100)).toFixed(2).replace(".", ",");
$("input[name='price_total']").val(price_total);
});

View file

@ -32,6 +32,48 @@
@include('travel.user.form')
<div class="card mb-2">
<div class="card-body">
<h4>FeWo Buchungen</h4>
@if($travel_user->travel_user_booking_fewos)
<div class="card-datatable table-responsive py-2">
<table class="table table-striped border-bottom">
<thead>
<tr>
<th style="max-width: 10px;">&nbsp;</th>
<th>{{__('ID')}}</th>
<th>{{__('FeWo')}}</th>
<th>{{__('vom')}}</th>
<th>{{__('bis')}}</th>
<th>{{__('Eingetragen')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('Datum')}}</th>
<th>{{__('R.-Nr.')}}</th>
</tr>
</thead>
<tbody>
@foreach($travel_user->travel_user_booking_fewos as $travel_user_booking_fewo)
<tr>
<td style="width:1%">
<a href="{{route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->id])}}" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>
</td>
<td>{{ $travel_user_booking_fewo->id }}</td>
<td>{{ $travel_user_booking_fewo->fewo_lodging->name }}</td>
<td>{{ $travel_user_booking_fewo->from_date }}</td>
<td>{{ $travel_user_booking_fewo->to_date }}</td>
<td>{!! $travel_user_booking_fewo->getCheckedBadgeCalendar() !!}</td>
<td>{{ $travel_user_booking_fewo->getStatuesName() }}</td>
<td>{{ $travel_user_booking_fewo->booking_date }}</td>
<td>{{ $travel_user_booking_fewo->invoice_number }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endif
</div>
</div>
<div class="text-left mt-3">
<button type="submit" name="action" value="saveAll" class="btn btn-submit">{{ __('save changes') }}</button>&nbsp;
<a href="{{route('travel_users')}}" class="btn btn-default">{{ __('back') }}</a>

View file

@ -68,9 +68,6 @@
<hr>
<div class="form-row">
<div class="form-group col-sm-6">
<label class="form-label" for="phone">{{ __('Phone') }}</label>
@ -101,9 +98,5 @@
</div>
</div>
</div>