Add termination (Kündigung) functionality and related translations
- Implemented the ability to initiate terminations from Mietverhältnisse. - Added new fields and options for terminations in both German and English language files. - Updated metadata definitions to include relationships for terminations with Mietobjekte and Beteiligte. - Enhanced the service layer to handle termination creation, including linking relevant entities and copying documents. - Updated configuration timestamps for deployment.
This commit is contained in:
@@ -42,4 +42,22 @@ class CVmhMietverhltnis extends \Espo\Core\Templates\Controllers\BasePlus
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* POST Action: Initiate termination (Kündigung) 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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user