Revision 9a28383a
Von Kivitendo Admin vor mehr als 7 Jahren hinzugefügt
SL/Controller/Part.pm | ||
---|---|---|
682 | 682 |
|
683 | 683 |
delete $params->{id}; |
684 | 684 |
# never overwrite existing partnumber for parts in use, should be a read-only field in that case anyway |
685 |
delete $params->{partnumber} if $self->part->partnumber and not $self->orphaned;
|
|
685 |
delete $params->{partnumber} if $self->part->partnumber and $self->part->used_in_record;
|
|
686 | 686 |
$self->part->assign_attributes(%{ $params}); |
687 | 687 |
$self->part->bin_id(undef) unless $self->part->warehouse_id; |
688 | 688 |
|
templates/webpages/part/_basic_data.html | ||
---|---|---|
20 | 20 |
<tr> |
21 | 21 |
<th align="right">[% 'Part Number' | $T8 %]</th> |
22 | 22 |
[% SET readonly = 1 %] |
23 |
[%- IF !SELF.part.id or SELF.part.orphaned %][% readonly = 0 %][% END %]
|
|
23 |
[%- IF !SELF.part.id or !SELF.part.used_in_record %][% 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 - Artikelnummern ändern prüft auf used_in_record
nicht auf mehr orphaned.