Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 1367 | Revision 1370 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 1367 Revision 1369
Zeile 1... Zeile 1...
1
{extends file="admin/index.tpl"}
1
{extends file="admin/index.tpl"}
2
{block name="maincontent"}
2
{block name="maincontent"}
-
 
3
    {assign var=verborgeneArtikel value=false}
-
 
4
    {foreach $order->artikel as $artikel}
-
 
5
        {if $artikel.status=="verborgen"}
-
 
6
            {assign var=verborgeneArtikel value=true}
-
 
7
        {/if}
-
 
8
    {/foreach}
-
 
9
 
-
 
10
 
-
 
11
 
-
 
12
    <!--<link rel="stylesheet" type="text/css" href="/toolbox/css/jquery-ui.custom.css" />-->
-
 
13
 
-
 
14
    <link rel="stylesheet" type="text/css" href="/styles/print.css" media="print" />
-
 
15
    <link rel="stylesheet" type="text/css" href="/buttons.css" />
-
 
16
 
-
 
17
    <script src="/js/common.js"></script>
-
 
18
 
-
 
19
    <script type="text/javascript" src="/js/DataTables-1.10.5/media/js/jquery.dataTables.min.js"></script>
-
 
20
    <script type="text/javascript" src="/js/DataTables-1.10.5/extensions/TableTools/js/dataTables.tableTools.js"></script>
-
 
21
    <link rel="stylesheet" type="text/css" href="/js/DataTables-1.10.5/media/css/jquery.dataTables.css" />
-
 
22
    <link rel="stylesheet" type="text/css" href="/js/DataTables-1.10.5/extensions/TableTools/css/dataTables.tableTools.css" />
-
 
23
 
-
 
24
 
-
 
25
    <script>
-
 
26
        function display_ba_id()
-
 
27
        {
-
 
28
            if(document.getElementById('ba_id').style.display=='none')
-
 
29
            {
-
 
30
                document.getElementById('ba_id').style.display='inline';
-
 
31
                document.getElementById("ba_name").style.display='none';
-
 
32
            }
-
 
33
            else
-
 
34
            {
-
 
35
                document.getElementById('ba_id').style.display='none';
-
 
36
                document.getElementById("ba_name").style.display='inline';
-
 
37
                document.getElementById("ba_changed").value=0;
-
 
38
            }
-
 
39
        }
-
 
40
        {if $order->login_id<100}
-
 
41
        function confirmUmwandeln()
-
 
42
        {
-
 
43
            $.getJSON("checkAccount.php?email={$order->email}",function(json) {
-
 
44
                $('#umwandelnCheckResult').html(json.msg)
-
 
45
                $('#umwandelnDlg').dialog("open");
-
 
46
            });
-
 
47
        }
-
 
48
        function umwandeln()
-
 
49
        {
-
 
50
            $.post("createAccount.php", {
-
 
51
                basisBestellId:"{$order->id}",
-
 
52
                Anrede: "{$order->salutation}",
-
 
53
                Vorname: "{$order->name}",
-
 
54
                Name1: "{$order->lastname}",
-
 
55
                Name2: "{$order->company}",
-
 
56
                Strasse: "{$order->street}",
-
 
57
                Hausnummer: "{$order->houseno}",
-
 
58
                PLZ: "{$order->zip}",
-
 
59
                Ort: "{$order->city}",
-
 
60
                E_Mail: "{$order->email}",
-
 
61
                Land: "{$order->country_id}",
-
 
62
                Telefon: "{$order->phone}",
-
 
63
                Fax: "{$order->fax}",
-
 
64
                shop: "{$order->shop_ID}",
-
 
65
                vat_id: "{$order->vat_id}",
-
 
66
                AP_Bemerkung: "{$order->AP_Bemerkung|escape:'javascript'}",
-
 
67
 
-
 
68
            },function(){
-
 
69
                document.location.reload();
-
 
70
            })
-
 
71
        }
-
 
72
        {/if}
-
 
73
        $(function(){
-
 
74
            {if $order->login_id<100}
-
 
75
            $('#umwandelnDlg').dialog({
-
 
76
                autoOpen:false,
-
 
77
                modal:true,
-
 
78
                width:600,
-
 
79
                buttons:[{
-
 
80
                    text: "Nein",
-
 
81
                    click: function () {
-
 
82
                        $(this).dialog("close");
-
 
83
                    },
-
 
84
                },
-
 
85
                    {
-
 
86
                        text:"Ja",
-
 
87
                        click:function(){
-
 
88
                            $(this).dialog("close");
-
 
89
                            umwandeln();
-
 
90
                        }
-
 
91
                    }]
-
 
92
            })
-
 
93
            $('#umwandeln').button().click(confirmUmwandeln);
-
 
94
            {/if}
-
 
95
            $('#dokumentDlg').dialog({
-
 
96
                autoOpen:false,
-
 
97
                width:1024,
-
 
98
                height:600,
-
 
99
                modal:true,
-
 
100
            })
-
 
101
            $(".layer_dok").click(function(e){
-
 
102
                e.preventDefault();
-
 
103
                let url=$(this).attr("href");
-
 
104
                $('#dokumentDlg').load("getDok.php?id="+$(this).attr("data-id"),function(){
-
 
105
                    $('#dokUrl').attr("href",url);
-
 
106
                    $('#dokumentDlg').dialog("open")
-
 
107
                })
-
 
108
            })
-
 
109
            $('.edit_title').css("cursor","pointer").click(editDokTitle);
-
 
110
            $('#dialogDokTitle').dialog({
-
 
111
                autoOpen:false,
-
 
112
                modal:true,
-
 
113
                width:"90%",
-
 
114
                buttons:[
-
 
115
                    {
-
 
116
                        text:"speichern",
-
 
117
                        icons: {
-
 
118
                            primary: "ui-icon-check"
-
 
119
                        },
-
 
120
                        showText: false,
-
 
121
                        click:function()
-
 
122
                        {
-
 
123
                            $.post("editDokTitle.php",$('#dokTitleForm').serializeArray(),function(){
-
 
124
                                document.location.reload();
-
 
125
                                $('#dialogDokTitle').dialog("close");
-
 
126
                            })
-
 
127
                        }
-
 
128
                    },
-
 
129
                    {
-
 
130
                        text:"abbrechen",
-
 
131
                        icons: {
-
 
132
                            primary: "ui-icon-close"
-
 
133
                        },
-
 
134
                        showText: false,
-
 
135
                        click:function()
-
 
136
                        {
-
 
137
                            $(this).dialog("close");
-
 
138
                        }
-
 
139
                    },
-
 
140
                ]
-
 
141
            })
-
 
142
            $('#ba_name').dblclick(display_ba_id);
-
 
143
 
-
 
144
            $('#export').click(exportOrder);
-
 
145
 
-
 
146
            // doktabs START
-
 
147
            $('#doktabs').tabs();
-
 
148
            $('#doktable-Alle').DataTable({
-
 
149
                "filter":false,
-
 
150
                "responsive":true,
-
 
151
                "paging": false,
-
 
152
                "language": {
-
 
153
                    "sEmptyTable": "Keine Daten in der Tabelle vorhanden",
-
 
154
                    "sInfo": "_START_ bis _END_ von _TOTAL_ Eintr&auml;gen",
-
 
155
                    "sInfoEmpty": "0 bis 0 von 0 Eintr&auml;gen"
-
 
156
                },
-
 
157
            });
-
 
158
            $(".doktabs_li").click(function(){
-
 
159
                let href = $("a",this).attr("href");
-
 
160
                let id = href.replace("doktabs","doktable");
-
 
161
                if($(id + "_wrapper").length===0) {
-
 
162
                    $(id).DataTable({
-
 
163
                        "filter":false,
-
 
164
                        "responsive":true,
-
 
165
                        "paging": false,
-
 
166
                        "language": {
-
 
167
                            "sEmptyTable": "Keine Daten in der Tabelle vorhanden",
-
 
168
                            "sInfo": "_START_ bis _END_ von _TOTAL_ Eintr&auml;gen",
-
 
169
                            "sInfoEmpty": "0 bis 0 von 0 Eintr&auml;gen"
-
 
170
                        },
-
 
171
                    });
-
 
172
                }
-
 
173
            });
-
 
174
            // doktabs ENDE
-
 
175
 
-
 
176
            // start Disable Dropdown
-
 
177
            $( ".select_tax_mode" ).dblclick(function(){
-
 
178
                if($(this).is(":visible")) {
-
 
179
                    $(".select_tax_mode").hide("slow");
-
 
180
                }
-
 
181
            });
-
 
182
            //stop Disable Dropdown
-
 
183
 
-
 
184
            //ajax safe
-
 
185
            $('#s_id').on('change', function() {
-
 
186
                let shopID = $(this).val();
-
 
187
                $.ajax({
-
 
188
                    type: "POST",
-
 
189
                    url: "bestellungen_neu.php",
-
 
190
                    data: {
-
 
191
                        'update': true,
-
 
192
                        's_changed': 1,
-
 
193
                        'bestellID': '{$order->id}',
-
 
194
                        's_id': shopID,
-
 
195
                    },
-
 
196
                    cache: false,
-
 
197
                    success: function() {
-
 
198
                        let new_shop = $('#s_id :selected').text();
-
 
199
                        $('#s_name').html(new_shop).css('display', 'inline');
-
 
200
                        $('#s_id').css('display', 'none');
-
 
201
                    }
-
 
202
                });
-
 
203
            });
-
 
204
            $('#ba_id').on('change', function() {
-
 
205
                let baID = $(this).val();
-
 
206
                $.ajax({
-
 
207
                    type: "POST",
-
 
208
                    url: "bestellungen_neu.php",
-
 
209
                    data: {
-
 
210
                        'update': true,
-
 
211
                        'ba_changed': 1,
-
 
212
                        'bestellID': '{$order->id}',
-
 
213
                        'ba_id': baID,
-
 
214
                    },
-
 
215
                    cache: false,
-
 
216
                    success: function() {
-
 
217
                        let new_ba = $('#ba_id :selected').text();
-
 
218
                        $('#ba_name').html(new_ba).css('display', 'inline');
-
 
219
                        $('#ba_id').css('display', 'none');
-
 
220
                    }
-
 
221
                });
-
 
222
            });
-
 
223
 
-
 
224
            //
-
 
225
 
-
 
226
            $('.showHiddenItems').click(showHiddenItems).css("cursor","pointer");
-
 
227
            $('.hideHiddenItems').click(hideHiddenItems).css("cursor","pointer");
-
 
228
            {if $dialog}
-
 
229
            $('#mailTemplates').dialog({
-
 
230
                autoOpen:false,
-
 
231
                resizable:false,
-
 
232
                modal:true,
-
 
233
                width:"90%"
-
 
234
            })
-
 
235
            $('#mailTemplatesResult').dialog({
-
 
236
                autoOpen:false,
-
 
237
                resizable:false,
-
 
238
                modal:true,
-
 
239
                width:"90%"
-
 
240
            })
-
 
241
            $('#mailTemplateButton').click(function(){
-
 
242
                $('#mailTemplates').dialog("open");
-
 
243
                let width=0;
-
 
244
                $(".vorlage").each(function(index){
-
 
245
                    bWidth=$(this).width();
-
 
246
                    if(bWidth > width)
-
 
247
                    {
-
 
248
                        width=bWidth;
-
 
249
                    }
-
 
250
                });
-
 
251
                if(width>$('#mailTemplates').width())
-
 
252
                {
-
 
253
                    width=$('#mailTemplates').width();
-
 
254
                }
-
 
255
                $(".vorlage").width(width).css("textAlign","left");
-
 
256
            })
-
 
257
            $('button.vorlage').css("cursor","pointer").button().click(function(e){
-
 
258
                e.preventDefault();
-
 
259
                let tid=parseInt($(this).attr("data-value"));
-
 
260
                $('#mailTemplates').dialog("close");
-
 
261
                window.open("/Warenwirtschaft/MailClient/index.php?id=0&shop={$order->shop_id}&Bestellung={$order->id}&button=Mailausgang&templateId="+tid, 'MailClient', 'status, menubar, height=600, width=900, scrollbars=yes');        })
-
 
262
            {/if}
-
 
263
            $('.dokstatus').css("cursor","pointer").on('click',function(){
-
 
264
                let dokId=$(this).attr("data-dokid");
-
 
265
                $.getJSON("setStatus.php?id="+dokId,function(erg)
-
 
266
                {
-
 
267
                    if(erg.status==="offen")
-
 
268
                    {
-
 
269
                        $('.img_status_'+dokId).attr("src","/images/Icons/icon-rote-fahne.png").show();
-
 
270
                    }
-
 
271
                    else
-
 
272
                    {
-
 
273
                        $('.img_status_'+dokId).attr("src","/images/Icons/icon-gruener-haken.png").show();
-
 
274
                    }
-
 
275
                    $('#aenderung_'+dokId).html(erg.updated_at);
-
 
276
                    $('#bearbeiter_'+dokId).html(erg.updated_by);
-
 
277
                })
-
 
278
            })
-
 
279
            let script="";
-
 
280
            {if $order->zahlart_name=="amazon" || $order->kk_info.anbieter=="Amazon"}
-
 
281
            script="amazonRefund.php";
-
 
282
            {elseif $order->zahlart_name_intern=="PayPalPlus" || $order->kk_info.anbieter=="PayPalPlus"}
-
 
283
            script="paypalRefund.php?mode=paypalPlus";
-
 
284
            {elseif $order->zahlart_name_intern=="PayPalExpress" || $order->kk_info.anbieter=="PayPalExpress"}
-
 
285
            script="paypalRefund.php?mode=paypalExpress";
-
 
286
            {elseif $order->zahlart_name_intern=="paypal" || $order->kk_info.anbieter=="PayPal"}
-
 
287
            script="paypalRefund.php?mode=paypal";
-
 
288
            {elseif $order->zahlart_name_intern=="klarna" || $order->kk_info.anbieter=="klarna"}
-
 
289
            script="klarnaRefund.php";
-
 
290
            {elseif $order->zahlart_name_intern=="billie" || $order->kk_info.anbieter=="billie"}
-
 
291
            script="billieRefund.php";
-
 
292
            {/if}
-
 
293
            $('#refundDlg').dialog({
-
 
294
                autoOpen:false,
-
 
295
                modal:true,
-
 
296
                resizable:false,
-
 
297
                width:700,
-
 
298
                buttons:{
-
 
299
                    "erstatten":function(){
-
 
300
                        daten = $('#refundForm').serializeArray();
-
 
301
                        $.post("/Warenwirtschaft/"+script,daten,function(json){
-
 
302
                            alert(json);
-
 
303
                            $('#refundDlg').dialog("close");
-
 
304
                            document.location.reload();
-
 
305
                        })
-
 
306
                    }
-
 
307
                }
-
 
308
            })
-
 
309
            $('.refund').click(function(){
-
 
310
                if($(this).attr("data-refund"))
-
 
311
                {
-
 
312
                    $('#refundAmount').val($(this).attr("data-refund"));
-
 
313
                }
-
 
314
                else
-
 
315
                {
-
 
316
                    $('#refundAmount').val("{$order->gesamtsumme_buffer|number_format:2:',':'.'}")
-
 
317
                }
-
 
318
                {if $order->zahlart_name=="amazon" || $order->kk_info.anbieter=="Amazon"}
-
 
319
                if($('#refundAmount').val()>{$order->diff})
-
 
320
                {
-
 
321
                    $('#refundAmount').val({$order->diff})
-
 
322
                }
-
 
323
                {/if}
-
 
324
                $('#refundDlg').dialog("open");
-
 
325
            })
-
 
326
        })
-
 
327
        function editDokTitle()
-
 
328
        {
-
 
329
            $('#dokTitle').val($(this).attr("data-title"))
-
 
330
            $('#dokId').val($(this).attr("data-id"))
-
 
331
            $('#dialogDokTitle').dialog("open");
-
 
332
        }
-
 
333
        function exportOrder()
-
 
334
        {
3
    <form method="post" action="/backend/orders/{$order->id}">
335
            url="exportOrder.php?orderId={$order->id}";
-
 
336
            $.get(url,function(){
-
 
337
                document.location.reload();
-
 
338
            });
-
 
339
        }
-
 
340
 
-
 
341
        function hideHiddenItems()
-
 
342
        {
-
 
343
            $.get("/Online-Shop/save_to_db.php?val=showHiddenItems=0",function(){
-
 
344
                document.location.reload();
-
 
345
            })
-
 
346
        }
-
 
347
        function showHiddenItems()
-
 
348
        {
-
 
349
            $.get("/Online-Shop/save_to_db.php?val=showHiddenItems=1",function(){
-
 
350
                document.location.reload();
-
 
351
            })
-
 
352
        }
-
 
353
 
-
 
354
 
-
 
355
    </script>
-
 
356
    <script type="text/javascript" src="/js/i18n/jquery.ui.datepicker-de.js"></script>
-
 
357
    <style>
-
 
358
        .artikelDaten img
-
 
359
        {
-
 
360
            display: inline!important;
-
 
361
        }
-
 
362
        .select_tax_container {
-
 
363
            float:left;
-
 
364
            margin-left:10px;
-
 
365
        }
-
 
366
        .select_tax_mode {
-
 
367
            z-index:1;
-
 
368
            width:121px;
-
 
369
            height:30px;
-
 
370
            position:absolute;
-
 
371
            background:#fff;
-
 
372
            opacity:.7;
-
 
373
        }
-
 
374
 
-
 
375
        .ui-tooltip, .arrow:after {
-
 
376
            border: 2px solid white;
-
 
377
        }
-
 
378
        .ui-tooltip {
-
 
379
            padding: 10px 20px;
-
 
380
            border-radius: 20px;
-
 
381
            font: bold 14px "Helvetica Neue", Sans-Serif;
-
 
382
            box-shadow: 0 0 7px black;
-
 
383
        }
-
 
384
        .arrow {
-
 
385
            width: 70px;
-
 
386
            height: 16px;
-
 
387
            overflow: hidden;
-
 
388
            position: absolute;
-
 
389
            left: 50%;
-
 
390
            margin-left: -35px;
-
 
391
            bottom: -16px;
-
 
392
        }
-
 
393
        .arrow.top {
-
 
394
            top: -16px;
-
 
395
            bottom: auto;
-
 
396
        }
-
 
397
        .arrow.left {
-
 
398
            left: 20%;
-
 
399
        }
-
 
400
        .arrow:after {
-
 
401
            content: "";
-
 
402
            background: black;
-
 
403
            position: absolute;
-
 
404
            left: 20px;
-
 
405
            top: -20px;
-
 
406
            width: 25px;
-
 
407
            height: 25px;
-
 
408
            box-shadow: 6px 5px 9px -9px black;
-
 
409
            -webkit-transform: rotate(45deg);
-
 
410
            -moz-transform: rotate(45deg);
-
 
411
            -ms-transform: rotate(45deg);
-
 
412
            -o-transform: rotate(45deg);
-
 
413
            tranform: rotate(45deg);
-
 
414
        }
-
 
415
        .arrow.top:after {
-
 
416
            bottom: -20px;
-
 
417
            top: auto;
-
 
418
        }
-
 
419
        .doc_link {
-
 
420
            float:left;
-
 
421
            vertical-align: middle;
-
 
422
            overflow:hidden;
-
 
423
            max-width:100%;
-
 
424
            font-weight:bold;
-
 
425
        }
-
 
426
        table.dataTable thead th, table.dataTable thead td {
-
 
427
            padding:5px 18px 5px 10px!important;
-
 
428
        }
-
 
429
        .doktable thead {
-
 
430
            font-weight:bold;
-
 
431
        }
-
 
432
        .doktable td {
-
 
433
            font-size:12px;
-
 
434
            text-align:left;
-
 
435
            vertical-align:top;
-
 
436
        }
-
 
437
        .doktable tr td:nth-of-type(2) {
-
 
438
            min-width:65%;
-
 
439
        }
-
 
440
        .doktable thead td:nth-of-type(2) {
-
 
441
            padding-left:67px!important;
-
 
442
        }
-
 
443
        .doktable tbody tr:nth-of-type(2n) td {
-
 
444
            background-color:#e7e7e7;
-
 
445
        }
-
 
446
        .doktable tbody tr:hover td {
-
 
447
            background-color:#ccc;
-
 
448
        }
-
 
449
 
-
 
450
        .bestellung_buttons input {
-
 
451
            margin:2px;
-
 
452
        }
-
 
453
        .zweite_zelle {
-
 
454
            width:90%;
-
 
455
        }
-
 
456
        .artikel_beschreibung {
-
 
457
            clear:both;
-
 
458
            float:none;
-
 
459
            display:block;
-
 
460
            width:96%;
-
 
461
            height:12vh;
-
 
462
        }
-
 
463
        .artikel_aktionen {
-
 
464
            display:flex!important;
-
 
465
            float:right;
-
 
466
            background:#fff;
-
 
467
            border:1px solid #000!important;
-
 
468
        }
-
 
469
        .artikel_aktionen a {
-
 
470
            display:block;
-
 
471
            padding:3px;
-
 
472
            border:1px solid #ccc;
-
 
473
            margin:3px;
-
 
474
            border-radius:3px;
-
 
475
        }
-
 
476
    </style>
-
 
477
    {if isset($user_rechte.Warenwirtschaft.bestellung.html_editor)}
-
 
478
        <script type="text/javascript" src="../js/tinymce/tinymce.min.js"></script>
-
 
479
        <script type="text/javascript">
-
 
480
 
-
 
481
            tinyMCE.init({
-
 
482
                // General options
-
 
483
                mode : "none",
-
 
484
                selector: "textarea#bemerkung",
-
 
485
                theme : "modern",
-
 
486
                language: "de",
-
 
487
                plugins: [
-
 
488
                    "advlist autolink lists link image charmap preview anchor",
-
 
489
                    "searchreplace visualblocks code fullscreen",
-
 
490
                    "insertdatetime media table contextmenu paste" ],
-
 
491
                toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
-
 
492
 
-
 
493
 
-
 
494
 
-
 
495
            });
-
 
496
        </script>
-
 
497
 
-
 
498
    {/if}
-
 
499
    <script>
-
 
500
 
-
 
