diff --git a/.env b/.env
index b3b80ff..fcd44b8 100755
--- a/.env
+++ b/.env
@@ -49,8 +49,10 @@ REDIS_PASSWORD=null
REDIS_PORT=6379
-MAIL_BBC=info@adametz.media
-#MAIL_BBC=info@sterntours.de
+MAIL_BBC=kevin@adametz.media
+MAIL_FEWO_EMPLOYEE=kevin@adametz.media
+#MAIL_FEWO_EMPLOYEE=katrin.nikolai@stern-tours.de,gerda.fritsch@stern-tours.de
+#MAIL_BBC=kontakt@stern-tours.de,thomas.stern@stern-tours.de
MAIL_DRIVER=smtp
MAIL_HOST=mail.your-server.de
MAIL_PORT=587
diff --git a/.idea/dictionaries/kevinadametz.xml b/.idea/dictionaries/kevinadametz.xml
new file mode 100644
index 0000000..2e2ffb3
--- /dev/null
+++ b/.idea/dictionaries/kevinadametz.xml
@@ -0,0 +1,7 @@
+
+
+
+ fewo
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 86b7a8e..3ff4e92 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -2,41 +2,32 @@
-
-
-
-
-
-
+
+
+
+
-
-
+
+
-
-
+
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
+
-
-
+
-
@@ -84,69 +75,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
- modal
- selec
- sele
- Arrangement
- Validator
- live
- last_data
array
extends Eloquent
travel_booking_fewo_channel_id
@@ -164,12 +96,19 @@
unique
confirm
Mail::
- confo
getInvoiceLastModified
invoices_fewo
- invoices_fewo
stora
invoices
+ miet
+ getPriceTotalFirstPay
+ mail
+ bal
+ onch
+ rechnungsn
+ dienst
+ confo
+ daily_prices
@@ -201,25 +140,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -230,28 +157,40 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -372,8 +311,8 @@
-
-
+
+
@@ -414,7 +353,7 @@
-
+
@@ -431,8 +370,7 @@
-
-
+
@@ -453,13 +391,18 @@
-
+
+
+
+
+
+
+
-
@@ -467,28 +410,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -535,13 +456,6 @@
-
-
-
-
-
-
-
@@ -559,22 +473,22 @@
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
@@ -709,17 +623,22 @@
+
+
+
+
+
+
-
+
-
-
+
-
+
@@ -772,121 +691,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -917,13 +721,6 @@
-
-
-
-
-
-
-
@@ -951,13 +748,6 @@
-
-
-
-
-
-
-
@@ -972,34 +762,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1021,61 +783,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1086,53 +793,279 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
-
-
+
+
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/Http/Controllers/API/FewoController.php b/app/Http/Controllers/API/FewoController.php
index da745f8..95a0ad5 100755
--- a/app/Http/Controllers/API/FewoController.php
+++ b/app/Http/Controllers/API/FewoController.php
@@ -3,10 +3,11 @@
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
-use App\Models\BookingDraftItem;
+use App\Mail\MailSendFeWoService;
use App\Models\TravelUser;
use App\Models\TravelUserBookingFewo;
-use Carbon\Carbon;
+use Illuminate\Support\Facades\Mail;
+use Input;
use Validator;
class FewoController extends Controller
@@ -92,9 +93,22 @@ class FewoController extends Controller
return response()->json($validator->messages(), $this->errorStatus);
}
-
$travel_user_booking_fewo = TravelUserBookingFewo::create($data['travel_user_booking_fewo']);
+ //mail
+ if($travel_user_booking_fewo){
+ $MailEmployee = explode(",", config('mail.mail_fewo_employee'));
+ $EmployeeMailSubject = $travel_user_booking_fewo->getEmployeeMailSubject();
+ $EmployeeMailContent = $travel_user_booking_fewo->getEmployeeMailContent();
+ Mail::to($MailEmployee)->send(new MailSendFeWoService($travel_user_booking_fewo, $EmployeeMailSubject, $EmployeeMailContent));
+ $send_employee_mail = $travel_user_booking_fewo->send_employee_mail;
+ $send_employee_mail[] = ['d' => date('H:i d.m.Y'),
+ 'm'=>$MailEmployee,
+ 's'=>$EmployeeMailSubject,
+ 'c'=>$EmployeeMailContent];
+ $travel_user_booking_fewo->send_employee_mail = $send_employee_mail;
+ $travel_user_booking_fewo->save();
+ }
return response()->json(['success' => ['travel_user_booking_fewo_id' => $travel_user_booking_fewo->id, 'crm_url' => route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->id])]], $this->successStatus);
}
diff --git a/app/Http/Controllers/TravelUserBookingFewoController.php b/app/Http/Controllers/TravelUserBookingFewoController.php
index c823cbb..f5b1ad5 100755
--- a/app/Http/Controllers/TravelUserBookingFewoController.php
+++ b/app/Http/Controllers/TravelUserBookingFewoController.php
@@ -52,7 +52,6 @@ class TravelUserBookingFewoController extends Controller
$replace_info_text['fewo_user_anrede'] = $travel_user_booking_fewo->getUserSalutation();
$replace_info_text['fewo_adresse'] = $travel_user_booking_fewo->getNameAddressLocation(", ");
}
-
if(!$travel_user_booking_fewo->info_mail_text) {
$travel_user_booking_fewo->info_mail_text = CMSContent::getContentBySlug('pdf-vorlage-anreiseinfo-fewo');
$travel_user_booking_fewo->info_mail_text = Util::replacePlaceholders($travel_user_booking_fewo->info_mail_text, $replace_info_text);
@@ -60,6 +59,7 @@ class TravelUserBookingFewoController extends Controller
$data = [
'travel_user_booking_fewo' => $travel_user_booking_fewo,
+ 'send_mail_employee_mail' => config('mail.mail_fewo_employee'),
'max_adults' => $max_adults,
'max_children' => $max_children,
'id' => $id,
@@ -112,13 +112,12 @@ class TravelUserBookingFewoController extends Controller
$mail_bbc = config('mail.mail_bbc');
Mail::to($travel_user_booking_fewo->travel_user->email)->bcc($mail_bbc)->send(new MailSendFeWoInvoice($travel_user_booking_fewo, Input::get('send_mail_user_notice')));
$send_user_mail = $travel_user_booking_fewo->send_user_mail;
- $send_user_mail[] = [date('H:i d.m.Y') => Input::get('send_mail_user_notice')];
+ $send_user_mail[] = [date('H:i d.m.Y') => $travel_user_booking_fewo->travel_user->email." ".Input::get('send_mail_user_notice')];
$travel_user_booking_fewo->send_user_mail = $send_user_mail;
$travel_user_booking_fewo->save();
- \Session()->flash('alert-success', __('E-mail wurde an den Mieter versendet.'));
+ \Session()->flash('alert-success', __('E-Mail wurde an den Mieter versendet.'));
return redirect(route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->id]));
}
-
}
if($data['action'] == 'sendInfosMailtoUser') {
@@ -127,13 +126,12 @@ class TravelUserBookingFewoController extends Controller
$mail_bbc = config('mail.mail_bbc');
Mail::to($travel_user_booking_fewo->travel_user->email)->bcc($mail_bbc)->send(new MailSendFeWoInfo($travel_user_booking_fewo));
$send_info_mail = $travel_user_booking_fewo->send_info_mail;
- $send_info_mail[] = [date('H:i d.m.Y') => ''];
+ $send_info_mail[] = [date('H:i d.m.Y') => $travel_user_booking_fewo->travel_user->email];
$travel_user_booking_fewo->send_info_mail = $send_info_mail;
$travel_user_booking_fewo->save();
- \Session()->flash('alert-success', __('E-mail wurde an den Mieter versendet.'));
+ \Session()->flash('alert-success', __('E-Mail wurde an den Mieter versendet.'));
return redirect(route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->id]));
}
-
}
if($data['action'] == 'sendMailtoService') {
@@ -149,14 +147,28 @@ class TravelUserBookingFewoController extends Controller
$travel_user_booking_fewo->send_service_mail = $send_service_mail;
$travel_user_booking_fewo->save();
- \Session()->flash('alert-success', __('E-mail wurde an den Dienstleister versendet.'));
+ \Session()->flash('alert-success', __('E-Mail wurde an den Dienstleister versendet.'));
return redirect(route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->id]));
}
}
+ if($data['action'] == 'sendMailtoEmployee') {
+ $travel_user_booking_fewo = TravelUserBookingFewo::findOrFail($id);
+ if($travel_user_booking_fewo){
+ $mails = explode(",", Input::get('send_mail_employee_mail'));
+ Mail::to($mails)->send(new MailSendFeWoService($travel_user_booking_fewo, Input::get('send_mail_employee_subject'), Input::get('send_mail_employee_content')));
+ $send_employee_mail = $travel_user_booking_fewo->send_employee_mail;
+ $send_employee_mail[] = ['d' => date('H:i d.m.Y'),
+ 'm'=>Input::get('send_mail_employee_mail'),
+ 's'=>Input::get('send_mail_employee_subject'),
+ 'c'=>Input::get('send_mail_employee_content')];
+ $travel_user_booking_fewo->send_employee_mail = $send_employee_mail;
+ $travel_user_booking_fewo->save();
-
-
+ \Session()->flash('alert-success', __('E-Mail wurde an die Mitarbeiter versendet.'));
+ return redirect(route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->id]));
+ }
+ }
}
public function delete($id){
@@ -188,7 +200,6 @@ class TravelUserBookingFewoController extends Controller
return ''.$travel_user_booking_fewo->travel_user->first_name.' '.$travel_user_booking_fewo->travel_user->last_name.' ';
})
->addColumn('is_calendar', function (TravelUserBookingFewo $travel_user_booking_fewo) {
-
$back = "";
$back .= $travel_user_booking_fewo->is_calendar_fewo_direct ? ' ' : ' ';
$back .= $travel_user_booking_fewo->is_calendar_hrs ? ' ' : ' ';
@@ -198,7 +209,6 @@ class TravelUserBookingFewoController extends Controller
->addColumn('status_name', function (TravelUserBookingFewo $travel_user_booking_fewo) {
return $travel_user_booking_fewo->getStatuesName();
})
-
->addColumn('action_delete', function (TravelUserBookingFewo $travel_user_booking_fewo) {
return ' ';
})
diff --git a/app/Http/Controllers/TravelUserController.php b/app/Http/Controllers/TravelUserController.php
index e33bbea..18f41ce 100755
--- a/app/Http/Controllers/TravelUserController.php
+++ b/app/Http/Controllers/TravelUserController.php
@@ -21,8 +21,6 @@ class TravelUserController extends Controller
'step' => $step
];
return view('travel.user.index', $data);
-
-
}
public function detail($id)
diff --git a/app/Models/FewoLodging.php b/app/Models/FewoLodging.php
index ef2b7f7..1c74762 100644
--- a/app/Models/FewoLodging.php
+++ b/app/Models/FewoLodging.php
@@ -55,6 +55,7 @@ class FewoLodging extends Model
'group_id',
'type_id',
'name',
+ 'single_name',
'description',
'equipment',
'adress1',
diff --git a/app/Models/TravelUserBookingFewo.php b/app/Models/TravelUserBookingFewo.php
index 35a676d..6e9775e 100644
--- a/app/Models/TravelUserBookingFewo.php
+++ b/app/Models/TravelUserBookingFewo.php
@@ -85,6 +85,7 @@ class TravelUserBookingFewo extends Model
'price_deposit' => 'float',
'price_service' => 'float',
'price_balance' => 'float',
+ 'price_extra' => 'float',
'price_total' => 'float',
'travel_booking_fewo_channel_id' => 'int',
'is_calendar_fewo_direct' => 'bool',
@@ -94,6 +95,7 @@ class TravelUserBookingFewo extends Model
'send_user_mail' => 'array',
'send_service_mail' => 'array',
'send_info_mail' => 'array',
+ 'send_employee_mail' => 'array',
];
protected $dates = [
@@ -115,9 +117,11 @@ class TravelUserBookingFewo extends Model
'to_date',
'daily_prices',
'price_travel',
+ 'price_balance',
+ 'price_extra',
+ 'price_travel_total',
'price_deposit',
'price_service',
- 'price_balance',
'price_total',
'travel_booking_fewo_channel_id',
'notice',
@@ -155,6 +159,14 @@ class TravelUserBookingFewo extends Model
return "";
}
+ public function getCheckedBadgeCalendar(){
+ $back = "";
+ $back .= $this->is_calendar_fewo_direct ? ' ' : ' ';
+ $back .= $this->is_calendar_hrs ? ' ' : ' ';
+ $back .= $this->is_calendar_stern_tours ? ' ' : ' ';
+ return $back;
+ }
+
public function getPersonsAttribute($value)
{
@@ -259,6 +271,61 @@ class TravelUserBookingFewo extends Model
return isset($this->attributes['price_travel']) ? $this->attributes['price_travel'] : 0;
}
+ //price_extra
+ public function setPriceExtraAttribute($value)
+ {
+ $value = Util::_format_number($value);
+ $this->attributes['price_extra'] = floatval(str_replace(',', '.', $value));
+ }
+ public function getPriceExtraAttribute($value)
+ {
+ if(!$value){ return 0; }
+ return number_format(($this->attributes['price_extra']), 2, ',', '.');
+ }
+ public function getPriceExtraRaw()
+ {
+ return isset($this->attributes['price_extra']) ? $this->attributes['price_extra'] : 0;
+ }
+
+
+ //price_balance
+ public function setPriceBalanceAttribute($value)
+ {
+ $value = Util::_format_number($value);
+ $this->attributes['price_balance'] = floatval(str_replace(',', '.', $value));
+ }
+ public function getPriceBalanceAttribute($value)
+ {
+ if(!$value){ return 0; }
+ return number_format(($this->attributes['price_balance']), 2, ',', '.');
+ }
+ public function getPriceBalanceRaw()
+ {
+ return isset($this->attributes['price_balance']) ? $this->attributes['price_balance'] : 0;
+ }
+
+
+ //price_travel_total
+ public function setPriceTravelTotalAttribute($value)
+ {
+ $value = Util::_format_number($value);
+ $this->attributes['price_travel_total'] = floatval(str_replace(',', '.', $value));
+ }
+ public function getPriceTravelTotalAttribute($value)
+ {
+ if(!$value){
+ $this->attributes['price_travel_total'] = $this->getPriceTravelRaw() + $this->getPriceBalanceRaw() + $this->getPriceExtraRaw();
+ }
+ return number_format(($this->attributes['price_travel_total']), 2, ',', '.');
+ }
+ public function getPriceTravelTotalRaw()
+ {
+ if(!isset($this->attributes['price_travel_total']) || $this->attributes['price_travel_total'] == 0){
+ $this->attributes['price_travel_total'] = $this->getPriceTravelRaw() + $this->getPriceBalanceRaw() + $this->getPriceExtraRaw();
+ }
+ return isset($this->attributes['price_travel_total']) ? $this->attributes['price_travel_total'] : 0;
+ }
+
//price_deposit
public function setPriceDepositAttribute($value)
{
@@ -295,21 +362,6 @@ class TravelUserBookingFewo extends Model
return isset($this->attributes['price_service']) ? $this->attributes['price_service'] : 0;
}
- //price_balance
- public function setPriceBalanceAttribute($value)
- {
- $value = Util::_format_number($value);
- $this->attributes['price_balance'] = floatval(str_replace(',', '.', $value));
- }
- public function getPriceBalanceAttribute($value)
- {
- if(!$value){ return 0; }
- return number_format(($this->attributes['price_balance']), 2, ',', '.');
- }
- public function getPriceBalanceRaw()
- {
- return isset($this->attributes['price_balance']) ? $this->attributes['price_balance'] : 0;
- }
//price_total
public function setPriceTotalAttribute($value)
@@ -329,35 +381,23 @@ class TravelUserBookingFewo extends Model
return isset($this->attributes['price_total']) ? $this->attributes['price_total'] : 0;
}
- public function getPriceTotalFirstPay(){
- if($this->attributes['price_total'] == 0){
- return 0;
- }
- $first_pay = $this->attributes['price_total']/2;
- return number_format(($first_pay), 2, ',', '.');
- }
- public function getPriceTotalSecondPay(){
- if($this->attributes['price_total'] == 0){
- return 0;
- }
- $first_pay = $this->attributes['price_total']/2;
- return number_format(($this->attributes['price_total'] - $first_pay), 2, ',', '.');
- }
- public function getPriceTravelFirstPay(){
+ public function getPriceTravelTotalFirstPay(){
if($this->attributes['price_travel'] == 0){
return 0;
}
- $first_pay = $this->attributes['price_travel']/2;
+ $first_pay = ($this->getPriceTravelTotalRaw() + $this->getPriceServiceRaw()) / 2;
return number_format(($first_pay), 2, ',', '.');
}
- public function getPriceTravelSecondPay(){
+ public function getPriceTravelTotalSecondPay(){
if($this->attributes['price_travel'] == 0){
return 0;
}
- $first_pay = $this->attributes['price_travel']/2;
- return number_format(($this->attributes['price_travel'] - $first_pay + $this->attributes['price_deposit']), 2, ',', '.');
+ $total_pay = ($this->getPriceTravelTotalRaw() + $this->getPriceServiceRaw());
+ $first_pay = $total_pay/2;
+ return number_format(($total_pay - $first_pay + $this->getPriceDepositRaw()), 2, ',', '.');
}
+
public function getBookingDateYear(){
return Carbon::parse($this->booking_date)->format('Y');
}
@@ -487,7 +527,12 @@ class TravelUserBookingFewo extends Model
}
public function getNameAddressLocation($sep = "\n"){
if($this->fewo_lodging){
- return $this->fewo_lodging->name.$sep.$this->fewo_lodging->adress1." ".$this->fewo_lodging->adress2.", ".$this->fewo_lodging->zip_code." ".$this->fewo_lodging->city;
+
+ $name = trim($this->fewo_lodging->single_name).$sep;
+ $address = trim($this->fewo_lodging->adress1);
+ $address .= $this->fewo_lodging->adress2 ? " ".$this->fewo_lodging->adress2.$sep : ", ";
+ $city = trim($this->fewo_lodging->zip_code)." ".trim($this->fewo_lodging->city);
+ return $name.$address.$city;
}
return "";
}
@@ -517,7 +562,17 @@ class TravelUserBookingFewo extends Model
$this->from_date." - ".$this->to_date." ".$this->travel_user->first_name." ".$this->travel_user->last_name;
}
+ public function getEmployeeMailSubject(){
+ if($this->fewo_lodging){
+ return "CRM Fewo Buchung: ".$this->fewo_lodging->name." | Anreise ".$this->from_date;
+ }
+ return "CRM Fewo Buchung | Anreise ".$this->from_date;
+ }
-
+ public function getEmployeeMailContent(){
+ return ($this->travel_user_id ? "Kunde: ".route('travel_user_detail', [$this->travel_user_id])."\n" : "").
+ "Buchung: ".route('travel_user_booking_fewo_detail', [$this->id])."\n".
+ $this->travel_user->first_name." ".$this->travel_user->last_name." | ".$this->from_date." - ".$this->to_date." | ".$this->adults." + ".$this->children." (Erwachsene + Kinder)";
+ }
}
diff --git a/app/Repositories/TravelUserBookingFewoRepository.php b/app/Repositories/TravelUserBookingFewoRepository.php
index 86633a1..be204c4 100644
--- a/app/Repositories/TravelUserBookingFewoRepository.php
+++ b/app/Repositories/TravelUserBookingFewoRepository.php
@@ -143,6 +143,7 @@ class TravelUserBookingFewoRepository extends BaseRepository {
//check for data
$check_for_reservation = true;
$fewo_reservation_id = 0;
+ $model = false;
if($id > 0) {
$model = TravelUserBookingFewo::findOrFail($id);
if($data['from_date'] == $model->from_date && $data['to_date'] == $model->to_date){
@@ -178,13 +179,12 @@ class TravelUserBookingFewoRepository extends BaseRepository {
'status' => 'required'
);
+ if($fewo_reservation_id > 0 && $model && Input::get('invoice_number')){
+ $rules['invoice_number'] = 'required|unique:mysql_stern.travel_user_booking_fewos,invoice_number,'.$model->id;
+ }
+
$validator = Validator::make(Input::all(), $rules);
- /* $message = 'my custom validation rule message' . $data['from_date'];
- Validator::extend('my_custom_validation_rule', function ($attribute, $value, $parameters) {
- //
- }, $message);
- */
if ($validator->fails()) {
return back()->withInput(Input::all())->withErrors($validator);
}
diff --git a/config/mail.php b/config/mail.php
index ec2334e..ae991ba 100755
--- a/config/mail.php
+++ b/config/mail.php
@@ -59,10 +59,8 @@ return [
'address' => env('MAIL_FROM_ADDRESS', 'info@mein.sterntours.de'),
'name' => env('MAIL_FROM_NAME', 'Mein Stern-Tours'),
],
- 'mail_bbc' => env('MAIL_BBC', 'info@sterntours.de'),
-
-
-
+ 'mail_bbc' => explode(',', env('MAIL_BBC', 'kontakt@stern-tours.de')),
+ 'mail_fewo_employee' => env('MAIL_FEWO_EMPLOYEE', 'kontakt@stern-tours.de'),
/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
diff --git a/database/migrations/2019_03_20_132556_create_fewo_lodging_table.php b/database/migrations/2019_03_20_132556_create_fewo_lodging_table.php
index 48c045b..753094f 100644
--- a/database/migrations/2019_03_20_132556_create_fewo_lodging_table.php
+++ b/database/migrations/2019_03_20_132556_create_fewo_lodging_table.php
@@ -22,6 +22,7 @@ class CreateFewoLodgingTable extends Migration
$table->integer('group_id')->nullable();
$table->integer('type_id')->nullable();
$table->string('name', 255);
+ $table->string('single_name', 255);
$table->longText('description');
$table->longText('equipment');
$table->string('adress1', 255);
diff --git a/database/migrations/2019_03_21_123748_create_travel_user_booking_fewos_table.php b/database/migrations/2019_03_21_123748_create_travel_user_booking_fewos_table.php
index 68015eb..24a7d8b 100644
--- a/database/migrations/2019_03_21_123748_create_travel_user_booking_fewos_table.php
+++ b/database/migrations/2019_03_21_123748_create_travel_user_booking_fewos_table.php
@@ -33,9 +33,11 @@ class CreateTravelUserBookingFewosTable extends Migration
$table->text('daily_prices')->nullable();
$table->decimal('price_travel', 13, 2)->nullable();
+ $table->decimal('price_balance', 13, 2)->nullable();
+ $table->decimal('price_extra', 13, 2)->nullable();
+ $table->decimal('price_travel_total', 13, 2)->nullable();
$table->decimal('price_deposit', 8, 2)->nullable();
$table->decimal('price_service', 8, 2)->nullable();
- $table->decimal('price_balance', 8, 2)->nullable();
$table->decimal('price_total', 13, 2)->nullable();
@@ -53,8 +55,9 @@ class CreateTravelUserBookingFewosTable extends Migration
$table->text('send_user_mail')->nullable();
$table->text('send_service_mail')->nullable();
- $table->text('info_mail_text')->nullable();
+ $table->text('send_employee_mail')->nullable();
$table->text('send_info_mail')->nullable();
+ $table->text('info_mail_text')->nullable();
$table->timestamps();
$table->softDeletes();
diff --git a/public/css/application.css b/public/css/application.css
index d6b2d78..0182942 100644
--- a/public/css/application.css
+++ b/public/css/application.css
@@ -93,6 +93,8 @@
border-color: rgba(100, 136, 89, 0.4);
}
-
+.alert ul {
+ margin: 0;
+}
diff --git a/public/css/incoice_fewo_pdf.css b/public/css/incoice_fewo_pdf.css
deleted file mode 100644
index 40b3dc7..0000000
--- a/public/css/incoice_fewo_pdf.css
+++ /dev/null
@@ -1,32 +0,0 @@
-
-html {
- width: 100%;
- height: 100%;
-}
-body {
- position: relative;
- width: 100%;
- height: 100%;
- margin: 0 auto;
- padding: 0;
- color: #000;
- background: #fff;
- font-family: 'DejaVu Sans', sans-serif;
- font-size: 9pt;
- line-height: 1.3em;
- font-weight: 400 ;
-}
-table {
- border: none;
-}
-
-strong {
- font-weight: 600;
-}
-
-@page {
- margin: 0px;
-}
-@page {
- margin-top: 0px;
-}
diff --git a/public/css/stern_fewo_pdf.css b/public/css/stern_fewo_pdf.css
new file mode 100644
index 0000000..0b9dec3
--- /dev/null
+++ b/public/css/stern_fewo_pdf.css
@@ -0,0 +1,166 @@
+html {
+ width: 100%;
+ height: 100%;
+}
+body {
+ position: relative;
+ width: 100%;
+ height: 100%;
+ margin: 0 auto;
+ padding: 0;
+ color: #000;
+ background: #fff;
+ font-size: 10pt;
+ line-height: 1.2em;
+}
+table {
+ border: none;
+}
+
+strong {
+ font-weight: 600;
+}
+
+@page {
+ margin: 0px;
+}
+@page {
+ margin-top: 0px;
+}
+
+
+@page {
+ margin: 90mm 0 30mm 0;
+ color:#000;
+}
+
+.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;
+ color:#000;
+}
+#address_box #address_back{
+ font-size: 7pt;
+ text-decoration: underline;
+ margin-bottom: 2mm;
+ color:#000;
+}
+
+#date_box {
+ position: absolute;
+ top:-10mm;
+ right: 15mm;
+ width: 70mm;
+ height: 10mm;
+ z-index: 1;
+ font-size: 10pt;
+ line-height: 12pt;
+ text-align: right;
+ color:#000;
+}
+
+#title_box {
+ position: absolute;
+ top:0mm;
+ left: 25mm;
+ width: 160mm;
+ height: 10mm;
+ z-index: 2;
+ font-weight: bold;
+ color:#000;
+}
+#title_box .title {
+ font-size: 16pt;
+ line-height: 12pt;
+ color:#000;
+}
+#title_box .subtitle {
+ font-size: 9pt;
+ line-height: 9pt;
+ color:#000;
+}
+
+#detail_box {
+ position: absolute;
+ top:15mm;
+ left: 25mm;
+ right: 15mm;
+ z-index: 3;
+ font-size: 9pt;
+ color:#000;
+}
+
+
+#detail_box table {
+ width: 100%;
+ line-height: 9pt;
+ border-collapse: collapse;
+ color:#000;
+}
+#detail_box table td {
+ border: 0.5pt solid #8c8c8c;
+ padding: 1mm;
+ color:#000;
+}
+
+#detail_box table td.left {
+ text-align: right;
+ width: 50mm;
+ color:#000;
+}
+
+#detail_box table td.right {
+ text-align: left;
+ color:#000;
+
+}
+.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;
+}
\ No newline at end of file
diff --git a/resources/lang/de/validation.php b/resources/lang/de/validation.php
index e56c2e8..791d09e 100755
--- a/resources/lang/de/validation.php
+++ b/resources/lang/de/validation.php
@@ -172,5 +172,6 @@ return [
'time' => 'Uhrzeit',
'available' => 'verfügbar',
'size' => 'Größe',
+ 'invoice_number' => 'Rechnungnummer',
],
];
diff --git a/resources/views/emails/content.blade.php b/resources/views/emails/content.blade.php
index 5595660..e110947 100644
--- a/resources/views/emails/content.blade.php
+++ b/resources/views/emails/content.blade.php
@@ -139,9 +139,9 @@
-
+
{!! nl2br($content) !!}
-
+
diff --git a/resources/views/emails/invoice.blade.php b/resources/views/emails/invoice.blade.php
index d3bab65..6cc7a59 100644
--- a/resources/views/emails/invoice.blade.php
+++ b/resources/views/emails/invoice.blade.php
@@ -171,7 +171,7 @@
{{ __('Mietpreis:') }}
- {{ $model->price_travel }} €
+ {{ $model->price_travel_total }} €
@@ -218,13 +218,15 @@
Mietbedingungen und Mietbestätigung / Rechnung finden Sie als PDF im Anhang.
Mit dieser Buchungsbestätigung ist der Mietvertrag für Sie und uns verbindlich.
- eine sofort zahlungsfällige Anzahlung von 50% Mietpreis = {{ $model->getPriceTravelFirstPay() }} €
- sowie eine Restzahlung von {{ $model->getPriceTravelSecondPay() }} € bis spätestens 4 Wochen vor Belegungsbeginn inkl. der oben genannten Kaution.
+ eine sofort zahlungsfällige Anzahlung von 50% Mietpreis = {{ $model->getPriceTravelTotalFirstPay() }} €
+ sowie eine Restzahlung von {{ $model->getPriceTravelTotalSecondPay() }} € bis spätestens 4 Wochen vor Belegungsbeginn inkl. der oben genannten Kaution.
auf folgendes Bankkonto:
STERN TOURS GmbH
IBAN: DE83100208900018857111
- BIC: HYVEDEMM488
+ BIC: HYVEDEMM488
+ Verwendungszweck: {{$model->invoice_number}}
+
Mit freundlichen Grüßen
Ihr Team von STERN TOURS
diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php
index ceee4df..234992b 100755
--- a/resources/views/home.blade.php
+++ b/resources/views/home.blade.php
@@ -281,13 +281,13 @@
{{ __('Logout') }}
- {{--
-
-
{{__('Delete') }}
-
{{__('If you no longer want to use our offer, you can delete your account here.')}}
-
{{__('Delete Account')}}
-
- --}}
+{{--
+
+
{{__('Delete') }}
+
{{__('If you no longer want to use our offer, you can delete your account here.')}}
+
{{__('Delete Account')}}
+
+ --}}
@endsection
diff --git a/resources/views/pdf/invoice_fewo.blade.php b/resources/views/pdf/invoice_fewo.blade.php
index b68837b..db3e71a 100644
--- a/resources/views/pdf/invoice_fewo.blade.php
+++ b/resources/views/pdf/invoice_fewo.blade.php
@@ -1,157 +1,6 @@
-
-
-
-
-
-
- {!! Html::style('css/invoice_fewo_pdf.css') !!}
-
-
-
-{{--
-
-
-
- --}}
-
-
-
+@extends('pdf.layout')
+@section('content')
STERN TOURS GmbH • Emser Str. 3 • 10719 Berlin
{!! nl2br($model->getBookingUserAddress()) !!}
@@ -161,15 +10,14 @@
Berlin, den {!! date("d.m.Y") !!}
-
- Mietbestätigung / Rechnung Nr. {{$model->invoice_number}}
-
-
+
+ Mietbestätigung / Rechnung Nr. {{$model->invoice_number}}
+
{{$model->getUserSalutation()}},
- herzlichen Dank für Ihre Online-Buchung vom {{$model->booking_date}} :
+ herzlichen Dank für Ihre Online-Buchung vom {{$model->booking_date}}.
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:
@@ -190,11 +38,11 @@
{{ __('Mietpreis:') }}
- {{ $model->price_travel }} €
+ {{ $model->price_travel_total }} €
- {{ __('Service-Gebühr:') }}??
+ {{ __('Service-Gebühr:') }}
{{ $model->price_service }} €
@@ -218,13 +66,14 @@
Mit dieser Buchungsbestätigung ist der Mietvertrag für Sie und uns verbindlich.
Entsprechend der Regelungen unter Ziffer 3.1. und 3.2. unserer Mietbedingungen überweisen Sie uns bitte
- eine sofort zahlungsfällige Anzahlung von 50% Mietpreis = {{ $model->getPriceTravelFirstPay() }} €
- sowie eine Restzahlung von {{ $model->getPriceTravelSecondPay() }} € bis spätestens 4 Wochen vor Belegungsbeginn inkl. der oben genannten Kaution.
+ eine sofort zahlungsfällige Anzahlung von 50% Mietpreis = {{ $model->getPriceTravelTotalFirstPay() }} €
+ sowie eine Restzahlung von {{ $model->getPriceTravelTotalSecondPay() }} € bis spätestens 4 Wochen vor Belegungsbeginn inkl. der oben genannten Kaution.
auf folgendes Bankkonto:
STERN TOURS GmbH
IBAN: DE83100208900018857111
- BIC: HYVEDEMM488
+ BIC: HYVEDEMM488
+ Verwendungszweck: {{$model->invoice_number}}
Beachten Sie bitte, dass eine Nichtzahlung des Unterkunftspreises zu den genannten Fälligkeitsdaten keine Aufhebung des
@@ -233,42 +82,4 @@
Mit freundlichen Grüßen
Ihr Team von STERN TOURS
-
-
-
-
-
-
-
\ No newline at end of file
+@endsection
\ No newline at end of file
diff --git a/resources/views/pdf/layout.blade.php b/resources/views/pdf/layout.blade.php
new file mode 100644
index 0000000..288edac
--- /dev/null
+++ b/resources/views/pdf/layout.blade.php
@@ -0,0 +1,49 @@
+
+
+
+
+
+ {!! Html::style('css/stern_fewo_pdf.css') !!}
+
+
+
+
+
+
+ @yield('content')
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/pdf/travel_info_fewo.blade.php b/resources/views/pdf/travel_info_fewo.blade.php
index 8e1ceba..7c8ebff 100644
--- a/resources/views/pdf/travel_info_fewo.blade.php
+++ b/resources/views/pdf/travel_info_fewo.blade.php
@@ -1,156 +1,6 @@
-
-
-
-
-
+@extends('pdf.layout')
- {!! Html::style('css/invoice_fewo_pdf.css') !!}
-
-
-
-{{--
-
-
-
- --}}
-
-
-
+@section('content')
STERN TOURS GmbH • Emser Str. 3 • 10719 Berlin
@@ -161,47 +11,12 @@
Berlin, den {!! date("d.m.Y") !!}
-
- Anreiseinfo Nr. {{$model->invoice_number}}
-
+
+ Anreiseinfo Nr. {{$model->invoice_number}}
+
{!! nl2br($travel_info_user_text) !!}
-
-
-
-
\ No newline at end of file
+@endsection
\ No newline at end of file
diff --git a/resources/views/travel/user/booking/form.blade.php b/resources/views/travel/user/booking/form.blade.php
index f962dd5..a85d043 100755
--- a/resources/views/travel/user/booking/form.blade.php
+++ b/resources/views/travel/user/booking/form.blade.php
@@ -26,7 +26,7 @@
@@ -75,34 +79,50 @@
@if(isset($travel_user_booking_fewo->daily_prices))
@foreach($travel_user_booking_fewo->daily_prices as $s => $d)
- {{$s}} | {{$d['fromDay']}} - {{$d['toDay']}} | {{$d['numberDays']}} Tage x {{$d['perNight']}} € / pro Nacht | {{$d['price']}} € Gesamt
+ {{$s}} | {{$d['fromDay']}} - {!! Carbon::parse($d['toDay'])->modify('+1 day')->format("d.m.Y") !!} | {{$d['numberDays']}} Nächte x {{$d['perNight']}} € / pro Nacht | {{$d['price']}} € Gesamt
@endforeach
@endif
-