Revision 3782216a
Von Moritz Bunkus vor mehr als 13 Jahren hinzugefügt
SL/DB/Helper/Attr.pm | ||
---|---|---|
30 | 30 |
sub _make_by_type { |
31 | 31 |
my ($package, $name, $type) = @_; |
32 | 32 |
_as_number ($package, $name, places => -2) if $type =~ /numeric | real | float/xi; |
33 |
_as_percent($package, $name, places => 0) if $type =~ /numeric | real | float/xi;
|
|
33 |
_as_percent($package, $name, places => 2) if $type =~ /numeric | real | float/xi;
|
|
34 | 34 |
_as_number ($package, $name, places => 0) if $type =~ /int/xi; |
35 | 35 |
_as_date ($package, $name) if $type =~ /date | timestamp/xi; |
36 | 36 |
} |
Auch abrufbar als: Unified diff
_as_percent-Helper: Zwei Nachkommastellen anzeigen