gnucash stable: Allow more account types in the payment window's transfer account list

Geert Janssens gjanssens at code.gnucash.org
Tue Dec 31 09:38:04 EST 2024


Updated	 via  https://github.com/Gnucash/gnucash/commit/83b49c34 (commit)
	from  https://github.com/Gnucash/gnucash/commit/8b4347de (commit)



commit 83b49c34fee75a5c4363a3d463800e58bf9cac19
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Tue Dec 31 15:30:43 2024 +0100

    Allow more account types in the payment window's transfer account list
    
    So far it was limited to Asset, Liability, Credit Card
    and either Income (for customer payments) or Expenses (for vendor payments).
    
    There are however use cases where a customer payment also covers
    expenses (like for example a Paypal service charge).
    
    To allow for as many edge cases as possible the
    filter now only excludes those account types I worry
    will break the business logic: AP and AR accounts.
    That is, with this change you won't be able to create a
    customer payment (which necessarily has one split an an AR account)
    that transfers to another AR or to an AP account.
    
    While even that may work, I am sure the business features weren't
    designed to cope with this and I can't exhaustively test that.

diff --git a/gnucash/gnome/dialog-payment.c b/gnucash/gnome/dialog-payment.c
index d73d093361..10c4aa0bb1 100644
--- a/gnucash/gnome/dialog-payment.c
+++ b/gnucash/gnome/dialog-payment.c
@@ -1150,7 +1150,7 @@ gnc_payment_set_account_types (GncTreeViewAccount *tree)
     gnc_tree_view_account_get_view_info (tree, &avi);
 
     for (i = 0; i < NUM_ACCOUNT_TYPES; i++)
-        avi.include_type[i] = gncBusinessIsPaymentAcctType (i);
+        avi.include_type[i] = !xaccAccountIsAPARType (i);
 
     gnc_tree_view_account_set_view_info (tree, &avi);
 }



Summary of changes:
 gnucash/gnome/dialog-payment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



More information about the gnucash-changes mailing list