mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 799395 - relative date offset quarters occasionally wrong
If the accounting period start month and the present month are the same the present month would be offset by 3. Don't do that.
This commit is contained in:
@@ -528,7 +528,7 @@ gnc_relative_date_to_time64(RelativeDatePeriod period)
|
||||
break;
|
||||
case RelativeDateOffset::QUARTER:
|
||||
{
|
||||
auto delta = (now.tm_mon > acct_per.tm_mon ?
|
||||
auto delta = (now.tm_mon >= acct_per.tm_mon ?
|
||||
( now.tm_mon - acct_per.tm_mon) % 3 :
|
||||
3 - ((acct_per.tm_mon - now.tm_mon) % 3));
|
||||
now.tm_mon = now.tm_mon - delta;
|
||||
|
||||
Reference in New Issue
Block a user