gnucash unstable: Multiple changes pushed

Geert Janssens gjanssens at code.gnucash.org
Sat Apr 14 12:46:47 EDT 2018


Updated	 via  https://github.com/Gnucash/gnucash/commit/dcfc1280 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/6093e597 (commit)
	from  https://github.com/Gnucash/gnucash/commit/3a44b368 (commit)



commit dcfc1280bdf13623b79c639ff8735c6c3fa7f85d
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Sat Apr 14 18:46:26 2018 +0200

    Base invoice posted status on the presence of a posted transaction rather than a posted account
    
    Bills and invoices that are posted and subsequently unposted again still store their
    posted account internally as a convenience to the user (upon reposting the old
    account will be offered by default) so it's not a reliable test for the posted state.
    The posted transaction on the other hand is guaranteed to only exist when the invoice is
    posted. This should fix a slew of small and perhaps larger side effects, such as
    a posted bill still appearing as editable, critical warnings when creating new bills/invoices
    and so on.

diff --git a/libgnucash/engine/gncInvoice.c b/libgnucash/engine/gncInvoice.c
index 35b7f9f..592363f 100644
--- a/libgnucash/engine/gncInvoice.c
+++ b/libgnucash/engine/gncInvoice.c
@@ -1859,7 +1859,7 @@ gncInvoiceApplyPayment (const GncInvoice *invoice, Transaction *txn,
 gboolean gncInvoiceIsPosted (const GncInvoice *invoice)
 {
     if (!invoice) return FALSE;
-    return GNC_IS_ACCOUNT(gncInvoiceGetPostedAcc(invoice));
+    return GNC_IS_TRANSACTION(gncInvoiceGetPostedTxn(invoice));
 }
 
 gboolean gncInvoiceIsPaid (const GncInvoice *invoice)

commit 6093e5978f34eba8cda437745186fcc7f5ae68c4
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Sat Apr 14 18:39:18 2018 +0200

    Bug 794767 - Dates default to 01/01/1970

diff --git a/gnucash/gnome/dialog-invoice.c b/gnucash/gnome/dialog-invoice.c
index 187972b..043666f 100644
--- a/gnucash/gnome/dialog-invoice.c
+++ b/gnucash/gnome/dialog-invoice.c
@@ -1764,7 +1764,7 @@ gnc_invoice_update_window (InvoiceWindow *iw, GtkWidget *widget)
                                           gncInvoiceGetActive (invoice));
 
         time = gncInvoiceGetDateOpened (invoice);
-        if (!time)
+        if (time == INT64_MAX)
         {
             gnc_date_edit_set_time (GNC_DATE_EDIT (iw->opened_date),
                                     gnc_time (NULL));



Summary of changes:
 gnucash/gnome/dialog-invoice.c | 2 +-
 libgnucash/engine/gncInvoice.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)



More information about the gnucash-changes mailing list