Vereinfachte Abkürzungsmethode "typeclass_abbreviation" im Part Presenter
authorMartin Helmling martin.helmling@octosoft.eu <martin.helmling@octosoft.eu>
Wed, 28 Dec 2016 15:36:54 +0000 (16:36 +0100)
committerMartin Helmling martin.helmling@octosoft.eu <martin.helmling@octosoft.eu>
Wed, 11 Jan 2017 07:20:39 +0000 (08:20 +0100)
SL/Presenter/Part.pm
templates/webpages/order/tabs/_row.html
templates/webpages/order/tabs/basic_data.html

index d8491ec..3de6123 100644 (file)
@@ -7,7 +7,7 @@ use SL::DB::PartClassification;
 use SL::Locale::String qw(t8);
 
 use Exporter qw(import);
-our @EXPORT = qw(part_picker part select_classification classification_abbreviation type_abbreviation separate_abbreviation);
+our @EXPORT = qw(part_picker part select_classification classification_abbreviation type_abbreviation separate_abbreviation typeclass_abbreviation);
 
 use Carp;
 
@@ -84,6 +84,12 @@ sub classification_abbreviation {
   $obj && $obj->abbreviation ? t8($obj->abbreviation) : '';
 }
 
+sub typeclass_abbreviation {
+  my ($self, $part) = @_;
+  return '' if !$part || !$part->isa('SL::DB::Part');
+  return $self->type_abbreviation($part->part_type).$self->classification_abbreviation($part->classification_id);
+}
+
 #
 # shortcut for article type
 #
index 89889c6..b59ffb4 100644 (file)
@@ -2,6 +2,7 @@
 [%- USE HTML %]
 [%- USE LxERP %]
 [%- USE L %]
+[%- USE P %]
 
 <tbody class="row_entry listrow"[%- IF MYCONFIG.show_form_details -%] data-expanded="1"[%- END -%]>
   <tr>
@@ -33,6 +34,9 @@
     <td>
       <div name="partnumber">[% HTML.escape(ITEM.part.partnumber) %]</div>
     </td>
+    <td>
+      <div name="partclassification">[% P.typeclass_abbreviation(ITEM.part) %]</div>
+    </td>
     <td>
       [% L.input_tag("order.orderitems[].description",
                      ITEM.description,
index 1a05537..526e028 100644 (file)
                 <th class="listheading" style='text-align:center' nowrap width="1"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
                 <th class="listheading" style='text-align:center' nowrap width="1"><img src="image/close.png" alt="[%- LxERP.t8('delete item') %]"></th>
                 <th id="partnumber_header_id"  class="listheading" nowrap width="15"><a href='#' onClick='javascript:kivi.Order.reorder_items("partnumber")'> [%- 'Partnumber'  | $T8 %]</a></th>
+                <th id="partclass_header_id"   class="listheading" nowrap width="2">[%- 'Type'  | $T8 %]</th>
                 <th id="description_header_id" class="listheading" nowrap           ><a href='#' onClick='javascript:kivi.Order.reorder_items("description")'>[%- 'Description' | $T8 %]</a></th>
                 <th id="qty_header_id"         class="listheading" nowrap width="5" ><a href='#' onClick='javascript:kivi.Order.reorder_items("qty")'>        [%- 'Qty'         | $T8 %]</a></th>
                 <th class="listheading" nowrap width="5" >[%- 'Price Factor' | $T8 %] </th>