]> wagnertech.de Git - mfinanz.git/blob - templates/webpages/part/_basic_data.html
kivitendo 3.9.2-0.2
[mfinanz.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", "data-validate"="trimmed_whitespaces") %]</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, "data-validate"="trimmed_whitespaces") %]</td>
37              </tr>
38              <tr>
39                <th align="right">[% 'Tariff Code' | $T8 %]</th>
40                <td>[% L.input_tag("part.tariff_code", SELF.part.tariff_code, size=40, "data-validate"="trimmed_whitespaces") %]</td>
41              </tr>
42              <tr>
43               [%- IF SELF.all_partsgroups.size %]
44               <th align="right">[% 'Partsgroup' | $T8 %]</th>
45               <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>
46               [% END %]
47              </tr>
48              [%- IF SELF.all_buchungsgruppen.size %]
49              <tr>
50               <th align="right">[% 'Booking group' | $T8 %]</th>
51               <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>
52              </tr>
53              [%- END %]
54              [%- IF SELF.all_payment_terms.size %]
55              <tr>
56               <th align="right">[% 'Payment Terms' | $T8 %]</th>
57               <td>
58               [%- 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>
59              </tr>
60              [% END %]
61             </table>
62            </td>
63           </tr>
64
65           <tr height="5"></tr>
66
67           <tr>
68            <td>
69             <table id="ic4">
70              <tr>
71               <th align="left">[% 'Part Notes' | $T8 %]</th>
72               <th align="left">[% 'Formula' | $T8 %]</th>
73              </tr>
74              <tr valign="top">
75               <td>
76                [% L.textarea_tag("part.notes", P.restricted_html(SELF.part.notes), class="texteditor", style="width: 600px; height: 200px") %]
77               </td>
78               <td>
79                  <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>
80                </td>
81              </tr>
82              [% IF CUSTOM_VARIABLES_FIRST_TAB %]
83               <tr><td>[% 'Unchecked custom variables will not appear in orders and invoices.' | $T8 %]</td></tr>
84                [%- FOREACH var = CUSTOM_VARIABLES_FIRST_TAB %]
85                <tr>
86                 <td align="left" valign="top">[% var.VALID_BOX %]
87                 [%- IF !var.partsgroup_filtered %]
88                   [% HTML.escape(var.description) %]
89                 [%- END %]
90                </tr>
91                <tr><td>[% var.HTML_CODE %]</td></tr>
92                [%- END %]
93              [% END %]
94             </table>
95            </td>
96           </tr>
97          </table>
98         </td>
99
100         <td>
101          <table id="ic5">
102           <tr>
103            <th align="right" nowrap="true">[% 'Price updated' | $T8 %]</th>
104            <td>
105            [% SELF.part.last_price_update.valid_from.to_kivitendo | html %]
106            </td>
107           </tr>
108
109           <tr>
110            <th align="right" nowrap="true">[% 'List Price' | $T8 %]</th>
111            <td>
112             [% IF (AUTH.assert('part_service_assembly_edit_prices', 'may_fail')) %]
113              [% L.input_tag("part.listprice_as_number", SELF.part.listprice_as_number, size=11 class='reformat_number numeric') %]</td>
114             [% ELSE %]
115              <span class="numeric">[% SELF.part.listprice_as_number %]</span>
116             [% END %]
117           </tr>
118
119           <tr  >
120            <th align="right" nowrap="true">[% 'Sell Price' | $T8 %]</th>
121            <td>
122             [% IF (AUTH.assert('part_service_assembly_edit_prices', 'may_fail')) %]
123              [% L.input_tag("part.sellprice_as_number", SELF.part.sellprice_as_number, size=11, class='reformat_number numeric') %]
124              [% 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 %]
125             [% ELSE %]
126              <span class="numeric">[% SELF.part.sellprice_as_number %]</span>
127             [% END %]
128            </td>
129           </tr>
130           <tr>
131            <th align="right" nowrap="true">[% 'Last Cost' | $T8 %]</th>
132            <td>
133             [%- UNLESS SELF.part.is_assembly %]
134              [% IF (AUTH.assert('part_service_assembly_edit_prices', 'may_fail')) %]
135               [% L.input_tag("part.lastcost_as_number", SELF.part.lastcost_as_number, size=11 class='reformat_number numeric') %]
136              [% ELSE %]
137               <span class="numeric">[% SELF.part.lastcost_as_number %]</span>
138             [% END %]
139             [%- END %]
140             [% IF SELF.part.is_assortment || SELF.part.is_assembly %] (<span id="items_lastcost_sum_basic">[% LxERP.format_amount(SELF.part.items_lastcost_sum, 2) %]</span>) [% END %]
141            </td>
142           </tr>
143
144           [%- IF SELF.all_price_factors.size %]
145           <tr>
146            <th align="right">[% 'Price Factor' | $T8 %]</th>
147            <td>
148             [%- 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) %]
149            </td>
150           </tr>
151           [%- END %]
152
153           <tr>
154            <th align="right" nowrap="true">[% 'Unit' | $T8 %]</th>
155            <td>
156             [%- IF !SELF.part.id or SELF.part.orphaned # same logic as unit_changable %]
157             [%- L.select_tag('part.unit', SELF.all_units, default=SELF.part.unit, title_key='name', value_key='name') %]
158             [%- ELSE %]
159             [% L.hidden_tag('part.unit', SELF.part.unit) %] [% HTML.escape(SELF.part.unit) %]
160             [%- END %]
161            </td>
162           </tr>
163
164         [%- UNLESS SELF.part.is_service %]
165           <tr>
166            <th align="right" nowrap="true">[% 'Weight' | $T8 %]</th>
167            <td>
168             [%- IF SELF.part.is_assembly %]
169               <span id="items_weight_sum_basic">[% LxERP.format_amount(SELF.part.weight) %]</span>
170             [% ELSE %]
171               [% L.input_tag('part.weight_as_number', SELF.part.weight_as_number, size=10, class='reformat_number numeric') %]
172             [% END %]
173             [% HTML.escape(INSTANCE_CONF.get_weightunit) %]
174            </td>
175           </tr>
176           <tr>
177            <th align="right" nowrap>[% 'On Hand' | $T8 %]</th>
178            <th align="left" nowrap>[% LxERP.format_amount(SELF.part.onhand) %] [% SELF.part.unit | html %]</th>
179           </tr>
180           <tr>
181            <th align="right" nowrap="true">[% 'ROP' | $T8 %]</th>
182            <td>[% L.input_tag("part.rop_as_number", SELF.part.rop_as_number, size=10, class="reformat_number numeric") %]</td>
183           </tr>
184           <tr>
185            <th align="right" nowrap="true">[% 'Order Size' | $T8 %]</th>
186            <td>[% L.input_tag("part.order_qty_as_number", SELF.part.order_qty_as_number, size=10, class="numeric") %]</td>
187           </tr>
188           [% IF SELF.all_warehouses.size %]
189           <tr>
190            <th align="right" nowrap="true">[% 'Default Warehouse' | $T8 %]</th>
191            <td>[% L.select_tag('part.warehouse_id', SELF.all_warehouses, default=SELF.part.warehouse.id, title_key='description', with_empty=1) %]
192            </td>
193           </tr>
194           [% END %]
195           <tr>
196            <th align="right" nowrap="true">[% 'Default Bin' | $T8 %]</th>
197            <td>
198             <span id='bin'>
199             [% IF SELF.part.warehouse.id %]
200             [% L.select_tag('part.bin_id', SELF.part.warehouse.bins_sorted_naturally, default=SELF.part.bin.id, title_key='description', with_empty=0) %]
201             [%- END %]
202             </span>
203            </td>
204           </tr>
205         [%- END %]
206           <tr>
207            <th align="right" nowrap="true">[% 'Verrechnungseinheit' | $T8 %]</th>
208            <td>[% L.input_tag("part.ve", SELF.part.ve, size=10) %]</td>
209           </tr>
210           <tr>
211            <th align="right" nowrap="true">[% 'Business Volume' | $T8 %]</th>
212            <td>[% L.input_tag("part.gv_as_number", SELF.part.gv_as_number, size=10, class='reformat_number numeric') %]</td>
213           </tr>
214           <tr>
215            <th align="right" nowrap><label for="not_discountable">[% 'Not Discountable' | $T8 %]</label></th>
216            <td>[% L.checkbox_tag('part.not_discountable', checked = SELF.part.not_discountable, for_submit=1) %]</td>
217           </tr>
218           <tr>
219            <th align="right" nowrap="true"><label for="order_locked">[% 'Do not order anymore' | $T8 %]</label></th>
220            <td>[% L.checkbox_tag('part.order_locked', checked = SELF.part.order_locked, for_submit=1) %]</td>
221           </tr>
222         [%- IF SELF.part.id %]
223           <tr>
224            <th align="right" nowrap="true"><label for="obsolete">[% 'Obsolete' | $T8 %]</label></th>
225            <td>[% L.checkbox_tag('part.obsolete', checked = SELF.part.obsolete, for_submit=1) %]</td>
226           </tr>
227         [%- END %]
228         [%- UNLESS SELF.part.is_service %]
229           <tr>
230            <th align="right" nowrap><label for="has_sernumber">[% 'Has serial number' | $T8 %]</label></th>
231            <td>[% L.checkbox_tag('part.has_sernumber', checked = SELF.part.has_sernumber, for_submit=1) %]</td>
232           </tr>
233         [%- END %]
234           <tr>
235            <th align="right" nowrap><label for="shop">[% 'Shop article' | $T8 %]</label></th>
236            <td>[% L.checkbox_tag('part.shop', checked = SELF.part.shop, for_submit=1) %]</td>
237           </tr>
238          </table>
239         </td>
240        </tr>
241       </table>
242      </td>
243     </tr>
244
245
246     <tr>
247      <td>
248       <table id="ic6">
249        <tr>
250         <th align="right" nowrap>[% 'Image' | $T8 %]</th>
251         <td>[% L.input_tag("part.image", SELF.part.image, size=40, "data-validate"="trimmed_whitespaces") %]</td>
252         <th align="right" nowrap>[% 'Microfiche' | $T8 %]</th>
253         <td>[% L.input_tag("part.microfiche", SELF.part.microfiche, size=20, "data-validate"="trimmed_whitespaces") %]</td>
254        </tr>
255        <tr>
256         <th align="right" nowrap>[% 'Drawing' | $T8 %]</th>
257         <td>[% L.input_tag("part.drawing", SELF.part.drawing, size=40, "data-validate"="trimmed_whitespaces") %]</td>
258        </tr>
259       </table>
260      </td>
261     </tr>
262
263  [% PROCESS 'part/_pricegroup_prices.html' %]
264  [% PROCESS 'part/_customerprices.html' %]
265 [%- UNLESS SELF.part.is_assembly %]
266  [% PROCESS 'part/_makemodel.html' %]
267 [% END %]
268  [% PROCESS 'part/_businessmodels.html' %]
269
270   <tr>
271     <td><hr size="3" noshade></td>
272   </tr>
273  </table>