Revision 7e7a1369
Von Sven Schöling vor mehr als 12 Jahren hinzugefügt
SL/AP.pm | ||
---|---|---|
34 | 34 |
|
35 | 35 |
package AP; |
36 | 36 |
|
37 |
use SL::DATEV qw(:CONSTANTS); |
|
37 | 38 |
use SL::DBUtils; |
38 | 39 |
use SL::IO; |
39 | 40 |
use SL::MoreCommon; |
... | ... | |
353 | 354 |
|
354 | 355 |
IO->set_datepaid(table => 'ap', id => $form->{id}, dbh => $dbh); |
355 | 356 |
|
357 |
# safety check datev export |
|
358 |
if ($::lx_office_conf{datev_check}{check_on_ap_transaction}) { |
|
359 |
my $transdate = $::form->{transdate} ? DateTime->from_lxoffice($::form->{transdate}) : undef; |
|
360 |
$transdate ||= DateTime->today; |
|
361 |
|
|
362 |
my $datev = SL::DATEV->new( |
|
363 |
exporttype => DATEV_ET_BUCHUNGEN, |
|
364 |
format => DATEV_FORMAT_KNE, |
|
365 |
dbh => $dbh, |
|
366 |
from => $transdate, |
|
367 |
to => $transdate, |
|
368 |
); |
|
369 |
|
|
370 |
$datev->export; |
|
371 |
|
|
372 |
if ($datev->errors) { |
|
373 |
$dbh->rollback; |
|
374 |
die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors; |
|
375 |
} |
|
376 |
} |
|
377 |
|
|
356 | 378 |
if (!$provided_dbh) { |
357 | 379 |
$dbh->commit(); |
358 | 380 |
$dbh->disconnect(); |
Auch abrufbar als: Unified diff
DATEV check in die 5 haupt buchungsmasken verlinkt