Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / templates / webpages / part / _basic_data.html
diff --git a/templates/webpages/part/_basic_data.html b/templates/webpages/part/_basic_data.html
new file mode 100644 (file)
index 0000000..a9fa531
--- /dev/null
@@ -0,0 +1,243 @@
+[%- USE T8 %]
+[%- USE HTML %]
+[%- USE LxERP %]
+[%- USE L %]
+[%- USE P %]
+   <table width="100%" id="basic_data_table">
+    <tr>
+     <td>
+      <table width="100%" id="ic1">
+       <tr valign="top">
+        <td>
+         [%- IF SELF.part.image && INSTANCE_CONF.get_parts_show_image %]
+         <a href="[% SELF.part.image | html %]" target="_blank"><img style="[% INSTANCE_CONF.get_parts_image_css %]" src="[% SELF.part.image | html %]"/></a>
+         [%- END %]
+
+         <table id="ic2">
+          <tr>
+           <td colspan="2">
+            <table id="ic3">
+             <tr>
+              <th align="right">[% 'Part Number' | $T8 %]</th>
+              <td>[% L.input_tag("part.partnumber", SELF.part.partnumber, size=40, class="initial_focus", "data-validate"="trimmed_whitespaces") %]</td>
+             </tr>
+             <tr>
+              <th align="right">[% 'Part Classification' | $T8 %]</th>
+              <td>[% P.part.select_classification('part.classification_id', default => SELF.part.classification_id, type => SELF.parts_classification_filter ) %]</td>
+             </tr>
+             <tr>
+              <th align="right">[% 'Part Description' | $T8 %]</th>
+              <td>
+               [% L.areainput_tag("part.description", SELF.part.description, size=40) %]
+              </td>
+             </tr>
+             <tr>
+               <th align="right">[% 'EAN-Code' | $T8 %]</th>
+               <td>[% L.input_tag("part.ean", SELF.part.ean, size=40, "data-validate"="trimmed_whitespaces") %]</td>
+             </tr>
+             <tr>
+              [%- IF SELF.all_partsgroups.size %]
+              <th align="right">[% 'Partsgroup' | $T8 %]</th>
+              <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>
+              [% END %]
+             </tr>
+             [%- IF SELF.all_buchungsgruppen.size %]
+             <tr>
+              <th align="right">[% 'Booking group' | $T8 %]</th>
+              <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>
+             </tr>
+             [%- END %]
+             [%- IF SELF.all_payment_terms.size %]
+             <tr>
+              <th align="right">[% 'Payment Terms' | $T8 %]</th>
+              <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 style='width: 200px') %]</td>
+             </tr>
+             [% END %]
+            </table>
+           </td>
+          </tr>
+
+          <tr height="5"></tr>
+
+          <tr>
+           <td>
+            <table id="ic4">
+             <tr>
+              <th align="left">[% 'Part Notes' | $T8 %]</th>
+              <th align="left">[% 'Formula' | $T8 %]</th>
+             </tr>
+             <tr valign="top">
+              <td>
+               [% L.textarea_tag("part.notes", P.restricted_html(SELF.part.notes), class="texteditor", style="width: 600px; height: 200px") %]
+              </td>
+              <td>
+                 <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>
+               </td>
+             </tr>
+             [% IF CUSTOM_VARIABLES_FIRST_TAB %]
+              <tr><td>[% 'Unchecked custom variables will not appear in orders and invoices.' | $T8 %]</td></tr>
+               [%- FOREACH var = CUSTOM_VARIABLES_FIRST_TAB %]
+               <tr>
+                <td align="left" valign="top">[% var.VALID_BOX %]
+                [%- IF !var.partsgroup_filtered %]
+                  [% HTML.escape(var.description) %]
+                [%- END %]
+               </tr>
+               <tr><td>[% var.HTML_CODE %]</td></tr>
+               [%- END %]
+             [% END %]
+            </table>
+           </td>
+          </tr>
+         </table>
+        </td>
+
+        <td>
+         <table id="ic5">
+          <tr>
+           <th align="right" nowrap="true">[% 'Price updated' | $T8 %]</th>
+           <td>
+           [% SELF.part.last_price_update.valid_from.to_kivitendo | html %]
+           </td>
+          </tr>
+
+          <tr>
+           <th align="right" nowrap="true">[% 'List Price' | $T8 %]</th>
+           <td>[% L.input_tag("part.listprice_as_number", SELF.part.listprice_as_number, size=11 class='reformat_number numeric') %]</td>
+          </tr>
+
+          <tr  >
+           <th align="right" nowrap="true">[% 'Sell Price' | $T8 %]</th>
+           <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>
+          </tr>
+
+          [%- UNLESS SELF.part.is_assembly %]
+          <tr>
+           <th align="right" nowrap="true">[% 'Last Cost' | $T8 %]</th>
+           <td>[% L.input_tag("part.lastcost_as_number", SELF.part.lastcost_as_number, size=11 class='reformat_number numeric') %]
+           [% IF SELF.part.is_assortment %] (<span id="items_lastcost_sum_basic">[% LxERP.format_amount(SELF.part.items_lastcost_sum, 2) %]</span>) [% END %]</td>
+          </tr>
+          [%- END %]
+
+          [%- IF SELF.all_price_factors.size %]
+          <tr>
+           <th align="right">[% 'Price Factor' | $T8 %]</th>
+           <td>
+            [%- 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>
+          </tr>
+          [%- END %]
+
+          <tr>
+           <th align="right" nowrap="true">[% 'Unit' | $T8 %]</th>
+           <td>
+            [%- IF !SELF.part.id or SELF.part.orphaned # same logic as unit_changable %]
+            [%- L.select_tag('part.unit', SELF.all_units, default=SELF.part.unit, title_key='name', value_key='name') %]
+            [%- ELSE %]
+            [% L.hidden_tag('part.unit', SELF.part.unit) %] [% HTML.escape(SELF.part.unit) %]
+            [%- END %]
+           </td>
+          </tr>
+
+        [%- UNLESS SELF.part.is_service %]
+          <tr>
+           <th align="right" nowrap="true">[% 'Weight' | $T8 %]</th>
+           <td>
+            [%- IF SELF.part.is_assembly %]
+              <span id="items_weight_sum_basic">[% LxERP.format_amount(SELF.part.weight) %]</span>
+            [% ELSE %]
+              [% L.input_tag('part.weight_as_number', SELF.part.weight_as_number, size=10, class='reformat_number numeric') %]
+            [% END %]
+            [% HTML.escape(INSTANCE_CONF.get_weightunit) %]
+           </td>
+          </tr>
+          <tr>
+           <th align="right" nowrap>[% 'On Hand' | $T8 %]</th>
+           <th align="left" nowrap>[% LxERP.format_amount(SELF.part.onhand) %] [% SELF.part.unit | html %]</th>
+          </tr>
+          <tr>
+           <th align="right" nowrap="true">[% 'ROP' | $T8 %]</th>
+           <td>[% L.input_tag("part.rop_as_number", SELF.part.rop_as_number, size=10, class="reformat_number numeric") %]</td>
+          </tr>
+          [% IF SELF.all_warehouses.size %]
+          <tr>
+           <th align="right" nowrap="true">[% 'Default Warehouse' | $T8 %]</th>
+           <td>[% L.select_tag('part.warehouse_id', SELF.all_warehouses, default=SELF.part.warehouse.id, title_key='description', with_empty=1) %]
+           </td>
+          </tr>
+          [% END %]
+          <tr>
+           <th align="right" nowrap="true">[% 'Default Bin' | $T8 %]</th>
+           <td>
+            <span id='bin'>
+            [% IF SELF.part.warehouse.id %]
+            [% L.select_tag('part.bin_id', SELF.part.warehouse.bins, default=SELF.part.bin.id, title_key='description') %]
+            [%- END %]
+            </span>
+           </td>
+          </tr>
+        [%- END %]
+          <tr>
+           <th align="right" nowrap="true">[% 'Verrechnungseinheit' | $T8 %]</th>
+           <td>[% L.input_tag("part.ve", SELF.part.ve, size=10) %]</td>
+          </tr>
+          <tr>
+           <th align="right" nowrap="true">[% 'Business Volume' | $T8 %]</th>
+           <td>[% L.input_tag("part.gv_as_number", SELF.part.gv_as_number, size=10, class='reformat_number numeric') %]</td>
+          </tr>
+          <tr>
+           <th align="right" nowrap><label for="not_discountable">[% 'Not Discountable' | $T8 %]</label></th>
+           <td>[% L.checkbox_tag('part.not_discountable', checked = SELF.part.not_discountable, for_submit=1) %]</td>
+          </tr>
+        [%- IF SELF.part.id %]
+          <tr>
+           <th align="right" nowrap="true"><label for="obsolete">[% 'Obsolete' | $T8 %]</label></th>
+           <td>[% L.checkbox_tag('part.obsolete', checked = SELF.part.obsolete, for_submit=1) %]</td>
+          </tr>
+        [%- END %]
+        [%- UNLESS SELF.part.is_service %]
+          <tr>
+           <th align="right" nowrap><label for="has_sernumber">[% 'Has serial number' | $T8 %]</label></th>
+           <td>[% L.checkbox_tag('part.has_sernumber', checked = SELF.part.has_sernumber, for_submit=1) %]</td>
+          </tr>
+        [%- END %]
+          <tr>
+           <th align="right" nowrap><label for="shop">[% 'Shop article' | $T8 %]</label></th>
+           <td>[% L.checkbox_tag('part.shop', checked = SELF.part.shop, for_submit=1) %]</td>
+          </tr>
+         </table>
+        </td>
+       </tr>
+      </table>
+     </td>
+    </tr>
+
+
+    <tr>
+     <td>
+      <table id="ic6">
+       <tr>
+        <th align="right" nowrap>[% 'Image' | $T8 %]</th>
+        <td>[% L.input_tag("part.image", SELF.part.image, size=40, "data-validate"="trimmed_whitespaces") %]</td>
+        <th align="right" nowrap>[% 'Microfiche' | $T8 %]</th>
+        <td>[% L.input_tag("part.microfiche", SELF.part.microfiche, size=20, "data-validate"="trimmed_whitespaces") %]</td>
+       </tr>
+       <tr>
+        <th align="right" nowrap>[% 'Drawing' | $T8 %]</th>
+        <td>[% L.input_tag("part.drawing", SELF.part.drawing, size=40, "data-validate"="trimmed_whitespaces") %]</td>
+       </tr>
+      </table>
+     </td>
+    </tr>
+
+ [% PROCESS 'part/_pricegroup_prices.html' %]
+ [% PROCESS 'part/_customerprices.html' %]
+[%- UNLESS SELF.part.is_assembly %]
+ [% PROCESS 'part/_makemodel.html' %]
+[% END %]
+
+  <tr>
+    <td><hr size="3" noshade></td>
+  </tr>
+ </table>