Subversion Repositories wpShopGermany4

Rev

Rev 8375 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8375 Rev 8477
Line 2... Line 2...
2
 
2
 
3
	/**
3
	/**
4
	 * Template welches bei der Zahlungsart "Vorkasse" nach Abschluss einer Bestellung angezeigt wird
4
	 * Template welches bei der Zahlungsart "Vorkasse" nach Abschluss einer Bestellung angezeigt wird
5
	 */
5
	 */
6
	
6
	
-
 
7
	$formatIBAN = function($iban) {
-
 
8
	
7
	//wpsg_debug($this->view['wpsg_mod_prepayment']['subject']);
9
		$iban = preg_replace('/\040/', '', $iban);
-
 
10
		$iban_formated = '';
-
 
11
		
-
 
12
		for ($i = 0; $i < ceil(strlen($iban) / 4); $i ++) $iban_formated .= substr($iban, $i * 4, 4).' ';
-
 
13
		
-
 
14
		return trim($iban_formated);
-
 
15
	
-
 
16
	}
8
    
17
	
9
?>
18
?>
10
 
19
 
11
<?php echo wpsg_translate(__('Sie haben die Zahlungsart "Vorkasse" gewählt. Überweisen Sie daher den Rechnungsbetrag von #1# auf folgendes Konto:', 'wpsg'), wpsg_ff($this->view['basket']['arCalculation']['sum']['topay_brutto'], $this->get_option('wpsg_currency'))); ?>
20
<?php echo wpsg_translate(__('Sie haben die Zahlungsart "Vorkasse" gewählt. Überweisen Sie daher den Rechnungsbetrag von #1# auf folgendes Konto:', 'wpsg'), wpsg_ff($this->view['basket']['arCalculation']['sum']['topay_brutto'], $this->get_option('wpsg_currency'))); ?>
12
<br /><br />
21
<br /><br />
13
<?php echo wpsg_translate(__('Kontoinhaber: #1#', 'wpsg'), $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber'))); ?><br /> 
22
<?php echo wpsg_translate(__('Kontoinhaber: #1#', 'wpsg'), $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber'))); ?><br /> 
14
<?php echo wpsg_translate(__('IBAN: #1#', 'wpsg'), $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban'))); ?><br /> 
23
<?php echo wpsg_translate(__('IBAN: #1#', 'wpsg'), $formatIBAN($this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban')))); ?><br />
15
<?php echo wpsg_translate(__('Bank: #1#', 'wpsg'), $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_bank'))); ?><br />
24
<?php echo wpsg_translate(__('Bank: #1#', 'wpsg'), $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_bank'))); ?><br />
16
<?php echo wpsg_translate(__('BIC-/SWIFT-Code: #1#', 'wpsg'), $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_swift'))); ?> 
25
<?php echo wpsg_translate(__('BIC-/SWIFT-Code: #1#', 'wpsg'), $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_swift'))); ?> 
17
<br /><br />
26
<br /><br />
18
<?php echo wpsg_translate(__('Bitte als Betreff angeben: "#1#"', 'wpsg'), $this->view['wpsg_mod_prepayment']['subject']); ?>
27
<?php echo wpsg_translate(__('Bitte als Betreff angeben: "#1#"', 'wpsg'), $this->view['wpsg_mod_prepayment']['subject']); ?>
19
<br /><br />
28
<br /><br />
20
 
29
 
21
<?php return; if ( isset($this->view['wpsg_mod_prepayment']['subject']) && ($this->get_option('wpsg_mod_prepayment_qrcode') == true) ) { ?>
30
<?php if (isset($this->view['wpsg_mod_prepayment']['subject']) && $this->get_option('wpsg_mod_prepayment_qrcode') == true) { ?>
22
 
31
 
23
	<?php require_once WPSG_PATH_LIB.'phpgirocode.class.php'; ?>
32
	<?php require_once WPSG_PATH_LIB.'phpgirocode.class.php'; ?>
24
 
-
 
25
	<?php if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '0') { ?>
-
 
26
		
-
 
27
		<!-- Girocode und QR-Rechnung -->
-
 
28
 
-
 
29
		<?php 
-
 
30
 
-
 
31
		try {
-
 
32
			
-
 
33
			$img = array();
-
 
34
			$img = $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['wpsg_mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 10, PhpGirocode::OUTPUT_BASE64, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
-
 
35
 		
-
 
36
		?>
-
 
37
 
33
 
38
		<div class="wpsg_mod_prepayment_info_wrap">
-
 
39
			<?php foreach ($img as $i) { ?>
-
 
40
				<div class="wpsg_mod_prepayment_info">
-
 
41
					<div class="wpsg_mod_prepayment_info_left">
-
 
42
                    <div class="wpsg_mod_prepayment_info_left_qr-download">
-
 
43
						<h4><?php echo wpsg_translate(__($i['title'], 'wpsg')); ?></h4>
-
 
44
						<?php if (isset($i['filepath'])) { ?><a title="Downloadlink für die QR-Rechnung" target="_blank" href="<?php echo $this->callMod('wpsg_mod_prepayment', 'getFrontendLink', [$i['order_id']]); ?>"><i class="fa fa-download" aria-hidden="true"></i></a><?php } ?>
34
	<!-- Girocode (EPC) -->
45
                    </div>	
-
 
46
                        <br />
-
 
47
						<?php echo '<img class="wpsg_mod_prepayment_info_left_qrcodeimg" src="data:image/png;base64,'.$i['hash'].'" />'; ?>
-
 
48
						<br />
-
 
49
						<div class="wpsg_mod_prepayment_info_left_wrap">
-
 
50
							<div class="wpsg_mod_prepayment_info_left_currency">
-
 
51
								<h4><?php echo wpsg_translate(__('Währung', 'wpsg')); ?></h4>
-
 
52
								<?php echo $this->get_option('wpsg_currency'); ?>
-
 
53
							</div>
-
 
54
							<div class="wpsg_mod_prepayment_info_left_amount">
-
 
55
								<h4><?php echo wpsg_translate(__('Betrag', 'wpsg')); ?></h4>
-
 
56
								<?php echo sprintf("%.2f", $i['invoiceAmount']); ?>
-
 
57
							</div>
-
 
58
						</div>
-
 
59
					</div>
-
 
60
					<div class="wpsg_mod_prepayment_info_right">
-
 
61
						<h4><?php echo wpsg_translate(__('Konto / Zahlbar an', 'wpsg')); ?></h4>
-
 
62
						<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban')); ?><br />
-
 
63
						<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber')); ?><br />
-
 
64
						<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_street')); ?><br />
-
 
65
						<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_zip')).' '.$this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_city')); ?><br />
-
 
66
						<?php if (!empty($i['referenceNumber'])) { ?>
-
 
67
							<h4><?php echo wpsg_translate(__('Referenz', 'wpsg')); ?></h4>
-
 
68
							<?php echo $i['referenceNumber']; ?><br />
-
 
69
						<?php } ?>
-
 
70
						<h4><?php echo wpsg_translate(__('Zusätzliche Informationen', 'wpsg')); ?></h4>
-
 
71
						<?php echo $i['additionalInformation']; ?><br /> 
-
 
72
						<h4><?php echo wpsg_translate(__('Zahlbar durch', 'wpsg')); ?></h4>
-
 
73
						<?php echo $i['customerdata']['vname'].' '.$i['customerdata']['name']; ?><br />
-
 
74
						<?php echo $i['customerdata']['strasse'].' '.$i['customerdata']['nr']; ?><br />
-
 
75
						<?php echo $i['customerdata']['plz'].' '.$i['customerdata']['ort']; ?><br />
-
 
76
					</div>
-
 
77
				</div>
-
 
78
			<?php } ?>
-
 
79
		</div>
-
 
80
 
-
 
81
		<?php } catch (\Exception $e) { wpsg_debug($e); } ?>
-
 
82
 
-
 
83
	<?php } else if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '1') { ?>
-
 
84
 
-
 
85
		<!-- Girocode (EPC) -->
-
 
86
 
35
 
87
		<p>
36
	<p>
88
			<?php echo __('Wenn Ihre Banking-App Girocode unterstützt, können Sie diesen QRCode scannen.', 'wpsg'); ?>
37
		<?php echo __('Wenn Ihre Banking-App Girocode unterstützt, können Sie diesen QRCode scannen.', 'wpsg'); ?>
89
		</p>
38
	</p>
90
 
39
 
91
		<?php 
40
	<?php
-
 
41
	
-
 
42
		$img = [
-
 
43
			'title' => __('Girocode', 'wpsg'),
-
 
44
			'invoiceAmount' => $this->view['basket']['sum']['preis_gesamt_brutto'],
-
 
45
			'referenceNumber' => $this->view['wpsg_mod_prepayment']['subject'],
-
 
46
			'hash' => $this->callMod('wpsg_mod_prepayment', 'genQRCode', [
-
 
47
				$this->view['o_id'],
-
 
48
				$this->view['wpsg_mod_prepayment']['subject'],
-
 
49
				$this->view['basket']['sum']['preis_gesamt_brutto'],
-
 
50
				10,
-
 
51
				PhpGirocode::OUTPUT_BASE64
-
 
52
			])
-
 
53
		];
92
		
54
		
93
			$img = array();
-
 
94
			$img = $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['wpsg_mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 10, PhpGirocode::OUTPUT_BASE64, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
55
	?>
95
 
-
 
96
		?>
-
 
97
 
56
 
98
		<div class="wpsg_mod_prepayment_girocode">
57
	<div class="wpsg_mod_prepayment_girocode">
99
			<div class="wpsg_mod_prepayment_girocode_left" >
58
		<div class="wpsg_mod_prepayment_girocode_left" >
100
				<h4><?php echo wpsg_translate(__($img['title'], 'wpsg')); ?></h4>
59
			<h4><?php echo wpsg_translate(__($img['title'], 'wpsg')); ?></h4>
101
				<br />
-
 
102
				<?php echo '<img class="wpsg_mod_prepayment_girocode_left_qrcodeimg" src="data:image/png;base64,'.$img['hash'].'" />'; ?>
60
			<?php echo '<img class="wpsg_mod_prepayment_girocode_left_qrcodeimg" src="data:image/png;base64,'.$img['hash'].'" />'; ?>
103
				<br>
61
			<br>
104
				<div class="wpsg_mod_prepayment_girocode_left_wrap">
62
			<div class="wpsg_mod_prepayment_girocode_left_wrap">
105
					<div class="wpsg_mod_prepayment_girocode_left_currency">
63
				<div class="wpsg_mod_prepayment_girocode_left_currency">
106
						<h4><?php echo wpsg_translate(__('Währung', 'wpsg')); ?></h4>
64
					<h4><?php echo wpsg_translate(__('Währung', 'wpsg')); ?></h4>
107
						<?php echo $this->get_option('wpsg_currency'); ?>
65
					<?php echo $this->get_option('wpsg_currency'); ?>
108
					</div>
-
 
109
					<div class="wpsg_mod_prepayment_girocode_left_amount">
-
 
110
						<h4><?php echo wpsg_translate(__('Betrag', 'wpsg')); ?></h4>
-
 
111
						<?php echo sprintf("%.2f", $img['invoiceAmount']); ?>
-
 
112
					</div>
-
 
113
				</div>
66
				</div>
114
			</div>
-
 
115
			<div class="wpsg_mod_prepayment_girocode_right">
-
 
116
				<h4><?php echo wpsg_translate(__('Konto / Zahlbar an', 'wpsg')); ?></h4>
-
 
117
				<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban')); ?><br />
-
 
118
				<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber')); ?><br />
-
 
119
				<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_street')); ?><br />
-
 
120
				<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_zip')).' '.$this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_city')); ?><br />
-
 
121
				<?php if (!empty($img['referenceNumber'])) { ?>
-
 
122
					<h4><?php echo wpsg_translate(__('Referenz', 'wpsg')); ?></h4>
-
 
123
					<?php echo $img['referenceNumber']; ?><br />
-
 
124
				<?php } ?>
-
 
125
				<h4><?php echo wpsg_translate(__('Zusätzliche Informationen', 'wpsg')); ?></h4>
-
 
126
				<?php echo $img['additionalInformation']; ?><br /> 
-
 
127
				<h4><?php echo wpsg_translate(__('Zahlbar durch', 'wpsg')); ?></h4>
-
 
128
				<?php echo $img['customerdata']['vname'].' '.$img['customerdata']['name']; ?><br />
-
 
129
				<?php echo $img['customerdata']['strasse'].' '.$img['customerdata']['nr']; ?><br />
-
 
130
				<?php echo $img['customerdata']['plz'].' '.$img['customerdata']['ort']; ?><br />
-
 
131
			</div>
-
 
132
		</div>
-
 
133
 
-
 
134
	<?php } else if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '2') { ?>
-
 
135
 
-
 
136
		<!-- QR-Rechnung (SWISS) -->
-
 
137
 
-
 
138
		<?php 
-
 
139
 
-
 
140
			$img = array();
-
 
141
			$img = $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['wpsg_mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 10, PhpGirocode::OUTPUT_BASE64, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket'])); 
67
				<div class="wpsg_mod_prepayment_girocode_left_amount">
142
		
-
 
143
		?>
-
 
144
		
-
 
145
		<div class="wpsg_mod_prepayment_qrrechnung">
-
 
146
			<div class="wpsg_mod_prepayment_qrrechnung_left">
-
 
147
				<h4><?php echo wpsg_translate(__($img['title'], 'wpsg')); ?></h4>
-
 
148
				<br />
-
 
149
				<?php echo '<img class="wpsg_mod_prepayment_qrrechnung_left_qrcodeimg" src="data:image/png;base64,'.$img['hash'].'" />'; ?>
-
 
150
				<br>
-
 
151
				<div class="wpsg_mod_prepayment_qrrechnung_left_wrap">
-
 
152
					<div class="wpsg_mod_prepayment_qrrechnung_left_currency">
-
 
153
						<h4><?php echo wpsg_translate(__('Währung', 'wpsg')); ?></h4>
-
 
154
						<?php echo $this->get_option('wpsg_currency'); ?>
-
 
155
					</div>
-
 
156
					<div class="wpsg_mod_prepayment_qrrechnung_left_amount">
-
 
157
						<h4><?php echo wpsg_translate(__('Betrag', 'wpsg')); ?></h4>
68
					<h4><?php echo wpsg_translate(__('Betrag', 'wpsg')); ?></h4>
158
						<?php echo sprintf("%.2f", $img['invoiceAmount']); ?>
69
					<?php echo sprintf("%.2f", $img['invoiceAmount']); ?>
159
					</div>
-
 
160
				</div>
70
				</div>
161
			</div>
71
			</div>
162
			<div class="wpsg_mod_prepayment_qrrechnung_right">
-
 
163
				<h4><?php echo wpsg_translate(__('Konto / Zahlbar an', 'wpsg')); ?></h4>
-
 
164
				<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban')); ?><br />
-
 
165
				<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber')); ?><br />
-
 
166
				<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_street')); ?><br />
-
 
167
				<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_zip')).' '.$this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_city')); ?><br />
-
 
168
				<?php if (!empty($img['referenceNumber'])) { ?>
-
 
169
					<h4><?php echo wpsg_translate(__('Referenz', 'wpsg')); ?></h4>
-
 
170
					<?php echo $img['referenceNumber']; ?><br />
-
 
171
				<?php } ?>
-
 
172
				<h4><?php echo wpsg_translate(__('Zusätzliche Informationen', 'wpsg')); ?></h4>
-
 
173
				<?php echo $img['additionalInformation']; ?><br /> 
-
 
174
				<h4><?php echo wpsg_translate(__('Zahlbar durch', 'wpsg')); ?></h4>
-
 
175
				<?php echo $img['customerdata']['vname'].' '.$img['customerdata']['name']; ?><br />
-
 
176
				<?php echo $img['customerdata']['strasse'].' '.$img['customerdata']['nr']; ?><br />
-
 
177
				<?php echo $img['customerdata']['plz'].' '.$img['customerdata']['ort']; ?><br />
-
 
178
			</div>
-
 
179
		</div>
72
		</div>
-
 
73
		<div class="wpsg_mod_prepayment_girocode_right">
-
 
74
			<h4 style="margin-bottom:30px;"><?php echo wpsg_translate(__('Konto / Zahlbar an', 'wpsg')); ?></h4>
-
 
75
			IBAN: <strong><?php echo $formatIBAN($this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban'))); ?></strong><br />
-
 
76
			Kontoinhaber: <strong><?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber')); ?></strong><br /><br />
-
 
77
			Betreff: <strong><?php echo $img['referenceNumber']; ?></strong>
180
 
78
		</div>
181
	<?php } ?>
79
	</div>
182
	
80
	
183
<?php } ?>
81
<?php } ?>
184
82