501
        $(document).ready(function()
-
 
502
        {
-
 
503
 
-
 
504
            {if $labeldruck===true}
-
 
505
            $('.retoureLabel').click(retoureLabel)
-
 
506
            {/if}
-
 
507
            $( ".schufa" ).tooltip({
-
 
508
                items:'.schufa',
-
 
509
                width:800,
-
 
510
                position: {
-
 
511
                    my: "center bottom-20",
-
 
512
                    at: "center top",
-
 
513
                    using: function( position, feedback ) {
-
 
514
                        $( this ).css( position );
-
 
515
                        $( "<div>" )
-
 
516
                            .addClass( "arrow" )
-
 
517
                            .addClass( feedback.vertical )
-
 
518
                            .addClass( feedback.horizontal )
-
 
519
                            .appendTo( this );
-
 
520
                    }
-
 
521
                }
-
 
522
            });
-
 
523
            $( document ).tooltip({
-
 
524
                items:'.popup',
-
 
525
                width:800,
-
 
526
                position: {
-
 
527
                    my: "center bottom-20",
-
 
528
                    at: "center top",
-
 
529
                    using: function( position, feedback ) {
-
 
530
                        $( this ).css( position );
-
 
531
                        $( "<div>" )
-
 
532
                            .addClass( "arrow" )
-
 
533
                            .addClass( feedback.vertical )
-
 
534
                            .addClass( feedback.horizontal )
-
 
535
                            .appendTo( this );
-
 
536
                    }
-
 
537
                }
-
 
538
            });
-
 
539
 
-
 
540
            $( ".popupImg" ).tooltip({
-
 
541
                items:'.popupImg',
-
 
542
                position: {
-
 
543
                    my: "center bottom-20",
-
 
544
                    at: "center top",
-
 
545
                    using: function( position, feedback ) {
-
 
546
                        $( this ).css( position );
-
 
547
 
-
 
548
                        $( "<div>" )
-
 
549
                            .addClass( "arrow" )
-
 
550
                            .addClass( feedback.vertical )
-
 
551
                            .addClass( feedback.horizontal )
-
 
552
                            .appendTo( this );
-
 
553
                    }
-
 
554
                },
-
 
555
                content:function(){
-
 
556
                    let url = $(this).attr("id");
-
 
557
                    return "<img src='"+ url +"' style='width:50%;'/>";
-
 
558
                }
-
 
559
            });
-
 
560
            $('.change_amount').click(change_amount);
-
 
561
            $('#change_amount_form').submit(submitAmountForm);
-
 
562
 
-
 
563
            $('#change_amount_dlg').dialog({
-
 
564
                autoOpen:false,
-
 
565
                modal:true,
-
 
566
                resizable:false,
-
 
567
                buttons:{
-
 
568
                    "aendern":function()
-
 
569
                    {
-
 
570
                        submitAmountForm();
-
 
571
                    }
-
 
572
                }
-
 
573
            });
-
 
574
            $('#delShipmentQuestion').dialog({
-
 
575
                modal:true,
-
 
576
                resizable:false,
-
 
577
                autoOpen:false,
-
 
578
                buttons:{
-
 
579
                    "ja":function(){
-
 
580
                        let dokId=$('#delDokId').val();
-
 
581
                        let logistiker=$('#delDokLogistiker').val();
-
 
582
                        //console.log(logistiker);
-
 
583
                        let url = "delShipment.php?dokId="+dokId+"&logistiker="+logistiker;
-
 
584
                        $.get(url,function(html){
-
 
585
                            $('#delShipmentQuestion').dialog("close");
-
 
586
                            let arr=html.split("|");
-
 
587
                            $('#returnCode').val(arr[0]);
-
 
588
                            let msg=arr[1];
-
 
589
                            $('#labelReturn').html(msg);
-
 
590
                            $('#labelReturn').dialog("open");
-
 
591
                        })
-
 
592
                    },
-
 
593
                    "nein":function(){
-
 
594
                        $(this).dialog("close");
-
 
595
                    }
-
 
596
                }
-
 
597
            });
-
 
598
            $('#labelReturn').dialog({
-
 
599
                modal:true,
-
 
600
                width:800,
-
 
601
                resizable:false,
-
 
602
                autoOpen:false,
-
 
603
                buttons:{
-
 
604
                    "ok":function(){
-
 
605
                        $(this).dialog("close");
-
 
606
                        if ($('#returnCode').val()==0)
-
 
607
                        {
-
 
608
                            document.location.reload();
-
 
609
                        }
-
 
610
                    }
-
 
611
                }
-
 
612
            });
-
 
613
            $('#updReturn').dialog({
-
 
614
                modal:true,
-
 
615
                resizable:false,
-
 
616
                autoOpen:false,
-
 
617
                buttons:{
-
 
618
                    "ok":function(){
-
 
619
                        $(this).dialog("close");
-
 
620
                        document.location.reload();
-
 
621
                    }
-
 
622
                }
-
 
623
            });
-
 
624
 
-
 
625
            function submitAmountForm(e)
-
 
626
            {
-
 
627
                //e.preventDefault();
-
 
628
                barcode=$('#barcode').val();
-
 
629
                $.get("/Warenwirtschaft/change_amount.php",$("#change_amount_form").serialize(),function(html){
-
 
630
                    $('#change_amount_form').dialog("close");
-
 
631
                    document.location.reload();
-
 
632
                })
-
 
633
            }
-
 
634
 
-
 
635
            function change_amount(e)
-
 
636
            {
-
 
637
                e.preventDefault();
-
 
638
                a_id=this.id;
-
 
639
                a_id=a_id.split("_");
-
 
640
                a_id=a_id[1];
-
 
641
                $('#change_ab_id').val(a_id);
-
 
642
                $('#change_amount_dlg').dialog("open");
-
 
643
            }
-
 
644
 
-
 
645
            {if isset($user_rechte.Warenwirtschaft.logistiker.tracking_input)}
-
 
646
            $('#send_tracking').click(save_tracking);
-
 
647
            $('#add_tracking_nr_form').submit(save_tracking);
-
 
648
            {/if}
-
 
649
            $('#b_tax').change(function(){
-
 
650
                let sel = $(this).prop('selectedIndex');
-
 
651
                if(!confirm("Wollen Sie wirklich die Besteuerung dieser Bestellung umstellen?\nDies hat Auswirkungen auf die Rechnungsschreibung.")) {
-
 
652
                    // ME: Bei Abbruch muss der ursprüngliche Wert wiederhergestellt werden!
-
 
653
                    if(sel==0) {
-
 
654
                        $(this).prop('selectedIndex',1);
-
 
655
                    }else{
-
 
656
                        $(this).prop('selectedIndex',0);
-
 
657
                    }
-
 
658
                }else{
-
 
659
                    // ME: den neuen Wert in der Tabelle Bestellung speichern.
-
 
660
                    $('#ajax').load("/Warenwirtschaft/update_bestellung.php?tax="+sel+"&id={$order->id}");
-
 
661
                }
-
 
662
            });
-
 
663
 
-
 
664
            // ME: Logistiker SelectBox bei Change sofort speichern
-
 
665
            $('#logistiker_id').change(function(){
-
 
666
                let logistiker_id = $(this).val();
-
 
667
 
-
 
668
                // die Selectbox im trackingnummern-Dialog updaten
-
 
669
                $('#logistiker_id_dlg').val(logistiker_id);
-
 
670
                $('#ajax').load("/Warenwirtschaft/update_logistiker.php?id={$order->id}&logistiker_id="+logistiker_id, function(html){
-
 
671
                    if(html==="Der Logistiker wurde gespeichert")
-
 
672
                    {
-
 
673
                        document.location.href="/Warenwirtschaft/bestellungen.php?Bestellung={$order->id}";
-
 
674
                    }
-
 
675
                }  );
-
 
676
            });
-
 
677
        });
-
 
678
 
-
 
679
        // ME: Trackingnummer löschen mit Sicherheitsabfrage
-
 
680
        function delete_trackingnummer(trackingnummer){
-
 
681
            let text = "Soll die Trackingnummer "+trackingnummer+" wirklich gelöscht werden?";
-
 
682
            let check = confirm( decodeHtml(text) );
-
 
683
            if(check===true) {
-
 
684
                $('#ajax').load("/Warenwirtschaft/update_tracking.php?action=delete&id={$order->id}&trackingnummer="+trackingnummer+"" );
-
 
685
 
-
 
686
                $('#tracking').load('gettracking.php?bestell_id={$order->id}').show().delay(100);
-
 
687
            }
-
 
688
        }
-
 
689
 
-
 
690
        function decodeHtml(html) {
-
 
691
            let txt = document.createElement("textarea");
-
 
692
            txt.innerHTML = html;
-
 
693
            return txt.value;
-
 
694
        }
-
 
695
 
-
 
696
        function del_document(dokId)
-
 
697
        {
-
 
698
            let erg = confirm('Wollen Sie dieses Dokument wirklich löschen?');
-
 
699
            if(erg)
-
 
700
            {
-
 
701
                window.open('../dokumente/index.php?action=unlink&id='+dokId, 'DokumentUpload', 'status, menubar, height=110, width=500');
-
 
702
            }
-
 
703
            return false;
-
 
704
        }
-
 
705
 
-
 
706
        {if $labeldruck===true}
-
 
707
        function retoureLabel(e){
-
 
708
            e.preventDefault();
-
 
709
            let receiverid=$(this).attr("data-receiverid");
-
 
710
            let id=$(this).attr("data-id");
-
 
711
            let script = $(this).attr("data-script");
-
 
712
            let bemerkung=$(this).attr("data-bemerkung");
-
 
713
            $.getJSON(script+"?mode=retoure&receiverid="+receiverid+"&b_id={$order->id}&id="+id,function(html){
-
 
714
                if(html.code==200)
-
 
715
                {
-
 
716
                    alert(bemerkung);
-
 
717
                    $('#bemerkung').append(bemerkung);
-
 
718
                    {$emailLink}
-
 
719
                    $('#cur').click();
-
 
720
                }
-
 
721
                else
-
 
722
                {
-
 
723
                    alert(html.msg);
-
 
724
                }
-
 
725
            })
-
 
726
        }
-
 
727
        function del_shipment(dokId,logistiker)
-
 
728
        {
-
 
729
            $.get("getTrackNumber.php?dokId="+dokId,function(html){
-
 
730
                $('#delTrackNumber').html(html);
-
 
731
                $('#delDokId').val(dokId);
-
 
732
                $('#delDokLogistiker').val(logistiker);
-
 
733
                $('#delShipmentQuestion').dialog("open");
-
 
734
            })
-
 
735
        }
-
 
736
        {/if}
-
 
737
    </script>
-
 
738
    <script type="text/javascript" src="/js/overlib.js"></script>
-
 
739
    <script>
-
 
740
 
-
 
741
        // increase the default animation speed to exaggerate the effect
-
 
742
        $.fx.speeds._default = 450;
-
 
743
        $(function() {
-
 
744
            $( "#dialog" ).dialog({
-
 
745
                autoOpen: false,
-
 
746
                minWidth: 700,
-
 
747
                minHeight:350
-
 
748
            });
-
 
749
 
-
 
750
            $( "#opener" ).click(function() {
-
 
751
                $( "#dialog" ).dialog( "open" );
-
 
752
                return false;
-
 
753
            });
-
 
754
            {if isset($user_rechte.Warenwirtschaft.bestellung.kommissionierungskontrolle)}
-
 
755
            $('.kommissionierungskontrolle').click(function(){
-
 
756
                $("<div>").dialog({
-
 
757
                    minWidth: 550,
-
 
758
                    position: { my: 'top', at: 'top+60' },
-
 
759
                    open: function() {
-
 
760
                        $(this).load('kommissionierungskontrolle.php?b_id={$order->id}');
-
 
761
                    },
-
 
762
                    close: function(event, ui) {
-
 
763
                        $(this).dialog('destroy').remove();
-
 
764
                        location.reload();
-
 
765
                    },
-
 
766
                    buttons: {
-
 
767
                        "Beenden": function() {
-
 
768
                            $( this ).dialog('destroy').remove();
-
 
769
                            location.reload();
-
 
770
                        }
-
 
771
                    },
-
 
772
                    title: 'Kommissionierungskontrolle Bestellung: {$order->id}'
-
 
773
                });
-
 
774
            });
-
 
775
            {/if}
-
 
776
            {if isset($user_rechte.Warenwirtschaft.bestellung.steuersatz_aendern) && isset($laenderMwSt)}
-
 
777
            $("#changeMwStDialog").dialog({
-
 
778
                autoOpen: false,
-
 
779
                minWidth: 400,
-
 
780
                resizable: false,
-
 
781
                buttons: {
-
 
782
                    "Speichern": function() {
-
 
783
                        let mwst = $(".mwstLand").val();
-
 
784
                        let data = $("#bestellungFormular").serializeArray();
-
 
785
 
-
 
786
                        $('#ajax').load("/Warenwirtschaft/update_bestellung.php?mwst="+mwst+"&id={$order->id}",data, function(html){
-
 
787
                            alert(html);
-
 
788
                            location.reload();
-
 
789
                        });
-
 
790
                    },
-
 
791
                    "Abbrechen": function() {
-
 
792
                        $( this ).dialog( "close" );
-
 
793
 
-
 
794
                    }
-
 
795
                }
-
 
796
            });
-
 
797
            $('.changeMwSt').click(function(){
-
 
798
                $('#changeMwStDialog').dialog("open");
-
 
799
            });
-
 
800
            {/if}
-
 
801
            {if isset($user_rechte.Warenwirtschaft.bestellung.lieferadresse_aendern)}
-
 
802
            $('.changeLieferadresse').click(function(){
-
 
803
                $('#dialogLieferadresse').dialog({
-
 
804
                    resizable: false,
-
 
805
                    modal:true,
-
 
806
                    width:600,
-
 
807
                    height:600,
-
 
808
                    open: function() {
-
 
809
                        $(this).load('change_lieferadresse.php?b_id={$order->id}&login={$order->Login}');
-
 
810
                    },
-
 
811
                    close: function(event, ui) {
-
 
812
                        $(this).dialog('close');
-
 
813
                    },
-
 
814
                    title: 'Lieferadresse dieser Bestellung ändern',
-
 
815
 
-
 
816
                    buttons: [{
-
 
817
                        text:"Abbrechen",
-
 
818
                        click: function() {
-
 
819
                            $( '#dialogLieferadresse' ).dialog( "close" );
-
 
820
                        }
-
 
821
                    },
-
 
822
                        {if $order->Login > 100 && $daten.Login.defaultLieferIdAdresse}
-
 
823
                        {
-
 
824
                            text:"Standard-Liefer-Adresse einlesen",
-
 
825
                            click: function() {
-
 
826
                                $( rDialog ).load("change_lieferadresse.php?shipAddrId=standard&l_id={$order->Login}");
-
 
827
                            }
-
 
828
                        }
-
 
829
                        {/if}
-
 
830
                    ]
-
 
831
 
-
 
832
                });
-
 
833
            });
-
 
834
            {/if}
-
 
835
            {if isset($order->bill_addr_id) && $order->bill_addr_id != NULL && $order->bill_addr_id > 0 && $order->bill_addr_id != ""}
-
 
836
            let rDialog = $('#dialogRechnungsadresse').dialog({
-
 
837
                resizable: false,
-
 
838
                modal:true,
-
 
839
                width:600,
-
 
840
                height:600,
-
 
841
                autoOpen:false,
-
 
842
                context: $(this),
-
 
843
                open: function() {
-
 
844
                    $.ajax({
-
 
845
                        type: "GET",
-
 
846
                        url: 'change_rechnungsadresse.php',
-
 
847
                        data: {
-
 
848
                            b_id: '{$order->id}',
-
 
849
                            login: '{$order->Login}'
-
 
850
                        },
-
 
851
                    }).done( function (html) {
-
 
852
                        setTimeout(function() {
-
 
853
                            $('#dialogRechnungsadresse').html(html);
-
 
854
                        });
-
 
855
 
-
 
856
                    });
-
 
857
 
-
 
858
                    //$(this).load('change_rechnungsadresse.php?b_id={$order->id}');
-
 
859
                },
-
 
860
                title: 'Rechnungsadresse dieser Bestellung ändern',
-
 
861
 
-
 
862
                buttons: [
-
 
863
                    {
-
 
864
                        text:"Abbrechen",
-
 
865
                        click: function() {
-
 
866
                            $( rDialog ).dialog( "close" );
-
 
867
                        }
-
 
868
                    },
-
 
869
                    {if $order->Login > 100 && $daten.Login.defaultRechnungIdAdresse}
-
 
870
                    {
-
 
871
                        text:"Standard-RE-Adresse einlesen",
-
 
872
                        click: function() {
-
 
873
                            $( rDialog ).load("change_rechnungsadresse.php?billAddrId=standard&l_id={$order->Login}");
-
 
874
                        }
-
 
875
                    }
-
 
876
                    {/if}
-
 
877
                ]
-
 
878
 
-
 
879
            });
-
 
880
 
-
 
881
            $('.changeRechnungsadresse').click(function(){
-
 
882
                $('#dialogRechnungsadresse').dialog("open");
-
 
883
            });
-
 
884
            {/if}
-
 
885
            {if isset($user_rechte.Warenwirtschaft.logistiker.tracking_input)}
-
 
886
            $( "#add_tracking_nr" ).dialog({
-
 
887
                autoOpen: false,
-
 
888
                minWidth: 400,
-
 
889
                resizable: false
-
 
890
            });
-
 
891
            $('.button').css("cursor","pointer").click(add_tracking_nr);
-
 
892
 
-
 
893
            $('#datum').datepicker();
-
 
894
 
-
 
895
            {/if}
-
 
896
            $('#VersandDialog').dialog({
-
 
897
                modal:true,
-
 
898
                autoOpen:false,
-
 
899
                width:"90%",
-
 
900
                resizable:false,
-
 
901
                buttons:{
-
 
902
                    "drucken":function(){
-
 
903
                        printLabel();
-
 
904
                    },
-
 
905
                    "abbrechen":function()
-
 
906
                    {
-
 
907
                        $(this).dialog("close");
-
 
908
                    }
-
 
909
                }
-
 
910
            });
-
 
911
            {if $VersandDialog==true}
-
 
912
            $('.labeldruck').css("cursor","pointer").click(showVersandDialog);
-
 
913
            {else}
-
 
914
            $('.labeldruck').css("cursor","pointer").click(printLabel);
-
 
915
            {/if}
-
 
916
 
-
 
917
            {if isset($user_rechte.Warenwirtschaft.bestellung.billsafe)}
-
 
918
            $('.billsafe_phone').click(billsafe_phone);
-
 
919
            {/if}
-
 
920
            //$("input[type=button],input[type=submit],button,input[type=reset]").button();
-
 
921
 
-
 
922
 
-
 
923
            {if isset($user_rechte.Warenwirtschaft.bestellung.lieferschein)}
-
 
924
            $('.lieferschein_vorschalt_druck').click(function(){
-
 
925
                $('<div id="dialogLieferschein">').dialog({
-
 
926
                    modal: true,
-
 
927
                    resizable: true,
-
 
928
                    position: "center top",
-
 
929
                    open: function() {
-
 
930
                        $(this).load('lieferschein.php?b_id={$order->id}');
-
 
931
                    },
-
 
932
                    close: function(event, ui) {
-
 
933
                        $(this).dialog('destroy').remove();
-
 
934
                    },
-
 
935
                    width: 1050,
-
 
936
                    title: 'Lieferschein erstellen',
-
 
937
                    position: ['center',30],
-
 
938
                });
-
 
939
            });
-
 
940
            {/if}
-
 
941
 
-
 
942
            {if isset($user_rechte.Warenwirtschaft.bestellung.proforma_rechnung)}
-
 
943
            $('.proforma_vorschalt_druck').click(function(){
-
 
944
                $('<div id="dialogRechnung">').dialog({
-
 
945
                    modal: true,
-
 
946
                    resizable: true,
-
 
947
                    position: "center top",
-
 
948
                    open: function() {
-
 
949
                        $(this).load('{if $rechnung_v2}rechnung_v2.php{elseif $rechnung_v3}rechnung_v3.php{elseif $rechnung_v4}rechnung_v4.php{else}rechnung.php{/if}?b_id={$order->id}&proforma_rechnung=1');
-
 
950
                    },
-
 
951
                    close: function(event, ui) {
-
 
952
                        $(this).dialog('destroy').remove();
-
 
953
                    },
-
 
954
                    width: 1050,
-
 
955
                    title: 'Proformarechnung erstellen',
-
 
956
                    position: ['center',30],
-
 
957
                });
-
 
958
            });
-
 
959
            {/if}
-
 
960
 
-
 
961
            {if isset($user_rechte.Warenwirtschaft.bestellung.rechnung)}
-
 
962
            $('.rechnung_vorschalt_druck').click(function(){
-
 
963
                $('<div id="dialogRechnung">').dialog({
-
 
964
                    modal: true,
-
 
965
                    resizable: true,
-
 
966
                    position: "center top",
-
 
967
                    open: function() {
-
 
968
                        $(this).load('{if $rechnung_v2}rechnung_v2.php{elseif $rechnung_v3}rechnung_v3.php{elseif $rechnung_v4}rechnung_v4.php{else}rechnung.php{/if}?b_id={$order->id}&action=rechnungDrucken&verandAuswaehlen=1');
-
 
969
                    },
-
 
970
                    close: function(event, ui) {
-
 
971
                        $(this).dialog('destroy').remove();
-
 
972
                    },
-
 
973
                    width: 1050,
-
 
974
                    title: 'Rechnung erstellen',
-
 
975
                    position: ['center',30],
-
 
976
                });
-
 
977
            });
-
 
978
            {/if}
-
 
979
 
-
 
980
            //Wenn Recht gesetzt ist "vorschaltseite" dann Dialog mit Angebot.
-
 
981
            {if strpos($web_rechte.Warenwirtschaft.bestellung.angebot,'vorschaltseite')!= false}
-
 
982
            $('.angebot_vorschalt_druck').click(function(){
-
 
983
                $('<div id="dialogAngebot">').dialog({
-
 
984
                    modal: true,
-
 
985
                    resizable: true,
-
 
986
                    position: "center top",
-
 
987
                    open: function() {
-
 
988
                        $(this).load('angebot.php?b_id={$order->id}&Userdata_anrede={$order->Anrede}&Userdata_Nachname={$order->Name1|urlencode}&action=angebotvorschaltseite');
-
 
989
                    },
-
 
990
                    close: function(event, ui) {
-
 
991
                        $(this).dialog('destroy').remove();
-
 
992
                    },
-
 
993
                    width: 1050,
-
 
994
                    title: 'Angebot erstellen',
-
 
995
                    position: ['center',30],
-
 
996
                });
-
 
997
            });
-
 
998
            {/if}
-
 
999
 
-
 
1000
 
-
 
1001
 
-
 
1002
            {if isset($web_rechte.Warenwirtschaft.lagerwirtschaft.meldebestandsliste) && $produktionsverbuchung === true}
-
 
1003
            $(".produktionsverbuchung").click(function(){
-
 
1004
                $("<div id='produktionsverbuchung'></div>").dialog({
-
 
1005
                    position: "center",
-
 
1006
                    zIndex: 5,
-
 
1007
                    modal: true,
-
 
1008
                    title: "Produktionsverbuchung",
-
 
1009
                    width: 750,
-
 
1010
                    open : function(){
-
 
1011
                        $(this).load('{$verbuchungsScript}');
-
 
1012
                    },
-
 
1013
                    close : function(){
-
 
1014
                        $(this).dialog('destroy').remove();
-
 
1015
                    },
-
 
1016
                    buttons: [
-
 
1017
                        {
-
 
1018
                            text: "Abbrechen",
-
 
1019
                            click: function() {
-
 
1020
                                $(this).dialog('destroy').remove();
-
 
1021
                            }
-
 
1022
                        },
-
 
1023
                        {
-
 
1024
                            text: "Verbuchen",
-
 
1025
                            click: function() {
-
 
1026
                                let data = [];
-
 
1027
                                let istGueltig = true;
-
 
1028
 
-
 
1029
                                $(".produktionsAnzahlInput").each(function(){
-
 
1030
                                    if( ( $(this).val().length == 0 || $(this).val() == "" ) && istGueltig ){
-
 
1031
                                        istGueltig = false;
-
 
1032
                                    }
-
 
1033
                                });
-
 
1034
 
-
 
1035
                                if( istGueltig ){
-
 
1036
                                    let produktionsArtikel = $("#produktionArtikelListe").serialize();
-
 
1037
                                    $.ajax({
-
 
1038
                                        type: "POST",
-
 
1039
                                        url : "{$verbuchungsScript}",
-
 
1040
                                        data: produktionsArtikel
-
 
1041
                                    }).done(function(msg){
-
 
1042
                                        alert(msg);
-
 
1043
                                        document.location.href="/Warenwirtschaft/bestellungen.php?Bestellung={$order->id}";
-
 
1044
                                    })
-
 
1045
                                } else {
-
 
1046
                                    alert( "Bitte zu jedem Artikel die Menge angeben!" );
-
 
1047
                                }
-
 
1048
                            }
-
 
1049
                        }
-
 
1050
                    ]
-
 
1051
                });
-
 
1052
            })
-
 
1053
            {/if}
-
 
1054
        });
-
 
1055
 
-
 
1056
        function showVersandDialog()
-
 
1057
        {
-
 
1058
            let logistiker_id=$('#logistiker_id').val();
-
 
1059
            let pScript="{$druckScript}"+"&id="+logistiker_id+"&mode=druckdialog";
-
 
1060
            $('#VersandDialog').load(pScript,function(){
-
 
1061
                $('#VersandDialog').dialog("open");
-
 
1062
            });
-
 
1063
        }
-
 
1064
 
-
 
1065
        function printLabel()
-
 
1066
        {
-
 
1067
            let logistiker_id=$('#logistiker_id').val();
-
 
1068
            let pScript="{$druckScript}"+"&json=1&id="+logistiker_id;
-
 
1069
            {if $labeldruck===true}
-
 
1070
            $('#loadingDLG').dialog("open");
-
 
1071
            $.getJSON(pScript,$('#Versandoptionen').serialize(),function(html){
-
 
1072
                $('#loadingDLG').dialog("close");
-
 
1073
                if(html.code[1]==0)
-
 
1074
                {
-
 
1075
                    for(let i=1;i<=html.anzahl;i++)
-
 
1076
                    {
-
 
1077
                        window.open(html.msg[i]);
-
 
1078
                    }
-
 
1079
                    document.location.href="/Warenwirtschaft/bestellungen.php?Bestellung={$order->id}";
-
 
1080
                }
-
 
1081
                else
-
 
1082
                {
-
 
1083
                    let msgs=html.msg;
-
 
1084
                    let msg=msgs[1];
-
 
1085
                    $('#labelReturn').html(msg).dialog("open");
-
 
1086
                }
-
 
1087
            });
-
 
1088
            {elseif $labeldruck=="export"}
-
 
1089
            window.open(pScript);
-
 
1090
            {/if}
-
 
1091
        }
