Subversion Repositories wpShopGermany4

Rev

Rev 7250 | Rev 7349 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7173 daniel 1
<?php
7179 daniel 2
 
7173 daniel 3
    /**
4
     * Template für die Produkttabelle im Backend der Bestellverwaltung
5
     */
7210 daniel 6
 
7197 daniel 7
    $arCalculation = $this->view['oCalculation']->getCalculationArray(true);
8
	$arTax = $this->view['oCalculation']->getTaxLabelArray();
9
	$arTaxShort = $this->view['oCalculation']->getTaxLabelArray(true);
10
 
7173 daniel 11
    $this->view['colspan'] = 3;
12
    if ($this->get_option('wpsg_showMwstAlways') == '1' || sizeof($arCalculation['tax']) > 1) $this->view['colspan'] ++;
13
 
14
    $this->view['arCalculation'] = $arCalculation;
7243 daniel 15
 
7197 daniel 16
    if ($this->getBackendTaxView() === WPSG_NETTO) $display = 'netto';
17
    else $display = 'brutto';
7210 daniel 18
 
7173 daniel 19
?>
20
 
21
<style>
22
 
7197 daniel 23
	.wpsg_row_small td { font-size:0.8em; }
7179 daniel 24
	#wpsg-bs .wpsg_row_small  .wpsg-glyphlink-td > span { margin-top:0px; }
7210 daniel 25
	/*.wpsg_productrow_add td { border-top:0px !important; }*/
7197 daniel 26
 
7173 daniel 27
</style>
28
 
7210 daniel 29
<?php echo wpsg_drawForm_Select('tax_mode', __('Besteuerung'), [
30
		\wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS => __('Kleinunternehmerregelung'),
31
		\wpsg\wpsg_calculation::TAXMODE_B2C => __('Endkundenbesteuerung'),
7243 daniel 32
		\wpsg\wpsg_calculation::TAXMODE_B2B => __('Firmenkundenbesteuerung (USTIdNr)')
7220 daniel 33
	], $this->view['oCalculation']->getTaxMode(), ['onchange' => 'WPSG_BE.updateCalculation();', 'help' => 'tax_mode']); ?>
7197 daniel 34
 
7210 daniel 35
<br />
36
 
7173 daniel 37
<table class="wpsg_produkte table">
7197 daniel 38
	<thead>
39
		<tr class="wpsg_kopf">
40
			<th class="wpsg_cell_name"><?php echo __('Produktname', 'wpsg'); ?></th>
41
			<th class="wpsg_cell_preis"><?php echo __('Einzelpreis', 'wpsg'); ?></th>
42
			<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
43
				<th class="wpsg_cell_mwst"><?php echo __("MwSt.", "wpsg"); ?></th>
44
			<?php } ?>
45
			<th class="wpsg_cell_menge"><?php echo __("Anzahl", "wpsg"); ?></th>
46
			<th class="wpsg_cell_gesamtpreis"><?php echo __("Gesamtpreis", "wpsg"); ?></th>
47
		</tr>
48
	</thead>
49
	<tbody>
7173 daniel 50
 
7197 daniel 51
		<tr><td colspan="<?php echo $this->view['colspan'] + 1; ?>" style="line-height:2px; height:2px; background-color:#999999; padding:0px;"></td></tr>
7250 daniel 52
		<?php $i = 0; foreach ($arCalculation['product'] as $p) { $i ++; $product_price = $p[$display.'_single']; ?>
7197 daniel 53
			<tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
7210 daniel 54
				<td colspan="<?php echo $this->view['colspan'] + 1; ?>">
55
 
56
					<?php if (wpsg_isTrue($p['eu'])) { ?>
57
						<img src="<?php echo WPSG_URL; ?>views/gfx/eu.png" alt="<?php echo __('Produkt unterliegt der EU-Leistungsortregel', 'wpsg'); ?>" title="<?php echo __('Produkt unterliegt der EU-Leistungsortregel', 'wpsg'); ?>" height="14" />
58
					<?php } ?>
59
 
7197 daniel 60
					<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id=<?php echo $p['product_id']; ?>" title="<?php echo __('Zum Produkt', 'wpsg'); ?>">
61
						<?php echo wpsg_hspc($this->getProductName($p['product_id'])); ?>
62
					</a>
63
					<a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Produkt bearbeiten', 'wpsg'); ?>" onclick="return WPSG_BE_Product.editProduct(<?php echo $p['order_product_id']; ?>);"><span class="glyphicon glyphicon-pencil"></span></a>
7210 daniel 64
					<a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Produkt löschen', 'wpsg'); ?>" onclick="return WPSG_BE_Product.removeProduct(<?php echo $p['order_product_id']; ?>);"><span class="glyphicon glyphicon-trash"></span></a>
7197 daniel 65
				</td>
7210 daniel 66
			</tr>
67
			<tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?> wpsg_productrow_add">
68
				<td class="wpsg_cell_name"></td>
7197 daniel 69
				<td class="wpsg_cell_preis"><?php echo wpsg_ff($product_price); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
7243 daniel 70
				<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
71
					<td class="wpsg_cell_mwst"><?php
72
 
73
						echo (($p['brutto'] === $p['netto'])?wpsg_ff(0, '%'):$arTaxShort[$p['tax_key']]);
74
 
75
					?></td>
7197 daniel 76
				<?php } ?>
