Revision 320b8908
Von Sven Schöling vor etwa 1 Jahr hinzugefügt
SL/DB/DeliveryOrder.pm | ||
---|---|---|
13 | 13 |
use SL::DB::Helper::FlattenToForm; |
14 | 14 |
use SL::DB::Helper::LinkedRecords; |
15 | 15 |
use SL::DB::Helper::TransNumberGenerator; |
16 |
use SL::DB::Helper::RecordLink qw(RECORD_ID RECORD_TYPE_REF); |
|
16 | 17 |
|
17 | 18 |
use SL::DB::Part; |
18 | 19 |
use SL::DB::Unit; |
... | ... | |
45 | 46 |
__PACKAGE__->attr_sorted('items'); |
46 | 47 |
|
47 | 48 |
__PACKAGE__->before_save('_before_save_set_donumber'); |
49 |
__PACKAGE__->after_save('_after_save_link_records'); |
|
48 | 50 |
|
49 | 51 |
# hooks |
50 | 52 |
|
... | ... | |
56 | 58 |
return 1; |
57 | 59 |
} |
58 | 60 |
|
61 |
sub _after_save_link_records { |
|
62 |
my ($self) = @_; |
|
63 |
|
|
64 |
my @allowed_record_sources = qw(SL::DB::Reclamation SL::DB::Order); |
|
65 |
my @allowed_item_sources = qw(SL::DB::ReclamationItem SL::DB::OrderItem); |
|
66 |
|
|
67 |
SL::DB::Helper::RecordLink::link_records( |
|
68 |
$self, |
|
69 |
\@allowed_record_sources, |
|
70 |
\@allowed_item_sources, |
|
71 |
close_source_quotations => 1, |
|
72 |
); |
|
73 |
} |
|
74 |
|
|
59 | 75 |
# methods |
60 | 76 |
|
61 | 77 |
sub items { goto &orderitems; } |
Auch abrufbar als: Unified diff
RecordLink: post save hook für alle Hauptbelege