From 9a28383a1193c4705909ea18dd09303dab6557e4 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Tue, 30 May 2017 15:34:43 +0200 Subject: [PATCH] =?utf8?q?Part=20Controller=20-=20Artikelnummern=20=C3=A4n?= =?utf8?q?dern=20pr=C3=BCft=20auf=20used=5Fin=5Frecord?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit nicht auf mehr orphaned. --- SL/Controller/Part.pm | 2 +- templates/webpages/part/_basic_data.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SL/Controller/Part.pm b/SL/Controller/Part.pm index 6477a902a..267c5d58d 100644 --- a/SL/Controller/Part.pm +++ b/SL/Controller/Part.pm @@ -682,7 +682,7 @@ sub parse_form { delete $params->{id}; # never overwrite existing partnumber for parts in use, should be a read-only field in that case anyway - delete $params->{partnumber} if $self->part->partnumber and not $self->orphaned; + delete $params->{partnumber} if $self->part->partnumber and $self->part->used_in_record; $self->part->assign_attributes(%{ $params}); $self->part->bin_id(undef) unless $self->part->warehouse_id; diff --git a/templates/webpages/part/_basic_data.html b/templates/webpages/part/_basic_data.html index c9a2d69d4..a923d9134 100644 --- a/templates/webpages/part/_basic_data.html +++ b/templates/webpages/part/_basic_data.html @@ -20,7 +20,7 @@ [% 'Part Number' | $T8 %] [% SET readonly = 1 %] - [%- IF !SELF.part.id or SELF.part.orphaned %][% readonly = 0 %][% END %] + [%- IF !SELF.part.id or !SELF.part.used_in_record %][% readonly = 0 %][% END %] [% L.input_tag("part.partnumber", SELF.part.partnumber, size=40, readonly=readonly class="initial_focus") %] -- 2.20.1