Subversion Repositories wpShopGermany4

Rev

Rev 8267 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8267 Rev 8390
Line 180... Line 180...
180
                            
180
                            
181
                        };
181
                        };
182
                        
182
                        
183
                        let el_invoice_wpsg_rechnungen_preview = document.getElementById('invoice_wpsg_rechnungen_preview');
183
                        let el_invoice_wpsg_rechnungen_preview = document.getElementById('invoice_wpsg_rechnungen_preview');
184
                        let el_invoice_wpsg_rechnungen_submit = document.getElementById('invoice_wpsg_rechnungen_submit');
184
                        let el_invoice_wpsg_rechnungen_submit = document.getElementById('invoice_wpsg_rechnungen_submit');
185
                                                                
185
                        
-
 
186
						let submit = false;
-
 
187
						
186
						function check_invoice_amount(event) {
188
						function check_invoice_amount(event) {
187
							 
189
							
-
 
190
							if (submit === true) return;
-
 
191
							
-
 
192
							submit = true;
-
 
193
							
188
							let ok = false;
194
							let ok = false;
189
							
195
							
190
							for (let el_checkbox of document.getElementsByClassName('wpsg_check_amount_invoice')) {
196
							for (let el_checkbox of document.getElementsByClassName('wpsg_check_amount_invoice')) {
191
								
197
								
192
								if (el_checkbox.checked) {
198
								if (el_checkbox.checked) {
Line 200... Line 206...
200
                                }
206
                                }
201
								
207
								
202
                            }
208
                            }
203
							
209
							
204
							if (ok) {
210
							if (ok) {
205
 
211
								
206
								if (event.target.getAttribute("id") === 'invoice_wpsg_rechnungen_submit') {
212
								if (event.target.getAttribute("id") === 'invoice_wpsg_rechnungen_submit') {
207
                                        
213
                                        
208
                                    window.setTimeout(function() { location.href = '<?php
214
                                    window.setTimeout(function() { location.href = '<?php
209
 
215
 
210
                                        echo wpsg_admin_url('Order', 'view', ['edit_id' => $oOrder->getId()], [], true);
216
                                        echo wpsg_admin_url('Order', 'view', ['edit_id' => $oOrder->getId()], [], true);
Line 213... Line 219...
213
 
219
 
214
								}
220
								}
215
									
221
									
216
							} else {
222
							} else {
217
								
223
								
-
 
224
								submit = false;
-
 
225
								
218
								alert('<?php echo __('Bitte mindestens ein Produkt auswählen!', 'wpsg'); ?>');
226
								alert('<?php echo __('Bitte mindestens ein Produkt auswählen!', 'wpsg'); ?>');
219
								
227
								
220
								event.stopPropagation();
228
								event.stopPropagation();
221
							    event.preventDefault();
229
							    event.preventDefault();
222
								
230