]> wagnertech.de Git - mfinanz.git/blob - templates/design40_webpages/part/_basic_data.html
kivitendo 3.9.2-0.2
[mfinanz.git] / templates / design40_webpages / part / _basic_data.html
1 [% USE T8 %]
2 [% USE HTML %]
3 [% USE LxERP %]
4 [% USE L %]
5 [% USE P %]
6
7 [% IF SELF.part.image || SELF.part.description %]
8   [% IF SELF.part.image && INSTANCE_CONF.get_parts_show_image %]
9     <div class="image col">
10       <a href="[% SELF.part.image | html %]" target="_blank">
11         <img style="[% INSTANCE_CONF.get_parts_image_css %]" src="[% SELF.part.image | html %]"/>
12       </a>
13     </div>
14   [% END %]
15   [% IF SELF.part.description %]
16     <h2 class="record-title col">
17       [% SELF.part.description %] [% IF SELF.part.partnumber %]<small>([%  SELF.part.partnumber %])</small>[% END %]
18     </h2>
19   [% END %]
20 [% END %]
21
22 <div class="wrapper" id="wrapper-1">
23 [% INCLUDE 'generic/toggle_wrapper.html' %]
24
25 <div class="col">
26   <table id="ic3" class="tbl-horizontal">
27     <caption>[% 'Basic Article Data' | $T8 %]</caption>
28     <colgroup> <col class="wi-mediumsmall"><col class="wi-wide"> </colgroup>
29     <tbody>
30       <tr>
31         <th>[% 'Part Number' | $T8 %]</th>
32         <td>[% L.input_tag("part.partnumber", SELF.part.partnumber, size=10, class='initial_focus
33           wi-mediumsmall', "data-validate"="trimmed_whitespaces") %]</td>
34       </tr>
35       <tr>
36         <th>[% 'Part Classification' | $T8 %]</th>
37         <td>[% P.part.select_classification('part.classification_id', default => SELF.part.classification_id, type => SELF.parts_classification_filter, class='wi-wide' ) %]</td>
38       </tr>
39       <tr>
40         <th>[% 'Part Description' | $T8 %]</th>
41         <td class="wi-wide">[% L.areainput_tag("part.description", SELF.part.description, class='wi-wide', cols=10, rows=10) %]</td>
42       </tr>
43       <tr>
44         <th>[% 'EAN-Code' | $T8 %]</th>
45         <td>[% L.input_tag("part.ean", SELF.part.ean, class='wi-wide', size=10, "data-validate"="trimmed_whitespaces") %]</td>
46       </tr>
47       <tr>
48         <th>[% 'Tariff Code' | $T8 %]</th>
49         <td>[% L.input_tag("part.tariff_code", SELF.part.tariff_code, class='wi-wide', size=10, "data-validate"="trimmed_whitespaces") %]</td>
50       </tr>
51       [% IF SELF.all_partsgroups.size %]
52       <tr>
53         <th>[% 'Partsgroup' | $T8 %]</th>
54         <td>
55           [% L.select_tag('part.partsgroup_id', SELF.all_partsgroups, default=SELF.part.partsgroup_id, title_key='partsgroup', value_key='id', with_empty=1, class='wi-wide') %]
56         </td>
57       </tr>
58       [% END %]
59       [% IF SELF.all_buchungsgruppen.size %]
60       <tr>
61         <th>[% 'Booking group' | $T8 %]</th>
62         <td>[% L.select_tag('part.buchungsgruppen_id', SELF.all_buchungsgruppen, default=SELF.part.buchungsgruppen_id, title_key='description', value_key='id', with_empty=0, class='wi-wide') %]</td>
63       </tr>
64       [% END %]
65       [% IF SELF.all_payment_terms.size %]
66       <tr>
67         <th>[% 'Payment Terms' | $T8 %]</th>
68         <td>[% L.select_tag('part.payment_id', SELF.all_payment_terms, default=SELF.part.payment_id, title_key='description', value_key='id', with_empty=1, class='wi-wide') %]</td>
69       </tr>
70       [% END %]
71       <tr>
72         <th> <label for="order_locked">[% 'Do not order anymore' | $T8 %]</label> </th>
73         <td>[% L.checkbox_tag('part.order_locked', checked = SELF.part.order_locked, for_submit=1) %]</td>
74       </tr>
75       [% IF SELF.part.id %]
76       <tr>
77         <th> <label for="part_obsolete">[% 'Obsolete' | $T8 %]</label> </th>
78         <td>[% L.checkbox_tag('part.obsolete', checked = SELF.part.obsolete, for_submit=1) %]</td>
79       </tr>
80       [% END %]
81       <tr>
82         <th> <label for="part_shop">[% 'Shop article' | $T8 %]</label> </th>
83         <td>[% L.checkbox_tag('part.shop', checked = SELF.part.shop, for_submit=1, id='part_shop') %]</td>
84       </tr>
85     </tbody>
86   </table>
87
88   <table class="tbl-horizontal">
89     <caption>[% 'Part Notes' | $T8 %]</caption>
90     <colgroup> <col class="wi-mediumsmall-wide"> </colgroup>
91     <tbody>
92       <tr>
93         <td class="wi-mediumsmall-wide">[% L.textarea_tag("part.notes", P.restricted_html(SELF.part.notes), class='texteditor wi-mediumsmall-wide', cols=10, rows=10) %]</td>
94       </tr>
95     </tbody>
96   </table>
97 </div><!-- /.col -->
98
99 <div class="col">
100   <table id="ic5" class="tbl-horizontal">
101     <caption>[% 'Prices' | $T8 %]</caption>
102     <colgroup> <col class="wi-mediumsmall"><col class="wi-mediumsmall"> </colgroup>
103     <tbody>
104       <tr>
105         <th>[% 'Price updated' | $T8 %]</th>
106         <td>[% SELF.part.last_price_update.valid_from.to_kivitendo | html %]</td>
107       </tr>
108       <tr>
109         <th>[% 'List Price' | $T8 %]</th>
110         <td>
111           [% IF (AUTH.assert('part_service_assembly_edit_prices', 'may_fail')) %]
112             [% L.input_tag("part.listprice_as_number", SELF.part.listprice_as_number, class='reformat_number numeric wi-mediumsmall', size=10) %]
113           [% ELSE %]
114             <span class="data wi-mediumsmall numeric">[% SELF.part.listprice_as_number %]</span>
115           [% END %]
116         </td>
117       </tr>
118       <tr>
119         <th>[% 'Sell Price' | $T8 %]</th>
120         <td>
121           [% IF (AUTH.assert('part_service_assembly_edit_prices', 'may_fail')) %]
122             [% L.input_tag("part.sellprice_as_number", SELF.part.sellprice_as_number, class='reformat_number numeric wi-mediumsmall', size=10) %]
123           [% ELSE %]
124             <span class="data wi-mediumsmall numeric">[% SELF.part.sellprice_as_number %]</span>
125           [% END %]
126           [% IF (SELF.part.is_assortment or SELF.part.is_assembly) %]
127             <span class="data below wi-mediumsmall numeric">(<span id="items_sellprice_sum_basic">[% LxERP.format_amount(SELF.part.items_sellprice_sum, 2) %])</span></span>
128           [% END %]
129         </td>
130       </tr>
131       <tr>
132         <th>[% 'Last Cost' | $T8 %]</th>
133         <td>
134           [%- UNLESS SELF.part.is_assembly %]
135             [% IF (AUTH.assert('part_service_assembly_edit_prices', 'may_fail')) %]
136               [% L.input_tag("part.lastcost_as_number", SELF.part.lastcost_as_number, class='reformat_number numeric wi-mediumsmall', size=10) %]
137             [% ELSE %]
138               <span class="data wi-mediumsmall numeric">[% SELF.part.lastcost_as_number %]</span>
139             [% END %]
140           [% END %]
141           [% IF SELF.part.is_assortment || SELF.part.is_assembly %]
142             <span class="data below wi-mediumsmall numeric">(<span id="items_lastcost_sum_basic">[% LxERP.format_amount(SELF.part.items_lastcost_sum, 2) %])</span></span>
143           [% END %]
144         </td>
145       </tr>
146       [% IF SELF.all_price_factors.size %]
147       <tr>
148         <th>[% 'Price Factor' | $T8 %]</th>
149         <td>
150           [% L.select_tag('part.price_factor_id', SELF.all_price_factors, default=SELF.part.price_factor_id, title_key='description', value_key='id', with_empty=1, class='wi-mediumsmall') %]
151           </td>
152       </tr>
153       [% END %]
154       <tr>
155         <th><label for="part_not_discountable">[% 'Not Discountable' | $T8 %]</label></th>
156         <td>[% L.checkbox_tag('part.not_discountable', checked = SELF.part.not_discountable, for_submit=1) %]</td>
157       </tr>
158     </tbody>
159   </table>
160   <div id="pricegroups">
161     [% PROCESS 'part/_pricegroup_prices.html' %]
162   </div>
163   <table id="ic5" class="tbl-horizontal">
164     <colgroup> <col class="wi-mediumsmall"><col class="wi-small"> </colgroup>
165     <tbody>
166       <tr>
167         <th>[% 'Business Volume' | $T8 %]</th>
168         <td>[% L.input_tag("part.gv_as_number", SELF.part.gv_as_number, class='reformat_number numeric wi-mediumsmall', size=10) %]</td>
169       </tr>
170       <tr>
171         <th>[% 'Verrechnungseinheit' | $T8 %]</th>
172         <td>[% L.input_tag("part.ve", SELF.part.ve, class='wi-mediumsmall', size=10) %]</td>
173       </tr>
174     </tbody>
175   </table>
176 </div><!-- /.col -->
177
178 <div class="col">
179   <table class="tbl-horizontal">
180     <caption>[% 'Unit' | $T8 %]</caption>
181     <colgroup>
182       <col class="wi-small">
183       <col class="wi-lightwide">
184     </colgroup>
185     <tbody>
186       <tr>
187         <th>[% 'Unit' | $T8 %]</th>
188         <td>
189           [% IF !SELF.part.id or SELF.part.orphaned # same logic as unit_changable %]
190             [% L.select_tag('part.unit', SELF.all_units, default=SELF.part.unit, title_key='name', value_key='name', class='wi-mediumsmall') %]
191           [% ELSE %]
192             [% L.hidden_tag('part.unit', SELF.part.unit) %] [% HTML.escape(SELF.part.unit) %]
193           [% END %]</td>
194       </tr>
195     </tbody>
196   </table>
197   [% UNLESS SELF.part.is_service %]
198   <table class="tbl-horizontal">
199     <caption>[% 'Warehouse' | $T8 %]</caption>
200     <colgroup>
201       <col class="wi-small">
202       <col class="wi-lightwide">
203     </colgroup>
204     <tbody>
205       <tr>
206         <th>[% 'Weight' | $T8 %]</th>
207         <td>
208           [% IF SELF.part.is_assembly %]
209           <span id="items_weight_sum_basic">[% LxERP.format_amount(SELF.part.weight) %]</span>
210           [% ELSE %]
211           [% L.input_tag('part.weight_as_number', SELF.part.weight_as_number, size=10, class='wi-small reformat_number numeric', size=10) %]
212           [% END %]
213           [% HTML.escape(INSTANCE_CONF.get_weightunit) %]
214         </td>
215       </tr>
216       <tr>
217         <th>[% 'On Hand' | $T8 %]</th>
218         <td><span class="data wi-small numeric">[% LxERP.format_amount(SELF.part.onhand) %] [% SELF.part.unit | html %]</span></td>
219       </tr>
220       <tr>
221         <th>[% 'ROP' | $T8 %]</th>
222         <td>[% L.input_tag("part.rop_as_number", SELF.part.rop_as_number, size=10, class='wi-small reformat_number numeric') %]</td>
223       </tr>
224       <tr>
225        <th align="right" nowrap="true">[% 'Order Size' | $T8 %]</th>
226        <td>[% L.input_tag("part.order_qty_as_number", SELF.part.order_qty_as_number, size=10,
227          class="wi-small reformat_number numeric") %]</td>
228       </tr>
229       [% IF SELF.all_warehouses.size %]
230       <tr>
231         <th>[% 'Default Warehouse' | $T8 %]</th>
232         <td>[% L.select_tag('part.warehouse_id', SELF.all_warehouses, default=SELF.part.warehouse.id, title_key='description', with_empty=1, class='wi-lightwide') %]</td>
233       </tr>
234       [% END %]
235       <tr>
236         <th>[% 'Default Bin' | $T8 %]</th>
237         <td class="wi-lightwide">
238           <span id="bin" class="condensed">
239             [% IF SELF.part.warehouse.id %]
240             [% L.select_tag('part.bin_id', SELF.part.warehouse.bins_sorted_naturally, default=SELF.part.bin.id, title_key='description', with_empty=0, class='wi-lightwide') %]
241             [% END %]
242           </span>
243         </td>
244       </tr>
245       <tr>
246         <th><label for="part_has_sernumber">[% 'Has serial number' | $T8 %]</label></th>
247         <td>[% L.checkbox_tag('part.has_sernumber', checked = SELF.part.has_sernumber, for_submit=1) %]</td>
248       </tr>
249     </tbody>
250   </table>
251   [% END #/UNLESS SELF.part.is_service %]
252
253   <table class="tbl-horizontal">
254     <caption>[% 'Formula' | $T8 %]</caption>
255       <colgroup> <col class="wi-small-mediumsmall"> </colgroup>
256     <tbody>
257       <tr>
258         <td> <textarea id="part.formel" name="part.formel" rows="[% IF notes_rows %][% HTML.escape(notes_rows) %][% ELSE %]3[% END %]" cols="10" class="tooltipster-html wi-small-mediumsmall" 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(SELF.part.formel) %]</textarea>
259         </td>
260       </tr>
261     </tbody>
262   </table>
263
264   <table id="ic6" class="tbl-horizontal">
265     <caption>[% 'Illustrations' | $T8 %]</caption>
266     <colgroup><col class="wi-small"><col class="wi-lightwide"></colgroup>
267     <tbody>
268       <tr>
269         <th>[% 'Image' | $T8 %]</th>
270         <td>[% L.input_tag("part.image", SELF.part.image, class='wi-lightwide', size=10,
271           "data-validate"="trimmed_whitespaces") %]</td>
272       </tr>
273       <tr>
274         <th>[% 'Microfiche' | $T8 %]</th>
275         <td>[% L.input_tag("part.microfiche", SELF.part.microfiche, class='wi-lightwide', size=10,
276           "data-validate"="trimmed_whitespaces") %]</td>
277       </tr>
278       <tr>
279         <th>[% 'Drawing' | $T8 %]</th>
280         <td>[% L.input_tag("part.drawing", SELF.part.drawing, class='wi-lightwide', size=10,
281           "data-validate"="trimmed_whitespaces") %]</td>
282       </tr>
283     </tbody>
284   </table>
285 </div><!-- /.col -->
286
287 [% IF CUSTOM_VARIABLES_FIRST_TAB %]
288 <div class="col">
289 <table id="custom_variables_table" class="tbl-list wi-moderate">
290   <caption>[% 'Custom Variables' | $T8 %]</caption>
291   <colgroup>
292     <col class="wi-smallest">
293     <col class="wi-small">
294     <col class="wi-lightwide">
295   </colgroup>
296   <thead>
297     <tr>
298       <th></th>
299       <th>[% 'Description' | $T8 %]</th>
300       <th>[% 'Value' | $T8 %]</th>
301     </tr>
302   </thead>
303   <tbody>
304   [%- FOREACH var = CUSTOM_VARIABLES_FIRST_TAB %]
305     <tr>
306       <td>[% var.VALID_BOX %]</td>
307       <td>
308         [%- IF !var.partsgroup_filtered %]
309           [% HTML.escape(var.description) %]
310         [%- END %]
311       </td>
312       <td>[% var.HTML_CODE %]</td>
313     </tr>
314   [%- END %]
315   </tbody>
316 </table>
317 <div class="wrapper">
318   <p>[% 'Note' | $T8 %]: [% 'Unchecked custom variables will not appear in orders and invoices.' | $T8 %]</p>
319 </div>
320 </div><!-- /.col -->
321 [% END %]
322
323 </div><!-- /.wrapper -->
324
325 <div id="customerprices" class="wrapper">
326   [% PROCESS 'part/_customerprices.html' %]
327 </div>
328
329 [% UNLESS SELF.part.is_assembly %]
330   <div id="makemodel" class="wrapper">[% PROCESS 'part/_makemodel.html' %]</div>
331 [% END %]
332
333 <div id="businessmodels" class="wrapper">
334   [% PROCESS 'part/_businessmodels.html' %]
335 </div>