gnucash maint: Fix input of invoice post and due dates
Geert Janssens
gjanssens at code.gnucash.org
Fri Aug 31 08:36:11 EDT 2018
Updated via https://github.com/Gnucash/gnucash/commit/5ffb7fa2 (commit)
from https://github.com/Gnucash/gnucash/commit/fc368b91 (commit)
commit 5ffb7fa20bb241b96a13768837713be581aa50fe
Author: Geert Janssens <geert at kobaltwit.be>
Date: Fri Aug 31 14:35:11 2018 +0200
Fix input of invoice post and due dates
In the conversion from a timespec pointer to a time64 in
https://github.com/Gnucash/gnucash/commit/6f89bd62b3cf
we lost the write-back of these two dates to the calling function.
Fixed by making the time64 members pointers again as the timespecs were before.
diff --git a/gnucash/gnome/dialog-date-close.c b/gnucash/gnome/dialog-date-close.c
index 977a637..4f4082c 100644
--- a/gnucash/gnome/dialog-date-close.c
+++ b/gnucash/gnome/dialog-date-close.c
@@ -45,7 +45,7 @@ typedef struct _dialog_date_close_window
GtkWidget *memo_entry;
GtkWidget *question_check;
GncBillTerm *terms;
- time64 t, t2;
+ time64 *t, *t2;
GList * acct_types;
GList * acct_commodities;
QofBook *book;
@@ -87,14 +87,14 @@ gnc_dialog_date_close_ok_cb (GtkWidget *widget, gpointer user_data)
}
if (ddc->post_date)
- ddc->t2 = gnc_date_edit_get_date (GNC_DATE_EDIT (ddc->post_date));
+ *ddc->t2 = gnc_date_edit_get_date (GNC_DATE_EDIT (ddc->post_date));
if (ddc->date)
{
if (ddc->terms)
- ddc->t = gncBillTermComputeDueDate (ddc->terms, ddc->t2);
+ *ddc->t = gncBillTermComputeDueDate (ddc->terms, *ddc->t2);
else
- ddc->t = gnc_date_edit_get_date (GNC_DATE_EDIT (ddc->date));
+ *ddc->t = gnc_date_edit_get_date (GNC_DATE_EDIT (ddc->date));
}
if (ddc->memo_entry && ddc->memo)
@@ -134,7 +134,7 @@ gnc_dialog_date_close_parented (GtkWidget *parent, const char *message,
return FALSE;
ddc = g_new0 (DialogDateClose, 1);
- ddc->t = *t;
+ ddc->t = t;
builder = gtk_builder_new();
gnc_builder_add_from_file (builder, "dialog-date-close.glade", "date_close_dialog");
@@ -220,8 +220,8 @@ gnc_dialog_dates_acct_question_parented (GtkWidget *parent, const char *message,
return FALSE;
ddc = g_new0 (DialogDateClose, 1);
- ddc->t = *ddue;
- ddc->t2 = *post;
+ ddc->t = ddue;
+ ddc->t2 = post;
ddc->book = book;
ddc->acct_types = acct_types;
ddc->acct_commodities = acct_commodities;
@@ -343,7 +343,7 @@ gnc_dialog_date_acct_parented (GtkWidget *parent, const char *message,
return FALSE;
ddc = g_new0 (DialogDateClose, 1);
- ddc->t = *date;
+ ddc->t = date;
ddc->book = book;
ddc->acct_types = acct_types;
ddc->acct = *acct;
Summary of changes:
gnucash/gnome/dialog-date-close.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
More information about the gnucash-changes
mailing list