Subversion Repositories wpShopGermany4

Rev

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

Rev Author Line No. Line
1067 daniel 1
<?php
2
 
3
	/**
4
	 * Template für die Übersicht der Bestellungen
5
	 */
6825 daniel 6
 
1067 daniel 7
?>
8
 
5637 daniel 9
<div class="wpsg_order" id="wpsg-bs">
1116 daniel 10
 
5637 daniel 11
	<nav class="navbar navbar-default">
12
		<div class="container-fluid">
13
			<div class="navbar-header">
6414 daniel 14
 
5637 daniel 15
				<a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
6414 daniel 16
                <a class="glyphicon glyphicon-menu-hamburger wpsg-bs-toggle-nav visible-xs-block" data-toggle="collapse" data-target="#wpsg-bs-headermenu" href="#"></a>
17
 
5637 daniel 18
			</div>
6414 daniel 19
			<div class="collapse navbar-collapse" id="wpsg-bs-headermenu">
5637 daniel 20
				<ul class="nav navbar-nav">
6559 thomas 21
					<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 22
					<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 23
                    <?php foreach ($this->view['tabs']['left'] as $k => $tab) { ?>
5896 daniel 24
                    <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 25
                    <?php } ?>
7173 daniel 26
                    <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 27
				</ul>
28
				<ul class="nav navbar-nav navbar-right">
5683 daniel 29
                    <?php foreach ($this->view['tabs']['right'] as $k => $tab) { ?>
5751 daniel 30
                    <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 31
                    <?php } ?>
5637 daniel 32
				</ul>
33
			</div>
34
		</div>
5683 daniel 35
 
6825 daniel 36
		<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 37
			<div class="row">
7229 daniel 38
				<div class="col-lg-5">
6142 hartmut 39
					<form method="post" id="filter_form" >
1116 daniel 40
 
7561 daniel 41
						<?php echo wp_nonce_field('wpsg-order-search'); ?>
42
 
5751 daniel 43
						<input id="wpsg_seite" type="hidden" name="seite" value="<?php echo @$this->view['arFilter']['page']; ?>" class="current-page" />
44
						<input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo @$this->view['arFilter']['order']; ?>" />
45
						<input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo @$this->view['arFilter']['ascdesc']; ?>" />
1116 daniel 46
 
5674 daniel 47
						<?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($this->view['arFilter']['s'])); ?>
5751 daniel 48
                        <?php echo wpsg_drawForm_Input('filter[k_id]', __('Kunde (ID)', 'wpsg'), wpsg_getStr($this->view['arFilter']['k_id'])); ?>
49
						<?php echo wpsg_drawForm_Select('filter[status]', __('Bestellstatus', 'wpsg'), wpsg_array_merge(array('-1' => __('Alle', 'wpsg')), $this->arStatus), @$this->view['arFilter']['status']); ?>
7229 daniel 50
 
51
						<?php /* if ($this->hasMod('wpsg_mod_produktartikel')) { Vorbereitet aber Joins in wpsg_order nach den wp Ktegorien noch nicht umgesetzt! ?>
52
 
53
							<?php $arCatSelect = []; $arCat = $this->callMod('wpsg_mod_produktartikel', 'getProductcategorySelect'); foreach ($arCat as $cat) $arCatSelect[$cat['term_id']] = $cat['label']; ?>
54
							<?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'])); ?>
55
 
56
						<?php } */ ?>
57
 
7269 daniel 58
						<?php if ($this->hasMod('wpsg_mod_productgroups') && $this->get_option('wpsg_mod_productgroups_order_filter') === '1') { ?>
7229 daniel 59
 
60
							<?php $arProductgroups = $this->callMod('wpsg_mod_productgroups', 'getAllProductGroups'); ?>
61
							<?php  echo wpsg_drawForm_Select('filter[productgroup_id]', __('Bestellungen mit Produkten aus Produktgruppe'), ['0' => __('Alle', 'wpsg')] + $arProductgroups, wpsg_getStr($this->view['arFilter']['productgroup_id'])); ?>
62
 
63
						<?php } ?>
