Compare commits

...
Sign in to create a new pull request.

3 commits

Author SHA1 Message Date
Kevin Adametz
b091bc63a7 WIP on master: 14478f3 fix Mail Summary Prices 2018-08-23 15:03:45 +02:00
Kevin Adametz
ee5660dc68 index on master: 14478f3 fix Mail Summary Prices 2018-08-23 15:03:45 +02:00
Kevin Adametz
14478f3ead fix Mail Summary Prices 2018-08-23 15:01:45 +02:00
3 changed files with 14 additions and 32 deletions

View file

@ -5,36 +5,15 @@ Reisedaten:
Reiseprogramm: {{ travel_date.travelProgram.title }} ({{ travel_date.name }})
Kategorie: Standard
Reisezeitraum: {{ travel_date.start|date }} - {{ travel_date.end|date }}
Abfahrts-/Abflugort: {{ booking_request.departure.name }} {{ booking_request.departure.extraCharge|number_format(2) }} € p.P.
Abfahrts-/Abflugort: {{ booking_request.departure.name }}
{% for room in booking_price_info['rooms'] %}
1x {{ room['name'] }} [Personen: {{ room.adults }} x {{ room['price']|number_format(2) }} € {% if room['children'] > 0 %} + Kind: {{ room['price_children']|number_format(2) }} € {% endif %}]
{% endfor %}
{{ booking_request.departure.extraCharge < 0 ? 'Aufschlag' : 'Abzug' }} Abfahrts-/Abflugort {{ booking_request.departure.name }}{#
#} {{ (booking_request.travelerCount + booking_request.childrenCount) }} x {{ booking_request.departure.extraCharge|number_format(2) }} €: {{
(booking_request.travelerCount * booking_request.departure.extraCharge)|number_format(2) }} €
{% for insuranceInfo in booking_price_info['insurancesOut'] %}
{{ insuranceInfo['count'] }}x {{ insuranceInfo['label_first'] }} [ {{ insuranceInfo['label_last'] }} ] {{ insuranceInfo['value']|number_format(2) }} €
{% endfor %}
{% for option in booking_request.travelOptions %}
{{ (booking_request.travelerCount + booking_request.childrenCount) }}x zugebuchte Leistung: {{ option.name }} [Erwachsener: {{ option.price|number_format(2) -}}€ ]
{% if option.priceChildren > 0 %}[Kind: {{ option.priceChildren|number_format(2) -}} €] {% endif %}
{{ ((booking_request.travelerCount * option.price) + (booking_request.childrenCount * option.priceChildren))|number_format(2) }} €
{% endfor %}
{% for classOption in booking_price_info['classOptions'] %}
{{ classOption['count'] }}x {{ classOption['name'] }} {{ classOption['price']|number_format(2) }} €: {{
(classOption['count'] * classOption['price'])|number_format(2) }} €
{% endfor %}
{% for discount in booking_price_info['discount'] %}
{{ discount['count'] }}x {{ discount['label_first'] }} [ {{ discount['label_last'] }} ] {{ discount['value']|number_format(2) }} €
{% endfor %}
------------------------------------------------------------
{% for summary_entry in summary %}
{{ summary_entry.value|number_format(2) }} € : {{ summary_entry.label|striptags }}
{% endfor %}
------------------------------------------------------------
Gesamtpreis: {{ booking_price_info['total']|number_format(2) }} €
Anzahlung: {{ booking_price_info.deposit_total|number_format(2) }} € (ist sofort fällig)

View file

@ -135,8 +135,6 @@ class BookingController extends Controller
$crmBookingUrl = preg_replace('/\\/api/', '', $crmBookingUrl).'/edit';
}
$this->get('mailer')->send(\Swift_Message::newInstance()
->setSubject('Ihr Buchungsauftrag bei STERN TOURS')
->setFrom('stern@stern-tours.de', 'STERN TOURS')
@ -148,6 +146,8 @@ class BookingController extends Controller
'booking_price_info' => $bookingPriceInfo,
'travel_date' => $travelDate,
'breadcrumb_entries' => $breadcrumbEntries,
'summary' => $htmlSummary,
]),
'text/plain', 'utf-8'
)
@ -156,7 +156,7 @@ class BookingController extends Controller
$this->get('mailer')->send(\Swift_Message::newInstance()
->setSubject('BUCHUNG: '. $travelProgram->getTitle() .'('. $travelDate->getName() .')')
->setFrom('stern@stern-tours.de', 'STERN TOURS')
->setTo("stern@stern-tours.de")
->setTo("stern@stern-tours.de")
->setBody(
$this->renderView('default/email/bookingServiceEmail.txt.twig', [
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
@ -166,6 +166,8 @@ class BookingController extends Controller
'booking_price_info' => $bookingPriceInfo,
'travel_date' => $travelDate,
'breadcrumb_entries' => $breadcrumbEntries,
'summary' => $htmlSummary,
]),
'text/plain', 'utf-8'
)
@ -267,6 +269,7 @@ class BookingController extends Controller
{
$insuranceHtmlSummary = [];
}
if (isset($outPriceInfo))
{
$outPriceInfo['rooms'] = [];

View file

@ -12,8 +12,8 @@ use Monolog\Logger;
abstract class SternToursCrmExporter
{
const API_URL = 'http://www.cms.stern-tours.net/api';
//const API_URL = 'http://cms-stern-tours.local/api';
// const API_URL = 'http://www.cms.stern-tours.net/api';
const API_URL = 'http://cms-stern-tours.local/api';
const API_KEY = 'f6077389c9ce710e554763a5de02c8ec';
const API_USER_ID = 15; // 'apiuser'
const WEBSITE_ID = 1; // 'sterntours.de'