Subversion Repositories wpShopGermany4

Rev

Rev 7197 | Rev 7210 | 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
     */
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';
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; }
7197 daniel 25
 
7173 daniel 26
</style>
27
 
7197 daniel 28
 
7173 daniel 29
<table class="wpsg_produkte table">
7197 daniel 30
	<thead>
31
		<tr class="wpsg_kopf">
32
			<th class="wpsg_cell_name"><?php echo __('Produktname', 'wpsg'); ?></th>
33
			<th class="wpsg_cell_preis"><?php echo __('Einzelpreis', 'wpsg'); ?></th>
34
			<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
35
				<th class="wpsg_cell_mwst"><?php echo __("MwSt.", "wpsg"); ?></th>
36
			<?php } ?>
37
			<th class="wpsg_cell_menge"><?php echo __("Anzahl", "wpsg"); ?></th>
38
			<th class="wpsg_cell_gesamtpreis"><?php echo __("Gesamtpreis", "wpsg"); ?></th>
39
		</tr>
40
	</thead>
41
	<tbody>
7173 daniel 42
 
7197 daniel 43
		<tr><td colspan="<?php echo $this->view['colspan'] + 1; ?>" style="line-height:2px; height:2px; background-color:#999999; padding:0px;"></td></tr>
44
		<?php $i = 0; foreach ($arCalculation['product'] as $p) { $i ++; $product_price = $p[$display]; ?>
45
			<tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
46
				<td class="wpsg_cell_name">
47
					<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'); ?>">
48
						<?php echo wpsg_hspc($this->getProductName($p['product_id'])); ?>
49
					</a>
50
					<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>
51
					<a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Produkt löschen', 'wpsg'); ?>" onclick="return WPSG_BE_Product.remvoeProduct(<?php echo $p['order_product_id']; ?>);"><span class="glyphicon glyphicon-trash"></span></a>
52
				</td>
53
				<td class="wpsg_cell_preis"><?php echo wpsg_ff($product_price); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
54
				<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
55
					<td class="wpsg_cell_mwst"><?php echo $arTaxShort[$p['tax_key']]; ?></td>
56
				<?php } ?>
57
				<td class="wpsg_cell_menge"><?php echo wpsg_hspc($p['amount']); ?></td>
58
				<td class="wpsg_cell_gesamtpreis"><?php echo wpsg_ff($p['amount'] * $product_price); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
59
			</tr>
60
			<?php $this->callMods('order_view_row', array(&$p, $i)); ?>
61
			<tr><td colspan="<?php echo $this->view['colspan'] + 1; ?>" style="line-height:2px; height:2px; background-color:#999999; padding:0px;"></td></tr>
62
		<?php } ?>
63
 
64
		<?php // Gutscheine  ?>
65
		<?php if (wpsg_isSizedArray($arCalculation['voucher'])) { ?>
66
 
67
			<?php foreach ($arCalculation['voucher'] as $v) { ?>
7179 daniel 68
 
7197 daniel 69
				<tr class="wpsg_row_discount wpsg_row_small">
70
					<td colspan="" class="wpsg_cell_mwst_label">
71
 
72
						<div>
73
							<?php echo __('Gutschein', 'wpsg'); ?>
74
 
75
							<?php if ($this->getBackendTaxView() === WPSG_BRUTTO) { ?>
76
								<?php echo __('(inkl. MwSt.)', 'wpsg'); ?>
77
							<?php } else { ?>
78
								<?php echo __('(zzgl. MwSt.)', 'wpsg'); ?>
79
							<?php } ?>
80
 
81
							<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>
82
							<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>
83
						</div>
84
						<div>
85
							Code: <?php echo $v['code']; ?>
86
						</div>
87
 
88
					</td>
89
					<td class="wpsg_cell_preis">
90
 
91
						<?php if (strpos($v['set'], '%') === false) { ?>
92
							<?php echo wpsg_ff($arCalculation['sum']['voucher_'.$display], $this->get_option('wpsg_currency')); ?>
93
						<?php } else { ?>
94
							<?php echo wpsg_ff($v['set'], '%'); ?>
95
						<?php } ?>
96
 
97
					</td>
98
					<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
99
						<td class="wpsg_cell_mwst"><?php echo $arTaxShort[$v['tax_key']]; ?></td>
100
					<?php } ?>
101
					<td>1</td>
102
					<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
103
						<?php echo wpsg_ff($arCalculation['sum']['voucher_'.$display]); ?> <?php echo $this->get_option('wpsg_currency'); ?>
104
					</td>
105
				</tr>
106
 
107
			<?php } ?>
