Revision 821cc706
Von Jan Büren vor etwa 7 Jahren hinzugefügt
SL/DATEV.pm | ||
---|---|---|
377 | 377 |
return if $self->errors; |
378 | 378 |
my $datev_ref; |
379 | 379 |
($datev_ref, $self->{warnings}) = SL::DATEV::CSV->new(datev_lines => $self->generate_datev_lines, |
380 |
from => $self->from, |
|
381 |
to => $self->to, |
|
382 |
locked => $self->locked, |
|
383 |
); |
|
380 |
from => $self->from,
|
|
381 |
to => $self->to,
|
|
382 |
locked => $self->locked,
|
|
383 |
);
|
|
384 | 384 |
|
385 | 385 |
my $filename = "EXTF_DATEV_kivitendo" . $self->from->ymd() . '-' . $self->to->ymd() . ".csv"; |
386 | 386 |
|
... | ... | |
1405 | 1405 |
sub check_vcnumbers_are_valid_pk_numbers { |
1406 | 1406 |
my ($self) = @_; |
1407 | 1407 |
|
1408 |
# better use a class variable and set this in sub new (also needed in DATEV::CSV) |
|
1409 |
# calculation is also a bit more sane in sub check_valid_length_of_accounts |
|
1408 | 1410 |
my $length_of_accounts = length(SL::DB::Manager::Chart->get_first(where => [charttype => 'A'])->accno) // 4; |
1409 | 1411 |
my $pk_length = $length_of_accounts + 1; |
1410 | 1412 |
my $query = <<"SQL"; |
... | ... | |
1426 | 1428 |
SQL |
1427 | 1429 |
|
1428 | 1430 |
my $accno_length = selectall_hashref_query($::form, SL::DB->client->dbh, $query); |
1429 |
if (1 < keys $accno_length) {
|
|
1431 |
if (1 < scalar @$accno_length) {
|
|
1430 | 1432 |
$::form->error(t8("Invalid combination of ledger account number length." . |
1431 | 1433 |
" Mismatch length of #1 with length of #2. Please check your account settings. ", |
1432 | 1434 |
$accno_length->[0]->{char_length}, $accno_length->[1]->{char_length})); |
Auch abrufbar als: Unified diff
DATEV: Unsaubere if-Bedingung optimiert
+ Kosmetik