Mark transaction as changed when transaction date and notes are changed.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3229 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2000-12-03 07:46:31 +00:00
parent 930c39190a
commit c8b06c7c46

View File

@ -1833,6 +1833,8 @@ xaccTransSetDateSecs (Transaction *trans, time_t secs)
trans->date_posted.tv_sec = secs;
trans->date_posted.tv_nsec = 0;
MarkChanged (trans);
/* Because the date has changed, we need to make sure that each of the
* splits is properly ordered in each of their accounts. We could do that
* here, simply by reinserting each split into its account. However, in
@ -1850,6 +1852,8 @@ xaccTransSetDateEnteredSecs (Transaction *trans, time_t secs)
trans->date_entered.tv_sec = secs;
trans->date_entered.tv_nsec = 0;
MarkChanged (trans);
}
void
@ -1865,6 +1869,8 @@ xaccTransSetDateTS (Transaction *trans, const Timespec *ts)
trans->date_posted.tv_sec = ts->tv_sec;
trans->date_posted.tv_nsec = ts->tv_nsec;
MarkChanged (trans);
}
void
@ -1875,6 +1881,8 @@ xaccTransSetDateEnteredTS (Transaction *trans, const Timespec *ts)
trans->date_entered.tv_sec = ts->tv_sec;
trans->date_entered.tv_nsec = ts->tv_nsec;
MarkChanged (trans);
}
void
@ -1896,6 +1904,8 @@ xaccTransSetDateToday (Transaction *trans)
trans->date_posted.tv_sec = tv.tv_sec;
trans->date_posted.tv_nsec = 1000 * tv.tv_usec;
MarkChanged (trans);
PINFO ("addr=%p set date to %lu %s \n",
trans, tv.tv_sec, ctime ((time_t *)&tv.tv_sec));
}
@ -1945,6 +1955,7 @@ xaccTransSetNotes (Transaction *trans, const char *notes)
{
kvp_frame_set_slot (xaccTransGetSlots (trans), "notes", new_value);
kvp_value_delete (new_value);
MarkChanged (trans);
}
else
{