From efbbf53e78e27b0d0ee4f2d926bc07aee02961ab Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Wed, 8 Jan 2025 13:12:50 +0100 Subject: [PATCH] Readded order fields in AddressDB::$wohneinheit_query for preorder address reporting --- application/AddressDB/AddressDB.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/application/AddressDB/AddressDB.php b/application/AddressDB/AddressDB.php index 4c9332b93..156a25d01 100644 --- a/application/AddressDB/AddressDB.php +++ b/application/AddressDB/AddressDB.php @@ -63,7 +63,10 @@ class AddressDB { `Wohneinheit`.`patch_cluster` AS `patch_cluster`, `Wohneinheit`.`patch_shelf` AS `patch_shelf`, `Wohneinheit`.`patch_module` AS `patch_module`, - `Wohneinheit`.`patch_port` AS `patch_port` + `Wohneinheit`.`patch_port` AS `patch_port`, + tbl_preorder.type AS `order_type`, + tbl_address.id AS `partner_id`, + tbl_address.company AS `partner_company` FROM `Hausnummer` LEFT JOIN `Netzgebiet` ON (`Hausnummer`.`netzgebiet_id` = `Netzgebiet`.`id`) LEFT JOIN `Plz` ON (`Plz`.`id` = `Hausnummer`.`plz_id`) @@ -71,6 +74,8 @@ class AddressDB { LEFT JOIN `Ortschaft` ON (`Ortschaft`.`id` = `Hausnummer`.`ortschaft_id`) LEFT JOIN `Gemeinde` ON (`Gemeinde`.`id` = `Strasse`.`gemeinde_id`) LEFT JOIN `Wohneinheit` ON (`Wohneinheit`.`hausnummer_id` = `Hausnummer`.`id`) + LEFT JOIN `".FRONKDB_DBNAME."`.`Preorder` as tbl_preorder on (tbl_preorder.`adb_wohneinheit_id` = `Wohneinheit`.`id` AND (tbl_preorder.`deleted` = 0 OR tbl_preorder.`deleted` IS NULL)) + LEFT JOIN `".FRONKDB_DBNAME."`.`Address` as tbl_address on (tbl_address.`id` = tbl_preorder.partner_id) "; /*public static $wohneinheit_query = "select `Netzgebiet`.`id` AS `netzgebiet_id`,