
| Current Path : /var/www/web-klick.de/dsh/90_akt/b2/2011/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/web-klick.de/dsh/90_akt/b2/2011/bilanz |
my $file = shift || "bilanz.txt"; $file =~ s/^(.*)\.(.*)$/$1/;
system('grep -e \'^(57-|)(\d\d-X?\d\d\d\d .*\.\d\d *$|$|\d\d .*\.\d\d *$|\S+$)\' -P gmbh* > bilanz.txt');
open(FFILE,"<bilanz.txt");
my $text = [<FFILE>];
close(FFILE);
while (0 == 0) {
$text1 = [@$text];
$bed = 0;
foreach $o (@$text1) {
next if ($o !~ /\S/);
next if ($o =~ s/^(\S+)( )( )(.*)$/$1$2$4/s);
$bed = 1;
last;
}
last if ($bed);
$text = [@$text1];
}
while (0 == 0) {
$text1 = [@$text];
$bed = 0;
foreach $o (@$text1) {
next if ($o !~ /^\S+ +\S+ +\S+/);
next if ($o =~ s/^(\S+ +\S+)( )( )(.*)$/$1$2$4/s);
$bed = 1;
last;
}
last if ($bed);
$text = [@$text1];
}
$text = join("",@$text);
$text =~ s/(Endbestand +)( )(\S)/$1\-$3/;
$text =~ s/\-\-/ /;
print $text;
$text =~ s/^(.*?\n)(13|57)( .*)$/$1----$2$3/s;
while ($text =~ /^(.*)----(.*)$/s) { $text = $1 . "\f\n" . $2; }
$text =~ s/^(.*)(\n12 )(.*)$/$1\n\n\n\nGewinn- und Verlustrechnung:\n\n$2$3/s;
$text =~ s/^(.*?\n)20 .*$/$1/s;
`ls gmbh*` =~ /(\d\d\d\d)/;
open(FFILE,">$file.txt");
print FFILE "JAHRESBILANZ IFT INFORMATIK GMBH $1\n-------------------------------------\n" .
"Bestand:\n" . $text;
close(FFILE);
system("a2ps -B -1 -l 80 -o $file.ps $file.txt");
system("ps2pdf $file.ps");
unlink("$file.ps");