Revision 502a10d4
Von Moritz Bunkus vor etwa 3 Jahren hinzugefügt
SL/Controller/BankImport.pm | ||
---|---|---|
16 | 16 |
|
17 | 17 |
use Rose::Object::MakeMethods::Generic |
18 | 18 |
( |
19 |
scalar => [ qw(file_name transactions statistics) ], |
|
19 |
scalar => [ qw(file_name transactions statistics charset) ],
|
|
20 | 20 |
'scalar --get_set_init' => [ qw(bank_accounts) ], |
21 | 21 |
); |
22 | 22 |
|
... | ... | |
43 | 43 |
$file->fh->print($::form->{file}); |
44 | 44 |
$file->fh->close; |
45 | 45 |
|
46 |
$self->charset($::form->{charset}); |
|
46 | 47 |
$self->file_name($file->file_name); |
47 | 48 |
$self->parse_and_analyze_transactions; |
48 | 49 |
|
... | ... | |
56 | 57 |
die "missing file for action import_mt940" unless $::form->{file_name}; |
57 | 58 |
|
58 | 59 |
$self->file_name($::form->{file_name}); |
60 |
$self->charset($::form->{charset}); |
|
59 | 61 |
$self->parse_and_analyze_transactions; |
60 | 62 |
$self->import_transactions; |
61 | 63 |
|
... | ... | |
71 | 73 |
|
72 | 74 |
my $currency_id = SL::DB::Default->get->currency_id; |
73 | 75 |
|
74 |
$self->transactions([ sort { $a->{transdate} cmp $b->{transdate} } SL::MT940->parse($self->file_name) ]); |
|
76 |
$self->transactions([ sort { $a->{transdate} cmp $b->{transdate} } SL::MT940->parse($self->file_name, charset => $self->charset) ]);
|
|
75 | 77 |
|
76 | 78 |
foreach my $transaction (@{ $self->transactions }) { |
77 | 79 |
$transaction->{bank_account} = $self->bank_accounts->{ make_bank_account_idx($transaction->{local_bank_code}, $transaction->{local_account_number}) }; |
Auch abrufbar als: Unified diff
MT940: Zeichensatz der Datei bei Import auswählen können