use parent 'App::HomeBank2Ledger::Formatter';
-our $VERSION = '0.006'; # VERSION
+our $VERSION = '0.007'; # VERSION
my %STATUS_SYMBOLS = (
cleared => '*',
my $format = "\% .$commodity->{frac}f";
my ($whole, $fraction) = split(/\./, sprintf($format, $amount));
+ $fraction ||= 0;
- my $num = join($commodity->{dchar}, commify($whole, $commodity->{gchar}), $fraction);
+ my $num = commify($whole, $commodity->{gchar});
+ if ($commodity->{frac}) {
+ $num .= $commodity->{dchar} . $fraction;
+ }
my $symbol = $commodity->{symbol};
$symbol = $self->_quote_string($symbol) if $symbol =~ /[0-9\s]/;
=head1 VERSION
-version 0.006
+version 0.007
=head1 DESCRIPTION