Contracconfig Hooks WIP
This commit is contained in:
@@ -379,6 +379,7 @@ class ContractController extends mfBaseController {
|
||||
}
|
||||
|
||||
$this->layout()->set("contract", $contract);
|
||||
//var_dump($contract->owner);exit;
|
||||
|
||||
if($this->request->f == "view") $this->layout()->set("f", "view");
|
||||
if($this->request->f != "view") $this->layout()->set("f", "index");
|
||||
@@ -428,6 +429,7 @@ class ContractController extends mfBaseController {
|
||||
$contract_data['price_nbe'] = (float)$r->price_nbe;
|
||||
$contract_data['billing_period'] = (int)$r->billing_period;
|
||||
$contract_data['billing_delay'] = (int)$r->billing_delay;
|
||||
$contract_data['order_date'] = ($r->order_date) ? $this->dateToTimestamp($r->order_date) : null;
|
||||
$contract_data['finish_date'] = ($r->finish_date) ? $this->dateToTimestamp($r->finish_date) : null;
|
||||
$contract_data['cancel_date'] = ($r->cancel_date) ? $this->dateToTimestamp($r->cancel_date) : null;
|
||||
$contract_data['note'] = $r->note;
|
||||
@@ -475,12 +477,14 @@ class ContractController extends mfBaseController {
|
||||
}
|
||||
|
||||
// create journal
|
||||
$journal = ContractjournalModel::create([
|
||||
'contract_id' => $contract_id,
|
||||
'type' => "created_from",
|
||||
'value' => "manual"
|
||||
]);
|
||||
$journal->save();
|
||||
if($mode == "add") {
|
||||
$journal = ContractjournalModel::create([
|
||||
'contract_id' => $contract_id,
|
||||
'type' => "created_from",
|
||||
'value' => "manual"
|
||||
]);
|
||||
$journal->save();
|
||||
}
|
||||
|
||||
$this->layout()->setFlash("Vertrag erfolgreich gespeichert.", "success");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user