Allow for parsing currency without a currency sign in front

This commit is contained in:
Thomas Bloor 2018-03-21 17:24:55 +00:00
parent 2b5bb9cd8c
commit 2286e54104
No known key found for this signature in database
GPG key ID: 4657C7EBE42CC5CC

View file

@ -9,6 +9,8 @@ sub register {
my $value;
if ( $currency_string =~ /^£([\d.]+)/ ) {
$value = $1 * 1;
} elsif ( $currency_string =~ /^([\d.]+)/ ) {
$value = $1 * 1;
}
return $value;
});