feat: Add termination functionality for rental agreements

- Introduced new entity `CKuendigung` for managing terminations.
- Added fields for termination details including date, reason, type, and status.
- Implemented backend service to initiate terminations from rental agreements.
- Created frontend handler for termination actions with confirmation dialog.
- Updated metadata and layouts for `CKuendigung` to support new functionality.
- Added internationalization support for English and German languages.
- Enhanced existing entities to establish relationships with terminations.
This commit is contained in:
2026-01-24 12:45:57 +01:00
parent e490e261b7
commit 0d2d35bca1
28 changed files with 1115 additions and 36 deletions

View File

@@ -42,4 +42,22 @@ class CVmhMietverhltnis extends \Espo\Core\Templates\Controllers\BasePlus
return $result;
}
/**
* POST Action: Initiate termination from Mietverhältnis
*/
public function postActionInitiateTermination(Request $request): array
{
$data = $request->getParsedBody();
$id = $data->id ?? null;
if (!$id) {
throw new BadRequest('No Mietverhältnis ID provided');
}
$service = $this->getRecordService();
$result = $service->initiateTermination($id);
return $result;
}
}