Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 2d75060f

Von Sven Schöling vor mehr als 13 Jahren hinzugefügt

  • ID 2d75060f8f44f7be4e65a07cd04b3f1735d9fed7
  • Vorgänger 55049b81
  • Nachfolger 6b378ca7

SL::Form: Zwei Warnings unterdrücken.

Warnungen tauchen auf in format_amount, wenn paramtere $dash fehlte, und wenn
ohne Nachkommastellen formatiert wurde.

Unterschiede anzeigen:

SL/Form.pm
$main::lxdebug->enter_sub(2);
my ($self, $myconfig, $amount, $places, $dash) = @_;
$dash ||= '';
if ($amount eq "") {
$amount = 0;
......
$amount *= 1;
$places *= -1;
my ($actual_places) = ($amount =~ /\.(\d+)/);
$actual_places = length($actual_places);
$places = $actual_places > $places ? $actual_places : $places;
if ($amount =~ /\.(\d+)/) {
my $actual_places = length $1;
$places = $actual_places if $actual_places > $places;
}
}
}
$amount = $self->round_amount($amount, $places);
......
$p[0] =~ s/\B(?=(...)*$)/$d[1]/g if $d[1]; # add 1,000 delimiters
$amount = $p[0];
$amount .= $d[0].$p[1].(0 x ($places - length $p[1])) if ($places || $p[1] ne '');
$amount .= $d[0].($p[1]||'').(0 x ($places - length ($p[1]||''))) if ($places || $p[1] ne '');
$amount = do {
($dash =~ /-/) ? ($neg ? "($amount)" : "$amount" ) :

Auch abrufbar als: Unified diff