Rechtliches: jederzeit kuendbare Vertraege brauchen kein Beginn-Datum
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
82c2460835
commit
fa23732217
2 files changed
+8
-1
No files matched your search
+4
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user