mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
add the final few utilities that we need (for now)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1166 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
e2c5fe6c22
commit
bd1beee6b7
@ -194,6 +194,16 @@ xaccQuerySetMaxSplits (Query *q, int max)
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
void
|
||||
xaccQuerySetDateRange (Query *q, time_t early, time_t late)
|
||||
{
|
||||
if (!q) return;
|
||||
q->earliest.tv_sec = early;
|
||||
q->latest.tv_sec = late;
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
#define PROLOG \
|
||||
char *da, *db; \
|
||||
Transaction *ta; \
|
||||
@ -634,7 +644,7 @@ xaccQueryGetSplits (Query *q)
|
||||
time_t
|
||||
xaccQueryGetEarliestDateFound (Query *q)
|
||||
{
|
||||
if (!q) return NULL;
|
||||
if (!q) return 0;
|
||||
|
||||
return ((time_t) q->earliest_found.tv_sec);
|
||||
}
|
||||
@ -642,7 +652,7 @@ xaccQueryGetEarliestDateFound (Query *q)
|
||||
time_t
|
||||
xaccQueryGetLatestDateFound (Query *q)
|
||||
{
|
||||
if (!q) return NULL;
|
||||
if (!q) return ULONG_MAX;
|
||||
|
||||
return ((time_t) q->latest_found.tv_sec);
|
||||
}
|
||||
|
@ -60,6 +60,12 @@ void xaccQueryAddAccount (Query *, Account *acc);
|
||||
*/
|
||||
void xaccQuerySetMaxSplits (Query *, int);
|
||||
|
||||
/* The xaccQuerySetDateRange() method sets the date range
|
||||
* for the query. Thje query will return only those splits
|
||||
* that are within this date range.
|
||||
*/
|
||||
void xaccQuerySetDateRange (Query *, time_t earliest, time_t latest);
|
||||
|
||||
/* The xaccQuerySetSortOrder() method sets the sort order that
|
||||
* should be used on the splits. The three arguments should
|
||||
* be choosen from the enums above. The first argument has the
|
||||
|
Loading…
Reference in New Issue
Block a user