Lohnbuchhaltungsimport: Leere Werte für Abteilungen abfangen
authorJan Büren <jan@kivitendo.de>
Fri, 10 Dec 2021 13:49:46 +0000 (14:49 +0100)
committerJan Büren <jan@kivitendo.de>
Fri, 10 Dec 2021 13:49:46 +0000 (14:49 +0100)
SL/Controller/PayPostingImport.pm

index 6d9fd2a..a2d103f 100644 (file)
@@ -81,7 +81,9 @@ sub parse_and_import {
 
       # optional KOST1 - KOST2 ?
       $department_name = $row->[36];
-      $department    = SL::DB::Manager::Department->get_first(description => { like =>  $department_name . '%' });
+      if ($department_name) {
+        $department    = SL::DB::Manager::Department->get_first(description => { like =>  $department_name . '%' });
+      }
 
       my $amount = $::form->parse_amount({ numberformat => '1000,00' }, $row->[0]);