Revision 37642782
Von Bernd Bleßmann vor etwa 2 Jahren hinzugefügt
SL/Controller/RecordLinks.pm | ||
---|---|---|
157 | 157 |
push @where, ("${vc}.${vc}number" => { ilike => like($::form->{vc_number}) }) if $vc && $::form->{vc_number}; |
158 | 158 |
push @where, ("${vc}.name" => { ilike => like($::form->{vc_name}) }) if $vc && $::form->{vc_name}; |
159 | 159 |
push @where, ($description => { ilike => like($::form->{transaction_description}) }) if $::form->{transaction_description}; |
160 |
push @where, ($project_id => $::form->{globalproject_id}) if $::form->{globalproject_id} && $manager->can($project_id);
|
|
160 |
push @where, ($project_id => $::form->{globalproject_id}) if $::form->{globalproject_id} && $class->can($project_id);
|
|
161 | 161 |
|
162 | 162 |
if ($::form->{number}) { |
163 | 163 |
my $col_type = ref $class->meta->column($number); |
... | ... | |
170 | 170 |
|
171 | 171 |
my @with_objects = (); |
172 | 172 |
push @with_objects, $vc if $vc; |
173 |
push @with_objects, $project if $manager->can($project_id);
|
|
173 |
push @with_objects, $project if $class->can($project_id);
|
|
174 | 174 |
|
175 | 175 |
# show the newest records first (should be better for 80% of the cases TODO sortable click |
176 | 176 |
my $objects = $manager->get_all(where => \@where, with_objects => \@with_objects, sort_by => 'itime', sort_dir => 'ASC'); |
Auch abrufbar als: Unified diff
Verknüpfte Belege: Verknüpfungen hinzufügen: Projektfilter gefixt.