From e19766bd2e7cdce1a35b89f9e1897c4604b439b0 Mon Sep 17 00:00:00 2001 From: Ron Bessems Date: Sun, 23 Feb 2025 19:37:03 -0800 Subject: [PATCH 1/2] Add Customer's invoices to custom list popup --- gnucash/gnome/gnc-plugin-page-owner-tree.cpp | 23 ++++++++++++++++++++ gnucash/ui/gnc-plugin-page-owner-tree.ui | 7 +++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/gnucash/gnome/gnc-plugin-page-owner-tree.cpp b/gnucash/gnome/gnc-plugin-page-owner-tree.cpp index 3bd754db7f..ca0cf81e2d 100644 --- a/gnucash/gnome/gnc-plugin-page-owner-tree.cpp +++ b/gnucash/gnome/gnc-plugin-page-owner-tree.cpp @@ -130,6 +130,7 @@ static void gnc_plugin_page_owner_tree_cmd_owners_report (GSimpleAction *simple, static void gnc_plugin_page_owner_tree_cmd_owner_report (GSimpleAction *simple, GVariant *parameter, gpointer user_data); static void gnc_plugin_page_owner_tree_cmd_process_payment (GSimpleAction *simple, GVariant *parameter, gpointer user_data); static void gnc_plugin_page_owner_tree_cmd_edit_tax (GSimpleAction *simple, GVariant *parameter, gpointer user_data); +static void gnc_plugin_page_owner_tree_cmd_search_invoices (GSimpleAction *simple, GVariant *parameter, gpointer user_data); static guint plugin_page_signals[LAST_SIGNAL] = { 0 }; @@ -159,6 +160,7 @@ static GActionEntry gnc_plugin_page_owner_tree_actions [] = { "OTCustomerReportAction", gnc_plugin_page_owner_tree_cmd_owner_report, NULL, NULL, NULL }, { "OTEmployeeReportAction", gnc_plugin_page_owner_tree_cmd_owner_report, NULL, NULL, NULL }, { "OTProcessPaymentAction", gnc_plugin_page_owner_tree_cmd_process_payment, NULL, NULL, NULL }, + { "OTSearchInvoicesAction", gnc_plugin_page_owner_tree_cmd_search_invoices, NULL, NULL, NULL }, }; /** The number of actions provided by this plugin. */ static guint gnc_plugin_page_owner_tree_n_actions = G_N_ELEMENTS(gnc_plugin_page_owner_tree_actions); @@ -1008,6 +1010,27 @@ gnc_plugin_page_owner_tree_cmd_edit_owner (GSimpleAction *simple, LEAVE(" "); } +static void +gnc_plugin_page_owner_tree_cmd_search_invoices (GSimpleAction *simple, + GVariant *parameter, + gpointer user_data) + +{ + auto page = GNC_PLUGIN_PAGE_OWNER_TREE (user_data); + GtkWindow *parent; + GncOwner *owner = gnc_plugin_page_owner_tree_get_current_owner (page); + if (NULL == owner) return; + + ENTER("action %p, page %p", simple, page); + + parent = GTK_WINDOW (gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page))); + + gnc_invoice_search (parent, NULL, owner, gnc_get_current_book ()); + + LEAVE(" "); +} + + #if 0 /* Disabled due to crash */ static void gnc_plugin_page_owner_tree_cmd_delete_owner (GSimpleAction *simple, diff --git a/gnucash/ui/gnc-plugin-page-owner-tree.ui b/gnucash/ui/gnc-plugin-page-owner-tree.ui index f38fd05125..0b08c8a515 100644 --- a/gnucash/ui/gnc-plugin-page-owner-tree.ui +++ b/gnucash/ui/gnc-plugin-page-owner-tree.ui @@ -42,7 +42,7 @@ yes - + E_dit Employee @@ -170,6 +170,11 @@ GncPluginPageOwnerTreeActions.OTProcessPaymentAction Process Payment + + Customer's Invoices + GncPluginPageOwnerTreeActions.OTSearchInvoicesAction + Customer's Invoices + From d44f3d68fc72fee189c81b05839c95faa1010212 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Sat, 31 Jan 2026 13:00:35 +0800 Subject: [PATCH 2/2] Addendum parent commit -- expand to other owner documents --- gnucash/ui/gnc-plugin-page-owner-tree.ui | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/gnucash/ui/gnc-plugin-page-owner-tree.ui b/gnucash/ui/gnc-plugin-page-owner-tree.ui index 0b08c8a515..b62fca74a9 100644 --- a/gnucash/ui/gnc-plugin-page-owner-tree.ui +++ b/gnucash/ui/gnc-plugin-page-owner-tree.ui @@ -160,6 +160,11 @@ GncPluginPageOwnerTreeActions.OTNewInvoiceAction Create a new invoice + + Find Customer Invoices… + GncPluginPageOwnerTreeActions.OTSearchInvoicesAction + Open the Find Invoice Dialog with the invoices already filtered for this customer + Customer Report GncPluginPageOwnerTreeActions.OTCustomerReportAction @@ -170,11 +175,6 @@ GncPluginPageOwnerTreeActions.OTProcessPaymentAction Process Payment - - Customer's Invoices - GncPluginPageOwnerTreeActions.OTSearchInvoicesAction - Customer's Invoices - @@ -199,6 +199,11 @@ GncPluginPageOwnerTreeActions.OTNewBillAction Create a new bill + + Find Vendor Bills… + GncPluginPageOwnerTreeActions.OTSearchInvoicesAction + Open the Find Bill Dialog with the bills already filtered for this vendor + Vendor Report GncPluginPageOwnerTreeActions.OTVendorReportAction @@ -233,6 +238,11 @@ GncPluginPageOwnerTreeActions.OTNewVoucherAction Create a new voucher + + Find Employee Vouchers… + GncPluginPageOwnerTreeActions.OTSearchInvoicesAction + Open the Find Employee Voucher Dialog with the vouchers already filtered for this employee + Employee Report GncPluginPageOwnerTreeActions.OTEmployeeReportAction