1067 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für die Übersicht der Bestellungen
|
|
|
5 |
*/
|
6825 |
daniel |
6 |
|
7933 |
daniel |
7 |
$arPaymentKeySelect = [
|
|
|
8 |
'' => __('Alle Zahlungsarten', 'wpsg')
|
|
|
9 |
];
|
7932 |
daniel |
10 |
|
|
|
11 |
foreach ($this->getPaymentArray() as $payment_key => $payment) {
|
|
|
12 |
|
|
|
13 |
$arPaymentKeySelect[$payment_key] = $payment['name'];
|
|
|
14 |
|
|
|
15 |
}
|
7957 |
daniel |
16 |
|
1067 |
daniel |
17 |
?>
|
7934 |
daniel |
18 |
|
5637 |
daniel |
19 |
<div class="wpsg_order" id="wpsg-bs">
|
1116 |
daniel |
20 |
|
5637 |
daniel |
21 |
<nav class="navbar navbar-default">
|
|
|
22 |
<div class="container-fluid">
|
|
|
23 |
<div class="navbar-header">
|
6414 |
daniel |
24 |
|
5637 |
daniel |
25 |
<a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
|
6414 |
daniel |
26 |
<a class="glyphicon glyphicon-menu-hamburger wpsg-bs-toggle-nav visible-xs-block" data-toggle="collapse" data-target="#wpsg-bs-headermenu" href="#"></a>
|
|
|
27 |
|
5637 |
daniel |
28 |
</div>
|
6414 |
daniel |
29 |
<div class="collapse navbar-collapse" id="wpsg-bs-headermenu">
|
5637 |
daniel |
30 |
<ul class="nav navbar-nav">
|
6559 |
thomas |
31 |
<li role="presentation" class="<?php echo ((!isset($_REQUEST['action']))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order" onclick="return false;"><?php echo __("Bestellübersicht", "wpsg"); ?></a></li>
|
6825 |
daniel |
32 |
<li role="presentation" class="wpsg_showhide_filter wpsg-order-tab-a <?php echo (($this->view['hasFilter'] === true)?'active':''); ?>" id="wpsg-order-tab-0"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
|
5683 |
daniel |
33 |
<?php foreach ($this->view['tabs']['left'] as $k => $tab) { ?>
|
5896 |
daniel |
34 |
<li role="presentation" class="wpsg-order-tab-a wpsg-order-tab-mods" id="wpsg-order-tab-<?php echo $k; ?>"><a href="#" onclick="return false;"><span class="<?php echo $tab['tab_icon']; ?>"></span><?php echo $tab['tab_title']; ?></a></li>
|
5683 |
daniel |
35 |
<?php } ?>
|
7173 |
daniel |
36 |
<li role="presentation" class="wpsg-order-tab-a wpsg-order-tab-mods" id="wpsg-order-tab-add"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-plus"></span><?php echo __("Neue Bestellung", "wpsg"); ?></a></li>
|
5637 |
daniel |
37 |
</ul>
|
|
|
38 |
<ul class="nav navbar-nav navbar-right">
|
5683 |
daniel |
39 |
<?php foreach ($this->view['tabs']['right'] as $k => $tab) { ?>
|
5751 |
daniel |
40 |
<li role="presentation" class="wpsg-order-tab-mods" id="wpsg-order-tab-<?php echo $k; ?>"><a href="#" onclick="return false;"><span class="<?php echo $tab['tab_icon']; ?>"></span><?php echo $tab['tab_title']; ?></a></li>
|
5683 |
daniel |
41 |
<?php } ?>
|
5637 |
daniel |
42 |
</ul>
|
|
|
43 |
</div>
|
|
|
44 |
</div>
|
5683 |
daniel |
45 |
|
6825 |
daniel |
46 |
<div class="wpsg-filter wpsg-order-tab wpsg-order-tab-0 container-fluid form-horizontal" style="display:<?php echo (($this->view['hasFilter'] === true)?'block':'none'); ?>;">
|
5637 |
daniel |
47 |
<div class="row">
|
7229 |
daniel |
48 |
<div class="col-lg-5">
|
6142 |
hartmut |
49 |
<form method="post" id="filter_form" >
|
1116 |
daniel |
50 |
|
7561 |
daniel |
51 |
<?php echo wp_nonce_field('wpsg-order-search'); ?>
|
|
|
52 |
|
5751 |
daniel |
53 |
<input id="wpsg_seite" type="hidden" name="seite" value="<?php echo @$this->view['arFilter']['page']; ?>" class="current-page" />
|
|
|
54 |
<input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo @$this->view['arFilter']['order']; ?>" />
|
|
|
55 |
<input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo @$this->view['arFilter']['ascdesc']; ?>" />
|
1116 |
daniel |
56 |
|
5674 |
daniel |
57 |
<?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($this->view['arFilter']['s'])); ?>
|
5751 |
daniel |
58 |
<?php echo wpsg_drawForm_Input('filter[k_id]', __('Kunde (ID)', 'wpsg'), wpsg_getStr($this->view['arFilter']['k_id'])); ?>
|
7932 |
daniel |
59 |
<?php echo wpsg_drawForm_Select('filter[payment_key]', __('Zahlungsart', 'wpsg'), $arPaymentKeySelect, wpsg_getStr($this->view['arFilter']['payment_key'])); ?>
|
5751 |
daniel |
60 |
<?php echo wpsg_drawForm_Select('filter[status]', __('Bestellstatus', 'wpsg'), wpsg_array_merge(array('-1' => __('Alle', 'wpsg')), $this->arStatus), @$this->view['arFilter']['status']); ?>
|
7229 |
daniel |
61 |
|
|
|
62 |
<?php /* if ($this->hasMod('wpsg_mod_produktartikel')) { Vorbereitet aber Joins in wpsg_order nach den wp Ktegorien noch nicht umgesetzt! ?>
|
|
|
63 |
|
|
|
64 |
<?php $arCatSelect = []; $arCat = $this->callMod('wpsg_mod_produktartikel', 'getProductcategorySelect'); foreach ($arCat as $cat) $arCatSelect[$cat['term_id']] = $cat['label']; ?>
|
|
|
65 |
<?php echo wpsg_drawForm_Select('filter[cat_term_id]', __('Bestellungen mit Produkten aus Kategorie'), ['0' => __('Alle', 'wpsg')] + $arCatSelect, wpsg_getStr($this->view['arFilter']['cat_term_id'])); ?>
|
|
|
66 |
|
|
|
67 |
<?php } */ ?>
|
|
|
68 |
|
7269 |
daniel |
69 |
<?php if ($this->hasMod('wpsg_mod_productgroups') && $this->get_option('wpsg_mod_productgroups_order_filter') === '1') { ?>
|
7229 |
daniel |
70 |
|
|
|
71 |
<?php $arProductgroups = $this->callMod('wpsg_mod_productgroups', 'getAllProductGroups'); ?>
|
|
|
72 |
<?php echo wpsg_drawForm_Select('filter[productgroup_id]', __('Bestellungen mit Produkten aus Produktgruppe'), ['0' => __('Alle', 'wpsg')] + $arProductgroups, wpsg_getStr($this->view['arFilter']['productgroup_id'])); ?>
|
|
|
73 |
|
|
|
74 |
<?php } ?>
|
|
|
75 |
|
5674 |
daniel |
76 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
|
|
77 |
<div class="row">
|
|
|
78 |
<div class="col-lg-6">
|
|
|
79 |
<select name="filter[cdate_m]" class="form-control input-sm">
|
|
|
80 |
<option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
|
|
|
81 |
<?php for ($i = 1; $i <= 12; $i ++) { ?>
|
|
|
82 |
<option <?php echo ((wpsg_getStr($this->view['arFilter']['cdate_m']) == $i)?'selected="selected"':''); ?> value="<?php echo str_pad($i, 2, '0', STR_PAD_LEFT); ?>"><?php echo strftime("%B", mktime(0, 0, 0, $i, 1, 2000)); ?></option>
|
|
|
83 |
<?php } ?>
|
|
|
84 |
</select>
|
|
|
85 |
</div>
|
|
|
86 |
<div class="col-lg-6">
|
|
|
87 |
<select name="filter[cdate_y]" class="form-control input-sm">
|
|
|
88 |
<option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
|
|
|
89 |
<?php foreach ($this->view['cdate_years'] as $y) { ?>
|
|
|
90 |
<option <?php echo ((wpsg_getStr($this->view['arFilter']['cdate_y']) == $y)?'selected="selected"':''); ?> value="<?php echo $y; ?>"><?php echo $y; ?></option>
|
|
|
91 |
<?php } ?>
|
|
|
92 |
</select>
|
|
|
93 |
</div>
|
|
|
94 |
</div>
|
|
|
95 |
<?php echo wpsg_drawForm_TextEnd(__('Bestelldatum (Monat/Jahr)', 'wpsg'), array('noP' => true)); ?>
|
1899 |
daniel |
96 |
|
7787 |
daniel |
97 |
<?php if ($this->hasMod('wpsg_mod_rechnungen')) { ?>
|
|
|
98 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
|
|
99 |
<div class="row">
|
|
|
100 |
<div class="col-lg-6">
|
|
|
101 |
<select name="filter[invoicedate_m]" class="form-control input-sm">
|
|
|
102 |
<option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
|
|
|
103 |
<?php for ($i = 1; $i <= 12; $i ++) { ?>
|
|
|
104 |
<option <?php echo ((wpsg_getStr($this->view['arFilter']['invoicedate_m']) == $i)?'selected="selected"':''); ?> value="<?php echo str_pad($i, 2, '0', STR_PAD_LEFT); ?>"><?php echo strftime("%B", mktime(0, 0, 0, $i, 1, 2000)); ?></option>
|
|
|
105 |
<?php } ?>
|
|
|
106 |
</select>
|
|
|
107 |
</div>
|
|
|
108 |
<div class="col-lg-6">
|
|
|
109 |
<select name="filter[invoicedate_y]" class="form-control input-sm">
|
|
|
110 |
<option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
|
|
|
111 |
<?php foreach ($this->view['invoicedate_years'] as $y) { ?>
|
|
|
112 |
<option <?php echo ((wpsg_getStr($this->view['arFilter']['invoicedate_y']) == $y)?'selected="selected"':''); ?> value="<?php echo $y; ?>"><?php echo $y; ?></option>
|
|
|
113 |
<?php } ?>
|
|
|
114 |
</select>
|
|
|
115 |
</div>
|
|
|
116 |
</div>
|
|
|
117 |
<?php echo wpsg_drawForm_TextEnd(__('Rechnungsdatum (Monat/Jahr)', 'wpsg'), array('noP' => true)); ?>
|
|
|
118 |
<?php } ?>
|
5674 |
daniel |
119 |
|
6826 |
daniel |
120 |
<br />
|
|
|
121 |
|
|
|
122 |
<?php echo wpsg_drawForm_SubmitButton(__('Bestellungen suchen')); ?>
|
5674 |
daniel |
123 |
|
5637 |
daniel |
124 |
</form>
|
|
|
125 |
</div>
|
|
|
126 |
</div>
|
|
|
127 |
</div>
|
6425 |
daniel |
128 |
|
|
|
129 |
<?php foreach ($this->view['tabs'] as $tab_positions) { ?>
|
|
|
130 |
<?php foreach ($tab_positions as $k => $tab) { ?>
|
|
|
131 |
<div class="wpsg-order-tab-mods-content wpsg-filter-tab wpsg-order-tab-<?php echo $k ?>" style="display:none;"><?php echo $tab['tab_content']; ?></div>
|
|
|
132 |
<?php } ?>
|
|
|
133 |
<?php } ?>
|
7173 |
daniel |
134 |
|
|
|
135 |
<div class="wpsg-order-tab-add-content wpsg-order-tab-add" style="display:none;">
|
|
|
136 |
|
|
|
137 |
<div class="container-fluid form-horizontal">
|
|
|
138 |
<div class="row">
|
|
|
139 |
<div class="col-lg-4">
|
|
|
140 |
|
|
|
141 |
<form method="POST" id="add_form" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&subaction=add&noheader=1">
|
7561 |
daniel |
142 |
|
|
|
143 |
<?php echo wp_nonce_field('wpsg-order-add'); ?>
|
|
|
144 |
|
7173 |
daniel |
145 |
<br />
|
|
|
146 |
|
7787 |
daniel |
147 |
<?php echo wpsg_drawForm_Input('search_customer',__('Kunde (E-Mail oder Kundennummer)', 'wpsg'), wpsg_getStr($_REQUEST['search_customer'])); ?>
|
7173 |
daniel |
148 |
|
|
|
149 |
<br />
|
7216 |
daniel |
150 |
|
7301 |
florian |
151 |
<?php $arShippingSelect = []; foreach ($this->arShipping as $shipping_id => $shipping) if (!isset($shipping['active']) || $shipping['active'] === '1') $arShippingSelect[$shipping_id] = $shipping['name'].' ('.wpsg_ff(@$shipping['price']).')'; ?>
|
7787 |
daniel |
152 |
<?php echo wpsg_drawForm_Select('add_shipping', __('Versandart', 'wpsg'), $arShippingSelect, wpsg_getStr($_REQUEST['add_shipping'])); ?>
|
7173 |
daniel |
153 |
|
7787 |
daniel |
154 |
<?php $arPaymentSelect = []; foreach ($this->arPayment as $payment_id => $payment) if (!isset($payment['active']) || $payment['active'] === '1') $arPaymentSelect[$payment_id] = $payment['name'].' ('.wpsg_ff(wpsg_getStr($payment['price'])).')'; ?>
|
|
|
155 |
<?php echo wpsg_drawForm_Select('add_payment', __('Zahlungsart', 'wpsg'), $arPaymentSelect, wpsg_getStr($_REQUEST['add_payment'])); ?>
|
7173 |
daniel |
156 |
|
|
|
157 |
<br /><?php echo wpsg_drawForm_SubmitButton(__('Bestellung anlegen')); ?><br />
|
|
|
158 |
|
|
|
159 |
<script>
|
|
|
160 |
|
|
|
161 |
jQuery(document).ready(function() {
|
|
|
162 |
|
|
|
163 |
jQuery('#search_customer').autocomplete( {
|
|
|
164 |
source: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&subaction=autocomplete&noheader=1',
|
|
|
165 |
minLength: 2,
|
|
|
166 |
select: function(event, ui) {
|
|
|
167 |
|
|
|
168 |
jQuery('#search_customer').val(ui.item.id);
|
|
|
169 |
|
|
|
170 |
return false;
|
|
|
171 |
|
|
|
172 |
}
|
|
|
173 |
} );
|
|
|
174 |
|
|
|
175 |
jQuery('#add_form').on('submit', function() {
|
|
|
176 |
|
|
|
177 |
if (jQuery.trim(jQuery('#search_customer').val()) === '') {
|
|
|
178 |
|
|
|
179 |
alert('<?php echo __('Bitte einen Kunden angeben.', 'wpsg'); ?>');
|
|
|
180 |
|
|
|
181 |
return false;
|
|
|
182 |
|
|
|
183 |
}
|
|
|
184 |
|
|
|
185 |
} );
|
|
|
186 |
|
|
|
187 |
} );
|
|
|
188 |
|
|
|
189 |
</script>
|
|
|
190 |
|
|
|
191 |
</form>
|
|
|
192 |
|
|
|
193 |
</div>
|
|
|
194 |
</div>
|
|
|
195 |
</div>
|
|
|
196 |
|
|
|
197 |
</div>
|
|
|
198 |
|
6425 |
daniel |
199 |
</nav>
|
6503 |
daniel |
200 |
|
|
|
201 |
<div class="wpsg_msg_wrap"><hr class="wp-header-end wpsg-wp-header-end"/></div>
|
7269 |
daniel |
202 |
|
|
|
203 |
<?php if ($this->hasMod('wpsg_mod_productgroups') && $this->get_option('wpsg_mod_productgroups_order_filter') === '1') { $arPG = $this->callMod('wpsg_mod_productgroups', 'getAllProductGroups', [true]); ?>
|
1899 |
daniel |
204 |
|
7270 |
daniel |
205 |
<?php if (wpsg_isSizedArray($arPG)) { ?>
|
7269 |
daniel |
206 |
<div class="container-fluid">
|
|
|
207 |
<div class="row">
|
|
|
208 |
<div class="pagination_wrap wpsg_status_link_wrap">
|
|
|
209 |
|
|
|
210 |
<ul class="pagination">
|
|
|
211 |
<?php foreach ($arPG as $pg_id => $pg_name) { ?>
|
|
|
212 |
<li class="<?php echo ((wpsg_getStr($this->view['arFilter']['productgroup_id']) == $pg_id)?'active':''); ?>"><a href="#" onclick="return wpsg_setFilterProductgroup('<?php echo $pg_id; ?>');"><?php echo $pg_name; ?></a></li>
|
|
|
213 |
<?php } ?>
|
|
|
214 |
</ul>
|
|
|
215 |
|
|
|
216 |
</div>
|
|
|
217 |
</div>
|
|
|
218 |
</div>
|
7270 |
daniel |
219 |
<?php } ?>
|
7269 |
daniel |
220 |
|
|
|
221 |
<?php } ?>
|
|
|
222 |
|
5674 |
daniel |
223 |
<div class="pagination_wrap wpsg_status_link_wrap">
|
1899 |
daniel |
224 |
|
5674 |
daniel |
225 |
<ul class="pagination">
|
5637 |
daniel |
226 |
<?php foreach ($this->view['arStatus'] as $status_key => $status_info) { ?>
|
5674 |
daniel |
227 |
<li class="<?php echo ((wpsg_getStr($this->view['arFilter']['status']) == $status_key)?'active':''); ?>"><a href="#" onclick="return wpsg_setFilterStatus('<?php echo $status_key; ?>');"><?php echo wpsg_translate(__('#1# <span>(#2#)<span>', 'wpsg'), $status_info['label'], $status_info['count']); ?></a></li>
|
5637 |
daniel |
228 |
<?php } ?>
|
|
|
229 |
</ul>
|
1899 |
daniel |
230 |
|
5637 |
daniel |
231 |
</div>
|
1899 |
daniel |
232 |
|
6444 |
daniel |
233 |
<?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
|
1116 |
daniel |
234 |
|
5674 |
daniel |
235 |
<div class="wpsg_clear"></div>
|
|
|
236 |
|
5637 |
daniel |
237 |
<div class="content">
|
8069 |
daniel |
238 |
<form method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1" enctype="multipart/form-data" id="order_form">
|
2875 |
daniel |
239 |
|
5674 |
daniel |
240 |
<?php if (is_array($this->view['arData']) && sizeof($this->view['arData']) > 0) { ?>
|
1228 |
daniel |
241 |
|
5753 |
daniel |
242 |
<table class="table table-bordered table-hover table-striped wpsg-table-order">
|
|
|
243 |
<thead>
|
|
|
244 |
<tr>
|
|
|
245 |
<th class="col_checkbox"><input type="checkbox" onclick="return wpsg_order_checkAll();" /></th>
|
|
|
246 |
<th class="col_nr wpsg_order" data-order="cdate"><?php echo __('Nr', 'wpsg'); ?></th>
|
|
|
247 |
<th class="col_customer wpsg_order" data-order="customer"><?php echo __('Kunde', 'wpsg'); ?></th>
|
|
|
248 |
<th class="col_payment wpsg_order" data-order="payment"><?php echo __('Bezahlmethode', 'wpsg'); ?></th>
|
|
|
249 |
<th class="col_shipping wpsg_order" data-order="shipping"><?php echo __('Versandart', 'wpsg'); ?></th>
|
|
|
250 |
<th class="col_products wpsg_order" data-order="products"><?php echo __('Produkte', 'wpsg'); ?></th>
|
|
|
251 |
<th class="col_sum wpsg_order" data-order="amount"><?php echo __('Bestellwert', 'wpsg'); ?></th>
|
|
|
252 |
<th class="col_state wpsg_order" data-order="state"><?php echo __('Status', 'wpsg'); ?></th>
|
|
|
253 |
</tr>
|
|
|
254 |
</thead>
|
|
|
255 |
<tbody>
|
|
|
256 |
<?php foreach ($this->view['arData'] as $oOrder) { ?>
|
|
|
257 |
<tr>
|
|
|
258 |
<td class="col_checkbox">
|
5674 |
daniel |
259 |
|
7932 |
daniel |
260 |
<input class="col_set_checkbox" data-order_id="<?php echo $oOrder->id; ?>" name="wpsg_multido[<?php echo $oOrder->id; ?>]" type="checkbox" />
|
5674 |
daniel |
261 |
|
5753 |
daniel |
262 |
</td>
|
|
|
263 |
<td class="col_nr">
|
5674 |
daniel |
264 |
|
5753 |
daniel |
265 |
<?php echo $oOrder->getNr(); ?> <span class="wpsg_grey"><?php echo wpsg_formatTimestamp(strtotime($oOrder->cdate), false); ?></span><br />
|
5674 |
daniel |
266 |
|
5753 |
daniel |
267 |
<div class="actions">
|
7561 |
daniel |
268 |
<span class="view"><a title="<?php echo __("Diese Bestellung ansehen", "wpsg"); ?>" href="<?php
|
|
|
269 |
|
|
|
270 |
echo wpsg_admin_url('Order', 'view', ['edit_id' => $oOrder->getId()]);
|
|
|
271 |
|
|
|
272 |
?>"><?php echo __("Ansehen", "wpsg"); ?></a></span>
|
5753 |
daniel |
273 |
|
|
7561 |
daniel |
274 |
<span class="storno"><a onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass Sie diese Bestellung stornieren möchten?', 'wpsg'); ?>');" title="<?php echo __("Diese Bestellung stornieren", "wpsg"); ?>" href="<?php
|
|
|
275 |
|
|
|
276 |
echo wpsg_admin_url('Order', 'storno', ['edit_id' => $oOrder->getId()], ['noheader' => '1']);
|
|
|
277 |
|
|
|
278 |
?>"><?php echo __("Stornieren", "wpsg"); ?></a></span>
|
5753 |
daniel |
279 |
|
|
7561 |
daniel |
280 |
<span class="delete"><a onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass Sie diese Bestellung löschen möchten?', 'wpsg'); ?>');" title="<?php echo __('Diese Bestellung löschen', 'wpsg'); ?>" href="<?php
|
|
|
281 |
|
|
|
282 |
echo wpsg_admin_url('Order', 'delete', ['edit_id' => $oOrder->getId()], ['noheader' => '1']);
|
|
|
283 |
|
|
|
284 |
?>"><?php echo __('Löschen', 'wpsg'); ?></a></span>
|
5753 |
daniel |
285 |
</div>
|
5674 |
daniel |
286 |
|
5753 |
daniel |
287 |
<?php if (trim($oOrder->admincomment) != "") { ?>
|
6005 |
hartmut |
288 |
<a title="<?php echo __("Kommentar (Admin): ", "wpsg").htmlspecialchars($oOrder->admincomment); ?>" onclick="return false;" class="glyphicon glyphicon-question-sign admincomment" href="#"></a>
|
5753 |
daniel |
289 |
<?php } ?>
|
5674 |
daniel |
290 |
|
5753 |
daniel |
291 |
<?php if (trim($oOrder->comment) != "") { ?>
|
6005 |
hartmut |
292 |
<a title="<?php echo __("Kommentar (Kunde): ", "wpsg").htmlspecialchars($oOrder->comment); ?>" onclick="return false;" class="glyphicon glyphicon-question-sign customercomment" href="#"></a>
|
5753 |
daniel |
293 |
<?php } ?>
|
5674 |
daniel |
294 |
|
5753 |
daniel |
295 |
<?php if ($oOrder->hasShippingAdress()) { ?>
|
|
|
296 |
<a title="<?php echo __("Lieferadresse beachten", "wpsg"); ?>" onclick="return false;" class="glyphicon glyphicon-map-marker shippingadress" href="#"></a>
|
|
|
297 |
<?php } ?>
|
5674 |
daniel |
298 |
|
5753 |
daniel |
299 |
<?php if ($this->hasMod('wpsg_mod_abo')) { ?>
|
6830 |
daniel |
300 |
|
6834 |
daniel |
301 |
<?php if ($this->callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id)) === 1) { ?>
|
|
|
302 |
<?php echo __('Abo Bestellung', 'wpsg'); ?>
|
|
|
303 |
<?php } else if ($this->callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id)) === 2) { ?>
|
6830 |
daniel |
304 |
|
5753 |
daniel |
305 |
<?php
|
5674 |
daniel |
306 |
|
5753 |
daniel |
307 |
$origin_order_id = $this->callMod('wpsg_mod_abo', 'getOriginOrder', array($oOrder->id));
|
|
|
308 |
$origin_order_data = $this->cache->loadOrder($origin_order_id);
|
5674 |
daniel |
309 |
|
7985 |
daniel |
310 |
//wpsg_debug($oOrder->id.":".$origin_order_id);
|
|
|
311 |
|
5753 |
daniel |
312 |
?>
|
|
|
313 |
<?php echo wpsg_translate(__('Verlängerung zu Bestellung <a href="#1#">#2#</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=view&edit_id='.$origin_order_id, $origin_order_data['onr']); ?>
|
6830 |
daniel |
314 |
|
5753 |
daniel |
315 |
<?php } ?>
|
6830 |
daniel |
316 |
|
|
|
317 |
<?php } ?>
|
5753 |
daniel |
318 |
|
5674 |
daniel |
319 |
</td>
|
5753 |
daniel |
320 |
<td class="col_customer">
|
6081 |
hartmut |
321 |
<?php $firma = $oOrder->getInvoiceCompany(); if (wpsg_isSizedString($firma)) { ?>
|
5753 |
daniel |
322 |
<?php echo $firma; ?><br />
|
|
|
323 |
<?php } ?>
|
6081 |
hartmut |
324 |
<?php echo $oOrder->getInvoiceTitle(); ?> <?php echo $oOrder->getInvoiceFirstname(); ?> <?php echo $oOrder->getInvoiceName(); ?>
|
5753 |
daniel |
325 |
<br />
|
6081 |
hartmut |
326 |
<span class="wpsg_grey"><?php echo $oOrder->getInvoiceStreet(); ?><br />
|
|
|
327 |
<?php echo ltrim($oOrder->getInvoiceZip().' '.$oOrder->getInvoiceCity()); ?> <?php echo $oOrder->getInvoiceCountryKuerzel(); ?>
|
5753 |
daniel |
328 |
</span>
|
|
|
329 |
</td>
|
|
|
330 |
<td class="col_payment">
|
5674 |
daniel |
331 |
|
5753 |
daniel |
332 |
<?php /* Bei Crefopay wird die Darstellung der Zahlungsart über das Modul geregelt */ ?>
|
|
|
333 |
<?php if ($oOrder->getPaymentID() == 4000 && $this->hasMod('wpsg_mod_crefopay')) { ?>
|
|
|
334 |
<?php echo wpsg_hspc($this->callMod('wpsg_mod_crefopay', 'getOrderPaymentName', array($oOrder->id))); ?>
|
|
|
335 |
<?php } else { ?>
|
|
|
336 |
<?php echo $oOrder->getPaymentLabel(); ?>
|
|
|
337 |
<?php } ?>
|
5674 |
daniel |
338 |
|
5753 |
daniel |
339 |
<?php if ($oOrder->getPaymentAmount() > 0) { ?>
|
|
|
340 |
- <?php echo wpsg_ff($oOrder->getPaymentAmount(), $this->get_option('wpsg_currency')); ?>
|
|
|
341 |
<?php } ?>
|
5674 |
daniel |
342 |
|
5753 |
daniel |
343 |
</td>
|
|
|
344 |
<td class="col_shipping">
|
5674 |
daniel |
345 |
|
5753 |
daniel |
346 |
<?php echo $oOrder->getShippingLabel(); ?>
|
5674 |
daniel |
347 |
|
5753 |
daniel |
348 |
<?php if ($oOrder->getShippingAmount() > 0) { ?>
|
|
|
349 |
- <?php echo wpsg_ff($oOrder->getShippingAmount(), $this->get_option('wpsg_currency')); ?>
|
|
|
350 |
<?php } ?>
|
5674 |
daniel |
351 |
|
5753 |
daniel |
352 |
<?php if ($oOrder->hasShippingAdress()) { ?>
|
|
|
353 |
<br />
|
6149 |
hartmut |
354 |
<?php echo $oOrder->getShippingTitle(); ?> <?php echo $oOrder->getShippingFirstName(); ?> <?php echo $oOrder->getShippingName(); ?><br />
|
5753 |
daniel |
355 |
<span class="wpsg_grey">
|
|
|
356 |
<?php echo $oOrder->getShippingStreet(); ?>
|
|
|
357 |
<?php echo $oOrder->getShippingZip(); ?> <?php echo $oOrder->getShippingCity(); ?> <?php echo $oOrder->getShippingCountryKuerzel(); ?><br />
|
5794 |
thomas |
358 |
</span>
|
5753 |
daniel |
359 |
<?php } ?>
|
5674 |
daniel |
360 |
|
5753 |
daniel |
361 |
</td>
|
|
|
362 |
<td class="col_products">
|
5674 |
daniel |
363 |
|
6834 |
daniel |
364 |
<?php $oOrderProducts = $oOrder->getOrderProducts(); ?>
|
|
|
365 |
|
7812 |
daniel |
366 |
<?php foreach ($oOrderProducts as $oOrderProduct) {
|
|
|
367 |
|
|
|
368 |
$product_id = $oOrderProduct->getProductId();
|
|
|
369 |
$oAbo = null;
|
|
|
370 |
|
|
|
371 |
if ($this->hasMod('wpsg_mod_abo')) {
|
|
|
372 |
|
|
|
373 |
try { $oAbo = wpsg_abo::getFromOrderAndOrderProduct($oOrder->getId(), $oOrderProduct->getId()); } catch (\Exception $e) { }
|
|
|
374 |
|
|
|
375 |
}
|
|
|
376 |
|
|
|
377 |
?>
|
7867 |
daniel |
378 |
|
|
|
379 |
<?php
|
|
|
380 |
|
|
|
381 |
echo wpsg_translate(__('#1# x <a href="#2#">#3#</a> für je #4#', 'wpsg'),
|
|
|
382 |
$oOrderProduct->getCount(),
|
|
|
383 |
wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id='.$oOrderProduct->getProductId(), 'wpsg-product-edit-'.wpsg_getInt($product_id)),
|
|
|
384 |
$oOrderProduct->getProductName(),
|
|
|
385 |
wpsg_ff($oOrderProduct->getOneAmount(), $this->get_option('wpsg_currency'))
|
|
|
386 |
);
|
|
|
387 |
|
|
|
388 |
?><br />
|
6834 |
daniel |
389 |
|
7812 |
daniel |
390 |
<?php if ($oAbo !== null) { ?>
|
|
|
391 |
|
|
|
392 |
<?php
|
|
|
393 |
|
|
|
394 |
$state = $oAbo->getState();
|
|
|
395 |
|
|
|
396 |
echo __('Abo Laufzeit:', 'wpsg');
|
|
|
397 |
|
|
|
398 |
?>
|
6834 |
daniel |
399 |
|
7812 |
daniel |
400 |
<?php if ($state === wpsg_abo::STATE_INEXTENSION) { ?><span style="color:orange;"><?php echo $oAbo->getStateLabel(); ?></span>
|
|
|
401 |
<?php } else if ($state === wpsg_abo::STATE_RUNNING) { ?><span style="color:green;"><?php echo $oAbo->getStateLabel(); ?></span>
|
|
|
402 |
<?php } else if ($state === wpsg_abo::STATE_EXTEND) { ?><span style="color:red;"><?php echo $oAbo->getStateLabel(); ?></span><?php } ?>
|
|
|
403 |
|
|
|
404 |
<br />
|
6834 |
daniel |
405 |
|
|
|
406 |
<?php } ?>
|
|
|
407 |
|
5753 |
daniel |
408 |
<?php } ?>
|
5674 |
daniel |
409 |
|
5753 |
daniel |
410 |
</td>
|
|
|
411 |
<td class="col_sum">
|
|
|
412 |
<?php echo wpsg_ff($oOrder->getAmount(), $this->get_option('wpsg_currency')); ?>
|
|
|
413 |
</td>
|
|
|
414 |
<td class="col_state">
|
|
|
415 |
<?php echo $oOrder->getStateLabel(); ?>
|
|
|
416 |
</td>
|
|
|
417 |
</tr>
|
|
|
418 |
<?php } ?>
|
|
|
419 |
</tbody>
|
|
|
420 |
</table>
|
5674 |
daniel |
421 |
|
5753 |
daniel |
422 |
<div class="alignleft actions">
|
|
|
423 |
<select name="wpsg_action" id="wpsg_action">
|
|
|
424 |
<option value="-1"><?php echo __('Aktion wählen', 'wpsg'); ?></option>
|
|
|
425 |
<?php foreach ($this->arStatus as $k => $status) { ?>
|
|
|
426 |
<option value="<?php echo $k; ?>"><?php echo wpsg_translate(__('Status auf "#1#" setzen.', 'wpsg'), $status); ?></option>
|
|
|
427 |
<?php } ?>
|
|
|
428 |
<option value="multiDelete"><?php echo __('Bestellungen löschen', 'wpsg'); ?></option>
|
|
|
429 |
<?php if ($this->hasMod('wpsg_mod_rechnungen')) { ?>
|
|
|
430 |
<option value="writeRechnung"><?php echo __('Rechnung schreiben', 'wpsg'); ?></option>
|
8068 |
karl |
431 |
<?php if ($this->view['arFilter']['k_id'] != '') { ?>
|
|
|
432 |
<option value="writeMultiRechnung"><?php echo __('Sammelrechnung schreiben', 'wpsg'); ?></option>
|
|
|
433 |
<?php } ?>
|
5753 |
daniel |
434 |
<option value="showRechnung"><?php echo __('Rechnung ansehen', 'wpsg'); ?></option>
|
|
|
435 |
<?php } ?>
|
7932 |
daniel |
436 |
<?php if ($this->hasMod('wpsg_mod_kundenkontakt')) { ?>
|
|
|
437 |
<option value="customercontact"><?php echo __('Kunden informieren', 'wpsg') ;?></option>
|
|
|
438 |
<?php } ?>
|
5753 |
daniel |
439 |
</select>
|
5674 |
daniel |
440 |
|
5753 |
daniel |
441 |
<input onclick="if (jQuery('#wpsg_action').val() == 'multiDelete') { if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false; }" type="submit" value="<?php echo __('Ausführen', 'wpsg'); ?>" class="button-secondary action" id="doaction" name="wpsg_order_doaction" />
|
5674 |
daniel |
442 |
|
7932 |
daniel |
443 |
<div id="customer_inform" style="display:none;">
|
|
|
444 |
<label class="mr-4 font-normal">
|
|
|
445 |
<input class="mt-0 mr-2" type="checkbox" name="inform" value="1" /> <?php echo __('Kunden informieren', 'wpsg'); ?>
|
|
|
446 |
</label>
|
|
|
447 |
</div>
|
|
|
448 |
|
|
|
449 |
<script>
|
|
|
450 |
|
|
|
451 |
let el_customer_inform = document.getElementById('customer_inform');
|
|
|
452 |
|
|
|
453 |
document.getElementById('wpsg_action').addEventListener('change', (event) => {
|
8069 |
daniel |
454 |
|
7932 |
daniel |
455 |
if (parseInt(event.target.value) >= 0) {
|
|
|
456 |
|
|
|
457 |
el_customer_inform.style.display = 'inline-block';
|
|
|
458 |
|
|
|
459 |
} else {
|
|
|
460 |
|
|
|
461 |
el_customer_inform.style.display = 'none';
|
|
|
462 |
|
|
|
463 |
}
|
|
|
464 |
|
8069 |
daniel |
465 |
let el_doaction = document.getElementById('doaction');
|
|
|
466 |
|
|
|
467 |
if (event.target.value === 'writeMultiRechnung') {
|
|
|
468 |
|
|
|
469 |
el_doaction.style.display = 'none';
|
|
|
470 |
|
|
|
471 |
} else {
|
|
|
472 |
|
|
|
473 |
el_doaction.style.display = 'block';
|
|
|
474 |
|
|
|
475 |
}
|
|
|
476 |
|
7932 |
daniel |
477 |
});
|
|
|
478 |
|
|
|
479 |
</script>
|
8068 |
karl |
480 |
|
|
|
481 |
<div class="multiRechnung_tab" id="multiRechnung_inform" style="display:none;">
|
|
|
482 |
<br />
|
|
|
483 |
<input type="checkbox" name="wpsg_Multirechnung_sendmail" value="1" id="invoice_sendmail" />
|
|
|
484 |
<label for="invoice_sendmail"><?php echo __('E-Mail an Kunden senden', 'wpsg'); ?></label>
|
|
|
485 |
<input type="email" name="wpsg_Multirechnung_email" value="" />
|
|
|
486 |
<br />
|
|
|
487 |
<input type="checkbox" name="wpsg_Multirechnung_faelligkeit" value="1" id="invoice_faelligkeit" />
|
|
|
488 |
<label for="invoice_faelligkeit"><?php echo __('Fälligkeit anzeigen', 'wpsg'); ?></label>
|
|
|
489 |
<input type="date" name="wpsg_Multirechnung_faelligkeitsdatum" value="<?php echo date('Y-m-d'); ?>" />
|
|
|
490 |
<br />
|
|
|
491 |
<input type="checkbox" name="wpsg_Multirechnung_shippay" value="1" id="invoice_shippay"/>
|
|
|
492 |
<label for="invoice_shippay"><?php echo __('Versand-/Zahlungskosten abrechnen', 'wpsg'); ?></label>
|
|
|
493 |
<br />
|
|
|
494 |
<input type="checkbox" name="wpsg_Multirechnung_url" value="1" id="invoice_url" />
|
|
|
495 |
<label for="invoice_url"><?php echo __('URL Benachrichtigung', 'wpsg'); ?></label>
|
|
|
496 |
<br />
|
|
|
497 |
<label for="invoice_date"><?php echo __('Rechnungsdatum', 'wpsg') ;?></label>
|
|
|
498 |
<input type="date" value="<?php echo date('Y-m-d'); ?>" name="wpsg_Multirechnung_datum" id="invoice_date" />
|
8069 |
daniel |
499 |
|
|
|
500 |
<br />
|
|
|
501 |
|
|
|
502 |
<input type="hidden" name="preview" id="wpsg_mod_rechnungen_preview" />
|
|
|
503 |
|
|
|
504 |
<input type="submit" name="wpsg_order_doaction" value="<?php echo _('Vorschau'); ?>" id="wpsg_mod_rechnungen_button_preview" />
|
|
|
505 |
<input type="submit" name="wpsg_order_doaction" value="<?php echo _('Erstellen'); ?>" id="wpsg_mod_rechnungen_button_submit" />
|
|
|
506 |
|
|
|
507 |
<script>
|
|
|
508 |
|
|
|
509 |
let el_order_form = document.getElementById('order_form');
|
|
|
510 |
|
|
|
511 |
document.getElementById('wpsg_mod_rechnungen_button_preview').addEventListener('click', () => {
|
|
|
512 |
|
|
|
513 |
el_order_form.setAttribute('target', '_blank');
|
|
|
514 |
document.getElementById('wpsg_mod_rechnungen_preview').value = '1';
|
|
|
515 |
|
|
|
516 |
} );
|
|
|
517 |
|
|
|
518 |
document.getElementById('wpsg_mod_rechnungen_button_submit').addEventListener('click', () => {
|
|
|
519 |
|
|
|
520 |
el_order_form.setAttribute('target', '');
|
|
|
521 |
document.getElementById('wpsg_mod_rechnungen_preview').value = '0';
|
|
|
522 |
|
|
|
523 |
} );
|
|
|
524 |
|
|
|
525 |
</script>
|
|
|
526 |
|
8068 |
karl |
527 |
</div>
|
|
|
528 |
|
|
|
529 |
<script>
|
|
|
530 |
|
|
|
531 |
let el_multiRechnung_inform = document.getElementById('multiRechnung_inform');
|
|
|
532 |
|
|
|
533 |
document.getElementById('wpsg_action').addEventListener('change', (event) => {
|
|
|
534 |
|
|
|
535 |
if (event.target.value === 'writeMultiRechnung') {
|
|
|
536 |
|
|
|
537 |
el_multiRechnung_inform.style.display = 'block';
|
|
|
538 |
|
|
|
539 |
} else {
|
|
|
540 |
|
|
|
541 |
el_multiRechnung_inform.style.display = 'none';
|
|
|
542 |
|
|
|
543 |
}
|
|
|
544 |
|
|
|
545 |
});
|
8069 |
daniel |
546 |
|
8068 |
karl |
547 |
</script>
|
7932 |
daniel |
548 |
|
5753 |
daniel |
549 |
</div>
|
5674 |
daniel |
550 |
|
6444 |
daniel |
551 |
<div style="margin-right:-15px;">
|
|
|
552 |
<?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
|
|
|
553 |
</div>
|
5674 |
daniel |
554 |
|
5753 |
daniel |
555 |
<div class="wpsg_clear"></div>
|
5674 |
daniel |
556 |
|
5753 |
daniel |
557 |
<?php $this->callMod('wpsg_mod_export', 'produkt_index_foot'); ?>
|
5674 |
daniel |
558 |
|
5753 |
daniel |
559 |
<?php } else { ?>
|
5674 |
daniel |
560 |
|
5753 |
daniel |
561 |
<?php echo wpsg_drawForm_AdminboxStart(); ?>
|
|
|
562 |
<?php echo __('Keine Bestellungen in der Datenbank.', 'wpsg'); ?>
|
|
|
563 |
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
|
|
|
564 |
|
5637 |
daniel |
565 |
<?php } ?>
|
6144 |
hartmut |
566 |
<input id="noheader1" type="hidden" name="noheader1" value="1" />
|
|
|
567 |
</form>
|
5637 |
daniel |
568 |
</div>
|
7932 |
daniel |
569 |
|
|
|
570 |
<?php if ($this->hasMod('wpsg_mod_kundenkontakt')) { $this->callMod('wpsg_mod_kundenkontakt', 'order_index_bottom'); } ?>
|
1228 |
daniel |
571 |
|
7932 |
daniel |
572 |
<script>
|
1228 |
daniel |
573 |
|
5674 |
daniel |
574 |
<?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
|
5751 |
daniel |
575 |
jQuery('th[data-order="<?php echo @$this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower(@$this->view['arFilter']['ascdesc']); ?>');
|
5674 |
daniel |
576 |
<?php } ?>
|
1428 |
daniel |
577 |
|
5674 |
daniel |
578 |
function wpsg_order_checkAll()
|
|
|
579 |
{
|
|
|
580 |
|
|
|
581 |
jQuery('.col_set_checkbox').each(function() { jQuery(this).prop('checked', !jQuery(this).prop('checked')); } );
|
|
|
582 |
|
|
|
583 |
}
|
7269 |
daniel |
584 |
|
|
|
585 |
<?php if ($this->hasMod('wpsg_mod_productgroups') && $this->get_option('wpsg_mod_productgroups_order_filter') === '1') { ?>
|
|
|
586 |
function wpsg_setFilterProductgroup(pgroup_id) {
|
5674 |
daniel |
587 |
|
7269 |
daniel |
588 |
jQuery('#filterproductgroup_id').val(pgroup_id);
|
|
|
589 |
|
|
|
590 |
jQuery('#seite').val(1);
|
8040 |
karl |
591 |
jQuery('#filter_form').trigger('submit');
|
7269 |
daniel |
592 |
|
|
|
593 |
return false;
|
|
|
594 |
|
|
|
595 |
}
|
|
|
596 |
<?php } ?>
|
|
|
597 |
|
5674 |
daniel |
598 |
function wpsg_setFilterStatus(state)
|
5637 |
daniel |
599 |
{
|
1428 |
daniel |
600 |
|
5674 |
daniel |
601 |
jQuery('#filterstatus').val(state);
|
1428 |
daniel |
602 |
|
5674 |
daniel |
603 |
jQuery('#seite').val(1);
|
8040 |
karl |
604 |
jQuery('#filter_form').trigger('submit');
|
1428 |
daniel |
605 |
|
5637 |
daniel |
606 |
return false;
|
1428 |
daniel |
607 |
|
5674 |
daniel |
608 |
}
|
1428 |
daniel |
609 |
|
5674 |
daniel |
610 |
function goPage(page)
|
5637 |
daniel |
611 |
{
|
1116 |
daniel |
612 |
|
6152 |
thomas |
613 |
//if (page <= 0 || page == <?php echo $this->view['arFilter']['page']; ?> || page > <?php echo wpsg_getStr($this->view['pages'], '0'); ?>) return;
|
1067 |
daniel |
614 |
|
5674 |
daniel |
615 |
jQuery('#wpsg_seite').val(page);
|
8040 |
karl |
616 |
jQuery('#filter_form').trigger('submit');
|
2755 |
daniel |
617 |
|
5637 |
daniel |
618 |
return false;
|
1924 |
daniel |
619 |
|
5674 |
daniel |
620 |
} // function goPage(page)
|
5637 |
daniel |
621 |
|
5683 |
daniel |
622 |
jQuery(document).ready(function() {
|
|
|
623 |
|
5751 |
daniel |
624 |
jQuery('.wpsg-order-tab-mods').bind('click', function() {
|
5683 |
daniel |
625 |
|
5751 |
daniel |
626 |
if (jQuery(this).hasClass('active'))
|
5683 |
daniel |
627 |
{
|
|
|
628 |
|
5751 |
daniel |
629 |
jQuery(this).removeClass('active');
|
7173 |
daniel |
630 |
jQuery('.' + jQuery(this).attr("id")).slideUp(250);
|
|
|
631 |
|
5683 |
daniel |
632 |
}
|
|
|
633 |
else
|
|
|
634 |
{
|
7173 |
daniel |
635 |
|
5751 |
daniel |
636 |
jQuery(this).addClass('active');
|
|
|
637 |
jQuery('.' + jQuery(this).attr("id")).slideDown(250);
|
5683 |
daniel |
638 |
|
7173 |
daniel |
639 |
if (jQuery(this).attr("id") === 'wpsg-order-tab-add') jQuery('#search_customer').focus();
|
|
|
640 |
|
5683 |
daniel |
641 |
}
|
|
|
642 |
|
|
|
643 |
return false;
|
|
|
644 |
|
|
|
645 |
} );
|
|
|
646 |
|
|
|
647 |
} );
|
7932 |
daniel |
648 |
|
|
|
649 |
<?php if ($this->hasMod('wpsg_mod_kundenkontakt')) { ?>
|
|
|
650 |
document.getElementById('wpsg_action').addEventListener('click', (event) => {
|
|
|
651 |
|
|
|
652 |
console.log('OK');
|
|
|
653 |
|
|
|
654 |
});
|
|
|
655 |
<?php } ?>
|
5683 |
daniel |
656 |
|
7932 |
daniel |
657 |
</script>
|