Revision history for App-HomeBank2Ledger.
+0.007 2019-12-29 14:27:52-07:00 MST7MDT
+ * Fix problem when formatting non-fraction amounts.
+
0.006 2019-09-02 20:02:53-06:00 MST7MDT
* Add fatpack release.
"provides" : {
"App::HomeBank2Ledger" : {
"file" : "lib/App/HomeBank2Ledger.pm",
- "version" : "0.006"
+ "version" : "0.007"
},
"App::HomeBank2Ledger::Formatter" : {
"file" : "lib/App/HomeBank2Ledger/Formatter.pm",
- "version" : "0.006"
+ "version" : "0.007"
},
"App::HomeBank2Ledger::Formatter::Beancount" : {
"file" : "lib/App/HomeBank2Ledger/Formatter/Beancount.pm",
- "version" : "0.006"
+ "version" : "0.007"
},
"App::HomeBank2Ledger::Formatter::Ledger" : {
"file" : "lib/App/HomeBank2Ledger/Formatter/Ledger.pm",
- "version" : "0.006"
+ "version" : "0.007"
},
"App::HomeBank2Ledger::Ledger" : {
"file" : "lib/App/HomeBank2Ledger/Ledger.pm",
- "version" : "0.006"
+ "version" : "0.007"
},
"App::HomeBank2Ledger::Util" : {
"file" : "lib/App/HomeBank2Ledger/Util.pm",
- "version" : "0.006"
+ "version" : "0.007"
},
"File::HomeBank" : {
"file" : "lib/File/HomeBank.pm",
- "version" : "0.006"
+ "version" : "0.007"
}
},
"release_status" : "stable",
"web" : "https://github.com/chazmcgarvey/homebank2ledger"
}
},
- "version" : "0.006",
+ "version" : "0.007",
"x_authority" : "cpan:CCM",
"x_generated_by_perl" : "v5.28.0",
- "x_serialization_backend" : "Cpanel::JSON::XS version 4.08"
+ "x_serialization_backend" : "Cpanel::JSON::XS version 4.15"
}
provides:
App::HomeBank2Ledger:
file: lib/App/HomeBank2Ledger.pm
- version: '0.006'
+ version: '0.007'
App::HomeBank2Ledger::Formatter:
file: lib/App/HomeBank2Ledger/Formatter.pm
- version: '0.006'
+ version: '0.007'
App::HomeBank2Ledger::Formatter::Beancount:
file: lib/App/HomeBank2Ledger/Formatter/Beancount.pm
- version: '0.006'
+ version: '0.007'
App::HomeBank2Ledger::Formatter::Ledger:
file: lib/App/HomeBank2Ledger/Formatter/Ledger.pm
- version: '0.006'
+ version: '0.007'
App::HomeBank2Ledger::Ledger:
file: lib/App/HomeBank2Ledger/Ledger.pm
- version: '0.006'
+ version: '0.007'
App::HomeBank2Ledger::Util:
file: lib/App/HomeBank2Ledger/Util.pm
- version: '0.006'
+ version: '0.007'
File::HomeBank:
file: lib/File/HomeBank.pm
- version: '0.006'
+ version: '0.007'
requires:
Carp: '0'
Exporter: '0'
bugtracker: https://github.com/chazmcgarvey/homebank2ledger/issues
homepage: https://github.com/chazmcgarvey/homebank2ledger
repository: https://github.com/chazmcgarvey/homebank2ledger.git
-version: '0.006'
+version: '0.007'
x_authority: cpan:CCM
x_generated_by_perl: v5.28.0
x_serialization_backend: 'YAML::Tiny version 1.73'
"IPC::Open3" => 0,
"Test::More" => 0
},
- "VERSION" => "0.006",
+ "VERSION" => "0.007",
"test" => {
"TESTS" => "t/*.t"
}
VERSION
- version 0.006
+ version 0.007
SYNOPSIS
use App::HomeBank2Ledger;
-our $VERSION = '0.006'; # VERSION
+our $VERSION = '0.007'; # VERSION
App::HomeBank2Ledger->main(@ARGV);
=head1 VERSION
-version 0.006
+version 0.007
=head1 SYNOPSIS
use Getopt::Long 2.38 qw(GetOptionsFromArray);
use Pod::Usage;
-our $VERSION = '0.006'; # VERSION
+our $VERSION = '0.007'; # VERSION
my %ACCOUNT_TYPES = ( # map HomeBank account types to Ledger accounts
bank => 'Assets:Bank',
=head1 VERSION
-version 0.006
+version 0.007
=head1 SYNOPSIS
use Module::Pluggable search_path => [__PACKAGE__],
sub_name => 'available_formatters';
-our $VERSION = '0.006'; # VERSION
+our $VERSION = '0.007'; # VERSION
sub _croak { require Carp; Carp::croak(@_) }
=head1 VERSION
-version 0.006
+version 0.007
=head1 SYNOPSIS
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;
# beancount doesn't support different notations
- my $num = join('.', commify($whole), $fraction);
+ my $num = commify($whole);
+ if ($commodity->{frac}) {
+ $num .= ".$fraction";
+ }
$num = "$num $commodity->{iso}";
=head1 VERSION
-version 0.006
+version 0.007
=head1 DESCRIPTION
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
use warnings;
use strict;
-our $VERSION = '0.006'; # VERSION
+our $VERSION = '0.007'; # VERSION
sub new {
=head1 VERSION
-version 0.006
+version 0.007
=head1 SYNOPSIS
use Exporter qw(import);
-our $VERSION = '0.006'; # VERSION
+our $VERSION = '0.007'; # VERSION
our @EXPORT_OK = qw(commify rtrim);
=head1 VERSION
-version 0.006
+version 0.007
=head1 FUNCTIONS
use XML::Entities;
use XML::Parser::Lite;
-our $VERSION = '0.006'; # VERSION
+our $VERSION = '0.007'; # VERSION
our @EXPORT_OK = qw(parse_string parse_file);
push @categories, \%attr;
}
elsif ($node eq 'ope') { # transaction
- $attr{paymode} = $TRANSACTION_PAYMODES{$attr{paymode} || ''} || 'unknown';
- $attr{status} = $TRANSACTION_STATUSES{delete $attr{st}} || 'unknown';
+ $attr{paymode} = $TRANSACTION_PAYMODES{$attr{paymode} || ''} || 'unknown';
+ $attr{status} = $TRANSACTION_STATUSES{delete $attr{st} || ''} || 'unknown';
$attr{transfer_key} = delete $attr{kxfer} if $attr{kxfer};
$attr{split_amount} = delete $attr{samt} if $attr{samt};
=head1 VERSION
-version 0.006
+version 0.007
=head1 SYNOPSIS