chore: germantax customer project

This commit is contained in:
e2e
2026-07-11 09:06:18 +02:00
commit 907575c97b
145 changed files with 9830 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
import { z } from 'zod'
import type { ResolutionTemplate } from './index.js'
import {
baseDocument,
escapeHtml,
formatDateDe,
formatEur,
renderMembers,
} from './shared.js'
const schema = z.object({
fiscalYear: z.string().min(4),
totalBudget: z.coerce.number().nonnegative(),
notes: z.string().optional(),
})
export const annualBudgetApproval: ResolutionTemplate = {
key: 'annual_budget_approval',
titleDe: 'Beschluss zur Genehmigung des Jahresbudgets',
titleEn: 'Annual budget approval',
descriptionDe:
'Gesellschafterbeschluss zur Feststellung und Genehmigung des Jahresbudgets der Gesellschaft.',
schema,
fields: [
{ key: 'fiscalYear', labelDe: 'Geschäftsjahr', labelEn: 'Fiscal year', type: 'text', required: true },
{ key: 'totalBudget', labelDe: 'Gesamtbudget (EUR)', labelEn: 'Total budget (EUR)', type: 'currency', required: true },
{ key: 'notes', labelDe: 'Anmerkungen', labelEn: 'Notes', type: 'textarea' },
],
render: ({ values, company, members, createdBy, date }) => {
const v = schema.parse(values)
const body = `
<h1>Gesellschafterbeschluss</h1>
<div class="meta">
${escapeHtml(company.name)}${company.registryNo ? `, ${escapeHtml(company.registryNo)}` : ''}<br/>
${company.address ? escapeHtml(company.address) + '<br/>' : ''}
Beschlussdatum: ${escapeHtml(formatDateDe(date))}
</div>
<div class="section">
<h2>Gegenstand des Beschlusses</h2>
<p>Genehmigung des Jahresbudgets für das Geschäftsjahr <strong>${escapeHtml(v.fiscalYear)}</strong>.</p>
</div>
<div class="section">
<h2>Beschluss</h2>
<p>Die Gesellschafter beschließen einstimmig, das Jahresbudget in Höhe von
<strong>${escapeHtml(formatEur(v.totalBudget))}</strong> für das Geschäftsjahr
${escapeHtml(v.fiscalYear)} festzustellen und zu genehmigen.</p>
${v.notes ? `<p><em>${escapeHtml(v.notes)}</em></p>` : ''}
</div>
<div class="section">
<h2>Gesellschafter</h2>
${renderMembers(members)}
</div>
<div class="section signature">
<div class="line">${escapeHtml(createdBy.displayName)}<br/><small>${escapeHtml(createdBy.email)}</small></div>
<div class="line">Ort, Datum</div>
</div>
`
return baseDocument('Beschluss Jahresbudget', body)
},
}