64
 
5674 daniel 65
                        <?php echo wpsg_drawForm_TextStart(); ?>
66
                        <div class="row">
67
                            <div class="col-lg-6">
68
                                <select name="filter[cdate_m]" class="form-control input-sm">
69
                                    <option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
70
                                    <?php for ($i = 1; $i <= 12; $i ++) { ?>
71
                                    <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>
72
                                    <?php } ?>
73
                                </select>
74
                            </div>
75
                            <div class="col-lg-6">
76
                                <select name="filter[cdate_y]" class="form-control input-sm">
77
                                    <option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
78
                                    <?php foreach ($this->view['cdate_years'] as $y) { ?>
79
                                    <option <?php echo ((wpsg_getStr($this->view['arFilter']['cdate_y']) == $y)?'selected="selected"':''); ?> value="<?php echo $y; ?>"><?php echo $y; ?></option>
80
                                    <?php } ?>
81
                                </select>
82
                            </div>
83
                        </div>
84
                        <?php echo wpsg_drawForm_TextEnd(__('Bestelldatum (Monat/Jahr)', 'wpsg'), array('noP' => true)); ?>
1899 daniel 85
 
5674 daniel 86
                        <?php echo wpsg_drawForm_TextStart(); ?>
87
                        <div class="row">
88
                            <div class="col-lg-6">
89
                                <select name="filter[invoicedate_m]" class="form-control input-sm">
90
                                    <option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
91
                                    <?php for ($i = 1; $i <= 12; $i ++) { ?>
92
                                    <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>
93
                                    <?php } ?>
94
                                </select>
95
                            </div>
96
                            <div class="col-lg-6">
97
                                <select name="filter[invoicedate_y]" class="form-control input-sm">
98
                                    <option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
99
                                    <?php foreach ($this->view['invoicedate_years'] as $y) { ?>
100
                                    <option <?php echo ((wpsg_getStr($this->view['arFilter']['invoicedate_y']) == $y)?'selected="selected"':''); ?> value="<?php echo $y; ?>"><?php echo $y; ?></option>
101
                                    <?php } ?>
102
                                </select>
103
                            </div>
104
                        </div>
105
                        <?php echo wpsg_drawForm_TextEnd(__('Rechnungsdatum (Monat/Jahr)', 'wpsg'), array('noP' => true)); ?>
106
 
6826 daniel 107
    					<br />
108
 
109
                        <?php echo wpsg_drawForm_SubmitButton(__('Bestellungen suchen')); ?>
5674 daniel 110
 
5637 daniel 111
					</form>
112
				</div>
113
			</div>
114
		</div>
6425 daniel 115
 
116
        <?php foreach ($this->view['tabs'] as $tab_positions) { ?>
117
        <?php foreach ($tab_positions as $k => $tab) { ?>
118
        <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>
119
        <?php } ?>
120
        <?php } ?>
7173 daniel 121
 
122
        <div class="wpsg-order-tab-add-content wpsg-order-tab-add" style="display:none;">
123
 
124
            <div class="container-fluid form-horizontal">
125
                <div class="row">
126
                    <div class="col-lg-4">
127
 
128
                        <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 129
 
130
							<?php echo wp_nonce_field('wpsg-order-add'); ?>
131
 
7173 daniel 132
                            <br />
133
 
7177 thomas 134
                            <?php echo wpsg_drawForm_Input('search_customer',__('Kunde (E-Mail oder Kundennummer)', 'wpsg'), @$_REQUEST['search_customer']); ?>
7173 daniel 135
 
136
                            <br />
7216 daniel 137
 
7301 florian 138
                            <?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']).')'; ?>
7173 daniel 139
                            <?php echo wpsg_drawForm_Select('add_shipping', __('Versandart', 'wpsg'), $arShippingSelect, @$_REQUEST['add_shipping']); ?>
