Contractjournal finished & Started Contractconfig Hooks for Provisioning Workflow

This commit is contained in:
Frank Schubert
2023-02-24 15:50:28 +01:00
parent aa373b5f4e
commit 3210981994
21 changed files with 562 additions and 279 deletions

View File

@@ -474,6 +474,14 @@ class ContractController extends mfBaseController {
return $this->addAction();
}
// create journal
$journal = ContractjournalModel::create([
'contract_id' => $contract_id,
'type' => "created_from",
'value' => "manual"
]);
$journal->save();
$this->layout()->setFlash("Vertrag erfolgreich gespeichert.", "success");
/*
@@ -487,7 +495,22 @@ class ContractController extends mfBaseController {
'origin_contract_id' => $origin->id,
'type' => 'link'
]);
$link->save();
$link_id = $link->save();
if($link_id) {
$journal = ContractjournalModel::create([
'contract_id' => $contract_id,
'type' => "link",
'value' => $origin->id
]);
$journal->save();
$ojournal = ContractjournalModel::create([
'contract_id' => $origin->id,
'type' => "link",
'value' => $contract_id
]);
$ojournal->save();
}
}
}