-
 
1092
        {if isset($user_rechte.Warenwirtschaft.bestellung.billsafe)}
-
 
1093
        function billsafe_phone()
-
 
1094
        {
-
 
1095
            //alert(this.id);
-
 
1096
            let bs_id=this.id;
-
 
1097
            bs_id=bs_id.split("_");
-
 
1098
            let shop_id=bs_id[3];
-
 
1099
            let best_id=bs_id[2];
-
 
1100
            let url="/Warenwirtschaft/billsafe.php?shops_id="+shop_id+"&bestell_id="+best_id;
-
 
1101
            window.open(url);
-
 
1102
        }
-
 
1103
        {/if}
-
 
1104
        {if isset($user_rechte.Warenwirtschaft.logistiker.tracking_input)}
-
 
1105
        function save_tracking(e)
-
 
1106
        {
-
 
1107
            if(this.id=="send_tracking")
-
 
1108
            {
-
 
1109
                e.preventDefault();
-
 
1110
            }
-
 
1111
            $.post("/Warenwirtschaft/add_tracking_nr.php",$('#add_tracking_nr_form').serializeArray(),function(html){
-
 
1112
                let erg=html.split("|");
-
 
1113
                if(erg[0]==1)
-
 
1114
                {
-
 
1115
                    alert(erg[1]);
-
 
1116
                }
-
 
1117
                else
-
 
1118
                {
-
 
1119
                    $('#tracking').load('gettracking.php',$('#add_tracking_nr_form').serialize()).show();
-
 
1120
                    $('#add_tracking_nr').dialog("close");
-
 
1121
                }
-
 
1122
            })
-
 
1123
            //alert("Test");
-
 
1124
        }
-
 
1125
        function add_tracking_nr()
-
 
1126
        {
-
 
1127
            $('#add_tracking_nr').dialog("open");
-
 
1128
        }
-
 
1129
        {/if}
-
 
1130
 
-
 
1131
        function setzeTermin(rechnungsName,bestellID)
-
 
1132
        {
-
 
1133
            $('#response').load('storno.php?rid='+rechnungsName+'&bid='+bestellID, function() {
-
 
1134
                alert('Termin wurde erstellt.');
-
 
1135
            });
-
 
1136
        }
-
 
1137
 
-
 
1138
        // ME: Dialog für Kundenbemerkung
-
 
1139
        {if isset($web_rechte.Warenwirtschaft.bestellung.kundenbemerkung_layer)}
-
 
1140
        $(function() {
-
 
1141
            $( "#kundenbemerkung_layer" ).dialog({
-
 
1142
                autoOpen: true,
-
 
1143
                minWidth: 400,
-
 
1144
                minHeight:250
-
 
1145
 
-
 
1146
            });
-
 
1147
        });
-
 
1148
        {/if}
-
 
1149
 
-
 
1150
        $(function() {
-
 
1151
            $( "#invoice_dlg" ).dialog({
-
 
1152
                autoOpen: false,
-
 
1153
                minWidth: 400,
-
 
1154
                minHeight:250
-
 
1155
            });
-
 
1156
        });
-
 
1157
 
-
 
1158
        {if $order->notiz}
-
 
1159
        $(function(){
-
 
1160
            $( "#notizDlg" ).dialog({
-
 
1161
                modal:true,
-
 
1162
                minWidth: 400,
-
 
1163
                minHeight:250,
-
 
1164
                buttons:
-
 
1165
                    {
-
 
1166
                        "abbrechen":function()
-
 
1167
                        {
-
 
1168
                            $(this).dialog("close");
-
 
1169
                        },
-
 
1170
                        "nicht mehr anzeigen": function()
-
 
1171
                        {
-
 
1172
                            $("#updReturn").load("update_bestellung.php?id={$order->id}&notiz=dismiss",function(){
-
 
1173
                                $('#updReturn').dialog("open");
-
 
1174
                                $('#notizDlg').dialog("close");
-
 
1175
                            })
-
 
1176
                        }
-
 
1177
                    }
-
 
1178
 
-
 
1179
            });
-
 
1180
        });
-
 
1181
        {/if}
-
 
1182
 
-
 
1183
        {if $order->mwst_befreiung=="on"}
-
 
1184
        $(function() {
-
 
1185
            $( "#ustid_layer" ).dialog({
-
 
1186
                autoOpen: true,
-
 
1187
                minWidth: 400,
-
 
1188
                minHeight:250
-
 
1189
 
-
 
1190
            });
-
 
1191
        });
-
 
1192
        {/if}
-
 
1193
    </script>
-
 
1194
    <style>
-
 
1195
 
-
 
1196
        #kundenbemerkung_layer,
-
 
1197
        #notizDlg,
-
 
1198
        #updReturn,
-
 
1199
        #ustid_layer
-
 
1200
        {
-
 
1201
            background-color:#ccc;
-
 
1202
        }
-
 
1203
 
-
 
1204
        {include_php file="../styles/styles.php"}
-
 
1205
 
-
 
1206
        .stornoGrau , .stornoGrau a{
-
 
1207
            color:grey;
-
 
1208
        }
-
 
1209
        .title {
-
 
1210
            float:right;
-
 
1211
        }
-
 
1212
    </style>
-
 
1213
    {assign var=artikel_anzahl value=$order->artikel|@count}
-
 
1214
    <span class="noprint">
-
 
1215
        {if isset($user_rechte.Warenwirtschaft.bestellung.preise_anzeigen)}
-
 
1216
            <a href="javascript:drucken_ohne_preis();">Drucken ohne Preise</a>
-
 
1217
        {/if}
-
 
1218
        </span>
-
 
1219
 
-
 
1220
    <form method="post" action="{$SCRIPT_NAME}#{$order->id}" name="formname" enctype="multipart/form-data" id="bestellungFormular">
4
        <input type="hidden" name="_token" value="{csrf_token()}">
1221
        <input type="hidden" name="_token" value="{csrf_token()}">
5
        <input type="hidden" name="_method" value="PATCH">
1222
        <input type="hidden" name="_method" value="PATCH">
-
 
1223
        <input type="hidden" name="Bestellung" value="{$order->id}" id="best_id"/>
-
 
1224
        <table border="0" cellspacing="0" cellpadding="3" class="bestellungFormular">
-
 
1225
            <tr>
-
 
1226
                <td colspan="{if $d_colspan}3{else}2{/if}" class="links noprint">Bestellung: Bearbeiten
-
 
1227
 
-
 
1228
                    {if $showtitle===1}
-
 
1229
                        <div class="title">
-
 
1230
                            <input id="titel" type="text" name="titel" value="{$order->titel}" placeholder="Bestelltitel" />
-
 
1231
                        </div>
-
 
1232
                    {/if}
-
 
1233
 
-
 
1234
                </td>
-
 
1235
            </tr>
-
 
1236
 
-
 
1237
 
-
 
1238
            <tr>
-
 
1239
                <td class="links noprint">Bestellnummer:</td>
-
 
1240
                <td  class="bestellnummer">
-
 
1241
                    <div style="float:left;">
-
 
1242
                        {$order->id}- {$order->Language} - Shop: {html_options options=$c_shops name="s_id" id="s_id" style="display:none" selected=$order->shops_ID  onchange="document.getElementById('s_changed').value=1"}<span {if $order->status!='storniert'} ondblclick="display_s_id();"{/if} id="s_name">{$order->shop}</span>{if $bestellarten}, {html_options name="ba_id" options=$c_bestellarten id="ba_id" style="display:none" selected="{$order->bestellart_id}"} <span id="ba_name">{$order->Bestellart}</span>{/if}
-
 
1243
                        {if $order->Bestellart=="Verleih"}
-
 
1244
                            <input type="button" id="vertrag_oeffnen" value="Vertrag öffnen" />
-
 
1245
                        {/if}
-
 
1246
                        {if $order->Bestellart=="Tortenbestellung"}
-
 
1247
                            <input type="button" id="vertrag_oeffnen_individual" value="Vertrag öffnen" />
-
 
1248
                        {/if}
-
 
1249
                    </div>
-
 
1250
                    <input type="hidden" name="s_changed" id="s_changed" value="0"/>
-
 
1251
                    <input type="hidden" name="ba_changed" id="ba_changed" value="0"/>
-
 
1252
                    {if isset($order->tax)}
-
 
1253
                        &nbsp;&nbsp;&nbsp;
-
 
1254
                        <div class="select_tax_container">
-
 
1255
                            <div class="select_tax_mode"></div>
-
 
1256
                            <select name="b_tax" id="b_tax" class="noprint">
-
 
1257
                                <option {if $order->tax==0}selected="selected"{/if} value="0">Nettobestellung</option>
-
 
1258
                                <option {if $order->tax==1}selected="selected"{/if} value="1">Bruttobestellung</option>
-
 
1259
                            </select>
-
 
1260
                        </div>
-
 
1261
                        <div class="onprint">{if $order->tax==0}Nettobestellung{else}Bruttobestellung{/if}</div>
-
 
1262
                        {if $order->kk_info.anbieter=="klarna"}
-
 
1263
                            <span style="font-size: 14px; color: red; text-decoration: underline; font-weight: bold; float: right; margin-right: 5px;"><img src="/images/Icons/Info_icon.png" alt="(!)" />Klarna Bestellung</span>
-
 
1264
                        {/if}
-
 
1265
                    {/if}
-
 
1266
 
-
 
1267
                    {if $barcode_bestNr_src}
-
 
1268
                        <img class="onprint" src="{$barcode_bestNr_src}"  alt=""/>
-
 
1269
                    {/if}
-
 
1270
 
-
 
1271
                    {if $order->status=='storniert'}<strong>STORNIERT</strong>{/if}
-
 
1272
                </td>
-
 
1273
                {if $d_colspan}
-
 
1274
                    <td class="fremdBestellnummer">
-
 
1275
                        {if isset($user_rechte.Warenwirtschaft.bestellung.fremd_id)}
-
 
1276
                            {if !$web_rechte.Warenwirtschaft.bestellung.fremd_id}
-
 
1277
                                fremde Bestellnummer:
-
 
1278
                            {else}
-
 
1279
                                {$web_rechte.Warenwirtschaft.bestellung.fremd_id|trim:":"}
-
 
1280
                            {/if} {if $order->fremd_id}{$order->fremd_id}{else}<input type="text" name="fremd_id" value="" />{/if}
-
 
1281
                        {else}
-
 
1282
                            &nbsp;
-
 
1283
                        {/if}
-
 
1284
                        <br />
-
 
1285
                        <!-- Bezahlstatus START -->
-
 
1286
                        {if isset($web_rechte.Warenwirtschaft.bezahlstatus.bezahlstatus)}
-
 
1287
                            <input type="hidden" name="bezahlt" value="{$order->bezahlt}"/>
-
 
1288
                            <script type="text/javascript">
-
 
1289
                                function buildBezahltBox(selID,bemerkung) {
-
 
1290
                                    let optArr = [];
-
 
1291
                                    optArr[0] = 'nicht bezahlt';
-
 
1292
                                    {if isset($user_rechte.Warenwirtschaft.bezahlstatus.bezahlt_setzen)}
-
 
1293
                                    optArr[1] = 'bezahlt';
-
 
1294
                                    {/if}
-
 
1295
 
-
 
1296
                                    {if isset($user_rechte.Warenwirtschaft.bezahlstatus.vorbezahlt_setzen)}
-
 
1297
                                    optArr[2] = 'vorbezahlt';
-
 
1298
                                    {/if}
-
 
1299
 
-
 
1300
 
-
 
1301
                                    let bezahltBox = "";
-
 
1302
                                    bezahltBox += "Bezahlstatus: <select style=\"padding:2px;\" id=\"bezahlstatus_select\" name=\"bezahlt\">\n";
-
 
1303
                                    let selected="";
-
 
1304
                                    if(optArr[0]) {
-
 
1305
                                        if(selID==0) {
-
 
1306
                                            selected = " selected=\"selected\" ";
-
 
1307
                                        }
-
 
1308
                                        bezahltBox += "<option value=\"0\" "+selected+">"+optArr[0]+"</option>";
-
 
1309
                                    }
-
 
1310
                                    if(optArr[2]) {
-
 
1311
                                        if(selID==2) {
-
 
1312
                                            selected = " selected=\"selected\" ";
-
 
1313
                                        }
-
 
1314
                                        bezahltBox += "<option value=\"2\" "+selected+">"+optArr[2]+"</option>";
-
 
1315
                                    }
-
 
1316
                                    if(optArr[1]) {
-
 
1317
                                        if(selID==1) {
-
 
1318
                                            selected = " selected=\"selected\" ";
-
 
1319
                                        }
-
 
1320
                                        bezahltBox += "<option value=\"1\" "+selected+">"+optArr[1]+"</option>";
-
 
1321
                                    }
-
 
1322
                                    bezahltBox += "</select><br/><br/>\n";
-
 
1323
                                    bezahltBox += "Bemerkung:<br/><textarea id=\"bezahlt_bemerkung_text\" cols=\"45\" rows=\"6\">"+bemerkung+"</textarea>\n";
-
 
1324
 
-
 
1325
 
-
 
1326
                                    return bezahltBox;
-
 
1327
                                }
-
 
1328
 
-
 
1329
                                function openBezahltDialog(bezahlt,bemerkung) {
-
 
1330
                                    $('#bezahltDialog').dialog({
-
 
1331
                                        title:'Bezahlstatus/Bemerkung: ',
-
 
1332
                                        width:400,
-
 
1333
                                        modal: true,
-
 
1334
                                        buttons: {
-
 
1335
                                            " Speichern und Schliessen ": function() {
-
 
1336
                                                $('#bezahlt_hidden').val( $('#bezahlstatus_select').val() );
-
 
1337
                                                $('#bezahlt_bemerkung_hidden').val( $('#bezahlt_bemerkung_text').val() );
-
 
1338
                                                $( this ).dialog( "close" );
-
 
1339
                                                $('#cur').trigger('click');
-
 
1340
                                            },
-
 
1341
                                            Abbrechen: function() {
-
 
1342
                                                $( this ).dialog( "close" );
-
 
1343
                                            }
-
 
1344
                                        }
-
 
1345
                                    }).html(buildBezahltBox(bezahlt,bemerkung));
-
 
1346
                                }
-
 
1347
 
-
 
1348
 
-
 
1349
                            </script>
-
 
1350
                            <div style="{if $order->status!='storniert'}cursor:pointer;{/if}float:left;" id="bezahltBox" {if $order->status!='storniert' && (isset($user_rechte.Warenwirtschaft.bezahlstatus.bezahlt_setzen) || isset($user_rechte.Warenwirtschaft.bezahlstatus.vorbezahlt_setzen))} ondblclick="openBezahltDialog('{$order->bezahlt}','{$order->bezahlt_bemerkung|escape:"javascript"}');" {/if} >
-
 
1351
                                <div style="float:left;" {if $order->bezahlt_bemerkung && (isset($user_rechte.Warenwirtschaft.bezahlstatus.bezahlt_setzen) || isset($user_rechte.Warenwirtschaft.bezahlstatus.vorbezahlt_setzen))}onmouseover="overlib('{$order->bezahlt_bemerkung|escape:"javascript"}<br/><br/><b>Doppelklick zum Bearbeiten</b>');" onmouseout="nd();" {else}onmouseover="overlib('{$order->bezahlt_bemerkung|escape:"javascript"}');" onmouseout="nd();"{/if}>Bezahlstatus:&nbsp;&nbsp;</div>
-
 
1352
                                <input value="{$order->bezahlt}" type="hidden" name="bezahlt" id="bezahlt_hidden" />
-
 
1353
                                <input value="{$order->bezahlt_bemerkung}" type="hidden" name="bezahlt_bemerkung" id="bezahlt_bemerkung_hidden" />
-
 
1354
                                <div style="float:left;" {if $order->bezahlt_bemerkung && (isset($user_rechte.Warenwirtschaft.bezahlstatus.bezahlt_setzen) || isset($user_rechte.Warenwirtschaft.bezahlstatus.vorbezahlt_setzen))}onmouseover="overlib('{$order->bezahlt_bemerkung|escape:"javascript"}<br/><br/><b>Doppelklick zum Bearbeiten</b>');" onmouseout="nd();" {else}onmouseover="overlib('{$order->bezahlt_bemerkung|escape:"javascript"}');" onmouseout="nd();"{/if}>
-
 
1355
                                    {if $order->bezahlt==1}
-
 
1356
                                        <font style="font-weight:bold;color:#0f0">bezahlt</font>
-
 
1357
                                    {elseif $order->bezahlt==2}
-
 
1358
                                        <font style="font-weight:bold;color:#FCA600">vorbezahlt</font>
-
 
1359
                                    {else}
-
 
1360
                                        <font style="font-weight:bold;color:#f00">nicht bezahlt</font>
-
 
1361
                                    {/if}
-
 
1362
                                </div>
-
 
1363
                                <div style="float:left">{if $order->zahlart_id} - Zahlart: <span {if $order->bezahlt_fremdid}onmouseover="overlib('{$order->bezahlt_fremdid}');" onmouseout="nd();"{/if}>{$order->zahlart_name}{/if}</span></div>
-
 
1364
                            </div>
-
 
1365
                            <div id="bezahltDialog"></div>
-
 
1366
                        {/if}
-
 
1367
                        <!-- Bezahlstatus ENDE -->
-
 
1368
                    </td>
-
 
1369
                {/if}
-
 
1370
            </tr>
-
 
1371
            {if $bestellung_logistiker}
-
 
1372
            <tr>
-
 
1373
                <td class="links">Logistiker: </td>
-
 
1374
                <td>
-
 
1375
                    <div style="float:left;padding:0 0 5px 0;">
-
 
1376
                        {if $order->status=="storniert"}
-
 
1377
                            {if $logistiker_sel}
-
 
1378
                                {$logistiker.$logistiker_sel}
-
 
1379
                            {else}
-
 
1380
                                kein Logistiker gew&auml;hlt
-
 
1381
                            {/if}
-
 
1382
                        {else}
-
 
1383
                            <span class="print logistikerPrint"></span>
-
 
1384
                            {html_options id='logistiker_id' name="logistiker_id" options=$logistiker selected=$logistiker_sel class="noprint"}
-
 
1385
                            <script>
-
 
1386
                                $(document).ready(function(){
-
 
1387
                                    $(".logistikerPrint").text($("#logistiker_id option:selected").text());
-
 
1388
                                });
-
 
1389
                            </script>
-
 
1390
                        {if $order->logistiker_mail==1}
-
 
1391
                            <i class="fa fa-envelope-o" title="Kunde möchte E-Mail an Logistiker übergeben"></i>
-
 
1392
                        {/if}
-
 
1393
                        {if $labeldruck===true}
-
 
1394
                            <a class="labeldruck noprint" title="Versandlabel drucken"><img src="/images/navigation/drucker.png"  alt=""/></a>
-
 
1395
                        {elseif $labeldruck=="export"}
-
 
1396
                            <a class="labeldruck noprint" title="Bestellung exportieren"><img src="/images/navigation/drucker.png"  alt=""/></a>
-
 
1397
                        {/if}
-
 
1398
                        {if $produktionsverbuchung === true}
-
 
1399
                            <a class="produktionsverbuchung noprint" title="Produktion verbuchen"><img src="/images/Icons/edit2.png"  alt=""/></a>
-
 
1400
                        {/if}
-
 
1401
                        {/if}
-
 
1402
                        {if $order->status!='storniert'}
-
 
1403
                            <a class="button noprint" title="Paketverfolgungsnummern zuordnen"><img src="/images/navigation/kreuz.png"  alt=""/></a>
-
 
1404
                        {/if}
-
 
1405
                    </div>
-
 
1406
 
-
 
1407
                    <span style="float:left;display:inline;{if !$daten.paketdienst.nummern}display:none;{/if}" id="tracking">
-
 
1408
                             {include file="trackingnr.tpl"}
-
 
1409
                        </span>
-
 
1410
 
-
 
1411
 
-
 
1412
                </td>
-
 
1413
                {if $order->kk_info.anbieter=="klarna"}
-
 
1414
                    <td>
-
 
1415
                        <img src="https://cdn.klarna.com/1.0/shared/image/generic/logo/de_de/basic/logo_black.png?width=70" alt="Klarna Logo" />
-
 
1416
                        <a style="font-weight: bold; margin-right: 5px; float: right;" href="https://eu.portal.klarna.com/" target="_blank">Zum Klarna Händlerportal</a>
-
 
1417
                    </td>
-
 
1418
                {/if}
-
 
1419
            </tr>
-
 
1420
            {/if}
-
 
1421
            <tr>
-
 
1422
                <td valign="top" class="links noprint">
-
 
1423
                    {if $order->Login>=100}
-
 
1424
                    <a href="/logins/logins.php?action=edit&ID={$order->Login}">
-
 
1425
                        {/if}
-
 
1426
                        Kunde:
-
 
1427
                        {if $order->Login>=100}
-
 
1428
                        {$order->Login}
-
 
1429
                    </a>
-
 
1430
                    {if $order->Status}
-
 
1431
                        <br/>
-
 
1432
                        Userlevel: {$order->Status}
-
 
1433
                    {/if}
-
 
1434
                    {else}
-
 
1435
                    <span title="{$order->Login}">
-
 
1436
                            {$daten.Login.name}
-
 
1437
                        </span>
-
 
1438
                <input type="button" id="umwandeln" value="in Kundenkonto umwandeln">
-
 
1439
                    {/if}
-
 
1440
                </td>
-
 
1441
                <td class="" {$d_colspan} style="background-color:#eaeaea;">
-
 
1442
                    <table cellpadding="0" cellspacing="0" class="anschrift">
-
 
1443
                        <tr>
-
 
1444
                            <td>
-
 
1445
                                <div class="editButtons noprint">
-
 
1446
 
-
 
1447
                                    {*} Kommentar / Sprechblase {*}
-
 
1448
                                    {if $order->comment}
-
 
1449
                                        <i style="color:#ff4040;" class="fa fa-commenting-o" aria-hidden="true" title="{$order->comment}"></i>
-
 
1450
                                    {/if}
-
 
1451
 
-
 
1452
                                    {if $order->E_Mail}
-
 
1453
                                        <a style="cursor:pointer;" {if $dialog}id="mailTemplateButton"{else} href="javascript:void(window.open('MailClient/index.php?id=0&Bestellung={$order->id}&shop={$order->shops_ID}&button=Mailausgang', 'MailClient', 'status, menubar, height=600, width=900, scrollbars=yes'));"{/if} title="E-Mail an {$order->E_Mail} verfassen"><i class="fa fa-envelope-o" aria-hidden="true"></i></a>
-
 
1454
                                    {/if}
-
 
1455
 
-
 
1456
 
-
 
1457
 
-
 
1458
                                    {if $order->Telefon}
-
 
1459
                                        <a title="Rechnungsadresse anrufen" href="callto:{$order->Telefon}" class="noprint"><i class="fa fa-phone" aria-hidden="true"></i></a>
-
 
1460
                                    {/if}
-
 
1461
                                    {if isset($order->bill_addr_id) && $order->bill_addr_id != NULL && $order->bill_addr_id > 0 && $order->bill_addr_id != ""}
-
 
1462
                                        <i title="Rechnungsadresse ändern" style="cursor:pointer;" class="fa fa-pencil noprint changeRechnungsadresse" aria-hidden="true"></i>
-
 
1463
                                    {/if}
-
 
1464
                                </div>
-
 
1465
 
-
 
1466
                                {if $order->status!="storniert"}
-
 
1467
                                    <strong>Rechnungsadresse:</strong>
-
 
1468
                                    <!-- Firma -->
-
 
1469
                                    {if $order->Name2}
-
 
1470
                                        <br />{$order->Name2}
-
 
1471
                                    {/if}
-
 
1472
                                    {if $order->Firma2}
-
 
1473
                                        <br />{$order->Firma2}
-
 
1474
                                    {/if}
-
 
1475
 
-
 
1476
                                    {if $order->Name1 || $order->Vorname}
-
 
1477
                                        <br />
-
 
1478
                                        {if $order->Anrede!="Firma"}
-
 
1479
                                            {$order->Anrede}
-
 
1480
                                        {/if}
-
 
1481
                                        {if $order->pro_title}
-
 
1482
                                            {$order->pro_title}
-
 
1483
                                        {/if}
-
 
1484
                                        {if $order->Vorname}
-
 
1485
                                            {$order->Vorname}
-
 
1486
                                        {/if}
-
 
1487
 
-
 
1488
                                        {if $order->Name1}
-
 
1489
                                            {$order->Name1}
-
 
1490
                                        {/if}
-
 
