Revision 8d87ea57
Von Moritz Bunkus vor mehr als 13 Jahren hinzugefügt
SL/DB/Part.pm | ||
---|---|---|
9 | 9 |
use SL::DB::MetaSetup::Part; |
10 | 10 |
use SL::DB::Manager::Part; |
11 | 11 |
use SL::DB::Chart; |
12 |
use SL::DB::Helper::TransNumberGenerator; |
|
12 | 13 |
|
13 | 14 |
__PACKAGE__->meta->add_relationships( |
14 | 15 |
unit_obj => { |
... | ... | |
40 | 41 |
|
41 | 42 |
__PACKAGE__->meta->initialize; |
42 | 43 |
|
44 |
__PACKAGE__->before_save('_before_save_set_partnumber'); |
|
45 |
|
|
46 |
sub _before_save_set_partnumber { |
|
47 |
my ($self) = @_; |
|
48 |
|
|
49 |
$self->create_trans_number if $self->partnumber eq ''; |
|
50 |
return 1; |
|
51 |
} |
|
52 |
|
|
43 | 53 |
sub is_type { |
44 | 54 |
my $self = shift; |
45 | 55 |
my $type = lc(shift || ''); |
Auch abrufbar als: Unified diff
Artikelnummernvergabe im TransNumberGenerator