Revision fbc3a232
Von Moritz Bunkus vor mehr als 15 Jahren hinzugefügt
SL/Template.pm | ||
---|---|---|
174 | 174 |
my ($current_line, $corrent_row) = (0, 1); |
175 | 175 |
my $description_array = $self->_get_loop_variable("description", 1); |
176 | 176 |
my $longdescription_array = $self->_get_loop_variable("longdescription", 1); |
177 |
my $linetotal_array = $self->_get_loop_variable("linetotal", 1); |
|
178 |
|
|
179 |
$form->{TEMPLATE_ARRAYS}->{cumulatelinetotal} = []; |
|
177 | 180 |
|
178 | 181 |
for (my $i = 0; $i < scalar(@{$ary}); $i++) { |
179 | 182 |
$form->{"__first__"} = $i == 1; |
... | ... | |
219 | 222 |
} |
220 | 223 |
$current_line += $lines; |
221 | 224 |
} |
222 |
if ($i < scalar(@{$form->{"linetotal"}})) { |
|
223 |
$sum += $form->parse_amount($self->{"myconfig"},
|
|
224 |
$form->{"linetotal"}->[$i]);
|
|
225 |
|
|
226 |
if ($i < scalar(@{$linetotal_array})) {
|
|
227 |
$sum += $form->parse_amount($self->{"myconfig"}, $linetotal_array->[$i]);
|
|
225 | 228 |
} |
226 | 229 |
|
227 |
$form->{"cumulatelinetotal"}[$i] = $form->format_amount($self->{"myconfig"}, $sum, 2);
|
|
230 |
$form->{TEMPLATE_ARRAYS}->{cumulatelinetotal}->[$i] = $form->format_amount($self->{"myconfig"}, $sum, 2);
|
|
228 | 231 |
|
229 | 232 |
my $new_text = $self->parse_block($text, (@indices, $i)); |
230 | 233 |
return undef unless (defined($new_text)); |
Auch abrufbar als: Unified diff
Auch das Array "linetotal" liegt in TEMPLATE_ARRAYS.
Wird für die Berechnung der Zwischensummenvariablen
"sumcarriedforward" benutzt. Zusätzlich sollte die Variable
"cumulatelinetotal" ebenfalls in TEMPLATE_ARRAYS liegen.
Weiterer Teil des Fixes für Bug 1019.