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