[GNC] Why did "Assign as payment…" remove splits and notes from my payment transaction?

Jediator jediator at artemisspace.com
Tue Dec 31 11:16:22 EST 2024


You really don't want to read the code.  It would be more confusing and 
you would have more questions than answers.  I will try to answer your 
questions as best I can.

Q1 & Q2:  I guess the term "rewrite transaction" may not be accurate.  
What really happened is that the transaction entry in your cash account, 
when you assign it as payment to an invoice, will be linked to a new 
payment entry in the AP registry, indicating that the invoice is paid.  
The old entry in your cash account, regardless if it has a split or not, 
will be removed or discarded.  This is due to the double-entry system of 
GnuCash.  Each transaction has two entries in two different accounts.  
So when you changed one entry to a different account, GnuCash 
automatically removed the entry in the old account.  In your case of 
assigning a payment to an invoice, you basically change the payment 
entry to a new one in AP.  The old one will be removed.

Q3: Again, the correct way to do this is create multiple entries in your 
invoice.  Say if you create an itemized invoice with parts and labor and 
shipping etc., you create an invoice entry for each item associated with 
a corresponding income account.  When the invoice is created, an invoice 
entry with split will be created in your AP account.  When you assign a 
payment from a cash account, a new payment entry will be created in the 
same AP account, which balances out that invoice.

Q4: When an invoice is paid, you should see an entry in the AP account 
with the same amount in the payment column.  Or you can view in the 
customer report.  Unfortunately the current customer report doesn't show 
which payment is for which invoice (maybe a new feature request is 
needed), especially when you have multiple invoices with the same 
amount.  So what I usually do is to manually enter the invoice ID in the 
reference field when assigning a payment or directly in the AP registry.

Hope this helps!  Cheers!

ND

