Abo: Mindestlaufzeit nur fuer Vertraege ab Bedingungen Version 3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9b563482ff
commit
2bd166adf3
2 files changed
+17
-5
No files matched your search
@@ -16,6 +16,7 @@ import {
|
||||
createBillingPortalUrl,
|
||||
getCurrentSubscription,
|
||||
grantCreditForInvoice,
|
||||
minTermMonthsFor,
|
||||
isStripeConfigured,
|
||||
syncSubscription,
|
||||
} from '../services/stripeBilling.js'
|
||||
@@ -46,7 +47,8 @@ function addMonthsIso(iso, months) {
|
||||
|
||||
function minTermEndOf(sub) {
|
||||
const start = sub?.trialEnd || sub?.startedAt
|
||||
return start ? addMonthsIso(start, config.abo.minTermMonths) : null
|
||||
const months = minTermMonthsFor(sub?.termsVersion)
|
||||
return start && months ? addMonthsIso(start, months) : null
|
||||
}
|
||||
|
||||
function publicSubscription(sub) {
|
||||
@@ -179,8 +181,12 @@ async function sendContractConfirmation(subDoc) {
|
||||
' Preis: 50,00 € pro Monat (gemäß § 19 UStG ohne Umsatzsteuer)',
|
||||
` Vertragsschluss: ${fmtDate(subDoc.startedAt)}`,
|
||||
` Leistungsbeginn: ${lateStart ? fmtDate(subDoc.trialEnd) : fmtDate(subDoc.startedAt)}`,
|
||||
` Laufzeit: Mindestlaufzeit 12 Monate bis ${fmtDate(minTermEndOf(subDoc))}; Kündigung zu diesem Termin bis einen Monat vorher,`,
|
||||
' danach läuft das Abo unbefristet und ist jederzeit zum Ende des Abrechnungsmonats kündbar',
|
||||
...(minTermEndOf(subDoc)
|
||||
? [
|
||||
` Laufzeit: Mindestlaufzeit 12 Monate bis ${fmtDate(minTermEndOf(subDoc))}; Kündigung zu diesem Termin bis einen Monat vorher,`,
|
||||
' danach läuft das Abo unbefristet und ist jederzeit zum Ende des Abrechnungsmonats kündbar',
|
||||
]
|
||||
: [' Laufzeit: unbestimmt, jederzeit zum Ende des Abrechnungsmonats kündbar']),
|
||||
' Enthalten: Betrieb und Pflege Ihrer Website bzw. Web-Anwendung, 1 Domain, 1 E-Mail-Postfach,',
|
||||
' 1 Stunde Arbeitszeit je bezahltem Monat (12 Monate nutzbar)',
|
||||
'',
|
||||
|
||||
Reference in new issue
Block a user