140
 
7301 florian 141
                            <?php $arPaymentSelect = []; foreach ($this->arPayment as $payment_id => $payment) if (!isset($payment['active']) || $payment['active'] === '1')  $arPaymentSelect[$payment_id] = $payment['name'].' ('.wpsg_ff(@$payment['price']).')'; ?>
7173 daniel 142
                            <?php echo wpsg_drawForm_Select('add_payment', __('Zahlungsart', 'wpsg'), $arPaymentSelect, @$_REQUEST['add_payment']); ?>
143
 
144
                            <br /><?php echo wpsg_drawForm_SubmitButton(__('Bestellung anlegen')); ?><br />
145
 
146
                            <script>
147
 
148
                                jQuery(document).ready(function() {
149
 
150
                                    jQuery('#search_customer').autocomplete( {
151
                                        source: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&subaction=autocomplete&noheader=1',
152
                                        minLength: 2,
153
                                        select: function(event, ui) {
154
 
155
                                            jQuery('#search_customer').val(ui.item.id);
156
 
157
                                            return false;
158
 
159
                                        }
160
                                    } );
161
 
162
                                    jQuery('#add_form').on('submit', function() {
163
 
164
                                        if (jQuery.trim(jQuery('#search_customer').val()) === '') {
165
 
166
                                            alert('<?php echo __('Bitte einen Kunden angeben.', 'wpsg'); ?>');
167
 
168
                                            return false;
169
 
170
                                        }
171
 
172
                                    } );
173
 
174
                                } );
175
 
176
                            </script>
177
 
178
                        </form>
179
 
180
                    </div>
181
                </div>
182
            </div>
183
 
184
        </div>
185
 
6425 daniel 186
    </nav>
6503 daniel 187
 
188
    <div class="wpsg_msg_wrap"><hr class="wp-header-end wpsg-wp-header-end"/></div>
7269 daniel 189
 
190
	<?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 191
 
7270 daniel 192
		<?php if (wpsg_isSizedArray($arPG)) { ?>
7269 daniel 193
		<div class="container-fluid">
194
			<div class="row">
195
				<div class="pagination_wrap wpsg_status_link_wrap">
196
 
197
					<ul class="pagination">
198
						<?php foreach ($arPG as $pg_id => $pg_name) { ?>
199
							<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>
200
						<?php } ?>
201
					</ul>
202
 
203
				</div>
204
			</div>
205
		</div>
7270 daniel 206
		<?php } ?>
7269 daniel 207
 
208
	<?php } ?>
209
 
5674 daniel 210
	<div class="pagination_wrap wpsg_status_link_wrap">
1899 daniel 211
 
5674 daniel 212
		<ul class="pagination">
5637 daniel 213
			<?php foreach ($this->view['arStatus'] as $status_key => $status_info) { ?>
5674 daniel 214
			<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 215
			<?php } ?>
216
		</ul>
1899 daniel 217
 
5637 daniel 218
	</div>
1899 daniel 219
 
6444 daniel 220
	<?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
1116 daniel 221
 
5674 daniel 222
	<div class="wpsg_clear"></div>
223
 
5637 daniel 224
	<div class="content">
6144 hartmut 225
		<form method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1" enctype="multipart/form-data">
2875 daniel 226
 
