Fewo/ PDFs / Mails v3
This commit is contained in:
parent
7abfe3f700
commit
e537e47a82
44 changed files with 2112 additions and 527 deletions
|
|
@ -16,13 +16,17 @@
|
|||
</div>
|
||||
@endif
|
||||
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Kunden @if($id == "new") <span class="text-primary">anlegen</span> @else {{"(ID: ".$id.")"}} verwalten @endif
|
||||
</h4>
|
||||
|
||||
{!! Form::open(['url' => route('travel_user_booking_fewo_detail', [$id]), 'class' => 'form-horizontal']) !!}
|
||||
<input type="hidden" name="id" id="id" value="{{$id}}">
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Buchung FeWo @if($id == "new") <span class="text-primary">anlegen</span> @else {{"(ID: ".$id.")"}} verwalten @endif
|
||||
<div class="float-right">
|
||||
<button type="submit" name="action" value="saveAll" class="btn btn-submit btn-sm">{{ __('save changes') }}</button>
|
||||
<a href="{{route('travel_user_booking_fewos')}}" class="btn btn-default btn-sm">{{ __('back') }}</a>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<input type="hidden" name="id" id="id" value="{{$id}}">
|
||||
@include('travel.user.booking.form')
|
||||
|
||||
<div class="text-left mt-3">
|
||||
|
|
|
|||
|
|
@ -123,10 +123,12 @@
|
|||
<div class="form-group col-sm-4">
|
||||
<label class="custom-control custom-checkbox">
|
||||
{!! Form::checkbox('is_calendar_stern_tours', 1, $travel_user_booking_fewo->is_calendar_stern_tours, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{__('STERN TOURS')}} <br>Reservierung:
|
||||
<span class="custom-control-label">{{__('STERN TOURS')}} <br>Im Kalender:
|
||||
@if($travel_user_booking_fewo->fewo_reservation && isset($travel_user_booking_fewo->fewo_reservation->from_date))
|
||||
{{ $travel_user_booking_fewo->fewo_reservation->from_date->format('d.m.Y') }} - {{ $travel_user_booking_fewo->fewo_reservation->to_date->format('d.m.Y') }}
|
||||
@endif
|
||||
@else
|
||||
nicht eingetragen
|
||||
@endif
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
|
@ -148,7 +150,7 @@
|
|||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="status_text">{{ __('Notiz') }}</label>
|
||||
{{ Form::textarea('status_text', $travel_user_booking_fewo->status_text, ['class' => 'form-control', 'rows'=>4]) }}
|
||||
{{ Form::textarea('status_text', $travel_user_booking_fewo->status_text, ['class' => 'form-control autoExpand', 'rows'=>1]) }}
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
|
@ -157,7 +159,7 @@
|
|||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="notice">{{ __('Bemerkung Kunde') }}</label>
|
||||
{{ Form::textarea('notice', $travel_user_booking_fewo->notice, ['class' => 'form-control', 'rows'=>4]) }}
|
||||
{{ Form::textarea('notice', $travel_user_booking_fewo->notice, ['class' => 'form-control autoExpand', 'rows'=>1]) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -166,21 +168,169 @@
|
|||
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
<div class="text-right">
|
||||
<button type="submit" name="action" value="createInvoice" class="btn btn-primary">{{ __('Mietbestätigung / Rechnung erstellen') }}</button>
|
||||
</div>
|
||||
|
||||
@if($travel_user_booking_fewo->isInvoice())
|
||||
<h4>Mietbestätigung / Rechnung
|
||||
<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>
|
||||
</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>
|
||||
Erstellt: <strong>{{$travel_user_booking_fewo->getInvoiceLastModified()}}</strong>
|
||||
@else
|
||||
<h4>Mietbestätigung / Rechnung
|
||||
<div class="text-right float-right">
|
||||
<button type="submit" name="action" value="createInvoice" class="btn btn-primary btn-sm">{{ __('Mietbestätigung / Rechnung PDF erstellen') }}</button>
|
||||
</div>
|
||||
</h4>
|
||||
@endif
|
||||
@if($travel_user_booking_fewo->isInvoice())
|
||||
@if($travel_user_booking_fewo->send_user_mail)
|
||||
<table class="table table-striped border-bottom mt-4">
|
||||
<tbody>
|
||||
@foreach($travel_user_booking_fewo->send_user_mail as $send_user_mail)
|
||||
<tr>
|
||||
<td style="width: 25%"><strong>{!! key($send_user_mail) !!}</strong><br>E-Mail versendet.</td>
|
||||
<td><span class="small">{!! nl2br(current($send_user_mail)) !!}</span></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</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>
|
||||
</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>
|
||||
</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
|
||||
<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>
|
||||
</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>
|
||||
Erstellt: <strong>{{$travel_user_booking_fewo->getTravelInfoLastModified()}}</strong></p>
|
||||
@else
|
||||
<h4>Anreiseinfo
|
||||
<div class="text-right float-right">
|
||||
<button type="submit" name="action" value="createTravelInfo" class="btn btn-primary btn-sm">{{ __('Anreiseinfo speichern und PDF erstellen') }}</button>
|
||||
</div>
|
||||
</h4>
|
||||
@endif
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<button class="btn btn-default btn-sm " type="button" data-toggle="collapse" data-target="#collapseTravelInfo" aria-expanded="false" aria-controls="collapseTravelInfo">
|
||||
{{ __('Inhalt für das PDF / Mail') }} <i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if($travel_user_booking_fewo->isTravelInfo())
|
||||
@if($travel_user_booking_fewo->send_info_mail)
|
||||
<table class="table table-striped border-bottom">
|
||||
<tbody>
|
||||
@foreach($travel_user_booking_fewo->send_info_mail as $send_info_mail)
|
||||
<tr>
|
||||
<td style="width: 25%"><strong>{!! key($send_info_mail) !!}</strong><br>E-Mail versendet.</td>
|
||||
<td><span class="small">{!! nl2br(current($send_info_mail)) !!}</span></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
|
||||
<div class="text-right mt-2">
|
||||
<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>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($travel_user_booking_fewo->isInvoice())
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
<h4>Dienstleister Mail</h4>
|
||||
@if($travel_user_booking_fewo->send_service_mail)
|
||||
<table class="table table-striped border-bottom">
|
||||
<tbody>
|
||||
@foreach($travel_user_booking_fewo->send_service_mail as $send_service_mail)
|
||||
<tr>
|
||||
<td style="width: 25%"><strong>{!! $send_service_mail['d'] !!}</strong><br>{{$send_service_mail['m']}}</td>
|
||||
<td>{{$send_service_mail['s']}}<br>
|
||||
<span class="small">{!! nl2br($send_service_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_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-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]) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right mt-2">
|
||||
<button type="submit" name="action" value="sendMailtoService" class="btn btn-primary btn-sm" onclick="return confirm('{{__('Mail an Dienstleister vor Ort versenden?')}}');">{{ __('E-Mail an Dienstleister vor Ort versenden') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
function floatNumber(n) {
|
||||
'use strict';
|
||||
n = n.replace(/\./g, '').replace(',', '.');
|
||||
return parseFloat(n);
|
||||
}
|
||||
|
||||
|
||||
function formatNumber(obj) {
|
||||
n = obj.val();
|
||||
n = n.replace(/\./g, '').replace(',', '.');
|
||||
if(isNaN(parseFloat(n))){
|
||||
obj.val(0);
|
||||
}
|
||||
obj.val(parseFloat(n).toFixed(2).replace(".", ","));
|
||||
}
|
||||
|
||||
$( document ).ready(function() {
|
||||
|
||||
$('#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_service']"));
|
||||
formatNumber($("input[name='price_deposit']"));
|
||||
formatNumber($("input[name='price_balance']"));
|
||||
|
||||
price_travel = floatNumber($("input[name='price_travel']").val());
|
||||
price_service = floatNumber($("input[name='price_service']").val());
|
||||
price_deposit = floatNumber($("input[name='price_deposit']").val());
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
<th>{{__('Eingetragen')}}</th>
|
||||
<th>{{__('Status')}}</th>
|
||||
<th>{{__('Datum')}}</th>
|
||||
<th>{{__('R.-Nr.')}}</th>
|
||||
<th style="max-width: 60px;">{{__('delete')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -34,7 +35,6 @@
|
|||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
$('#datatables-default').dataTable({
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
|
|
@ -50,6 +50,7 @@
|
|||
{ data: 'is_calendar', name: 'is_calendar', orderable: false },
|
||||
{ data: 'status_name', name: 'status_name' },
|
||||
{ data: 'booking_date', name: 'booking_date' },
|
||||
{ data: 'invoice_number', name: 'invoice_number' },
|
||||
{ data: 'action_delete', orderable: false, searchable: false},
|
||||
],
|
||||
"order": [[ 1, "desc" ]],
|
||||
|
|
@ -58,10 +59,8 @@
|
|||
"language": {
|
||||
"url": "/js/German.json"
|
||||
},
|
||||
|
||||
/*initComplete: function () {
|
||||
|
||||
|
||||
/*
|
||||
initComplete: function () {
|
||||
this.api().columns(2).every( function () {
|
||||
var column = this;
|
||||
var title = $(column.header()).html();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue