Revision 916ec1da
Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt
SL/DB/InvoiceItem.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
|
5 | 5 |
use SL::DB::MetaSetup::InvoiceItem; |
6 |
use SL::DB::Manager::InvoiceItem; |
|
6 | 7 |
use SL::DB::Helper::ActsAsList; |
7 | 8 |
use SL::DB::Helper::LinkedRecords; |
8 | 9 |
use SL::DB::Helper::RecordItem; |
... | ... | |
17 | 18 |
}, |
18 | 19 |
); |
19 | 20 |
|
20 |
__PACKAGE__->meta->make_manager_class; |
|
21 |
|
|
22 | 21 |
__PACKAGE__->configure_acts_as_list(group_by => [qw(trans_id)]); |
23 | 22 |
|
24 | 23 |
__PACKAGE__->meta->add_relationships( |
SL/DB/Manager/InvoiceItem.pm | ||
---|---|---|
1 |
package SL::DB::Manager::InvoiceItem; |
|
2 |
|
|
3 |
use strict; |
|
4 |
|
|
5 |
use parent qw(SL::DB::Helper::Manager); |
|
6 |
|
|
7 |
use SL::DB::Helper::Sorted; |
|
8 |
|
|
9 |
sub object_class { 'SL::DB::InvoiceItem' } |
|
10 |
|
|
11 |
__PACKAGE__->make_manager_methods; |
|
12 |
|
|
13 |
sub _sort_spec { |
|
14 |
return ( columns => { position => [ 'trans_id', 'position' ], }, |
|
15 |
default => [ 'position', 1 ], |
|
16 |
nulls => { } |
|
17 |
); |
|
18 |
} |
|
19 |
|
|
20 |
1; |
|
21 |
|
|
22 |
__END__ |
|
23 |
|
|
24 |
=pod |
|
25 |
|
|
26 |
=encoding utf8 |
|
27 |
|
|
28 |
=head1 NAME |
|
29 |
|
|
30 |
SL::DB::Manager::InvoiceItem - Manager for models for the |
|
31 |
'invoice' table |
|
32 |
|
|
33 |
=head1 SYNOPSIS |
|
34 |
|
|
35 |
This is a standard Rose::DB::Manager based model manager and can be |
|
36 |
used as such. |
|
37 |
|
|
38 |
=head1 FUNCTIONS |
|
39 |
|
|
40 |
None yet. |
|
41 |
|
|
42 |
=head1 BUGS |
|
43 |
|
|
44 |
Nothing here yet. |
|
45 |
|
|
46 |
=head1 AUTHOR |
|
47 |
|
|
48 |
Bernd Bleßmann E<lt>bernd@kivitendo-premium.deE<gt> |
|
49 |
|
|
50 |
=cut |
Auch abrufbar als: Unified diff
InvoiceItem: Rose-Manager-Klasse wg. Sorted-Helper