Revision e2ef75e5
Von Kivitendo Admin vor fast 8 Jahren hinzugefügt
SL/Controller/Part.pm | ||
---|---|---|
669 | 669 |
my $params = delete($::form->{part}) || { }; |
670 | 670 |
|
671 | 671 |
delete $params->{id}; |
672 |
# never overwrite existing partnumber, should be a read-only field anyway
|
|
673 |
delete $params->{partnumber} if $self->part->partnumber; |
|
672 |
# never overwrite existing partnumber for parts in use, should be a read-only field in that case anyway
|
|
673 |
delete $params->{partnumber} if $self->part->partnumber and not $self->orphaned;
|
|
674 | 674 |
$self->part->assign_attributes(%{ $params}); |
675 | 675 |
$self->part->bin_id(undef) unless $self->part->warehouse_id; |
676 | 676 |
|
templates/webpages/part/_basic_data.html | ||
---|---|---|
20 | 20 |
<tr> |
21 | 21 |
<th align="right">[% 'Part Number' | $T8 %]</th> |
22 | 22 |
[% SET readonly = 1 %] |
23 |
[% UNLESS SELF.part.id %][% readonly = 0 %][% END %]
|
|
23 |
[%- IF !SELF.part.id or SELF.part.orphaned %][% readonly = 0 %][% END %]
|
|
24 | 24 |
<td>[% L.input_tag("part.partnumber", SELF.part.partnumber, size=40, readonly=readonly class="initial_focus") %]</td> |
25 | 25 |
</tr> |
26 | 26 |
<tr> |
Auch abrufbar als: Unified diff
Part Controller - Artikelnummer von unbenutzten Artikeln ändern