* src/business/business-gnome/dialog-invoice.[ch]: pass a double

instead of an int, because guile-1.6 sucks.  Also fix the Query
	  to actually include the Due Date of the invoice.
	* src/business/business-gnome/gw-business-gnome-spec.scm:
	  change the int to a double on the bills-due api


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8342 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins
2003-05-19 22:25:34 +00:00
parent 220e6dac33
commit 01ac9a55bc
4 changed files with 15 additions and 4 deletions

View File

@@ -19,6 +19,12 @@
* src/business/businss-gnome/gw-business-gnome-spec.scm: wrap the
new due-bills api
* src/engine/gnc-book.c: forcibly signal a book destroy event
* src/business/business-gnome/dialog-invoice.[ch]: pass a double
instead of an int, because guile-1.6 sucks. Also fix the Query
to actually include the Due Date of the invoice.
* src/business/business-gnome/gw-business-gnome-spec.scm:
change the int to a double on the bills-due api
2003-05-18 Derek Atkins <derek@ihtfp.com>

View File

@@ -2398,7 +2398,7 @@ gnc_invoice_search_edit (gpointer start, gpointer book)
}
DialogQueryList *
gnc_invoice_show_bills_due (GNCBook *book, int days_in_advance)
gnc_invoice_show_bills_due (GNCBook *book, double days_in_advance)
{
GNCIdType type = GNC_INVOICE_MODULE_NAME;
Query *q;
@@ -2406,6 +2406,7 @@ gnc_invoice_show_bills_due (GNCBook *book, int days_in_advance)
time_t end_date;
GList *res;
gint len;
Timespec ts;
static GList *param_list = NULL;
static GNCDisplayListButton buttons[] = {
{ N_("View/Edit Bill"), edit_invoice_direct },
@@ -2449,7 +2450,11 @@ gnc_invoice_show_bills_due (GNCBook *book, int days_in_advance)
if (days_in_advance < 0)
days_in_advance = 0;
end_date += days_in_advance*60*60*24;
xaccQueryAddDateMatchTT(q, FALSE, 0, TRUE, end_date, QUERY_AND);
ts.tv_sec = (gint64) end_date;
ts.tv_nsec = 0;
pred_data = gncQueryDatePredicate (COMPARE_LTE, DATE_MATCH_NORMAL, ts);
gncQueryAddTerm (q, g_slist_prepend(NULL, INVOICE_DUE), pred_data, QUERY_AND);
res = gncQueryRun(q);
len = g_list_length (res);

View File

@@ -33,6 +33,6 @@ GNCSearchWindow * gnc_invoice_search_edit (gpointer start, gpointer book);
void gnc_business_call_owner_report (GncOwner *owner, Account *acc);
DialogQueryList *gnc_invoice_show_bills_due (GNCBook *book, int days_in_advance);
DialogQueryList *gnc_invoice_show_bills_due (GNCBook *book, double days_in_advance);
#endif /* GNC_DIALOG_INVOICE_H_ */

View File

@@ -168,7 +168,7 @@
'gnc:invoice-show-bills-due
'<gw:void>
"gnc_invoice_show_bills_due"
'((<gnc:Book*> book) (<gw:int> days_in_advance))
'((<gnc:Book*> book) (<gw:double> days_in_advance))
"Dialog: display the bills due within the next \"days\"")
;;