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 #}
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{#
#} 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 %}
=====================================================================================
Reiseanmelder{% if booking_request.salutation == 2 %}in{% endif %}
{{ booking_request.salutationApplicant }}
=====================================================================================
Anrede: {{ booking_request.salutationName }}
Vorname: {{ booking_request.firstName }}
Nachname: {{ booking_request.lastName }}
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)) %}
{% for room in booking_request.occupiedRooms %}
{% 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 %}
{% 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 %}
{% endif %}
{% 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+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].sexName }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].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 %}
{% 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 %}
{% endif %}
{% 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+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+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].sexName }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].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].sexName }}, {{ travelerCollection[travelerIndex+2].firstName }}, {{ travelerCollection[travelerIndex+2].lastName -}}, {{ travelerCollection[travelerIndex+2].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
{% set travelerIndex = travelerIndex + 3 %}
{% 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 %}
{% endif %}
{% endif %}

View file

@ -19,9 +19,9 @@ Ferienwohnung: {{ fewo_lodging.name }}
* 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 }}
* Nachname: {{ fewo_booking_request.lastName }}
* Adresse: {{ fewo_booking_request.streetAddress }}

View file

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

View file

@ -1,6 +1,5 @@
{# @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:

View file

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

View file

@ -20,6 +20,8 @@ class BookingRequest
// Used in SternToursCrmBookingExports, expected to be equivalent to sex (as defined in Traveler)
const MR = 1;
const MRS = 2;
const DIV = 3;
/**
* @var TravelDeparturePoint $departure
@ -466,6 +468,55 @@ class BookingRequest
$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
*/

View file

@ -13,6 +13,8 @@ class ContactRequest
{
const MR = 1;
const MRS = 2;
const DIV = 3;
/** @var int|null $salutation */
private $salutation;
@ -92,6 +94,54 @@ class ContactRequest
$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
*/

View file

@ -21,6 +21,8 @@ class FewoBookingRequest
// Used in SternToursCrmBookingExports, expected to be equivalent to sex (as defined in Traveler)
const MR = 1;
const MRS = 2;
const DIV = 3;
/**
* @Assert\DateTime()
@ -157,6 +159,54 @@ class FewoBookingRequest
$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
*/

View file

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

View file

@ -198,6 +198,13 @@ class TravelProgram
*/
private $travelAgenda;
/**
* @var integer
*
* @ORM\Column(name="travel_company", type="integer", nullable=true)
*/
private $travelCompany;
/**
* @var integer
*
@ -1084,7 +1091,34 @@ class TravelProgram
}
/**
* Set travelAgenda
* Set travelCompany
*
* @param integer $travelCompany
*
* @return TravelProgram
*/
public function setTravelCompany($travelCompany)
{
$this->travelCompany = $travelCompany;
return $this;
}
/**
* Get travelCompany
*
* @return integer
*/
public function getTravelCompany()
{
return $this->travelCompany;
}
/**
* Set 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)
const MALE = 1;
const FEMALE = 2;
const DIV = 3;
private $NATIONALITIES = [];
@ -78,6 +80,38 @@ class Traveler
$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
*/

View file

@ -97,7 +97,8 @@ class BookingRequestType extends AbstractType
public static $SALUTATION_CHOICES = [
'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 = [
'Herr' => 1,
'Frau' => 2
'Frau' => 2,
'Divers/keine Anrede' => 3
];
public static $NATIONALITY_CHOICES = [];

View file

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