Rechtliches: jederzeit kuendbare Vertraege brauchen kein Beginn-Datum

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-09-30 11:19:58 +00:00
1 parent 82c2460835
commit fa23732217
2 files changed
+8 -1

No files matched your search

+4 -1
View File
@@ -50,11 +50,14 @@ export function nextCancellationDate(contract, today) {
if (isSet(contract.cancelledAt)) {
return { state: 'cancelled', periodEnd: contract.endsAt || null, noticeBy: null }
}
// Jederzeit kuendbar braucht keinen Beginn (z. B. Stripe, Cloud-Server)
if (isSet(contract.termMonths) && Number(contract.termMonths) === 0) {
return { state: 'anytime', periodEnd: null, noticeBy: null }
}
if (!isSet(contract.startDate) || !isSet(contract.termMonths)) {
return { state: 'incomplete', periodEnd: null, noticeBy: null }
}
const term = Number(contract.termMonths)
if (term === 0) return { state: 'anytime', periodEnd: null, noticeBy: null }
const renewal = Number(contract.renewalMonths) || 0
let periodEnd = addMonthsClamped(contract.startDate, term)