Revision b3db3071
Von Stephan Köhler vor etwa 19 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
596 | 596 |
# Some variables used for page breaks |
597 | 597 |
my ($chars_per_line, $lines_on_first_page, $lines_on_second_page) = |
598 | 598 |
(0, 0, 0); |
599 |
my ($current_page, $current_line) = (1, 1);
|
|
599 |
my ($current_page, $current_line, $current_row) = (1, 1, 0);
|
|
600 | 600 |
my $pagebreak = ""; |
601 | 601 |
my $sum = 0; |
602 | 602 |
|
... | ... | |
700 | 700 |
$lpp = $lines_on_second_page; |
701 | 701 |
} |
702 | 702 |
|
703 |
# Yes we need a manual page break |
|
704 |
if (($current_line + $lines) > $lpp) { |
|
703 |
# Yes we need a manual page break -- or the user has forced one |
|
704 |
if ((($current_line + $lines) > $lpp) || |
|
705 |
($self->{"_forced_pagebreaks"} && grep(/^${current_row}$/, @{$self->{"_forced_pagebreaks"}}))) { |
|
705 | 706 |
my $pb = $pagebreak; |
706 | 707 |
|
707 | 708 |
# replace the special variables <%sumcarriedforward%> |
... | ... | |
722 | 723 |
$current_line = 1; |
723 | 724 |
} |
724 | 725 |
$current_line += $lines; |
726 |
$current_row++; |
|
725 | 727 |
} |
726 | 728 |
$sum += $self->parse_amount($myconfig, $self->{"linetotal"}[$i]); |
727 | 729 |
|
... | ... | |
987 | 989 |
|
988 | 990 |
%unique_fields = map({ $_ => 1 } @fields); |
989 | 991 |
@fields = keys(%unique_fields); |
992 |
|
|
993 |
foreach my $field (@fields) { |
|
994 |
next unless ($self->{$field} =~ /\<pagebreak\>/); |
|
995 |
$self->{$field} =~ s/\<pagebreak\>//g; |
|
996 |
if ($field =~ /.*_(\d+)$/) { |
|
997 |
if ($self->{"_forced_pagebreaks"}) { |
|
998 |
$self->{"_forced_pagebreaks"} = []; |
|
999 |
} |
|
1000 |
push(@{ $self->{"_forced_pagebreaks"} }, "$1"); |
|
1001 |
} |
|
1002 |
} |
|
1003 |
|
|
990 | 1004 |
my $format = $self->{format}; |
991 | 1005 |
if ($self->{format} =~ /(postscript|pdf)/) { |
992 | 1006 |
$format = 'tex'; |
Auch abrufbar als: Unified diff
Merge von 596 aus unstable:
Mehr Markup: Wenn in einer Rechnungszeile "<pagebreak>" auftaucht, so wird es aus dem Text entfernt, und bei LaTeX-Ausgabe wird nach der Z
eile ein Seitenumbruch erzwungen.