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;
$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
#
[%- USE HTML %]
[%- USE LxERP %]
[%- USE L %]
+[%- USE P %]
<tbody class="row_entry listrow"[%- IF MYCONFIG.show_form_details -%] data-expanded="1"[%- END -%]>
<tr>
<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,
<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>