Browse code

Erlaube Admins das Abfragen von Kundendaten anderer Kunden

Bernd Wurst authored on 29/12/2018 15:58:38
Showing 3 changed files
... ...
@@ -204,9 +204,12 @@ function sync_legacy_contactdata()
204 204
 }
205 205
 
206 206
 
207
-function get_kundenkontakte()
207
+function get_kundenkontakte($customer = null)
208 208
 {
209 209
     $cid = (int) $_SESSION['customerinfo']['customerno'];
210
+    if ($customer and have_role(ROLE_SYSADMIN)) {
211
+        $cid = (int) $customer;
212
+    }
210 213
     $result = db_query("SELECT contact_kunde, contact_extern, contact_rechnung, contact_dataprotection FROM kundendaten.kunden WHERE id=?", array($cid));
211 214
     $res = $result->fetch();
212 215
     $ret = array("kunde" => $res['contact_kunde'],
... ...
@@ -20,3 +20,4 @@ if ($role & ROLE_CUSTOMER) {
20 20
     $menu["invoice_current"] = array("label" => "Rechnungen", "file" => "current", "weight" => 2, "submenu" => "index_index");
21 21
     //$menu["invoice_upcoming"] = array("label" => "zuk├╝nftige Rechnungen", "file" => "upcoming", "weight" => 2, "submenu" => "invoice_current");
22 22
 }
23
+
... ...
@@ -269,7 +269,7 @@ hiermit stellen wir die nachfolgend genannten Posten in Rechnung.</p>';
269 269
 $html .= '<table style="width: 100%;">
270 270
 <tr style="border-bottom: 1px solid black;">
271 271
 <th style="width: 1cm; text-align: center;">Anz.</th>
272
-<th style="min-width: 1cm; max-width: 2cm;">&nbsp;</th>
272
+<th style="width: 2cm;">&nbsp;</th>
273 273
 <th>Beschreibung</th>
274 274
 <th style="width: 2.5cm; text-align: center;">Einzelpreis</th>
275 275
 <th style="width: 3cm; text-align: center;">Gesamtpreis</th></tr>';