Added St. Stefan Stainz to rimo import

This commit is contained in:
Frank Schubert
2024-01-31 15:50:19 +01:00
parent 96ac7aae8c
commit 3ec626e02e
7 changed files with 81 additions and 383 deletions
+10 -9
View File
@@ -21,8 +21,9 @@ $campaign_prem_nord = 5;
$campaign_prem_sued = 6;
$campaign_gross_st_florian = 7;
$campaign_kalwang = 41;
$cmapaign_st_stefan_stainz = 36;
$selected_campaign = $campaign_kalwang;
$selected_campaign = $cmapaign_st_stefan_stainz;
if(!$selected_campaign) {
echo "Keine Kampagne ausgewählt.\n";
@@ -60,8 +61,9 @@ foreach(PreorderModel::search(['preordercampaign_id' => $selected_campaign, 'adb
}
if($unit_count > 1 && $unit_count <= 4) {
// assume its single-dwelling with erroneously high door count
if($unit_count > 1) {
// legacy comment: assume its single-dwelling with erroneously high door count
// current comment: Just use any unit
$unit_candidates = [];
foreach($wohneinheiten as $unit) {
@@ -71,14 +73,13 @@ foreach(PreorderModel::search(['preordercampaign_id' => $selected_campaign, 'adb
}
}
/*if(!count($unit_candidates)) {
// no candidates with door number -> use any
if(!count($unit_candidates)) {
foreach($wohneinheiten as $unit) {
if(!$unit->zusatz) continue;
if(preg_match('/Top\s+\d+/i',$unit->zusatz)) {
$unit_candidates[$unit->zusatz] = $unit;
}
$unit_candidates[] = $unit;
}
}*/
}
if(count($unit_candidates)) {
ksort($unit_candidates, SORT_NUMERIC);