Revision 7b03930b
Von Werner Hahn vor etwa 7 Jahren hinzugefügt
SL/DB/Part.pm | ||
---|---|---|
1 | 1 |
package SL::DB::Part; |
2 |
#package SL::DB::Part; |
|
3 | 2 |
|
4 | 3 |
use strict; |
5 | 4 |
|
... | ... | |
134 | 133 |
sub is_assortment { $_[0]->part_type eq 'assortment' } |
135 | 134 |
|
136 | 135 |
sub type { |
137 |
return $_[0]->part_type; |
|
138 |
# my ($self, $type) = @_; |
|
139 |
# if (@_ > 1) { |
|
140 |
# die 'invalid type' unless $type =~ /^(?:part|service|assembly)$/; |
|
141 |
# $self->assembly( $type eq 'assembly' ? 1 : 0); |
|
142 |
# $self->inventory_accno_id($type ne 'service' ? 1 : undef); |
|
143 |
# } |
|
144 |
|
|
145 |
# return 'assembly' if $self->assembly; |
|
146 |
# return 'part' if $self->inventory_accno_id; |
|
147 |
# return 'service'; |
|
136 |
my ($self, $type) = @_; |
|
137 |
if (@_ > 1) { |
|
138 |
die 'invalid type' unless $type =~ /^(?:part|service|assembly)$/; |
|
139 |
$self->assembly( $type eq 'assembly' ? 1 : 0); |
|
140 |
$self->inventory_accno_id($type ne 'service' ? 1 : undef); |
|
141 |
} |
|
142 |
|
|
143 |
return 'assembly' if $self->assembly; |
|
144 |
return 'part' if $self->inventory_accno_id; |
|
145 |
return 'service'; |
|
148 | 146 |
} |
149 | 147 |
|
150 | 148 |
sub new_part { |
Auch abrufbar als: Unified diff
Shopmodul: Anpassungen nach mergen für master
Bis hier noch mit individuellen Kundenanpassungen