Browse code

codingstyle fixes

Hanno authored on28/02/2019 18:01:50
Showing5 changed files
... ...
@@ -125,5 +125,3 @@ foreach ($investment_types as $id => $type) {
125 125
         output('<p>Neue Anlagegüter <strong>'.$type['description'].'</strong>: '.number_format(-$net_by_type[$id], 2, ',', '.')." €</p>");
126 126
     }
127 127
 }
128
-
129
-
... ...
@@ -44,7 +44,7 @@ function get_pdf($id)
44 44
 }
45 45
 
46 46
 
47
-function invoice_address($customer = null) 
47
+function invoice_address($customer = null)
48 48
 {
49 49
     $c = (int) $_SESSION['customerinfo']['customerno'];
50 50
     if ($customer != null && have_role(ROLE_SYSADMIN)) {
... ...
@@ -177,11 +177,11 @@ function get_lastschriften($mandatsreferenz)
177 177
 }
178 178
 
179 179
 
180
-function get_sepamandat($id) 
180
+function get_sepamandat($id)
181 181
 {
182 182
     $result = db_query("SELECT id, kunde, mandatsreferenz, glaeubiger_id, erteilt, medium, gueltig_ab, gueltig_bis, erstlastschrift, kontoinhaber, adresse, iban, bic, bankname FROM kundendaten.sepamandat WHERE id=? OR mandatsreferenz=?", array($id, $id));
183 183
     return $result->fetch();
184
- }
184
+}
185 185
 
186 186
 function get_sepamandate()
187 187
 {
... ...
@@ -20,4 +20,3 @@ 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
-
... ...
@@ -218,7 +218,7 @@ $address = invoice_address($invoice['kunde']);
218 218
 // Address Field
219 219
 $html .= '<div id="addressfield">
220 220
 <div id="addressfieldheader">schokokeks.org · Köchersberg 32 · 71540 Murrhardt</div>
221
-<p>'.($address['company'] != null ? $address['company'].'<br>' : '' ).$address['name'].'<br>
221
+<p>'.($address['company'] != null ? $address['company'].'<br>' : '').$address['name'].'<br>
222 222
 '.$address['address'].'<br>
223 223
 '.($address['country'] != 'DE' ? $address['country'].'-' : '').$address['zip'].' '.$address['city'].'
224 224
 </p>
... ...
@@ -282,9 +282,9 @@ $summe = 0.0;
282 282
 $odd = true;
283 283
 foreach ($items as $item) {
284 284
     if ($vattype == 'gross' && $item['brutto'] == 0) {
285
-            system_failure('Mixed gross and net positions');
285
+        system_failure('Mixed gross and net positions');
286 286
     } elseif ($vattype == 'net' && $item['brutto'] == 1) {
287
-            system_failure('Mixed gross and net positions');
287
+        system_failure('Mixed gross and net positions');
288 288
     } else {
289 289
         $vattype = ($item['brutto'] == 1 ? 'gross' : 'net');
290 290
     }
... ...
@@ -312,7 +312,7 @@ foreach ($items as $item) {
312 312
         $einzelsummen[$item['mwst']]['vat'] += $gesamt / (1 + ($item['mwst'] / 100)) * ($item['mwst'] / 100);
313 313
         $einzelsummen[$item['mwst']]['gross'] += $gesamt;
314 314
     } else {
315
-        $einzelsummen[$item['mwst']] = array('net' => $gesamt / (1 + ($item['mwst'] / 100)), 
315
+        $einzelsummen[$item['mwst']] = array('net' => $gesamt / (1 + ($item['mwst'] / 100)),
316 316
                                              'vat' => $gesamt / (1 + ($item['mwst'] / 100)) * ($item['mwst'] / 100),
317 317
                                              'gross' => $gesamt);
318 318
     }
... ...
@@ -329,7 +329,7 @@ foreach ($einzelsummen as $percent => $sums) {
329 329
     $html .= '<tr><td colspan="4" style="text-align: right;">Nettobetrag ('.number_format($percent, 1, ',', '.').'% MwSt):</td><td style="text-align: right;">'.number_format($sums['net'], 2, ',', '.').' €</td></tr>
330 330
               <tr><td colspan="4" style="text-align: right;">MwSt-Betrag '.number_format($percent, 1, ',', '.').'%:</td><td style="text-align: right;">'.number_format($sums['vat'], 2, ',', '.').' €</td></tr>';
331 331
     if (count($einzelsummen) > 1) {
332
-              $html .= '<tr><td colspan="4" style="text-align: right;">Brutto-Teilbetrag '.number_format($percent, 1, ',', '.').'% MwSt:</td><td style="text-align: right;">'.number_format($sums['gross'], 2, ',', '.').' €</td></tr>';
332
+        $html .= '<tr><td colspan="4" style="text-align: right;">Brutto-Teilbetrag '.number_format($percent, 1, ',', '.').'% MwSt:</td><td style="text-align: right;">'.number_format($sums['gross'], 2, ',', '.').' €</td></tr>';
333 333
     }
334 334
 }
335 335
 $html .= '<tr style="font-weight: bold;"><td colspan="4" style="text-align: right;">Rechnungsbetrag:</td><td style="text-align: right;">'.number_format($summe, 2, ',', '.').' €</td></tr>
... ...
@@ -255,7 +255,7 @@ if ($_GET['action'] == 'edit') {
255 255
             unset($new_options[$key]);
256 256
         }
257 257
     }
258
-    
258
+
259 259
 
260 260
     DEBUG($old_options);
261 261
     DEBUG($new_options);