Teilnahmerechnungen erstellen
This commit is contained in:
@@ -13,9 +13,17 @@ const props = defineProps({
|
||||
const { request } = useAjax()
|
||||
|
||||
const editing = ref(false)
|
||||
// Solange kein eigener Absender eingetragen ist, steht auf der Rechnung der Name des Mandanten.
|
||||
const senderFallback = props.data.name ?? ''
|
||||
|
||||
const form = ref({
|
||||
invoice_sender_name: props.data.invoice_sender_name ?? '',
|
||||
email: props.data.email ?? '',
|
||||
email_finance: props.data.email_finance ?? '',
|
||||
phone: props.data.phone ?? '',
|
||||
address_1: props.data.address_1 ?? '',
|
||||
address_2: props.data.address_2 ?? '',
|
||||
address_3: props.data.address_3 ?? '',
|
||||
postcode: props.data.postcode ?? '',
|
||||
city: props.data.city ?? '',
|
||||
})
|
||||
@@ -39,16 +47,49 @@ async function save() {
|
||||
<template>
|
||||
<div v-if="!editing">
|
||||
<table class="data-table">
|
||||
<tr>
|
||||
<th>Rechnungs-Absender:</th>
|
||||
<td>
|
||||
{{ form.invoice_sender_name || senderFallback }}
|
||||
<span v-if="!form.invoice_sender_name" class="field-hint">
|
||||
Name des Mandanten, da nichts Eigenes hinterlegt ist
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><th>Email:</th><td>{{ form.email }}</td></tr>
|
||||
<tr><th>Email Schatzmeister*in:</th><td>{{ form.email_finance }}</td></tr>
|
||||
<tr><th>Telefon:</th><td>{{ form.phone || '—' }}</td></tr>
|
||||
<tr><th>Straße & Hausnummer:</th><td>{{ form.address_1 || '—' }}</td></tr>
|
||||
<tr><th>Adresszusatz:</th><td>{{ form.address_2 || '—' }}</td></tr>
|
||||
<tr><th>Weiterer Zusatz:</th><td>{{ form.address_3 || '—' }}</td></tr>
|
||||
<tr><th>Postleitzahl:</th><td>{{ form.postcode }}</td></tr>
|
||||
<tr><th>Ort:</th><td>{{ form.city }}</td></tr>
|
||||
</table>
|
||||
|
||||
<p v-if="!form.address_1" class="hint">
|
||||
Ohne Straße & Hausnummer ist die Anschrift auf Rechnungen unvollständig
|
||||
(§ 14 Abs. 4 UStG).
|
||||
</p>
|
||||
<button class="btn-edit" @click="editing = true">Bearbeiten</button>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<table class="data-table">
|
||||
<tr>
|
||||
<th>Rechnungs-Absender:</th>
|
||||
<td>
|
||||
<input
|
||||
type="text"
|
||||
v-model="form.invoice_sender_name"
|
||||
class="form-input"
|
||||
:placeholder="senderFallback"
|
||||
/>
|
||||
<span class="field-hint">
|
||||
Vollständige Bezeichnung mit Rechtsform, wie sie auf der Rechnung stehen soll.
|
||||
Leer lassen, um den Namen des Mandanten zu verwenden.
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Email:</th>
|
||||
<td><input type="email" v-model="form.email" class="form-input" /></td>
|
||||
@@ -57,6 +98,27 @@ async function save() {
|
||||
<th>Email Schatzmeister*in:</th>
|
||||
<td><input type="email" v-model="form.email_finance" class="form-input" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Telefon:</th>
|
||||
<td><input type="text" v-model="form.phone" class="form-input" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Straße & Hausnummer:</th>
|
||||
<td>
|
||||
<input type="text" v-model="form.address_1" class="form-input" />
|
||||
<span class="field-hint">Pflichtangabe für Rechnungen (§ 14 Abs. 4 UStG)</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Adresszusatz:</th>
|
||||
<td>
|
||||
<input type="text" v-model="form.address_2" class="form-input" placeholder="z. B. c/o Mustermensch" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Weiterer Zusatz:</th>
|
||||
<td><input type="text" v-model="form.address_3" class="form-input" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Postleitzahl:</th>
|
||||
<td><input type="text" v-model="form.postcode" class="form-input" /></td>
|
||||
@@ -101,6 +163,22 @@ async function save() {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.field-hint {
|
||||
display: block;
|
||||
margin-top: 4px;
|
||||
font-size: 0.8rem;
|
||||
color: #6b7280;
|
||||
}
|
||||
|
||||
.hint {
|
||||
margin-top: 12px;
|
||||
padding: 10px 12px;
|
||||
border-left: 3px solid #f5c400;
|
||||
background-color: #fffef5;
|
||||
font-size: 0.85rem;
|
||||
color: #4b5563;
|
||||
}
|
||||
|
||||
.btn-edit, .btn-save, .btn-cancel {
|
||||
margin-top: 15px;
|
||||
padding: 8px 20px;
|
||||
|
||||
@@ -29,8 +29,15 @@ const form = ref({
|
||||
tax_exemption_reason: props.data.tax_exemption_reason ?? '',
|
||||
tax_exemption_note: props.data.tax_exemption_note ?? '',
|
||||
vat_pricing_mode: props.data.vat_pricing_mode ?? 'inclusive',
|
||||
tax_number: props.data.tax_number ?? '',
|
||||
vat_id: props.data.vat_id ?? '',
|
||||
invoice_prefix: props.data.invoice_prefix ?? '',
|
||||
})
|
||||
|
||||
// Das Präfix bestimmt den Nummernkreis und darf sich nachträglich nicht ändern -- sonst gehörten bereits
|
||||
// herausgegebene Rechnungen plötzlich zu einer anderen Nummer. Nur in der verwalteten Ansicht editierbar.
|
||||
const canEditPrefix = computed(() => props.data.can_edit_invoice_prefix === true)
|
||||
|
||||
const isLiable = computed(() => form.value.tax_liable === '1')
|
||||
const isCustomReason = computed(() => form.value.tax_exemption_reason === 'custom')
|
||||
|
||||
@@ -65,6 +72,9 @@ async function save() {
|
||||
tax_exemption_reason: isLiable.value ? null : form.value.tax_exemption_reason,
|
||||
tax_exemption_note: form.value.tax_exemption_note,
|
||||
vat_pricing_mode: form.value.vat_pricing_mode,
|
||||
tax_number: form.value.tax_number,
|
||||
vat_id: form.value.vat_id,
|
||||
invoice_prefix: canEditPrefix.value ? form.value.invoice_prefix : undefined,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -100,6 +110,18 @@ async function save() {
|
||||
<th>Rechnungshinweis</th>
|
||||
<td>{{ invoiceHint }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Steuernummer</th>
|
||||
<td>{{ form.tax_number || '—' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>USt-IdNr.</th>
|
||||
<td>{{ form.vat_id || '—' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Rechnungs-Präfix</th>
|
||||
<td>{{ form.invoice_prefix || '—' }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<button class="btn-edit" @click="editing = true">Bearbeiten</button>
|
||||
</div>
|
||||
@@ -152,6 +174,42 @@ async function save() {
|
||||
<th>Rechnungshinweis</th>
|
||||
<td class="hint-preview">{{ invoiceHint }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Steuernummer</th>
|
||||
<td>
|
||||
<input type="text" v-model="form.tax_number" class="form-input" />
|
||||
<span class="field-hint">
|
||||
Pflichtangabe auf Rechnungen — alternativ die USt-IdNr. (§ 14 Abs. 4 Nr. 2 UStG)
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>USt-IdNr.</th>
|
||||
<td><input type="text" v-model="form.vat_id" class="form-input" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Rechnungs-Präfix</th>
|
||||
<td>
|
||||
<input
|
||||
type="text"
|
||||
v-model="form.invoice_prefix"
|
||||
class="form-input"
|
||||
:disabled="!canEditPrefix"
|
||||
/>
|
||||
<span class="field-hint">
|
||||
Erster Block der Rechnungsnummer, z. B. <code>WM</code> in
|
||||
<code>WM-V-20260701-0005</code>.
|
||||
<template v-if="canEditPrefix">
|
||||
Eine Änderung wirkt nur auf künftige Veranstaltungen; bereits angelegte behalten
|
||||
ihre Nummer.
|
||||
</template>
|
||||
<template v-else>
|
||||
Änderbar nur in der Mandanten-Verwaltung.
|
||||
</template>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="btn-group">
|
||||
<button class="btn-save" @click="save">Speichern</button>
|
||||
@@ -195,6 +253,25 @@ async function save() {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.field-hint {
|
||||
display: block;
|
||||
margin-top: 4px;
|
||||
font-size: 0.8rem;
|
||||
color: #6b7280;
|
||||
}
|
||||
|
||||
.field-hint code {
|
||||
padding: 1px 4px;
|
||||
background-color: #f3f4f6;
|
||||
border-radius: 3px;
|
||||
font-size: 0.95em;
|
||||
}
|
||||
|
||||
.form-input:disabled {
|
||||
background-color: #f3f4f6;
|
||||
color: #6b7280;
|
||||
}
|
||||
|
||||
.btn-edit, .btn-save, .btn-cancel {
|
||||
margin-top: 15px;
|
||||
padding: 8px 20px;
|
||||
|
||||
Reference in New Issue
Block a user