Use string amounts for balance
Doesn't change anything in practice
This commit is contained in:
parent
0cdb1b7eba
commit
3a07b8eadb
2 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@ sub names() {
|
|||
}
|
||||
|
||||
sub balance($username) {
|
||||
return RevBank::Amount->new_from_float( _read()->{ lc $username }->[1] );
|
||||
return RevBank::Amount->parse_string( _read()->{ lc $username }->[1] );
|
||||
}
|
||||
|
||||
sub since($username) {
|
||||
|
|
|
@ -45,7 +45,7 @@ sub _recent($n, $u) {
|
|||
|
||||
sub balance($self, $u) {
|
||||
_recent(10, $u);
|
||||
printf "Balance for $u is \e[1m%+.2f\e[0m\n", RevBank::Users::balance($u);
|
||||
printf "Balance for $u is \e[1m%s\e[0m\n", RevBank::Users::balance($u)->string("+");
|
||||
say "NB: Products/amounts/commands FIRST, username LAST.";
|
||||
return ABORT;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue