chore: germantax customer project
This commit is contained in:
77
packages/functions/src/templates/capital-increase.ts
Normal file
77
packages/functions/src/templates/capital-increase.ts
Normal file
@@ -0,0 +1,77 @@
|
||||
import { z } from 'zod'
|
||||
import type { ResolutionTemplate } from './index.js'
|
||||
import {
|
||||
baseDocument,
|
||||
escapeHtml,
|
||||
formatDateDe,
|
||||
formatEur,
|
||||
renderMembers,
|
||||
} from './shared.js'
|
||||
|
||||
const schema = z.object({
|
||||
currentCapital: z.coerce.number().nonnegative(),
|
||||
increaseAmount: z.coerce.number().positive(),
|
||||
newCapital: z.coerce.number().positive(),
|
||||
contributionType: z.enum(['cash', 'in_kind']).default('cash'),
|
||||
effectiveDate: z.string().min(8),
|
||||
notes: z.string().optional(),
|
||||
})
|
||||
|
||||
const contributionLabel = (type: 'cash' | 'in_kind'): string =>
|
||||
type === 'cash' ? 'Bareinlage' : 'Sacheinlage'
|
||||
|
||||
export const capitalIncrease: ResolutionTemplate = {
|
||||
key: 'capital_increase',
|
||||
titleDe: 'Beschluss zur Kapitalerhöhung',
|
||||
titleEn: 'Capital increase',
|
||||
descriptionDe:
|
||||
'Gesellschafterbeschluss über die Erhöhung des Stammkapitals gemäß §§ 55 ff. GmbHG. Beurkundungspflichtig.',
|
||||
schema,
|
||||
fields: [
|
||||
{ key: 'currentCapital', labelDe: 'Bisheriges Stammkapital (EUR)', labelEn: 'Current share capital (EUR)', type: 'currency', required: true },
|
||||
{ key: 'increaseAmount', labelDe: 'Erhöhungsbetrag (EUR)', labelEn: 'Increase amount (EUR)', type: 'currency', required: true },
|
||||
{ key: 'newCapital', labelDe: 'Neues Stammkapital (EUR)', labelEn: 'New share capital (EUR)', type: 'currency', required: true },
|
||||
{ key: 'contributionType', labelDe: 'Art der Einlage (cash | in_kind)', labelEn: 'Contribution type (cash | in_kind)', type: 'text', required: true },
|
||||
{ key: 'effectiveDate', labelDe: 'Wirksam ab', labelEn: 'Effective date', type: 'date', 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>Erhöhung des Stammkapitals der Gesellschaft gemäß §§ 55 ff. GmbHG.
|
||||
Dieser Beschluss bedarf zu seiner Wirksamkeit der notariellen Beurkundung
|
||||
sowie der Eintragung in das Handelsregister.</p>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2>Beschluss</h2>
|
||||
<ul>
|
||||
<li>Bisheriges Stammkapital: <strong>${escapeHtml(formatEur(v.currentCapital))}</strong></li>
|
||||
<li>Erhöhung um: <strong>${escapeHtml(formatEur(v.increaseAmount))}</strong></li>
|
||||
<li>Neues Stammkapital: <strong>${escapeHtml(formatEur(v.newCapital))}</strong></li>
|
||||
<li>Art der Einlage: <strong>${escapeHtml(contributionLabel(v.contributionType))}</strong></li>
|
||||
<li>Wirksam ab: <strong>${escapeHtml(formatDateDe(v.effectiveDate))}</strong></li>
|
||||
</ul>
|
||||
<p>Die Geschäftsführung wird angewiesen, die Kapitalerhöhung unverzüglich
|
||||
zur Eintragung in das Handelsregister anzumelden.</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 – Kapitalerhöhung', body)
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user