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

Revision

Revision 194 | Revision 205 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
143 lars 1
<!-- $Id: supplier_warehouse.tpl 201 2023-08-04 23:28:01Z lars $ BEGIN -->
194 lars 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;
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">
201 lars 53
    <input type="hidden" name="l_id" value="{$supplierWarehouse.id}" id="f_l_id">
194 lars 54
    <input type="hidden" name="l_lieferant_id" value="{$supplier.id}">
55
    <table width="100%">
56
        <tr>
57
            <td class="links">
58
                <label for="f_l_name">Name</label>
59
            </td>
60
            <td class="rechts">
201 lars 61
                <input type="text" name="l_name" value="{$supplierWarehouse.name}" id="f_l_name">
194 lars 62
            </td>
63
        </tr>
64
        <tr>
65
            <td class="links">
66
                <label for="f_l_rang">Rang</label>
67
            </td>
68
            <td class="rechts">
201 lars 69
                <input type="text" name="rank" id="f_l_rang" value="{$supplierWarehouse.rank}">
194 lars 70
            </td>
71
        </tr>
72
        <tr>
73
            <td class="links">
74
                <label for="f_l_bestellbar">Artikel bestellbar?</label>
75
            </td>
193 lars 76
            <td>
194 lars 77
                <input type="hidden" name="orderable" value="0">
78
                <input type="checkbox" name="orderable" value="1" id="f_l_bestellbar"
201 lars 79
                       {if $supplierWarehouse.orderable==1}checked="checked"{/if}>
194 lars 80
                <table>
81
                    {if $logistiker}
82
                        <tr id="logistiker_row">
83
                            <td>
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">
88
                                    <option value="0">--- Bitte wählen ---</option>
201 lars 89
                                    {html_options options=$logistiker selected=$supplierWarehouse.logistiker_id}
194 lars 90
                                </select>
91
                            </td>
92
                        </tr>
193 lars 93
                    {/if}
194 lars 94
                    {if $artikelstatus}
95
                        <tr id="artikelstatus_row">
96
                            <td>
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>
105
                        </tr>
106
                    {/if}
107
                    {if $rechnungStatus}
108
                        <tr id="rechnungstatus_row">
109
                            <td>
110
                                <label for="f_l_rechnungstatus">Rechnungstatus ändern</label>
111
                            </td>
112
                            <td>
113
                                <select name="invoice_status" class="artikelstatus_select" id="f_l_rechnungstatus">
114
                                    <option value="-1">--- Nicht ändern ---</option>
115
                                    {html_options options=$invoice_status selected=$invoice_status_id}
116
                                </select>
117
                            </td>
118
                        </tr>
119
                    {/if}
120
                    {if $one4b}
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">
125
                                <input type="checkbox" name="one4b" value="1" id="f_l_one4b"
201 lars 126
                                       {if $supplierWarehouse.one4b==1}checked="checked"{/if}>
194 lars 127
                            </td>
128
                        </tr>
129
                    {/if}
130
                </table>
143 lars 131
            </td>
132
        </tr>
194 lars 133
        <tr>
134
            <td class="links">Lieferstatus positiv</td>
135
            <td class="rechts">
201 lars 136
                {html_options name="lstatus_pos" options=$lstatus selected=$supplierWarehouse.lstatus_pos}
194 lars 137
            </td>
143 lars 138
        </tr>
194 lars 139
        {if isset($user_rechte.bestellwesen.lieferanten.verf_codes)}
140
            <tr>
141
                <td class="links">Verf&uuml;gbarkeits-Codes:</td>
142
                <td class="rechts">
143
                    <table width="100%" id="code_table">
144
                        <tr class="links">
145
                            <td>Code</td>
146
                            <td>entspricht-Text</td>
147
                            <td>Bildnummer</td>
148
                            <td>Lieferstatus positiv</td>
149
                            <td>
150
                                <button id="add_statuscode">&nbsp;</button>
151
                            </td>
152
                        </tr>
201 lars 153
                        {section loop=$supplierWarehouse.verf_codes name=c_ind}
154
                            <tr class="rechts code" id="code_row_{$supplierWarehouse.verf_codes[c_ind].id}">
194 lars 155
                                <td>
201 lars 156
                                    <input type="text" name="code[{$supplierWarehouse.verf_codes[c_ind].id}][key]"
157
                                           value="{$supplierWarehouse.verf_codes[c_ind].key}">
194 lars 158
                                </td>
159
                                <td>
201 lars 160
                                    <input type="text" name="code[{$supplierWarehouse.verf_codes[c_ind].id}][value]"
161
                                           value="{$supplierWarehouse.verf_codes[c_ind].value}">
194 lars 162
                                </td>
163
                                <td>
201 lars 164
                                    <input type="text" name="code[{$supplierWarehouse.verf_codes[c_ind].id}][image]"
165
                                           value="{$supplierWarehouse.verf_codes[c_ind].image}">
166
                                    <input type="hidden" name="code[{$supplierWarehouse.verf_codes[c_ind].id}][id]"
167
                                           value="{$supplierWarehouse.verf_codes[c_ind].id}">
194 lars 168
                                </td>
169
                                <td>
201 lars 170
                                    <select name="code[{$supplierWarehouse.verf_codes[c_ind].id}][lieferstatus]">
171
                                        {html_options options=$lstatus selected={$supplierWarehouse.verf_codes[c_ind].lieferstatus}}
194 lars 172
                                    </select>
173
                                </td>
174
                                <td>
201 lars 175
                                    <button id="delete_code_{$supplierWarehouse.verf_codes[c_ind].id}" class="del_code">&nbsp;
194 lars 176
                                    </button>
177
                                </td>
178
                            </tr>
179
                            {sectionelse}
180
                            <tr class="rechts code">
181
                                <td>
182
                                    <input type="text" name="code[0][key]" value="0">
183
                                </td>
184
                                <td>
185
                                    <input type="text" name="code[0][value]">
186
                                </td>
187
                                <td>
188
                                    <input type="text" name="code[0][image]" value="0">
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}
200
    </table>
201 lars 201
    <input type="hidden" name="mode" value="{if $supplierWarehouse.id}update{else}save{/if}">
194 lars 202
</form>
143 lars 203
<!-- $Id: supplier_warehouse.tpl 201 2023-08-04 23:28:01Z lars $ END -->