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

Revision

Revision 312 | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
143 lars 1
<!-- $Id: supplier_warehouse.tpl 315 2023-08-12 14:59:22Z 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
            }
315 lars 30
            //$('#')
194 lars 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>
312 lars 52
<div id="warehouseError" style="color: red!important;"></div>
194 lars 53
<form method="post" id="lager_form">
205 lars 54
    {if $supplierWarehouse.id}
55
        <input type="hidden" name="_method" value="PATCH">
56
    {/if}
57
    <input type="hidden" name="_token" value="{csrf_token()}">
58
    <input type="hidden" value="{$supplierWarehouse.id}" id="f_l_id">
59
    <input type="hidden" value="{$supplier.id}" id="f_s_id">
194 lars 60
    <table width="100%">
61
        <tr>
62
            <td class="links">
63
                <label for="f_l_name">Name</label>
64
            </td>
65
            <td class="rechts">
211 lars 66
                <input type="text" name="name" value="{$supplierWarehouse.name}" id="f_l_name">
312 lars 67
                <div id="warehouseNameError" style="color: red!important;"></div>
194 lars 68
            </td>
69
        </tr>
70
        <tr>
71
            <td class="links">
72
                <label for="f_l_rang">Rang</label>
73
            </td>
74
            <td class="rechts">
201 lars 75
                <input type="text" name="rank" id="f_l_rang" value="{$supplierWarehouse.rank}">
312 lars 76
                <div id="warehouseRankError" style="color: red!important;"></div>
194 lars 77
            </td>
78
        </tr>
79
        <tr>
80
            <td class="links">
81
                <label for="f_l_bestellbar">Artikel bestellbar?</label>
82
            </td>
193 lars 83
            <td>
194 lars 84
                <input type="hidden" name="orderable" value="0">
85
                <input type="checkbox" name="orderable" value="1" id="f_l_bestellbar"
201 lars 86
                       {if $supplierWarehouse.orderable==1}checked="checked"{/if}>
194 lars 87
                <table>
88
                    {if $logistiker}
89
                        <tr id="logistiker_row">
90
                            <td>
91
                                <label for="f_l_logistiker">Logistiker ändern:</label>
92
                            </td>
93
                            <td>
94
                                <select name="logistiker_id" class="logistiker_select" id="f_l_logistiker">
95
                                    <option value="0">--- Bitte wählen ---</option>
201 lars 96
                                    {html_options options=$logistiker selected=$supplierWarehouse.logistiker_id}
194 lars 97
                                </select>
98
                            </td>
99
                        </tr>
193 lars 100
                    {/if}
194 lars 101
                    {if $artikelstatus}
102
                        <tr id="artikelstatus_row">
103
                            <td>
104
                                <label for="f_l_artikelstatus">Artikelstatus ändern</label>
105
                            </td>
106
                            <td>
107
                                <select name="item_status" class="artikelstatus_select" id="f_l_artikelstatus">
108
                                    <option value="-1">--- Nicht ändern ---</option>
109
                                    {html_options options=$item_status selected=$item_status_id}
110
                                </select>
111
                            </td>
112
                        </tr>
113
                    {/if}
114
                    {if $rechnungStatus}
115
                        <tr id="rechnungstatus_row">
116
                            <td>
117
                                <label for="f_l_rechnungstatus">Rechnungstatus ändern</label>
118
                            </td>
119
                            <td>
120
                                <select name="invoice_status" class="artikelstatus_select" id="f_l_rechnungstatus">
121
                                    <option value="-1">--- Nicht ändern ---</option>
122
                                    {html_options options=$invoice_status selected=$invoice_status_id}
123
                                </select>
124
                            </td>
125
                        </tr>
126
                    {/if}
127
                    {if $one4b}
128
                        <tr id="one4b_row">
129
                            <td><label for="f_l_one4b">One4B?</label></td>
130
                            <td>
131
                                <input type="hidden" name="one4b" value="0">