108
			<tr><td colspan="<?php echo $this->view['colspan'] + 1; ?>" style="line-height:2px; height:2px; background-color:#999999; padding:0px;"></td></tr>
109
 
110
		<?php } ?>
111
 
112
		<tr class="wpsg_row_summe">
113
			<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
114
 
115
				<?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
7179 daniel 116
 
7197 daniel 117
					<?php echo wpsg_translate(__('Summe (zzgl. #1#)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
118
 
119
				<?php } else { ?>
120
 
121
					<?php if ($this->get_option('wpsg_preisangaben') == WPSG_NETTO) { ?>
122
						<?php echo wpsg_translate(__('Summe (zzgl. #1#, zzgl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
123
					<?php } else { ?>
124
						<?php echo wpsg_translate(__('Summe (zzgl. #1#, inkl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
125
					<?php } ?>
126
 
127
				<?php } ?>
128
 
129
			</td>
130
			<td class="wpsg_cell_summe_value wpsg_cell_gesamtpreis">
131
 
132
				<?php echo wpsg_ff($arCalculation['sum']['productsum_'.$display]); ?> <?php echo $this->get_option('wpsg_currency'); ?>
133
 
134
			</td>
135
		</tr>
136
 
137
		<?php // Versandkosten  ?>
138
		<?php $price_shipping = $arCalculation['sum']['shipping_'.$display]; ?>
139
		<?php if ($price_shipping != 0 || $this->get_option('wpsg_hideemptyshipping') != '1') { ?>
140
			<tr class="wpsg_row_shipping">
141
				<td class="wpsg_cell_shipping_label" colspan="2">
142
					<?php echo __('Versandkosten', 'wpsg'); ?>
143
					<?php echo __('  ('.$this->arShipping[$arCalculation['shipping'][0]['shipping_key']]['name'].')', 'wpsg'); ?>
144
					<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>
145
				</td>
146
				<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
147
				<td><?php echo $arTaxShort[$arCalculation['shipping'][0]['tax_key']]; ?></td>
148
				<?php } ?>
149
				<td class="wpsg_cell_shipping_value wpsg_cell_gesamtpreis" colspan="2">
150
					<span id="wpsg_cell_shipping_value"><?php echo wpsg_ff($price_shipping); ?> </span>
151
					<?php echo $this->get_option('wpsg_currency'); ?>
152
				</td>
153
			</tr>
154
		<?php } ?>
155
 
156
		<?php // Zahlungskosten  ?>
157
		<?php $price_payment = $arCalculation['sum']['payment_'.$display]; ?>
158
		<?php if ($price_payment != 0 || $this->get_option('wpsg_hideemptypayment') != '1') { ?>
159
			<tr class="wpsg_row_payment">
160
				<td colspan="2" class="wpsg_cell_payment_label">
161
					<?php echo __('Zahlungsart', 'wpsg'); ?>
162
					<?php echo __('  ('.$this->arPayment[$arCalculation['payment'][0]['payment_key']]['name'].')', 'wpsg'); ?>
163
					<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>
164
				</td>
165
				<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
166
					<td><?php echo $arTaxShort[$arCalculation['payment'][0]['tax_key']]; ?></td>
167
				<?php } ?>
168
				<td class="wpsg_cell_payment_value wpsg_cell_gesamtpreis" colspan="2">
169
					<span id="wpsg_cell_payment_value"><?php echo wpsg_ff($price_payment); ?> </span>
170
					<?php echo $this->get_option('wpsg_currency'); ?>
171
				</td>
172
			</tr>
173
		<?php } ?>
174
 
175
		<?php // Rabatte  ?>
176
		<?php if (wpsg_isSizedArray($arCalculation['discount'])) { ?>
177
			<?php foreach ($arCalculation['discount'] as $d) { ?>
178
				<tr class="wpsg_row_discount wpsg_row_small">
179
					<td colspan="" class="wpsg_cell_mwst_label">
7179 daniel 180
 
7197 daniel 181
						<?php echo __('Rabatt', 'wpsg'); ?>
182
 
7179 daniel 183
						<?php if ($this->getBackendTaxView() === WPSG_BRUTTO) { ?>
184
							<?php echo __('(inkl. MwSt.)', 'wpsg'); ?>
185
						<?php } else { ?>
186
							<?php echo __('(zzgl. MwSt.)', 'wpsg'); ?>
187
						<?php } ?>
188
 
7197 daniel 189
						<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>
190
						<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>
191
 
192
					</td>
193
					<td class="wpsg_cell_preis">
194
 
7198 daniel 195
						<?php if (strpos($d['set'], '%') === false) { ?>
196
							<?php echo wpsg_ff($arCalculation['sum']['discount_'.$display], $this->get_option('wpsg_currency')); ?>
7197 daniel 197
						<?php } else { ?>
7198 daniel 198
							<?php echo wpsg_ff($d['set'], '%'); ?>
7197 daniel 199
						<?php } ?>
200
 
201
					</td>
202
					<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
203
						<td class="wpsg_cell_mwst"><?php echo $arTaxShort[$d['tax_key']]; ?></td>
204
					<?php } ?>
205
					<td></td>
206
					<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
207
						<?php echo wpsg_ff($arCalculation['sum']['discount_'.$display]); ?> <?php echo $this->get_option('wpsg_currency'); ?>
208
					</td>
209
				</tr>
210
			<?php } ?>
211
		<?php } ?>
212
 
213
		<?php if ($this->getBackendTaxView() === WPSG_NETTO) { ?>
214
 
215
			<tr class="wpsg_row_gesamt">
216
				<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
217
					<?php echo __('Summe', 'wpsg'); ?>
218
					<?php echo __('(zzgl. MwSt.)', 'wpsg'); ?>
7179 daniel 219
				</td>
7197 daniel 220
				<td class="wpsg_cell_gesamt_value wpsg_cell_gesamtpreis">
221
					<?php echo wpsg_ff($arCalculation['sum'][$display]); ?> <?php echo $this->get_option('wpsg_currency'); ?>
7179 daniel 222
				</td>
7197 daniel 223
			</tr>
224
			<?php foreach ($arCalculation['tax'] as $tax) { if ($tax['sum'] > 0 && $tax['key'] != '0') { ?>
225
				<tr class="wpsg_row_mwst wpsg_row_small">
226
					<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
227
						<?php echo wpsg_translate(__('zuzüglich MwSt. (#1#)', 'wpsg'), $arTax[$tax['key']]); ?>
228
					</td>
229
					<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
230
						<?php echo wpsg_ff($tax['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
231
					</td>
232
				</tr>
233
			<?php } } ?>
234
			<tr class="wpsg_row_gesamt">
235
				<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
236
					<strong><?php echo __('Gesamtsumme', 'wpsg'); ?></strong>
237
					<?php echo __('(inkl. MwSt.)', 'wpsg'); ?>
7179 daniel 238
				</td>
7197 daniel 239
				<td class="wpsg_cell_gesamt_value wpsg_cell_gesamtpreis">
240
					<strong><?php echo wpsg_ff($arCalculation['sum']['brutto']); ?> <?php echo $this->get_option('wpsg_currency'); ?></strong>
241
				</td>
7179 daniel 242
			</tr>
243
 
7197 daniel 244
		<?php } else { ?>
7173 daniel 245
 
7197 daniel 246
			<tr class="wpsg_row_gesamt">
247
				<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
248
					<strong><?php echo __('Gesamtsumme', 'wpsg'); ?></strong>
249
					<?php if ($this->getBackendTaxView() === WPSG_BRUTTO) { ?>
250
						<?php echo __('(inkl. MwSt.)', 'wpsg'); ?>
251
					<?php } else { ?>
252
						<?php echo __('(zzgl. MwSt.)', 'wpsg'); ?>
7179 daniel 253
					<?php } ?>
7197 daniel 254
				</td>
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>
258
			</tr>
259
			<?php foreach ($arCalculation['tax'] as $tax) { if ($tax['sum'] > 0 && $tax['key'] != '0') { ?>
260
				<tr class="wpsg_row_mwst wpsg_row_small">
261
					<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
262
						<?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
263
							<?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?>
264
						<?php } else { ?>
265
							<?php echo wpsg_translate(__('darin enthaltene MwSt. (#1#)', 'wpsg'), $arTax[$tax['key']]); ?>
266
						<?php } ?>
267
					</td>
268
					<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
269
						<?php echo wpsg_ff($tax['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
270
					</td>
271
				</tr>
272
			<?php } } ?>
273
 
274
		<?php } ?>
275
 
276
	</tbody>
277
</table>
278
 
279
<?php wpsg_debug($arCalculation); ?>