Revision 7e7a1369
Von Sven Schöling vor mehr als 12 Jahren hinzugefügt
SL/GL.pm | ||
---|---|---|
39 | 39 |
package GL; |
40 | 40 |
|
41 | 41 |
use Data::Dumper; |
42 |
use SL::DATEV qw(:CONSTANTS); |
|
42 | 43 |
use SL::DBUtils; |
43 | 44 |
|
44 | 45 |
use strict; |
... | ... | |
184 | 185 |
do_query($form, $dbh, qq|UPDATE gl SET storno = 't' WHERE id = ?|, conv_i($form->{storno_id})); |
185 | 186 |
} |
186 | 187 |
|
188 |
# safety check datev export |
|
189 |
if ($::lx_office_conf{datev_check}{check_on_gl_transaction}) { |
|
190 |
my $transdate = $::form->{transdate} ? DateTime->from_lxoffice($::form->{transdate}) : undef; |
|
191 |
$transdate ||= DateTime->today; |
|
192 |
|
|
193 |
my $datev = SL::DATEV->new( |
|
194 |
exporttype => DATEV_ET_BUCHUNGEN, |
|
195 |
format => DATEV_FORMAT_KNE, |
|
196 |
dbh => $dbh, |
|
197 |
from => $transdate, |
|
198 |
to => $transdate, |
|
199 |
); |
|
200 |
|
|
201 |
$datev->export; |
|
202 |
|
|
203 |
if ($datev->errors) { |
|
204 |
$dbh->rollback; |
|
205 |
die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors; |
|
206 |
} |
|
207 |
} |
|
208 |
|
|
187 | 209 |
# commit and redirect |
188 | 210 |
my $rc = $dbh->commit; |
189 | 211 |
$dbh->disconnect; |
Auch abrufbar als: Unified diff
DATEV check in die 5 haupt buchungsmasken verlinkt