Subversion Repositories wpShopGermany4

Rev

Rev 7216 | Rev 7243 | 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;
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'),
32
		\wpsg\wpsg_calculation::TAXMODE_B2B => __('Firmenkundenbesteuerung')
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>
52
		<?php $i = 0; foreach ($arCalculation['product'] as $p) { $i ++; $product_price = $p[$display]; ?>
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>
70
				<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
71
					<td class="wpsg_cell_mwst"><?php echo $arTaxShort[$p['tax_key']]; ?></td>
72
				<?php } ?>
73
				<td class="wpsg_cell_menge"><?php echo wpsg_hspc($p['amount']); ?></td>
74
				<td class="wpsg_cell_gesamtpreis"><?php echo wpsg_ff($p['amount'] * $product_price); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
75
			</tr>
76
			<?php $this->callMods('order_view_row', array(&$p, $i)); ?>
77
			<tr><td colspan="<?php echo $this->view['colspan'] + 1; ?>" style="line-height:2px; height:2px; background-color:#999999; padding:0px;"></td></tr>
78
		<?php } ?>
79
 
80
		<?php // Gutscheine  ?>
81
		<?php if (wpsg_isSizedArray($arCalculation['voucher'])) { ?>
82
 
83
			<?php foreach ($arCalculation['voucher'] as $v) { ?>
7179 daniel 84
 
7197 daniel 85
				<tr class="wpsg_row_discount wpsg_row_small">
86
					<td colspan="" class="wpsg_cell_mwst_label">
87
 
88
						<div>
89
							<?php echo __('Gutschein', 'wpsg'); ?>
90
 
91
							<?php if ($this->getBackendTaxView() === WPSG_BRUTTO) { ?>
92
								<?php echo __('(inkl. MwSt.)', 'wpsg'); ?>
93
							<?php } else { ?>
94
								<?php echo __('(zzgl. MwSt.)', 'wpsg'); ?>
95
							<?php } ?>
96
 
97
							<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>
98
							<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>
99
						</div>
100
						<div>
101
							Code: <?php echo $v['code']; ?>
102
						</div>
103
 
104
					</td>
105
					<td class="wpsg_cell_preis">
106
 
107
						<?php if (strpos($v['set'], '%') === false) { ?>
108
							<?php echo wpsg_ff($arCalculation['sum']['voucher_'.$display], $this->get_option('wpsg_currency')); ?>
109
						<?php } else { ?>
110
							<?php echo wpsg_ff($v['set'], '%'); ?>
111
						<?php } ?>
112
 
113
					</td>
114
					<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
115
						<td class="wpsg_cell_mwst"><?php echo $arTaxShort[$v['tax_key']]; ?></td>
116
					<?php } ?>
117
					<td>1</td>
118
					<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
119
						<?php echo wpsg_ff($arCalculation['sum']['voucher_'.$display]); ?> <?php echo $this->get_option('wpsg_currency'); ?>
120
					</td>
121
				</tr>
122
 
123
			<?php } ?>
124
			<tr><td colspan="<?php echo $this->view['colspan'] + 1; ?>" style="line-height:2px; height:2px; background-color:#999999; padding:0px;"></td></tr>
125
 
126
		<?php } ?>
127
 
128
		<tr class="wpsg_row_summe">
129
			<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
130
 
131
				<?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
7179 daniel 132
 