1491
                                    {/if}
-
 
1492
 
-
 
1493
                                    {if $order->Strasse}
-
 
1494
                                        <br />{$order->Strasse}&nbsp;{$order->Hausnummer}
-
 
1495
                                    {/if}
-
 
1496
                                    {if $order->strasse2}
-
 
1497
                                        <br />{$order->strasse2}
-
 
1498
                                    {/if}
-
 
1499
 
-
 
1500
                                    {if $order->PLZ || $order->ORT}
-
 
1501
                                        <br />{$order->PLZ} {$order->ORT}
-
 
1502
                                    {/if}
-
 
1503
 
-
 
1504
                                    {if $order->Land}
-
 
1505
                                        <br />
-
 
1506
                                        {if $order->Bundesland}
-
 
1507
                                            {$order->Bundesland}
-
 
1508
                                        {/if}
-
 
1509
                                        {$order->Land}
-
 
1510
                                    {/if}
-
 
1511
 
-
 
1512
                                    {if $order->Telefon}
-
 
1513
                                        <br />Tel.: {$order->Telefon}
-
 
1514
                                    {/if}
-
 
1515
 
-
 
1516
                                    {if $order->Telefon2}
-
 
1517
                                        <br />Mobil: {$order->Telefon2}
-
 
1518
                                    {/if}
-
 
1519
 
-
 
1520
                                    {if $order->Fax}
-
 
1521
                                        <br />Fax: {$order->Fax}
-
 
1522
                                    {/if}
-
 
1523
 
-
 
1524
                                    {if $order->vat_id}
-
 
1525
                                        <br />VAT ID: {$order->vat_id}
-
 
1526
                                    {/if}
-
 
1527
 
-
 
1528
                                    {if $order->E_Mail}
-
 
1529
                                        <br />{$order->E_Mail}
-
 
1530
                                    {/if}
-
 
1531
 
-
 
1532
 
-
 
1533
                                    {if $order->geburtsdatum}
-
 
1534
                                        <br />Geburtsdatum: {$order->geburtsdatum|date_format:"%x"}
-
 
1535
                                    {/if}
-
 
1536
                                    {if $order->schufa_result}
-
 
1537
                                        <br /><a class="schufa" title="{$order->schufa_result|nl2br}">&nbsp;</a>
-
 
1538
                                    {/if}
-
 
1539
 
-
 
1540
 
-
 
1541
                                {/if}
-
 
1542
 
-
 
1543
 
-
 
1544
                            </td>
-
 
1545
                        </tr>
-
 
1546
                    </table>
-
 
1547
 
-
 
1548
 
-
 
1549
                    {if $order->liefer_Strasse||$order->liefer_Name||$order->liefer_PLZ||$order->liefer_Ort||$order->liefer_Land||$order->liefer_Firma||$order->liefer_Str_Nr}
-
 
1550
 
-
 
1551
                        <table cellpadding="0" cellspacing="0" class="lieferanschrift">
-
 
1552
                            <tr>
-
 
1553
                                <td>
-
 
1554
                                    <div class="editButtons noprint">
-
 
1555
 
-
 
1556
                                        {*} Kommentar / Sprechblase {*}
-
 
1557
                                        {if $order->liefer_comment}
-
 
1558
                                            <i style="color:#ff4040;" class="fa fa-commenting-o" aria-hidden="true" title="{$order->liefer_comment}"></i>
-
 
1559
                                        {/if}
-
 
1560
 
-
 
1561
 
-
 
1562
                                        {if $order->status!='storniert' && $order->liefer_E_Mail && $order->liefer_E_Mail!=$order->E_Mail}
-
 
1563
                                            <a style="cursor:pointer;" {if $dialog}id="mailTemplateButton"{else} href="javascript:void(window.open('MailClient/index.php?id=0&Bestellung={$order->id}&shop={$order->shops_ID}&button=Mailausgang{if $order->E_Mail != $order->liefer_E_Mail}&email={$order->liefer_E_Mail}{/if}', 'MailClient', 'status, menubar, height=600, width=900, scrollbars=yes'));"{/if} title="E-Mail an {$order->liefer_E_Mail} verfassen">
-
 
1564
                                                <i class="fa fa-envelope-o" aria-hidden="true"></i></a>
-
 
1565
                                        {/if}
-
 
1566
 
-
 
1567
                                        {if $order->status!='storniert' && $order->liefer_Telefon}
-
 
1568
                                            <a title="Lieferadresse anrufen" style="text-decoration:none" href="callto:{$order->liefer_Telefon}" class="noprint">
-
 
1569
                                                <i class="fa fa-phone" aria-hidden="true"></i>
-
 
1570
                                            </a>
-
 
1571
                                        {/if}
-
 
1572
 
-
 
1573
                                        {if $order->status!="storniert"}
-
 
1574
                                            {if ( isset($user_rechte.Warenwirtschaft.bestellung.lieferadresse_aendern) )}
-
 
1575
                                                <i title="Lieferadresse ändern" style="cursor:pointer;" class="fa fa-pencil noprint changeLieferadresse" aria-hidden="true"></i>
-
 
1576
 
-
 
1577
                                                {*}
-
 
1578
                                                <input type="button" value="Lieferadresse {if $order->liefer_Strasse||$order->liefer_Name||$order->liefer_PLZ||$order->liefer_Ort||$order->liefer_Land||$order->liefer_Firma||$order->liefer_Str_Nr}bearbeiten{else}anlegen{/if}" class="noprint changeLieferadresse"/>
-
 
1579
                                                {*}
-
 
1580
                                            {/if}
-
 
1581
                                        {/if}
-
 
1582
                                    </div>
-
 
1583
 
-
 
1584
                                    <strong>Lieferadresse:</strong>
-
 
1585
 
-
 
1586
                                    {if $order->liefer_Firma != ''}
-
 
1587
                                        <br />{$order->liefer_Firma}
-
 
1588
                                    {/if}
-
 
1589
                                    {if $order->liefer_Firma2 != ''}
-
 
1590
                                        <br />{$order->liefer_Firma2}
-
 
1591
                                    {/if}
-
 
1592
 
-
 
1593
                                    {if $order->liefer_Anrede || $order->liefer_Vorname || $order->liefer_Name}
-
 
1594
                                        <br />
-
 
1595
                                        {if $order->liefer_Anrede!="Firma"}
-
 
1596
                                            {$order->liefer_Anrede}
-
 
1597
                                        {/if}
-
 
1598
                                        {if $order->liefer_pro_title}
-
 
1599
                                            {$order->liefer_pro_title}
-
 
1600
                                        {/if}
-
 
1601
                                        {$order->liefer_Vorname}
-
 
1602
                                        {$order->liefer_Name}
-
 
1603
                                    {/if}
-
 
1604
 
-
 
1605
                                    {if $order->liefer_Strasse || $order->liefer_Str_Nr}
-
 
1606
                                        <br />{$order->liefer_Strasse} {$order->liefer_Str_Nr}
-
 
1607
                                    {/if}
-
 
1608
 
-
 
1609
                                    {if $order->liefer_Strasse2}
-
 
1610
                                        <br />{$order->liefer_Strasse2}
-
 
1611
                                    {/if}
-
 
1612
 
-
 
1613
                                    {if $order->liefer_PLZ || $order->liefer_Ort}
-
 
1614
                                        <br />{$order->liefer_PLZ} {$order->liefer_Ort}
-
 
1615
                                    {/if}
-
 
1616
 
-
 
1617
                                    {if $order->liefer_Bundesland}
-
 
1618
                                        <br />{$order->liefer_Bundesland}
-
 
1619
                                    {/if}
-
 
1620
 
-
 
1621
                                    {if $order->liefer_Land}
-
 
1622
                                        <br />{$order->liefer_Land}
-
 
1623
                                    {/if}
-
 
1624
 
-
 
1625
                                    {if $order->status!='storniert' && $order->liefer_Telefon}
-
 
1626
                                        <br />Tel.: {$order->liefer_Telefon}
-
 
1627
                                    {/if}
-
 
1628
 
-
 
1629
                                    {if $order->liefer_Telefon2}
-
 
1630
                                        <br />Mobil: {$order->liefer_Telefon2}
-
 
1631
                                    {/if}
-
 
1632
 
-
 
1633
                                    {if $order->liefer_Fax}
-
 
1634
                                        <br />Fax: {$order->liefer_Fax}
-
 
1635
                                    {/if}
-
 
1636
 
-
 
1637
                                    {if $order->liefer_E_Mail}
-
 
1638
                                        <br />{$order->liefer_E_Mail}
-
 
1639
                                    {/if}
-
 
1640
 
-
 
1641
                                    {if $order->liefer_geburtsdatum}
-
 
1642
                                        <br />Geburtsdatum: {$order->liefer_geburtsdatum|date_format:"%x"}
-
 
1643
                                        {if $order->liefer_schufa_result}
-
 
1644
                                            <a class="schufa ui-icon ui-icon-info" style="float:left;cursor:help;margin-right:10px;" title="{$order->liefer_schufa_result|nl2br}">&nbsp;</a>
-
 
1645
                                        {/if}
-
 
1646
                                    {/if}
-
 
1647
 
-
 
1648
 
-
 
1649
 
-
 
1650
 
-
 
1651
                                </td>
-
 
1652
                            </tr>
-
 
1653
                        </table>
-
 
1654
                    {else}
-
 
1655
                        <input type="button" value="Lieferadresse anlegen" class="noprint changeLieferadresse addLieferadresse"/>
-
 
1656
                    {/if}
-
 
1657
                </td>
-
 
1658
            </tr>
-
 
1659
            <tr>
-
 
1660
                <td valign="top" class="links noprint">
-
 
1661
                    <p>
-
 
1662
                        Artikel:
-
 
1663
                        {if $verborgeneArtikel===true}
-
 
1664
                            {if $view_data.showHiddenItems===true}
-
 
1665
                                <a class="hideHiddenItems">verborgene Artikel ausblenden</a>
-
 
1666
                            {else}
-
 
1667
                                <a class="showHiddenItems">verborgene Artikel einblenden</a>
-
 
1668
                            {/if}
-
 
1669
                        {/if}
-
 
1670
                    </p>
-
 
1671
                </td>
-
 
1672
                <td align="right" class="rechts artikelTabelle" {$d_colspan}>
-
 
1673
                    <table class="artikelListe">
-
 
1674
                        <tr>
-
 
1675
                            <td class="leereUeberschrift">&nbsp;</td>
-
 
1676
                            <td class="leereUeberschrift">&nbsp;</td>
-
 
1677
                            <td class="leereUeberschrift">
-
 
1678
                                <div class="artikelDaten tabelle">
-
 
1679
                                    <div>
-
 
1680
                                        <div class="ersteZelle">&nbsp;</div>
-
 
1681
                                        <div class="zweiteZelle">&nbsp;</div>
-
 
1682
                                        <div class="dritteZelle noprint">EP {0|money_format_red:0:$order->locale:true}
-
 
1683
                                        </div>
-
 
1684
                                        <div class="noprint" style="width:26px;"></div>
-
 
1685
                                    </div>
-
 
1686
                                </div>
-
 
1687
                            </td>
-
 
1688
                            <td class="leereUeberschrift noprint">Ges. {0|money_format_red:0:$order->locale:true}</td>
-
 
1689
                            <td class="rechts ueberschrift">Artikelstatus</td>
-
 
1690
                            {if isset($user_rechte.Warenwirtschaft.bestellung.rechnungStatus)}
-
 
1691
                                <td class="rechts ueberschrift">Rechnung</td>
-
 
1692
                            {/if}
-
 
1693
                            {if isset($user_rechte.Warenwirtschaft.bestellung.lieferscheinStatus)}
-
 
1694
                                <td class="rechts ueberschrift">Lieferschein</td>
-
 
1695
                            {/if}
-
 
1696
                            {if isset($user_rechte.Warenwirtschaft.bestellung.mahnungStatus)}
-
 
1697
                                <td class="rechts ueberschrift">Mahnung</td>
-
 
1698
                            {/if}
-
 
1699
                            {if isset($user_rechte.Warenwirtschaft.bestellung.garantieStatus)}
-
 
1700
                                <td class="rechts ueberschrift">Garantieantrag</td>
-
 
1701
                            {/if}
-
 
1702
                        </tr>
-
 
1703
                        {assign var=i value=0}
-
 
1704
                        {section loop=$order->artikel name=a_ind}
-
 
1705
                            {if $order->artikel[a_ind].Father!=-3 && ($order->artikel[a_ind].status!="verborgen"||$view_data.showHiddenItems==true)}
-
 
1706
                                <tr class="{cycle values="darkgray,lightgray"}">
-
 
1707
                                    <td>
-
 
1708
                                        {if !$order->artikel[a_ind].abFather}
-
 
1709
                                            {assign var=i value=$i+1}
-
 
1710
                                            {$i}
-
 
1711
                                        {else}
-
 
1712
                                            <img class="ui-icon ui-icon-arrowreturnthick-1-e" style="border:0" />
-
 
1713
                                        {/if}
-
 
1714
                                    </td>
-
 
1715
                                    <td class="artikelKennung" style="width:50px;">
-
 
1716
                                        {if $order->artikel[a_ind].status=="storniert"}
-
 
1717
                                            {$order->artikel[a_ind].kennung|strike}
-
 
1718
                                        {else}
-
 
1719
                                            {$order->artikel[a_ind].kennung}
-
 
1720
                                        {/if}
-
 
1721
                                    </td>
-
 
1722
                                    <td {if $order->status!='storniert'} ondblclick="display_artikel({$order->artikel[a_ind].ab_id},'');"{/if} >
-
 
1723
                                        <input type="hidden" id="artikel_{$order->artikel[a_ind].ab_id}_changed" name="artikel_{$order->artikel[a_ind].ab_id}_changed" value="0"/>
-
 
1724
                                        <div class="artikelDaten tabelle">
-
 
1725
                                            <div>
-
 
1726
                                                <div class="ersteZelle">
-
 
1727
                                                    {if !$order->artikel[a_ind].abFather}
-
 
1728
                                                        <span id="eingabe_menge_{$order->artikel[a_ind].ab_id}" style="display:none;">
-
 
1729
                                                    <input type="text" name="cmd[artikel_to_Bestellung][{$order->artikel[a_ind].ab_id}][Menge]" size="2" value="{$order->artikel[a_ind].Menge}"/>
-
 
1730
                                                </span>
-
 
1731
                                                    {/if}
-
 
1732
                                                    <span id="ausgabe_menge_{$order->artikel[a_ind].ab_id}">
-
 
1733
                                                {if $order->artikel[a_ind].status=="storniert"}
-
 
1734
                                                    {$order->artikel[a_ind].Menge|number_format:3:",":"."|rtrim:0|rtrim:","|strike}<strike>&nbsp;x&nbsp;</strike>
-
 
1735
                                                {else}
-
 
1736
                                                    {if $order->artikel[a_ind].bestellte_menge!=$order->artikel[a_ind].gelieferte_menge && $order->artikel[a_ind].bestellte_menge!=0}{$order->artikel[a_ind].bestellte_menge|number_format:3:",":"."|rtrim:0|rtrim:","|strike}&nbsp;{$order->artikel[a_ind].einheit|strike}{/if}
-
 
1737
                                                    {if $order->artikel[a_ind].einheit}{$order->artikel[a_ind].gelieferte_menge|number_format:3:",":"."|rtrim:0|rtrim:","} {$order->artikel[a_ind].einheit}{else}{$order->artikel[a_ind].Menge|number_format:3:",":"."|rtrim:0|rtrim:","} x{/if}
-
 
1738
                                                {/if}
-
 
1739
                                                </span>
-
 
1740
                                                </div>
-
 
1741
                                                <div class="zweiteZelle" style="display:contents;">
-
 
1742
                                                    {if !$order->artikel[a_ind].abFather}
-
 
1743
                                                        <span id="eingabe_bez_{$order->artikel[a_ind].ab_id}" style="display:none;">
-
 
1744
                                                    <input type="text" name="cmd[artikel_to_Bestellung][{$order->artikel[a_ind].ab_id}][Bezeichnung]" size="45" value="{$order->artikel[a_ind].Bezeichnung|htmlentities:$smarty.const.ENT_COMPAT:$smarty.session.charset|default:$order->artikel[a_ind].kurzbezeichnung|htmlentities}"/>
-
 
1745
 
-
 
1746
                                                </span>
-
 
1747
                                                    {/if}
-
 
1748
                                                    <span id="ausgabe_bez_{$order->artikel[a_ind].ab_id}" class="bestandskennzeichnung" {if $order->artikel[a_ind].bestandsmenge > 0}style="background-color: {$bestandskennzeichnungsfarbe};" {/if}>
-
 
1749
                                                {if $order->artikel[a_ind].abFather}
-
 
1750
                                                    <img class="ui-icon ui-icon-arrowreturnthick-1-e" style="border:0;display:inline;" />
-
 
1751
                                                {/if}
-
 
1752
                                                        {if $order->artikel[a_ind].status=="storniert"}
-
 
1753
                                                            {$order->artikel[a_ind].hersteller|strike} {$order->artikel[a_ind].Bezeichnung|default:$order->artikel[a_ind].kurzbezeichnung|strike} {$order->artikel[a_ind].option_eingabe|strike}
-
 
1754
                                                        {else}
-
 
1755
                                                            {$order->artikel[a_ind].hersteller} {$order->artikel[a_ind].Bezeichnung|default:$order->artikel[a_ind].kurzbezeichnung} {$order->artikel[a_ind].option_eingabe}
-
 
1756
                                                        {/if}
-
 
1757
                                                </span>
-
 
1758
 
-
 
1759
                                                    <span class="noprint">(
-
 
1760
                                                {if $order->artikel[a_ind].artikel}
-
 
1761
                                                    {if $order->status!='storniert'}
-
 
1762
 
-
 
1763
 
-
 
1764
                                                        <a href="{if $d_shops[$order->shops_ID].domain}https://webanos.{if isset($web_rechte.Warenwirtschaft.bestellung.infoicon_orderdblink)}{$webs.kunde}{else}{$d_shops[$order->shops_ID].domain}{/if}{if $site!=$site_full}.local{/if}{/if}/Online-Shop/waren_tool.php?artikel={$order->artikel[a_ind].child_id|default:$order->artikel[a_ind].artikel}" target="_blank" class="noprint">{/if}<img src="/images/Icons/Info_icon.png" align="absmiddle" class="popup" title="Artikelverwaltung" />{if $order->status!='storniert'}</a>{/if}
-
 
1765
                                                {if $d_shops[$order->shops_ID].domain}
-
 
1766
                                                    |
-
 
1767
                                                    {if $order->status!='storniert'}
-
 
1768
                                                        <a href="https://www.{$d_shops[$order->shops_ID].domain}/index.php?item={$order->artikel[a_ind].child_id|default:$order->artikel[a_ind].artikel}" target="_blank">{/if}<img src="/images/Icons/Warenkorb_icon.png" align="absmiddle" class="popup" title="Artikel im Shop aufrufen" />{if $order->status!='storniert'}</a>{/if}
-
 
1769
                                                {/if}
-
 
1770
                                                {if $order->status!='storniert' && $order->artikel[a_ind].bild_url != "/images/Bild_1/" && $order->artikel[a_ind].bild_url != "/images/webelemente/"}|
-
 
1771
                                                    {if ( isset( $web_rechte["admin"]["toolbox"]["bildverwaltung"] ) )}
-
 
1772
                                                        <img src="/images/Icons/fotoaperat_icon.png" align="absmiddle" class="popupImg" id="{$shopname}{$order->artikel[a_ind].bild_url}"  alt=""/>
-
 
1773
                                                {else}
-
 
1774
                                                <img src="/images/Icons/fotoaperat_icon.png" align="absmiddle" class="popupImg" id="{$shopname}{$order->artikel[a_ind].bild_url}"  alt=""/>
-
 
1775
                                                    {/if}
-
 
1776
                                                {/if}
-
 
1777
                                                {/if}
-
 
1778
                                                        {include file="ipad_edit.tpl" id=$order->artikel[a_ind].ab_id art=""}
-
 
1779
                                                        {if ( isset( $user_rechte["Warenwirtschaft"]["bestellung"]["lieferantenbestellung"] ) )}
-
 
1780
                                                            {if $order->artikel[a_ind].Preis_pro_Stueck > 0}
-
 
1781
                                                                | {if $order->status!='storniert'}<a class="lager" id="lager_{$order->artikel[a_ind].artikel}_{$order->id}_{$order->shops_ID}_{$order->artikel[a_ind].Menge}_{$order->artikel[a_ind].ab_id}" style="display:inline;">{/if}<img src="/images/Icons/Order_icon.png" align="absmiddle" class="popup" title="Lieferantenbestellung" />{if $order->status!='storniert'}</a>{/if}
-
 
1782
                                                            {/if}
-
 
1783
                                                        {/if}
-
 
1784
 
-
 
1785
                                                        {if $order->artikel[a_ind].lieferstatusPicBest}
-
 
1786
                                                            | <a style="cursor:pointer">
-
 
1787
                                                    <img class="popup" align="absmiddle" src="{$order->artikel[a_ind].lieferstatusPicBest}" title="{$order->artikel[a_ind].lieferstatusPopUp}" /></a>
-
 
1788
                                                {else}
-
 
1789
                                                    | <a style="cursor:pointer" class="popup" title="{$order->artikel[a_ind].lieferstatusPopUp}">LS</a>
-
 
1790
                                                        {/if}
-
 
1791
 
-
 
1792
                                                | <i title="Artikelbeschreibung bearbeiten" data-id="{$order->artikel[a_ind].ab_id}" style="cursor:pointer;" class="fa fa-pencil edit_beschreibung noprint" aria-hidden="true"></i>
-
 
1793
 
-
 
1794
                                                {if $order->kk_info}
-
 
1795
                                                    <!--
-
 
1796
                                                <a style="cursor:pointer" class="refund" title="Betrag &uuml;ber {$order->kk_info.anbieter} erstatten" data-refund="{$order->artikel[a_ind].Preis_pro_Stueck*$order->artikel[a_ind].Menge}">{$order->kk_info.anbieter} Refund</a>
-
 
1797
                                                -->
-
 
1798
                                                {/if}
-
 
1799
                                                        {if !$order->artikel[a_ind].bestellte_menge && $order->artikel[a_ind].einheit}
-
 
1800
                                                            | <a style="cursor:pointer" title="Menge ändern" class="change_amount" id="m_{$order->artikel[a_ind].ab_id}">M</a>
-
 
1801
                                                        {/if}
-
 
1802
                                                )
-
 
1803
                                                </span>
-
 
1804
                                                    {if $order->artikel[a_ind].ebay_art_id}
-
 
1805
                                                        {if $order->artikel[a_ind].status=="storniert"}
-
 
1806
                                                            <strike>
-
 
1807
                                                        {/if}
-
 
1808
                                                        (<a href="https://cgi.ebay.de/ws/eBayISAPI.dll?ViewItem&rd=1&item={$order->artikel[a_ind].ebay_art_id}" target="_blank">ebay-Auktion</a>)
-
 
1809
                                                        {if $order->artikel[a_ind].status=="storniert"}
-
 
1810
                                                            </strike>
-
 
1811
                                                        {/if}
-
 
1812
                                                    {/if}
-
 
1813
                                                    {if $order->artikel[a_ind].beschreibung}
-
 
1814
                                                        <span id="beschreibung_indikator_{$order->artikel[a_ind].ab_id}"><br />[...]</span>
-
 
1815
                                                    {/if}
-
 
1816
 
-
 
1817
                                                    <textarea style="display:none;" id="beschreibung_{$order->artikel[a_ind].ab_id}" class="artikel_beschreibung"
-
 
1818
                                                              name="cmd[artikel_to_Bestellung][{$order->artikel[a_ind].ab_id}][beschreibung]"
-
 
1819
                                                              placeholder="Artikelbeschreibung">{$order->artikel[a_ind].beschreibung}</textarea>
-
 
1820
 
-
 
1821
                                                </div>
-
 
1822
                                                <div class="dritteZelle">
-
 
1823
                                                    {if $preise_anzeigen}
-
 
1824
                                                        {if !$order->artikel[a_ind].abFather}
-
 
1825
                                                            {if ( isset( $user_rechte.Warenwirtschaft.bestellung.steuersatz_aendern ) )}
-
 
1826
                                                                <span id="eingabe_mwst_{$order->artikel[a_ind].ab_id}" style="display:none;">
-
 
1827
                                                    <select id="landMwSt_{$order->artikel[a_ind].ab_id}" name="landMwSt_{$order->artikel[a_ind].ab_id}" class="eingabe_landMwSt">
