]> wagnertech.de Git - mfinanz.git/blobdiff - t/pay_posting_import/datev_import.t
Abteilung bei Lohnbuchhaltung zuordnen, get_first mit richtigen Parameteraufruf
[mfinanz.git] / t / pay_posting_import / datev_import.t
index e11415c8506ea137ef462ee551c17fc9967e08cf..c164046cfd1683a7665388f50b8b0d296a4b7467 100644 (file)
@@ -50,6 +50,23 @@ foreach my $accno (@charts) {
 }
 
 # 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;
@@ -73,7 +90,8 @@ foreach my $booking (@{ $gl_bookings }) {
 
   # 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 {