Fix fiscal year end use in gnc-period-select

When saving the 'fy_end' date in the GncPeriodSelect widget the year
was being saved as G_DATE_BAD_YEAR. In doing so, the month and day when
retrieved will be 0. If the year is set separately with g_date_set_year
and G_DATE_BAD_YEAR is used the following error is logged...

ERROR <GLib> g_date_set_year: assertion 'g_date_valid_year (y)' failed

So to fix this just copy the incoming 'fy_end' GDate.
stable
Robert Fewell 7 days ago
parent a135c25758
commit eb96f8e7f2

@ -270,9 +270,7 @@ gnc_period_select_set_fy_end (GncPeriodSelect *period, const GDate *fy_end)
if (fy_end)
{
period->fy_end = g_date_new_dmy(g_date_get_day(fy_end),
g_date_get_month(fy_end),
G_DATE_BAD_YEAR);
period->fy_end = g_date_copy (fy_end);
}
else
{

Loading…
Cancel
Save