From: G. Richardson Date: Tue, 30 May 2017 13:34:43 +0000 (+0200) Subject: Part Controller - Artikelnummern ändern prüft auf used_in_record X-Git-Tag: release-3.5.4~1056 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9a28383a1193c4705909ea18dd09303dab6557e4;p=kivitendo-erp.git Part Controller - Artikelnummern ändern prüft auf used_in_record nicht auf mehr orphaned. --- 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") %]