$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
$blubb{'umsatz'} =
abs($form->round_amount(($i->[$j]->{'amount'} * $test), 2)) * $ml;
$i->[$j]->{'umsatz'} =
abs($form->round_amount(($i->[$j]->{'amount'} * $test), 2)) * $ml;
$blubb{'umsatz'} =
abs($form->round_amount(($i->[$j]->{'amount'} * $test), 2)) * $ml;
$i->[$j]->{'umsatz'} =
abs($form->round_amount(($i->[$j]->{'amount'} * $test), 2)) * $ml;
- #print(STDERR $i->[$j]->{'umsatz'}, " Steuer Umsatz\n");
- #print(STDERR $i->[$j]->{'amount'}, " Steuer Betrag\n");
- #print(STDERR $blubb{'umsatz'}, " Umsatz NOTSPLIT\n");
push @{ $splits[$g] }, \%blubb;
push @{ $splits[$g] }, $i->[$j];
push @{ $form->{DATEV} }, \@{ $splits[$g] };
push @{ $splits[$g] }, \%blubb;
push @{ $splits[$g] }, $i->[$j];
push @{ $form->{DATEV} }, \@{ $splits[$g] };
- my ($fday, $fmonth, $fyear) = split /\./, $from;
+ my ($fday, $fmonth, $fyear) = split(/\./, $from);
- my ($tday, $tmonth, $tyear) = split /\./, $to;
+ my ($tday, $tmonth, $tyear) = split(/\./, $to);
- ($day, $month, $year) = split /\./, $date;
+ ($day, $month, $year) = split(/\./, $date);
$fromto =
&get_dates($form->{zeitraum}, $form->{monat},
$form->{quartal}, $form->{transdatefrom},
$form->{transdateto});
&get_transactions($myconfig, $form, $fromto);
$fromto =
&get_dates($form->{zeitraum}, $form->{monat},
$form->{quartal}, $form->{transdatefrom},
$form->{transdateto});
&get_transactions($myconfig, $form, $fromto);
open(ED, "> $ed_filename") or die "can't open outputfile: $!\n";
$header = &make_kne_data_header($myconfig, $form, $fromto);
$remaining_bytes -= length($header);
while (scalar(@{ $form->{DATEV} }) > 0) {
open(ED, "> $ed_filename") or die "can't open outputfile: $!\n";
$header = &make_kne_data_header($myconfig, $form, $fromto);
$remaining_bytes -= length($header);
while (scalar(@{ $form->{DATEV} }) > 0) {
- $transaction = shift @{ $form->{DATEV} };
- $trans_lines = scalar(@{$transaction});
+ $transaction = shift @{ $form->{DATEV} };
+ $trans_lines = scalar(@{$transaction});
+ $counter++;
+ if (($counter % 500) == 0) {
+ print("$counter ");
+ }
+
- if (abs($transaction->[$i]->{'umsatz'}) > abs($umsatz)) {
- $umsatz = $transaction->[$i]->{'umsatz'};
+ if ($trans_lines == 2) {
+ if (abs($transaction->[$i]->{'amount'}) > abs($umsatz)) {
+ $umsatz = $transaction->[$i]->{'amount'};
+ }
+ } else {
+ if (abs($transaction->[$i]->{'umsatz'}) > abs($umsatz)) {
+ $umsatz = $transaction->[$i]->{'umsatz'};
+ }
# Umwandlung von Umlauten und Sonderzeichen in erlaubte Zeichen bei Textfeldern
foreach $umlaut (keys(%umlaute)) {
# Umwandlung von Umlauten und Sonderzeichen in erlaubte Zeichen bei Textfeldern
foreach $umlaut (keys(%umlaute)) {
$vorzeichen = ($umsatz > 0) ? "+" : "-";
$buchungssatz .= $vorzeichen . &formatumsatz($umsatz, 0);
$remaining_bytes = $total_bytes - length($buchungssatz . $header);
$vorzeichen = ($umsatz > 0) ? "+" : "-";
$buchungssatz .= $vorzeichen . &formatumsatz($umsatz, 0);
$remaining_bytes = $total_bytes - length($buchungssatz . $header);
#Make EV Verwaltungsdatei
$ev_header = &make_ev_header($form, $fileno);
$ev_filename = $export_path . $evfile;
#Make EV Verwaltungsdatei
$ev_header = &make_ev_header($form, $fileno);
$ev_filename = $export_path . $evfile;
my ($myconfig, $form) = @_;
$form->{abrechnungsnr} = "99";
my ($myconfig, $form) = @_;
$form->{abrechnungsnr} = "99";
open(ED, "> $ed_filename") or die "can't open outputfile: $!\n";
$header = &make_kne_data_header($myconfig, $form, "");
$remaining_bytes -= length($header);
open(ED, "> $ed_filename") or die "can't open outputfile: $!\n";
$header = &make_kne_data_header($myconfig, $form, "");
$remaining_bytes -= length($header);
qq|SELECT c.accno, c.description FROM chart c WHERE c.accno >=|
. $dbh->quote($form->{accnofrom}) . qq|
AND c.accno <= |
qq|SELECT c.accno, c.description FROM chart c WHERE c.accno >=|
. $dbh->quote($form->{accnofrom}) . qq|
AND c.accno <= |
$ev_header = &make_ev_header($form, $fileno);
$ev_filename = $export_path . $evfile;
$ev_header = &make_ev_header($form, $fileno);
$ev_filename = $export_path . $evfile;