0e8ac81d8f53ba3b914d282433ee7cdb035bfee6
[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" nowrap>[% 'Parts Classification' | $T8 %]:</th>
62               <td>[% P.select_classification('classification_id', default=classification_id) %]</td>
63              </tr>
64              <tr>
65               <th align="right">[% 'Part Description' | $T8 %]</th>
66               <td>
67                [%- IF description_area %]
68                <textarea name="description" rows="[% HTML.escape(rows) %]" cols="40" wrap="soft">[% HTML.escape(description) %]</textarea>
69                [%- ELSE %]
70                <input name="description" size="40" value="[% HTML.escape(description) %]">
71                [%- END %]
72               </td>
73              </tr>
74              <tr>
75                <th align="right">[% 'EAN-Code' | $T8 %]</th>
76                <td><input name="ean" size="40" value="[% HTML.escape(ean) %]"></td>
77              </tr>
78              <tr>
79               [%- IF all_partsgroup.size %]
80               <th align="right">[% 'Group' | $T8 %]</th>
81               <td>
82                [%- INCLUDE generic/multibox.html
83                      name       = 'partsgroup',
84                      DATA       = all_partsgroup,
85                      show_empty = 1,
86                      id_sub     = 'pg_keys',
87                      label_key  = 'partsgroup',
88                      style      = 'width:250px'
89                -%]
90               </td>
91               <input type="hidden" name="oldpartsgroup" value="[% HTML.escape(oldpartsgroup) %]">
92               [% END %]
93              </tr>
94
95
96              [%- IF BUCHUNGSGRUPPEN.size %]
97              <tr>
98               <th align="right">[% 'Booking group' | $T8 %]</th>
99               <td>
100                [%- INCLUDE generic/multibox.html
101                      name       = 'buchungsgruppen_id',
102                      DATA       = BUCHUNGSGRUPPEN,
103                      id_key     = 'id',
104                      label_key  = 'description',
105                      style      = 'width:250px'
106                -%]
107              </tr>
108              [%- END %]
109              <input type="hidden" name="IC_income" value="[% HTML.escape(IC_income_default) %]">
110              [%- UNLESS is_assembly %]
111              <input type="hidden" name="IC_expense" value="[% HTML.escape(IC_expense_default) %]">
112              [%- END %]
113              [%- IF is_part %]
114              <input type="hidden" name="IC" value="[% HTML.escape(IC_default) %]">
115              [%- END %]
116              <tr>
117               <th align="right">[% 'Payment Terms' | $T8 %]</th>
118               <td>
119                [%- INCLUDE generic/multibox.html
120                      name       = 'payment_id',
121                      DATA       = payment_terms,
122                      show_empty = 1,
123                      id_key     = 'id',
124                      label_key  = 'description',
125                      style      = 'width:250px'
126                -%]
127               </td>
128              </tr>
129             </table>
130            </td>
131           </tr>
132
133           <tr height="5"></tr>
134
135           <tr>
136            <td>
137             <table>
138              <tr>
139               <th align="left">[% 'Part Notes' | $T8 %]</th>
140               <th align="left">[% 'Formula' | $T8 %]</th>
141              </tr>
142              <tr valign="top">
143               <td>
144                [% L.textarea_tag("notes", P.restricted_html(notes), class="texteditor", style="width: 600px; height: 200px") %]
145               </td>
146               <td>
147                  <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>
148                </td>
149              </tr>
150             </table>
151            </td>
152           </tr>
153          </table>
154         </td>
155
156         <td>
157          <table>
158           <tr>
159            <th align="right" nowrap="true">[% 'Updated' | $T8 %]</th>
160            <td>
161             <input name="priceupdate" id="priceupdate" size="11"  title="[% HTML.escape(dateformat) %]" value="[% HTML.escape(priceupdate) %]" readonly>
162            </td>
163           </tr>
164
165           <tr>
166            <th align="right" nowrap="true">[% 'List Price' | $T8 %]</th>
167            <td><input name="listprice" size="11" value="[% LxERP.format_amount(listprice, 2) %]"></td>
168           </tr>
169
170           <tr>
171            <th align="right" nowrap="true">[% 'Sell Price' | $T8 %]</th>
172            <td><input name="sellprice" size="11" value="[% LxERP.format_amount(sellprice, 2) %]"></td>
173           </tr>
174
175           [%- UNLESS is_assembly %]
176           <tr>
177            <th align="right" nowrap="true">[% 'Last Cost' | $T8 %]</th>
178            <td><input name="lastcost" size="11" value="[% LxERP.format_amount(lastcost, 2) %]"></td>
179           </tr>
180           [%- END %]
181
182           [%- IF ALL_PRICE_FACTORS.size %]
183           <tr>
184            <th align="right">[% 'Price Factor' | $T8 %]</th>
185            <td>
186             [%- INCLUDE generic/multibox.html
187                   name       = 'price_factor_id',
188                   DATA       = ALL_PRICE_FACTORS,
189                   show_empty = 1,
190                   id_key     = 'id',
191                   label_key  = 'description',
192                   style      = 'width:100px'
193             -%]
194            </td>
195           </tr>
196           [%- END %]
197
198           <tr>
199            <th align="right" nowrap="true">[% 'Unit' | $T8 %]</th>
200            <td>
201             <input type="hidden" name="unit_changeable" value="[% HTML.escape(unit_changeable) %]">
202             [%- UNLESS unit_changeable %]
203             <input type="hidden" name="unit" value="[% HTML.escape(unit) %]">[% HTML.escape(unit) %]
204             [%- ELSE %]
205             [%- INCLUDE generic/multibox.html
206                   name       = 'unit',
207                   DATA       = ALL_UNITS,
208                   id_key     = 'name',
209                   label_key  = 'name',
210                   style      = 'width:100px'
211             -%]
212             [%- END %]
213            </td>
214           </tr>
215
216         [%- UNLESS is_service %]
217           <tr>
218            <th align="right" nowrap="true">[% 'Weight' | $T8 %]</th>
219            <td>
220             [%- IF is_assembly %]&nbsp;[% LxERP.format_amount(weight) %][%- END %]
221             <input[% IF is_assembly %] type="hidden"[% END %] size="10" name="weight" value="[% LxERP.format_amount(weight) %]">
222             [% HTML.escape(defaults.weightunit) %]
223            </td>
224           </tr>
225         [%- END %]
226           <tr>
227            <th align="right" nowrap>[% 'On Hand' | $T8 %]</th>
228            <th align="left" nowrap class="plus[% IF onhand > 0 %]1[% ELSE %]0[% END %]">&nbsp;[% LxERP.format_amount(onhand) %]</th>
229           </tr>
230           <tr>
231            <th align="right" nowrap="true">[% 'ROP' | $T8 %]</th>
232            <td><input name="rop" size="10" value="[% LxERP.format_amount(rop) %]"></td>
233           </tr>
234           <tr>
235            <th align="right" nowrap="true">[% 'Default Warehouse' | $T8 %]</th>
236            <td>
237             <select name="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)">
238              [%- FOREACH warehouse = WAREHOUSES %]
239                <option value="[% HTML.escape(warehouse.id) %]"[% IF warehouse_id == warehouse.id %] selected[% END %]>[% warehouse.description %]</option>
240              [%- END %]
241             </select>
242           </td>
243           </tr>
244           <tr>
245            <th align="right" nowrap="true">[% 'Default Bin' | $T8 %]</th>
246            <td><select id="bin_id" name="bin_id"></select></td>
247           </tr>
248           <tr>
249            <th align="right" nowrap="true">[% 'Verrechnungseinheit' | $T8 %]</th>
250            <td><input name="ve" size="10" value="[% HTML.escape(ve) %]"></td>
251           </tr>
252           <tr>
253            <th align="right" nowrap="true">[% 'Business Volume' | $T8 %]</th>
254            <td><input name="gv" size="10" value="[% LxERP.format_amount(gv) %]"></td>
255           </tr>
256           <tr>
257            <th align="right" nowrap><label for="not_discountable">[% 'Not Discountable' | $T8 %]</label></th>
258            <td><input class="checkbox" type="checkbox" name="not_discountable" id="not_discountable" value="1" [% IF not_discountable %]checked[% END %]></td>
259           </tr>
260         [%- IF id %]
261           <tr>
262            <th align="right" nowrap="true"><label for="obsolete">[% 'Obsolete' | $T8 %]</label></th>
263            <td><input name="obsolete" id="obsolete" type="checkbox" class="checkbox" value="1" [% IF obsolete %]checked[% END %]></td>
264           </tr>
265         [%- END %]
266         [%- UNLESS is_service %]
267           <tr>
268            <th align="right" nowrap><label for="has_sernumber">[% 'Has serial number' | $T8 %]</label></th>
269            <td><input class="checkbox" type="checkbox" name="has_sernumber" id="has_sernumber" value="1" [% IF has_sernumber %]checked[% END %]></td>
270           </tr>
271         [%- END %]
272           <tr>
273            <th align="right" nowrap><label for="shop">[% 'Shop article' | $T8 %]</label></th>
274            <td><input class="checkbox" type="checkbox" name="shop" id="shop" value="1" [% IF shop %]checked[% END %]></td>
275           </tr>
276          </table>
277         </td>
278        </tr>
279       </table>
280      </td>
281     </tr>
282
283
284     <tr>
285      <td>
286       <table>
287        <tr>
288         <th align="right" nowrap>[% 'Image' | $T8 %]</th>
289         <td><input name="image" size="40" value="[% HTML.escape(image) %]"></td>
290         <th align="right" nowrap>[% 'Microfiche' | $T8 %]</th>
291         <td><input name="microfiche" size="20" value="[% HTML.escape(microfiche) %]"></td>
292        </tr>
293        <tr>
294         <th align="right" nowrap>[% 'Drawing' | $T8 %]</th>
295         <td><input name="drawing" size="40" value="[% HTML.escape(drawing) %]"></td>
296        </tr>
297       </table>
298      </td>
299     </tr>