Subversion-Projekte lars-tiefland.webanos.marine-sales.de

Revision

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

Revision 193 Revision 194
Zeile 1... Zeile 1...
1
<!-- $Id: supplier_warehouses.tpl 193 2023-08-04 22:32:06Z lars $ BEGIN -->
1
<!-- $Id: supplier_warehouse.tpl 194 2023-08-04 22:46:17Z lars $ BEGIN -->
-
 
2
<script>
-
 
3
    $(function () {
-
 
4
        $('#f_l_bestellbar').change(toggle_extra_rows).change();
-
 
5
        $('#add_statuscode').button({
-
 
6
            icons:
-
 
7
                {
-
 
8
                    primary: "ui-icon-plus"
-
 
9
                }
-
 
10
        }).click(add_statuscode);
-
 
11
        $('.del_code').button({
-
 
12
            icons:
-
 
13
                {
-
 
14
                    primary: "ui-icon-trash"
-
 
15
                }
-
 
16
        }).click(del_code_row);
-
 
17
 
-
 
18
        function toggle_extra_rows() {
-
 
19
            if ($('#f_l_bestellbar').is(":checked")) {
-
 
20
                $('#logistiker_row').show();
-
 
21
                $('#artikelstatus_row').show();
-
 
22
                $('#rechnungstatus_row').show();
-
 
23
                $('#one4b_row').show();
-
 
24
            } else {
-
 
25
                $('#logistiker_row').hide();
-
 
26
                $('#artikelstatus_row').hide();
-
 
27
                $('#rechnungstatus_row').hide();
-
 
28
                $('#one4b_row').hide();
-
 
29
            }
-
 
30
            $('#')
-
 
31
        }
-
 
32
 
-
 
33
        function add_statuscode() {
-
 
34
            anz = $('.code').length;
2
<script src="/js/jquery-lager.js"></script>
35
            $('#code_table').append("<tr class='rechts code' id='code_row_" + anz + "'><td><input type='text' name='code[" + anz + "][key]'></td><td><input type='text' name='code[" + anz + "][value]'></td><td><input type='text' name='code[" + anz + "][image]'><input type='hidden' name='code[" + anz + "][id]' value='" + anz + "'></td><td><select name='code[" + anz + "][lieferstatus]'><option label='ohne' value='' selected='selected'>ohne</option><option label='0' value='0'>0</option><option label='1' value='1'>1</option><option label='2' value='2'>2</option><option label='3' value='3'>3</option><option label='4' value='4'>4</option></select></td><td><button class='delete' id='del_code_" + anz + "'>&nbsp;</button></tr>");
-
 
36
            $('#del_code_' + anz).button({
-
 
37
                icons:
-
 
38
                    {
-
 
39
                        primary: "ui-icon-trash"
-
 
40
                    }
-
 
41
            }).click(del_code_row);
-
 
42
            return false;
-
 
43
        }
-
 
44
 
-
 
45
        function del_code_row() {
-
 
46
            id = this.id.split("_");
-
 
47
            $('#code_row_' + id[2]).remove();
-
 
48
            return false;
-
 
49
        }
-
 
50
    });
-
 
51
</script>
-
 
52
<form method="post" id="lager_form">
-
 
53
    <input type="hidden" name="l_id" value="{$lager.id}" id="f_l_id">
-
 
54
    <input type="hidden" name="l_lieferant_id" value="{$supplier.id}">
3
<table width="100%">
55
    <table width="100%">
-
 
56
        <tr>
4
    <tr class="links">
57
            <td class="links">
5
        <td colspan="4">Läger für diesen Lieferanten
58
                <label for="f_l_name">Name</label>
-
 
59
            </td>
6
            {if isset($user_rechte.bestellwesen.lieferanten.bearbeiten)}
60
            <td class="rechts">
7
                <button id="add_lager_{$lieferant.id}" class="add_lager" title="Lager hinzufügen">&nbsp;</button>
61
                <input type="text" name="l_name" value="{$lager.name}" id="f_l_name">
8
            {/if}
62
            </td>
9
        </td>
63
        </tr>
10
    </tr>
64
        <tr>
11
    <tr class="links">
65
            <td class="links">
-
 
66
                <label for="f_l_rang">Rang</label>
12
        <td>Name</td>
67
            </td>
13
        <td style="width:40px;">bestellbar</td>
68
            <td class="rechts">
14
        <td style="width:200px;">Aktionen</td>
69
                <input type="text" name="rank" id="f_l_rang" value="{$lager.rank}">
-
 
70
            </td>
15
    </tr>
71
        </tr>
16
    {foreach $lagerArr as $lager}
72
        <tr>
17
        <tr class="rechts">
73
            <td class="links">
-
 
