Report date format

Added report.X.dateformat which gives each report the possibility
to have a custom format for the due dates.
This commit is contained in:
Federico Hernandez
2010-01-18 03:45:49 +01:00
parent 4f70969306
commit fccd0d6c96
5 changed files with 51 additions and 10 deletions

View File

@@ -644,6 +644,12 @@ void Table::setDateFormat (const std::string& dateFormat)
mDateFormat = dateFormat;
}
////////////////////////////////////////////////////////////////////////////////
void Table::setReportName (const std::string& reportName)
{
mReportName = reportName;
}
////////////////////////////////////////////////////////////////////////////////
int Table::rowCount ()
{
@@ -881,7 +887,9 @@ void Table::sort (std::vector <int>& order)
else
{
std::string format = context.config.get ("reportdateformat");
std::string format = context.config.get ("report." + mReportName + ".dateformat");
if (format == "")
format = context.config.get ("reportdateformat");
if (format == "")
format = context.config.get ("dateformat");
@@ -903,7 +911,9 @@ void Table::sort (std::vector <int>& order)
else
{
std::string format = context.config.get ("reportdateformat");
std::string format = context.config.get ("report." + mReportName + ".dateformat");
if (format == "")
format = context.config.get ("reportdateformat");
if (format == "")
format = context.config.get ("dateformat");