From b720e272f739767ad33afffcf8c282c98f97dba1 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Wed, 21 Jan 2015 11:18:48 +0100 Subject: [PATCH] Part: long_description in displayable_name umbenannt zur Vereinheitlichung der Nomenklatur. --- SL/DB/Part.pm | 2 +- SL/DB/PriceRuleItem.pm | 2 +- templates/webpages/inventory/_journal.html | 2 +- templates/webpages/inventory/_stock.html | 2 +- templates/webpages/part/_part_picker_result.html | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SL/DB/Part.pm b/SL/DB/Part.pm index a25b64a74..2a74b74c6 100644 --- a/SL/DB/Part.pm +++ b/SL/DB/Part.pm @@ -205,7 +205,7 @@ sub get_simple_stock { sub bin { require SL::DB::Bin; SL::DB::Manager::Bin ->find_by_or_create(id => $_[0]->{bin_id}) } } -sub long_description { +sub displayable_name { join ' ', grep $_, map $_[0]->$_, qw(partnumber description); } diff --git a/SL/DB/PriceRuleItem.pm b/SL/DB/PriceRuleItem.pm index 131d46ae9..3fc39dfb8 100644 --- a/SL/DB/PriceRuleItem.pm +++ b/SL/DB/PriceRuleItem.pm @@ -111,7 +111,7 @@ sub full_description { : $type eq 'business' ? t8('Type of Business') . ' ' . $self->business->displayable_name : $type eq 'partsgroup' ? t8('Group') . ' ' . $self->partsgroup->displayable_name : $type eq 'pricegroup' ? t8('Pricegroup') . ' ' . $self->pricegroup->displayable_name - : $type eq 'part' ? t8('Part') . ' ' . $self->part->long_description + : $type eq 'part' ? t8('Part') . ' ' . $self->part->displayable_name : $type eq 'qty' ? ( $op eq 'eq' ? t8('Qty equals #1', $self->value_num_as_number) : $op eq 'lt' ? t8('Qty less than #1', $self->value_num_as_number) diff --git a/templates/webpages/inventory/_journal.html b/templates/webpages/inventory/_journal.html index 1dced05a6..bee3b9513 100644 --- a/templates/webpages/inventory/_journal.html +++ b/templates/webpages/inventory/_journal.html @@ -21,7 +21,7 @@ [% row.base.itime_as_date %] [% row.base.trans_type.description | $T8 %] - [% row.base.part.long_description | html %] + [% row.base.part.displayable_name | html %] [% row.out ? row.out.bin.full_description : '-' | html %] [% row.in ? row.in.qty_as_number : LxERP.format_amount(-1 * row.out.qty, 2) %] [% row.base.part.unit | html %] diff --git a/templates/webpages/inventory/_stock.html b/templates/webpages/inventory/_stock.html index 3b018b41f..b9ecc1cfc 100644 --- a/templates/webpages/inventory/_stock.html +++ b/templates/webpages/inventory/_stock.html @@ -3,7 +3,7 @@ [%- USE L %] [%- USE T8 %] [%- IF SELF.part.id %] -

[% LxERP.t8('Stock for part #1', SELF.part.long_description) %]

+

[% LxERP.t8('Stock for part #1', SELF.part.displayable_name) %]

[%- IF SELF.stock_empty && !SELF.part.bin_id %]

[% 'Nothing stocked yet.' | $T8 %]

diff --git a/templates/webpages/part/_part_picker_result.html b/templates/webpages/part/_part_picker_result.html index 5d9486b82..d283e6cac 100644 --- a/templates/webpages/part/_part_picker_result.html +++ b/templates/webpages/part/_part_picker_result.html @@ -9,7 +9,7 @@
- + [% part.partnumber | html %] [% part.description | html %] -- 2.20.1