1 package SL::DB::Manager::AccTransaction;
5 use SL::DB::Helper::Manager;
6 use base qw(SL::DB::Helper::Manager);
8 use SL::DB::Helper::Sorted;
11 sub object_class { 'SL::DB::AccTransaction' }
13 __PACKAGE__->make_manager_methods;
15 sub chart_link_filter {
16 my ($class, $link) = @_;
18 return (or => [ chart_link => $link,
19 chart_link => { like => "${link}:\%" },
20 chart_link => { like => "\%:${link}" },
21 chart_link => { like => "\%:${link}:\%" } ]);
34 SL::DB::Manager::AccTransaction - Manager class for the model for the C<acc_trans> table
40 =item C<chart_link_filter $link>
42 Returns a query builder filter that matches acc_trans lines whose 'C<chart_link>'
43 field contains C<$chart_link>. Matching is done so that the exact value of
44 C<$chart_link> matches but not if C<$chart_link> is only a substring of a
45 match. Therefore C<$chart_link = 'AR'> will match the column content 'C<AR>'
46 or 'C<AR_paid:AR>' but not 'C<AR_amount>'.
48 The code and functionality was copied from the function link_filter in
49 SL::DB::Manager::Chart.
59 G. Richardson E<lt>grichardson@kivitendo-premium.de<gt>