Merge branch 'fronkdev' into 'master'

Added Citycom Data to Preorder detail

See merge request fronk/thetool!1662
This commit is contained in:
Frank Schubert
2025-08-20 11:03:43 +00:00
6 changed files with 172 additions and 57 deletions
@@ -89,7 +89,7 @@ class SnoppCitycom extends Modules\ApiControllerModule
}
if($preorder->campaign->name == "Citycom - Graz") {
if($preorder->campaign->fulfillment == "citycom_oan") {
$data["product_name"] = "Estmk Greenstream OAN $bb_down/$bb_up";
}
+16
View File
@@ -21,6 +21,8 @@ class Preorder extends mfBaseModel {
private $attribute = [];
private $logistics;
private $history;
private $citycomoan; // ONT data
private $ctags; // network-keyed array of Ctags
protected function beforeUpdate($data) {
if(!array_key_exists("edit_by", $data)) {
@@ -1555,6 +1557,20 @@ class Preorder extends mfBaseModel {
return ADBRimoFcp::get($this->adb_hausnummer->fcp_id);
}
if($name == "citycomoan") {
$ccoan = PreorderCitycomOan::getFirst(["preorder_id" => $this->id]);
if(!$ccoan) return null;
$this->citycomoan = $ccoan;
return $this->citycomoan;
}
if($name == "ctags") {
$ctags = PreorderCtag::searchActive(["preorder_id" => $this->id]);
if(!$ctags) return null;
$this->ctags = $ctags;
return $this->ctags;
}
if($name == "editor") {
$this->editor = new User($this->edit_by);
return $this->editor;
@@ -236,6 +236,8 @@ class PreordercampaignController extends mfBaseController {
$data['fulfillment'] = "thirdparty";
} elseif($r->fulfillment == "rimo") {
$data['fulfillment'] = "rimo";
} elseif($r->fulfillment == "citycom_oan") {
$data['fulfillment'] = "citycom_oan";
} else {
$data['fulfillment'] = "thetool";
}