7173 |
daniel |
1 |
<?php
|
7179 |
daniel |
2 |
|
7173 |
daniel |
3 |
/**
|
|
|
4 |
* Template für die Produkttabelle im Backend der Bestellverwaltung
|
|
|
5 |
*/
|
|
|
6 |
|
|
|
7 |
$arCalculation = $this->view['oCalculation']->getCalculationArray($this->getBackendTaxView());
|
|
|
8 |
$arTax = $this->view['oCalculation']->getTaxLabelArray();
|
|
|
9 |
$arTaxShort = $this->view['oCalculation']->getTaxLabelArray(true);
|
7179 |
daniel |
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 |
|
|
|
16 |
?>
|
|
|
17 |
|
|
|
18 |
<style>
|
|
|
19 |
|
|
|
20 |
.wpsg_row_small td { font-size:0.8em; }
|
7179 |
daniel |
21 |
#wpsg-bs .wpsg_row_small .wpsg-glyphlink-td > span { margin-top:0px; }
|
7173 |
daniel |
22 |
|
|
|
23 |
</style>
|
|
|
24 |
|
|
|
25 |
<table class="wpsg_produkte table">
|
|
|
26 |
<tr class="wpsg_kopf">
|
|
|
27 |
<th class="wpsg_cell_name"><?php echo __('Produktname', 'wpsg'); ?></th>
|
|
|
28 |
<th class="wpsg_cell_preis"><?php echo __('Einzelpreis', 'wpsg'); ?></th>
|
|
|
29 |
<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
|
|
|
30 |
<th class="wpsg_cell_mwst"><?php echo __("MwSt.", "wpsg"); ?></th>
|
|
|
31 |
<?php } ?>
|
|
|
32 |
<th class="wpsg_cell_menge"><?php echo __("Anzahl", "wpsg"); ?></th>
|
|
|
33 |
<th class="wpsg_cell_gesamtpreis"><?php echo __("Gesamtpreis", "wpsg"); ?></th>
|
|
|
34 |
</tr>
|
|
|
35 |
<tr><td colspan="<?php echo $this->view['colspan'] + 1; ?>" style="line-height:2px; height:2px; background-color:#999999; padding:0px;"></td></tr>
|
|
|
36 |
<?php $i = 0; foreach ($arCalculation['products'] as $p) { $i ++; $product_price = $p['price']; ?>
|
|
|
37 |
<tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
|
|
|
38 |
<td class="wpsg_cell_name">
|
|
|
39 |
<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'); ?>">
|
|
|
40 |
<?php echo wpsg_hspc($this->getProductName($p['product_id'])); ?>
|
|
|
41 |
</a>
|
|
|
42 |
<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>
|
|
|
43 |
<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>
|
|
|
44 |
</td>
|
|
|
45 |
<td class="wpsg_cell_preis"><?php echo wpsg_ff($product_price); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
|
|
|
46 |
<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
|
|
|
47 |
<td class="wpsg_cell_mwst"><?php echo $arTaxShort[$p['tax_key']]; ?></td>
|
|
|
48 |
<?php } ?>
|
|
|
49 |
<td class="wpsg_cell_menge"><?php echo wpsg_hspc($p['amount']); ?></td>
|
|
|
50 |
<td class="wpsg_cell_gesamtpreis"><?php echo wpsg_ff($p['amount'] * $product_price); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
|
|
|
51 |
</tr>
|
|
|
52 |
<?php /* if (wpsg_isSizedArray($p['order_allowedshipping'])) { ?>
|
|
|
53 |
<tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
|
|
|
54 |
<td class="wpsg_cell_name">
|
|
|
55 |
<?php echo __('Mögliche Versandarten', 'wpsg'); ?>:
|
|
|
56 |
</td>
|
|
|
57 |
<td class="wpsg_cell_gesamtpreis" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?4:3); ?>">
|
|
|
58 |
<?php $j = 0; foreach ($p['order_allowedshipping'] as $shipping) { $j ++; ?>
|
|
|
59 |
<?php echo $this->getShippingName($shipping); ?><?php if ($j < sizeof($p['order_allowedshipping'])) { ?>, <?php } ?>
|
|
|
60 |
<?php } ?>
|
|
|
61 |
</td>
|
|
|
62 |
</tr>
|
|
|
63 |
<?php } */ ?>
|
|
|
64 |
<?php $this->callMods('order_view_row', array(&$p, $i)); ?>
|
|
|
65 |
<tr><td colspan="<?php echo $this->view['colspan'] + 1; ?>" style="line-height:2px; height:2px; background-color:#999999; padding:0px;"></td></tr>
|
|
|
66 |
<?php } ?>
|
7179 |
daniel |
67 |
|
|
|
68 |
<?php /* Gutscheine */ ?>
|
|
|
69 |
<?php if (wpsg_isSizedArray($arCalculation['voucher'])) { ?>
|
7173 |
daniel |
70 |
|
7179 |
daniel |
71 |
<?php foreach ($arCalculation['voucher'] as $v) { ?>
|
|
|
72 |
|
|
|
73 |
<tr class="wpsg_row_discount wpsg_row_small">
|
|
|
74 |
<td colspan="" class="wpsg_cell_mwst_label">
|
|
|
75 |
|
|
|
76 |
<div>
|
|
|
77 |
<?php echo __('Gutschein', 'wpsg'); ?>
|
|
|
78 |
|
|
|
79 |
<?php if ($this->getBackendTaxView() === WPSG_BRUTTO) { ?>
|
|
|
80 |
<?php echo __('(inkl. MwSt.)', 'wpsg'); ?>
|
|
|
81 |
<?php } else { ?>
|
|
|
82 |
<?php echo __('(zzgl. MwSt.)', 'wpsg'); ?>
|
|
|
83 |
<?php } ?>
|
|
|
84 |
|
|
|
85 |
<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>
|
|
|
86 |
<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>
|
|
|
87 |
</div>
|
|
|
88 |
<div>
|
|
|
89 |
Code: <?php echo $v['code']; ?>
|
|
|
90 |
</div>
|
|
|
91 |
|
|
|
92 |
</td>
|
|
|
93 |
<td class="wpsg_cell_preis">
|
|
|
94 |
<?php echo wpsg_ff($v['set'], $this->get_option('wpsg_currency'), true); ?>
|
|
|
95 |
</td>
|
|
|
96 |
<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
|
|
|
97 |
<td class="wpsg_cell_mwst"><?php echo $arTaxShort[$v['tax_key']]; ?></td>
|
|
|
98 |
<?php } ?>
|
|
|
99 |
<td>1</td>
|
|
|
100 |
<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
|
|
|
101 |
<?php echo wpsg_ff($arCalculation['sum']['voucher_display']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
|
|
|
102 |
</td>
|
|
|
103 |
</tr>
|
|
|
104 |
|
|
|
105 |
<?php } ?>
|
|
|
106 |
<tr><td colspan="<?php echo $this->view['colspan'] + 1; ?>" style="line-height:2px; height:2px; background-color:#999999; padding:0px;"></td></tr>
|
|
|
107 |
|
|
|
108 |
<?php } ?>
|
|
|
109 |
|
7173 |
daniel |
110 |
<tr class="wpsg_row_summe">
|
|
|
111 |
<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
|
|
|
112 |
|
|
|
113 |
<?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
|
|
|
114 |
|
|
|
115 |
<?php echo wpsg_translate(__('Summe (zzgl. #1#)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
|
|
|
116 |
|
|
|
117 |
<?php } else { ?>
|
|
|
118 |
|
|
|
119 |
<?php if ($this->get_option('wpsg_preisangaben') == WPSG_NETTO) { ?>
|
|
|
120 |
<?php echo wpsg_translate(__('Summe (zzgl. #1#, zzgl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
|
|
|
121 |
<?php } else { ?>
|
|
|
122 |
<?php echo wpsg_translate(__('Summe (zzgl. #1#, inkl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
|
|
|
123 |
<?php } ?>
|
|
|
124 |
|
|
|
125 |
<?php } ?>
|
|
|
126 |
|
|
|
127 |
</td>
|
|
|
128 |
<td class="wpsg_cell_summe_value wpsg_cell_gesamtpreis">
|
|
|
129 |
|
|
|
130 |
<?php echo wpsg_ff($arCalculation['sum']['product']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
|
|
|
131 |
|
|
|
132 |
</td>
|
|
|
133 |
</tr>
|
|
|
134 |
|
|
|
135 |
<?php /* Versandkosten */ ?>
|
|
|
136 |
<?php $price_shipping = $arCalculation['shipping']['price']; ?>
|
|
|
137 |
<?php if ($price_shipping != 0 || $this->get_option('wpsg_hideemptyshipping') != '1') { ?>
|
|
|
138 |
<tr class="wpsg_row_shipping">
|
|
|
139 |
<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_shipping_label">
|
|
|
140 |
<?php echo __('Versandkosten', 'wpsg'); ?>
|
|
|
141 |
<?php echo __(' ('.$this->arShipping[$arCalculation['shipping']['key']]['name'].')', 'wpsg'); ?>
|
|
|
142 |
<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>
|
|
|
143 |
</td>
|
|
|
144 |
<td class="wpsg_cell_shipping_value wpsg_cell_gesamtpreis">
|
|
|
145 |
<span id="wpsg_cell_shipping_value"><?php echo wpsg_ff($price_shipping); ?> </span>
|
|
|
146 |
<?php echo $this->get_option('wpsg_currency'); ?>
|
|
|
147 |
</td>
|
|
|
148 |
</tr>
|
|
|
149 |
<?php } ?>
|
|
|
150 |
|
|
|
151 |
<?php /* Zahlungskosten */ ?>
|
|
|
152 |
<?php $price_payment = $arCalculation['payment']['price']; ?>
|
|
|
153 |
<?php if ($price_payment != 0 || $this->get_option('wpsg_hideemptypayment') != '1') { ?>
|
|
|
154 |
<tr class="wpsg_row_payment">
|
|
|
155 |
<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_payment_label">
|
|
|
156 |
<?php echo __('Zahlungsart', 'wpsg'); ?>
|
|
|
157 |
<?php echo __(' ('.$this->arPayment[$arCalculation['payment']['key']]['name'].')', 'wpsg'); ?>
|
|
|
158 |
<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>
|
|
|
159 |
</td>
|
|
|
160 |
<td class="wpsg_cell_payment_value wpsg_cell_gesamtpreis" >
|
|
|
161 |
<span id="wpsg_cell_payment_value"><?php echo wpsg_ff($price_payment); ?> </span>
|
|
|
162 |
<?php echo $this->get_option('wpsg_currency'); ?>
|
|
|
163 |
</td>
|
|
|
164 |
</tr>
|
|
|
165 |
<?php } ?>
|
|
|
166 |
|
|
|
167 |
<?php if ($this->getBackendTaxView() === WPSG_NETTO && $this->get_option('wpsg_kleinunternehmer') != '1') { ?>
|
|
|
168 |
<?php foreach ($arCalculation['tax'] as $tax) { if ($tax['sum_tax'] > 0) { ?>
|
|
|
169 |
<tr class="wpsg_row_mwst">
|
|
|
170 |
<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
|
|
|
171 |
<?php echo wpsg_translate(__('zuzüglich MwSt. (#1#)', 'wpsg'), $arTax[$tax['key']]); ?>
|
|
|
172 |
</td>
|
|
|
173 |
<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
|
|
|
174 |
<?php echo wpsg_ff($tax['sum_tax']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
|
|
|
175 |
</td>
|
|
|
176 |
</tr>
|
|
|
177 |
<?php } } ?>
|
|
|
178 |
<?php } ?>
|
|
|
179 |
|
|
|
180 |
<?php /* Rabatte */ ?>
|
|
|
181 |
<?php if ($arCalculation['sum']['prediscount_netto'] !== $arCalculation['sum']['netto']) { ?>
|
|
|
182 |
<tr class="wpsg_row_discount">
|
|
|
183 |
<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
|
|
|
184 |
<?php echo __('Gesamtpreis', 'wpsg'); ?>
|
|
|
185 |
<?php if ($this->getBackendTaxView() === WPSG_BRUTTO) { ?>
|
|
|
186 |
<?php echo __('(abzgl. Rabatt, inkl. MwSt.)', 'wpsg'); ?>
|
|
|
187 |
<?php } else { ?>
|
|
|
188 |
<?php echo __('(abzgl. Rabatt, zzgl. MwSt.)', 'wpsg'); ?>
|
|
|
189 |
<?php } ?>
|
|
|
190 |
</td>
|
|
|
191 |
<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
|
|
|
192 |
<?php echo wpsg_ff($arCalculation['sum']['prediscount_display']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
|
|
|
193 |
</td>
|
|
|
194 |
</tr>
|
|
|
195 |
<?php foreach ($arCalculation['discount'] as $d) { ?>
|
|
|
196 |
<tr class="wpsg_row_discount wpsg_row_small">
|
|
|
197 |
<td colspan="" class="wpsg_cell_mwst_label">
|
7179 |
daniel |
198 |
<?php echo __('Rabatt', 'wpsg'); ?>
|
|
|
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 |
|
|
|
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 |
|
7173 |
daniel |
208 |
</td>
|
|
|
209 |
<td class="wpsg_cell_preis">
|
|
|
210 |
<?php echo wpsg_ff($d['set'], $this->get_option('wpsg_currency'), true); ?>
|
|
|
211 |
</td>
|
|
|
212 |
<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
|
|
|
213 |
<td class="wpsg_cell_mwst"><?php echo $arTaxShort[$d['tax_key']]; ?></td>
|
|
|
214 |
<?php } ?>
|
|
|
215 |
<td></td>
|
|
|
216 |
<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
|
|
|
217 |
<?php echo wpsg_ff($arCalculation['sum']['discount_display']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
|
|
|
218 |
</td>
|
|
|
219 |
</tr>
|
|
|
220 |
<?php } ?>
|
|
|
221 |
<?php } ?>
|
|
|
222 |
|
|
|
223 |
<tr class="wpsg_row_gesamt">
|
|
|
224 |
<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_gesamt_label">
|
|
|
225 |
<strong><?php echo __('Gesamtpreis', 'wpsg'); ?></strong>
|
|
|
226 |
<?php if ($this->getBackendTaxView() === WPSG_BRUTTO) { ?>
|
|
|
227 |
<?php echo __('(inkl. MwSt.)', 'wpsg'); ?>
|
|
|
228 |
<?php } else { ?>
|
|
|
229 |
<?php echo __('(zzgl. MwSt.)', 'wpsg'); ?>
|
|
|
230 |
<?php } ?>
|
|
|
231 |
</td>
|
|
|
232 |
<td class="wpsg_cell_gesamt_value wpsg_cell_gesamtpreis">
|
|
|
233 |
<strong><?php echo wpsg_ff($arCalculation['sum']['display']); ?> <?php echo $this->get_option('wpsg_currency'); ?></strong>
|
|
|
234 |
</td>
|
|
|
235 |
</tr>
|
|
|
236 |
|
|
|
237 |
<?php if ($this->get_option('wpsg_kleinunternehmer') == '1' || $this->getBackendTaxView() != WPSG_NETTO) { ?>
|
|
|
238 |
<?php foreach ($arCalculation['tax'] as $tax) { if ($tax['sum_tax'] > 0 && $tax['key'] != '0') { ?>
|
|
|
239 |
<tr class="wpsg_row_mwst wpsg_row_small">
|
|
|
240 |
<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
|
|
|
241 |
<?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
|
|
|
242 |
<?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?>
|
|
|
243 |
<?php } else { ?>
|
|
|
244 |
<?php echo wpsg_translate(__('darin enthaltene MwSt. (#1#)', 'wpsg'), $arTax[$tax['key']]); ?>
|
|
|
245 |
<?php } ?>
|
|
|
246 |
</td>
|
|
|
247 |
<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
|
|
|
248 |
<?php echo wpsg_ff($tax['sum_tax']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
|
|
|
249 |
</td>
|
|
|
250 |
</tr>
|
|
|
251 |
<?php } } ?>
|
|
|
252 |
<?php } ?>
|
7179 |
daniel |
253 |
</table>
|