Zahlungszwecke
This commit is contained in:
@@ -16,11 +16,18 @@ const props = defineProps({
|
||||
|
||||
const emit = defineEmits(['submit', 'cancel'])
|
||||
|
||||
/**
|
||||
* Die Anmerkung heißt in der Resource `comment` und ist dort `'--'`, wenn keine gesetzt ist -- beides
|
||||
* muss hier stimmen, sonst startet das Feld leer und das Speichern löscht die vorhandene Anmerkung.
|
||||
*/
|
||||
const existingComment = props.newInvoice.comment
|
||||
|
||||
const formData = reactive({
|
||||
type_internal: props.newInvoice.internalType || '',
|
||||
cost_unit: props.newInvoice.costUnitId || '',
|
||||
amount: props.newInvoice.amountPlain || '',
|
||||
notices: props.newInvoice.comments || '',
|
||||
purpose: props.newInvoice.purpose || '',
|
||||
notices: !existingComment || existingComment === '--' ? '' : existingComment,
|
||||
})
|
||||
|
||||
const submitForm = () => {
|
||||
@@ -70,6 +77,13 @@ onMounted(async () => {
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Zahlungsgrund:</td>
|
||||
<td>
|
||||
<input type="text" v-model="formData.purpose" class="width-almost-full" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Anmerkungen:</td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user