Subversion Repositories wpShopGermany4

Rev

Rev 8300 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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