my $path;
if ($token =~ m|^(\d+)-(\d+)-(\d+)$|) {
- $path = "${main::userspath}/datev-export-${1}-${2}-${3}";
+ $path = $::lx_office_conf{paths}->{userspath} . "/datev-export-${1}-${2}-${3}";
}
$main::lxdebug->leave_sub();
sub clean_temporary_directories {
$main::lxdebug->enter_sub();
- foreach my $path (glob "${main::userspath}/datev-export-*") {
+ foreach my $path (glob($::lx_office_conf{paths}->{userspath} . "/datev-export-*")) {
next unless (-d $path);
my $mtime = (stat($path))[9];
ORDER BY trans_id, acc_trans_id|;
my $sth = prepare_execute_query($form, $dbh, $query);
+ $form->{DATEV} = [];
my $counter = 0;
while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
my $count = $ref->{amount};
my $firstrun = 1;
+ my $subcent = abs($count) < 0.02;
- while (abs($count) > 0.01 || $firstrun) {
+ while (abs($count) > 0.01 || $firstrun || ($subcent && abs($count) > 0.005)) {
my $ref2 = $sth->fetchrow_hashref("NAME_lc");
last unless ($ref2);