epic-s6g
[kivitendo-erp.git] / SL / DB / Manager / AccTransaction.pm
1 package SL::DB::Manager::AccTransaction;
2
3 use strict;
4
5 use SL::DB::Helper::Manager;
6 use base qw(SL::DB::Helper::Manager);
7
8 use SL::DB::Helper::Sorted;
9 use SL::DBUtils;
10
11 sub object_class { 'SL::DB::AccTransaction' }
12
13 __PACKAGE__->make_manager_methods;
14
15 sub chart_link_filter {
16   my ($class, $link) = @_;
17
18   return (or => [ chart_link => $link,
19                   chart_link => { like => "${link}:\%"    },
20                   chart_link => { like => "\%:${link}"    },
21                   chart_link => { like => "\%:${link}:\%" } ]);
22 }
23
24 1;
25
26 __END__
27
28 =pod
29
30 =encoding utf8
31
32 =head1 NAME
33
34 SL::DB::Manager::AccTransaction - Manager class for the model for the C<acc_trans> table
35
36 =head1 FUNCTIONS
37
38 =over 4
39
40 =item C<chart_link_filter $link>
41
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>'.
47
48 The code and functionality was copied from the function link_filter in
49 SL::DB::Manager::Chart.
50
51 =back
52
53 =head1 BUGS
54
55 Nothing here yet.
56
57 =head1 AUTHOR
58
59 G. Richardson E<lt>grichardson@kivitendo-premium.de<gt>
60
61 =cut