mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Merge Chris Carson's 'refactor-Scrub-c' into maint.
This commit is contained in:
@@ -1431,13 +1431,15 @@ void
|
|||||||
xaccTransScrubPostedDate (Transaction *trans)
|
xaccTransScrubPostedDate (Transaction *trans)
|
||||||
{
|
{
|
||||||
time64 orig = xaccTransGetDate(trans);
|
time64 orig = xaccTransGetDate(trans);
|
||||||
GDate date = xaccTransGetDatePostedGDate(trans);
|
if(orig == INT64_MAX)
|
||||||
time64 time = gdate_to_time64(date);
|
|
||||||
/* xaccTransGetDatePostedGDate will return a valid time */
|
|
||||||
if (orig == INT64_MAX && orig != time)
|
|
||||||
{
|
{
|
||||||
/* xaccTransSetDatePostedSecs handles committing the change. */
|
GDate date = xaccTransGetDatePostedGDate(trans);
|
||||||
xaccTransSetDatePostedSecs(trans, time);
|
time64 time = gdate_to_time64(date);
|
||||||
|
if(time != INT64_MAX)
|
||||||
|
{
|
||||||
|
// xaccTransSetDatePostedSecs handles committing the change.
|
||||||
|
xaccTransSetDatePostedSecs(trans, time);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user