mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix SX Editor not being able to change the Repeat type from "Until".
The way this is stored depends upon the SX End Date being invalid, but xaccSchedXActionSetLastOccurDate() rejected invalid dates, so once a valid date had been created, it was impossible to change, except to another valid date.
This commit is contained in:
parent
9f5d62d4f7
commit
594aa3263d
@ -629,9 +629,11 @@ xaccSchedXactionGetEndDate(const SchedXaction *sx )
|
||||
void
|
||||
xaccSchedXactionSetEndDate( SchedXaction *sx, const GDate *newEnd )
|
||||
{
|
||||
if (newEnd == NULL
|
||||
|| !g_date_valid( newEnd )
|
||||
|| g_date_compare( newEnd, &sx->start_date ) < 0 )
|
||||
/* Note that an invalid GDate IS a permissable value: It means that
|
||||
* the SX is to run "forever". See gnc_sxed_save_sx() and
|
||||
* schedXact_editor_populate() in dialog-sx-editor.c.
|
||||
*/
|
||||
if (newEnd == NULL || g_date_compare( newEnd, &sx->start_date ) < 0 )
|
||||
{
|
||||
/* XXX: I reject the bad data - is this the right
|
||||
* thing to do <rgmerk>.
|
||||
|
Loading…
Reference in New Issue
Block a user