-
 
1828
                                                        {foreach $laenderMwSt as $index => $laenderDaten}
-
 
1829
                                                            <option id="{$laenderDaten["id"]}" value="{$laenderDaten["typ_id"]}" {if $order->artikel[a_ind].mwst == $laenderDaten["typ_id"]}selected{/if}>{$laenderDaten["bezeichnung"]}</option>
-
 
1830
                                                        {/foreach}
-
 
1831
                                                    </select>
-
 
1832
                                                    <input type="hidden" value="{$laenderDaten["typ_id"]}" class="mwstLand"/>
-
 
1833
                                                </span>
-
 
1834
                                                            {/if}
-
 
1835
                                                            <span id="eingabe_preis_{$order->artikel[a_ind].ab_id}" style="display:none;">
-
 
1836
 
-
 
1837
                                                    <input style="margin:3px 0!important;" type="text" name="cmd[artikel_to_Bestellung][{$order->artikel[a_ind].ab_id}][Preis_pro_Stueck]" size="5" value="{$order->artikel[a_ind].Preis_pro_Stueck|number_format:2:",":""}" />
-
 
1838
 
-
 
1839
                                                    <div class="artikel_aktionen">
-
 
1840
                                                     <a  onmouseover="overlib('Artikel als storniert markieren.');" onmouseout="return nd();" onclick="change_status('a',{$order->id},{$order->artikel[a_ind].ab_id},'S','storniert');" style="cursor:pointer">X</a>
-
 
1841
 
-
 
1842
                                                    {if isset($user_rechte.Warenwirtschaft.bestellung.artikel_loeschen)}
-
 
1843
 
-
 
1844
                                                        <a onclick="javascript:return confirm('Soll dieser Artikel wirklich gelöscht werden?\nDie Aktion kann nicht rückgängig gemacht werden.');" href="/Warenwirtschaft/artikel_loeschen.php?ID={$order->artikel[a_ind].ab_id}&Bestellung={$order->id}"><img onmouseover="overlib('Artikel dauerhaft loeschen.');" onmouseout="return nd();" src="/images/navigation/trashcan.gif" /></a>
-
 
1845
 
-
 
1846
                                                    {/if}
-
 
1847
                                                    </div>
-
 
1848
                                                </span>
-
 
1849
                                                        {/if}
-
 
1850
                                                        <span id="ausgabe_preis_{$order->artikel[a_ind].ab_id}" class="preise" style="text-align:right;white-space: nowrap">
-
 
1851
                                                    {if $order->artikel[a_ind].status=="storniert"}
-
 
1852
                                                        {$order->artikel[a_ind].Preis_pro_Stueck|money_format_red:2:$order->locale:false:false|strike}
-
 
1853
                                                    {else}
-
 
1854
                                                        {if $order->artikel[a_ind].original_preis>0}{$order->artikel[a_ind].original_preis|money_format_red:2:$order->locale:false:false|strike}<br />{/if}
-
 
1855
                                                        {$order->artikel[a_ind].Preis_pro_Stueck|money_format_red:2:$order->locale:false:false}
-
 
1856
                                                    {/if}
-
 
1857
                                                            {if $mwst_ausgabe==1}
-
 
1858
 
-
 
1859
                                                                <span style="text-align:right;vertical-align:top;">
-
 
1860
                                                        {if isset($order->artikel[a_ind].mwst)}
-
 
1861
                                                            {$tax=$order->artikel[a_ind].mwst}
-
 
1862
                                                        {else}
-
 
1863
                                                            {$tax=$order->artikel[a_ind].tax1}
-
 
1864
                                                        {/if}
-
 
1865
                                                        <sup onmouseover="return overlib('<b>&nbsp;&nbsp;&nbsp;{if $tax==0}19{elseif $tax==1}7{elseif $tax==2}0{/if}% MwSt.</b>', CAPTION, '', HAUTO, VAUTO,WIDTH,90,BORDER,2);" onmouseout="return nd();" style="cursor:help;">
-
 
1866
                                                            {$tax+1}
-
 
1867
                                                        </sup>
-
 
1868
                                                    </span>
-
 
1869
                                                            {/if}
-
 
1870
                                                </span>
-
 
1871
                                                    {/if}
-
 
1872
                                                </div>
-
 
1873
                                                {if isset($web_rechte["Warenwirtschaft"]["bestellung"]["artikel_sortieren"])}
-
 
1874
                                                    <div class="noprint" style="width:32px;">
-
 
1875
                                                        {if $order->status!='storniert'&&!$order->artikel[a_ind].abFather}
-
 
1876
                                                            {if $i!=1}
-
 
1877
                                                                <a href="{$script_name}?Bestellung={$order->id}&dir=up&id={$order->artikel[a_ind].ab_id}"><img src="../images/Online-Shop/directory/Pfeil_oben.png" alt="auf" border="0" width="14" /></a>
-
 
1878
                                                            {/if}
-
 
1879
                                                            {if $smarty.section.a_ind.index < $artikel_anzahl -1 && ($order->artikel[a_ind].isKombi===false||$i==1)}
-
 
1880
                                                                <a href="{$script_name}?Bestellung={$order->id}&dir=down&id={$order->artikel[a_ind].ab_id}"><img src="../images/Online-Shop/directory/Pfeil_unten.png" alt="ab" border="0" width="14" /></a>
-
 
1881
                                                            {/if}
-
 
1882
                                                        {/if}
-
 
1883
                                                    </div>
-
 
1884
                                                {/if}
-
 
1885
                                            </div>
-
 
1886
                                        </div>
-
 
1887
                                    </td>
-
 
1888
                                    <td class="preise noprint" style="text-align:right;white-space: nowrap;width:50px;vertical-align:middle">
-
 
1889
                                        {if $preise_anzeigen}
-
 
1890
                                            {if $order->artikel[a_ind].status=="storniert"}
-
 
1891
                                                {if $order->artikel[a_ind].einheit!=""}
-
 
1892
                                                    {$order->artikel[a_ind].Preis_pro_Stueck*$order->artikel[a_ind].gelieferte_menge/($order->artikel[a_ind].bestellte_menge/$order->artikel[a_ind].Menge)|money_format_red:2:$order->locale:false:false|strike}
-
 
1893
                                                {else}
-
 
1894
                                                    {$order->artikel[a_ind].Preis_pro_Stueck* $order->artikel[a_ind].Menge|money_format_red:2:$order->locale:false:false|strike}
-
 
1895
                                                {/if}
-
 
1896
                                            {else}
-
 
1897
                                                {if $order->artikel[a_ind].einheit!=""}
-
 
1898
                                                    {$order->artikel[a_ind].Preis_pro_Stueck*$order->artikel[a_ind].gelieferte_menge/($order->artikel[a_ind].bestellte_menge/$order->artikel[a_ind].Menge)|money_format_red:2:$order->locale:false:false}
-
 
1899
                                                {else}
-
 
1900
                                                    {$order->artikel[a_ind].Preis_pro_Stueck* $order->artikel[a_ind].Menge|money_format_red:2:$order->locale:false:false}
-
 
1901
                                                {/if}
-
 
1902
                                            {/if}
-
 
1903
                                        {/if}
-
 
1904
                                    </td>
-
 
1905
                                    <td class="statusVierKaestchen" bgcolor="#eaeaea">
-
 
1906
                                        <input type="hidden" id="a_{$order->artikel[a_ind].ab_id}_status_f" value="{$order->artikel[a_ind].status}"/>
-
 
1907
                                        <div class="kaestchenWrapper">
-
 
1908
                                            {section loop=$daten.artikel_stati name=as_ind}
-
 
1909
                                                {if $order->artikel[a_ind].status==$daten.artikel_stati[as_ind].name}
-
 
1910
                                                    {assign var=class value=$daten.artikel_stati[as_ind].class}
-
 
1911
                                                {else}
-
 
1912
                                                    {assign var=class value="status_off"}
-
 
1913
                                                {/if}
-
 
1914
                                                <span nowrap="nowrap" {if $daten.artikel_stati[as_ind].name} class="darkgray kaestchen"{/if}>
-
 
1915
                                            <a class="{$class}" {if $order->status!='storniert'}onclick="change_status('a', {$order->id},{$order->artikel[a_ind].ab_id},'{$daten.artikel_stati[as_ind].short}','{$daten.artikel_stati[as_ind].name}');return false;" style="cursor:pointer"{/if} id="a_{$order->artikel[a_ind].ab_id}_{$daten.artikel_stati[as_ind].short}" title="{$daten.artikel_stati[as_ind].name}">&nbsp;{$daten.artikel_stati[as_ind].short}&nbsp;</a>
-
 
1916
                                        </span>
-
 
1917
                                            {/section}
-
 
1918
                                        </div>
-
 
1919
                                    </td>
-
 
1920
 
-
 
1921
                                    {if isset($user_rechte.Warenwirtschaft.bestellung.rechnungStatus)}
-
 
1922
                                        <td class="statusDreiKaestchen" bgcolor="#eaeaea">
-
 
1923
                                            <input type="hidden" id="r_{$order->artikel[a_ind].ab_id}_status_f" value="{$order->artikel[a_ind].rechnungstatus}"/>
-
 
1924
                                            <div class="kaestchenWrapper">
-
 
1925
                                                {section loop=$daten.rechnung_stati name=rs_ind}
-
 
1926
                                                    {if $order->artikel[a_ind].rechnungstatus==$daten.rechnung_stati[rs_ind].name}
-
 
1927
                                                        {assign var=class value=$daten.rechnung_stati[rs_ind].class}
-
 
1928
                                                    {else}
-
 
1929
                                                        {assign var=class value="status_off"}
-
 
1930
                                                    {/if}
-
 
1931
                                                    <span nowrap="nowrap" {if $daten.rechnung_stati[rs_ind].name} class="darkgray kaestchen"{/if}>
-
 
1932
                                            <a class="{$class}" {if $order->status!='storniert'}onclick="change_status('r', {$order->id},{$order->artikel[a_ind].ab_id},'{$daten.rechnung_stati[rs_ind].short}','{$daten.rechnung_stati[rs_ind].name}');return false;" style="cursor:pointer"{/if} id="r_{$order->artikel[a_ind].ab_id}_{$daten.rechnung_stati[rs_ind].short}" title="{$daten.rechnung_stati[rs_ind].name}">&nbsp;{$daten.rechnung_stati[rs_ind].short}&nbsp;</a>
-
 
1933
                                        </span>
-
 
1934
                                                {/section}
-
 
1935
                                            </div>
-
 
1936
                                        </td>
-
 
1937
                                    {/if}
-
 
1938
                                    {if isset($user_rechte.Warenwirtschaft.bestellung.lieferscheinStatus)}
-
 
1939
                                        <td class="statusDreiKaestchen" bgcolor="#eaeaea">
-
 
1940
                                            <input type="hidden" id="l_{$order->artikel[a_ind].ab_id}_status_f" value="{$order->artikel[a_ind].lieferscheinStatus}"/>
-
 
1941
                                            <div class="kaestchenWrapper">
-
 
1942
                                                {section loop=$daten.lieferschein_stati name=ls_ind}
-
 
1943
                                                    {if $order->artikel[a_ind].lieferscheinStatus==$daten.lieferschein_stati[ls_ind].name}
-
 
1944
                                                        {assign var=class value=$daten.lieferschein_stati[ls_ind].class}
-
 
1945
                                                    {else}
-
 
1946
                                                        {assign var=class value="status_off"}
-
 
1947
                                                    {/if}
-
 
1948
                                                    <span nowrap="nowrap" {if $daten.lieferschein_stati[ls_ind].name} class="darkgray kaestchen"{/if}>
-
 
1949
                                            <a class="{$class}" {if $order->status!='storniert'}onclick="change_status('l', {$order->id},{$order->artikel[a_ind].ab_id},'{$daten.lieferschein_stati[ls_ind].short}','{$daten.lieferschein_stati[ls_ind].name}');return false;" style="cursor:pointer"{/if} id="l_{$order->artikel[a_ind].ab_id}_{$daten.lieferschein_stati[ls_ind].short}" title="{$daten.lieferschein_stati[ls_ind].name}">&nbsp;{$daten.lieferschein_stati[ls_ind].short}&nbsp;</a>
-
 
1950
                                        </span>
-
 
1951
                                                {/section}
-
 
1952
                                            </div>
-
 
1953
                                        </td>
-
 
1954
                                    {/if}
-
 
1955
                                    {if isset($user_rechte.Warenwirtschaft.bestellung.mahnungStatus)}
-
 
1956
                                        <td class="statusDreiKaestchen" bgcolor="#eaeaea">
-
 
1957
                                            <input type="hidden" id="m_{$order->artikel[a_ind].ab_id}_status_f" value="{$order->artikel[a_ind].mahnungStatus}"/>
-
 
1958
                                            <div class="kaestchenWrapper">
-
 
1959
                                                {section loop=$daten.mahnung_stati name=ms_ind}
-
 
1960
                                                    {if $order->artikel[a_ind].mahnungStatus==$daten.mahnung_stati[ms_ind].name}
-
 
1961
                                                        {assign var=class value=$daten.mahnung_stati[ms_ind].class}
-
 
1962
                                                    {else}
-
 
1963
                                                        {assign var=class value="status_off"}
-
 
1964
                                                    {/if}
-
 
1965
                                                    <span nowrap="nowrap" {if $daten.mahnung_stati[ms_ind].name} class="darkgray kaestchen"{/if}>
-
 
1966
                                            <a class="{$class}" {if $order->status!='storniert'}onclick="change_status('m', {$order->id},{$order->artikel[a_ind].ab_id},'{$daten.mahnung_stati[ms_ind].short}','{$daten.mahnung_stati[ms_ind].name}');return false;" style="cursor:pointer"{/if} id="m_{$order->artikel[a_ind].ab_id}_{$daten.mahnung_stati[ms_ind].short}" title="{$daten.mahnung_stati[ms_ind].name}">&nbsp;{$daten.mahnung_stati[ms_ind].short}&nbsp;</a>
-
 
1967
                                         </span>
-
 
1968
                                                {/section}
-
 
1969
                                            </div>
-
 
1970
                                        </td>
-
 
1971
                                    {/if}
-
 
1972
                                    {if isset($user_rechte.Warenwirtschaft.bestellung.garantieStatus)}
-
 
1973
                                        <td class="statusDreiKaestchen" bgcolor="#eaeaea">
-
 
1974
                                            <input type="hidden" id="g_{$order->artikel[a_ind].ab_id}_status_f" value="{$order->artikel[a_ind].garantieStatus}"/>
-
 
1975
                                            <div class="kaestchenWrapper">
-
 
1976
                                                {section loop=$daten.garantie_stati name=gs_ind}
-
 
1977
                                                    {if $order->artikel[a_ind].garantieStatus==$daten.garantie_stati[gs_ind].name}
-
 
1978
                                                        {assign var=class value=$daten.garantie_stati[gs_ind].class}
-
 
1979
                                                    {else}
-
 
1980
                                                        {assign var=class value="status_off"}
-
 
1981
                                                    {/if}
-
 
1982
                                                    <span nowrap="nowrap" {if $daten.garantie_stati[gs_ind].name} class="darkgray kaestchen"{/if}>
-
 
1983
                                            <a class="{$class}" {if $order->status!='storniert'}onclick="change_status('g', {$order->id},{$order->artikel[a_ind].ab_id},'{$daten.garantie_stati[gs_ind].short}','{$daten.garantie_stati[gs_ind].name}');return false;" style="cursor:pointer"{/if} id="g_{$order->artikel[a_ind].ab_id}_{$daten.garantie_stati[gs_ind].short}" title="{$daten.garantie_stati[gs_ind].name}">&nbsp;{$daten.garantie_stati[gs_ind].short}&nbsp;</a>
-
 
1984
                                        </span>
-
 
1985
                                                {/section}
-
 
1986
                                            </div>
-
 
1987
                                        </td>
-
 
1988
                                    {/if}
-
 
1989
                                    {if isset($user_rechte.Warenwirtschaft.bestellung.EbayPaymentStatus) && $order->artikel[a_ind].ebay_PaymentStatus}
-
 
1990
                                        <td style="text-align:center;width:14px;">
-
 
1991
                                            {if $order->artikel[a_ind].ebay_PaymentStatus == 1}
-
 
1992
                                                <img  width="14" border="0" alt="" src="../images/Icons/ebay{$order->artikel[a_ind].ebay_PaymentStatus}.png" onmouseover="return overlib('Zahlungsdatum: {$order->artikel[a_ind].ebay_PaymentTime} <br />Zahlungsart: {$order->artikel[a_ind].ebay_PaymentMethodUsed}{$order->artikel[a_ind].ebay_PaymentID}', WIDTH, 250);" onmouseout="return nd();" />
-
 
1993
                                            {else}
-
 
1994
                                                <img  width="14" border="0" alt="" src="../images/Icons/ebay{$order->artikel[a_ind].ebay_PaymentStatus}.png" onmouseover="return overlib('Artikel wurde noch nicht bezahlt', WIDTH, 300)" onmouseout="return nd();" />
-
 
1995
                                            {/if}
-
 
1996
                                        </td>
-
 
1997
                                    {/if}
-
 
1998
                                </tr>
-
 
1999
 
-
 
2000
                                {if $order->artikel[a_ind].status=="storniert"}
-
 
2001
                                    {assign var="preis" value=0}
-
 
2002
                                    {assign var="menge" value=0}
-
 
2003
                                {else}
-
 
2004
                                    {assign var="preis" value=$order->artikel[a_ind].Preis_pro_Stueck* $order->artikel[a_ind].Menge}
-
 
2005
                                    {assign var="menge" value=$order->artikel[a_ind].Menge}
-
 
2006
                                {/if}
-
 
2007
                                {assign var="gesamtPreis" value=$gesamtPreis + $preis}
-
 
2008
                                {assign var="gesamtMenge" value = $gesamtMenge + $menge}
-
 
2009
                            {/if}
-
 
2010
                        {/section}
-
 
2011
 
-
 
2012
                        {section loop=$order->artikel name=a_ind}
-
 
2013
                            {if $order->artikel[a_ind].Father==-3}
-
 
2014
                                {assign var=versand_artikel value=$order->artikel[a_ind].ab_id}
-
 
2015
                                {assign var=versand_status value=$order->artikel[a_ind].status}
-
 
2016
                                {assign var=versand_name value=$order->artikel[a_ind].short_line_1}
-
 
2017
                                {assign var=versand_datum value=$order->artikel[a_ind].exported}
-
 
2018
                                <tr class="{cycle values="darkgray,lightgray"}">
-
 
2019
                                    <td>&nbsp; </td>
-
 
2020
                                    <td>&nbsp;</td>
-
 
2021
                                    <td {if $order->status!='storniert'}ondblclick="display_artikel({$order->artikel[a_ind].ab_id},'V')"{/if}>
-
 
2022
                                        <input type="hidden" id="a_{$order->artikel[a_ind].ab_id}_status_f" value="{$order->artikel[a_ind].status}"/>
-
 
2023
                                        <input type="hidden" id="artikel_{$order->artikel[a_ind].ab_id}_changed" name="artikel_{$order->artikel[a_ind].ab_id}_changed" value="0"/>
-
 
2024
                                        <div  border="0" cellspacing="0" cellpadding="0" class="tabelle artikelDaten">
-
 
2025
                                            <div>
-
 
2026
                                                <div class="ersteZelle" nowrap="nowrap">Versand:</div>
-
 
2027
                                                <div class="zweiteZelle">
-
 
2028
 
-
 
2029
                                                <span id="eingabe_bez_{$order->artikel[a_ind].ab_id}" style="display:none;">
-
 
2030
                                                    <input
-
 
2031
 
-
 
2032
                                                {if isset($web_rechte.Warenwirtschaft.bestellung.versandname_aenderbar) && !isset($user_rechte.Warenwirtschaft.bestellung.versandname_aenderbar)}
-
 
2033
                                                    readonly="readonly"
-
 
2034
                                                {/if}
-
 
2035
 
-
 
2036
                                                    type="text" name="cmd[artikel_to_Bestellung][{$order->artikel[a_ind].ab_id}][Bezeichnung]" size="45" value="{$order->artikel[a_ind].Bezeichnung|default:$order->artikel[a_ind].kurzbezeichnung|trim}" onchange="document.getElementById('artikel_'+{$order->artikel[a_ind].ab_id}+'_changed').value='1';"/>
-
 
2037
 
-
 
2038
                                                {if isset($user_rechte.Warenwirtschaft.bestellung.artikel_loeschen)}
-
 
2039
 
-
 
2040
                                                    &nbsp;&nbsp;<a onclick="javascript:return confirm('Soll diese Versandart wirklich gelöscht werden?\nDie Aktion kann nicht rückgängig gemacht werden.');" href="/Warenwirtschaft/artikel_loeschen.php?ID={$order->artikel[a_ind].ab_id}&Bestellung={$order->id}"><img onmouseover="overlib('Versandartikel dauerhaft loeschen.');" onmouseout="return nd();" src="/images/navigation/trashcan.gif" /></a>&nbsp;&nbsp;
-
 
2041
 
-
 
2042
                                                {/if}
-
 
2043
 
-
 
2044
                                                </span>
-
 
2045
                                                    <span id="ausgabe_bez_{$order->artikel[a_ind].ab_id}">
-
 
2046
                                                    {$order->artikel[a_ind].Bezeichnung|default:$order->artikel[a_ind].kurzbezeichnung}
-
 
2047
                                                </span>
-
 
2048
                                                    {if $order->artikel[a_ind].artikel}
-
 
2049
                                                        (
-
 
2050
                                                        {include file="ipad_edit.tpl" id=$order->artikel[a_ind].ab_id art="V"}
-
 
2051
                                                        )
-
 
2052
                                                    {/if}
-
 
2053
                                                    {if $order->kk_info}
-
 
2054
                                                        <!--
-
 
2055
                                                <a style="cursor:pointer" class="refund" title="Betrag &uuml;ber {$order->kk_info.anbieter} erstatten" data-refund="{$order->artikel[a_ind].Preis_pro_Stueck*$order->artikel[a_ind].Menge}">{$order->kk_info.anbieter} Refund</a>
-
 
2056
                                                -->
-
 
2057
                                                    {/if}
-
 
2058
                                                </div>
-
 
2059
                                                <div class="dritteZelle" nowrap="nowrap">
-
 
2060
                                                    {if $preise_anzeigen}
-
 
2061
                                                    {if ( isset( $user_rechte.Warenwirtschaft.bestellung.steuersatz_aendern ) )}
-
 
2062
                                                        <span id="eingabe_mwst_{$order->artikel[a_ind].ab_id}" style="display:none;">
-
 
2063
                                                    <select id="landMwSt_{$order->artikel[a_ind].ab_id}" name="landMwSt_{$order->artikel[a_ind].ab_id}" class="eingabe_landMwSt">
-
 
2064
                                                        {foreach $laenderMwSt as $index => $laenderDaten}
-
 
2065
                                                            <option id="{$laenderDaten["id"]}" value="{$laenderDaten["typ_id"]}" {if $order->artikel[a_ind].mwst == $laenderDaten["typ_id"]}selected{/if}>{$laenderDaten["bezeichnung"]}</option>
-
 
2066
                                                        {/foreach}
-
 
2067
                                                    </select>
-
 
2068
                                                    <input type="hidden" value="{$laenderDaten["typ_id"]}" class="mwstLand"/>
-
 
2069
                                                </span>
-
 
2070
                                                    {/if}
-
 
2071
                                                    <span id="eingabe_preis_{$order->artikel[a_ind].ab_id}" style="display:none;">
-
 
2072
                                                    <input type="text" name="cmd[artikel_to_Bestellung][{$order->artikel[a_ind].ab_id}][Preis_pro_Stueck]" size="3" value="{$order->artikel[a_ind].Preis_pro_Stueck|number_format:2:",":""}" onchange="document.getElementById('artikel_'+{$order->artikel[a_ind].ab_id}+'_changed').value='1';" />&nbsp;&euro;&nbsp;
-
 
2073
                                                </span>
-
 
2074
                                                    <span id="ausgabe_preis_{$order->artikel[a_ind].ab_id}" class="preise">
-
 
2075
                                                {$order->artikel[a_ind].Preis_pro_Stueck|money_format_red:2:$order->locale:false:false}
-
 
2076
                                                </span>
-
 
2077
                                                </div>
-
 
2078
                                                {/if}
-
 
2079
                                                {if isset($web_rechte["Warenwirtschaft"]["bestellung"]["artikel_sortieren"])}
-
 
2080
                                                    <div class="noprint" style="width:32px;"></div>
-
 
2081
                                                {/if}