5674 daniel 227
		<?php if (is_array($this->view['arData']) && sizeof($this->view['arData']) > 0) { ?>
1228 daniel 228
 
5753 daniel 229
            <table class="table table-bordered table-hover table-striped wpsg-table-order">
230
                <thead>
231
                    <tr>
232
                        <th class="col_checkbox"><input type="checkbox" onclick="return wpsg_order_checkAll();" /></th>
233
                        <th class="col_nr wpsg_order" data-order="cdate"><?php echo __('Nr', 'wpsg'); ?></th>
234
                        <th class="col_customer wpsg_order" data-order="customer"><?php echo __('Kunde', 'wpsg'); ?></th>
235
                        <th class="col_payment wpsg_order" data-order="payment"><?php echo __('Bezahlmethode', 'wpsg'); ?></th>
236
                        <th class="col_shipping wpsg_order" data-order="shipping"><?php echo __('Versandart', 'wpsg'); ?></th>
237
                        <th class="col_products wpsg_order" data-order="products"><?php echo __('Produkte', 'wpsg'); ?></th>
238
                        <th class="col_sum wpsg_order" data-order="amount"><?php echo __('Bestellwert', 'wpsg'); ?></th>
239
                        <th class="col_state wpsg_order" data-order="state"><?php echo __('Status', 'wpsg'); ?></th>
240
                    </tr>
241
                </thead>
242
                <tbody>
243
                    <?php foreach ($this->view['arData'] as $oOrder) { ?>
244
                    <tr>
245
                        <td class="col_checkbox">
5674 daniel 246
 
5753 daniel 247
                            <input class="col_set_checkbox" name="wpsg_multido[<?php echo $oOrder->id; ?>]" type="checkbox" />
5674 daniel 248
 
5753 daniel 249
                        </td>
250
                        <td class="col_nr">
5674 daniel 251
 
5753 daniel 252
                            <?php echo $oOrder->getNr(); ?> <span class="wpsg_grey"><?php echo wpsg_formatTimestamp(strtotime($oOrder->cdate), false); ?></span><br />
5674 daniel 253
 
5753 daniel 254
                            <div class="actions">
7561 daniel 255
                                <span class="view"><a title="<?php echo __("Diese Bestellung ansehen", "wpsg"); ?>" href="<?php
256
 
257
									echo wpsg_admin_url('Order', 'view', ['edit_id' => $oOrder->getId()]);
258
 
259
								?>"><?php echo __("Ansehen", "wpsg"); ?></a></span>
5753 daniel 260
                                |
7561 daniel 261
                                <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
262
 
263
									echo wpsg_admin_url('Order', 'storno', ['edit_id' => $oOrder->getId()], ['noheader' => '1']);
264
 
265
								?>"><?php echo __("Stornieren", "wpsg"); ?></a></span>
5753 daniel 266
                                |
7561 daniel 267
                                <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
268
 
269
									echo wpsg_admin_url('Order', 'delete', ['edit_id' => $oOrder->getId()], ['noheader' => '1']);
270
 
271
								?>"><?php echo __('Löschen', 'wpsg'); ?></a></span>
5753 daniel 272
                            </div>
5674 daniel 273
 
5753 daniel 274
                            <?php if (trim($oOrder->admincomment) != "") { ?>
6005 hartmut 275
                            <a title="<?php echo __("Kommentar (Admin): ", "wpsg").htmlspecialchars($oOrder->admincomment); ?>" onclick="return false;" class="glyphicon glyphicon-question-sign admincomment" href="#"></a>
5753 daniel 276
                            <?php } ?>
5674 daniel 277
 
5753 daniel 278
                            <?php if (trim($oOrder->comment) != "") { ?>
6005 hartmut 279
                            <a title="<?php echo __("Kommentar (Kunde): ", "wpsg").htmlspecialchars($oOrder->comment); ?>" onclick="return false;" class="glyphicon glyphicon-question-sign customercomment" href="#"></a>
5753 daniel 280
                            <?php } ?>
5674 daniel 281
 
5753 daniel 282
                            <?php if ($oOrder->hasShippingAdress()) { ?>
283
                            <a title="<?php echo __("Lieferadresse beachten", "wpsg"); ?>" onclick="return false;" class="glyphicon glyphicon-map-marker shippingadress" href="#"></a>
284
                            <?php } ?>
5674 daniel 285
 
5753 daniel 286
                            <?php if ($this->hasMod('wpsg_mod_abo')) { ?>
6830 daniel 287
 
6834 daniel 288
                                <?php if ($this->callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id)) === 1) { ?>
289
                                    <?php echo __('Abo Bestellung', 'wpsg'); ?>
290
                                <?php } else if ($this->callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id)) === 2) { ?>
6830 daniel 291
 
5753 daniel 292
                                    <?php
5674 daniel 293
 
5753 daniel 294
                                        $origin_order_id = $this->callMod('wpsg_mod_abo', 'getOriginOrder', array($oOrder->id));
295
                                        $origin_order_data = $this->cache->loadOrder($origin_order_id);
5674 daniel 296
 
5753 daniel 297
                                    ?>
298
                                    <?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 299
 
5753 daniel 300
                                <?php } ?>
