r21982 - gnucash/trunk/src/business/business-gnome - Rework payment dialog for credit notes
Geert Janssens
gjanssens at code.gnucash.org
Fri Feb 10 10:31:57 EST 2012
Author: gjanssens
Date: 2012-02-10 10:31:57 -0500 (Fri, 10 Feb 2012)
New Revision: 21982
Trac: http://svn.gnucash.org/trac/changeset/21982
Modified:
gnucash/trunk/src/business/business-gnome/business-gnome-utils.c
gnucash/trunk/src/business/business-gnome/business-gnome-utils.h
gnucash/trunk/src/business/business-gnome/dialog-payment.c
gnucash/trunk/src/business/business-gnome/gtkbuilder/dialog-payment.glade
Log:
Rework payment dialog for credit notes
Modified: gnucash/trunk/src/business/business-gnome/business-gnome-utils.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/business-gnome-utils.c 2012-02-10 14:40:52 UTC (rev 21981)
+++ gnucash/trunk/src/business/business-gnome/business-gnome-utils.c 2012-02-10 15:31:57 UTC (rev 21982)
@@ -128,7 +128,7 @@
gnc_general_search_set_selected (GNC_GENERAL_SEARCH (edit),
owner->owner.undefined);
- gtk_box_pack_start (GTK_BOX (hbox), edit, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), edit, TRUE, TRUE, 0);
if (label)
gtk_label_set_text (GTK_LABEL (label), _(qof_object_get_type_label (type_name)));
@@ -311,8 +311,8 @@
gnc_invoice_select_search_set_label(isi);
}
-void
-gnc_fill_account_select_combo (GtkWidget *combo, QofBook *book,
+Account *
+gnc_account_select_combo_fill (GtkWidget *combo, QofBook *book,
GList *acct_types, GList *acct_commodities)
{
GtkListStore *store;
@@ -320,18 +320,17 @@
GList *list, *node;
char *text;
- g_return_if_fail (combo && GTK_IS_COMBO_BOX_ENTRY(combo));
- g_return_if_fail (book);
- g_return_if_fail (acct_types);
+ g_return_val_if_fail (combo && GTK_IS_COMBO_BOX_ENTRY(combo), NULL);
+ g_return_val_if_fail (book, NULL);
+ g_return_val_if_fail (acct_types, NULL);
/* Figure out if anything is set in the combo */
text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(combo));
+ g_object_set_data (G_OBJECT(combo), "book", book);
list = gnc_account_get_descendants (gnc_book_get_root_account (book));
/* Clear the existing list */
- entry = GTK_ENTRY(gtk_bin_get_child(GTK_BIN(combo)));
- gtk_entry_set_text(entry, "");
store = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(combo)));
gtk_list_store_clear(store);
@@ -360,6 +359,12 @@
name = gnc_account_get_full_name (account);
gtk_combo_box_append_text(GTK_COMBO_BOX(combo), name);
+ /* Save the first account name in case no account name was set */
+ if (!text || g_strcmp0 (text, "") == 0)
+ {
+ g_free (text); /* This is ok, even if text is already NULL */
+ text = g_strdup (name);
+ }
g_free(name);
}
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 0);
@@ -370,8 +375,30 @@
if (text)
g_free (text);
+
+ return gnc_account_select_combo_get_active (combo);
}
+Account *
+gnc_account_select_combo_get_active (GtkWidget *combo)
+{
+ gchar *text;
+ QofBook *book;
+
+ if (!combo || !GTK_IS_COMBO_BOX_ENTRY(combo))
+ return NULL;
+
+ book = g_object_get_data (G_OBJECT(combo), "book");
+ if (!book)
+ return NULL;
+
+ text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(combo));
+ if (!text || g_strcmp0 (text, "") == 0)
+ return NULL;
+
+ return gnc_account_lookup_by_full_name (gnc_book_get_root_account (book), text);
+}
+
/***********************************************************************
* gnc_simple_combo implementation functions
*/
Modified: gnucash/trunk/src/business/business-gnome/business-gnome-utils.h
===================================================================
--- gnucash/trunk/src/business/business-gnome/business-gnome-utils.h 2012-02-10 14:40:52 UTC (rev 21981)
+++ gnucash/trunk/src/business/business-gnome/business-gnome-utils.h 2012-02-10 15:31:57 UTC (rev 21982)
@@ -58,11 +58,15 @@
void gnc_invoice_set_invoice (GtkWidget *widget, GncInvoice *invoice);
void gnc_invoice_set_owner (GtkWidget *widget, GncOwner *owner);
-/* Fill in a combo box with the appropriate list of accounts */
-void gnc_fill_account_select_combo (GtkWidget *combo, QofBook *book,
- GList *acct_types,
- GList *acct_commodities);
+/* Fill in a combo box with the appropriate list of accounts
+ * Returns the default selected account */
+Account * gnc_account_select_combo_fill (GtkWidget *combo, QofBook *book,
+ GList *acct_types,
+ GList *acct_commodities);
+/* Returns the currently selected account in the combo box*/
+Account * gnc_account_select_combo_get_active (GtkWidget *combo);
+
/* Create a combo box of available billing terms based on
* the combo box If none_ok is true, then add "none" as a
* choice (with data set to NULL). If inital_choice is non-NULL,
Modified: gnucash/trunk/src/business/business-gnome/dialog-payment.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-payment.c 2012-02-10 14:40:52 UTC (rev 21981)
+++ gnucash/trunk/src/business/business-gnome/dialog-payment.c 2012-02-10 15:31:57 UTC (rev 21982)
@@ -53,25 +53,26 @@
struct _payment_window
{
- GtkWidget * dialog;
+ GtkWidget * dialog;
- GtkWidget * num_entry;
- GtkWidget * memo_entry;
- GtkWidget * post_combo;
- GtkWidget * owner_choice;
- GtkWidget * invoice_choice;
- GtkWidget * amount_edit;
- GtkWidget * date_edit;
- GtkWidget * acct_tree;
+ GtkWidget * num_entry;
+ GtkWidget * memo_entry;
+ GtkWidget * post_combo;
+ GtkWidget * owner_choice;
+ GtkWidget * amount_edit;
+ GtkWidget * date_edit;
+ GtkWidget * acct_tree;
+ GtkWidget * docs_list_tree_view;
- gint component_id;
- QofBook * book;
- GncOwner owner;
- GncInvoice * invoice;
- GList * acct_types;
- GList * acct_commodities;
+ gint component_id;
+ QofBook * book;
+ GncOwner owner;
+ GncInvoice * invoice;
+ Account * post_acct;
+ GList * acct_types;
+ GList * acct_commodities;
- Transaction *pre_existing_txn;
+ Transaction * pre_existing_txn;
};
void gnc_ui_payment_window_set_num (PaymentWindow *pw, const char* num)
@@ -113,11 +114,12 @@
(Account*)account);
}
-static gboolean has_pre_existing_txn(const PaymentWindow* pw)
+static gboolean gnc_payment_dialog_has_pre_existing_txn(const PaymentWindow* pw)
{
return pw->pre_existing_txn != NULL;
}
-
+int gnc_payment_dialog_post_to_changed_cb (GtkWidget *widget, gpointer data);
+void gnc_payment_dialog_document_selection_changed_cb (GtkWidget *widget, gpointer data);
void gnc_payment_ok_cb (GtkWidget *widget, gpointer data);
void gnc_payment_cancel_cb (GtkWidget *widget, gpointer data);
void gnc_payment_window_destroy_cb (GtkWidget *widget, gpointer data);
@@ -130,7 +132,7 @@
{
PaymentWindow *pw = data;
- gnc_fill_account_select_combo (pw->post_combo, pw->book, pw->acct_types, pw->acct_commodities);
+ pw->post_acct = gnc_account_select_combo_fill (pw->post_combo, pw->book, pw->acct_types, pw->acct_commodities);
}
static void
@@ -143,51 +145,245 @@
}
static void
-gnc_payment_dialog_invoice_changed(PaymentWindow *pw)
+calculate_selected_total_helper (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer data)
{
+ gnc_numeric *subtotal = (gnc_numeric*) data;
+ gnc_numeric cur_val;
+ GValue value = { 0 };
GNCLot *lot;
+ Account *acct;
+ gnc_commodity *currency;
+
+ gtk_tree_model_get_value (model, iter, 5, &value);
+ lot = (GNCLot *) g_value_get_pointer (&value);
+ g_value_unset (&value);
+
+ /* Find the amount's currency to determine the required precision */
+ acct = gnc_lot_get_account (lot);
+ currency = xaccAccountGetCommodity (acct);
+
+ cur_val = gnc_lot_get_balance (lot);
+ *subtotal = gnc_numeric_add (*subtotal, cur_val,
+ gnc_commodity_get_fraction (currency), GNC_HOW_RND_ROUND_HALF_UP);
+}
+
+static gnc_numeric
+gnc_payment_dialog_calculate_selected_total (PaymentWindow *pw)
+{
+ GtkTreeSelection *selection;
+ GList *list=NULL, *node;
+ gnc_numeric val = gnc_numeric_zero();
+
+ if (!pw->docs_list_tree_view || !GTK_IS_TREE_VIEW(pw->docs_list_tree_view))
+ return gnc_numeric_zero();
+
+ /* Figure out if anything is set in the current list */
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(pw->docs_list_tree_view));
+
+ gtk_tree_selection_selected_foreach (selection,
+ calculate_selected_total_helper,
+ (gpointer) &val);
+
+ return val;
+}
+
+static void
+gnc_payment_dialog_document_selection_changed (PaymentWindow *pw)
+{
+ GNCLot *lot;
gnc_numeric val;
- // Ignore the amount of the invoice in case this payment is from a
- // pre-existing txn
- if (has_pre_existing_txn(pw))
+ /* Don't change the amount based on the selected documents
+ * in case this payment is from a pre-existing txn
+ */
+ if (gnc_payment_dialog_has_pre_existing_txn (pw))
return;
/* Set the payment amount in the dialog */
- if (pw->invoice)
+ val = gnc_payment_dialog_calculate_selected_total (pw);
+ gnc_ui_payment_window_set_amount(pw, val);
+}
+
+static gboolean
+gnc_lot_match_owner (GNCLot *lot, gpointer user_data)
+{
+ const GncOwner *req_owner = user_data;
+ GncOwner lot_owner;
+ const GncOwner *end_owner;
+ GncInvoice *invoice = gncInvoiceGetInvoiceFromLot (lot);
+
+ /* Determine the owner associated to the lot */
+ if (invoice)
+ /* Invoice lots */
+ end_owner = gncOwnerGetEndOwner (gncInvoiceGetOwner (invoice));
+ else if (gncOwnerGetOwnerFromLot (lot, &lot_owner))
+ /* Pre-payment lots */
+ end_owner = gncOwnerGetEndOwner (&lot_owner);
+ else
+ return FALSE;
+
+ /* Is this a lot for the requested owner ? */
+ return gncOwnerEqual (end_owner, req_owner);
+}
+
+static void
+gnc_payment_window_fill_docs_list (PaymentWindow *pw)
+{
+ GtkListStore *store;
+ GList *list=NULL, *node;
+
+ g_return_if_fail (pw->docs_list_tree_view && GTK_IS_TREE_VIEW(pw->docs_list_tree_view));
+
+ /* Get a list of open lots for this owner and post account */
+ if (pw->owner.owner.undefined)
+ list = xaccAccountFindOpenLots (pw->post_acct, gnc_lot_match_owner,
+ &pw->owner, NULL);
+
+ /* Clear the existing list */
+ store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(pw->docs_list_tree_view)));
+ gtk_list_store_clear(store);
+
+ /* Add the documents and overpayments to the tree view */
+ for (node = list; node; node = node->next)
{
- lot = gncInvoiceGetPostedLot (pw->invoice);
- val = gnc_numeric_abs (gnc_lot_get_balance (lot));
+ GNCLot *lot = node->data;
+ const gchar *doc_date_str = NULL;
+ const gchar *doc_num_str = NULL;
+ const gchar *doc_type_str = NULL;
+ const gchar *doc_id_str = NULL;
+ const gchar *doc_deb_str = NULL;
+ const gchar *doc_cred_str = NULL;
+ GtkTreeIter iter;
+ Timespec doc_date;
+ GncInvoice *document;
+ gnc_numeric debit = gnc_numeric_zero();
+ gnc_numeric credit = gnc_numeric_zero();
+ GncInvoiceType doc_type = GNC_INVOICE_UNDEFINED;
+
+ /* Find the lot's document if it exists,
+ * it could also be a prepayment lot. */
+ document = gncInvoiceGetInvoiceFromLot (lot);
+
+ /* Find the document's date or pre-payment date */
+ if (document)
+ doc_date = gncInvoiceGetDatePosted (document);
+ else
+ {
+ /* Calculate the payment date based on the lot splits */
+ Transaction *trans = xaccSplitGetParent (gnc_lot_get_latest_split (lot));
+ if (trans)
+ doc_date = xaccTransRetDatePostedTS (trans);
+ else
+ continue; /* Not valid split in this lot, skip it */
+ }
+ doc_date_str = gnc_print_date (doc_date);
+
+ /* Find the document type. No type means pre-payment in this case */
+ if (document)
+ {
+ doc_type = gncInvoiceGetType (document);
+ doc_type_str = gncInvoiceGetTypeString (document);
+ }
+ else
+ doc_type_str = _("Pre-Payment");
+
+ /* Find the document id. Empty for pre-payments. */
+ if (document)
+ {
+ doc_id_str = gncInvoiceGetID (document);
+ }
+
+ /* Find the debit/credit amount.
+ * Invoices/bills are debit
+ * Credit notes are credit
+ * Pre-payments are credit
+ */
+ if (document)
+ {
+ if (!gncInvoiceGetIsCreditNote (document))
+ debit = gnc_lot_get_balance (lot);
+ else
+ credit = gnc_lot_get_balance (lot);
+ }
+ else
+ {
+ /* This is a pre-payment */
+ credit = gnc_lot_get_balance (lot);
+ }
+
+ /* Only display non-zero debits/credits */
+ if (!gnc_numeric_zero_p (debit))
+ doc_deb_str = xaccPrintAmount (debit, gnc_default_print_info (FALSE));
+ if (!gnc_numeric_zero_p (credit))
+ doc_cred_str = xaccPrintAmount (credit, gnc_default_print_info (FALSE));
+
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter,
+ 0, doc_date_str,
+ 1, doc_id_str,
+ 2, doc_type_str,
+ 3, doc_deb_str,
+ 4, doc_cred_str,
+ 5, (gpointer)lot,
+ -1);
+
}
- else
+
+ g_list_free (list);
+
+ /* Highlight the preset invoice if it's in the new list */
+ if (pw->invoice)
{
- val = gnc_numeric_zero();
+ GtkTreeIter iter;
+ GtkTreeModel *model = GTK_TREE_MODEL (store);
+ GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(pw->docs_list_tree_view));
+
+ if (gtk_tree_model_get_iter_first (model, &iter))
+ {
+ do
+ {
+ GValue value = { 0 };
+ GNCLot *lot;
+ GncInvoice *invoice;
+
+ gtk_tree_model_get_value (model, &iter, 5, &value);
+ lot = (GNCLot *) g_value_get_pointer (&value);
+ g_value_unset (&value);
+
+
+ invoice = gncInvoiceGetInvoiceFromLot (lot);
+ if (!invoice)
+ continue;
+
+ if (pw->invoice == invoice)
+ {
+ gtk_tree_selection_select_iter (selection, &iter);
+ gnc_payment_dialog_document_selection_changed (pw);
+ break;
+ }
+ }
+ while (gtk_tree_model_iter_next (model, &iter));
+ }
}
-
- gnc_ui_payment_window_set_amount(pw, val);
}
static void
-gnc_payment_dialog_owner_changed(PaymentWindow *pw)
+gnc_payment_dialog_owner_changed (PaymentWindow *pw)
{
Account *last_acct = NULL;
+ Account *post_acct = NULL;
GncGUID *guid = NULL;
KvpValue* value;
KvpFrame* slots;
+ gchar *text;
GncOwner *owner = &pw->owner;
- /* If the owner changed, the invoice selection is invalid */
+ /* If the owner changed, the initial invoice is no longer valid */
pw->invoice = NULL;
- gnc_invoice_set_owner(pw->invoice_choice, &pw->owner);
- /* note that set_owner implies ...set_invoice(...,NULL); */
- /* in case we don't get the callback */
- gnc_payment_dialog_invoice_changed(pw);
-
- /* XXX: We should set the sensitive flag on the invoice_choice
- * based on whether 'owner' is NULL or not...
- */
-
/* Now handle the account tree */
slots = gncOwnerGetSlots(owner);
if (slots)
@@ -215,8 +411,11 @@
pw->acct_types = gncOwnerGetAccountTypesList(owner);
if (gncOwnerIsValid(owner))
pw->acct_commodities = gncOwnerGetCommoditiesList (owner);
- gnc_fill_account_select_combo (pw->post_combo, pw->book, pw->acct_types, pw->acct_commodities);
+ pw->post_acct = gnc_account_select_combo_fill (pw->post_combo, pw->book, pw->acct_types, pw->acct_commodities);
+ /* Update list of documents and pre-payments */
+ gnc_payment_window_fill_docs_list (pw);
+
if (guid)
{
last_acct = xaccAccountLookup(guid, pw->book);
@@ -224,7 +423,7 @@
/* Set the last-used transfer account, but only if we didn't
* create this dialog from a pre-existing transaction. */
- if (last_acct && !has_pre_existing_txn(pw))
+ if (last_acct && !gnc_payment_dialog_has_pre_existing_txn(pw))
{
gnc_tree_view_account_set_selected_account(GNC_TREE_VIEW_ACCOUNT(pw->acct_tree),
last_acct);
@@ -232,8 +431,14 @@
}
static void
-gnc_payment_dialog_remember_account(PaymentWindow *pw, Account *acc)
+gnc_payment_dialog_post_to_changed (PaymentWindow *pw)
{
+ gnc_payment_window_fill_docs_list (pw);
+}
+
+static void
+gnc_payment_dialog_remember_account (PaymentWindow *pw, Account *acc)
+{
KvpValue* value;
KvpFrame* slots = gncOwnerGetSlots(&pw->owner);
@@ -279,21 +484,31 @@
return FALSE;
}
-static int
-gnc_payment_dialog_invoice_changed_cb (GtkWidget *widget, gpointer data)
+void
+gnc_payment_dialog_document_selection_changed_cb (GtkWidget *widget, gpointer data)
{
PaymentWindow *pw = data;
- GncInvoice *invoice;
+ if (!pw) return;
+
+ gnc_payment_dialog_document_selection_changed (pw);
+}
+
+int
+gnc_payment_dialog_post_to_changed_cb (GtkWidget *widget, gpointer data)
+{
+ PaymentWindow *pw = data;
+ Account *post_acct;
+
if (!pw) return FALSE;
- invoice = gnc_invoice_get_invoice (pw->invoice_choice);
+ post_acct = gnc_account_select_combo_get_active (pw->post_combo);
/* If this invoice really changed, then reset ourselves */
- if (invoice != pw->invoice)
+ if (post_acct != pw->post_acct)
{
- pw->invoice = invoice;
- gnc_payment_dialog_invoice_changed(pw);
+ pw->post_acct = post_acct;
+ gnc_payment_dialog_post_to_changed(pw);
}
return FALSE;
@@ -303,7 +518,7 @@
gnc_payment_ok_cb (GtkWidget *widget, gpointer data)
{
PaymentWindow *pw = data;
- const char *text;
+ const char *text = NULL;
Account *post, *acc;
gnc_numeric amount;
@@ -339,23 +554,12 @@
}
/* Verify the "post" account */
- text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(pw->post_combo));
- if (!text || safe_strcmp (text, "") == 0)
- {
- text = _("You must enter an account name for posting.");
- gnc_error_dialog (pw->dialog, "%s", text);
- return;
- }
- post = gnc_account_lookup_by_full_name (gnc_book_get_root_account (pw->book), text);
-
+ post = gnc_account_select_combo_get_active (pw->post_combo);
if (!post)
{
- char *msg = g_strdup_printf (
- _("Your selected post account, %s, does not exist"),
- text);
- gnc_error_dialog (pw->dialog, "%s", msg);
- g_free (msg);
+ text = _("Your must enter a valid account name for posting.");
+ gnc_error_dialog (pw->dialog, "%s", text);
return;
}
@@ -395,7 +599,7 @@
gnc_xfer_dialog_run_until_done(xfer);
}
- if (!has_pre_existing_txn(pw))
+ if (!gnc_payment_dialog_has_pre_existing_txn(pw))
{
/* Now apply the payment */
gncOwnerApplyPayment (&pw->owner, pw->invoice,
@@ -553,6 +757,7 @@
PaymentWindow *pw;
GtkBuilder *builder;
GtkWidget *box, *label;
+ GtkTreeSelection *selection;
char * cm_class = (gncOwnerGetType (owner) == GNC_OWNER_CUSTOMER ?
DIALOG_PAYMENT_CUSTOMER_CM_CLASS :
DIALOG_PAYMENT_VENDOR_CM_CLASS);
@@ -566,7 +771,7 @@
pw = gnc_find_first_gui_component (cm_class, find_handler, NULL);
if (pw)
{
- if (owner->owner.undefined) // FIXME: Does that mean gncOwnerIsValid(owner->owner)???
+ if (gncOwnerIsValid(owner))
gnc_payment_set_owner (pw, owner);
// Reset the setting about the pre-existing TXN
@@ -590,6 +795,9 @@
/* Open and read the Glade File */
builder = gtk_builder_new();
+ gnc_builder_add_from_file (builder, "dialog-payment.glade", "docs_list_hor_adj");
+ gnc_builder_add_from_file (builder, "dialog-payment.glade", "docs_list_vert_adj");
+ gnc_builder_add_from_file (builder, "dialog-payment.glade", "docs_list_model");
gnc_builder_add_from_file (builder, "dialog-payment.glade", "post_combo_model");
gnc_builder_add_from_file (builder, "dialog-payment.glade", "Payment Dialog");
pw->dialog = GTK_WIDGET (gtk_builder_get_object (builder, "Payment Dialog"));
@@ -605,10 +813,6 @@
box = GTK_WIDGET (gtk_builder_get_object (builder, "owner_box"));
pw->owner_choice = gnc_owner_select_create (label, box, book, owner);
- label = GTK_WIDGET (gtk_builder_get_object (builder, "invoice_label"));
- box = GTK_WIDGET (gtk_builder_get_object (builder, "invoice_box"));
- pw->invoice_choice = gnc_invoice_select_create (box, book, owner, invoice, label);
-
box = GTK_WIDGET (gtk_builder_get_object (builder, "amount_box"));
pw->amount_edit = gnc_amount_edit_new ();
gtk_box_pack_start (GTK_BOX (box), pw->amount_edit, TRUE, TRUE, 0);
@@ -620,18 +824,33 @@
pw->date_edit = gnc_date_edit_new (time(NULL), FALSE, FALSE);
gtk_box_pack_start (GTK_BOX (box), pw->date_edit, TRUE, TRUE, 0);
+ pw->docs_list_tree_view = GTK_WIDGET (gtk_builder_get_object (builder, "docs_list_tree_view"));
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(pw->docs_list_tree_view));
+ gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
+
box = GTK_WIDGET (gtk_builder_get_object (builder, "acct_window"));
pw->acct_tree = GTK_WIDGET(gnc_tree_view_account_new (FALSE));
gtk_container_add (GTK_CONTAINER (box), pw->acct_tree);
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(pw->acct_tree), FALSE);
gnc_payment_set_account_types (GNC_TREE_VIEW_ACCOUNT (pw->acct_tree));
- /* Set the dialog for the 'new' owner */
+ /* Set the dialog for the 'new' owner.
+ * Note that this also sets the post account tree. */
gnc_payment_dialog_owner_changed(pw);
/* Set the dialog for the 'new' invoice */
pw->invoice = invoice;
- gnc_payment_dialog_invoice_changed(pw);
+ if (invoice)
+ {
+ Account *postacct = gncInvoiceGetPostedAcc (invoice);
+ if (postacct)
+ {
+ gchar *acct_string = gnc_account_get_full_name (postacct);
+ gnc_cbe_set_by_string(GTK_COMBO_BOX_ENTRY(pw->post_combo), acct_string);
+ gnc_payment_dialog_post_to_changed(pw);
+ g_free(acct_string);
+ }
+ }
/* Setup signals */
gtk_builder_connect_signals_full( builder,
@@ -641,9 +860,6 @@
g_signal_connect (G_OBJECT (pw->owner_choice), "changed",
G_CALLBACK (gnc_payment_dialog_owner_changed_cb), pw);
- g_signal_connect (G_OBJECT (pw->invoice_choice), "changed",
- G_CALLBACK (gnc_payment_dialog_invoice_changed_cb), pw);
-
g_signal_connect (G_OBJECT (pw->acct_tree), "row-activated",
G_CALLBACK (gnc_payment_acct_tree_row_activated_cb), pw);
@@ -660,20 +876,6 @@
QOF_EVENT_CREATE | QOF_EVENT_MODIFY |
QOF_EVENT_DESTROY);
- /* Fill in the post_combo and account_tree widgets */
- gnc_fill_account_select_combo (pw->post_combo, pw->book, pw->acct_types, pw->acct_commodities);
-
- if (invoice)
- {
- Account *postacct = gncInvoiceGetPostedAcc (invoice);
- if (postacct)
- {
- gchar *acct_string = gnc_account_get_full_name (postacct);
- gnc_cbe_set_by_string(GTK_COMBO_BOX_ENTRY(pw->post_combo), acct_string);
- g_free(acct_string);
- }
- }
-
/* Show it all */
gtk_widget_show_all (pw->dialog);
g_object_unref(G_OBJECT(builder));
@@ -687,7 +889,9 @@
if (!text || safe_strcmp (text, "") == 0)
{
- /* XXX: I know there's only one type here */
+ /* The code below assumes there will only be one account type.
+ * Let's assert this to protect from potential future changes. */
+ g_assert (g_list_length (pw->acct_types) == 1);
acct_type = xaccAccountGetTypeStr(GPOINTER_TO_INT(pw->acct_types->data));
gnc_warning_dialog(pw->dialog,
_("You have no valid \"Post To\" accounts. "
Modified: gnucash/trunk/src/business/business-gnome/gtkbuilder/dialog-payment.glade
===================================================================
--- gnucash/trunk/src/business/business-gnome/gtkbuilder/dialog-payment.glade 2012-02-10 14:40:52 UTC (rev 21981)
+++ gnucash/trunk/src/business/business-gnome/gtkbuilder/dialog-payment.glade 2012-02-10 15:31:57 UTC (rev 21982)
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <requires lib="gtk+" version="2.18"/>
+ <requires lib="gtk+" version="2.20"/>
<object class="GtkDialog" id="Payment Dialog">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="title" translatable="yes">Process Payment</property>
<property name="type_hint">dialog</property>
<signal name="destroy" handler="gnc_payment_window_destroy_cb" swapped="no"/>
<child internal-child="vbox">
@@ -12,68 +13,236 @@
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">8</property>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area1">
+ <child>
+ <object class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
<child>
- <object class="GtkButton" id="cancelbutton">
- <property name="label">gtk-cancel</property>
+ <object class="GtkFrame" id="frame1">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
- <signal name="clicked" handler="gnc_payment_cancel_cb" swapped="no"/>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkHBox" id="owner_box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">The company associated with this payment.</property>
+ <property name="tooltip_text" translatable="yes">The company associated with this payment.</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="owner_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">The company associated with this payment.</property>
+ <property name="tooltip_text" translatable="yes">The company associated with this payment.</property>
+ <property name="label" translatable="yes">(owner)</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="okbutton">
- <property name="label">gtk-ok</property>
+ <object class="GtkFrame" id="frame5">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
- <signal name="clicked" handler="gnc_payment_ok_cb" swapped="no"/>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkComboBoxEntry" id="post_combo">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="model">post_combo_model</property>
+ <signal name="changed" handler="gnc_payment_dialog_post_to_changed_cb" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Post To</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hlayoutbox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">3</property>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkFrame" id="frame4">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkFrame" id="frame1">
+ <object class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label_xalign">0</property>
+ <property name="left_padding">12</property>
<child>
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hadjustment">docs_list_hor_adj</property>
+ <property name="vadjustment">docs_list_vert_adj</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTreeView" id="docs_list_tree_view">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hadjustment">docs_list_hor_adj</property>
+ <property name="vadjustment">docs_list_vert_adj</property>
+ <property name="model">docs_list_model</property>
+ <property name="reorderable">True</property>
+ <property name="search_column">0</property>
+ <property name="fixed_height_mode">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="docs_list_treeview_sel">
+ <signal name="changed" handler="gnc_payment_dialog_document_selection_changed_cb" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="docs_list_col_date">
+ <property name="resizable">True</property>
+ <property name="sizing">fixed</property>
+ <property name="min_width">50</property>
+ <property name="title" translatable="yes">Date</property>
+ <property name="reorderable">True</property>
+ <child>
+ <object class="GtkCellRendererText" id="docs_list_date_renderer"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="docs_list_col_num">
+ <property name="resizable">True</property>
+ <property name="sizing">fixed</property>
+ <property name="min_width">50</property>
+ <property name="title" translatable="yes">Number</property>
+ <property name="reorderable">True</property>
+ <child>
+ <object class="GtkCellRendererText" id="docs_list_num_renderer"/>
+ <attributes>
+ <attribute name="text">1</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="docs_list_col_type">
+ <property name="resizable">True</property>
+ <property name="sizing">fixed</property>
+ <property name="min_width">50</property>
+ <property name="title" translatable="yes">Type</property>
+ <property name="reorderable">True</property>
+ <child>
+ <object class="GtkCellRendererText" id="docs_list_type_renderer"/>
+ <attributes>
+ <attribute name="text">2</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="docs_list_col_deb">
+ <property name="resizable">True</property>
+ <property name="sizing">fixed</property>
+ <property name="min_width">50</property>
+ <property name="title" translatable="yes">Debet</property>
+ <property name="reorderable">True</property>
+ <child>
+ <object class="GtkCellRendererText" id="docs_list_deb_renderer"/>
+ <attributes>
+ <attribute name="text">3</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="docs_list_col_cred">
+ <property name="resizable">True</property>
+ <property name="sizing">fixed</property>
+ <property name="min_width">50</property>
+ <property name="title" translatable="yes">Credit</property>
+ <property name="reorderable">True</property>
+ <child>
+ <object class="GtkCellRendererText" id="docs_list_cred_renderer"/>
+ <attributes>
+ <attribute name="text">4</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Documents</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -84,38 +253,6 @@
<property name="border_width">3</property>
<property name="homogeneous">True</property>
<child>
- <object class="GtkLabel" id="owner_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">The company associated with this payment.</property>
- <property name="xalign">1</property>
- <property name="label">(owner)</property>
- <property name="justify">right</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="invoice_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">The invoice being paid.
-
-Note that is field is optional. If you leave it blank, GnuCash will automatically assign the payment to the first unpaid invoice for this company.</property>
- <property name="xalign">1</property>
- <property name="label">(invoice)</property>
- <property name="justify">right</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
<object class="GtkLabel" id="date_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -126,13 +263,19 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">2</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="amount_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">The amount to pay for this invoice.
+
+If you have selected an invoice, GnuCash will propose the amount still due for it. You can change this amount to create a partial payment or an over-payment.
+
+In case of an over-payment or if no invoice was selected, GnuCash will automatically assign the remaining amount to the first unpaid invoice for this company.</property>
<property name="tooltip_text" translatable="yes">The amount to pay for this invoice.
If you have selected an invoice, GnuCash will propose the amount still due for it. You can change this amount to create a partial payment or an over-payment.
@@ -145,7 +288,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">3</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
@@ -159,7 +302,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">4</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -173,7 +316,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">5</property>
+ <property name="position">3</property>
</packing>
</child>
</object>
@@ -190,38 +333,6 @@
<property name="border_width">3</property>
<property name="homogeneous">True</property>
<child>
- <object class="GtkHBox" id="owner_box">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">The company associated with this payment.</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="invoice_box">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">The invoice being paid.
-
-Note that is field is optional. If you leave it blank, GnuCash will automatically assign the payment to the first unpaid invoice for this company.</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
<object class="GtkHBox" id="date_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -232,13 +343,19 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">2</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="amount_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">The amount to pay for this invoice.
+
+If you have selected an invoice, GnuCash will propose the amount still due for it. You can change this amount to create a partial payment or an over-payment.
+
+In case of an over-payment or if no invoice was selected, GnuCash will automatically assign the remaining amount to the first unpaid invoice for this company.</property>
<property name="tooltip_text" translatable="yes">The amount to pay for this invoice.
If you have selected an invoice, GnuCash will propose the amount still due for it. You can change this amount to create a partial payment or an over-payment.
@@ -251,29 +368,33 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">3</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="num_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="invisible_char_set">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">4</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="memo_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="invisible_char_set">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">5</property>
+ <property name="position">3</property>
</packing>
</child>
</object>
@@ -285,82 +406,111 @@
</child>
</object>
</child>
- <child type="label">
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Payment Information</property>
- </object>
- </child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
</child>
- <child>
- <object class="GtkFrame" id="frame4">
+ <child type="label">
+ <object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkComboBoxEntry" id="post_combo">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="model">post_combo_model</property>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Post To</property>
- <property name="use_markup">True</property>
- </object>
- </child>
+ <property name="label" translatable="yes">Payment Information</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame3">
+ <object class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkScrolledWindow" id="acct_window">
- <property name="width_request">250</property>
+ <object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="border_width">3</property>
+ <property name="left_padding">12</property>
<child>
- <placeholder/>
+ <object class="GtkScrolledWindow" id="acct_window">
+ <property name="width_request">250</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="border_width">3</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
</child>
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label7">
+ <object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Transfer Account</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
</child>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="cancelbutton">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="gnc_payment_cancel_cb" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="okbutton">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="gnc_payment_ok_cb" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
@@ -368,7 +518,8 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
</packing>
</child>
</object>
@@ -378,15 +529,52 @@
<action-widget response="-5">okbutton</action-widget>
</action-widgets>
</object>
- <object class="GtkListStore" id="post_combo_model">
+ <object class="GtkAdjustment" id="docs_list_hor_adj">
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkListStore" id="docs_list_model">
<columns>
- <!-- column-name gchararray -->
+ <!-- column-name doc_date -->
<column type="gchararray"/>
+ <!-- column-name doc_id -->
+ <column type="gchararray"/>
+ <!-- column-name doc_type -->
+ <column type="gchararray"/>
+ <!-- column-name doc_deb -->
+ <column type="gchararray"/>
+ <!-- column-name doc_cred -->
+ <column type="gchararray"/>
+ <!-- column-name doc_lot -->
+ <column type="gpointer"/>
</columns>
<data>
<row>
- <col id="0">Dummy Entry</col>
+ <col id="0" translatable="yes">01-01-2011</col>
+ <col id="1" translatable="yes">35006</col>
+ <col id="2" translatable="yes">Invoice</col>
+ <col id="3" translatable="yes">100,00 €</col>
+ <col id="4" translatable="yes"></col>
</row>
+ <row>
+ <col id="0" translatable="yes">05-10-2011</col>
+ <col id="1" translatable="yes">Test-VS3</col>
+ <col id="2" translatable="yes">Credit Note</col>
+ <col id="3" translatable="yes"></col>
+ <col id="4" translatable="yes">50,00 €</col>
+ </row>
</data>
</object>
+ <object class="GtkAdjustment" id="docs_list_vert_adj">
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkListStore" id="post_combo_model">
+ <columns>
+ <!-- column-name gchararray -->
+ <column type="gchararray"/>
+ </columns>
+ </object>
</interface>
More information about the gnucash-changes
mailing list