Revision 7e7a1369
Von Sven Schöling vor mehr als 12 Jahren hinzugefügt
SL/AR.pm | ||
---|---|---|
35 | 35 |
package AR; |
36 | 36 |
|
37 | 37 |
use Data::Dumper; |
38 |
use SL::DATEV qw(:CONSTANTS); |
|
38 | 39 |
use SL::DBUtils; |
39 | 40 |
use SL::IO; |
40 | 41 |
use SL::MoreCommon; |
... | ... | |
273 | 274 |
|
274 | 275 |
IO->set_datepaid(table => 'ar', id => $form->{id}, dbh => $dbh); |
275 | 276 |
|
277 |
# safety check datev export |
|
278 |
if ($::lx_office_conf{datev_check}{check_on_ar_transaction}) { |
|
279 |
my $transdate = $::form->{transdate} ? DateTime->from_lxoffice($::form->{transdate}) : undef; |
|
280 |
$transdate ||= DateTime->today; |
|
281 |
|
|
282 |
my $datev = SL::DATEV->new( |
|
283 |
exporttype => DATEV_ET_BUCHUNGEN, |
|
284 |
format => DATEV_FORMAT_KNE, |
|
285 |
dbh => $dbh, |
|
286 |
from => $transdate, |
|
287 |
to => $transdate, |
|
288 |
); |
|
289 |
|
|
290 |
$datev->export; |
|
291 |
|
|
292 |
if ($datev->errors) { |
|
293 |
$dbh->rollback; |
|
294 |
die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors; |
|
295 |
} |
|
296 |
} |
|
297 |
|
|
276 | 298 |
my $rc = 1; |
277 | 299 |
if (!$provided_dbh) { |
278 | 300 |
$rc = $dbh->commit(); |
Auch abrufbar als: Unified diff
DATEV check in die 5 haupt buchungsmasken verlinkt