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:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user