From d32410ac096b92aa0d2b5085bbc031aea900b096 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Fri, 10 Dec 2021 14:49:46 +0100 Subject: [PATCH] =?utf8?q?Lohnbuchhaltungsimport:=20Leere=20Werte=20f?= =?utf8?q?=C3=BCr=20Abteilungen=20abfangen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/PayPostingImport.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SL/Controller/PayPostingImport.pm b/SL/Controller/PayPostingImport.pm index 6d9fd2ac4..a2d103f2f 100644 --- a/SL/Controller/PayPostingImport.pm +++ b/SL/Controller/PayPostingImport.pm @@ -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]); -- 2.20.1