Merge branch 'master' of github.com:kivitendo/kivitendo-erp
[kivitendo-erp.git] / SL / DB / Manager / Order.pm
index 69aa266..d844683 100644 (file)
@@ -35,9 +35,16 @@ sub _sort_spec {
     },
     columns                   => {
       SIMPLE                  => 'ALL',
-      customer                => 'customer.name',
-      vendor                  => 'vendor.name',
+      customer                => 'lower(customer.name)',
+      vendor                  => 'lower(vendor.name)',
       globalprojectnumber     => 'lower(globalproject.projectnumber)',
+
+      # Bug in Rose::DB::Object: the next should be
+      # "globalproject.project_type.description". This workaround will
+      # only work if no other table with "project_type" is visible in
+      # the current query
+      globalproject_type      => 'lower(project_type.description)',
+
       map { ( $_ => "lower(oe.$_)" ) } qw(ordnumber quonumber cusordnumber shippingpoint shipvia notes intnotes transaction_description),
     });
 }