This commit is contained in:
Kevin Adametz 2022-06-15 18:08:20 +02:00
parent 4e71ddabec
commit faa508b4ca
16 changed files with 249 additions and 23 deletions

View file

@ -1,5 +1,6 @@
{# @var booking_request \AppBundle\Entity\BookingRequest #} {# @var booking_request \AppBundle\Entity\BookingRequest #}
Sehr geehrte{{ booking_request.salutation == 1 ? 'r Herr' : ' Frau' }} {{ booking_request.lastName }},
Sehr {{ booking_request.salutationDear }} {{ booking_request.salutationName }} {{ booking_request.firstName }} {{ booking_request.lastName }},
vielen Dank für Ihren verbindlichen Buchungsauftrag. Dieser wird schnellstmöglich bearbeitet und stellt noch keine{# vielen Dank für Ihren verbindlichen Buchungsauftrag. Dieser wird schnellstmöglich bearbeitet und stellt noch keine{#
#} Reisebestätigung dar. Bitte prüfen Sie noch einmal Ihre Angaben und kontaktieren Sie uns bitte, wenn ein Fehler{# #} Reisebestätigung dar. Bitte prüfen Sie noch einmal Ihre Angaben und kontaktieren Sie uns bitte, wenn ein Fehler{#

View file

@ -42,10 +42,10 @@ Nicht eingeschlossene, zubuchbare Leistungen:
{% endfor %} {% endfor %}
===================================================================================== =====================================================================================
Reiseanmelder{% if booking_request.salutation == 2 %}in{% endif %} {{ booking_request.salutationApplicant }}
===================================================================================== =====================================================================================
Anrede: {{ booking_request.salutationName }}
Vorname: {{ booking_request.firstName }} Vorname: {{ booking_request.firstName }}
Nachname: {{ booking_request.lastName }} Nachname: {{ booking_request.lastName }}
Adresse: {{ booking_request.streetAddress }} Adresse: {{ booking_request.streetAddress }}
@ -64,27 +64,27 @@ Nr., Zimmertyp, Geschlecht, Vorname, Nachname, Geburtsdatum
{% set travelerCollection = booking_request.travelers|slice(0, (booking_request.travelerCount + booking_request.childrenCount)) %} {% set travelerCollection = booking_request.travelers|slice(0, (booking_request.travelerCount + booking_request.childrenCount)) %}
{% for room in booking_request.occupiedRooms %} {% for room in booking_request.occupiedRooms %}
{% if(room.type == 1) %} {% if(room.type == 1) %}
{{ loop.index }}. Einzelzimmer Erwachsener, {{ travelerCollection[travelerIndex].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }} {{ loop.index }}. Einzelzimmer Erwachsener, {{ travelerCollection[travelerIndex].sexName }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
{% set travelerIndex = travelerIndex + 1 %} {% set travelerIndex = travelerIndex + 1 %}
{% if(room.child == 1) %} {% if(room.child == 1) %}
{{ loop.index }}. Einzelzimmer Kind, {{ travelerCollection[travelerIndex].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }} {{ loop.index }}. Einzelzimmer Kind, {{ travelerCollection[travelerIndex].sexName }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
{% set travelerIndex = travelerIndex + 1 %} {% set travelerIndex = travelerIndex + 1 %}
{% endif %} {% endif %}
{% elseif (room.type == 2) %} {% elseif (room.type == 2) %}
{{ loop.index }}. Doppelzimmer Erwachsener, {{ travelerCollection[travelerIndex].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }} {{ loop.index }}. Doppelzimmer Erwachsener, {{ travelerCollection[travelerIndex].sexName }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
{{ loop.index }}. Doppelzimmer Erwachsener, {{ travelerCollection[travelerIndex+1].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex+1].firstName }}, {{ travelerCollection[travelerIndex+1].lastName -}}, {{ travelerCollection[travelerIndex+1].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }} {{ loop.index }}. Doppelzimmer Erwachsener, {{ travelerCollection[travelerIndex+1].sexName }}, {{ travelerCollection[travelerIndex+1].firstName }}, {{ travelerCollection[travelerIndex+1].lastName -}}, {{ travelerCollection[travelerIndex+1].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
{% set travelerIndex = travelerIndex + 2 %} {% set travelerIndex = travelerIndex + 2 %}
{% if(room.child == 1) %} {% if(room.child == 1) %}
{{ loop.index }}. Doppelzimmer Kind, {{ travelerCollection[travelerIndex].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }} {{ loop.index }}. Doppelzimmer Kind, {{ travelerCollection[travelerIndex].sexName }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
{% set travelerIndex = travelerIndex + 1 %} {% set travelerIndex = travelerIndex + 1 %}
{% endif %} {% endif %}
{% elseif (room.type == 3) %} {% elseif (room.type == 3) %}
{{ loop.index }}. Dreibettzimmer Erwachsener, {{ travelerCollection[travelerIndex].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }} {{ loop.index }}. Dreibettzimmer Erwachsener, {{ travelerCollection[travelerIndex].sexName }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
{{ loop.index }}. Dreibettzimmer Erwachsener, {{ travelerCollection[travelerIndex+1].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex+1].firstName }}, {{ travelerCollection[travelerIndex+1].lastName -}}, {{ travelerCollection[travelerIndex+1].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }} {{ loop.index }}. Dreibettzimmer Erwachsener, {{ travelerCollection[travelerIndex+1].sexName }}, {{ travelerCollection[travelerIndex+1].firstName }}, {{ travelerCollection[travelerIndex+1].lastName -}}, {{ travelerCollection[travelerIndex+1].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
{{ loop.index }}. Dreibettzimmer Erwachsener, {{ travelerCollection[travelerIndex+2].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex+2].firstName }}, {{ travelerCollection[travelerIndex+2].lastName -}}, {{ travelerCollection[travelerIndex+2].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }} {{ loop.index }}. Dreibettzimmer Erwachsener, {{ travelerCollection[travelerIndex+2].sexName }}, {{ travelerCollection[travelerIndex+2].firstName }}, {{ travelerCollection[travelerIndex+2].lastName -}}, {{ travelerCollection[travelerIndex+2].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
{% set travelerIndex = travelerIndex + 3 %} {% set travelerIndex = travelerIndex + 3 %}
{% if(room.child == 1) %} {% if(room.child == 1) %}
{{ loop.index }}. Dreibettzimmer Kind, {{ travelerCollection[travelerIndex].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }} {{ loop.index }}. Dreibettzimmer Kind, {{ travelerCollection[travelerIndex].sexName }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
{% set travelerIndex = travelerIndex + 1 %} {% set travelerIndex = travelerIndex + 1 %}
{% endif %} {% endif %}
{% endif %} {% endif %}

View file

@ -19,9 +19,9 @@ Ferienwohnung: {{ fewo_lodging.name }}
* Gesamtpreis: {{ priceResult.total_price|number_format(2) }} * Gesamtpreis: {{ priceResult.total_price|number_format(2) }}
======================================================= =======================================================
Reiseanmelder: {% if fewo_booking_request.salutation == 2 %}in{% endif %} {{ fewo_booking_request.salutationApplicant }}
* Anrede: {{ fewo_booking_request.salutationName }}
* Vorname: {{ fewo_booking_request.firstName }} * Vorname: {{ fewo_booking_request.firstName }}
* Nachname: {{ fewo_booking_request.lastName }} * Nachname: {{ fewo_booking_request.lastName }}
* Adresse: {{ fewo_booking_request.streetAddress }} * Adresse: {{ fewo_booking_request.streetAddress }}

View file

@ -7,7 +7,7 @@ CRM
{{ crm_v3_url }} {{ crm_v3_url }}
Anrede: {{ contact_request.salutation == 1 ? 'Herr' : 'Frau' }} Anrede: {{ contact_request.salutationName }}
Vorname: {{ contact_request.firstName|default('-') }} Vorname: {{ contact_request.firstName|default('-') }}
Nachname: {{ contact_request.lastName|default('-') }} Nachname: {{ contact_request.lastName|default('-') }}
Adresse: {{ contact_request.streetAddress|default('-') }} Adresse: {{ contact_request.streetAddress|default('-') }}

View file

@ -1,6 +1,5 @@
{# @var fewo_booking_request \AppBundle\Entity\FewoBookingRequest #} {# @var fewo_booking_request \AppBundle\Entity\FewoBookingRequest #}
Sehr geehrte{{ fewo_booking_request.salutation == 1 ? 'r Herr' : ' Frau' }} {{ fewo_booking_request.lastName }}, Sehr {{ fewo_booking_request.salutationDear }} {{ fewo_booking_request.salutationName }} {{ fewo_booking_request.firstName }} {{ fewo_booking_request.lastName }},
vielen Dank für Ihren Auftrag, folgende Ferienwohnung wurde gemietet: vielen Dank für Ihren Auftrag, folgende Ferienwohnung wurde gemietet:

View file

@ -146,6 +146,8 @@
Herr Herr
{% elseif booking.salutationId == 2 %} {% elseif booking.salutationId == 2 %}
Frau Frau
{% elseif booking.salutationId == 3 %}
Keine Angabe
{% endif %} {% endif %}
</td> </td>
</tr> </tr>

View file

@ -368,7 +368,7 @@ class DefaultController extends Controller
if(empty($request->get('g-recaptcha-response'))){ if(empty($request->get('g-recaptcha-response'))){
$re_error = 'Bitte lösen Sie das reCAPTCHA.'; $re_error = 'Bitte lösen Sie das reCAPTCHA.';
$error = true; $error = true;
} }
//your site secret key //your site secret key
$secret = '6LfjBm8UAAAAANKNzGhSiMaoEg9mUswlaZkOHgI4'; $secret = '6LfjBm8UAAAAANKNzGhSiMaoEg9mUswlaZkOHgI4';

View file

@ -20,6 +20,8 @@ class BookingRequest
// Used in SternToursCrmBookingExports, expected to be equivalent to sex (as defined in Traveler) // Used in SternToursCrmBookingExports, expected to be equivalent to sex (as defined in Traveler)
const MR = 1; const MR = 1;
const MRS = 2; const MRS = 2;
const DIV = 3;
/** /**
* @var TravelDeparturePoint $departure * @var TravelDeparturePoint $departure
@ -466,6 +468,55 @@ class BookingRequest
$this->salutation = $salutation; $this->salutation = $salutation;
} }
public function getSalutationName()
{
switch ($this->salutation) {
case 1:
return 'Herr';
break;
case 2:
return 'Frau';
break;
case 3:
return 'Divers/keine Anrede';
break;
}
return '';
}
public function getSalutationDear()
{
switch ($this->salutation) {
case 1:
return 'geehrter';
break;
case 2:
return 'geehrte';
break;
case 3:
return 'geehrte:r';
break;
}
return '';
}
public function getSalutationApplicant()
{
switch ($this->salutation) {
case 1:
return 'Reiseanmelder';
break;
case 2:
return 'Reiseanmelderin';
break;
case 3:
return 'Reiseanmelder:in';
break;
}
return '';
}
/** /**
* @return string * @return string
*/ */

View file

@ -13,6 +13,8 @@ class ContactRequest
{ {
const MR = 1; const MR = 1;
const MRS = 2; const MRS = 2;
const DIV = 3;
/** @var int|null $salutation */ /** @var int|null $salutation */
private $salutation; private $salutation;
@ -92,6 +94,54 @@ class ContactRequest
$this->salutation = $salutation; $this->salutation = $salutation;
} }
public function getSalutationName()
{
switch ($this->salutation) {
case 1:
return 'Herr';
break;
case 2:
return 'Frau';
break;
case 3:
return 'Divers/keine Anrede';
break;
}
return '';
}
public function getSalutationDear()
{
switch ($this->salutation) {
case 1:
return 'geehrter';
break;
case 2:
return 'geehrte';
break;
case 3:
return 'geehrte:r';
break;
}
return '';
}
public function getSalutationApplicant()
{
switch ($this->salutation) {
case 1:
return 'Reiseanmelder';
break;
case 2:
return 'Reiseanmelderin';
break;
case 3:
return 'Reiseanmelder:in';
break;
}
return '';
}
/** /**
* @return null|string * @return null|string
*/ */

View file

@ -21,6 +21,8 @@ class FewoBookingRequest
// Used in SternToursCrmBookingExports, expected to be equivalent to sex (as defined in Traveler) // Used in SternToursCrmBookingExports, expected to be equivalent to sex (as defined in Traveler)
const MR = 1; const MR = 1;
const MRS = 2; const MRS = 2;
const DIV = 3;
/** /**
* @Assert\DateTime() * @Assert\DateTime()
@ -157,6 +159,54 @@ class FewoBookingRequest
$this->salutation = $salutation; $this->salutation = $salutation;
} }
public function getSalutationName()
{
switch ($this->salutation) {
case 1:
return 'Herr';
break;
case 2:
return 'Frau';
break;
case 3:
return 'Divers/keine Anrede';
break;
}
return '';
}
public function getSalutationDear()
{
switch ($this->salutation) {
case 1:
return 'geehrter';
break;
case 2:
return 'geehrte';
break;
case 3:
return 'geehrte:r';
break;
}
return '';
}
public function getSalutationApplicant()
{
switch ($this->salutation) {
case 1:
return 'Reiseanmelder';
break;
case 2:
return 'Reiseanmelderin';
break;
case 3:
return 'Reiseanmelder:in';
break;
}
return '';
}
/** /**
* @return mixed * @return mixed
*/ */

View file

@ -90,7 +90,8 @@ class TravelBookingRepository extends \Doctrine\ORM\EntityRepository
'travel_category_id' => $tp->getTravelCategory(), 'travel_category_id' => $tp->getTravelCategory(),
'travelagenda_id' => $tp->getTravelAgenda(), 'travelagenda_id' => $tp->getTravelAgenda(),
'travel_title' => $tp->getTitle(), 'travel_title' => $tp->getTitle(),
'travel_number' => $travelDate->getName() 'travel_number' => $travelDate->getName(),
'travel_company_id' => $tp->getTravelCompany(),
]); ]);
$ret->setSelectedDeparture([ $ret->setSelectedDeparture([

View file

@ -198,6 +198,13 @@ class TravelProgram
*/ */
private $travelAgenda; private $travelAgenda;
/**
* @var integer
*
* @ORM\Column(name="travel_company", type="integer", nullable=true)
*/
private $travelCompany;
/** /**
* @var integer * @var integer
* *
@ -1083,8 +1090,35 @@ class TravelProgram
return $this->travelAgenda; return $this->travelAgenda;
} }
/**
* Set travelCompany
*
* @param integer $travelCompany
*
* @return TravelProgram
*/
public function setTravelCompany($travelCompany)
{
$this->travelCompany = $travelCompany;
return $this;
}
/** /**
* Set travelAgenda * Get travelCompany
*
* @return integer
*/
public function getTravelCompany()
{
return $this->travelCompany;
}
/**
* Set depositPercent
* *
* @param integer $depositPercent * @param integer $depositPercent
* *

View file

@ -13,6 +13,8 @@ class Traveler
// Used in SternToursCrmBookingExports, expected to be equivalent to salutation (as defined in BookingRequest) // Used in SternToursCrmBookingExports, expected to be equivalent to salutation (as defined in BookingRequest)
const MALE = 1; const MALE = 1;
const FEMALE = 2; const FEMALE = 2;
const DIV = 3;
private $NATIONALITIES = []; private $NATIONALITIES = [];
@ -78,6 +80,38 @@ class Traveler
$this->sex = $sex; $this->sex = $sex;
} }
public function getSexName()
{
switch ($this->sex) {
case 1:
return 'Herr';
break;
case 2:
return 'Frau';
break;
case 3:
return 'Divers/keine Anrede';
break;
}
return '';
}
public function getSexApplicant()
{
switch ($this->sex) {
case 1:
return 'Reiseanmelder';
break;
case 2:
return 'Reiseanmelderin';
break;
case 3:
return 'Reiseanmelder:in';
break;
}
return '';
}
/** /**
* @return string * @return string
*/ */

View file

@ -97,7 +97,8 @@ class BookingRequestType extends AbstractType
public static $SALUTATION_CHOICES = [ public static $SALUTATION_CHOICES = [
'Herr' => BookingRequest::MR, 'Herr' => BookingRequest::MR,
'Frau' => BookingRequest::MRS 'Frau' => BookingRequest::MRS,
'Divers/keine Anrede' => BookingRequest::DIV
]; ];
/* /*

View file

@ -36,7 +36,9 @@ class FewoBookingRequestType extends AbstractType
public static $SALUTATION_CHOICES = [ public static $SALUTATION_CHOICES = [
'Herr' => 1, 'Herr' => 1,
'Frau' => 2 'Frau' => 2,
'Divers/keine Anrede' => 3
]; ];
public static $NATIONALITY_CHOICES = []; public static $NATIONALITY_CHOICES = [];

View file

@ -25,7 +25,8 @@ class TravelerType extends AbstractType
{ {
public static $SEX_CHOICES = [ public static $SEX_CHOICES = [
'männlich' => Traveler::MALE, 'männlich' => Traveler::MALE,
'weiblich' => Traveler::FEMALE 'weiblich' => Traveler::FEMALE,
'Divers/keine Anrede' => Traveler::DIV
]; ];
public static $NATIONALITY_CHOICES = []; public static $NATIONALITY_CHOICES = [];