$form->{item} nach $form->{part_type} umbenannt
[kivitendo-erp.git] / templates / webpages / ic / form_header.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %][%- USE L -%][%- USE P -%]
4 [% PROCESS 'common/select_warehouse_bin.html' %]
5  <h1>[% title %]  [% HTML.escape(partnumber) %]  [% HTML.escape(description) %]</h1>
6
7 [% INCLUDE 'common/flash.html' %]
8
9  <form method="post" name="ic" action="[% script %]">
10
11   <input name="id" type="hidden" value="[% HTML.escape(id) %]">
12   <input name="part_type" type="hidden" value="[% HTML.escape(part_type) %]">
13   <input name="title" type="hidden" value="[% HTML.escape(title) %]">
14   <input name="makemodel" type="hidden" value="[% HTML.escape(makemodel) %]">
15   <input name="onhand" type="hidden" value="[% HTML.escape(onhand) %]">
16   <input name="orphaned" type="hidden" value="[% HTML.escape(orphaned) %]">
17   <input name="taxaccounts" type="hidden" value="[% HTML.escape(taxaccounts) %]">
18   <input name="rowcount" type="hidden" value="[% HTML.escape(rowcount) %]">
19   <input name="eur" type="hidden" value="[% HTML.escape(eur) %]">
20   <input name="original_partnumber" type="hidden" value="[% HTML.escape(original_partnumber) %]">
21   <input name="currow" type="hidden" value="[% HTML.escape(currow) %]">
22
23   <div id="ic_tabs" class="tabwidget">
24    <ul>
25     <li><a href="#master_data">[% 'Basic Data' | $T8 %]</a></li>
26 [% IF LANGUAGES.size %]
27     <li><a href="#translations_tab">[% 'Translations' | $T8 %]</a></li>
28 [% END %]
29     [%- IF id %]
30     <li><a href="#sales_price_information">[% 'Price information' | $T8 %]</a></li>
31     [%- END %]
32     [%- IF CUSTOM_VARIABLES.size %]
33     <li><a href="#custom_variables">[% 'Custom Variables' | $T8 %]</a></li>
34     [%- END %]
35     [%- IF id  %]
36     <li><a href="#price_rules">[% 'Price Rules' | $T8 %]</a></li>
37     [% END %]
38    </ul>
39
40   <div id="master_data">
41
42    <table width="100%">
43     <tr>
44      <td>
45       <table width="100%">
46        <tr valign="top">
47         <td>
48 [%- IF image && INSTANCE_CONF.get_parts_show_image %]
49          <a href="[% image | html %]" target="_blank"><img style="[% INSTANCE_CONF.get_parts_image_css %]" src="[% image | html %]"/></a>
50 [%- END %]
51
52          <table>
53           <tr>
54            <td colspan="2">
55             <table>
56              <tr>
57               <th align="right">[% 'Part Number' | $T8 %]</th>
58               <td><input id='partnumber' name="partnumber" value="[% HTML.escape(partnumber) %]" size="40" class="initial_focus"></td>
59              </tr>
60              <tr>
61               <th align="right">[% 'Part Description' | $T8 %]</th>
62               <td>
63                [%- IF description_area %]
64                <textarea name="description" rows="[% HTML.escape(rows) %]" cols="40" wrap="soft">[% HTML.escape(description) %]</textarea>
65                [%- ELSE %]
66                <input name="description" size="40" value="[% HTML.escape(description) %]">
67                [%- END %]
68               </td>
69              </tr>
70              <tr>
71                <th align="right">[% 'EAN-Code' | $T8 %]</th>
72                <td><input name="ean" size="40" value="[% HTML.escape(ean) %]"></td>
73              </tr>
74              <tr>
75               [%- IF all_partsgroup.size %]
76               <th align="right">[% 'Group' | $T8 %]</th>
77               <td>
78                [%- INCLUDE generic/multibox.html
79                      name       = 'partsgroup',
80                      DATA       = all_partsgroup,
81                      show_empty = 1,
82                      id_sub     = 'pg_keys',
83                      label_key  = 'partsgroup',
84                      style      = 'width:250px'
85                -%]
86               </td>
87               <input type="hidden" name="oldpartsgroup" value="[% HTML.escape(oldpartsgroup) %]">
88               [% END %]
89              </tr>
90
91
92              [%- IF BUCHUNGSGRUPPEN.size %]
93              <tr>
94               <th align="right">[% 'Booking group' | $T8 %]</th>
95               <td>
96                [%- INCLUDE generic/multibox.html
97                      name       = 'buchungsgruppen_id',
98                      DATA       = BUCHUNGSGRUPPEN,
99                      id_key     = 'id',
100                      label_key  = 'description',
101                      style      = 'width:250px'
102                -%]
103              </tr>
104              [%- END %]
105              <input type="hidden" name="IC_income" value="[% HTML.escape(IC_income_default) %]">
106              [%- UNLESS is_assembly %]
107              <input type="hidden" name="IC_expense" value="[% HTML.escape(IC_expense_default) %]">
108              [%- END %]
109              [%- IF is_part %]
110              <input type="hidden" name="IC" value="[% HTML.escape(IC_default) %]">
111              [%- END %]
112              <tr>
113               <th align="right">[% 'Payment Terms' | $T8 %]</th>
114               <td>
115                [%- INCLUDE generic/multibox.html
116                      name       = 'payment_id',
117                      DATA       = payment_terms,
118                      show_empty = 1,
119                      id_key     = 'id',
120                      label_key  = 'description',
121                      style      = 'width:250px'
122                -%]
123               </td>
124              </tr>
125             </table>
126            </td>
127           </tr>
128
129           <tr height="5"></tr>
130
131           <tr>
132            <td>
133             <table>
134              <tr>
135               <th align="left">[% 'Part Notes' | $T8 %]</th>
136               <th align="left">[% 'Formula' | $T8 %]</th>
137              </tr>
138              <tr valign="top">
139               <td>
140                [% L.textarea_tag("notes", P.restricted_html(notes), class="texteditor", style="width: 600px; height: 200px") %]
141               </td>
142               <td>
143                  <textarea name="formel" rows="[% HTML.escape(notes_rows) %]" cols="30" wrap="soft" class="tooltipster-html" title="[% 'The formula needs the following syntax:<br>For regular article:<br>Variablename= Variable Unit;<br>Variablename2= Variable2 Unit2;<br>...<br>###<br>Variable + ( Variable2 / Variable )<br><b>Please be beware of the spaces in the formula</b><br>' | $T8 %]">[% HTML.escape(formel) %]</textarea>
144                </td>
145              </tr>
146             </table>
147            </td>
148           </tr>
149          </table>
150         </td>
151
152         <td>
153          <table>
154           <tr>
155            <th align="right" nowrap="true">[% 'Updated' | $T8 %]</th>
156            <td>
157             <input name="priceupdate" id="priceupdate" size="11"  title="[% HTML.escape(dateformat) %]" value="[% HTML.escape(priceupdate) %]" readonly>
158            </td>
159           </tr>
160
161           <tr>
162            <th align="right" nowrap="true">[% 'List Price' | $T8 %]</th>
163            <td><input name="listprice" size="11" value="[% LxERP.format_amount(listprice, 2) %]"></td>
164           </tr>
165
166           <tr>
167            <th align="right" nowrap="true">[% 'Sell Price' | $T8 %]</th>
168            <td><input name="sellprice" size="11" value="[% LxERP.format_amount(sellprice, 2) %]"></td>
169           </tr>
170
171           [%- UNLESS is_assembly %]
172           <tr>
173            <th align="right" nowrap="true">[% 'Last Cost' | $T8 %]</th>
174            <td><input name="lastcost" size="11" value="[% LxERP.format_amount(lastcost, 2) %]"></td>
175           </tr>
176           [%- END %]
177
178           [%- IF ALL_PRICE_FACTORS.size %]
179           <tr>
180            <th align="right">[% 'Price Factor' | $T8 %]</th>
181            <td>
182             [%- INCLUDE generic/multibox.html
183                   name       = 'price_factor_id',
184                   DATA       = ALL_PRICE_FACTORS,
185                   show_empty = 1,
186                   id_key     = 'id',
187                   label_key  = 'description',
188                   style      = 'width:100px'
189             -%]
190            </td>
191           </tr>
192           [%- END %]
193
194           <tr>
195            <th align="right" nowrap="true">[% 'Unit' | $T8 %]</th>
196            <td>
197             <input type="hidden" name="unit_changeable" value="[% HTML.escape(unit_changeable) %]">
198             [%- UNLESS unit_changeable %]
199             <input type="hidden" name="unit" value="[% HTML.escape(unit) %]">[% HTML.escape(unit) %]
200             [%- ELSE %]
201             [%- INCLUDE generic/multibox.html
202                   name       = 'unit',
203                   DATA       = ALL_UNITS,
204                   id_key     = 'name',
205                   label_key  = 'name',
206                   style      = 'width:100px'
207             -%]
208             [%- END %]
209            </td>
210           </tr>
211
212         [%- UNLESS is_service %]
213           <tr>
214            <th align="right" nowrap="true">[% 'Weight' | $T8 %]</th>
215            <td>
216             [%- IF is_assembly %]&nbsp;[% LxERP.format_amount(weight) %][%- END %]
217             <input[% IF is_assembly %] type="hidden"[% END %] size="10" name="weight" value="[% LxERP.format_amount(weight) %]">
218             [% HTML.escape(defaults.weightunit) %]
219            </td>
220           </tr>
221         [%- END %]
222           <tr>
223            <th align="right" nowrap>[% 'On Hand' | $T8 %]</th>
224            <th align="left" nowrap class="plus[% IF onhand > 0 %]1[% ELSE %]0[% END %]">&nbsp;[% LxERP.format_amount(onhand) %]</th>
225           </tr>
226           <tr>
227            <th align="right" nowrap="true">[% 'ROP' | $T8 %]</th>
228            <td><input name="rop" size="10" value="[% LxERP.format_amount(rop) %]"></td>
229           </tr>
230           <tr>
231            <th align="right" nowrap="true">[% 'Default Warehouse' | $T8 %]</th>
232            <td>
233             <select name="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)">
234              [%- FOREACH warehouse = WAREHOUSES %]
235                <option value="[% HTML.escape(warehouse.id) %]"[% IF warehouse_id == warehouse.id %] selected[% END %]>[% warehouse.description %]</option>
236              [%- END %]
237             </select>
238           </td>
239           </tr>
240           <tr>
241            <th align="right" nowrap="true">[% 'Default Bin' | $T8 %]</th>
242            <td><select id="bin_id" name="bin_id"></select></td>
243           </tr>
244           <tr>
245            <th align="right" nowrap="true">[% 'Verrechnungseinheit' | $T8 %]</th>
246            <td><input name="ve" size="10" value="[% HTML.escape(ve) %]"></td>
247           </tr>
248           <tr>
249            <th align="right" nowrap="true">[% 'Business Volume' | $T8 %]</th>
250            <td><input name="gv" size="10" value="[% LxERP.format_amount(gv) %]"></td>
251           </tr>
252           <tr>
253            <th align="right" nowrap><label for="not_discountable">[% 'Not Discountable' | $T8 %]</label></th>
254            <td><input class="checkbox" type="checkbox" name="not_discountable" id="not_discountable" value="1" [% IF not_discountable %]checked[% END %]></td>
255           </tr>
256         [%- IF id %]
257           <tr>
258            <th align="right" nowrap="true"><label for="obsolete">[% 'Obsolete' | $T8 %]</label></th>
259            <td><input name="obsolete" id="obsolete" type="checkbox" class="checkbox" value="1" [% IF obsolete %]checked[% END %]></td>
260           </tr>
261         [%- END %]
262         [%- UNLESS is_service %]
263           <tr>
264            <th align="right" nowrap><label for="has_sernumber">[% 'Has serial number' | $T8 %]</label></th>
265            <td><input class="checkbox" type="checkbox" name="has_sernumber" id="has_sernumber" value="1" [% IF has_sernumber %]checked[% END %]></td>
266           </tr>
267         [%- END %]
268           <tr>
269            <th align="right" nowrap><label for="shop">[% 'Shop article' | $T8 %]</label></th>
270            <td><input class="checkbox" type="checkbox" name="shop" id="shop" value="1" [% IF shop %]checked[% END %]></td>
271           </tr>
272          </table>
273         </td>
274        </tr>
275       </table>
276      </td>
277     </tr>
278
279
280     <tr>
281      <td>
282       <table>
283        <tr>
284         <th align="right" nowrap>[% 'Image' | $T8 %]</th>
285         <td><input name="image" size="40" value="[% HTML.escape(image) %]"></td>
286         <th align="right" nowrap>[% 'Microfiche' | $T8 %]</th>
287         <td><input name="microfiche" size="20" value="[% HTML.escape(microfiche) %]"></td>
288        </tr>
289        <tr>
290         <th align="right" nowrap>[% 'Drawing' | $T8 %]</th>
291         <td><input name="drawing" size="40" value="[% HTML.escape(drawing) %]"></td>
292        </tr>
293       </table>
294      </td>
295     </tr>