diff --git a/Layout/default/Preordercampaign/Form.php b/Layout/default/Preordercampaign/Form.php
index 4482513bd..714d766de 100644
--- a/Layout/default/Preordercampaign/Form.php
+++ b/Layout/default/Preordercampaign/Form.php
@@ -140,6 +140,9 @@
+
diff --git a/application/Api/v1/Modules/Operationaldata/SnoppCitycom.php b/application/Api/v1/Modules/Operationaldata/SnoppCitycom.php
index 72865862a..0420f7e42 100644
--- a/application/Api/v1/Modules/Operationaldata/SnoppCitycom.php
+++ b/application/Api/v1/Modules/Operationaldata/SnoppCitycom.php
@@ -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";
}
diff --git a/application/Preorder/Preorder.php b/application/Preorder/Preorder.php
index c6c602367..cf9a25116 100644
--- a/application/Preorder/Preorder.php
+++ b/application/Preorder/Preorder.php
@@ -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;
diff --git a/application/Preordercampaign/PreordercampaignController.php b/application/Preordercampaign/PreordercampaignController.php
index 5dd9d314e..b3b8fa9b4 100644
--- a/application/Preordercampaign/PreordercampaignController.php
+++ b/application/Preordercampaign/PreordercampaignController.php
@@ -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";
}
diff --git a/db/migrations/20250820104230_preordercampaign_add_fulfillment_citycom_oan.php b/db/migrations/20250820104230_preordercampaign_add_fulfillment_citycom_oan.php
new file mode 100644
index 000000000..ac5fd79a8
--- /dev/null
+++ b/db/migrations/20250820104230_preordercampaign_add_fulfillment_citycom_oan.php
@@ -0,0 +1,31 @@
+getEnvironment() == "thetool") {
+ $table = $this->table("Preordercampaign");
+ $table->changeColumn("fulfillment", "enum", ["null" => false, "default" => "thetool", "values" => ['thetool', 'thirdparty', 'rimo', 'citycom_oan']]);
+ $table->update();
+ }
+
+ if($this->getEnvironment() == "addressdb") {
+
+ }
+ }
+
+ public function down(): void
+ {
+ if($this->getEnvironment() == "thetool") {
+
+ }
+
+ if($this->getEnvironment() == "addressdb") {
+
+ }
+ }
+}