diff --git a/Layout/default/Contractconfig/Form.php b/Layout/default/Contractconfig/Form.php
new file mode 100644
index 000000000..9157fa834
--- /dev/null
+++ b/Layout/default/Contractconfig/Form.php
@@ -0,0 +1,3 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ items) && count($group->items)): ?>
+ items as $item): ?>
+
+
+
=$item->name?> - =$item->displayname?> [=$item->type?>]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Keine Configgruppen gefunden
+
+
+
+
+
+
+
+
+
+
+
+Contractconfig Groups
diff --git a/Layout/default/menu.php b/Layout/default/menu.php
index 2b5cbb204..cc206a6a6 100644
--- a/Layout/default/menu.php
+++ b/Layout/default/menu.php
@@ -103,7 +103,7 @@
diff --git a/application/Contract/Contract.php b/application/Contract/Contract.php
index 221632216..33a61cbed 100644
--- a/application/Contract/Contract.php
+++ b/application/Contract/Contract.php
@@ -10,12 +10,100 @@ class Contract extends mfBaseModel {
private $contractConfigGroups;
private $contractConfigItems;
private $configgroups;
+ private $links;
+ private $linkFrom;
+ private $linkTo;
+ private $upgradeFrom;
+ private $upgradeTo;
+ private $downgradeFrom;
+ private $downgradeTo;
+ private $productchangeFrom;
+ private $productchangeTo;
+ private $relocationFrom;
+ private $relocationTo;
private $finisher;
private $canceler;
private $creator;
private $editor;
+ private function getLinks() {
+ $this->linkFrom = [];
+ $this->linkTo = [];
+ $this->upgradeFrom = [];
+ $this->upgradeTo = [];
+ $this->downgradeFrom = [];
+ $this->downgradeTo = [];
+ $this->productchangeFrom = [];
+ $this->productchangeTo = [];
+ $this->relocationFrom = [];
+ $this->relocationTo = [];
+
+ // Links targeting this contract (to)
+ foreach(ContractLinkModel::search(['origin_contract_id' => $this->id]) as $link) {
+ switch($link->type) {
+ case "link":
+ $this->linkTo[] = $link;
+ break;
+ case "upgrade":
+ $this->upgradeTo[] = $link;
+ break;
+ case "downgrade":
+ $this->downgradeTo[] = $link;
+ break;
+ case "productchange":
+ $this->productchangeTo[] = $link;
+ break;
+ case "relocation":
+ $this->relocationTo[] = $link;
+ break;
+ default:
+ $this->log->warn("ContractLink with invalid type: ".$link->id." ".$link->type);
+ break;
+ }
+ }
+
+ foreach(ContractLinkModel::search(['contract_id' => $this->id]) as $link) {
+ switch($link->type) {
+ case "link":
+ $this->linkFrom[] = $link;
+ break;
+ case "upgrade":
+ $this->upgradeFrom[] = $link;
+ break;
+ case "downgrade":
+ $this->downgradeFrom[] = $link;
+ break;
+ case "productchange":
+ $this->productchangeFrom[] = $link;
+ break;
+ case "relocation":
+ $this->relocationFrom[] = $link;
+ break;
+ default:
+ $this->log->warn("ContractLink with invalid type: ".$link->id." ".$link->type);
+ break;
+ }
+ }
+
+
+
+ /*$this->links = mfValuecache::singleton()->get("ContractLinks-origin-".$this->id);
+ if(!$this->links) {
+ $this->links = [];
+ foreach(ContractLinkModel::search(["origin_contract_id" => $this->id]) as $link) {
+ if(array_key_exists($link->type, $this->links)) {
+ $this->links[$link->type] = [];
+ }
+ $this->links[$link->type][] = $link;
+ }
+ }
+ if(count($this->links)) {
+ mfValuecache::singleton()->set("ContractLinks-origin-".$this->id, $this->links);
+ }
+ */
+ }
+
public function getProperty($name) {
if($this->$name == null) {
@@ -96,6 +184,18 @@ class Contract extends mfBaseModel {
return $this->contractConfigItems;
}
+ if($name == "links") {
+ $this->links = ContractLinkModel::includesContractId($this->id, ["type" => $link]);
+ return $this->links;
+ }
+
+ if(in_array($name, ['linkFrom','linkTo','upgradeFrom','upgradeTo','downgradeFrom','downgradeTo','productchangeFrom','productchangeTo','relocationFrom','relocationTo'])) {
+ if($this->$name === null) {
+ $this->getLinks();
+ }
+ return $this->$name;
+ }
+
if($name == "finisher") {
$this->finisher = mfValuecache::singleton()->get("Worker-id-".$this->finish_date_by);
if($this->finisher === null) {
diff --git a/application/Contract/ContractController.php b/application/Contract/ContractController.php
index bf50a585b..97e785476 100644
--- a/application/Contract/ContractController.php
+++ b/application/Contract/ContractController.php
@@ -47,6 +47,14 @@ class ContractController extends mfBaseController {
private function getPreparedFilter($filter) {
$new_filter = [];
+ if(array_key_exists("show_canceled", $filter)) {
+ if($filter['show_canceled'] == 0) {
+ $new_filter['add-where'] = " AND (cancel_date IS NULL OR cancel_date > UNIX_TIMESTAMP())";
+ }
+ } else {
+ $new_filter['add-where'] = " AND (cancel_date IS NULL OR cancel_date > UNIX_TIMESTAMP())";
+ }
+
if(is_array($filter) && count($filter)) {
foreach($filter as $name => $value) {
$new_filter[$name] = $value;
@@ -198,7 +206,8 @@ class ContractController extends mfBaseController {
$this->layout()->setFlash("Vertrag erfolgreich gespeichert.", "success");
-
+ /* ContractLinks */
+
$query = [];
if($r->s) {
diff --git a/application/Contract/ContractModel.php b/application/Contract/ContractModel.php
index 41136cbe7..f9b99337c 100644
--- a/application/Contract/ContractModel.php
+++ b/application/Contract/ContractModel.php
@@ -201,6 +201,13 @@ class ContractModel {
}
}
+ if(array_key_exists("customer_number", $filter)) {
+ $customer_number = $filter['customer_number'];
+ if(is_numeric($customer_number)) {
+ $where .= " AND Address.customer_number=$customer_number";
+ }
+ }
+
if(array_key_exists("owner", $filter)) {
$owner = FronkDB::singleton()->escape($filter["owner"]);
if($owner) {
@@ -208,6 +215,10 @@ class ContractModel {
}
}
+ if(array_key_exists("add-where", $filter)) {
+ $where .= " ".$filter['add-where'];
+ }
+
//var_dump($filter, $where);exit;
return $where;
diff --git a/application/ContractLink/ContractLink.php b/application/ContractLink/ContractLink.php
new file mode 100644
index 000000000..c62243391
--- /dev/null
+++ b/application/ContractLink/ContractLink.php
@@ -0,0 +1,69 @@
+$name == null) {
+
+ if(!$this->id) {
+ return null;
+ }
+
+ if($name == "origin") {
+ $this->origin = mfValuecache::singleton()->get("mfObjectmodel-Contract-".$this->origin_contract_id);
+ if($this->origin === null) {
+ $this->origin = new Contract($this->origin_contract_id);
+ if($this->origin->id) {
+ mfValuecache::singleton()->set("mfObjectmodel-Contract-".$this->id, $this->origin);
+ }
+ }
+ return $this->origin;
+ }
+
+ if($name == "creator") {
+ $this->creator = mfValuecache::singleton()->get("Worker-id-".$this->create_by);
+ if($this->creator === null) {
+ $this->creator = new User($this->create_by);
+ if($this->creator->id) {
+ mfValuecache::singleton()->set("Worker-id-".$this->create_by, $this->creator);
+ }
+ }
+ return $this->creator;
+ }
+
+ if($name == "editor") {
+ $this->editor = mfValuecache::singleton()->get("Worker-id-".$this->edit_by);
+ if($this->editor === null) {
+ $this->editor = new User($this->edit_by);
+ if($this->editor->id) {
+ mfValuecache::singleton()->set("Worker-id-".$this->edit_by, $this->editor);
+ }
+ }
+ return $this->editor;
+ }
+
+
+
+ $classname = ucfirst($name);
+ $idfield = $name."_id";
+ $this->$name = mfValuecache::singleton()->get("mfObjectmodel-$name-".$this->$idfield);
+ if(!$this->$name) {
+ $this->$name = new $classname($this->$idfield);
+ }
+
+
+
+ if($this->$name->id) {
+ mfValuecache::singleton()->set("mfObjectmodel-$name-".$this->$name->id, $this->$name);
+ return $this->$name;
+ } else {
+ return null;
+ }
+
+ }
+
+ return $this->$name;
+ }
+}
\ No newline at end of file
diff --git a/application/ContractLink/ContractLinkModel.php b/application/ContractLink/ContractLinkModel.php
new file mode 100644
index 000000000..586f770dc
--- /dev/null
+++ b/application/ContractLink/ContractLinkModel.php
@@ -0,0 +1,170 @@
+ $value) {
+ if(property_exists(get_called_class(), $field)) {
+ $model ->$field = $value;
+ }
+ }
+
+ $me = new User();
+ $me->loadMe();
+
+ if($model->create_by === null) {
+ $model->create_by = $me->id;
+ }
+ if($model->edit_by === null) {
+ $model->edit_by = $me->id;
+ }
+
+ return $model;
+ }
+
+ public static function getAll() {
+ $items = [];
+
+ $db = FronkDB::singleton();
+
+ $res = $db->select("ContractLink", "*", "1 = 1 ORDER BY contract_id,origin_contract_id");
+ if($db->num_rows($res)) {
+ while($data = $db->fetch_object($res)) {
+ $items[] = new ContractLink($data);
+ }
+ }
+ return $items;
+
+ }
+
+ public static function getFirst($filter) {
+ $db = FronkDB::singleton();
+
+ $where = self::getSqlFilter($filter);
+ $sql = "SELECT * FROM ContractLink
+ WHERE $where
+ ORDER BY contract_id,origin_contract_id
+ LIMIT 1";
+ //var_dump($sql);exit;
+ $res = $db->query($sql);
+ if($db->num_rows($res)) {
+ $data = $db->fetch_object($res);
+ $item = new ContractLink($data);
+ if($item->id) {
+ return $item;
+ } else {
+ return null;
+ }
+ }
+ return null;
+ }
+
+ public static function includesContractId($contract_id, $filter=[]) {
+ $items = [];
+ $db = FronkDB::singleton();
+
+ $where = self::getSqlFilter($filter);
+ $sql = "SELECT * FROM ContractLink
+ WHERE (contract_id=$contract_id OR origin_contract_id=$contract_id)
+ AND $where
+ ORDER BY contract_id,origin_contract_id";
+
+
+ mfLoghandler::singleton()->debug($sql);
+
+ $res = $db->query($sql);
+ if($db->num_rows($res)) {
+ while($data = $db->fetch_object($res)) {
+ $items[$data->id] = new ContractLink($data);
+ }
+ }
+
+ return $items;
+ }
+
+ public static function count($filter) {
+ $db = FronkDB::singleton();
+
+ $where = self::getSqlFilter($filter);
+ $sql = "SELECT COUNT(*) FROM ContractLink
+ WHERE $where
+ ";
+
+ $res = $db->query($sql);
+ if($db->num_rows($res)) {
+ $data = $db->fetch_object($res);
+ return $data->cnt;
+ }
+ return 0;
+ }
+
+ public static function search($filter, $limit = false) {
+ //var_dump($filter);exit;
+ $items = [];
+ $db = FronkDB::singleton();
+
+ $where = self::getSqlFilter($filter);
+ $sql = "SELECT * FROM ContractLink
+ WHERE $where
+ ORDER BY contract_id,origin_contract_id";
+
+ if(is_array($limit) && count($limit)) {
+ if(is_numeric($limit['start']) && is_numeric($limit['count'])) {
+ $sql .= " LIMIT ".$limit['start'].", ".$limit['count'];
+ } elseif(is_numeric($count)) {
+ $sql .= " LIMIT ".$limit['count'];
+ }
+ }
+
+ mfLoghandler::singleton()->debug($sql);
+
+ $res = $db->query($sql);
+ if($db->num_rows($res)) {
+ while($data = $db->fetch_object($res)) {
+ $items[$data->id] = new ContractLink($data);
+ }
+ }
+
+ return $items;
+ }
+
+ private static function getSqlFilter($filter) {
+ $where = "1=1 ";
+
+ $db = FronkDB::singleton();
+
+ //var_dump($filter);exit;
+
+ if(array_key_exists("contract_id", $filter)) {
+ $contract_id = $filter['contract_id'];
+ if(is_numeric($contract_id)) {
+ $where .= " AND ContractLink.contract_id = '$contract_id'";
+ }
+ }
+
+ if(array_key_exists("origin_contract_id", $filter)) {
+ $origin_contract_id = $filter['origin_contract_id'];
+ if(is_numeric($origin_contract_id)) {
+ $where .= " AND ContractLink.origin_contract_id = '$origin_contract_id'";
+ }
+ }
+
+
+
+
+ //var_dump($filter, $where);exit;
+ return $where;
+ }
+
+}
\ No newline at end of file
diff --git a/application/Contractconfig/ContractconfigController.php b/application/Contractconfig/ContractconfigController.php
index ccfb7f5d2..32a88ce49 100644
--- a/application/Contractconfig/ContractconfigController.php
+++ b/application/Contractconfig/ContractconfigController.php
@@ -15,100 +15,37 @@ class ContractconfigController extends mfBaseController {
}
protected function indexAction() {
- $groups = ContractconfigGroupModel::search([]);
- $this->layout()->set("configgroups", $groups);
+ }
+
+ protected function viewAction() {
+
+ }
+
+ protected function editAction() {
+ $this->layout()->setTemplate("Contractconfig/Form");
+
+ $contract_id = $this->request->contract_id;
+ if(!$contract_id) {
+ $this->layout()->setFlash("Contract ID nicht gefunden.","danger");
+ $this->redirect("Contract");
+ }
+
+ $contract = new Contract($contract_id);
+ if(!$contract_id) {
+ $this->layout()->setFlash("Contract ID nicht gefunden.","danger");
+ $this->redirect("Contract");
+ }
+
+ if(!is_array($contract->configgroups) || !count($contract->configgroups)) {
+ $this->layout()->setFlash("Produkt hat keine Vertragsconfiggruppen hinterlegt.","info");
+ $this->redirect("Contract", "View", ["id" => $contract_id]);
+ }
+
+ $this->layout()->set("contract", $contract);
+ $this->layout()->set("groups", $contract->configgroups);
+
}
- protected function addGroupAction() {
- $groupname = ucfirst(trim($this->request->name));
-
- if(!$groupname) {
- $this->layout()->setFlash("Gruppenname darf nicht leer sein!", "error");
- $this->redirect("Contractconfig");
- }
-
- $group = ContractconfigGroupModel::getFirst(["name" => $groupname]);
- if($group) {
- $this->layout()->setFlash("Gruppe gibs scho", "warn");
- $this->redirect("Contractconfig");
- }
-
- $group = ContractconfigGroupModel::create(["name" => $groupname]);
- $group_id = $group->save();
- if(!$group_id) {
- $this->layout()->setFlash("Fehler beim Speichern", "error");
- $this->redirect("Contractconfig");
- }
-
- $this->layout()->setFlash("Gruppe $groupname erfolgreich angelegt", "success");
- $this->redirect("Contractconfig");
- }
-
- protected function saveAction() {
- $r = $this->request;
-
- $item_id = $r->item_id;
- if(is_numeric($item_id) && $item_id > 0) {
- $mode = "edit";
- $item = new ContractconfigItem($item_id);
- if(!$item->id) {
- $this->layout()->setFlash("Element nicht gefunden", "error");
- $this->redirect("Contractconfig");
- }
- } else {
- $mode = "add";
- }
-
- $item_data['contractconfiggroup_id'] = $r->group_id;
- $item_data['name'] = $r->name;
- $item_data['displayname'] = $r->displayname;
- $item_data['description'] = $r->description;
-
- $item_data['typedata'] = "";
- $item_data['pattern'] = "";
-
- switch($r->type) {
- case "string":
- $item_data['type'] = "string";
- $item_data['pattern'] = $r->pattern;
- break;
- case "enum":
- $item_data['type'] = "enum";
- $item_data['typedata'] = $r->data;
- break;
- case "int":
- $item_data['type'] = "int";
- break;
- case "decimal":
- $item_data['type'] = "decimal";
- break;
- default:
- $this->layout()->setFlash("Ungültiger Datentyp!");
- $this->redirect("Contractconfig");
- }
-
- if($mode == "edit") {
- $item->update($item_data);
- } else {
- $item = ContractconfigItemModel::create($item_data);
- }
-
- //var_dump($item);exit;
-
- $item_id = $item->save();
-
- if(!$item_id) {
- $this->layout()->setFlash("Fehler beim Speichern!");
- $this->redirect("Contractconfig");
- }
-
- $this->layout()->setFlash("Element erfolgreich gespeichert", "success");
- $this->redirect("Contractconfig");
- //$this->redirect("Contractconfig","Index","","item=$item_id");
-
-
-
- }
}
\ No newline at end of file
diff --git a/application/ContractconfigItem/ContractconfigItemController.php b/application/ContractconfigItem/ContractconfigItemController.php
new file mode 100644
index 000000000..53ffa13a3
--- /dev/null
+++ b/application/ContractconfigItem/ContractconfigItemController.php
@@ -0,0 +1,82 @@
+needlogin=true;
+ $me = new User();
+ $me->loadMe();
+ $this->me = $me;
+ $this->layout()->set("me",$me);
+
+ if(!$me->is(["Admin"])) {
+ $this->redirect("Dashboard");
+ }
+ }
+
+ protected function saveAction() {
+ $r = $this->request;
+
+ $item_id = $r->item_id;
+ if(is_numeric($item_id) && $item_id > 0) {
+ $mode = "edit";
+ $item = new ContractconfigItem($item_id);
+ if(!$item->id) {
+ $this->layout()->setFlash("Element nicht gefunden", "error");
+ $this->redirect("Contractconfiggroup");
+ }
+ } else {
+ $mode = "add";
+ }
+
+ $item_data['contractconfiggroup_id'] = $r->group_id;
+ $item_data['name'] = $r->name;
+ $item_data['displayname'] = $r->displayname;
+ $item_data['description'] = $r->description;
+
+ $item_data['typedata'] = "";
+ $item_data['pattern'] = "";
+
+ switch($r->type) {
+ case "string":
+ $item_data['type'] = "string";
+ $item_data['pattern'] = $r->pattern;
+ break;
+ case "enum":
+ $item_data['type'] = "enum";
+ $item_data['typedata'] = $r->data;
+ break;
+ case "int":
+ $item_data['type'] = "int";
+ break;
+ case "decimal":
+ $item_data['type'] = "decimal";
+ break;
+ default:
+ $this->layout()->setFlash("Ungültiger Datentyp!");
+ $this->redirect("Contractconfiggroup");
+ }
+
+ if($mode == "edit") {
+ $item->update($item_data);
+ } else {
+ $item = ContractconfigItemModel::create($item_data);
+ }
+
+ //var_dump($item);exit;
+
+ $item_id = $item->save();
+
+ if(!$item_id) {
+ $this->layout()->setFlash("Fehler beim Speichern!");
+ $this->redirect("Contractconfiggroup");
+ }
+
+ $this->layout()->setFlash("Element erfolgreich gespeichert", "success");
+ $this->redirect("Contractconfiggroup");
+ //$this->redirect("Contractconfig","Index","","item=$item_id");
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/application/ContractconfigGroup/ContractconfigGroup.php b/application/Contractconfiggroup/Contractconfiggroup.php
similarity index 96%
rename from application/ContractconfigGroup/ContractconfigGroup.php
rename to application/Contractconfiggroup/Contractconfiggroup.php
index d8a86a28d..16d2f15c1 100644
--- a/application/ContractconfigGroup/ContractconfigGroup.php
+++ b/application/Contractconfiggroup/Contractconfiggroup.php
@@ -1,6 +1,6 @@
needlogin=true;
+ $me = new User();
+ $me->loadMe();
+ $this->me = $me;
+ $this->layout()->set("me",$me);
+
+ if(!$me->is(["Admin"])) {
+ $this->redirect("Dashboard");
+ }
+ }
+
+ protected function indexAction() {
+ $groups = ContractconfiggroupModel::search([]);
+
+ $this->layout()->set("configgroups", $groups);
+ }
+
+
+ protected function saveAction() {
+ $groupname = ucfirst(trim($this->request->name));
+
+ if(!$groupname) {
+ $this->layout()->setFlash("Gruppenname darf nicht leer sein!", "error");
+ $this->redirect("Contractconfiggroup");
+ }
+
+ $group = ContractconfiggroupModel::getFirst(["name" => $groupname]);
+ if($group) {
+ $this->layout()->setFlash("Gruppe gibs scho", "warn");
+ $this->redirect("Contractconfiggroup");
+ }
+
+ $group = ContractconfiggroupModel::create(["name" => $groupname]);
+ $group_id = $group->save();
+ if(!$group_id) {
+ $this->layout()->setFlash("Fehler beim Speichern", "error");
+ $this->redirect("Contractconfiggroup");
+ }
+
+ $this->layout()->setFlash("Gruppe $groupname erfolgreich angelegt", "success");
+ $this->redirect("Contractconfiggroup");
+ }
+
+
+}
\ No newline at end of file
diff --git a/application/ContractconfigGroup/ContractconfigGroupModel.php b/application/Contractconfiggroup/ContractconfiggroupModel.php
similarity index 80%
rename from application/ContractconfigGroup/ContractconfigGroupModel.php
rename to application/Contractconfiggroup/ContractconfiggroupModel.php
index 7203f1170..46fcd78c8 100644
--- a/application/ContractconfigGroup/ContractconfigGroupModel.php
+++ b/application/Contractconfiggroup/ContractconfiggroupModel.php
@@ -1,6 +1,6 @@
$value) {
if(property_exists(get_called_class(), $field)) {
@@ -36,10 +36,10 @@ class ContractconfigGroupModel {
$db = FronkDB::singleton();
- $res = $db->select("ContractconfigGroup", "*", "1=1 ORDER BY name, `create`");
+ $res = $db->select("Contractconfiggroup", "*", "1=1 ORDER BY name, `create`");
if($db->num_rows($res)) {
while($data = $db->fetch_object($res)) {
- $items[] = new ContractconfigGroup($data);
+ $items[] = new Contractconfiggroup($data);
}
}
return $items;
@@ -50,10 +50,10 @@ class ContractconfigGroupModel {
$db = FronkDB::singleton();
$where = self::getSqlFilter($filter);
- $res = $db->select("ContractconfigGroup", "*", "$where ORDER BY name, `create` LIMIT 1");
+ $res = $db->select("Contractconfiggroup", "*", "$where ORDER BY name, `create` LIMIT 1");
if($db->num_rows($res)) {
$data = $db->fetch_object($res);
- $item = new ContractconfigGroup($data);
+ $item = new Contractconfiggroup($data);
if($item->id) {
return $item;
} else {
@@ -68,19 +68,19 @@ class ContractconfigGroupModel {
$db = FronkDB::singleton();
$where = self::getSqlFilter($filter);
- $sql = "SELECT ContractconfigGroup.* FROM ContractconfigGroup
- LEFT JOIN ContractconfiggroupProductgroup ON (ContractconfigGroup.id = ContractconfiggroupProductgroup.contractconfiggroup_id)
+ $sql = "SELECT Contractconfiggroup.* FROM Contractconfiggroup
+ LEFT JOIN ContractconfiggroupProductgroup ON (Contractconfiggroup.id = ContractconfiggroupProductgroup.contractconfiggroup_id)
LEFT JOIN Productgroup ON (ContractconfiggroupProductgroup.productgroup_id = Productgroup.id)
WHERE $where
- GROUP BY ContractconfigGroup.id
- ORDER BY ContractconfigGroup.name, ContractconfigGroup.`create`
+ GROUP BY Contractconfiggroup.id
+ ORDER BY Contractconfiggroup.name, Contractconfiggroup.`create`
";
mfLoghandler::singleton()->debug($sql);
$res = $db->query($sql);
- //$res = $db->select("ContractconfigGroup", "*", "$where ORDER BY name, `create`");
+ //$res = $db->select("Contractconfiggroup", "*", "$where ORDER BY name, `create`");
if($db->num_rows($res)) {
while($data = $db->fetch_object($res)) {
- $items[] = new ContractconfigGroup($data);
+ $items[] = new Contractconfiggroup($data);
}
}
return $items;
@@ -93,7 +93,7 @@ class ContractconfigGroupModel {
if(array_key_exists("name", $filter)) {
$name = FronkDB::singleton()->escape($filter['name']);
if($name) {
- $where .= " AND ContractconfigGroup.name='$name'";
+ $where .= " AND Contractconfiggroup.name='$name'";
}
}
diff --git a/application/ContractconfiggroupProductgroup/ContractconfiggroupProductgroup.php b/application/ContractconfiggroupProductgroup/ContractconfiggroupProductgroup.php
index 621e6cfce..eb0f4a989 100644
--- a/application/ContractconfiggroupProductgroup/ContractconfiggroupProductgroup.php
+++ b/application/ContractconfiggroupProductgroup/ContractconfiggroupProductgroup.php
@@ -17,7 +17,7 @@ class ContractconfiggroupProductgroup extends mfBaseModel {
}
if($name == "contractconfiggroup") {
- $this->contractconfiggroup = new ContractconfigGroup($this->contractconfiggroup_id);
+ $this->contractconfiggroup = new Contractconfiggroup($this->contractconfiggroup_id);
return $this->contractconfiggroup;
}
diff --git a/public/assets/css/thetool.css b/public/assets/css/thetool.css
index 637343890..811fbaab4 100644
--- a/public/assets/css/thetool.css
+++ b/public/assets/css/thetool.css
@@ -80,6 +80,14 @@ h1, h2, h3, h4, h5, h6 {
color: #0d6efd;
}
+.contract-link {
+
+}
+
+.contract-link.canceled {
+ text-decoration: line-through;
+}
+
/**************************
* custom styles