74
                <label for="f_l_bestellbar">Artikel bestellbar?</label>
-
 
75
            </td>
18
            <td>
76
            <td>
-
 
77
                <input type="hidden" name="orderable" value="0">
-
 
78
                <input type="checkbox" name="orderable" value="1" id="f_l_bestellbar"
-
 
79
                       {if $lager.orderable==1}checked="checked"{/if}>
19
                {$lager.name}
80
                <table>
-
 
81
                    {if $logistiker}
-
 
82
                        <tr id="logistiker_row">
-
 
83
                            <td>
20
                <input type="hidden" id="d_l_name_{$lagerid}" value="{$lager.name}"/>
84
                                <label for="f_l_logistiker">Logistiker ändern:</label>
-
 
85
                            </td>
-
 
86
                            <td>
-
 
87
                                <select name="logistiker_id" class="logistiker_select" id="f_l_logistiker">
21
                <input type="hidden" id="d_l_id_{$lager.id}" value="{$lager.id}"/>
88
                                    <option value="0">--- Bitte wählen ---</option>
22
                <input type="hidden" id="d_l_bestellbar_{$lager.id}" value="{$lager.orderable}"/>
89
                                    {html_options options=$logistiker selected=$lager.logistiker_id}
-
 
90
                                </select>
-
 
91
                            </td>
-
 
92
                        </tr>
-
 
93
                    {/if}
-
 
94
                    {if $artikelstatus}
-
 
95
                        <tr id="artikelstatus_row">
-
 
96
                            <td>
23
                <input type="hidden" id="d_l_rang_{$lager.id}" value="{$lager.rank}"/>
97
                                <label for="f_l_artikelstatus">Artikelstatus ändern</label>
-
 
98
                            </td>
-
 
99
                            <td>
-
 
100
                                <select name="item_status" class="artikelstatus_select" id="f_l_artikelstatus">
-
 
101
                                    <option value="-1">--- Nicht ändern ---</option>
-
 
102
                                    {html_options options=$item_status selected=$item_status_id}
-
 
103
                                </select>
-
 
104
                            </td>
24
            </td>
105
                        </tr>
-
 
106
                    {/if}
-
 
107
                    {if $rechnungStatus}
25
            <td>{if $lager.orderable}ja{else}nein{/if}</td>
108
                        <tr id="rechnungstatus_row">
26
            <td style="width:80px;">
109
                            <td>
27
                {if isset($user_rechte.bestellwesen.lieferanten.bearbeiten)}
110
                                <label for="f_l_rechnungstatus">Rechnungstatus ändern</label>
-
 
111
                            </td>
-
 
112
                            <td>
28
                    <button class="edit_lager" id="edit_lager_{$lager.id}" title="Lager bearbeiten">&nbsp;</button>
113
                                <select name="invoice_status" class="artikelstatus_select" id="f_l_rechnungstatus">
29
                    {if isset($user_rechte.bestellwesen.lieferanten.lager_loeschen)}
114
                                    <option value="-1">--- Nicht ändern ---</option>
30
                        <button class="del_lager" id="del_lager_{$lager.id}" title="Lager löschen">&nbsp;</button>
115
                                    {html_options options=$invoice_status selected=$invoice_status_id}
-
 
116
                                </select>
-
 
117
                            </td>
-
 
118
                        </tr>
31
                    {/if}
119
                    {/if}
32
                {/if}
120
                    {if $one4b}
33
                {if $lager[l_ind].bestellbar}
121
                        <tr id="one4b_row">
-
 
122
                            <td><label for="f_l_one4b">One4B?</label></td>
-
 
123
                            <td>
-
 
124
                                <input type="hidden" name="one4b" value="0">
34
                    <button class="send_order" id="send_order_{$lager.id}" title="offene Bestellungen übertragen">&nbsp;</button>
125
                                <input type="checkbox" name="one4b" value="1" id="f_l_one4b"
-
 
126
                                       {if $lager.one4b==1}checked="checked"{/if}>
-
 
127
                            </td>
-
 
128
                        </tr>
35
                {/if}
129
                    {/if}
-
 
130
                </table>
36
            </td>
131
            </td>
37
        </tr>
132
        </tr>
38
        {foreachelse}
133
        <tr>
-
 
134
            <td class="links">Lieferstatus positiv</td>
39
        <tr class="rechts">
135
            <td class="rechts">
40
            <td colspan="6">Keine Läger vorhanden</td>
136
                {html_options name="lstatus_pos" options=$lstatus selected=$lager.lstatus_pos}
-
 
137
            </td>
41
        </tr>
138
        </tr>
-
 
139
        {if isset($user_rechte.bestellwesen.lieferanten.verf_codes)}
42
    {/foreach}
140
            <tr>
-
 
