# optional KOST1 - KOST2 ?
$department_name = $row->[36];
if ($department_name) {
- $department = SL::DB::Manager::Department->get_first(description => { like => $department_name . '%' });
+ $department = SL::DB::Manager::Department->get_first(where => [ description => { ilike => $department_name . '%' } ]);
}
my $amount = $::form->parse_amount({ numberformat => '1000,00' }, $row->[0]);
}
# and add department (KOST1 description)
+ SL::DB::Department->new(
+ description => 'Total falsche Abteilung, niemals zuordnen!'
+ )->save;
+
+ SL::DB::Department->new(
+ description => '2. Total falsche Abteilung, niemals zuordnen!'
+ )->save;
+
+ SL::DB::Department->new(
+ description => '3. Total falsche Abteilung, niemals zuordnen!'
+ )->save;
+
+ SL::DB::Department->new(
+ description => 'annahme stelle. Total falsche Abteilung, niemals zuordnen!'
+ )->save;
+
+
SL::DB::Department->new(
description => 'Wisavis'
)->save;
# gl
is ($current_row->[13], $booking->reference, "Buchungstext correct");
- if (ref $booking->department eq 'SL::DB::Department') {
+ if ($current_row->[36] eq 'wisavis') {
+ is(ref $booking->department eq 'SL::DB::Department', 1, "Department assigned");
is ($current_row->[36], 'wisavis', "Department correctly assigned"); # lowercase
is ('Wisavis', $booking->department->description, "Department correctly assigned"); # upper case
} else {