sub _make_by_type {
my ($package, $name, $type) = @_;
_as_number ($package, $name, places => -2) if $type =~ /numeric | real | float/xi;
- _as_percent($package, $name, places => 0) if $type =~ /numeric | real | float/xi;
+ _as_percent($package, $name, places => 2) if $type =~ /numeric | real | float/xi;
_as_number ($package, $name, places => 0) if $type =~ /int/xi;
_as_date ($package, $name) if $type =~ /date | timestamp/xi;
}
is($o->marge_percent_as_percent('40'), '40');
is($o->marge_percent, 0.40);
is($o->marge_percent_as_percent, '40');
-is($o->marge_percent_as_percent('22,4'), '22');
+is($o->marge_percent_as_percent('22,4'), '22,40');
is($o->marge_percent, 0.224);
is($o->marge_percent_as_percent, '22');
is($o->marge_percent(0.231), 0.231);