6830 daniel 301
 
302
                            <?php } ?>
5753 daniel 303
 
5674 daniel 304
                        </td>
5753 daniel 305
                        <td class="col_customer">
6081 hartmut 306
                            <?php $firma = $oOrder->getInvoiceCompany(); if (wpsg_isSizedString($firma)) { ?>
5753 daniel 307
                            <?php echo $firma; ?><br />
308
                            <?php } ?>
6081 hartmut 309
                            <?php echo $oOrder->getInvoiceTitle(); ?> <?php echo $oOrder->getInvoiceFirstname(); ?> <?php echo $oOrder->getInvoiceName(); ?>
5753 daniel 310
                            <br />
6081 hartmut 311
                            <span class="wpsg_grey"><?php echo $oOrder->getInvoiceStreet(); ?><br />
312
                            <?php echo ltrim($oOrder->getInvoiceZip().' '.$oOrder->getInvoiceCity()); ?> <?php echo $oOrder->getInvoiceCountryKuerzel(); ?>
5753 daniel 313
                            </span>
314
                        </td>
315
                        <td class="col_payment">
5674 daniel 316
 
5753 daniel 317
                            <?php /* Bei Crefopay wird die Darstellung der Zahlungsart über das Modul geregelt */ ?>
318
                            <?php if ($oOrder->getPaymentID() == 4000 && $this->hasMod('wpsg_mod_crefopay')) { ?>
319
                                <?php echo wpsg_hspc($this->callMod('wpsg_mod_crefopay', 'getOrderPaymentName', array($oOrder->id))); ?>
320
                            <?php } else { ?>
321
                                <?php echo $oOrder->getPaymentLabel(); ?>
322
                            <?php } ?>
5674 daniel 323
 
5753 daniel 324
                            <?php if ($oOrder->getPaymentAmount() > 0) { ?>
325
                            &nbsp;-&nbsp;<?php echo wpsg_ff($oOrder->getPaymentAmount(), $this->get_option('wpsg_currency')); ?>
326
                            <?php } ?>
5674 daniel 327
 
5753 daniel 328
                        </td>
329
                        <td class="col_shipping">
5674 daniel 330
 
5753 daniel 331
                            <?php echo $oOrder->getShippingLabel(); ?>
5674 daniel 332
 
5753 daniel 333
                            <?php if ($oOrder->getShippingAmount() > 0) { ?>
334
                            &nbsp;-&nbsp;<?php echo wpsg_ff($oOrder->getShippingAmount(), $this->get_option('wpsg_currency')); ?>
335
                            <?php } ?>
5674 daniel 336
 
5753 daniel 337
                            <?php if ($oOrder->hasShippingAdress()) { ?>
338
                                <br />
6149 hartmut 339
                                <?php echo $oOrder->getShippingTitle(); ?> <?php echo $oOrder->getShippingFirstName(); ?> <?php echo $oOrder->getShippingName(); ?><br />
5753 daniel 340
                                <span class="wpsg_grey">
341
                                    <?php echo $oOrder->getShippingStreet(); ?>
342
                                    <?php echo $oOrder->getShippingZip(); ?> <?php echo $oOrder->getShippingCity(); ?> <?php echo $oOrder->getShippingCountryKuerzel(); ?><br />
5794 thomas 343
                            </span>
5753 daniel 344
                            <?php } ?>