7197 daniel 133
					<?php echo wpsg_translate(__('Summe (zzgl. #1#)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
134
 
135
				<?php } else { ?>
136
 
137
					<?php if ($this->get_option('wpsg_preisangaben') == WPSG_NETTO) { ?>
138
						<?php echo wpsg_translate(__('Summe (zzgl. #1#, zzgl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
139
					<?php } else { ?>
140
						<?php echo wpsg_translate(__('Summe (zzgl. #1#, inkl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
141
					<?php } ?>
142
 
143
				<?php } ?>
144
 
145
			</td>
146
			<td class="wpsg_cell_summe_value wpsg_cell_gesamtpreis">
147
 
148
				<?php echo wpsg_ff($arCalculation['sum']['productsum_'.$display]); ?> <?php echo $this->get_option('wpsg_currency'); ?>
149
 
150
			</td>
151
		</tr>
152
 
153
		<?php // Versandkosten  ?>
154
		<?php $price_shipping = $arCalculation['sum']['shipping_'.$display]; ?>
155
		<?php if ($price_shipping != 0 || $this->get_option('wpsg_hideemptyshipping') != '1') { ?>
156
			<tr class="wpsg_row_shipping">
157
				<td class="wpsg_cell_shipping_label" colspan="2">
158
					<?php echo __('Versandkosten', 'wpsg'); ?>
159
					<?php echo __('  ('.$this->arShipping[$arCalculation['shipping'][0]['shipping_key']]['name'].')', 'wpsg'); ?>
160
					<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>
161
				</td>
162
				<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
163
				<td><?php echo $arTaxShort[$arCalculation['shipping'][0]['tax_key']]; ?></td>
164
				<?php } ?>
165
				<td class="wpsg_cell_shipping_value wpsg_cell_gesamtpreis" colspan="2">
166
					<span id="wpsg_cell_shipping_value"><?php echo wpsg_ff($price_shipping); ?> </span>
167
					<?php echo $this->get_option('wpsg_currency'); ?>
168
				</td>
169
			</tr>
170
		<?php } ?>
171
 
172
		<?php // Zahlungskosten  ?>
173
		<?php $price_payment = $arCalculation['sum']['payment_'.$display]; ?>
174
		<?php if ($price_payment != 0 || $this->get_option('wpsg_hideemptypayment') != '1') { ?>
175
			<tr class="wpsg_row_payment">
176
				<td colspan="2" class="wpsg_cell_payment_label">
177
					<?php echo __('Zahlungsart', 'wpsg'); ?>
178
					<?php echo __('  ('.$this->arPayment[$arCalculation['payment'][0]['payment_key']]['name'].')', 'wpsg'); ?>
179
					<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>
180
				</td>
181
				<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
182
					<td><?php echo $arTaxShort[$arCalculation['payment'][0]['tax_key']]; ?></td>
183
				<?php } ?>
184
				<td class="wpsg_cell_payment_value wpsg_cell_gesamtpreis" colspan="2">
185
					<span id="wpsg_cell_payment_value"><?php echo wpsg_ff($price_payment); ?> </span>
186
					<?php echo $this->get_option('wpsg_currency'); ?>
187
				</td>
188
			</tr>
189
		<?php } ?>
190
 
191
		<?php // Rabatte  ?>
192
		<?php if (wpsg_isSizedArray($arCalculation['discount'])) { ?>
193
			<?php foreach ($arCalculation['discount'] as $d) { ?>
194
				<tr class="wpsg_row_discount wpsg_row_small">
195
					<td colspan="" class="wpsg_cell_mwst_label">
7179 daniel 196
 
7197 daniel 197
						<?php echo __('Rabatt', 'wpsg'); ?>
198
 
7179 daniel 199
						<?php if ($this->getBackendTaxView() === WPSG_BRUTTO) { ?>
200
							<?php echo __('(inkl. MwSt.)', 'wpsg'); ?>
201
						<?php } else { ?>
202
							<?php echo __('(zzgl. MwSt.)', 'wpsg'); ?>
203
						<?php } ?>
204
 
7197 daniel 205
						<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>
206
						<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>
207
 
208
					</td>
209
					<td class="wpsg_cell_preis">
210
 
7198 daniel 211
						<?php if (strpos($d['set'], '%') === false) { ?>
212
							<?php echo wpsg_ff($arCalculation['sum']['discount_'.$display], $this->get_option('wpsg_currency')); ?>
7197 daniel 213
						<?php } else { ?>
7198 daniel 214
							<?php echo wpsg_ff($d['set'], '%'); ?>
7197 daniel 215
						<?php } ?>
216
 
217
					</td>
218
					<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
219
						<td class="wpsg_cell_mwst"><?php echo $arTaxShort[$d['tax_key']]; ?></td>
220
					<?php } ?>
221
					<td></td>
222
					<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
223
						<?php echo wpsg_ff($arCalculation['sum']['discount_'.$display]); ?> <?php echo $this->get_option('wpsg_currency'); ?>
224
					</td>
225
				</tr>
226
			<?php } ?>
227
		<?php } ?>
228
 
229
		<?php if ($this->getBackendTaxView() === WPSG_NETTO) { ?>
230
 
231
			<tr class="wpsg_row_gesamt">
232
				<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
233
					<?php echo __('Summe', 'wpsg'); ?>
234
					<?php echo __('(zzgl. MwSt.)', 'wpsg'); ?>
7179 daniel 235
				</td>
7197 daniel 236
				<td class="wpsg_cell_gesamt_value wpsg_cell_gesamtpreis">
237
					<?php echo wpsg_ff($arCalculation['sum'][$display]); ?> <?php echo $this->get_option('wpsg_currency'); ?>
7179 daniel 238
				</td>
7197 daniel 239
			</tr>
240
			<?php foreach ($arCalculation['tax'] as $tax) { if ($tax['sum'] > 0 && $tax['key'] != '0') { ?>
241
				<tr class="wpsg_row_mwst wpsg_row_small">
242
					<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
243
						<?php echo wpsg_translate(__('zuzüglich MwSt. (#1#)', 'wpsg'), $arTax[$tax['key']]); ?>
244
					</td>
245
					<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
246
						<?php echo wpsg_ff($tax['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
247
					</td>
248
				</tr>
249
			<?php } } ?>
250
			<tr class="wpsg_row_gesamt">
251
				<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
252
					<strong><?php echo __('Gesamtsumme', 'wpsg'); ?></strong>
253
					<?php echo __('(inkl. MwSt.)', 'wpsg'); ?>
7179 daniel 254
				</td>
7197 daniel 255
				<td class="wpsg_cell_gesamt_value wpsg_cell_gesamtpreis">
256
					<strong><?php echo wpsg_ff($arCalculation['sum']['brutto']); ?> <?php echo $this->get_option('wpsg_currency'); ?></strong>
257
				</td>
7179 daniel 258
			</tr>
259
 
7197 daniel 260
		<?php } else { ?>
7173 daniel 261
 
7197 daniel 262
			<tr class="wpsg_row_gesamt">
263
				<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
264
					<strong><?php echo __('Gesamtsumme', 'wpsg'); ?></strong>
265
					<?php if ($this->getBackendTaxView() === WPSG_BRUTTO) { ?>
266
						<?php echo __('(inkl. MwSt.)', 'wpsg'); ?>
267
					<?php } else { ?>
268
						<?php echo __('(zzgl. MwSt.)', 'wpsg'); ?>
7179 daniel 269
					<?php } ?>
7197 daniel 270
				</td>
271
				<td class="wpsg_cell_gesamt_value wpsg_cell_gesamtpreis">
272
					<strong><?php echo wpsg_ff($arCalculation['sum']['brutto']); ?> <?php echo $this->get_option('wpsg_currency'); ?></strong>
273
				</td>
274
			</tr>
275
			<?php foreach ($arCalculation['tax'] as $tax) { if ($tax['sum'] > 0 && $tax['key'] != '0') { ?>
276
				<tr class="wpsg_row_mwst wpsg_row_small">
277
					<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
278
						<?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
279
							<?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?>
280
						<?php } else { ?>
281
							<?php echo wpsg_translate(__('darin enthaltene MwSt. (#1#)', 'wpsg'), $arTax[$tax['key']]); ?>
282
						<?php } ?>
283
					</td>
284
					<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
285
						<?php echo wpsg_ff($tax['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
286
					</td>
287
				</tr>
288
			<?php } } ?>
289
 
290
		<?php } ?>
291
 
292
	</tbody>
293
</table>
7216 daniel 294
 
295
<?php wpsg_debug($arCalculation);  ?>
7210 daniel 296