77
				<td class="wpsg_cell_menge"><?php echo wpsg_hspc($p['amount']); ?></td>
78
				<td class="wpsg_cell_gesamtpreis"><?php echo wpsg_ff($p['amount'] * $product_price); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
79
			</tr>
80
			<?php $this->callMods('order_view_row', array(&$p, $i)); ?>
81
			<tr><td colspan="<?php echo $this->view['colspan'] + 1; ?>" style="line-height:2px; height:2px; background-color:#999999; padding:0px;"></td></tr>
82
		<?php } ?>
83
 
84
		<?php // Gutscheine  ?>
85
		<?php if (wpsg_isSizedArray($arCalculation['voucher'])) { ?>
86
 
87
			<?php foreach ($arCalculation['voucher'] as $v) { ?>
7179 daniel 88
 
7197 daniel 89
				<tr class="wpsg_row_discount wpsg_row_small">
90
					<td colspan="" class="wpsg_cell_mwst_label">
91
 
92
						<div>
93
							<?php echo __('Gutschein', 'wpsg'); ?>
94
 
95
							<?php if ($this->getBackendTaxView() === WPSG_BRUTTO) { ?>
96
								<?php echo __('(inkl. MwSt.)', 'wpsg'); ?>
97
							<?php } else { ?>
98
								<?php echo __('(zzgl. MwSt.)', 'wpsg'); ?>
99
							<?php } ?>
100
 
101
							<a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Gutschein bearbeiten', 'wpsg'); ?>" onclick="return WPSG_BE_Voucher.editVoucher();"><span class="glyphicon glyphicon-pencil"></span></a>
102
							<a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Gutschein löschen', 'wpsg'); ?>" onclick="return WPSG_BE_Voucher.removeVoucher();"><span class="glyphicon glyphicon-trash"></span></a>
103
						</div>
104
						<div>
105
							Code: <?php echo $v['code']; ?>
106
						</div>
107
 
108
					</td>
109
					<td class="wpsg_cell_preis">
110
 
111
						<?php if (strpos($v['set'], '%') === false) { ?>
112
							<?php echo wpsg_ff($arCalculation['sum']['voucher_'.$display], $this->get_option('wpsg_currency')); ?>
113
						<?php } else { ?>
114
							<?php echo wpsg_ff($v['set'], '%'); ?>
115
						<?php } ?>
116
 
117
					</td>
118
					<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
119
						<td class="wpsg_cell_mwst"><?php echo $arTaxShort[$v['tax_key']]; ?></td>
120
					<?php } ?>
121
					<td>1</td>
122
					<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
123
						<?php echo wpsg_ff($arCalculation['sum']['voucher_'.$display]); ?> <?php echo $this->get_option('wpsg_currency'); ?>
124
					</td>
125
				</tr>
126
 
127
			<?php } ?>
128
			<tr><td colspan="<?php echo $this->view['colspan'] + 1; ?>" style="line-height:2px; height:2px; background-color:#999999; padding:0px;"></td></tr>
129
 
130
		<?php } ?>
131
 
132
		<tr class="wpsg_row_summe">
133
			<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
134
 
135
				<?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
7179 daniel 136
 