132
                                <input type="checkbox" name="one4b" value="1" id="f_l_one4b"
201 lars 133
                                       {if $supplierWarehouse.one4b==1}checked="checked"{/if}>
194 lars 134
                            </td>
135
                        </tr>
136
                    {/if}
137
                </table>
143 lars 138
            </td>
139
        </tr>
194 lars 140
        <tr>
141
            <td class="links">Lieferstatus positiv</td>
142
            <td class="rechts">
208 lars 143
                {html_options name="pos_delivery_status" options=$lstatus selected=$supplierWarehouse.lstatus_pos}
194 lars 144
            </td>
143 lars 145
        </tr>
194 lars 146
        {if isset($user_rechte.bestellwesen.lieferanten.verf_codes)}
147
            <tr>
148
                <td class="links">Verf&uuml;gbarkeits-Codes:</td>
149
                <td class="rechts">
150
                    <table width="100%" id="code_table">
151
                        <tr class="links">
152
                            <td>Code</td>
153
                            <td>entspricht-Text</td>
154
                            <td>Bildnummer</td>
155
                            <td>Lieferstatus positiv</td>
156
                            <td>
157
                                <button id="add_statuscode">&nbsp;</button>
158
                            </td>
159
                        </tr>
201 lars 160
                        {section loop=$supplierWarehouse.verf_codes name=c_ind}
161
                            <tr class="rechts code" id="code_row_{$supplierWarehouse.verf_codes[c_ind].id}">
194 lars 162
                                <td>
201 lars 163
                                    <input type="text" name="code[{$supplierWarehouse.verf_codes[c_ind].id}][key]"
164
                                           value="{$supplierWarehouse.verf_codes[c_ind].key}">
194 lars 165
                                </td>
166
                                <td>
201 lars 167
                                    <input type="text" name="code[{$supplierWarehouse.verf_codes[c_ind].id}][value]"
168
                                           value="{$supplierWarehouse.verf_codes[c_ind].value}">
194 lars 169
                                </td>
170
                                <td>
201 lars 171
                                    <input type="text" name="code[{$supplierWarehouse.verf_codes[c_ind].id}][image]"
172
                                           value="{$supplierWarehouse.verf_codes[c_ind].image}">
173
                                    <input type="hidden" name="code[{$supplierWarehouse.verf_codes[c_ind].id}][id]"
174
                                           value="{$supplierWarehouse.verf_codes[c_ind].id}">
194 lars 175
                                </td>
176
                                <td>
201 lars 177
                                    <select name="code[{$supplierWarehouse.verf_codes[c_ind].id}][lieferstatus]">
178
                                        {html_options options=$lstatus selected={$supplierWarehouse.verf_codes[c_ind].lieferstatus}}
194 lars 179
                                    </select>
180
                                </td>
181
                                <td>
201 lars 182
                                    <button id="delete_code_{$supplierWarehouse.verf_codes[c_ind].id}" class="del_code">&nbsp;
194 lars 183
                                    </button>
184
                                </td>
185
                            </tr>
186
                            {sectionelse}
187
                            <tr class="rechts code">
188
                                <td>
189
                                    <input type="text" name="code[0][key]" value="0">
190
                                </td>
191
                                <td>
192
                                    <input type="text" name="code[0][value]">
193
                                </td>
194
                                <td>
195
                                    <input type="text" name="code[0][image]" value="0">
196
                                    <input type="hidden" name="code[0][id]" value="0">
197
                                </td>
198
                                <td>
199
                                    {html_options name="code[0][lieferstatus]" options=$lstatus}
200
                                </td>
201
                            </tr>
202
                        {/section}
203
                    </table>
204
                </td>
205
            </tr>
206
        {/if}
207
    </table>
201 lars 208
    <input type="hidden" name="mode" value="{if $supplierWarehouse.id}update{else}save{/if}">
194 lars 209
</form>
143 lars 210
<!-- $Id: supplier_warehouse.tpl 315 2023-08-12 14:59:22Z lars $ END -->