5674 daniel 345
 
5753 daniel 346
                        </td>
347
                        <td class="col_products">
5674 daniel 348
 
6834 daniel 349
                            <?php $oOrderProducts = $oOrder->getOrderProducts(); ?>
350
 
351
                            <?php foreach ($oOrderProducts as $oOrderProduct) { ?>
352
 
353
                                <?php echo wpsg_translate(__('#1# x <a href="#2#">#3#</a> für je #4#', 'wpsg'),
354
                                    $oOrderProduct->getCount(),
7577 daniel 355
									wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id='.$oOrderProduct->getProductId(), 'wpsg-product-edit-'.wpsg_getInt($oOrderProduct->getProductId())),
6834 daniel 356
                                    $oOrderProduct->getProductName(),
357
                                    wpsg_ff($oOrderProduct->getOneAmount(), $this->get_option('wpsg_currency'))
358
                                ); ?><br />
359
 
360
                                <?php if ($this->hasMod('wpsg_mod_abo')) { ?>
361
 
362
                                    <?php if (in_array(strval($this->callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id))), array(1))) { ?>
363
 
364
                                        <?php $abo_expiration = strtotime($this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($oOrder->id, $oOrderProduct->getProductKey()))); ?>
365
 
366
                                        <?php echo __('Abo Laufzeit:', 'wpsg'); ?>
367
 
368
                                        <?php if ($abo_expiration > time()) { ?>
369
                                            <span class="wpsg_mod_abo_future_expire"><?php echo wpsg_formatTimestamp($abo_expiration); ?></span>
370
                                        <?php } else { ?>
371
                                            <span class="wpsg_mod_abo_expired"><?php echo wpsg_formatTimestamp($abo_expiration); ?></span>
372
                                        <?php } ?>
373
 
374
                                        <br />
375
 
376
                                    <?php } ?>
377
 
378
                                <?php } ?>
379
 
5753 daniel 380
                            <?php } ?>
5674 daniel 381
 
5753 daniel 382
                        </td>
383
                        <td class="col_sum">
384
                            <?php echo wpsg_ff($oOrder->getAmount(), $this->get_option('wpsg_currency')); ?>
385
                        </td>
386
                        <td class="col_state">
387
                            <?php echo $oOrder->getStateLabel(); ?>
388
                        </td>
389
                    </tr>
390
                    <?php } ?>
391
                </tbody>
392
            </table>
5674 daniel 393
 
5753 daniel 394
            <div class="alignleft actions">
395
                <select name="wpsg_action" id="wpsg_action">
396
                    <option value="-1"><?php echo __('Aktion wählen', 'wpsg'); ?></option>
397
                    <?php foreach ($this->arStatus as $k => $status) { ?>
398
                    <option value="<?php echo $k; ?>"><?php echo wpsg_translate(__('Status auf "#1#" setzen.', 'wpsg'), $status); ?></option>
399
                    <?php } ?>
400
                    <option value="multiDelete"><?php echo __('Bestellungen löschen', 'wpsg'); ?></option>
401
                    <?php if ($this->hasMod('wpsg_mod_rechnungen')) { ?>
402
                    <option value="writeRechnung"><?php echo __('Rechnung schreiben', 'wpsg'); ?></option>
403
                    <option value="showRechnung"><?php echo __('Rechnung ansehen', 'wpsg'); ?></option>
404
                    <?php } ?>
405
                </select>
5674 daniel 406
 
5753 daniel 407
                <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 408
 
5753 daniel 409
            </div>
5674 daniel 410
 
6444 daniel 411
            <div style="margin-right:-15px;">
412
                <?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
413
            </div>
5674 daniel 414
 
5753 daniel 415
            <div class="wpsg_clear"></div>
5674 daniel 416
 
5753 daniel 417
            <?php $this->callMod('wpsg_mod_export', 'produkt_index_foot'); ?>
5674 daniel 418
 
