X-Git-Url: http://www.andromeda.nl/gitweb/?a=blobdiff_plain;f=account.cpp;fp=account.cpp;h=ef1d0b80df2c6d0a244d95643ec306dcca695221;hb=7512f94d087624c8a57210b96d35a813678c1b29;hp=9fa19315c8dd91c9bdd8b784c62c283a98e74983;hpb=4ef88003b7cbfd9db6769c2897e58fd5b4dc83d0;p=account.git diff --git a/account.cpp b/account.cpp index 9fa1931..ef1d0b8 100644 --- a/account.cpp +++ b/account.cpp @@ -238,12 +238,12 @@ std::ostream& operator<<(std::ostream &s, Ledger &l) return s; } -void PostScript_balans_layout(PostScript &ps) +void PostScript_balans_layout(PostScript &ps, String header) { ps.Line(16, 595, 755, 595); ps.Line(16, 580, 755, 580); ps.Line(16, 40, 755, 40); - ps.Text(200, 582, "Saldibalans"); + ps.Text(200, 582, header); ps.Line( 16, 595, 16, 40); ps.Line(755, 595, 755, 40); @@ -272,7 +272,7 @@ void Ledger::accounts_report(const char * filename) } } -void Ledger::saldi_report(const char * filename) +void Ledger::saldi_report(const char * filename, date period_begin, date period_end) { PostScript ps(filename); balance total, saldi; @@ -281,6 +281,10 @@ void Ledger::saldi_report(const char * filename) float y = 572; int row = 0; + String header("Saldibalans"); + + header += " van " + period_begin.format("%e %B %Y") + " tot " + period_end.format("%e %B %Y"); + ps.NewPage(842, 595); ps.FontSize(6); @@ -294,7 +298,7 @@ void Ledger::saldi_report(const char * filename) if (row == 64) { ps.FontSize(9); - PostScript_balans_layout(ps); + PostScript_balans_layout(ps, header); ps.NewPage(842, 595); ps.FontSize(6); y = 572; @@ -341,7 +345,7 @@ void Ledger::saldi_report(const char * filename) } ps.FontSize(9); - PostScript_balans_layout(ps); + PostScript_balans_layout(ps, header); balance profit; profit = ~Result; @@ -370,13 +374,13 @@ void Ledger::saldi_report(const char * filename) ps.Text(690, y, EndBalance.credit().to_string()); } -void Ledger::XML_saldi(std::ostream &s) +void Ledger::XML_saldi(std::ostream &s, date period_begin, date period_end) { int i; s << "\n"; s << "\n"; - s << "\n"; + s << "\n"; for (i=0; i