-
 
2082
                                            </div>
-
 
2083
                                        </div>
-
 
2084
                                    </td>
-
 
2085
                                    <td class="preise noprint" style="text-align:right;">
-
 
2086
                                        {if $preise_anzeigen}
-
 
2087
                                            {$order->artikel[a_ind].Preis_pro_Stueck|money_format_red:2:$order->locale:false:false}
-
 
2088
                                        {/if}
-
 
2089
                                    </td>
-
 
2090
                                </tr>
-
 
2091
                            {/if}
-
 
2092
                        {/section}
-
 
2093
                        {if !$versand_artikel}
-
 
2094
                            <tr class="{cycle values="darkgray,lightgray"} noprint" align="left">
-
 
2095
                                <td>&nbsp;</td>
-
 
2096
                                <td>&nbsp;</td>
-
 
2097
                                <td>
-
 
2098
                                    {if $order->status!='storniert'}
-
 
2099
                                        {html_options options=$daten.Versand name="versandItem"}
-
 
2100
                                        <input type="submit" name="enterVersand" value="OK"/>
-
 
2101
                                    {/if}
-
 
2102
                                </td>
-
 
2103
                            </tr>
-
 
2104
                        {/if}
-
 
2105
                        <tr class="{cycle values="darkgray,lightgray"}">
-
 
2106
                            <td style="border-top: 1px solid #666"></td>
-
 
2107
                            <td style="border-top: 1px solid #666"></td>
-
 
2108
                            <td style="border-top: 1px solid #666">
-
 
2109
                                {if (count($order->artikel) - 1) > 1 && $gesamtMenge > 0}
-
 
2110
                                    <span style="text-align:left;">Summe Artikel: {$gesamtMenge}</span><br />
-
 
2111
                                {/if}
-
 
2112
                                {if $preise_anzeigen}
-
 
2113
                                    <span style="text-align:right;float:right;">Bestellwert:</span>
-
 
2114
                                {/if}
-
 
2115
                            </td>
-
 
2116
                            <td class="preise" style="text-align:right;border-top: 1px solid #666">
-
 
2117
                                {if $preise_anzeigen}
-
 
2118
                                    {$order->gesamtsumme_buffer|money_format_red:2:$order->locale:false:false}
-
 
2119
                                {/if}
-
 
2120
                            </td>
-
 
2121
                            <td bgcolor="#eaeaea" style="text-align: center;">
-
 
2122
                                {section loop=$daten.artikel_stati name=as_ind}
-
 
2123
                                    <span {if $daten.artikel_stati[as_ind].name} class="darkgray"{/if} style="border: 1px solid #cccccc;">
-
 
2124
                                        {assign var=class value=$daten.artikel_stati[as_ind].class}
-
 
2125
                                        <a class="{$class}" {if $order->status!='storniert'}onclick="change_status('a', {$order->id},0,'{$daten.artikel_stati[as_ind].short}','{$daten.artikel_stati[as_ind].name}');return false;" style="cursor:pointer"{/if} title="{$daten.artikel_stati[as_ind].name}">&nbsp;&#x2211;&nbsp;</a>
-
 
2126
                                    </span>
-
 
2127
                                {/section}
-
 
2128
                            </td>
-
 
2129
                            {if isset($user_rechte.Warenwirtschaft.bestellung.rechnungStatus)}
-
 
2130
                                <td bgcolor="#eaeaea" style="text-align: center;">
-
 
2131
                                    {section loop=$daten.rechnung_stati name=rs_ind}
-
 
2132
                                        <span {if $daten.rechnung_stati[rs_ind].name} class="darkgray"{/if} style="border: 1px solid #cccccc;">
-
 
2133
                                            {assign var=class value=$daten.rechnung_stati[rs_ind].class}
-
 
2134
                                            <a class="{$class}" {if $order->status!='storniert'}onclick="change_status('r', {$order->id},0,'{$daten.rechnung_stati[rs_ind].short}','{$daten.rechnung_stati[rs_ind].name}');return false;" style="cursor:pointer"{/if} title="{$daten.rechnung_stati[rs_ind].name}">&nbsp;&#x2211;&nbsp;</a>
-
 
2135
                                        </span>
-
 
2136
                                    {/section}
-
 
2137
                                </td>
-
 
2138
                            {/if}
-
 
2139
                            {if isset($user_rechte.Warenwirtschaft.bestellung.lieferscheinStatus)}
-
 
2140
                                <td bgcolor="#eaeaea" style="text-align: center;">
-
 
2141
                                    {section loop=$daten.lieferschein_stati name=ls_ind}
-
 
2142
                                        <span {if $daten.lieferschein_stati[ls_ind].name} class="darkgray"{/if} style="border: 1px solid #cccccc;">
-
 
2143
                                            {assign var=class value=$daten.lieferschein_stati[ls_ind].class}
-
 
2144
                                            <a class="{$class}" {if $order->status!='storniert'}onclick="change_status('l', {$order->id},0,'{$daten.lieferschein_stati[ls_ind].short}','{$daten.lieferschein_stati[ls_ind].name}');return false;" style="cursor:pointer"{/if} title="{$daten.lieferschein_stati[ls_ind].name}">&nbsp;&#x2211;&nbsp;</a>
-
 
2145
                                        </span>
-
 
2146
                                    {/section}
-
 
2147
                                </td>
-
 
2148
                            {/if}
-
 
2149
                            {if isset($user_rechte.Warenwirtschaft.bestellung.mahnungStatus)}
-
 
2150
                                <td bgcolor="#eaeaea" style="text-align: center;">
-
 
2151
                                    {section loop=$daten.mahnung_stati name=ms_ind}
-
 
2152
                                        <span nowrap="nowrap" {if $daten.mahnung_stati[ms_ind].name} class="darkgray"{/if} style="border: 1px solid #cccccc;">
-
 
2153
                                            {assign var=class value=$daten.mahnung_stati[ms_ind].class}
-
 
2154
                                            <a class="{$class}" {if $order->status!='storniert'}onclick="change_status('m', {$order->id},0,'{$daten.mahnung_stati[ms_ind].short}','{$daten.mahnung_stati[ms_ind].name}');return false;" style="cursor:pointer"{/if} title="{$daten.mahnung_stati[ms_ind].name}">&nbsp;&#x2211;&nbsp;</a>
-
 
2155
                                         </span>
-
 
2156
                                    {/section}
-
 
2157
                                </td>
-
 
2158
                            {/if}
-
 
2159
                            {if isset($user_rechte.Warenwirtschaft.bestellung.garantieStatus)}
-
 
2160
                                <td bgcolor="#eaeaea" style="text-align: center;">
-
 
2161
                                    {section loop=$daten.garantie_stati name=gs_ind}
-
 
2162
                                        <span nowrap="nowrap" {if $daten.garantie_stati[gs_ind].name} class="darkgray"{/if} style="border: 1px solid #cccccc;">
-
 
2163
                                            {assign var=class value=$daten.garantie_stati[gs_ind].class}
-
 
2164
                                            <a class="{$class}" {if $order->status!='storniert'}onclick="change_status('g', {$order->id},0,'{$daten.garantie_stati[gs_ind].short}','{$daten.garantie_stati[gs_ind].name}');return false;" style="cursor:pointer"{/if} title="{$daten.garantie_stati[gs_ind].name}">&nbsp;&#x2211;&nbsp;</a>
-
 
2165
                                        </span>
-
 
2166
                                    {/section}
-
 
2167
                                </td>
-
 
2168
                            {/if}
-
 
2169
                        </tr>
-
 
2170
                        <tr>
-
 
2171
                            <td></td>
-
 
2172
                            <td></td>
-
 
2173
                            <td align="right" class="right">
-
 
2174
 
-
 
2175
                            </td>
-
 
2176
                            <td colspan="3" align="left" class="noprint">
-
 
2177
                                {if $order->status!='storniert'}
-
 
2178
                                    <input name="manu" value="Neuen Artikel anlegen" type="button" onclick="fenster=window.open('bestellung_liste_manu.php?Bestellung={$order->id}', 'fenster','width=800,toolbar=no,status=no,menubar=no,scrollbars=yes')"/>
-
 
2179
                                {/if}
-
 
2180
                            </td>
-
 
2181
                        </tr>
-
 
2182
                        {if $versand_artikel}
-
 
2183
                            <tr>
-
 
2184
                                <td class="">&nbsp;</td>
-
 
2185
                                <td>&nbsp;</td>
-
 
2186
                                <td class="noprint" title="Logistiker-Export am {$versand_datum|date_format:"%x %X"}">
-
 
2187
                                    Versandstatus (O=offen; F=freigegeben; V=versand)
-
 
2188
                                </td>
-
 
2189
                                <td></td>
-
 
2190
                                <td bgcolor="#eaeaea">
-
 
2191
                                    <span class="darkgray">
-
 
2192
                                        {if $versand_status=="offen"}
-
 
2193
                                            {assign var=class value="status_red"}
-
 
2194
                                        {else}
-
 
2195
                                            {assign var=class value="status_off"}
-
 
2196
                                        {/if}
-
 
2197
                                        <a class="{$class}" {if $order->status!='storniert'}onclick="change_status('a', {$order->id},{$versand_artikel},'O','offen');return false;" style="cursor:pointer"{/if} id="a_{$versand_artikel}_O" title="offen">&nbsp;O&nbsp;</a>
-
 
2198
                                    </span>
-
 
2199
 
-
 
2200
                                    <span class="darkgray">
-
 
2201
                                        {if $versand_status=="freigegeben"}
-
 
2202
                                            {assign var=class value="status_yellow"}
-
 
2203
                                        {else}
-
 
2204
                                            {assign var=class value="status_off"}
-
 
2205
                                        {/if}
-
 
2206
                                        <a class="{$class}" {if $order->status!='storniert'}onclick="change_status('a', {$order->id},{$versand_artikel},'F','freigegeben');return false;" style="cursor:pointer"{/if} id="a_{$versand_artikel}_F" title="freigegeben">&nbsp;F&nbsp;</a>
-
 
2207
                                    </span>
-
 
2208
 
-
 
2209
                                    <span class="darkgray">
-
 
2210
                                        {if $versand_status=="versand"}
-
 
2211
                                            {assign var=class value="status_green"}
-
 
2212
                                        {else}
-
 
2213
                                            {assign var=class value="status_off"}
-
 
2214
                                        {/if}
-
 
2215
                                        <a class="{$class}" {if $order->status!='storniert'}onclick="change_status('a', {$order->id},{$versand_artikel},'V','versand');return false;" style="cursor:pointer"{/if} id="a_{$versand_artikel}_V" title="Versand">&nbsp;V&nbsp;</a>
-
 
2216
                                    </span>
-
 
2217
                                </td>
-
 
2218
                            </tr>
-
 
2219
                        {/if}
-
 
2220
                    </table>
-
 
2221
                </td>
-
 
2222
            </tr>
-
 
2223
            {if isset($user_rechte.Warenwirtschaft.bestellung.shortline1)}
-
 
2224
            <tr>
-
 
2225
                <td valign="top" class="links noprint">{$daten.sl1.name}</td>
-
 
2226
                <td class="rechts" {$d_colspan}>
-
 
2227
                    <span class="print">{$daten.sl1.name} {$order->shortline1}</span>
-
 
2228
                    {if $order->status!='storniert'}
-
 
2229
                        <input type="text" name="shortline1" value="{$order->shortline1}" size="{$daten.sl1.size}" maxlength="{$daten.sl1.size}" class="noprint"/>
-
 
2230
                    {else}
-
 
2231
                        {$order->shortline1}
-
 
2232
                    {/if}
-
 
2233
                </td>
-
 
2234
            </tr>
-
 
2235
            {/if}
-
 
2236
            {if isset($user_rechte.Warenwirtschaft.bestellung.shortline2)}
-
 
2237
            <tr>
-
 
2238
                <td valign="top" class="links">{$daten.sl2.name}</td>
-
 
2239
                <td class="rechts" {$d_colspan}>
-
 
2240
                    {if $order->status!='storniert'}
-
 
2241
                        <input type="text" name="shortline2" value="{$order->shortline2}" size="{$daten.sl2.size}" maxlength="{$daten.sl2.size}" class="noprint"/>
-
 
2242
                    {else}
-
 
2243
                        {$order->shortline2}
-
 
2244
                    {/if}
-
 
2245
                </td>
-
 
2246
            </tr>
-
 
2247
            {/if}
-
 
2248
            {if isset($user_rechte.Warenwirtschaft.bestellung.status1)}
-
 
2249
            <tr>
-
 
2250
                <td valign="top" class="links">{$status1_name}</td>
-
 
2251
                <td class="rechts" {$d_colspan}>
-
 
2252
                    {if $order->status!='storniert'}
-
 
2253
                        {html_options options=$status1_options name="status1" selected=$order->status1}
-
 
2254
                    {else}
-
 
2255
                        {if $order->status1}
-
 
2256
                            {$status1_options.$order->status1}
-
 
2257
                        {/if}
-
 
2258
                    {/if}
-
 
2259
                </td>
-
 
2260
            </tr>
-
 
2261
            {/if}
-
 
2262
            <tr>
-
 
2263
                <td class="links noprint">Bemerkung:</td>
-
 
2264
                <td class="rechts" {$d_colspan}>
-
 
2265
                    {if $order->status!='storniert'}
-
 
2266
                        <span class="noprint">
-
 
2267
                            <textarea cols="70" rows="8" name="Bemerkung" id="bemerkung" style="width:98%;padding:1%">{$order->Bemerkung}</textarea>
-
 
2268
                        </span>
-
 
2269
                    {else}
-
 
2270
                        <span style="font-family:courier;">{$order->Bemerkung|nl2br}</span>
-
 
2271
                    {/if}
-
 
2272
                    {if $order->Bemerkung}
-
 
2273
                        <div class="print bemerkung">Bemerkung:<br/>{$order->Bemerkung|nl2br}</div>
-
 
2274
                    {/if}
-
 
2275
                </td>
-
 
2276
            </tr>
-
 
2277
            {if isset($user_rechte.Warenwirtschaft.bestellung.Bemerkung_extern)}
-
 
2278
            <tr>
-
 
2279
                <td class="links noprint">Bemerkung extern:</td>
-
 
2280
                <td class="rechts" {$d_colspan}>
-
 
2281
                    {if $order->status!='storniert'}
-
 
2282
                        <textarea cols="70" rows="8" name="Bemerkung_extern" class="noprint" style="width:98%;padding:1%;">{$order->Bemerkung_extern}</textarea>
-
 
2283
                    {else}
-
 
2284
                        <span style="font-family:courier;">{$order->Bemerkung_extern|nl2br}</span>
-
 
2285
                    {/if}
-
 
2286
                    {if $order->Bemerkung_extern}
-
 
2287
                        <div class="print bemerkung">Bemerkung extern:<br/>{$order->Bemerkung_extern|nl2br}</div>
-
 
2288
                    {/if}
-
 
2289
                </td>
-
 
2290
            </tr>
-
 
2291
            {/if}
-
 
2292
 
-
 
2293
            {if isset($user_rechte.Warenwirtschaft.bestellung.dokument_read)}
-
 
2294
            <tr>
-
 
2295
                <td class="links noprint">Dokumente</td>
-
 
2296
                <td class="rechts" {$d_colspan}>
-
 
2297
                    <div id="doktabs">
-
 
2298
                        <ul>
-
 
2299
                            {if is_array($doktabs)}
-
 
2300
                                {foreach $doktabs as $key => $value}
-
 
2301
                                    <li class="doktabs_li"><a href="#doktabs-{$key}">{$key}</a></li>
-
 
2302
                                {/foreach}
-
 
2303
 
-
 
2304
                                {if isset($user_rechte.Warenwirtschaft.bestellung.dokument_add)}
-
 
2305
                                    <li style="float:right;font-weight:bold!important;">
-
 
2306
                                        <a style="font-weight:bold" class="ui-button" title="Dokument hochladen" onclick="window.open('../dokumente/index.php?table_foreign=Bestellung&row_foreign=ID&data_foreign={$order->id}#', 'DokumentUpload', 'location=0, status=0, menubar=0, height=400, width=800');">+</a>
-
 
2307
                                    </li>
-
 
2308
                                {/if}
-
 
2309
                            {/if}
-
 
2310
                        </ul>
-
 
2311
 
-
 
2312
                        {* dritte Spalte *}
-
 
2313
                        {*}
-
 
2314
                        <td class="noprint">
-
 
2315
                            {if isset($user_rechte.Warenwirtschaft.bestellung.dokument_add)}
-
 
2316
                            {html_image file="../dokumente/gfx/add.gif" onclick="{$dokument.add_document}" border="0" style="cursor:pointer" class="noprint"}
-
 
2317
                            {/if}
-
 
2318
                        </td>
-
 
2319
                        {*}
-
 
2320
 
-
 
2321
                        {foreach $doktabs as $key => $doktab}
-
 
2322
                        <div id="doktabs-{$key}" class="doktable">
-
 
2323
 
-
 
2324
                            {* datatables START *}
-
 
2325
                            <table id="doktable-{$key}">
-
 
2326
                                <thead>
-
 
2327
                                <tr>
-
 
2328
                                    <td>Nr.</td>
-
 
2329
                                    <td>Name</td>
-
 
2330
                                    <td></td>
-
 
2331
                                    <td>Datum/erstellt von</td>
-
 
2332
                                </tr>
-
 
2333
                                </thead>
-
 
2334
                                <tbody>
-
 
2335
                                {assign var="i" value=1}
-
 
2336
                                {foreach $daten.dokumente as $dokument}
-
 
2337
                                {if in_array($dokument.dokument_typ,$doktab.validIds)}
-
 
2338
                                <tr class="{if $dokument.storniert == 1}stornoGrau{/if}">
-
 
2339
                                    {* erste Spalte *}
-
 
2340
                                    <td>
-
 
2341
                                        {$i++}
-
 
2342
                                    </td>
-
 
2343
 
-
 
2344
                                    {* zweite Spalte *}
-
 
2345
                                    <td>
-
 
2346
                                        <div style="float: left; display: inline;width:100%;">
-
 
2347
                                            <div style="float:left;">
-
 
2348
                                                <span class="unread_docs_helper noprint" id="unread_docs_{$order->id}_{$dokument.id}_helper"></span>
-
 
2349
                                                {html_image file=$dokument.icon alt="Dateityp: {$dokument.type}" class="noprint" style="vertical-align:middle;"}
-
 
2350
                                            </div>
-
 
2351
 
-
 
2352
                                            {if $dokument.type == "link"}
-
 
2353
                                                <div style="float:left;padding:0 3px;min-width:60px;">
-
 
2354
                                                    <a href="{$dokument.link}" target="{$dokument.target}" id="doc_link_{$dokument.id}_{$order->id}" class="doc_link">
-
 
2355
                                                        {$dokument.name}
-
 
2356
                                                    </a>
-
 
2357
                                                </div>
-
 
2358
                                            {else}
-
 
2359
                                                <div style="float:left;padding:0 3px;min-width:30px;">
-
 
2360
                                                                    <span style="width:18px!important;" id="status_{$dokument.id}" class="dokstatus"  data-dokid="{$dokument.id}">
-
 
2361
                                                                        <img {if !$dokument.status}style="display:none;"{/if} class="img_status_{$dokument.id}" {if $dokument.status}src="/images/Icons/icon-{if $dokument.status=="offen"}rote-fahne{elseif $dokument.status=="erledigt"}gruener-haken{/if}.png"{/if}/>{if !$dokument.status}&nbsp;&nbsp;&nbsp;{/if}
-
 
2362
                                                                    </span>
-
 
2363
                                                </div>
-
 
2364
                                                <div style="float:left;padding:0 3px;width:calc(100% - 60px);">
-
 
2365
                                                    <a href="{$daten.dokPath}{$dokument.name}" target="_blank" id="doc_link_{$dokument.id}_{$order->id}" class="doc_link {if $dokument.layer}layer_dok{/if}" data-id="{$dokument.id}">
-
 
2366
                                                        {$dokument.titel|default:($dokument.name|basename)}
-
 
2367
                                                    </a>
-
 
2368
                                                    ({$dokument.size|fsize_format:'':2:',':'.'})
-
 
2369
                                                    <img class="edit_title" data-id="{$dokument.id}" data-title="{$dokument.titel|default:($dokument.name|basename)}" src="/images/Icons/icon_pencil.png" />
-
 
2370
                                                </div>
-
 
2371
                                            {/if}
-
 
2372
 
-
 
2373
                                            {if isset($web_rechte.Warenwirtschaft.bestellung.re_zahhlungsstatusinfo)}
-
 
2374
                                            {assign var="capital" value=$dokument.name|basename|substr:0:1}
-
 
2375
                                            {if $capital=="R" || $capital=="G"}
-
 
2376
                                                {assign var="name" value=substr($dokument.name|basename,1)}
-
 
2377
                                                {assign var="name" value="{$capital}`$name`"}
-
 
2378
                                                <span id="bezahlstatus_{$rechnung[$name]['rechnungsnummer']}" style="font-weight:bold;float:right;padding:0 10px;cursor:{if $rechnung[$name]['bezahlstatus']=="offen"}pointer{else if $rechnung[$name]['bezahlstatus']!=""}help{/if};" {if isset($web_rechte.Warenwirtschaft.rechnungsbuch.rechnungsbuch)&&(isset($user_rechte.Warenwirtschaft.bezahlstatus.bezahlt_setzen)||isset($user_rechte.Warenwirtschaft.bezahlstatus.vorbezahlt_setzen))}ondblclick = "buildSelectBox('{$rechnung[$name]['rechnungsnummer']}','{$rechnung[$name]['bezahlstatus']}');"{/if} onmouseover="return overlib('{if isset($web_rechte.Warenwirtschaft.rechnungsbuch.rechnungsbuch)&&(isset($user_rechte.Warenwirtschaft.bezahlstatus.bezahlt_setzen)||isset($user_rechte.Warenwirtschaft.bezahlstatus.vorbezahlt_setzen))}<b>Doppelklicken zum Bearbeiten</b><br />{/if}{$rechnung[$name]['bezahlstatus_history']}', CAPTION, '', HAUTO, VAUTO);" onmouseout="return nd();">
-
 
2379
                                                                    {if $rechnung[$name]['bezahlstatus']!=""}
-
 
2380
                                                                        {$rechnung[$name]['bezahlstatus']}
-
 
2381
                                                                    {/if}
-
 
2382
                                                                </span>
-
 
2383
                                            {if isset($user_rechte.Warenwirtschaft.bezahlstatus.bezahlt_setzen)||isset($user_rechte.Warenwirtschaft.bezahlstatus.vorbezahlt_setzen)}
-
 
2384
                                                <script>
-
 
2385
                                                    $(document).ready(function(){
-
 
2386
                                                        $('#layer_bemerkung_{$rechnung[$name]["rechnungsnummer"]}').hide();
-
 
2387
                                                    });
-
 
2388
                                                </script>
-
 
2389
                                            {/if}
-
 
2390
                                            {/if}
-
 
2391
                                        </div>
-
 
2392
                                        {/if}
-
 
2393
                        </div>
-
 
2394
                </td>
-
 
2395
                {* dritte Spalte *}
-
 
2396
                <td class="noprint">
-
 
2397
                    {if isset($user_rechte.Warenwirtschaft.bestellung.dokument_delete) && $dokument.deleteable}
-
 
2398
                        {html_image file="../dokumente/gfx/delete_record.gif" onclick="{$dokument.del_document}" border="0" style="cursor:pointer" class="noprint"}
-
 
2399
                    {/if}
-
 
2400
                </td>
-
 
2401
                {* vierte Spalte *}
-
 
2402
                <td class="">
-
 
2403
                    erstellt: {$dokument.erstellt_am|date_format:"d.m.Y H:i"} - {$dokument.erstellt_von|default:"&nbsp;"}
-
 
2404
                    {if $dokument.erstellt_am!=$dokument.date}
-
 
2405
                        <br />
-
 
2406
                        geändert: <span id="aenderung_{$dokument.id}">{$dokument.date|date_format:"d.m.Y H:i"}</span> - <span id="bearbeiter_{$dokument.id}">{$dokument.author|default:"&nbsp;"}</span>
-
 
2407
                    {/if}
-
 
2408
                </td>
-
 
2409
            </tr>
-
 
2410
            {/if}
-
 
2411
            {/foreach}
-
 
2412
            </tbody>
-
 
2413
        </table>
-
 
2414
 
-
 
2415
        </div>
-
 
2416
        {/foreach}
-
 
2417
        </div>
-
 
2418
 
-
 
2419
        {*} tabs dokumente END {*}
-
 
