Revision 0a64ac3d
Von Kivitendo Admin vor etwa 7 Jahren hinzugefügt
SL/IR.pm | ||
---|---|---|
817 | 817 |
|
818 | 818 |
# safety check datev export |
819 | 819 |
if ($::instance_conf->get_datev_check_on_purchase_invoice) { |
820 |
# if we need department for kostenstelle in DATEV check |
|
821 |
$form->{department} = SL::DB::Manager::Department->find_by(id => $form->{department_id})->description if $form->{department_id}; |
|
822 |
my $transdate = $::form->{invdate} ? DateTime->from_lxoffice($::form->{invdate}) : undef; |
|
823 |
$transdate ||= DateTime->today; |
|
824 | 820 |
|
825 | 821 |
my $datev = SL::DATEV->new( |
826 |
exporttype => DATEV_ET_BUCHUNGEN, |
|
827 |
format => DATEV_FORMAT_KNE, |
|
828 | 822 |
dbh => $dbh, |
829 | 823 |
trans_id => $form->{id}, |
830 | 824 |
); |
831 | 825 |
|
832 |
$datev->export;
|
|
826 |
$datev->generate_datev_data;
|
|
833 | 827 |
|
834 | 828 |
if ($datev->errors) { |
835 | 829 |
die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors; |
Auch abrufbar als: Unified diff
DATEV-Checks beim Buchen nutzen nun generate_datev_data