Revision 7e7a1369
Von Sven Schöling vor mehr als 12 Jahren hinzugefügt
SL/IS.pm | ||
---|---|---|
40 | 40 |
use SL::ARAP; |
41 | 41 |
use SL::CVar; |
42 | 42 |
use SL::Common; |
43 |
use SL::DATEV qw(:CONSTANTS); |
|
43 | 44 |
use SL::DBUtils; |
44 | 45 |
use SL::DO; |
45 | 46 |
use SL::GenericTranslations; |
... | ... | |
1080 | 1081 |
'arap_id' => $form->{id}, |
1081 | 1082 |
'table' => 'ar',); |
1082 | 1083 |
|
1084 |
# safety check datev export |
|
1085 |
if ($::lx_office_conf{datev_check}{check_on_sales_invoice}) { |
|
1086 |
my $transdate = $::form->{invdate} ? DateTime->from_lxoffice($::form->{invdate}) : undef; |
|
1087 |
$transdate ||= DateTime->today; |
|
1088 |
|
|
1089 |
my $datev = SL::DATEV->new( |
|
1090 |
exporttype => DATEV_ET_BUCHUNGEN, |
|
1091 |
format => DATEV_FORMAT_KNE, |
|
1092 |
dbh => $dbh, |
|
1093 |
from => $transdate, |
|
1094 |
to => $transdate, |
|
1095 |
); |
|
1096 |
|
|
1097 |
$datev->export; |
|
1098 |
|
|
1099 |
if ($datev->errors) { |
|
1100 |
$dbh->rollback; |
|
1101 |
die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors; |
|
1102 |
} |
|
1103 |
} |
|
1104 |
|
|
1083 | 1105 |
my $rc = 1; |
1084 | 1106 |
$dbh->commit if !$provided_dbh; |
1085 | 1107 |
|
Auch abrufbar als: Unified diff
DATEV check in die 5 haupt buchungsmasken verlinkt