Revision 08d2e0ca
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/DB/DeliveryOrder.pm | ||
---|---|---|
20 | 20 |
|
21 | 21 |
__PACKAGE__->meta->initialize; |
22 | 22 |
|
23 |
__PACKAGE__->before_save('_before_save_set_donumber'); |
|
24 |
|
|
25 |
# hooks |
|
26 |
|
|
27 |
sub _before_save_set_donumber { |
|
28 |
my ($self) = @_; |
|
29 |
|
|
30 |
$self->create_trans_number if !$self->donumber; |
|
31 |
|
|
32 |
return 1; |
|
33 |
} |
|
34 |
|
|
23 | 35 |
# methods |
24 | 36 |
|
25 | 37 |
sub items { goto &orderitems; } |
Auch abrufbar als: Unified diff
SL::DB::DeliveryOrder: donumber in before_save-Hook erzeugen