Verkauf->Berichte->Aufträge: Abteilung im Bericht
authorG. Richardson <information@kivitendo-premium.de>
Wed, 14 Sep 2016 12:37:24 +0000 (14:37 +0200)
committerG. Richardson <information@kivitendo-premium.de>
Wed, 14 Sep 2016 12:37:24 +0000 (14:37 +0200)
wenn nach Abteilung gefiltert wird den Namen der Abteilung oben angeben.

bin/mozilla/oe.pl

index 4753a71..4451e34 100644 (file)
@@ -986,6 +986,13 @@ sub orders {
   push @options, $locale->text('Vendor')                  . " : $form->{vendor}"                          if $form->{vendor};
   push @options, $locale->text('Contact Person')          . " : $form->{cp_name}"                         if $form->{cp_name};
   push @options, $locale->text('Department')              . " : $department"                              if $form->{department};
+  if ($form->{department_id}) {
+    unless ($form->{department}) {
+      require SL::DB::Department;
+      my $department = SL::DB::Manager::Department->find_by(id => $::form->{department_id});
+      push @options, $locale->text('Department') . " : " . $department->description if $department;
+    }
+  }
   push @options, $locale->text('Order Number')            . " : $form->{ordnumber}"                       if $form->{ordnumber};
   push @options, $locale->text('Customer Order Number')   . " : $form->{cusordnumber}"                    if $form->{cusordnumber};
   push @options, $locale->text('Notes')                   . " : $form->{notes}"                           if $form->{notes};