2420
        {*}
-
 
2421
        {foreach $daten.dokumente as $dokument}
-
 
2422
        <div class="tabelle dokumente">
-
 
2423
            <div class="links {if $dokument.storniert == 1}stornoGrau{/if}">
-
 
2424
                <div style="display: inline !important" class="ersteZelle dokumentnamebox">
-
 
2425
                </div>
-
 
2426
                <div class="zweiteZelle noprint">
-
 
2427
                </div>
-
 
2428
                <div class="dritteZelle noprint">
-
 
2429
                </div>
-
 
2430
                <div class="vierteZelle">
-
 
2431
                </div>
-
 
2432
                <div class="fuenfteZelle">&nbsp;</div>
-
 
2433
            </div>
-
 
2434
        </div>
-
 
2435
        {*}
-
 
2436
        </td>
-
 
2437
        </tr>
-
 
2438
 
-
 
2439
        {else}
-
 
2440
        {if isset($user_rechte.Warenwirtschaft.bestellung.dokument_add)}
-
 
2441
            <tr class="noprint">
-
 
2442
                <td class="links">Dokument</td>
-
 
2443
                <td class="rechts" {$d_colspan}>
-
 
2444
                    {if $order->status!='storniert'}
-
 
2445
                        <a onclick="{$daten.add_document}" style="cursor:pointer;" href="#">
-
 
2446
                            {html_image file="../dokumente/gfx/add.gif" onclick="{$daten.add_document}" border="0" style="cursor:pointer"}Datei anh&auml;ngen
-
 
2447
                        </a>
-
 
2448
                    {/if}
-
 
2449
                </td>
-
 
2450
            </tr>
-
 
2451
        {/if}
-
 
2452
        {/if}
-
 
2453
        <tr>
-
 
2454
            <td class="links noprint">Bestellt:</td>
-
 
2455
            <td class="rechts" {$d_colspan}>
-
 
2456
                <span class="print">Bestellt: </span>
-
 
2457
                {$order->erstellt_am|date_format:"d.m.Y"}
-
 
2458
                um: {$order->erstellt_am|date_format:"H:i:s"}
-
 
2459
            </td>
-
 
2460
        </tr>
-
 
2461
 
-
 
2462
        <tr id="erstellt_von_row"{if !$order->erstellt_von}style="display:none;"{/if}>
-
 
2463
            <td class="links noprint">Erstbearbeiter:</td>
-
 
2464
            <td class="rechts" id="erstellt_von" {$d_colspan}>
-
 
2465
                <span class="print">Erstbearbeiter: </span>
-
 
2466
                {$order->erstellt_von}
-
 
2467
            </td>
-
 
2468
        </tr>
-
 
2469
        <tr>
-
 
2470
            <td class="links noprint">letzte Änderung:</td>
-
 
2471
            <td class="rechts" id="letzte_Aenderung" {$d_colspan}>
-
 
2472
                <span class="print">letzte Änderung: </span>
-
 
2473
                {$order->updated_at|date_format:"d.m.Y"}
-
 
2474
                um: {$order->updated_at|date_format:"H:i:s"}
-
 
2475
                von: {$order->updated_by}
-
 
2476
            </td>
-
 
2477
        </tr>
-
 
2478
        {if isset($web_rechte.admin.toolbox.logbuch)}
-
 
2479
            <tr class="noprint">
-
 
2480
                <td class="links">Änderungsprotokoll</td>
-
 
2481
                <td id="logbuch" class="rechts" {$d_colspan}>
-
 
2482
                    <a href="/toolbox/logbuch.php?mode=bestellung&id={$order->id}" target="logbuch">anzeigen</a>
-
 
2483
                </td>
-
 
2484
            </tr>
-
 
2485
        {/if}
-
 
2486
 
-
 
2487
        {if $order->status!='storniert'}
-
 
2488
            <!-- START BUTTONLEISTE UNTEN -->
-
 
2489
            <tr class="noprint">
-
 
2490
                <td class="links bestellung_buttons" colspan="3" align="right">
-
 
2491
                    {foreach $daten.buttons as $buttId => $button}
-
 
2492
                        <input type="{$button.type}" value="{$button.value}" onclick="{$button.onClick}" class="{$button.class}" id="button{$buttId+1}"/>
-
 
2493
                    {/foreach}
-
 
2494
                    <div>&nbsp;</div>
-
 
2495
                    {if isset($user_rechte.Warenwirtschaft.bestellung.gutscheinbutton)}
-
 
2496
                        <div>
-
 
2497
                            <input type="button" id="gutscheinErstellen" value="Gutschein erstellen"/>
-
 
2498
                        </div>
-
 
2499
                        <script>
-
 
2500
                            $(document).ready(function(){
-
 
2501
                                $("#gutscheinErstellen").click(function(){
-
 
2502
                                    $("<div id='dialogGutschein'>").dialog({
-
 
2503
                                        title: "Gutschein erstellen",
-
 
2504
                                        position: "center top",
-
 
2505
                                        zIndex: 5,
-
 
2506
 
-
 
2507
                                        open: function() {
-
 
2508
                                            $(this).load('/marketing/gutscheine.php?action=add&ref=bestellung&shopID={$order->shops_ID}&b_id={$order->id}');
-
 
2509
                                        },
-
 
2510
                                        close: function() {
-
 
2511
                                            $(this).dialog('destroy').remove();
-
 
2512
                                        },
-
 
2513
                                        buttons:{
-
 
2514
                                            "Speichern und versenden": function(){
-
 
2515
                                                let data = $("#createGutschein").serialize();
-
 
2516
                                                $.ajax({
-
 
2517
                                                    type: "POST",
-
 
2518
                                                    url : "/marketing/gutscheine.php",
-
 
2519
                                                    data: data
-
 
2520
                                                }).done(function(gutscheinID){
-
 
2521
                                                    {if $site==$site_full}
-
 
2522
                                                    {if isset($user_rechte.Warenwirtschaft.bestellung.html_editor)}
-
 
2523
                                                    $("#bemerkung_ifr").contents().find('#tinymce').html("Gutschein erstellt und gemailt am {$smarty.now|date_format:'d.m.Y'} um {$smarty.now|date_format:'H:i'} durch {$smarty.session.USER}\n");
-
 
2524
                                                    {else}
-
 
2525
                                                    $('#bemerkung').html("Gutschein erstellt und gemailt am {$smarty.now|date_format:'d.m.Y'} um {$smarty.now|date_format:'H:i'} durch {$smarty.session.USER}\n");
-
 
2526
                                                    {/if}
-
 
2527
                                                    let data = [];
-
 
2528
                                                    let mailto;
-
 
2529
                                                    mailto= "{$order->E_Mail}";
-
 
2530
                                                    //data.push({ name: "action", value: "Gutscheinversand" });
-
 
2531
                                                    data.push({ name: "mailto", value: mailto });
-
 
2532
                                                    $.ajax({
-
 
2533
                                                        type: "POST",
-
 
2534
                                                        url : "MailClient/index.php?id=0&Bestellung={$order->id}&shop={$order->shops_ID}&button=Mailausgang",
-
 
2535
                                                        data: data,
-
 
2536
                                                        success: function(){
-
 
2537
                                                            $("#dialogGutschein").dialog('destroy').remove();
-
 
2538
                                                            $('#cur').click();
-
 
2539
                                                        }
-
 
2540
                                                    })
-
 
2541
                                                    {else}
-
 
2542
                                                    $("#dialogGutschein").dialog('destroy').remove();
-
 
2543
                                                    $('#cur').click();
-
 
2544
                                                    {/if}
-
 
2545
 
-
 
2546
                                                });
-
 
2547
                                            },
-
 
2548
                                            "Schliessen": function(){
-
 
2549
                                                $("#dialogGutschein").dialog('destroy').remove();
-
 
2550
                                                $('#cur').click();
-
 
2551
                                            }
-
 
2552
                                        },
-
 
2553
                                        width: "70%",
-
 
2554
                                        maxWidth: "500px",
-
 
2555
                                    })
-
 
2556
                                })
-
 
2557
                            })
-
 
2558
                        </script>
-
 
2559
                    {/if}
-
 
2560
                    <div>
-
 
2561
                        {if isset($user_rechte.Warenwirtschaft.bestellung.refund)}
-
 
2562
                            {if $order->zahlart_refund}
-
 
2563
                                <input type="button" style="cursor:pointer" class="refund" title="Betrag &uuml;ber {$order->zahlart_name} erstatten" value="{$order->zahlart_name} Rückzahlung"/>
-
 
2564
                            {/if}
-
 
2565
                        {/if}
-
 
2566
                        {if isset($user_rechte.Warenwirtschaft.bestellung.online_retoure)}
-
 
2567
                            {foreach $logistiker_retoure as $row}
-
 
2568
                                {if ($row.returnlink|substr:0:4)=="http"}
-
 
2569
                                    <input type="button" onclick="window.open('{$row.returnlink}');$('#bemerkung').append('{$row.kname} Retoure{if $row.zusatz} {$row.zusatz}{/if} am {$smarty.now|date_format:'d.m.Y'} um {$smarty.now|date_format:'H:i'} durch {$smarty.session.USER}\n');$('#cur').click();return false;" value="{$row.kname} ONLINE Retoure{if $row.zusatz} {$row.zusatz}{/if}"/>
-
 
2570
                                {elseif $row.returnlink && $labeldruck===true}
-
 
2571
                                    <input type="button" class="retoureLabel" value="{$row.kname} Retoure{if $row.zusatz} {$row.zusatz}{/if}" data-bemerkung="{$row.kname} Retoure{if $row.zusatz} {$row.zusatz}{/if} am {$smarty.now|date_format:'d.m.Y'} um {$smarty.now|date_format:'H:i'} durch {$smarty.session.USER}\n" data-receiverid="{$row.returnlink}" data-id="{$row.id}" data-script="{$row.script}" />
-
 
2572
                                {/if}
-
 
2573
                            {/foreach}
-
 
2574
                        {/if}
-
 
2575
                    </div>
-
 
2576
                    <div style="clear:both;float:none;">&nbsp;</div>
-
 
2577
                    <fieldset style="float:right; padding:0px; border:none;">
-
 
2578
                        <legend>Speichern und ...</legend>
-
 
2579
                        <input type="submit" name="update[current]" id="cur" value="... nur speichern" />
-
 
2580
                        <input type="submit" name="update[prev]" value="... zurück" class="prevOrder"/>
-
 
2581
                        <input type="submit" name="update[list]" value="... zur Übersicht" />
-
 
2582
                        <input type="submit" name="update[next]" value="... weiter" class="nextOrder"/>
-
 
2583
                        <input type="hidden" name="anker" value="{$order->id}"/>
-
 
2584
                    </fieldset>
-
 
2585
                    <div style="clear:both;">
-
 
2586
                        <input type="reset" value="Zurücksetzen"/>
-
 
2587
                    </div>
-
 
2588
                    {if isset($user_rechte.Warenwirtschaft.bestellung.opentrans)}
-
 
2589
                        <br />
-
 
2590
                        <input type="button" id="export" value="Bestellung exportieren" />
-
 
2591
                        <br />
-
 
2592
                        <br />
-
 
2593
                    {/if}
-
 
2594
                    {if isset($user_rechte.Warenwirtschaft.bestellung.steuersatz_aendern) && isset($laenderMwSt)}
-
 
2595
                        <input name="button" type="button" value="Steuersatz ändern" class="changeMwSt"/>
-
 
2596
                    {/if}
-
 
2597
                    {if ( isset($user_rechte.Warenwirtschaft.bestellung.termin) )}
-
 
2598
                        <input name="button" type="button" onclick="systemtermin('Bestellung {$order->id}')" value="Termin"/>
-
 
2599
                    {/if}
-
 
2600
 
-
 
2601
 
-
 
2602
                    {if isset($user_rechte.Warenwirtschaft.best_manu.kundenauftrag_drucken)}
-
 
2603
                        <input name="button" type="button" onclick="kundenauftrag_drucken({$order->id});" value="Auftrag drucken"/>
-
 
2604
                    {/if}
-
 
2605
 
-
 
2606
                    <div><br/></div>
-
 
2607
 
-
 
2608
 
-
 
2609
 
-
 
2610
                    {if isset($user_rechte.Warenwirtschaft.bestellung.proforma_rechnung)}
-
 
2611
                        <input type="button" value="Proforma-Rechnung drucken" class="proforma_vorschalt_druck" />
-
 
2612
                    {/if}
-
 
2613
                    {if isset($user_rechte.Warenwirtschaft.bestellung.rechnung)}
-
 
2614
                        <input type="button" value="Rechnung drucken" id="rechnungSchreiben" class="rechnung_vorschalt_druck" />
-
 
2615
                    {/if}
-
 
2616
                    {if isset($user_rechte.Warenwirtschaft.bestellung.lieferschein)}
-
 
2617
                        <input type="button" value="Lieferschein drucken" id="lieferscheinDruck" class="lieferschein_vorschalt_druck" />
-
 
2618
                    {/if}
-
 
2619
                    {if isset($user_rechte.Warenwirtschaft.bestellung.drucken)}
-
 
2620
                        <script>
-
 
2621
                            $(document).ready(function() {
-
 
2622
                                $('#print_auftrag').click(function() {
-
 
2623
                                    window.open('auftrag.php?b_id={$order->id}');
-
 
2624
 
-
 
2625
                                    setTimeout(function(){
-
 
2626
                                        location.reload();
-
 
2627
                                    }, 2000);
-
 
2628
 
-
 
2629
                                });
-
 
2630
                            });
-
 
2631
 
-
 
2632
 
-
 
2633
                        </script>
-
 
2634
                        <input id="print_auftrag" type="button" {*}onclick="window.open('auftrag.php?b_id={$order->id}')"{*} value="Auftrag drucken" />
-
 
2635
                    {/if}
-
 
2636
                    <!--PE: Wenn Recht angebot["vorschaltseite"] gesetzt, dann gebe Action aus um Auftrag vorschaltseite zu zeigen. -->
-
 
2637
                    {if isset($user_rechte.Warenwirtschaft.bestellung.angebot)}
-
 
2638
                        {if strpos($web_rechte.Warenwirtschaft.bestellung.angebot,'vorschaltseite')!= false}
-
 
2639
                            <input type="button" class="angebot_vorschalt_druck" value="Angebot drucken" />
-
 
2640
                        {else}
-
 
2641
                            <input type="button" onclick="window.open('angebot.php?b_id={$order->id}')" value="Angebot drucken" />
-
 
2642
                        {/if}
-
 
2643
                    {/if}
-
 
2644
                    {if isset($user_rechte.Warenwirtschaft.bestellung.billsafe)}
-
 
2645
                        <input type="button" class="billsafe_phone" value="per Billsafe bezahlen" id="billsafe_phone_{$order->id}_{$order->shops_ID}"/>
-
 
2646
                    {/if}
-
 
2647
                    {if isset($web_rechte.Warenwirtschaft.bestellung.kommissionierungskontrolle )}
-
 
2648
                        <input type="button" class="kommissionierungskontrolle" value="Kommissionierungskontrolle" id="kommissionierungskontrolle_{$order->id}_{$order->shops_ID}" />
-
 
2649
                    {/if}
-
 
2650
                    <div><br/></div>
-
 
2651
 
-
 
2652
                    {if isset($user_rechte.Warenwirtschaft.bestellung.bestconect)}
-
 
2653
                        <input type="hidden" name="b_id" value="{$order->id}"/>
-
 
2654
                        <input type="text" name="b_id_neu" value=""/>
-
 
2655
                        <input type="hidden" name="mode" value="combine"/>
-
 
2656
                        <input name="button" type="submit" value="Bestellpositionen verschieben"/>
-
 
2657
                    {/if}
-
 
2658
 
-
 
2659
                    <div><br/></div>
-
 
2660
 
-
 
2661
                    <!--MK: Dialog Rechnung löschen -->
-
 
2662
                    <div id="dialog" title="Rechnung löschen">
-
 
2663
 
-
 
2664
                        <table width="100%">
-
 
2665
                            {assign var="rechnungExists" value=0}
-
 
2666
                            {section loop=$daten.dokumente name=d_ind}
-
 
2667
                                {assign var="capital" value=$dokument.name|substr:0:1}
-
 
2668
                                {assign var="name" value="."|explode:$dokument.name}
-
 
2669
                                <!--ME: speichern, ob Rechnung existiert -->
-
 
2670
                                {if $capital=="R"}
-
 
2671
                                    {assign var="rechnungExists" value=1}
-
 
2672
                                {/if}
-
 
2673
                                {if $capital == 'R'}
-
 
2674
                                    <tr class="links">
-
 
2675
                                        <td width="60%">
-
 
2676
 
-
 
2677
                                            <span class="unread_docs_helper" id="unread_docs_{$order->id}_{$dokument.id}_helper"></span>
-
 
2678
                                            {html_image file=$dokument.icon alt="Dateityp: {$dokument.type}"}
-
 
2679
                                            <a href="{$daten.dokPath}{$dokument.name}" target="_blank" id="doc_link_{$dokument.id}_{$order->id}" class="doc_link">
-
 
2680
                                                {$dokument.name|basename} ({$dokument.size|fsize_format:'':2:',':'.'})
-
 
2681
                                            </a>
-
 
2682
                                        </td>
-
 
2683
                                        <td width="3%">
-
 
2684
 
-
 
2685
                                            {html_image file="../dokumente/gfx/delete_record.gif" onclick="setzeTermin(\"{$name[0]}\",{$order->id})" border="0" style="cursor:pointer" id="{$dokument.id}" class="deleteRechnung"}
-
 
2686
                                        </td>
-
 
2687
                                    </tr>
-
 
2688
                                {/if}
-
 
2689
                            {/section}
-
 
2690
                        </table>
-
 
2691
                        <div id="response"></div>
-
 
2692
                    </div>
-
 
2693
                    <!--MK: Webrecht gesetzt & Rechnung vorhanden? -->
-
 
2694
                    {if isset($web_rechte.Warenwirtschaft.bestellung.rechnungsstorno_button) && ($capital == 'R')}
-
 
2695
                        <button id="opener">Rechnung löschen</button>
-
 
2696
                    {/if}
-
 
2697
 
-
 
2698
 
-
 
2699
                    <!-- ME: Bestellung stornieren START -->
-
 
2700
                    {if isset($user_rechte.Warenwirtschaft.bestellung.bestellstorno)}
-
 
2701
 
-
 
2702
                        {if $bestellungen[b_ind].status!='storniert'}
-
 
2703
                            <input class="bestellstorno" type="button" id="storno_{$order->id}" value="Bestellung stornieren" />
-
 
2704
                        {else}
-
 
2705
                            <input class="bestellopen" type="button" id="open_{$order->id}" value="Bestellung freigeben" />
-
 
2706
                        {/if}
-
 
2707
                    {/if}
-
 
2708
                    <!-- ME: Bestellung stornieren START -->
-
 
2709
 
-
 
2710
 
-
 
2711
                    <!--ME: wenn Rechnungen existieren, darf die Bestellung nicht gelöscht werden können -->
-
 
2712
                    {if $rechnungExists!=1}
-
 
2713
                        {if isset($user_rechte.Warenwirtschaft.bestellung.loeschen2)}
-
 
2714
                            <input type="submit" name="delete2" value="Nur Bestellung löschen" onclick="return confirm('Wollen sie diese Bestellung wirklich löschen?')"/>
-
 
2715
                        {/if}
-
 
2716
                        {if isset($user_rechte.Warenwirtschaft.bestellung.loeschen)}
-
 
2717
                            <input type="submit" name="delete" value="Bestellung + Kundendaten löschen" onclick="return confirm('Wollen sie diese Bestellung und die dazugehörigen Kundendaten wirklich löschen?')"/>
-
 
2718
                        {/if}
-
 
2719
                    {/if}
-
 
2720
                    {assign var=kk value=false}
-
 
2721
                    {assign var=rufname value=$versand_name|lower}
-
 
2722
                    {assign var=status value=$order->kk_info.status|lower}
-
 
2723
                    {if $rufname == "kreditkarte" && $status == "offen"}
-
 
2724
                        {assign var=kk value=true}
-
 
2725
                    {/if}
-
 
2726
                    {if isset($user_rechte.Warenwirtschaft.bestellung["kk-zahlung"])}
-
 
2727
                        {if $kk}
-
 
2728
                            <input type="hidden" name="shops_ID" value="{$order->shops_ID}"/>
-
 
2729
                            <div><br/></div>
-
 
2730
                            {if $web_settings[$order->shops_ID][119] == "saferpay"}
-
 
2731
                                <input type="hidden" name="orderid" value="{$order->id}"/>
-
 
2732
                                <input type="hidden" name="kk_info" value="{$order->kk_info.code}"/>
-
 
2733
                            {elseif $web_settings[$order->shops_ID][119] == "acceptance"}
-
 
2734
                                <input type="hidden" name="orderid" value="{$order->id}"/>
-
 
2735
                                <input type="hidden" name="amount" value="{$order->kk_summe}"/>
-
 
2736
                                <input type="hidden" name="currency" value="EUR"/>
-
 
2737
                                <input type="hidden" name="language" value="de_DE"/>
-
 
2738
                            {/if}
-
 
2739
                            <input type="hidden" name="operation" value="SAS"/>
-
 
2740
                            <input name="anfordern" type="submit" value="Zahlung anfordern"/>
-
 
2741
                        {/if}
-
 
2742
                    {/if}
-
 
2743
                    {if isset($user_rechte.Warenwirtschaft.bestellung.gutscheinbutton) && $gs}
-
 
2744
                    <input type="button" value="Gutschein erstellen" id="gen_gutschein"/>
-
 
2745
                </td>
-
 
2746
                {/if}
-
 
2747
            </tr>
-
 
2748
            <!-- ENDE BUTTONLEISTE UNTEN -->
-
 
2749
        {/if}
-
 
2750
        {if isset($user_rechte.Warenwirtschaft.bestellung.bestellstorno)}
-
 
2751
            {if $order->status=="storniert"}
-
 
2752
                <tr>
-
 
2753
                    <td class="links bestellung_buttons" colspan="3">
-
 
2754
                        <input class="bestellopen" type="button" id="open_{$order->id}" value="Bestellung freigeben" style="float:right" />
-
 
2755
                    </td>
-
 
2756
                </tr>
-
 
2757
            {/if}
-
 
2758
        {/if}
-
 
2759
        </table>
-
 
2760
        <br/>
-
 
2761
        <div id="gutschein_meldung"></div>
6
    </form>
2762
    </form>
-
 
2763
 
-
 
2764
    {if isset($web_rechte.Warenwirtschaft.rechnungsbuch.rechnungsbuch) && isset($web_rechte.Warenwirtschaft.bestellung.re_zahhlungsstatusinfo)}
-
 
2765
        {foreach $daten.dokumente as $dokument}
-
 
2766
            {assign var="capital" value=$dokument.name|basename|substr:0:1}
-
 
2767
 
-
 
2768
            {if $capital == "R" || $capital == "G"}
-
 
2769
                {*}
-
 
2770
                {if $capital == "G"}
-
 
2771
                    {assign var="r" value="R"}
-
 
2772
                    {assign var="nameOhneErstenBuchstaben" value=$dokument.name|substr:1}
-
 
2773
                    {assign var="name" value=$r|cat:$nameOhneErstenBuchstaben}
-
 
2774
                {else}
-
 
2775
                    {assign var="name" value=str_replace("G","R",$dokument.name|basename)}
-
 
2776
                {/if}
-
 
2777
                {*}
-
 
2778
                {assign var="name" value=substr($dokument.name|basename,1)}
-
 
2779
                {assign var="name" value="{$capital}`$name`"}
-
 
2780
 
-
 
2781
                <div class="layer_bemerkung" id="layer_bemerkung_{$rechnung[$name]['rechnungsnummer']}">
-
 
2782
                    <form method="get" action="{$SCRIPT_NAME}">
-
 
2783
                        <div style="float:left;">
-
 
2784
                            <!--MK 22.01.13 Zeigt checkbox für bestellungstatus bezahlt an: onchange -->
-
 
2785
                            <select name="bezahlstatus" id="bezahlstatus" onchange="bezahlt(this.form.bezahlstatus.options[this.form.bezahlstatus.selectedIndex].value);
-
 
2786
                                    return clearDate('bezahlstatus_datum_{$rechnung[$name]['rechnungsnummer']}',this.value,'{$rechnung[$name]['bezahlt_am']|date_format:"d.m.Y"}');">
-
 
2787
                                <option value="none">keine Auswahl</option>
-
 
2788
                                <option value="offen">offen</option>
-
 
2789
                                <option value="bezahlt" selected="selected">bezahlt</option>
