366e575cf08db87d23e85e0a004989dea25fb3f3
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) 
5) Written 2008-2013 by schokokeks.org Hosting, namely
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) */
16) 
17) require_once('invoice.php');
18) 
19) require_role(ROLE_CUSTOMER);
20) $section = 'invoice_current';
21) 
22) title('Daten Ihres Lastschrift-Mandats');
23) 
24) $ref = $_REQUEST['ref'];
25) $mandate = get_sepamandate();
26) $m = NULL;
27) 
28) foreach ($mandate as $man) {
29)   if ($man['mandatsreferenz'] == $ref) {
30)     $m = $man;
31)   }
32) }
33) if (! $m) {
34)   system_failure('Konnte das Mandat nicht finden.');
35) }
36) 
37) if ($m['medium'] == 'legacy') {
38)   output('<p>Sie hatten uns vor längerer Zeit eine Einzugsermächtigung ausgesprochen. Wir haben diese selbstständig in das nachstehende SEPA-Mandat überführt.</p>');
39) } else {
40)   $medium = 'über unser Webinterface';
41)   switch ($m['medium']) {
42)     case 'email': 
43)       $medium = 'per E-Mail';
44)       break;
45)     case 'fax':
46)       $medium = 'per Fax';
47)       break;
48)     case 'post':
49)       $medium = 'per Post';
50)       break;
51)   }
52)   output('<p>Wir haben das nachstehende Mandat am '.$m['erteilt'].' '.$medium.' entgegen genommen.</p>');
53) }
54) output('<h3>Stammdaten</h3>
55) <dl>
56) <dt>Mandatsreferenz</dt><dd>'.$m['mandatsreferenz'].'</dd>
Bernd Wurst Speichere Gläubiger-ID mit...

Bernd Wurst authored 10 years ago

57) <dt>Unsere Gläubiger-ID<dt><dd>'.$m['glaeubiger_id'].'</dd>
Bernd Wurst Erste Version des SEPA-Mand...

Bernd Wurst authored 10 years ago

58) </dl>');
59) 
60) output('<h3>Gültigkeit</h3>');
61) 
62) $gueltigkeit = 'ab '.$m['gueltig_ab'];
Bernd Wurst Kleine Korrekturen Ausführu...

Bernd Wurst authored 10 years ago

63) if ($m['gueltig_ab'] < date('Y-m-d')) {
64)   $gueltigkeit = 'seit '.$m['gueltig_ab'];
65) }