Zahlungszwecke
This commit is contained in:
@@ -34,6 +34,17 @@ class UpdateInvoiceCommand {
|
||||
}
|
||||
|
||||
|
||||
$purpose = trim((string) $this->request->purpose);
|
||||
$purpose = $purpose === '' ? null : $purpose;
|
||||
|
||||
// Verglichen wird gegen den angezeigten Text, nicht gegen die Spalte: Das Formular ist damit
|
||||
// vorbelegt, und wer ihn unverändert abschickt, hat nichts geändert. Ein Bestandsbeleg behält so
|
||||
// seine leere Spalte und damit die Ableitung; wer das Feld leert, schaltet zurück auf automatisch.
|
||||
if (($purpose ?? '') !== $this->request->invoice->purposeText()) {
|
||||
$changes .= 'Zahlungsgrund geändert von ' . $this->request->invoice->purposeText() . ' auf ' . ($purpose ?? '--') . '.<br />';
|
||||
$this->request->invoice->purpose = $purpose;
|
||||
}
|
||||
|
||||
$this->request->invoice->comment = $this->request->comment;
|
||||
$this->request->invoice->changes = $changes;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user