Revision f85f858c
Von Jan Büren vor fast 3 Jahren hinzugefügt
SL/Controller/PayPostingImport.pm | ||
---|---|---|
82 | 82 |
# optional KOST1 - KOST2 ? |
83 | 83 |
$department_name = $row->[36]; |
84 | 84 |
if ($department_name) { |
85 |
$department = SL::DB::Manager::Department->get_first(description => { like => $department_name . '%' });
|
|
85 |
$department = SL::DB::Manager::Department->get_first(where => [ description => { ilike => $department_name . '%' } ]);
|
|
86 | 86 |
} |
87 | 87 |
|
88 | 88 |
my $amount = $::form->parse_amount({ numberformat => '1000,00' }, $row->[0]); |
t/pay_posting_import/datev_import.t | ||
---|---|---|
50 | 50 |
} |
51 | 51 |
|
52 | 52 |
# and add department (KOST1 description) |
53 |
SL::DB::Department->new( |
|
54 |
description => 'Total falsche Abteilung, niemals zuordnen!' |
|
55 |
)->save; |
|
56 |
|
|
57 |
SL::DB::Department->new( |
|
58 |
description => '2. Total falsche Abteilung, niemals zuordnen!' |
|
59 |
)->save; |
|
60 |
|
|
61 |
SL::DB::Department->new( |
|
62 |
description => '3. Total falsche Abteilung, niemals zuordnen!' |
|
63 |
)->save; |
|
64 |
|
|
65 |
SL::DB::Department->new( |
|
66 |
description => 'annahme stelle. Total falsche Abteilung, niemals zuordnen!' |
|
67 |
)->save; |
|
68 |
|
|
69 |
|
|
53 | 70 |
SL::DB::Department->new( |
54 | 71 |
description => 'Wisavis' |
55 | 72 |
)->save; |
... | ... | |
73 | 90 |
|
74 | 91 |
# gl |
75 | 92 |
is ($current_row->[13], $booking->reference, "Buchungstext correct"); |
76 |
if (ref $booking->department eq 'SL::DB::Department') { |
|
93 |
if ($current_row->[36] eq 'wisavis') { |
|
94 |
is(ref $booking->department eq 'SL::DB::Department', 1, "Department assigned"); |
|
77 | 95 |
is ($current_row->[36], 'wisavis', "Department correctly assigned"); # lowercase |
78 | 96 |
is ('Wisavis', $booking->department->description, "Department correctly assigned"); # upper case |
79 | 97 |
} else { |
Auch abrufbar als: Unified diff
Abteilung bei Lohnbuchhaltung zuordnen, get_first mit richtigen Parameteraufruf