Hosting-Abo: Preis 15 € -> 20 € pro Monat (Vertragsbedingungen v4, Katalog, Leitfaden)

- server/config.js: amountCents 2000, lookup_key webklar_hosting_monatlich_2000
- ensurePrice haengt einen neuen Preis an das vorhandene Stripe-Produkt (metadata.webklar),
  statt ein zweites "WEBklar Hosting-Abo" anzulegen
- abo-bedingungen.html (Uebersicht, Preise, Leistungsbeschreibung) + PDF, Leitfaden + PDF
- Tests auf 20 € umgestellt (399/399)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-09-29 16:29:01 +00:00
1 parent 78b4d7b7fe
commit e4efdac226
18 files changed
+79 -59

No files matched your search

+6 -6
View File
@@ -173,7 +173,7 @@ test('Vorschau Plus: anteiliger Betrag aus der Stripe-Vorschau, Gesamtgröße, n
st.invoicePreview = (body) =>
previewInvoice(
line('price_mailStorage', 133, { quantity: 2, proration: true, periodStart: Number(body.subscription_details.proration_date) }),
line('price_hosting', 1500),
line('price_hosting', 2000),
line('price_mailStorage', 200, { quantity: 2 })
)
const before = st.calls.length
@@ -208,7 +208,7 @@ test('Vorschau Plus mit Posten: Gutschrift und Belastung ab proration_date, ält
line('price_mailStorage', 40, { quantity: 1, proration: true, periodStart: at - 60 }),
line('price_mailStorage', -67, { quantity: 1, proration: true, periodStart: at - 1 }),
line('price_mailStorage', 200, { quantity: 3, proration: true, periodStart: at + 1 }),
line('price_hosting', 1500),
line('price_hosting', 2000),
line('price_mailStorage', 300, { quantity: 3 })
)
}
@@ -257,7 +257,7 @@ test('Vorschau Plus in zwei Schritten, flexibler Modus (Standard): Betrag der St
return previewInvoice(
line('price_mailStorage', -200, { quantity: 3, proration: true, periodStart: at }),
line('price_mailStorage', 333, { quantity: 5, proration: true, periodStart: at }),
line('price_hosting', 1500),
line('price_hosting', 2000),
line('price_mailStorage', 500, { quantity: 5 })
)
}
@@ -287,7 +287,7 @@ test('Vorschau Plus in zwei Schritten, klassischer Modus: anteilig nur für die
return previewInvoice(
line('price_mailStorage', -67, { quantity: 1, proration: true, periodStart: at }),
line('price_mailStorage', 333, { quantity: 5, proration: true, periodStart: at }),
line('price_hosting', 1500),
line('price_hosting', 2000),
line('price_mailStorage', 500, { quantity: 5 })
)
}
@@ -905,7 +905,7 @@ test('invoice.paid: anteilige Speicher-Zeile oder Rechnung ohne Speicher ändert
await resetSubH({ units: 2, paidUnits: 2 })
const r1 = await recordPaidStorage({ id: 'in_x', lines: { data: [line('price_mailStorage', 90, { quantity: 3, proration: true })] } })
assert.ok(r1.skipped)
const r2 = await recordPaidStorage({ id: 'in_y', lines: { data: [line('price_hosting', 1500)] } })
const r2 = await recordPaidStorage({ id: 'in_y', lines: { data: [line('price_hosting', 2000)] } })
assert.ok(r2.skipped)
assert.equal(doc().storagePaidUnits, 2)
assert.equal(doc().storagePaidPeriodEnd, hostingDoc.currentPeriodEnd)
@@ -953,7 +953,7 @@ test('Webhook invoice.paid: Appwrite 4xx → 200 und übersprungen, 5xx → 500'
st.invoices.set('in_h2', {
id: 'in_h2', object: 'invoice', number: 'WK-h2', created: now, status_transitions: { paid_at: now },
parent: { type: 'subscription_details', subscription_details: { subscription: 'sub_h' } },
lines: { object: 'list', data: [line('price_hosting', 1500, { periodEnd: PERIOD_END_UNIX + 30 * DAY }), line('price_mailStorage', 300, { quantity: 3, periodEnd: PERIOD_END_UNIX + 30 * DAY })] },
lines: { object: 'list', data: [line('price_hosting', 2000, { periodEnd: PERIOD_END_UNIX + 30 * DAY }), line('price_mailStorage', 300, { quantity: 3, periodEnd: PERIOD_END_UNIX + 30 * DAY })] },
})
const event = { id: 'evt_in_h2', object: 'event', type: 'invoice.paid', created: now, data: { object: { id: 'in_h2', object: 'invoice', parent: { type: 'subscription_details', subscription_details: { subscription: 'sub_h' } } } } }
const errors = []