r22211 - gnucash/trunk/src/business/business-gnome - Fix credit note duplication. It was not possible to duplicate a credit

Geert Janssens gjanssens at code.gnucash.org
Wed Jun 6 09:52:45 EDT 2012


Author: gjanssens
Date: 2012-06-06 09:52:45 -0400 (Wed, 06 Jun 2012)
New Revision: 22211
Trac: http://svn.gnucash.org/trac/changeset/22211

Modified:
   gnucash/trunk/src/business/business-gnome/dialog-invoice.c
Log:
Fix credit note duplication. It was not possible to duplicate a credit
note as an invoice (aka voiding a credit note).

Modified: gnucash/trunk/src/business/business-gnome/dialog-invoice.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-invoice.c	2012-06-06 13:52:34 UTC (rev 22210)
+++ gnucash/trunk/src/business/business-gnome/dialog-invoice.c	2012-06-06 13:52:45 UTC (rev 22211)
@@ -2422,6 +2422,14 @@
         break;
     }
 
+    if (dialog_type == DUP_INVOICE)
+    {
+        GtkWidget *invoice_radio = GTK_WIDGET (gtk_builder_get_object (builder, "dialog_invoice_type"));
+        GtkWidget *cn_radio = GTK_WIDGET (gtk_builder_get_object (builder, "dialog_creditnote_type"));
+
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(cn_radio), gncInvoiceGetIsCreditNote (invoice));
+    }
+
     iw->id_entry = GTK_WIDGET (gtk_builder_get_object (builder, "dialog_id_entry"));
     iw->billing_id_entry = GTK_WIDGET (gtk_builder_get_object (builder, "dialog_billing_id_entry"));
     iw->terms_menu = GTK_WIDGET (gtk_builder_get_object (builder, "dialog_terms_menu"));



More information about the gnucash-changes mailing list