141
                <td class="links">Verf&uuml;gbarkeits-Codes:</td>
43
</table>
142
                <td class="rechts">
44
<div id="add_lager_dialog" title="Lager hinzufügen / bearbeiten"></div>
143
                    <table width="100%" id="code_table">
45
 
-
 
46
<div id="del_lager_dialog" title="Lager löschen">Wollen Sie das Lager "<span id="df_l_name"></span>" wirklich löschen?
144
                        <tr class="links">
47
    <form method="post" id="del_lager_form">
145
                            <td>Code</td>
48
        <input type="hidden" name="d_l_id" id="df_l_id"/>
146
                            <td>entspricht-Text</td>
-
 
147
                            <td>Bildnummer</td>
49
        <input type="hidden" name="mode" value="delete"/>
148
                            <td>Lieferstatus positiv</td>
50
    </form>
149
                            <td>
-
 
150
                                <button id="add_statuscode">&nbsp;</button>
-
 
151
                            </td>
51
</div>
152
                        </tr>
52
 
-
 
-
 
153
                        {section loop=$lager.verf_codes name=c_ind}
53
<div id="del_lieferanten_dialog" title="Lieferant löschen">Wollen Sie den Lieferanten "{$lieferant.name}" wirklisch löschen?
154
                            <tr class="rechts code" id="code_row_{$lager.verf_codes[c_ind].id}">
54
    <form  id="del_lieferant_form">
155
                                <td>
-
 
156
                                    <input type="text" name="code[{$lager.verf_codes[c_ind].id}][key]"
55
        <input type="hidden" name="id" value="{$lieferant.id}"/>
157
                                           value="{$lager.verf_codes[c_ind].key}">
-
 
158
                                </td>
-
 
159
                                <td>
-
 
160
                                    <input type="text" name="code[{$lager.verf_codes[c_ind].id}][value]"
-
 
161
                                           value="{$lager.verf_codes[c_ind].value}">
-
 
162
                                </td>
-
 
163
                                <td>
-
 
164
                                    <input type="text" name="code[{$lager.verf_codes[c_ind].id}][image]"
-
 
165
                                           value="{$lager.verf_codes[c_ind].image}">
56
        <input type="hidden" name="mode" value="delete"/>
166
                                    <input type="hidden" name="code[{$lager.verf_codes[c_ind].id}][id]"
-
 
167
                                           value="{$lager.verf_codes[c_ind].id}">
-
 
168
                                </td>
57
    </form>
169
                                <td>
-
 
170
                                    <select name="code[{$lager.verf_codes[c_ind].id}][lieferstatus]">
-
 
171
                                        {html_options options=$lstatus selected={$lager.verf_codes[c_ind].lieferstatus}}
-
 
172
                                    </select>
58
</div>
173
                                </td>
59
 
-
 
60
<div id="meld-dialog" title="">
174
                                <td>
-
 
175
                                    <button id="delete_code_{$lager.verf_codes[c_ind].id}" class="del_code">&nbsp;
-
 
176
                                    </button>
-
 
177
                                </td>
61
</div>
178
                            </tr>
62
 
-
 
-
 
179
                            {sectionelse}
-
 
180
                            <tr class="rechts code">
-
 
181
                                <td>
63
<div id="send_order_dialog" title="offene Bestellungen exportieren">
182
                                    <input type="text" name="code[0][key]" value="0">
-
 
183
                                </td>
-
 
184
                                <td>
64
    <form id="send_order_form">Wollen Sie die offenen Bestellungen tatsächlich exportieren?
185
                                    <input type="text" name="code[0][value]">
-
 
186
                                </td>
-
 
187
                                <td>
65
        <input type="hidden" id="s_lieferant_id" name="lieferant_id" value="{$lieferant.id}"/>
188
                                    <input type="text" name="code[0][image]" value="0">
66
        <input type="hidden" id="s_lager_id" name="lager_id" value=""/>
189
                                    <input type="hidden" name="code[0][id]" value="0">
-
 
190
                                </td>
-
 
191
                                <td>
-
 
192
                                    {html_options name="code[0][lieferstatus]" options=$lstatus}
-
 
193
                                </td>
-
 
194
                            </tr>
-
 
195
                        {/section}
-
 
196
                    </table>
-
 
197
                </td>
-
 
198
            </tr>
-
 
199
        {/if}
67
    </form>
200
    </table>
-
 
201
    <input type="hidden" name="mode" value="{if $lager.id}update{else}save{/if}">
68
</div>
202
</form>
69
<!-- $Id: supplier_warehouses.tpl 193 2023-08-04 22:32:06Z lars $ END -->
203
<!-- $Id: supplier_warehouse.tpl 194 2023-08-04 22:46:17Z lars $ END -->