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