fixed bug 555, stats now properly reports postings per day

This commit is contained in:
Craig Earls 2011-10-22 07:09:18 -07:00
parent 884e55afca
commit 071d23d821
2 changed files with 9 additions and 7 deletions

View file

@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@titlepage @titlepage
@title Ledger: Command-Line Accounting @title Ledger: Command-Line Accounting
@subtitle For Version 3.0 of Ledger @subtitle For Version 3.0 of Ledger
@subtitle Draft Manual Time-stamp: <2011-10-19 20:36 (cpearls)> @subtitle Draft Manual Time-stamp: <2011-10-21 21:33 (cpearls)>
@author John Wiegley @author John Wiegley
@end titlepage @end titlepage
@ -3050,6 +3050,8 @@ weekly last august
* equity:: * equity::
* prices:: * prices::
* xact:: * xact::
* payees::
* accounts::
@end menu @end menu
@node balance, register, Basic Reporting Commands, Basic Reporting Commands @node balance, register, Basic Reporting Commands, Basic Reporting Commands
@ -3150,7 +3152,7 @@ There is also a @command{pricedb} command which outputs the same
information as @command{prices}, but does in a format that can be information as @command{prices}, but does in a format that can be
parsed by Ledger. parsed by Ledger.
@node xact, , prices, Basic Reporting Commands @node xact, payees, prices, Basic Reporting Commands
@section xact @section xact
The @command{xact} commands simplifies the creation of new transactions. The @command{xact} commands simplifies the creation of new transactions.
@ -3206,11 +3208,11 @@ ledger xact 4/9 viva food $11.50 tips $8 cash
ledger xact 4/9 viva dining "DM 11.50" ledger xact 4/9 viva dining "DM 11.50"
@end smallexample @end smallexample
@node payees @node payees, accounts, xact, Basic Reporting Commands
@section payees @section payees
The @command{payees} reports all of the unique payees in the journal The @command{payees} reports all of the unique payees in the journal.
@node accounts @node accounts, , payees, Basic Reporting Commands
@section accounts @section accounts
The @command{accounts} reports all of the accounts in the journal. The @command{accounts} reports all of the accounts in the journal.

View file

@ -88,8 +88,8 @@ value_t report_statistics(call_scope_t& args)
out << " ("; out << " (";
out.precision(2); out.precision(2);
out << (double((statistics.latest_post - statistics.earliest_post).days()) / out << (double(statistics.posts_count)/
double(statistics.posts_count)) << _(" per day)") << std::endl; double((statistics.latest_post - statistics.earliest_post).days())) << _(" per day)") << std::endl;
out << _(" Uncleared postings: "); out << _(" Uncleared postings: ");
out.width(6); out.width(6);