From: Martin Helmling martin.helmling@octosoft.eu Date: Wed, 28 Dec 2016 15:36:54 +0000 (+0100) Subject: Vereinfachte Abkürzungsmethode "typeclass_abbreviation" im Part Presenter X-Git-Tag: release-3.5.4~1745 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ea1c5dfb6016096a29822cc66628837beaff0891;p=kivitendo-erp.git Vereinfachte Abkürzungsmethode "typeclass_abbreviation" im Part Presenter --- diff --git a/SL/Presenter/Part.pm b/SL/Presenter/Part.pm index d8491ecb5..3de612376 100644 --- a/SL/Presenter/Part.pm +++ b/SL/Presenter/Part.pm @@ -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 # diff --git a/templates/webpages/order/tabs/_row.html b/templates/webpages/order/tabs/_row.html index 89889c69e..b59ffb45c 100644 --- a/templates/webpages/order/tabs/_row.html +++ b/templates/webpages/order/tabs/_row.html @@ -2,6 +2,7 @@ [%- USE HTML %] [%- USE LxERP %] [%- USE L %] +[%- USE P %] @@ -33,6 +34,9 @@
[% HTML.escape(ITEM.part.partnumber) %]
+ +
[% P.typeclass_abbreviation(ITEM.part) %]
+ [% L.input_tag("order.orderitems[].description", ITEM.description, diff --git a/templates/webpages/order/tabs/basic_data.html b/templates/webpages/order/tabs/basic_data.html index 1a055379c..526e028bf 100644 --- a/templates/webpages/order/tabs/basic_data.html +++ b/templates/webpages/order/tabs/basic_data.html @@ -166,6 +166,7 @@ [%- LxERP.t8('reorder item') %] [%- LxERP.t8('delete item') %] [%- 'Partnumber' | $T8 %] + [%- 'Type' | $T8 %] [%- 'Description' | $T8 %] [%- 'Qty' | $T8 %] [%- 'Price Factor' | $T8 %]