7197 daniel 137
					<?php echo wpsg_translate(__('Summe (zzgl. #1#)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
138
 
139
				<?php } else { ?>
140
 
141
					<?php if ($this->get_option('wpsg_preisangaben') == WPSG_NETTO) { ?>
142
						<?php echo wpsg_translate(__('Summe (zzgl. #1#, zzgl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
143
					<?php } else { ?>
144
						<?php echo wpsg_translate(__('Summe (zzgl. #1#, inkl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
145
					<?php } ?>
146
 
147
				<?php } ?>
148
 
149
			</td>
150
			<td class="wpsg_cell_summe_value wpsg_cell_gesamtpreis">
151
 
152
				<?php echo wpsg_ff($arCalculation['sum']['productsum_'.$display]); ?> <?php echo $this->get_option('wpsg_currency'); ?>
153
 
154
			</td>
155
		</tr>
156
 
157
		<?php // Versandkosten  ?>
158
		<?php $price_shipping = $arCalculation['sum']['shipping_'.$display]; ?>
159
		<?php if ($price_shipping != 0 || $this->get_option('wpsg_hideemptyshipping') != '1') { ?>
160
			<tr class="wpsg_row_shipping">
161
				<td class="wpsg_cell_shipping_label" colspan="2">
162
					<?php echo __('Versandkosten', 'wpsg'); ?>
163
					<?php echo __('  ('.$this->arShipping[$arCalculation['shipping'][0]['shipping_key']]['name'].')', 'wpsg'); ?>
164
					<a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Versandart ändern', 'wpsg'); ?>"  onclick="return WPSG_BE_Pay_Ship.changeShippingPayment();"><span class="glyphicon glyphicon-pencil"></span></a>
165
				</td>
166
				<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
167
				<td><?php echo $arTaxShort[$arCalculation['shipping'][0]['tax_key']]; ?></td>
168
				<?php } ?>
169
				<td class="wpsg_cell_shipping_value wpsg_cell_gesamtpreis" colspan="2">
170
					<span id="wpsg_cell_shipping_value"><?php echo wpsg_ff($price_shipping); ?> </span>
171
					<?php echo $this->get_option('wpsg_currency'); ?>
7347 daniel 172
 
173
					<?php if (strpos($arCalculation['shipping'][0]['set'], '%') !== false) {
174
 
175
						echo '<span class="procent_payship">('.wpsg_ff(wpsg_tf($arCalculation['shipping'][0]['set']), '%').')</span>';
176
 
177
					} ?>
178
 
7197 daniel 179
				</td>
180
			</tr>
181
		<?php } ?>
182
 
183
		<?php // Zahlungskosten  ?>
184
		<?php $price_payment = $arCalculation['sum']['payment_'.$display]; ?>
185
		<?php if ($price_payment != 0 || $this->get_option('wpsg_hideemptypayment') != '1') { ?>
186
			<tr class="wpsg_row_payment">
187
				<td colspan="2" class="wpsg_cell_payment_label">
188
					<?php echo __('Zahlungsart', 'wpsg'); ?>
189
					<?php echo __('  ('.$this->arPayment[$arCalculation['payment'][0]['payment_key']]['name'].')', 'wpsg'); ?>
190
					<a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Zahlungsart ändern', 'wpsg'); ?>" onclick="return WPSG_BE_Pay_Ship.changeShippingPayment();"><span class="glyphicon glyphicon-pencil"></span></a>
191
				</td>
192
				<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
193
					<td><?php echo $arTaxShort[$arCalculation['payment'][0]['tax_key']]; ?></td>
194
				<?php } ?>
195
				<td class="wpsg_cell_payment_value wpsg_cell_gesamtpreis" colspan="2">
196
					<span id="wpsg_cell_payment_value"><?php echo wpsg_ff($price_payment); ?> </span>
197
					<?php echo $this->get_option('wpsg_currency'); ?>
7347 daniel 198
 
199
					<?php if (strpos($arCalculation['payment'][0]['set'], '%') !== false) {
200
 
201
						echo '<span class="procent_payship">('.wpsg_ff(wpsg_tf($arCalculation['payment'][0]['set']), '%').')</span>';
202
 
203
					} ?>
204
 
7197 daniel 205
				</td>
206
			</tr>
207
		<?php } ?>
208
 
209
		<?php // Rabatte  ?>
210
		<?php if (wpsg_isSizedArray($arCalculation['discount'])) { ?>
211
			<?php foreach ($arCalculation['discount'] as $d) { ?>
212
				<tr class="wpsg_row_discount wpsg_row_small">
213
					<td colspan="" class="wpsg_cell_mwst_label">
7179 daniel 214
 
7197 daniel 215
						<?php echo __('Rabatt', 'wpsg'); ?>
216
 
7179 daniel 217
						<?php if ($this->getBackendTaxView() === WPSG_BRUTTO) { ?>
218
							<?php echo __('(inkl. MwSt.)', 'wpsg'); ?>
219
						<?php } else { ?>
220
							<?php echo __('(zzgl. MwSt.)', 'wpsg'); ?>
221
						<?php } ?>
222
 
7197 daniel 223
						<a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Rabatt bearbeiten', 'wpsg'); ?>" onclick="return WPSG_BE_Discount.editDiscount();"><span class="glyphicon glyphicon-pencil"></span></a>
224
						<a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Rabatt löschen', 'wpsg'); ?>" onclick="return WPSG_BE_Discount.removeDiscount();"><span class="glyphicon glyphicon-trash"></span></a>
225
 
226
					</td>
227
					<td class="wpsg_cell_preis">
228
 
7198 daniel 229
						<?php if (strpos($d['set'], '%') === false) { ?>
230
							<?php echo wpsg_ff($arCalculation['sum']['discount_'.$display], $this->get_option('wpsg_currency')); ?>
7197 daniel 231
						<?php } else { ?>
7198 daniel 232
							<?php echo wpsg_ff($d['set'], '%'); ?>
7197 daniel 233
						<?php } ?>
234
 
235
					</td>
236
					<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
237
						<td class="wpsg_cell_mwst"><?php echo $arTaxShort[$d['tax_key']]; ?></td>
238
					<?php } ?>
239
					<td></td>
240
					<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
241
						<?php echo wpsg_ff($arCalculation['sum']['discount_'.$display]); ?> <?php echo $this->get_option('wpsg_currency'); ?>
242
					</td>
243
				</tr>
244
			<?php } ?>
245
		<?php } ?>
246
 
247
		<?php if ($this->getBackendTaxView() === WPSG_NETTO) { ?>
248
 
249
			<tr class="wpsg_row_gesamt">
250
				<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
251
					<?php echo __('Summe', 'wpsg'); ?>
252
					<?php echo __('(zzgl. MwSt.)', 'wpsg'); ?>
7179 daniel 253
				</td>
7197 daniel 254
				<td class="wpsg_cell_gesamt_value wpsg_cell_gesamtpreis">
255
					<?php echo wpsg_ff($arCalculation['sum'][$display]); ?> <?php echo $this->get_option('wpsg_currency'); ?>
7179 daniel 256
				</td>
7197 daniel 257
			</tr>
258
			<?php foreach ($arCalculation['tax'] as $tax) { if ($tax['sum'] > 0 && $tax['key'] != '0') { ?>
259
				<tr class="wpsg_row_mwst wpsg_row_small">
260
					<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
261
						<?php echo wpsg_translate(__('zuzüglich MwSt. (#1#)', 'wpsg'), $arTax[$tax['key']]); ?>
262
					</td>
263
					<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
264
						<?php echo wpsg_ff($tax['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
265
					</td>
266
				</tr>
267
			<?php } } ?>
268
			<tr class="wpsg_row_gesamt">
269
				<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
270
					<strong><?php echo __('Gesamtsumme', 'wpsg'); ?></strong>
271
					<?php echo __('(inkl. MwSt.)', 'wpsg'); ?>
7179 daniel 272
				</td>
7197 daniel 273
				<td class="wpsg_cell_gesamt_value wpsg_cell_gesamtpreis">
274
					<strong><?php echo wpsg_ff($arCalculation['sum']['brutto']); ?> <?php echo $this->get_option('wpsg_currency'); ?></strong>
275
				</td>
7179 daniel 276
			</tr>
277
 
7197 daniel 278
		<?php } else { ?>
7173 daniel 279
 
7197 daniel 280
			<tr class="wpsg_row_gesamt">
281
				<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
282
					<strong><?php echo __('Gesamtsumme', 'wpsg'); ?></strong>
283
					<?php if ($this->getBackendTaxView() === WPSG_BRUTTO) { ?>
284
						<?php echo __('(inkl. MwSt.)', 'wpsg'); ?>
285
					<?php } else { ?>
286
						<?php echo __('(zzgl. MwSt.)', 'wpsg'); ?>
7179 daniel 287
					<?php } ?>
7197 daniel 288
				</td>
289
				<td class="wpsg_cell_gesamt_value wpsg_cell_gesamtpreis">
290
					<strong><?php echo wpsg_ff($arCalculation['sum']['brutto']); ?> <?php echo $this->get_option('wpsg_currency'); ?></strong>
291
				</td>
292
			</tr>
293
			<?php foreach ($arCalculation['tax'] as $tax) { if ($tax['sum'] > 0 && $tax['key'] != '0') { ?>
294
				<tr class="wpsg_row_mwst wpsg_row_small">
295
					<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
296
						<?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
297
							<?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?>
298
						<?php } else { ?>
299
							<?php echo wpsg_translate(__('darin enthaltene MwSt. (#1#)', 'wpsg'), $arTax[$tax['key']]); ?>
300
						<?php } ?>
301
					</td>
302
					<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
303
						<?php echo wpsg_ff($tax['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
304
					</td>
305
				</tr>
306
			<?php } } ?>
307
 
308
		<?php } ?>
309
 
310
	</tbody>
311
</table>
7216 daniel 312
 
313
<?php wpsg_debug($arCalculation);  ?>
7210 daniel 314