opencrm/backend/src/controllers
duffyduck 958752ecc9 Email-Anhänge als Vertragsdokumente + Rechnungen für alle Vertragstypen
Der SaveAttachmentModal hat jetzt drei Modi (wenn E-Mail einem Vertrag zugeordnet ist):

1. Als Dokument – in feste Slots (Kündigungsschreiben etc.), unverändert
2. Als Vertragsdokument – NEU: flexible ContractDocument-Tabelle mit Typ-Dropdown
   (Auftragsformular, Lieferbestätigung, Vertragsunterlagen, Vollmacht,
   Widerrufsbelehrung, Preisblatt, Sonstiges) + optionalen Notizen
3. Als Rechnung – jetzt für ALLE Vertragstypen (vorher nur Strom/Gas)

Backend:
- Neuer Endpoint POST /api/emails/:id/attachments/:filename/save-as-contract-document
- saveAttachmentAsInvoice + saveEmailAsInvoice: ELECTRICITY/GAS-Einschränkung entfernt,
  nutzt jetzt addInvoiceByContract als Fallback für Nicht-Energie-Verträge

Frontend:
- cachedEmailApi.saveAttachmentAsContractDocument hinzugefügt
- SaveAttachmentModal: neuer Mode 'contractDocument' mit Typ+Notizen
- Mode-Toggle zeigt jetzt alle drei Optionen wenn Vertrag zugeordnet

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 13:06:10 +02:00
..
appSetting.controller.ts complete new audit system 2026-03-21 18:23:54 +01:00
auditLog.controller.ts complete new audit system 2026-03-21 18:23:54 +01:00
auth.controller.ts first commit 2026-01-29 01:16:54 +01:00
backup.controller.ts complete new audit system 2026-03-21 18:23:54 +01:00
birthday.controller.ts Geburtstag-Management-Modal mit Reset + Send + Auto-Flag 2026-04-23 12:46:03 +02:00
cachedEmail.controller.ts Email-Anhänge als Vertragsdokumente + Rechnungen für alle Vertragstypen 2026-04-23 13:06:10 +02:00
cancellation-period.controller.ts complete new audit system 2026-03-21 18:23:54 +01:00
consent-public.controller.ts email datenschztz erst alles bestätigt bei allen hebeln 2026-03-27 12:03:20 +01:00
contract-duration.controller.ts complete new audit system 2026-03-21 18:23:54 +01:00
contract.controller.ts added place to telecommunication, added contract documents, added invoice to other contracts 2026-03-25 16:55:48 +01:00
contractCategory.controller.ts complete new audit system 2026-03-21 18:23:54 +01:00
contractHistory.controller.ts complete new audit system 2026-03-21 18:23:54 +01:00
contractTask.controller.ts complete new audit system 2026-03-21 18:23:54 +01:00
customer.controller.ts PDF-Auftragsvorlagen-System, Objekttyp/Lage-Felder, Eigentümer-Fallback bei Bankverbindung 2026-04-05 19:16:47 +02:00
emailLog.controller.ts gdpr audit implemented, email log, vollmachten, pdf delete cancel data privacy and vollmachten, removed message no id card in engergy car, and other contracts that are not telecom contracts, added insert counter for engery 2026-03-21 11:59:53 +01:00
emailProvider.controller.ts complete new audit system 2026-03-21 18:23:54 +01:00
gdpr.controller.ts impressum datenschutz added 2026-03-25 15:25:34 +01:00
invoice.controller.ts added place to telecommunication, added contract documents, added invoice to other contracts 2026-03-25 16:55:48 +01:00
pdfTemplate.controller.ts PDF-Auftragsvorlagen-System, Objekttyp/Lage-Felder, Eigentümer-Fallback bei Bankverbindung 2026-04-05 19:16:47 +02:00
platform.controller.ts complete new audit system 2026-03-21 18:23:54 +01:00
provider.controller.ts complete new audit system 2026-03-21 18:23:54 +01:00
stressfreiEmail.controller.ts complete new audit system 2026-03-21 18:23:54 +01:00
tariff.controller.ts complete new audit system 2026-03-21 18:23:54 +01:00
user.controller.ts complete new audit system 2026-03-21 18:23:54 +01:00