POD zu update_attributes ergänzt
[kivitendo-erp.git] / SL / DB / Manager / Project.pm
index 6c5563f..2cc50f2 100644 (file)
@@ -27,9 +27,13 @@ __PACKAGE__->add_filter_specs(
   },
   status => sub {
     my ($key, $value, $prefix) = @_;
-    return () if $value eq 'all';
+    return () if $value ne 'orphaned';
     return __PACKAGE__->is_not_used_filter($prefix);
   },
+  all => sub {
+    my ($key, $value, $prefix) = @_;
+    return or => [ map { $prefix . $_ => $value } qw(projectnumber description customer.name) ]
+  }
 );
 
 our %project_id_column_prefixes = (
@@ -43,10 +47,13 @@ our @tables_with_project_id_cols = qw(acc_trans ap ar delivery_order_items deliv
 
 sub _sort_spec {
   return (
-    default    => [ 'projectnumber', 1 ],
-    columns    => {
-      SIMPLE   => 'ALL',
-      customer => 'customer.name',
+    default        => [ 'projectnumber', 1 ],
+    columns        => {
+      SIMPLE       => 'ALL',
+      customer     => 'customer.name',
+      project_type => 'project_type.description',
+      project_status => 'project_status.description',
+      customer_and_description => [ qw(customer.name project.description) ],
     });
 }