test action
[kivitendo-erp.git] / templates / webpages / part / _basic_data.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %]
4 [%- USE L %]
5 [%- USE P %]
6    <table width="100%" id="basic_data_table">
7     <tr>
8      <td>
9       <table width="100%" id="ic1">
10        <tr valign="top">
11         <td>
12          [%- IF SELF.part.image && INSTANCE_CONF.get_parts_show_image %]
13          <a href="[% SELF.part.image | html %]" target="_blank"><img style="[% INSTANCE_CONF.get_parts_image_css %]" src="[% SELF.part.image | html %]"/></a>
14          [%- END %]
15
16          <table id="ic2">
17           <tr>
18            <td colspan="2">
19             <table id="ic3">
20              <tr>
21               <th align="right">[% 'Part Number' | $T8 %]</th>
22               <td>[% L.input_tag("part.partnumber", SELF.part.partnumber, size=40, class="initial_focus") %]</td>
23              </tr>
24              <tr>
25               <th align="right">[% 'Part Classification' | $T8 %]</th>
26               <td>[% P.part.select_classification('part.classification_id', default => SELF.part.classification_id, type => SELF.parts_classification_filter ) %]</td>
27              </tr>
28              <tr>
29               <th align="right">[% 'Part Description' | $T8 %]</th>
30               <td>
31                [% L.areainput_tag("part.description", SELF.part.description, size=40) %]
32               </td>
33              </tr>
34              <tr>
35                <th align="right">[% 'EAN-Code' | $T8 %]</th>
36                <td>[% L.input_tag("part.ean", SELF.part.ean, size=40) %]</td>
37              </tr>
38              <tr>
39               [%- IF SELF.all_partsgroups.size %]
40               <th align="right">[% 'Partsgroup' | $T8 %]</th>
41               <td>[%- L.select_tag('part.partsgroup_id', SELF.all_partsgroups, default=SELF.part.partsgroup_id, title_key='partsgroup', value_key='id', with_empty=1 style='width: 200px') %]</td>
42               [% END %]
43              </tr>
44              [%- IF SELF.all_buchungsgruppen.size %]
45              <tr>
46               <th align="right">[% 'Booking group' | $T8 %]</th>
47               <td>[%- L.select_tag('part.buchungsgruppen_id', SELF.all_buchungsgruppen, default=SELF.part.buchungsgruppen_id, title_key='description', value_key='id', with_empty=0 style='width: 200px') %]</td>
48              </tr>
49              [%- END %]
50              [%- IF SELF.all_payment_terms.size %]
51              <tr>
52               <th align="right">[% 'Payment Terms' | $T8 %]</th>
53               <td>
54               [%- L.select_tag('part.payment_id', SELF.all_payment_terms, default=SELF.part.payment_id, title_key='description', value_key='id', with_empty=1 style='width: 200px') %]</td>
55              </tr>
56              [% END %]
57             </table>
58            </td>
59           </tr>
60
61           <tr height="5"></tr>
62
63           <tr>
64            <td>
65             <table id="ic4">
66              <tr>
67               <th align="left">[% 'Part Notes' | $T8 %]</th>
68               <th align="left">[% 'Formula' | $T8 %]</th>
69              </tr>
70              <tr valign="top">
71               <td>
72                [% L.textarea_tag("part.notes", P.restricted_html(SELF.part.notes), class="texteditor", style="width: 600px; height: 200px") %]
73               </td>
74               <td>
75                  <textarea id="part.formel" name="part.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(SELF.part.formel) %]</textarea>
76                </td>
77              </tr>
78              [% IF CUSTOM_VARIABLES_FIRST_TAB %]
79               <tr><td>[% 'Unchecked custom variables will not appear in orders and invoices.' | $T8 %]</td></tr>
80                [%- FOREACH var = CUSTOM_VARIABLES_FIRST_TAB %]
81                <tr>
82                 <td align="left" valign="top">[% var.VALID_BOX %]
83                 [%- IF !var.partsgroup_filtered %]
84                   [% HTML.escape(var.description) %]
85                 [%- END %]
86                </tr>
87                <tr><td>[% var.HTML_CODE %]</td></tr>
88                [%- END %]
89              [% END %]
90             </table>
91            </td>
92           </tr>
93          </table>
94         </td>
95
96         <td>
97          <table id="ic5">
98           <tr>
99            <th align="right" nowrap="true">[% 'Price updated' | $T8 %]</th>
100            <td>
101            [% SELF.part.last_price_update.valid_from.to_kivitendo | html %]
102            </td>
103           </tr>
104
105           <tr>
106            <th align="right" nowrap="true">[% 'List Price' | $T8 %]</th>
107            <td>[% L.input_tag("part.listprice_as_number", SELF.part.listprice_as_number, size=11 class='reformat_number numeric') %]</td>
108           </tr>
109
110           <tr  >
111            <th align="right" nowrap="true">[% 'Sell Price' | $T8 %]</th>
112            <td>[% L.input_tag("part.sellprice_as_number", SELF.part.sellprice_as_number, size=11, class='reformat_number numeric') %] [% IF (SELF.part.is_assortment or SELF.part.is_assembly) %] (<span id="items_sellprice_sum_basic">[% LxERP.format_amount(SELF.part.items_sellprice_sum, 2) %]</span>) [% END %]</td>
113           </tr>
114
115           [%- UNLESS SELF.part.is_assembly %]
116           <tr>
117            <th align="right" nowrap="true">[% 'Last Cost' | $T8 %]</th>
118            <td>[% L.input_tag("part.lastcost_as_number", SELF.part.lastcost_as_number, size=11 class='reformat_number numeric') %]
119            [% IF SELF.part.is_assortment %] (<span id="items_lastcost_sum_basic">[% LxERP.format_amount(SELF.part.items_lastcost_sum, 2) %]</span>) [% END %]</td>
120           </tr>
121           [%- END %]
122
123           [%- IF SELF.all_price_factors.size %]
124           <tr>
125            <th align="right">[% 'Price Factor' | $T8 %]</th>
126            <td>
127             [%- 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) %]
128            </td>
129           </tr>
130           [%- END %]
131
132           <tr>
133            <th align="right" nowrap="true">[% 'Unit' | $T8 %]</th>
134            <td>
135             [%- IF !SELF.part.id or SELF.part.orphaned # same logic as unit_changable %]
136             [%- L.select_tag('part.unit', SELF.all_units, default=SELF.part.unit, title_key='name', value_key='name') %]
137             [%- ELSE %]
138             [% L.hidden_tag('part.unit', SELF.part.unit) %] [% HTML.escape(SELF.part.unit) %]
139             [%- END %]
140            </td>
141           </tr>
142
143         [%- UNLESS SELF.part.is_service %]
144           <tr>
145            <th align="right" nowrap="true">[% 'Weight' | $T8 %]</th>
146            <td>
147             [%- IF SELF.part.is_assembly %]
148               <span id="items_weight_sum_basic">[% LxERP.format_amount(SELF.part.weight) %]</span>
149             [% ELSE %]
150               [% L.input_tag('part.weight_as_number', SELF.part.weight_as_number, size=10, class='reformat_number numeric') %]
151             [% END %]
152             [% HTML.escape(INSTANCE_CONF.get_weightunit) %]
153            </td>
154           </tr>
155           <tr>
156            <th align="right" nowrap>[% 'On Hand' | $T8 %]</th>
157            <th align="left" nowrap>[% LxERP.format_amount(SELF.part.onhand) %] [% SELF.part.unit | html %]</th>
158           </tr>
159           <tr>
160            <th align="right" nowrap="true">[% 'ROP' | $T8 %]</th>
161            <td>[% L.input_tag("part.rop_as_number", SELF.part.rop_as_number, size=10, class="reformat_number numeric") %]</td>
162           </tr>
163           [% IF SELF.all_warehouses.size %]
164           <tr>
165            <th align="right" nowrap="true">[% 'Default Warehouse' | $T8 %]</th>
166            <td>[% L.select_tag('part.warehouse_id', SELF.all_warehouses, default=SELF.part.warehouse.id, title_key='description', with_empty=1) %]
167            </td>
168           </tr>
169           [% END %]
170           <tr>
171            <th align="right" nowrap="true">[% 'Default Bin' | $T8 %]</th>
172            <td>
173             <span id='bin'>
174             [% IF SELF.part.warehouse.id %]
175             [% L.select_tag('part.bin_id', SELF.part.warehouse.bins, default=SELF.part.bin.id, title_key='description') %]
176             [%- END %]
177             </span>
178            </td>
179           </tr>
180         [%- END %]
181           <tr>
182            <th align="right" nowrap="true">[% 'Verrechnungseinheit' | $T8 %]</th>
183            <td>[% L.input_tag("part.ve", SELF.part.ve, size=10) %]</td>
184           </tr>
185           <tr>
186            <th align="right" nowrap="true">[% 'Business Volume' | $T8 %]</th>
187            <td>[% L.input_tag("part.gv_as_number", SELF.part.gv_as_number, size=10, class='reformat_number numeric') %]</td>
188           </tr>
189           <tr>
190            <th align="right" nowrap><label for="not_discountable">[% 'Not Discountable' | $T8 %]</label></th>
191            <td>[% L.checkbox_tag('part.not_discountable', checked = SELF.part.not_discountable, for_submit=1) %]</td>
192           </tr>
193         [%- IF SELF.part.id %]
194           <tr>
195            <th align="right" nowrap="true"><label for="obsolete">[% 'Obsolete' | $T8 %]</label></th>
196            <td>[% L.checkbox_tag('part.obsolete', checked = SELF.part.obsolete, for_submit=1) %]</td>
197           </tr>
198         [%- END %]
199         [%- UNLESS SELF.part.is_service %]
200           <tr>
201            <th align="right" nowrap><label for="has_sernumber">[% 'Has serial number' | $T8 %]</label></th>
202            <td>[% L.checkbox_tag('part.has_sernumber', checked = SELF.part.has_sernumber, for_submit=1) %]</td>
203           </tr>
204         [%- END %]
205           <tr>
206            <th align="right" nowrap><label for="shop">[% 'Shop article' | $T8 %]</label></th>
207            <td>[% L.checkbox_tag('part.shop', checked = SELF.part.shop, for_submit=1) %]</td>
208           </tr>
209          </table>
210         </td>
211        </tr>
212       </table>
213      </td>
214     </tr>
215
216
217     <tr>
218      <td>
219       <table id="ic6">
220        <tr>
221         <th align="right" nowrap>[% 'Image' | $T8 %]</th>
222         <td>[% L.input_tag("part.image", SELF.part.image, size=40) %]</td>
223         <th align="right" nowrap>[% 'Microfiche' | $T8 %]</th>
224         <td>[% L.input_tag("part.microfiche", SELF.part.microfiche, size=20) %]</td>
225        </tr>
226        <tr>
227         <th align="right" nowrap>[% 'Drawing' | $T8 %]</th>
228         <td>[% L.input_tag("part.drawing", SELF.part.drawing, size=40) %]</td>
229        </tr>
230       </table>
231      </td>
232     </tr>
233
234  [% PROCESS 'part/_pricegroup_prices.html' %]
235  [% PROCESS 'part/_customerprices.html' %]
236 [%- UNLESS SELF.part.is_assembly %]
237  [% PROCESS 'part/_makemodel.html' %]
238 [% END %]
239
240   <tr>
241     <td><hr size="3" noshade></td>
242   </tr>
243  </table>