-
 
2790
                                {if isset($user_rechte.Warenwirtschaft.Bestellung.rechnungsstorno_button)}
-
 
2791
                                    <option value="storniert">storniert</option>
-
 
2792
                                {/if}
-
 
2793
                            </select>
-
 
2794
                        </div>
-
 
2795
 
-
 
2796
                        <div style="float:left;padding:0 0 0 10px;">
-
 
2797
 
-
 
2798
                            <label for="bezahlstatus_datum">Datum:</label>
-
 
2799
                            <input style="margin-top:5px;" class="datum_input" onfocus="current_value=this.value;if (this.value=='') { this.value=today(); };this.select();" onchange="this.value=check_Date(this.value)" type="text" name="bezahlstatus_datum" value="{if $rechnung[$name]['bezahlt_am']!='0000-00-00 00:00:00'}{$rechnung[$name]['bezahlt_am']|date_format:"d.m.Y"}{/if}" id="bezahlstatus_datum_{$rechnung[$name]['rechnungsnummer']}" />
-
 
2800
 
-
 
2801
 
-
 
2802
                        </div>
-
 
2803
                        <br /><br />
-
 
2804
 
-
 
2805
                        <div style="clear:both;" id="bezahlt" class="box"><input type="checkbox" name="bestellungbezahltstatus" value="bezahlt" checked="true"/>Soll die zugehörige Bestellung auf bezahlt gesetzt werden?</div>
-
 
2806
                        <input type="hidden" name="bid" value="{$order->id}" />
-
 
2807
                        <br /><br />
-
 
2808
 
-
 
2809
                        <input type="hidden" name="rid" value="{$rechnung[$name]['rechnungsnummer']}" />
-
 
2810
                        Aktueller Bemerkungstext:<p style="margin:0px;font-style:italic;">{$rechnung[$name]['bezahlt_bemerkung']}</p>
-
 
2811
                        <textarea id="bezahlstatus_bemerkung" name="bezahlstatus_bemerkung" cols="40" rows="5"></textarea><br /><br />
-
 
2812
 
-
 
2813
                        <input type="hidden" name="action" value="save_bezahlstatus" />
-
 
2814
                        <input type="submit" value="Bemerkung speichern" />
-
 
2815
                    </form>
-
 
2816
                </div>
-
 
2817
            {/if}
-
 
2818
        {/foreach}
-
 
2819
        <script>
-
 
2820
            $(function(){
-
 
2821
                $('.datum_input').datepicker();
-
 
2822
                $('.layer_bemerkung').dialog({
-
 
2823
                    autoOpen:false,
-
 
2824
                    width:400
-
 
2825
                })
-
 
2826
            });
-
 
2827
            function buildSelectBox(rid,currStatus) {
-
 
2828
                $('#layer_bemerkung_'+rid).dialog({
-
 
2829
                    title:'Bezahlstatus/Bemerkung: '+rid
-
 
2830
                }).dialog("open");
-
 
2831
            }
-
 
2832
            function bezahlt(wert){
-
 
2833
                let i = wert;
-
 
2834
                if(i=="bezahlt")
-
 
2835
                {
-
 
2836
                    $(".box").css('display','block');
-
 
2837
                }
-
 
2838
                else
-
 
2839
                {
-
 
2840
                    $(".box").css('display','none');
-
 
2841
                }
-
 
2842
 
-
 
2843
            }
-
 
2844
            function clearDate(id,val,datum) {
-
 
2845
                if(val=="offen") {
-
 
2846
                    $('#'+id).val('');
-
 
2847
                }
-
 
2848
                if(val=="bezahlt" || val=="storniert" || val=="none") {
-
 
2849
                    $('#'+id).val(datum);
-
 
2850
                }
-
 
2851
                return true;
-
 
2852
            }
-
 
2853
        </script>
-
 
2854
    {/if}
-
 
2855
 
-
 
2856
    {if $bestellarten && $order->Bestellart|stristr:"ebay"}
-
 
2857
        <script charset="utf-8">
-
 
2858
            $(document).ready(function(){
-
 
2859
                $( "#vportalstorno" ).click(function(){
-
 
2860
                    $("<div id='vportalstornoDialog'>").dialog({
-
 
2861
                        width:"80%",
-
 
2862
                        open : function(){
-
 
2863
                            let data = [];
-
 
2864
                            data.push({ name: "bestellID", value: {$order->id} });
-
 
2865
                            data.push({ name: "bestellartID", value: {$order->bestellart_id} });
-
 
2866
                            $(this).load("vportal_stornierung.php", data);
-
 
2867
                        },
-
 
2868
                        close : function(){
-
 
2869
                            $('#vportalstornoDialog').empty().remove();
-
 
2870
                        },
-
 
2871
                        buttons : {
-
 
2872
                            "Schließen" : function(){
-
 
2873
                                $('#vportalstornoDialog').empty().remove();
-
 
2874
                            },
-
 
2875
                            "Senden" : function(){
-
 
2876
 
-
 
2877
                            }
-
 
2878
                        }
-
 
2879
                    });
-
 
2880
                });
-
 
2881
            });
-
 
2882
        </script>
-
 
2883
    {/if}
-
 
2884
 
-
 
2885
    {if isset($user_rechte.Warenwirtschaft.bestellung.steuersatz_aendern) && isset($laenderMwSt)}
-
 
2886
        <script>
-
 
2887
            $(document).ready(function(){
-
 
2888
                $( ".eingabe_landMwSt" ).change(function(){
-
 
2889
                    let mwst = $(this).val();
-
 
2890
                    let id = $(this).attr("id");
-
 
2891
                    id  = id.split("_");
-
 
2892
                    let artikelID = id[1];
-
 
2893
 
-
 
2894
                    $.ajax({
-
 
2895
                        type: "GET",
-
 
2896
                        url: "/Warenwirtschaft/update_bestellung.php?mwstArtikel="+mwst+"&artikelID="+artikelID+"&id={$order->id}",
-
 
2897
                    }).done(function( html ){
-
 
2898
                        alert( html );
-
 
2899
                    });
-
 
2900
                });
-
 
2901
            });
-
 
2902
        </script>
-
 
2903
        <div id="changeMwStDialog">
-
 
2904
            <script>
-
 
2905
                $(document).ready(function(){
-
 
2906
                    $( ".landMwSt" ).change(function(){
-
 
2907
                        let mwst = $(this).val();
-
 
2908
                        $(".mwstLand").val(mwst);
-
 
2909
                    });
-
 
2910
                });
-
 
2911
            </script>
-
 
2912
            <select name="landMwSt" class="landMwSt">
-
 
2913
                {foreach $laenderMwSt as $index => $laenderDaten}
-
 
2914
                    <option id="{$laenderDaten["id"]}" value="{$laenderDaten["typ_id"]}" {if $order->artikel[0].mwst == $laenderDaten["typ_id"]}selected{/if}>{$laenderDaten["bezeichnung"]}</option>
-
 
2915
                {/foreach}
-
 
2916
            </select>
-
 
2917
            <input type="hidden" value="{$laenderDaten["mwst_satz"]}" class="mwstLand"/>
-
 
2918
        </div>
-
 
2919
    {/if}
-
 
2920
    {if isset($user_rechte.Warenwirtschaft.logistiker.tracking_input)}
-
 
2921
        <div id="add_tracking_nr" title="Eine Paketverfolgungsnummer hinzufügen">
-
 
2922
            <form id="add_tracking_nr_form">
-
 
2923
                <input type="hidden" name="_token" value="{csrf_token()}">
-
 
2924
                <input type="hidden" name="_method" value="PATCH">
-
 
2925
                <table>
-
 
2926
                    <tr>
-
 
2927
                        <td class="links">Trackingnummer</td>
-
 
2928
                        <td class="rechts">
-
 
2929
                            <input type="text" name="tracking_nr"/>
-
 
2930
                        </td>
-
 
2931
                    </tr>
-
 
2932
                    <tr>
-
 
2933
                        <td class="links">Logistiker:</td>
-
 
2934
                        <td class="rechts">
-
 
2935
                            {html_options id="logistiker_id_dlg" name="logistiker_id" options=$logistiker selected=$logistiker_sel}
-
 
2936
                        </td>
-
 
2937
                    </tr>
-
 
2938
                    <tr>
-
 
2939
                        <td class="links">Datum:</td>
-
 
2940
                        <td class="rechts">
-
 
2941
                            <input type="text" name="datum" value="{$smarty.now|date_format:"d.m.Y"}" id="datum"/>
-
 
2942
                        </td>
-
 
2943
                    </tr>
-
 
2944
                </table>
-
 
2945
                <input type="hidden" name="bestell_id" value="{$order->id}"/>
-
 
2946
                <br />
-
 
2947
                <input type="submit"  value="Trackingnummer speichern und schliessen" id="send_tracking"/>
-
 
2948
                <br />   <br />
-
 
2949
            </form>
-
 
2950
        </div>
-
 
2951
 
-
 
2952
    {/if}
-
 
2953
 
-
 
2954
 
-
 
2955
 
-
 
2956
    <div id="ajax" style="display:none;"></div>
-
 
2957
 
-
 
2958
 
-
 
2959
    {if $path}
-
 
2960
        <script type="text/javascript">
-
 
2961
 
-
 
2962
            window.open("{$path}?shops_ID={$order->shops_ID}&bestell_id={$order->id}","PopUp","width=1000,height=800,scrollbars=yes,resizable=yes");
-
 
2963
 
-
 
2964
        </script>
-
 
2965
    {/if}
-
 
2966
    <script>
-
 
2967
        $(document).ready(function(){
-
 
2968
            $('#vertrag_oeffnen').click(function(){
-
 
2969
                let path = '/Warenwirtschaft/includes/verleih/leihvorlage_{$webs.domain}.php';
-
 
2970
                window.open(path+"?shops_ID={$order->shops_ID}&bestell_id={$order->id}","PopUp","width=1000,height=800,scrollbars=yes,resizable=yes");
-
 
2971
            });
-
 
2972
            $('#vertrag_oeffnen_individual').click(function(){
-
 
2973
                let path = '/Warenwirtschaft/includes/individual_formulare/tortenbestellung_{$webs.domain}.php';
-
 
2974
                window.open(path+"?shops_ID={$order->shops_ID}&bestell_id={$order->id}","PopUp","width=1000,height=800,scrollbars=yes,resizable=yes");
-
 
2975
            });
-
 
2976
        });
-
 
2977
    </script>
-
 
2978
 
-
 
2979
 
-
 
2980
    {if isset($web_rechte.Warenwirtschaft.bestellung.kundenbemerkung_layer) && ($order->AP_Bemerkung||$order->liefer_comment)}
-
 
2981
        <div id="kundenbemerkung_layer" title="Kundenbemerkung">
-
 
2982
            {if $order->liefer_comment}
-
 
2983
                {$order->liefer_comment|nl2br}
-
 
2984
            {else}
-
 
2985
                {$order->AP_Bemerkung|nl2br}
-
 
2986
            {/if}
-
 
2987
        </div>
-
 
2988
    {/if}
-
 
2989
    {if $order->notiz}
-
 
2990
        <div id="notizDlg" title="Kundenbemerkung">
-
 
2991
            {$order->notiz}
-
 
2992
        </div>
-
 
2993
    {/if}
-
 
2994
    {if $order->mwst_befreiung=="on"}
-
 
2995
        <div id="ustid_layer" title="Steuerinformation">
-
 
2996
            ACHTUNG: Kunde ist von der Mehrwertsteuer befreit!
-
 
2997
            <br />
-
 
2998
            Umsatzsteuer-ID: {$order->ustid_nr}
-
 
2999
        </div>
-
 
3000
    {/if}
-
 
3001
 
-
 
3002
 
-
 
3003
    {if isset( $user_rechte.Warenwirtschaft.bestellung.bestellstorno)}
-
 
3004
        <script>
-
 
3005
            // ME: bestellstorno dialog
-
 
3006
            $(function() {
-
 
3007
                {if isset($user_rechte.Warenwirtschaft.bestellung.bestellstorno)}
-
 
3008
                $(".bestellopen").click(function(){
-
 
3009
 
-
 
3010
                    let bId={$order->id}
-
 
3011
                    $.get("/Warenwirtschaft/reopenOrder.php?bestelung="+bId,function(){
-
 
3012
                        $(location)[0].reload();
-
 
3013
                    })
-
 
3014
                })
-
 
3015
                {/if}
-
 
3016
                $( "#bestellstorno_dlg" ).dialog({
-
 
3017
                    autoOpen: false,
-
 
3018
                    minWidth: 600,
-
 
3019
                    resize:false,
-
 
3020
                    title:'Bestellung stornieren',
-
 
3021
                    buttons:{
-
 
3022
                        Stornieren: function(){
-
 
3023
                            $('#storno_form').submit();
-
 
3024
                        },
-
 
3025
                        Abbrechen: function() {
-
 
3026
                            $(this).dialog("close");
-
 
3027
                        }
-
 
3028
                    }
-
 
3029
                });
-
 
3030
                $( ".bestellstorno" ).click(function() {
-
 
3031
                    $( "#bestellstorno_dlg" ).dialog( "open" );
-
 
3032
                    return false;
-
 
3033
                });
-
 
3034
            });
-
 
3035
 
-
 
3036
 
-
 
3037
 
-
 
3038
        </script>
-
 
3039
        <div id="bestellstorno_dlg">
-
 
3040
            <form action="/Warenwirtschaft/bestellungen.php" method="post" id="storno_form">Bitte geben Sie den Grund der Stornierung ein:
-
 
3041
                <input type="hidden" name="_token" value="{csrf_token()}">
-
 
3042
                <input type="hidden" name="_method" value="PATCH">
-
 
3043
                <br/><br/>
-
 
3044
                <textarea cols="50" rows="6" name="stornogrund"></textarea>
-
 
3045
                <input type="hidden" name="action" value="bestellstorno" />
-
 
3046
                <input type="hidden" name="bestellID" value="{$order->id}" />
-
 
3047
                {if $order->fremd_id && $order->portal_storno}
-
 
3048
                    <input type="hidden" name="fremd_id" value="{$order->fremd_id}" />
-
 
3049
                    <input type="hidden" name="vportal" value="0" />
-
 
3050
                    <br />
-
 
3051
                    <input id="vportal" type="checkbox" name="vportal" value="1" checked="checked" />
-
 
3052
                    <label for="vportal">Auch auf {$order->portal_name} stornieren</label>
-
 
3053
                    {if $order->portal_template=="idealo_de"}
-
 
3054
                        <select name="grund">
-
 
3055
                            <option label="Stornierung durch Kunden" value="1">Stornierung durch Kunden</option>
-
 
3056
                            <option label="nicht lieferbar" value="2">nicht lieferbar</option>
-
 
3057
                            <option label="Retoure" value="3">Retoure</option>
-
 
3058
                        </select>
-
 
3059
                    {/if}
-
 
3060
                {/if}
-
 
3061
            </form>
-
 
3062
        </div>
-
 
3063
    {/if}
-
 
3064
    {if isset($user_rechte.Warenwirtschaft.bestellung.billsafe)}
-
 
3065
        <div id="bs_return" title="Billsafe Rückmeldung"></div>
-
 
3066
    {/if}
-
 
3067
 
-
 
3068
 
-
 
3069
    <div id="change_amount_dlg" title="Artikeldaten erfassen">
-
 
3070
        <p>
-
 
3071
            Hier können Sie den Barcode des zu liefernden<br />
-
 
3072
            Artikels einlesen und die Daten in die Bestellung eintragen.
-
 
3073
            <br />
-
 
3074
            Die daraus entstehende Differenz können Sie dann Ihrem Kunden<br />
-
 
3075
            erstatten oder nachberechnen.
-
 
3076
            <br />
-
 
3077
            Dazu muss die Bestellung &uuml;ber Paypal, Kreditkarte oder sofortueberweisung bezahlt worden sein.
-
 
3078
        </p>
-
 
3079
        <form id="change_amount_form" onsubmit="return false;">
-
 
3080
            <input type="hidden" name="_token" value="{csrf_token()}">
-
 
3081
            <input type="hidden" name="_method" value="PATCH">
-
 
3082
            Barcode: <input type="text" name="barcode" id="barcode" />
-
 
3083
            <input type="hidden" name="ab_id" id="change_ab_id" value=""/>
-
 
3084
            <input type="submit" style="display:none;" id="change_amount_btn" />
-
 
3085
        </form>
-
 
3086
    </div>
-
 
3087
 
-
 
3088
    <div id="labelReturn" title="Rückmeldung von Labeldruck"></div>
-
 
3089
    <div id="updReturn" title="Ergebnis Bestellupdate"></div>
-
 
3090
    <div id="delShipmentQuestion" title="Wirklich löschen?">
-
 
3091
        Wollen Sie die Trackingnummer <strong><span id="delTrackNumber"></span></strong> wirklich löschen?<br />
-
 
3092
        ACHTUNG: Dadurch wird das Versandlabel UNGÜLTIG und muß neu erstellt werden!
-
 
3093
        <input type="hidden" id="delDokId" />
-
 
3094
        <input type="hidden" id="delDokLogistiker" />
-
 
3095
        <input type="hidden" id="returnCode" />
-
 
3096
    </div>
-
 
3097
    <div id="VersandDialog" title="Parameter f&uuml;r die Erstellung von Versandetiketten festlegen">
-
 
3098
    </div>
-
 
3099
    <div id="refundDlg" title="Erstattung f&uuml;r {$order->kk_info.anbieter} K&auml;ufe">
-
 
3100
        <form id="refundForm">
-
 
3101
            <input type="hidden" name="_token" value="{csrf_token()}">
-
 
3102
            <input type="hidden" name="_method" value="PATCH">
-
 
3103
            <table>
-
 
3104
                <tr>
-
 
3105
                    <td>Bestellnummer</td>
-
 
3106
                    <td colspan="2">
-
 
3107
                        {$order->id}
-
 
3108
                        <input type="hidden" name="bestell_id" value="{$order->id}" />
-
 
3109
                    </td>
-
 
3110
                </tr>
-
 
3111
                <tr>
-
 
3112
                    <td>Betrag</td>
-
 
3113
                    <td>
-
 
3114
                        <input type="text" name="betrag" value="{$order->gesamtsumme_buffer}" id="refundAmount" />
-
 
3115
                    </td>
-
 
3116
                    <td>
-
 
3117
                        {if $order->kk_info.anbieter=="Amazon"}
-
 
3118
                            <span id="amazonRefunded" style="display:none;">{$order->refunded}</span>
-
 
3119
                            <span id="amazonMax" style="display:none;">{$order->max}</span>
-
 
3120
                            <span id="amazonDiff" style="display:none;">{$order->diff}</span>
-
 
3121
                            {$order->refunded|money_format_red} bereits erstattet<br />
-
 
3122
                            maximal {$order->max|money_format_red} erstattbar<br />
-
 
3123
                            noch {$order->diff|money_format_red} &uuml;brig
-
 
3124
                            <input type="hidden" name="diff" value="{$order->diff}" />
-
 
3125
                            <input type="hidden" name="env" value="{$order->kk_info.env}" />
-
 
3126
                        {/if}
-
 
3127
                    </td>
-
 
3128
                </tr>
-
 
3129
                <tr>
-
 
3130
                    <td>Grund</td>
-
 
3131
                    <td>
-
 
3132
                        <textarea name="grund" cols="30" rows="5">Rückzahlung zu Bestellung {$order->id}.</textarea>
-
 
3133
                    </td>
-
 
3134
                    <td></td>
-
 
3135
                </tr>
-
 
3136
            </table>
-
 
3137
            <input type="hidden" name="shops_id" value="{$order->shops_ID}" />
-
 
3138
        </form>
-
 
3139
    </div>
-
 
3140
 
-
 
3141
    {if isset($web_rechte.Warenwirtschaft.bestellung.bestelldruckquittierung)}
-
 
3142
        <style>
-
 
3143
            .print_eingabefelder .bottomline {
-
 
3144
                border-bottom:1px solid #000;
-
 
3145
                width:46%;
-
 
3146
                float:left;
-
 
3147
                padding:0 1%;
-
 
3148
                margin:40px 1% 0 1%;
-
 
3149
            }
-
 
3150
            .print_eingabefelder .topline {
-
 
3151
                width:46%;
-
 
3152
                float:left;
-
 
3153
                padding:0 1%;
-
 
3154
                border-top:1px solid #000;
-
 
3155
                margin:60px 1% 0 1%;
-
 
3156
            }
-
 
3157
        </style>
-
 
3158
        <div class="onprint print_eingabefelder">
-
 
3159
            <div class="bottomline">Abholdatum: </div>
-
 
3160
            <div class="bottomline">Bearbeiter: </div>
-
 
3161
            <div class="break"></div>
-
 
3162
            <div class="topline">Abholer / Kunde in Druckschrift</div>
-
 
3163
            <div class="topline">Abholer / Kunde Unterschrift</div>
-
 
3164
        </div>
-
 
3165
    {/if}
-
 
3166
 
-
 
3167
    <script>
-
 
3168
        $(function(){
-
 
3169
            $('.dokumentnamebox').hover(function() {
-
 
3170
                if ($(this)[0].scrollWidth > $(this).innerWidth() && !$(this).hasClass('marquee')) { $(this).children('a').wrap("<span class='marquee dokumentnamebox'></span>"); }
-
 
3171
            });
-
 
3172
        });
-
 
3173
    </script>
-
 
3174
    {if $dialog}
-
 
3175
        <div id="mailTemplates" title="Template für E-Mail auswählen">
-
 
3176
            <form id="mailTemplateForm" method="post">
-
 
3177
                <input type="hidden" name="_token" value="{csrf_token()}">
-
 
3178
                <input type="hidden" name="_method" value="PATCH">
-
 
3179
                {foreach $templates as $id=> $option}
-
 
3180
                    <button title="{$templateDesc.$id}" data-value="{$id}" class="vorlage" style="margin-bottom:10px;">{$option}</button>
-
 
3181
                {/foreach}
-
 
3182
            </form>
-
 
3183
        </div>
-
 
3184
    {/if}
-
 
3185
 
-
 
3186
    <div id="mailDlg" title="E-Mail schreiben"></div>
-
 
3187
    <div id="dialogLieferadresse"></div>
-
 
3188
    <div id="dialogRechnungsadresse"></div>
-
 
3189
    <div id="dialogDokTitle" title="Titel ändern">
-
 
3190
        <form id="dokTitleForm" method="post">
-
 
3191
            <input type="hidden" name="_token" value="{csrf_token()}">
-
 
3192
            <input type="hidden" name="_method" value="PATCH">
-
 
3193
            <table>
-
 
3194
                <tr>
-
 
3195
                    <td>Titel</td>
-
 
3196
                    <td>
-
 
3197
                        <input type="text" value="" name="titel" id="dokTitle" size="150" />
-
 
3198
                    </td>
-
 
3199
                </tr>
-
 
3200
            </table>
-
 
3201
            <input type="hidden" name="id" value="" id="dokId" />
-
 
3202
        </form>
-
 
3203
    </div>
-
 
3204
    <div id="dokumentDlg" title="Dokument anzeigen"></div>
-
 
3205
    {if $order->Login<100}
-
 
3206
        <div id="umwandelnDlg" title="Kunde umwandeln">
-
 
3207
            Wollen Sie den Kunden <b>{$order->E_Mail}</b> wirklich in ein Kundenkonto umwandeln?
-
 
3208
            <br>
-
 
3209
            <b style="color:red">Diese Aktion kann nicht rückgängig gemacht werden!</b>
-
 
3210
            <br>
-
 
3211
            <br>
-
 
3212
            <b>Info</b>
-
 
3213
            <br>
-
 
3214
            <div id="umwandelnCheckResult"></div>
-
 
3215
        </div>
-
 
3216
    {/if}
-
 
3217
    <script>
-
 
3218
        $(document).ready(function() {
-
 
3219
            // Artikelbeschreibung bearbeiten
-
 
3220
            $('.edit_beschreibung').click(function() {
-
 
3221
                let id = $(this).data("id");
-
 
3222
                $('#beschreibung_'+id).toggle();
-
 
3223
                $('#beschreibung_indikator_'+id).toggle();
-
 
3224
                $('#artikel_'+id+'_changed').val(1);
-
 
3225
            });
-
 
3226
 
-
 
3227
        });
-
 
3228
    </script>
-
 
3229
    {if ( isset( $user_rechte["Warenwirtschaft"]["bestellung"]["lieferantenbestellung"] ) )}
-
 
3230
        <div id="lagerbestand"></div>
-
 
3231
    {/if}
7
{/block}
3232
{/block}