Merge branch 'Preorderlogistics/add-new-button' into 'master'
fixed fcp search See merge request fronk/thetool!1657
This commit is contained in:
@@ -351,7 +351,7 @@ class PreorderModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
mfLoghandler::singleton()->debug($sql);
|
mfLoghandler::singleton()->debug($sql);
|
||||||
|
die($sql);
|
||||||
$res = $db->query($sql);
|
$res = $db->query($sql);
|
||||||
if ($db->num_rows($res)) {
|
if ($db->num_rows($res)) {
|
||||||
|
|
||||||
@@ -1112,22 +1112,12 @@ class PreorderModel
|
|||||||
$db = FronkDB::singleton();
|
$db = FronkDB::singleton();
|
||||||
$campaign = new Preordercampaign($filter['preordercampaign_id']);
|
$campaign = new Preordercampaign($filter['preordercampaign_id']);
|
||||||
if (is_array($fcp)) {
|
if (is_array($fcp)) {
|
||||||
$items = array_map(fn($i) => ADBRimoFcp::getAll([
|
$where .= " AND adb_hausnummer.rimo_fcp_name IN ('" . implode("','", array_map(fn($i) => $db->escape($i), $fcp)) . "')";
|
||||||
'netzgebiet_id' => intval($campaign->network->adb_netzgebiet_id),
|
|
||||||
'name' => $i])[0], array_filter($fcp));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$items = array_map(fn($i) => $i->id, array_filter($items));
|
|
||||||
if ($items) $where .= " AND adb_hausnummer.fcp_id IN (" . implode(',', $items) . ")";
|
|
||||||
} else {
|
} else {
|
||||||
$fcp = ADBRimoFcp::getAll([
|
$fcp = $db->escape($fcp);
|
||||||
'netzgebiet_id' => intval($campaign->network->adb_netzgebiet_id),
|
if ($fcp) {
|
||||||
'name' => $fcp]);
|
$where .= " AND adb_hausnummer.rimo_fcp_name = '$fcp'";
|
||||||
if ($fcp) $fcp = $fcp[0]->id;
|
}
|
||||||
else $fcp = null;
|
|
||||||
|
|
||||||
$where .= " AND adb_hausnummer.rimo_fcp_name = '" . $db->escape($fcp) . "'";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user