Add undersubscription surcharge calculation to groups price
For small groups consisting of less than 50 pax a surcharge of 5€ per pax will be added, when a board selection is made.
This commit is contained in:
+11
-1
@@ -127,6 +127,11 @@
|
||||
<th class="text-left py-2">Verpflegung</th>
|
||||
<td>{{ formatCurrency(priceBoard) }}</td>
|
||||
</tr>
|
||||
<tr class="odd:bg-gray-100"
|
||||
v-if="pricePax.undersubscription > 0">
|
||||
<th class="text-left py-2">Kleingruppen-Verpflegungszuschlag</th>
|
||||
<td>{{ formatCurrency(pricePax.undersubscription) }}</td>
|
||||
</tr>
|
||||
<tr class="odd:bg-gray-100"
|
||||
v-if="priceRunningCosts > 0">
|
||||
<th class="text-left py-2">Strom- und Abfallgebühren</th>
|
||||
@@ -345,6 +350,7 @@ export default {
|
||||
'tx_epproducts_ajax[groupsPriceInquiry][paxGroup3]': this.includesBonusCard ? this.selectedPaxGroup3 : '',
|
||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][paxBase]': this.formatCurrency(this.pricePax.base),
|
||||
'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][shortTerm]': this.formatCurrency(this.priceShortTerm),
|
||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][options]': this.priceOptions,
|
||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][board]': this.formatCurrency(this.priceBoard),
|
||||
@@ -402,6 +408,7 @@ export default {
|
||||
pricePax() {
|
||||
let base = 0
|
||||
let additional = 0
|
||||
let undersubscription = 0
|
||||
for (let date of this.selectedRange) {
|
||||
for (let config of this.configs) {
|
||||
if (date >= dayjs(config.dateFrom) && date < dayjs(config.dateTo)) {
|
||||
@@ -432,7 +439,10 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
return {base, additional};
|
||||
if (this.selectedBoard && this.totalPax < 50) {
|
||||
undersubscription = this.totalPax * 5
|
||||
}
|
||||
return {base, additional, undersubscription};
|
||||
},
|
||||
totalPax() {
|
||||
return this.includesBonusCard ? this.selectedPaxGroup1 + this.selectedPaxGroup2 + this.selectedPaxGroup3 : this.selectedPax
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
<td>
|
||||
Grundpreis: {summary.paxBase}<br>
|
||||
Aufpreis Personen: {summary.paxAdditional -> v:or(alternative: '-')}<br>
|
||||
Kleingruppen-Verpflegungszuschlag: {summary.undersubscription -> v:or(alternative: '-')}<br>
|
||||
Aufpreis Kurzzeit: {summary.shortTerm -> v:or(alternative: '-')}<br>
|
||||
Zusatzleistungen: {summary.options}<br>
|
||||
Strom- und Abfallgebühren: {summary.runningCosts -> v:or(alternative: '-')}<br>
|
||||
|
||||
Reference in New Issue
Block a user