Skip to content
Code-Schnipsel Gruppen Projekte
Commit 6d19b1fd erstellt von Patrick Müller's avatar Patrick Müller
Dateien durchsuchen

Merge branch 'dev'

Übergeordnete 6df3fcf8 94159c07
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -1024,6 +1024,10 @@
<de><![CDATA[Sie haben Ihre Mitgliedschaft am [addedDate] abgeschlossen und können diese jederzeit kündigen.]]></de>
<en><![CDATA[You subscribed to your membership at [addedDate] and can cancel it at any time.]]></en>
</locale>
<locale name="MembershipUser.cancel.info_text.period_of_notice_expired">
<de><![CDATA[Die Kündigungsfrist für den aktuellen Turnus ([cycleBeginDate] bis [cycleEndDate]) ist am [cancelUntilDate] abgelaufen. Ihre Mitgliedschaft wird daher am [cycleEndDate] automatisch bis zum [nextCycleEndDate] verlängert.]]></de>
<en><![CDATA[The period of notice for the current membership period ([cycleBeginDate] to [cycleEndDate]) expired at [cancelUntilDate]. Thus your membership will be automatically extended to [nextCycleEndDate] at [cycleEndDate].]]></en>
</locale>
<!-- Templates -->
<locale name="templates.mail.startcancel.subject">
......
......@@ -936,14 +936,14 @@ public function getFrontendViewData()
try {
if (!$Contract->isInPeriodOfNotice()) {
$cancelAllowed = false;
} else {
$PeriodOfNoticeInterval = $Contract->getPeriodOfNoticeInterval();
$EndBaseDate = clone $CurrentCancelEndDate;
$EndBaseDate->setTime(0, 0, 0);
$EndBaseDate->sub(\date_interval_create_from_date_string('1 second'));
$CancelUntilDate = $EndBaseDate->sub($PeriodOfNoticeInterval);
}
$PeriodOfNoticeInterval = $Contract->getPeriodOfNoticeInterval();
$EndBaseDate = clone $CurrentCancelEndDate;
$EndBaseDate->setTime(0, 0, 0);
$EndBaseDate->sub(\date_interval_create_from_date_string('1 second'));
$CancelUntilDate = $EndBaseDate->sub($PeriodOfNoticeInterval);
} catch (\Exception $Exception) {
QUI\System\Log::writeException($Exception);
}
......@@ -952,22 +952,37 @@ public function getFrontendViewData()
$addedDate = $this->formatDate($this->getAttribute('addedDate'));
$CycleEndDate = $this->getCycleEndDate();
$cycleEndDate = $CycleEndDate ? $this->formatDate($CycleEndDate) : '-';
$cycleBeginDate = $this->formatDate($this->getCycleBeginDate());
$NextCycleEndDate = $this->getNextCycleEndDate();
$nextCycleEndDate = $NextCycleEndDate ? $this->formatDate($NextCycleEndDate) : '-';
// Determine cancel info text
if ($Contract) {
if ($CancelUntilDate) {
$cancelInfoText = QUI::getLocale()->get(
'quiqqer/memberships',
'MembershipUser.cancel.info_text.cancel_until_date',
[
'addedDate' => $addedDate,
'cancelUntilDate' => $this->formatDate($CancelUntilDate),
'cycleEndDate' => $cycleEndDate,
'nextCycleEndDate' => $nextCycleEndDate
]
);
if ($Contract->getPeriodOfNoticeInterval()) {
if ($Contract->isInPeriodOfNotice()) {
$cancelInfoText = QUI::getLocale()->get(
'quiqqer/memberships',
'MembershipUser.cancel.info_text.cancel_until_date',
[
'addedDate' => $addedDate,
'cancelUntilDate' => $this->formatDate($CancelUntilDate),
'cycleEndDate' => $cycleEndDate,
'nextCycleEndDate' => $nextCycleEndDate
]
);
} else {
$cancelInfoText = QUI::getLocale()->get(
'quiqqer/memberships',
'MembershipUser.cancel.info_text.period_of_notice_expired',
[
'addedDate' => $addedDate,
'cancelUntilDate' => $this->formatDate($CancelUntilDate),
'cycleBeginDate' => $cycleBeginDate,
'cycleEndDate' => $cycleEndDate,
'nextCycleEndDate' => $nextCycleEndDate
]
);
}
} else {
$cancelInfoText = QUI::getLocale()->get(
'quiqqer/memberships',
......@@ -1006,7 +1021,7 @@ public function getFrontendViewData()
'username' => $QuiqqerUser->getUsername(),
'fullName' => $QuiqqerUser->getName(),
'addedDate' => $addedDate,
'beginDate' => $this->formatDate($this->getCycleBeginDate()),
'beginDate' => $cycleBeginDate,
'endDate' => $cycleEndDate,
'cancelEndDate' => $this->formatDate($CurrentCancelEndDate),
'cancelDate' => $this->formatDate($this->getAttribute('cancelDate')),
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren