Revision 7e7a1369
Von Sven Schöling vor mehr als 12 Jahren hinzugefügt
SL/IR.pm | ||
---|---|---|
38 | 38 |
use SL::ARAP; |
39 | 39 |
use SL::Common; |
40 | 40 |
use SL::CVar; |
41 |
use SL::DATEV qw(:CONSTANTS); |
|
41 | 42 |
use SL::DBUtils; |
42 | 43 |
use SL::DO; |
43 | 44 |
use SL::GenericTranslations; |
... | ... | |
683 | 684 |
'arap_id' => $form->{id}, |
684 | 685 |
'table' => 'ap',); |
685 | 686 |
|
687 |
# safety check datev export |
|
688 |
if ($::lx_office_conf{datev_check}{check_on_purchase_invoice}) { |
|
689 |
my $transdate = $::form->{invdate} ? DateTime->from_lxoffice($::form->{invdate}) : undef; |
|
690 |
$transdate ||= DateTime->today; |
|
691 |
|
|
692 |
my $datev = SL::DATEV->new( |
|
693 |
exporttype => DATEV_ET_BUCHUNGEN, |
|
694 |
format => DATEV_FORMAT_KNE, |
|
695 |
dbh => $dbh, |
|
696 |
from => $transdate, |
|
697 |
to => $transdate, |
|
698 |
); |
|
699 |
|
|
700 |
$datev->export; |
|
701 |
|
|
702 |
if ($datev->errors) { |
|
703 |
$dbh->rollback; |
|
704 |
die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors; |
|
705 |
} |
|
706 |
} |
|
707 |
|
|
686 | 708 |
my $rc = 1; |
687 | 709 |
if (!$provided_dbh) { |
688 | 710 |
$rc = $dbh->commit(); |
Auch abrufbar als: Unified diff
DATEV check in die 5 haupt buchungsmasken verlinkt