5753 daniel 419
		<?php } else { ?>
5674 daniel 420
 
5753 daniel 421
            <?php echo wpsg_drawForm_AdminboxStart(); ?>
422
    		<?php echo __('Keine Bestellungen in der Datenbank.', 'wpsg'); ?>
423
            <?php echo wpsg_drawForm_AdminboxEnd(); ?>
424
 
5637 daniel 425
		<?php } ?>
6144 hartmut 426
		<input id="noheader1" type="hidden" name="noheader1" value="1" />
427
		</form>
5637 daniel 428
	</div>
1228 daniel 429
 
5637 daniel 430
<script type="text/javascript">/* <![CDATA[ */
1228 daniel 431
 
5674 daniel 432
    <?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
5751 daniel 433
    jQuery('th[data-order="<?php echo @$this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower(@$this->view['arFilter']['ascdesc']); ?>');
5674 daniel 434
    <?php } ?>
1428 daniel 435
 
5674 daniel 436
    function wpsg_order_checkAll()
437
    {
438
 
439
        jQuery('.col_set_checkbox').each(function() { jQuery(this).prop('checked', !jQuery(this).prop('checked')); } );
440
 
441
    }
7269 daniel 442
 
443
	<?php if ($this->hasMod('wpsg_mod_productgroups') && $this->get_option('wpsg_mod_productgroups_order_filter') === '1') { ?>
444
    function wpsg_setFilterProductgroup(pgroup_id) {
5674 daniel 445
 
7269 daniel 446
		jQuery('#filterproductgroup_id').val(pgroup_id);
447
 
448
		jQuery('#seite').val(1);
449
		jQuery('#filter_form').submit();
450
 
451
		return false;
452
 
453
	}
454
	<?php } ?>
455
 
5674 daniel 456
	function wpsg_setFilterStatus(state)
5637 daniel 457
	{
1428 daniel 458
 
5674 daniel 459
		jQuery('#filterstatus').val(state);
1428 daniel 460
 
5674 daniel 461
		jQuery('#seite').val(1);
5637 daniel 462
		jQuery('#filter_form').submit();
1428 daniel 463
 
5637 daniel 464
		return false;
1428 daniel 465
 
5674 daniel 466
	}
1428 daniel 467
 
5674 daniel 468
	function goPage(page)
5637 daniel 469
	{
1116 daniel 470
 
6152 thomas 471
		//if (page <= 0 || page == <?php echo $this->view['arFilter']['page']; ?> || page > <?php echo wpsg_getStr($this->view['pages'], '0'); ?>) return;
1067 daniel 472
 
5674 daniel 473
		jQuery('#wpsg_seite').val(page);
5637 daniel 474
		jQuery('#filter_form').submit();
2755 daniel 475
 
5637 daniel 476
		return false;
1924 daniel 477
 
5674 daniel 478
	} // function goPage(page)
5637 daniel 479
 
5683 daniel 480
    jQuery(document).ready(function() {
481
 
5751 daniel 482
        jQuery('.wpsg-order-tab-mods').bind('click', function() {
5683 daniel 483
 
5751 daniel 484
            if (jQuery(this).hasClass('active'))
5683 daniel 485
            {
486
 
5751 daniel 487
                jQuery(this).removeClass('active');
7173 daniel 488
                jQuery('.' + jQuery(this).attr("id")).slideUp(250);
489
 
5683 daniel 490
            }
491
            else
492
            {
7173 daniel 493
 
5751 daniel 494
                jQuery(this).addClass('active');
495
                jQuery('.' + jQuery(this).attr("id")).slideDown(250);
5683 daniel 496
 
7173 daniel 497
                if (jQuery(this).attr("id") === 'wpsg-order-tab-add') jQuery('#search_customer').focus();
498
 
5683 daniel 499
            }
500
 
501
            return false;
502
 
503
        } );
504
 
505
    } );
506
 
5637 daniel 507
/* <![CDATA[ */</script>