2c26630001b193353abb5d38589d3ed3cb1ecbba
bernd Kunden können Ihre Rechnung...

bernd authored 16 years ago

1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4) 
Bernd Wurst Lizenzinfos in eigenes Modu...

Bernd Wurst authored 10 years ago

5) Written 2008-2014 by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

6)   Bernd Wurst <bernd@schokokeks.org>
7)   Hanno Böck <hanno@schokokeks.org>
8) 
9) To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10) 
11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
12) http://creativecommons.org/publicdomain/zero/1.0/
13) 
14) Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
15) */
bernd Kunden können Ihre Rechnung...

bernd authored 16 years ago

16) 
17) require_once('session/start.php');
18) 
19) require_once('invoice.php');
20) 
21) require_role(ROLE_CUSTOMER);
22) 
bernd Rechnungen unterhalb von "Ü...

bernd authored 14 years ago

23) $section = 'invoice_current';
24) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

25) title("Offene Posten");
26) output('<p>Hier sehen Sie einen Überblick über alle aktuell offenen und zukünftigen Posten.</p>');
bernd Kunden können Ihre Rechnung...

bernd authored 16 years ago

27) 
28) 
Bernd Wurst Neues Layout der Rechnungs-...

Bernd Wurst authored 9 years ago

29) output('<p style="margin: 1em; padding: 1em; border: 2px solid red; background: white;"><strong>Hinweis:</strong> Die hier aufgeführten Posten dienen nur Ihrer Information und erheben keinen Anspruch auf Vollständigkeit. Aus technischen Gründen sind manche Posten hier nicht aufgeführt, die dennoch berechnet werden. Zudem können, bedingt durch Rundungsfehler, die Beträge auf dieser Seite falsch dargestellt sein. Wiederkehrende Beträge werden grundsätzlich nur für den nächsten Abrechnungszeitraum angezeigt.</p>');
bernd Kunden können Ihre Rechnung...

bernd authored 16 years ago

30) 
31) $items = upcoming_items();
32) $summe = 0;
33) 
34) $flip = true;
35) $today = date('Y-m-d');
36) 
37) output('<table><tr><th>Anzahl</th><th>Beschreibung</th><th>Zeitraum</th><th>Einzelpreis</th><th>Gesamtbetrag</th></tr>');
38) 
Bernd Wurst Zukünftige Rechnungsposten:...

Bernd Wurst authored 11 years ago

39) $counter = 0;
40) 
bernd Kunden können Ihre Rechnung...

bernd authored 16 years ago

41) foreach($items AS $item)
42) {
43) 	if ($flip && $item['startdatum'] > $today)
44) 	{
Bernd Wurst Zukünftige Rechnungsposten:...

Bernd Wurst authored 11 years ago

45)     if ($counter == 0) {
46)       output("<tr><td colspan=\"5\"><em>Aktuell keine fälligen Posten</em></td></tr>");
47)     }
bernd Kunden können Ihre Rechnung...

bernd authored 16 years ago

48) 		$flip = false;
49) 		output("<tr><td colspan=\"4\" style=\"text-align: right; font-weight: bold; border: none;\">Summe bisher fällige Posten:</td>");
50) 		output("<td style=\"font-weight: bold;\">{$summe} €</td></tr>\n");
51) 		output("<tr><td colspan=\"5\" style=\"border: none;\"> </td></tr>\n");
52) 	}
Bernd Wurst Zukünftige Rechnungsposten:...

Bernd Wurst authored 11 years ago

53)   $counter++;
bernd Kunden können Ihre Rechnung...

bernd authored 16 years ago

54) 	$desc = $item['startdatum'];
55) 	if ($item['enddatum'] != NULL)
56) 		$desc = $item['startdatum'].' - '.$item['enddatum'];
57) 	$epreis = $item['betrag'];
58) 	if ($item['brutto'] == 0)
59) 		$epreis = $epreis * (1 + ($item['mwst'] / 100));
60) 	$gesamt = round($epreis * $item['anzahl'], 2);
61) 	$epreis = round($epreis, 2);
62) 	$summe += $gesamt;
Bernd Wurst Einheit bei Rechnungsposten...

Bernd Wurst authored 11 years ago

63)   $einheit = ($item['einheit'] ? $item['einheit'] : '');
64) 	output("<tr><td>{$item['anzahl']} {$einheit}</td>");