Commit Graph
11 Commits
Author SHA1 Message Date
John Ralls 6712a4a5fb gnc_relative_date_to_time64: Have only if statemen for period TODAY. 2025-03-25 13:24:06 -07:00
John Ralls b5b2221e72 Test gnc-option-date variable fy start days.
Leverages the FakePrefsBackend from the previous commit to change the
fiscal year for testing.

Makes now_t a defaulted parameter of gnc_relative_date_to_time64 so
that we can inject different reference dates for testing.
2025-03-23 15:32:07 -07:00
Sherlock 4e4dcf1758 Use the fiscal start day of the month for relative quarter reports
Only the quarter's start month in reports is adjusted when Absolute is selected in the Start Date on the Accounting Period preferences. This branch adjusts both the quarter's start day and month when Absolute is selected or when Relative and Today, Start of this month, or Start of previous month are selected.
2025-03-23 12:21:35 -07:00
Sherlock f3b08ddefb Bug 798946 - start/end of current/last quarter have off-by-one error 2025-02-28 15:55:30 -08:00
John Ralls a475172d8c Bug 798946 - start/end of current/last quarter have off-by-one error 2025-01-20 11:40:44 -08:00
John Ralls 7b34971c87 Gnc-options-date: Make the accounting period struct tm empty...
If the accounting period start-choice is anything but absolute instead
of matching the accounting period month and day to the present month and
day. The latter is a non-obvious hack that depends on
gnc_accounting_period_fiscal_start() returning the present day if it's
not set.
2024-09-22 16:15:52 -07:00
John Ralls c584337c3a 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.
2024-09-22 16:12:54 -07:00
John Ralls 266ae2a931 Bug 798946 - start/end of current/last quarter have off-by-one error
Calculating the quarter offset when the current month is less than the
beginning month of the fiscal year was inverted.
2024-02-17 12:52:17 -08:00
Sherlock 07e94b4222 Bug 799152 - normalize_reldate_tm() does not handle dates with...
months greater than 11 or less than -11 correctly.
2023-12-07 16:53:05 -08:00
Richard Cohen 1cec0cb3f3 Use internal extern "C" { ... } for C++
- removes warnings compiling swig engine
...
[ 10%] Generating swig-engine.cpp
.../libgnucash/engine/engine-helpers.h:31: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gnc-date.h:83: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/qofquery.h:90: Warning 302: Identifier 'QofQuery' redefined (ignored),
.../libgnucash/engine/gnc-option.hpp:55: Warning 302: previous definition of 'QofQuery'.
.../libgnucash/engine/gnc-commodity.h:56: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gncBusiness.h:40: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gncEntry.h:37: Warning 313: Unrecognized extern type "C++".
2023-01-23 18:40:01 +00:00
John Ralls 4ae17d12c7 [options] Move options from app-utils to engine.
Options is required for book options that are stored as part of the data
 file and so belongs in engine.
2022-08-25 22:09:56 -07:00