New Preorder cancelling
This commit is contained in:
@@ -53,7 +53,7 @@ $missing_doors = [];
|
||||
|
||||
$total = 0;
|
||||
$c = 0;
|
||||
foreach(PreorderModel::search(["deleted" => 0, "preordercampaign_id" => $selected_campaign, "connection_count" => 2]) as $preorder) {
|
||||
foreach(PreorderModel::searchActive(["preordercampaign_id" => $selected_campaign, "connection_count" => 2]) as $preorder) {
|
||||
// check if we have enough units with extref
|
||||
$wohneinheiten = ADBWohneinheitModel::search(["hausnummer_id" => $preorder->adb_hausnummer_id]);
|
||||
$unit_count = count($wohneinheiten);
|
||||
|
||||
@@ -30,7 +30,7 @@ $ctx_opts = [
|
||||
$missing_units = [];
|
||||
$missing_extrefs = [];
|
||||
|
||||
foreach(PreorderModel::search(["preordercampaign_id" => $campaign_prem_sued]) as $preorder) {
|
||||
foreach(PreorderModel::searchActive(["preordercampaign_id" => $campaign_prem_sued]) as $preorder) {
|
||||
if(in_array($preorder->id, $ignore_preorders)) continue;
|
||||
if($preorder->workorder_export_date) continue;
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ echo "selected campaign: $selected_campaign - ".$argv[1]."\n";
|
||||
$same_unit_count = 0;
|
||||
|
||||
$i = 0;
|
||||
foreach(PreorderModel::search(['preordercampaign_id' => $selected_campaign, 'adb_wohneinheit_id' => null, 'connection_count' => 1, "connection_type" => "single-dwelling", "deleted" => 0]) as $preorder) {
|
||||
foreach(PreorderModel::searchActive(['preordercampaign_id' => $selected_campaign, 'adb_wohneinheit_id' => null, 'connection_count' => 1, "connection_type" => "single-dwelling"]) as $preorder) {
|
||||
if(in_array($preorder->id, $ignore_preorders)) continue;
|
||||
//if($preorder->connection_type != "single-dwelling") continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user