On 12/30/24 4:45 PM, Jim DeLaHunt wrote:
> Thank you for the reply. It leads me to further questions.
>
>> When you assign payment to the invoice, the existing transaction will 
>> be overwritten with an entry in the account payable, and the split 
>> will apply automatically in the AP.
> This certainly matches what I observe in my GnuCash book, but it 
> certainly is not what I want to happen.  Can you point me to further 
> documentation about what GnuCash intends to do when I assign a 
> transaction as payment? Or, can you point me to which parts of the 
> code I should read?
>
> This also does not match what I took from the documentation. The 
> GnuCash manual, section 7.6. "Process Invoice Payment", says:
>
>> There is an alternative way of assigning a payment to (one or more) 
>> invoices where the payment transaction already exists…. This can best 
>> be done starting from the asset account register holding the imported 
>> payment transaction (like your bank account). In that account, select 
>> the payment, right-click ([two-finger]-click for |macOS|) and choose 
>> *Assign as payment...*. The payment window will pop-up, partly filled 
>> in with the information from the transaction. Fill in the missing 
>> information like the proper customer and invoice to complete the 
>> payment.
>>
> This does not mention that the payment transaction will get rewritten, 
> and splits will get discarded.
>
> It occurs to me that one workaround is that I enter the payment 
> transaction as if there were no service charges. Then I assign the 
> transaction as payment for the invoice, letting GnuCash rewrite it. 
> Then I modify the transaction to add the service charge and reduce the 
> amount deposited in my bank account.
>
> Also, you advise:
>
>> You should create your three-split transactions in your invoice…
> I am a bit surprised by this.  Do you mean that I should I should list 
> the service charge from my payment processor as a credit in the 
> invoice, where the customer will see it?  It seems to me that my 
> customer won't care, and does not need to know, details about the 
> terms and feed of my payment processor.
>
> Implicit answers to my questions:
>
>> Q1. Is this the expected behaviour?
> Apparently "yes".
>
>
>> Q2. What does the "Assign as payment" of a payment transaction to an 
>> invoice actually do?  The GnuCash manual, section 7.6. "Process 
>> Invoice Payment", says what steps to take to perform an assignment, 
>> but it does not explain what GnuCash does in the course of the 
>> assignment.  It does not lead me to believe that it will rewrite a 
>> transaction, and discard splits.
> Apparently the expected behaviour is for GnuCash to rewrite the 
> payment transaction.
>
> These questions are still open:
>
>> Q3. What is the correct way to enter a transaction which pays an 
>> invoice and incurs service fees? Should I always create the 
>> transaction with "Process Payment…" from the business features if it 
>> will eventually be part of an invoice payment?  Is there a way to 
>> make an existing transaction an invoice payment without losing what I 
>> put into the transaction?
>>
>> Q4. If I have an invoice marked PAID, how do I see which transactions 
>> are assigned as the payments for that transaction?
>
> Thank you for the help. I would be happy to have even more. And 
> thanks, as always, for the people who developed all these helpful 
> business features, even though I am quibbling about them now. Best 
> regards,
>       —Jim DeLaHunt
>
>
> On 2024-12-28 08:38, Jediator wrote:
>> You should create your three-split transactions in your invoice, 
>> instead of doing this in the account register.  When you assign 
>> payment to the invoice, the existing transaction will be overwritten 
>> with an entry in the account payable, and the split will apply 
>> automatically in the AP.  Hope this helps..
>>
>> Cheers! --ND
>>
>>
>> On 12/27/24 10:09 PM, Jim DeLaHunt wrote:
>>> Hi, folks:
>>>
>>> I have used little bits of the business features of GnuCash for a 
>>> long time, but I don't know them well. I just tried to assign a 
>>> Paypal transaction as a payment, and it looks like GnuCash changed 
>>> the transaction in ways I don't understand.
>>>
>>> I had an invoice for a customer. The invoice was posted, so my 
>>> accounts receivable account had an entry for that invoice.
>>>
>>> The customer paid me using Paypal. Paypal deducted a service fee. I 
>>> entered a three-split transaction in GnuCash:
>>>
>>> Debit $X    Asset:Paypal account, where $X is the gross amount of 
>>> the invoice
>>> Credit    $Y  Expense:Fees account, where $Y is the service fee 
>>> Paypal charged
>>> Credit   $(X-Y) Asset:Accounts Payable, where $X-Y is the net amount 
>>> received
>>>
>>> I selected this transaction, brought up the context menu, and 
>>> selected "Assign as payment…". A dialogue appeared. It had the 
>>> amount $(X-Y) filled in, so I changed it to $X. It had the date of 
>>> the Paypal transaction.  The invoice was in the Documents list in 
>>> the centre of the dialogue, so I selected that. I pressed the [OK] 
>>> button.
>>>
>>> Now, the transaction was changed. It had only two splits:
>>>
>>> Debit $X    Asset:Paypal account, where $X is the gross amount of 
>>> the invoice
>>> Credit   $X Asset:Accounts Payable
>>>
>>> My split with $Y for the service fee was nowhere to be found. Also, 
>>> the Description for the transaction, and the Notes on each split, 
>>> were changed to just have the customer name.
>>>
>>> Q1. Is this the expected behaviour?
>>>
>>> Q2. What does the "Assign as payment" of a payment transaction to an 
>>> invoice actually do?  The GnuCash manual, section 7.6. "Process 
>>> Invoice Payment", says what steps to take to perform an assignment, 
>>> but it does not explain what GnuCash does in the course of the 
>>> assignment.  It does not lead me to believe that it will rewrite a 
>>> transaction, and discard splits.
>>>
>>> Q3. What is the correct way to enter a transaction which pays an 
>>> invoice and incurs service fees? Should I always create the 
>>> transaction with "Process Payment…" from the business features if it 
>>> will eventually be part of an invoice payment?  Is there a way to 
>>> make an existing transaction an invoice payment without losing what 
>>> I put into the transaction?
>>>
>>> Q4. If I have an invoice marked PAID, how do I see which 
>>> transactions are assigned as the payments for that transaction?
>>>
>>> I am using GnuCash 5.8 on macOS Sonoma 14.7.2. The transaction and 
>>> invoice in question were entered years ago, but I never bothered to 
>>> assign the payment to the invoice until now.
>>>
>>> Colour me confused.
>>>
>>>       —Jim DeLaHunt
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> gnucash-user mailing list
>>> gnucash-user at gnucash.org
>>> To update your subscription preferences or to unsubscribe:
>>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>>> -----
>>> Please remember to CC this list on all your replies.
>>> You can do this by using Reply-To-List or Reply-All.
>>
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user at gnucash.org
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.



More information about the gnucash-user mailing list