fix warnings for account detail report, duplicate row.
we aim to have the code identifiying the row unique. therefore adding batch, journal and transaction number to row code.
this can be used for drilldown reports in the future.
account detail report, and other reports using the general settings user control, had a problem with period validation for previous years.
was checking for number of forwarding periods, should check for number of accounting periods instead
refresh cached table for ledger details after closing the period, so that ledger.currentperiod has the correct value, eg in account detail report
do not display message about accounting periods during year end.
fix a problem with accounting year calendar increased twice during one year end.
using the same functions that the client uses, which helps to test this properly
sending email from reports: show error messages with details, why email cannot be sent
fix previous commit. error code was already in use
fixes for monthend, yearend, account detail report, and sending email from report