Added Lieboch to rimo api import

This commit is contained in:
Frank Schubert
2024-02-28 15:27:42 +01:00
parent 6db1055c6b
commit a0754d8c5d
8 changed files with 103 additions and 12 deletions

View File

@@ -25,6 +25,9 @@ $campaign_ids["kalwang"] = 41;
$campaign_ids["st_stefan_stainz"] = 36;
$campaign_ids["wettmannst"] = 37;
$campaign_ids["mureck"] = 42;
$campaign_ids["lieboch"] = 35;
$campaign_ids["lieboch_vorab"] = 49;
$campaign_ids["lieboch_smart"] = 39;
if(!array_key_exists(1,$argv)) {
@@ -65,14 +68,12 @@ foreach(PreorderModel::searchActive(["preordercampaign_id" => $selected_campaign
//echo "Nicht genug Wohneinheiten - Preorder id ".$preorder->id.": ".count($wohneinheiten)." - need ".$preorder->connection_count."\n";
continue;
}
//if($preorder->id == 920) {var_dump($wohneinheiten);exit;}
$available_units = [];
$additional_units = []; // to sort non-specific units last
foreach($wohneinheiten as $unit) {
if($preorder->adb_wohneinheit_id == $unit->id || !PreorderModel::getFirst(["adb_wohneinheit_id" => $unit->id, "deleted" => 0])) {
if($unit->tuer || preg_match('/^Top\s+\d+$/', $unit->zusatz)) {
if($preorder->adb_wohneinheit_id == $unit->id || !PreorderModel::getFirstActive(["adb_wohneinheit_id" => $unit->id])) {
if($unit->tuer || preg_match('/^(Top|Tuer|Tür)\s+\d+$/i', $unit->zusatz)) {
$available_units[] = $unit;
} else {
$additional_units[] = $unit;

View File

@@ -25,6 +25,9 @@ $campaign_ids["kalwang"] = 41;
$campaign_ids["st_stefan_stainz"] = 36;
$campaign_ids["wettmannst"] = 37;
$campaign_ids["mureck"] = 42;
$campaign_ids["lieboch"] = 35;
$campaign_ids["lieboch_vorab"] = 49;
$campaign_ids["lieboch_smart"] = 39;
if(!array_key_exists(1,$argv)) {