354c05a4ddd678c49bcbba458bffa7d13482139a
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

1) <?php
2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

5) Written by schokokeks.org Hosting, namely
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

6)   Bernd Wurst <bernd@schokokeks.org>
7)   Hanno Böck <hanno@schokokeks.org>
8) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

9) This code is published under a 0BSD license.
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

10) 
11) 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.
12) */
13) 
Bernd Wurst Zeige gleich an, ob eine (d...

Bernd Wurst authored 10 years ago

14) require_once('inc/icons.php');
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

15) require_once('invoice.php');
16) 
Bernd Wurst removed jquery and jqueryUI...

Bernd Wurst authored 1 year ago

17) require_once('inc/javascript.php');
Bernd Wurst JS-Code in separate Datei a...

Bernd Wurst authored 6 years ago

18) javascript();
Bernd Wurst Nutze zentrales JQuery

Bernd Wurst authored 10 years ago

19) 
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

20) require_role(ROLE_CUSTOMER);
21) $section = 'invoice_current';
22) 
23) title('Erteilung eines Mandats zur SEPA-Basis-Lastschrift');
24) 
25) output('<p>Ich ermächtige die Firma schokokeks.org GbR, Zahlungen von meinem Konto mittels Lastschrift
26) einzuziehen. Zugleich weise ich mein Kreditinstitut an, die von der Firma schokokeks.org GbR auf mein
27) Konto gezogenen Lastschriften einzulösen.</p>
28) <p>Hinweis: Ich kann innerhalb von acht Wochen, beginnend mit dem Belastungsdatum, die Erstattung des
Bernd Wurst Typo / Schönheitskorrektur

Bernd Wurst authored 10 years ago

29) belasteten Betrages verlangen. Es gelten dabei die mit meinem Kreditinstitut vereinbarten Bedingungen.
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

30) Insbesondere fallen bei Zurückweisung einer gerechtfertigten Abbuchung i.d.R. Gebühren an.</p>');
31) 
32) $name = $_SESSION['customerinfo']['name'];
33) if ($_SESSION['customerinfo']['company']) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

34)     if ($_SESSION['customerinfo']['name']) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 6 months ago

35)         $name = $_SESSION['customerinfo']['company'] . ' / ' . $_SESSION['customerinfo']['name'];
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

36)     } else {
37)         $name = $_SESSION['customerinfo']['company'];
38)     }
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

39) }
Hanno Böck Spaces between string conca...

Hanno Böck authored 6 months ago

40) output('<p>Dieses Mandat gilt für Forderungen bzgl. der Kundennummer <strong>' . $_SESSION['customerinfo']['customerno'] . '</strong> (' . $name . '). Sämtliche Forderungen werden mindestens 2 Tage vor Fälligkeit angekündigt. Diese Ankündigung erfolgt in der Regel im Rahmen der Zusendung einer Rechnung per E-Mail.</p>');
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

41) 
42) 
43) 
44) $first_date = date('Y-m-d');
45) $invoices = my_invoices();
46) foreach ($invoices as $i) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

47)     if ($i['bezahlt'] == 0 && $i['sepamandat'] == null && $i['datum'] < $first_date) {
48)         $first_date = $i['datum'];
49)     }
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

50) }
51) 
Bernd Wurst Ermögliche das Berechnen de...

Bernd Wurst authored 10 years ago

52) $html = '<h4>Gültigkeit des Mandats</h4>
53) <p>Ein eventuell zuvor erteiltes Mandat wird zu diesem Datum automatisch ungültig.</p>';
54) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

55) $checked = false;
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

56) if ($first_date != date('Y-m-d')) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

57)     $checked = true;
Hanno Böck Spaces between string conca...

Hanno Böck authored 6 months ago

58)     $html .= '<p><input type="radio" id="gueltig_ab_' . $first_date . '" name="gueltig_ab" value="' . $first_date . '" checked="checked" /><label for="gueltig_ab_' . $first_date . '">Dieses Mandat gilt <strong>ab ' . $first_date . '</strong> (Alle bisher offenen Forderungen werden ebenfalls abgebucht)</label></p>';
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

59) }
Hanno Böck Spaces between string conca...

Hanno Böck authored 6 months ago

60) $html .= '<p><input type="radio" id="gueltig_ab_heute" name="gueltig_ab" value="' . date('Y-m-d') . '" ' . ($checked ? '' : 'checked="checked"') . ' /><label for="gueltig_ab_heute">Dieses Mandat gilt <strong>ab heute</strong> (' . date('Y-m-d') . ')</label></p>';
61) $html .= '<p><input type="radio" id="gueltig_ab_auswahl" name="gueltig_ab" value="datum" /><label for="gueltig_ab_datum">Dieses Mandat gilt <strong>erst ab</strong></label> <input type="date" id="gueltig_ab_datum" name="gueltig_ab_datum" value="' . date('Y-m-d') . '">';
Bernd Wurst removed jquery and jqueryUI...

Bernd Wurst authored 1 year ago

62) 
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

63) 
64) $html .= '<h4>Ihre Bankverbindung</h4>';
65) $html .= '<table>
Bernd Wurst Funktion um Name und Adress...

Bernd Wurst authored 10 years ago

66) <tr><td><label for="kontoinhaber">Name des Kontoinhabers:</label></td><td><input type="text" name="kontoinhaber" id="kontoinhaber" /> <button id="copydata">Von Kundendaten kopieren</button></td></tr>
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

67) <tr><td><label for="adresse">Adresse des Kontoinhabers:</label></td><td><textarea cols="50" lines="2" name="adresse" id="adresse"></textarea></td></tr>
Bernd Wurst Ermögliche das Berechnen de...

Bernd Wurst authored 10 years ago

68) <tr id="ktoblz_input" style="display: none;"><td>Kontodaten:</td><td><label for="kto">Konto:</label> <input type="text" id="kto" /> <label for="blz">BLZ:</label> <input type="text" id="blz" /><br /><button id="ktoblz">IBAN berechnen...</button></td></tr>
69) <tr><td><label for="iban">IBAN:</label></td><td><input type="text" name="iban" id="iban" size="30" /><span id="iban_feedback"></span><br />
70) <span id="ktoblz_button"><button id="showktoblz">IBAN aus Kontonummer / BLZ berechnen...</button></span>
71) </td></tr>
Bernd Wurst IBAN-Feld breiter darstellen

Bernd Wurst authored 10 years ago

72) <tr><td><label for="bankname">Name der Bank:</label></td><td><input type="text" name="bankname" id="bankname" size="30" /></td></tr>