fix: adopt changes in price calculator to email
This commit is contained in:
@@ -87,7 +87,10 @@ class AjaxGroupsPriceController extends ActionController
|
|||||||
];
|
];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$selectedOptions = $this->groupsPriceOptionRepository->findByUids($groupsPriceInquiry->getOptions());
|
$options = $this->groupsPriceOptionRepository->findByUids($groupsPriceInquiry->getOptions());
|
||||||
|
$selectedOptions = array_map(function ($option) {
|
||||||
|
return $option->getTitle();
|
||||||
|
}, $options);
|
||||||
}
|
}
|
||||||
catch (InvalidQueryException $e) {
|
catch (InvalidQueryException $e) {
|
||||||
$selectedOptions = [];
|
$selectedOptions = [];
|
||||||
@@ -105,9 +108,6 @@ class AjaxGroupsPriceController extends ActionController
|
|||||||
'dateFrom' => $groupsPriceInquiry->getDateFrom(),
|
'dateFrom' => $groupsPriceInquiry->getDateFrom(),
|
||||||
'dateTo' => $groupsPriceInquiry->getDateTo(),
|
'dateTo' => $groupsPriceInquiry->getDateTo(),
|
||||||
'pax' => $groupsPriceInquiry->getPax(),
|
'pax' => $groupsPriceInquiry->getPax(),
|
||||||
'paxGroup1' => $groupsPriceInquiry->getPaxGroup1(),
|
|
||||||
'paxGroup2' => $groupsPriceInquiry->getPaxGroup2(),
|
|
||||||
'paxGroup3' => $groupsPriceInquiry->getPaxGroup3(),
|
|
||||||
'options' => $selectedOptions,
|
'options' => $selectedOptions,
|
||||||
'board' => $groupsPriceInquiry->getBoard(),
|
'board' => $groupsPriceInquiry->getBoard(),
|
||||||
'summary' => $groupsPriceInquiry->getSummary(),
|
'summary' => $groupsPriceInquiry->getSummary(),
|
||||||
|
|||||||
-2
@@ -166,7 +166,6 @@ return [
|
|||||||
'price_additional_person' => [
|
'price_additional_person' => [
|
||||||
'exclude' => false,
|
'exclude' => false,
|
||||||
'label' => 'Preis weitere Person',
|
'label' => 'Preis weitere Person',
|
||||||
'description' => 'ohne Jokercard, alle Altersgruppen',
|
|
||||||
'config' => [
|
'config' => [
|
||||||
'type' => 'input',
|
'type' => 'input',
|
||||||
'size' => 8,
|
'size' => 8,
|
||||||
@@ -176,7 +175,6 @@ return [
|
|||||||
'price_additional_person_chf' => [
|
'price_additional_person_chf' => [
|
||||||
'exclude' => false,
|
'exclude' => false,
|
||||||
'label' => 'Preis weitere Person in CHF',
|
'label' => 'Preis weitere Person in CHF',
|
||||||
'description' => 'ohne Jokercard, alle Altersgruppen',
|
|
||||||
'config' => [
|
'config' => [
|
||||||
'type' => 'input',
|
'type' => 'input',
|
||||||
'size' => 8,
|
'size' => 8,
|
||||||
|
|||||||
+19
-18
@@ -83,32 +83,32 @@
|
|||||||
<td>{{ formatCurrency(pricePax.base) }}</td>
|
<td>{{ formatCurrency(pricePax.base) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd:bg-zinc-100"
|
<tr class="odd:bg-zinc-100"
|
||||||
v-if="pricePax.additional.EUR > 0">
|
v-if="pricePax.additional.EUR > 0 || pricePax.additional.CHF > 0">
|
||||||
<th class="text-left py-2">Aufpreis Personenzahl</th>
|
<th class="text-left py-2">Aufpreis Personenzahl</th>
|
||||||
<td>{{ formatCurrency(pricePax.additional) }}</td>
|
<td>{{ formatCurrency(pricePax.additional) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd:bg-zinc-100"
|
<tr class="odd:bg-zinc-100"
|
||||||
v-if="priceShortTerm.EUR > 0">
|
v-if="priceShortTerm.EUR > 0 || priceShortTerm.CHF > 0">
|
||||||
<th class="text-left py-2">Aufpreis Kurzzeit</th>
|
<th class="text-left py-2">Aufpreis Kurzzeit</th>
|
||||||
<td>{{ formatCurrency(priceShortTerm) }}</td>
|
<td>{{ formatCurrency(priceShortTerm) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd:bg-zinc-100"
|
<tr class="odd:bg-zinc-100"
|
||||||
v-if="selectedOptions.length > 0">
|
v-for="selectedOption in selectedOptions">
|
||||||
<th class="text-left py-2">Zusatzleistungen</th>
|
<th class="text-left py-2">{{ selectedOption.title }}</th>
|
||||||
<td>{{ formatCurrency(priceOptions) }}</td>
|
<td>{{ formatCurrency(optionPrice(selectedOption)) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd:bg-zinc-100"
|
<tr class="odd:bg-zinc-100"
|
||||||
v-if="priceBoard.EUR > 0">
|
v-if="priceBoard.EUR > 0 || priceBoard.CHF > 0">
|
||||||
<th class="text-left py-2">Verpflegung</th>
|
<th class="text-left py-2">Verpflegung</th>
|
||||||
<td>{{ formatCurrency(priceBoard) }}</td>
|
<td>{{ formatCurrency(priceBoard) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd:bg-zinc-100"
|
<tr class="odd:bg-zinc-100"
|
||||||
v-if="pricePax.undersubscription.EUR > 0">
|
v-if="pricePax.undersubscription.EUR > 0 || pricePax.undersubscription.CHF > 0">
|
||||||
<th class="text-left py-2">Kleingruppen-Verpflegungszuschlag</th>
|
<th class="text-left py-2">Kleingruppen-Verpflegungszuschlag</th>
|
||||||
<td>{{ formatCurrency(pricePax.undersubscription) }}</td>
|
<td>{{ formatCurrency(pricePax.undersubscription) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd:bg-zinc-100"
|
<tr class="odd:bg-zinc-100"
|
||||||
v-if="priceRunningCosts.EUR > 0">
|
v-if="priceRunningCosts.EUR > 0 || priceRunningCosts.CHF > 0">
|
||||||
<th class="text-left py-2">Strom- und Abfallgebühren</th>
|
<th class="text-left py-2">Strom- und Abfallgebühren</th>
|
||||||
<td>{{ formatCurrency(priceRunningCosts) }}</td>
|
<td>{{ formatCurrency(priceRunningCosts) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
v-show="formErrors.name"
|
v-show="formErrors.name"
|
||||||
v-html="formErrors.name"></div>
|
v-html="formErrors.name"></div>
|
||||||
</div>
|
</div>
|
||||||
<div :class="{ 'has-error': formErrors.name }">
|
<div :class="{ 'has-error': formErrors.address }">
|
||||||
<label class="font-bold mb-2">
|
<label class="font-bold mb-2">
|
||||||
Adresse*
|
Adresse*
|
||||||
</label>
|
</label>
|
||||||
@@ -370,6 +370,14 @@ export default {
|
|||||||
|
|
||||||
return ` (${this.formatCurrency(option.price)})`
|
return ` (${this.formatCurrency(option.price)})`
|
||||||
},
|
},
|
||||||
|
optionPrice(option) {
|
||||||
|
let factor = true === option.ignoreWithBoard && this.selectedBoard ? -1 : 1
|
||||||
|
|
||||||
|
return {
|
||||||
|
EUR: option.price.EUR * factor,
|
||||||
|
CHF: option.price.CHF * factor,
|
||||||
|
}
|
||||||
|
},
|
||||||
initSelectableRanges() {
|
initSelectableRanges() {
|
||||||
let enabledDates = [];
|
let enabledDates = [];
|
||||||
for (let config of this.configs) {
|
for (let config of this.configs) {
|
||||||
@@ -417,7 +425,7 @@ export default {
|
|||||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][paxAdditional]': this.formatCurrency(this.pricePax.additional),
|
'tx_epproducts_ajax[groupsPriceInquiry][summary][paxAdditional]': this.formatCurrency(this.pricePax.additional),
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][undersubscription]': this.formatCurrency(this.pricePax.undersubscription),
|
'tx_epproducts_ajax[groupsPriceInquiry][summary][undersubscription]': this.formatCurrency(this.pricePax.undersubscription),
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][shortTerm]': this.formatCurrency(this.priceShortTerm),
|
'tx_epproducts_ajax[groupsPriceInquiry][summary][shortTerm]': this.formatCurrency(this.priceShortTerm),
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][options]': this.priceOptions,
|
'tx_epproducts_ajax[groupsPriceInquiry][summary][options]': this.formatCurrency(this.priceOptions),
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][board]': this.formatCurrency(this.priceBoard),
|
'tx_epproducts_ajax[groupsPriceInquiry][summary][board]': this.formatCurrency(this.priceBoard),
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][runningCosts]': this.formatCurrency(this.priceRunningCosts),
|
'tx_epproducts_ajax[groupsPriceInquiry][summary][runningCosts]': this.formatCurrency(this.priceRunningCosts),
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][total]': this.formatCurrency(this.priceTotal),
|
'tx_epproducts_ajax[groupsPriceInquiry][summary][total]': this.formatCurrency(this.priceTotal),
|
||||||
@@ -550,16 +558,9 @@ export default {
|
|||||||
return price
|
return price
|
||||||
},
|
},
|
||||||
priceRunningCosts() {
|
priceRunningCosts() {
|
||||||
let CHF = 0
|
|
||||||
|
|
||||||
// calculate CHF price when pax price in CHF is available since CHF prices may not be provided via CMS yet
|
|
||||||
if (0 < this.pricePax.base.CHF) {
|
|
||||||
CHF = this.nightsCount * this.selectedPax * this.runningCostsFactorChf
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
EUR: this.nightsCount * this.selectedPax * this.runningCostsFactorEur,
|
EUR: this.nightsCount * this.selectedPax * this.runningCostsFactorEur,
|
||||||
CHF
|
CHF: this.nightsCount * this.selectedPax * this.runningCostsFactorChf,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
priceTotal() {
|
priceTotal() {
|
||||||
|
|||||||
@@ -84,10 +84,10 @@
|
|||||||
<trans-unit id="tx_eptheme.message.name.1221560718">
|
<trans-unit id="tx_eptheme.message.name.1221560718">
|
||||||
<source>Bitte angeben</source>
|
<source>Bitte angeben</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_eptheme.message.group.1221560910">
|
<trans-unit id="tx_eptheme.message.group.1221560718">
|
||||||
<source>Bitte angeben</source>
|
<source>Bitte angeben</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_eptheme.message.address.1221560910">
|
<trans-unit id="tx_eptheme.message.address.1221560718">
|
||||||
<source>Bitte angeben</source>
|
<source>Bitte angeben</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_eptheme.message.phone.1221560718">
|
<trans-unit id="tx_eptheme.message.phone.1221560718">
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
<f:then>
|
<f:then>
|
||||||
<ul>
|
<ul>
|
||||||
<f:for each="{options}" as="option">
|
<f:for each="{options}" as="option">
|
||||||
<li>{option.title}</li>
|
<li>{option}</li>
|
||||||
</f:for>
|
</f:for>
|
||||||
</ul>
|
</ul>
|
||||||
</f:then>
|
</f:then>
|
||||||
|
|||||||
Reference in New Issue
Block a user