Business invoices over/pre payments

Geert Janssens janssens-geert at
Wed Apr 30 07:39:15 EDT 2014

On Wednesday 30 April 2014 12:07:06 Mike Evans wrote:
> Hi Geert.
> Ah OK, that clears everything up.  I didn't know about selecting
> multiple invoices and/or Pre-payments, or the Preferences option.  It
> definitely needs to go in the documentation.
> As to mouse over text and the manual, I obviously need to have more
> experience with the new-fangled way of doing things before suggesting
> anything. :)
> The two paras below are just me confirming the behaviour, it all seems
> to work as intended.
> As a test in a new file I created two invoices of 400 each, posted
> them and received 1000 which I paid against invoice-01.  Then
> selecting invoice-02 + Prepayment(of 600) again processed the
> payment.  Now looking at my checking account I see 1000 in and 200
> out.  But I wanted to keep that 200 against the next invoice I give
> the customer.  I can however delete that entry from the bank register
> and all is well again.
> Now reopening the test account, without saving (in order to try again)
>  I do as above except, for invoice-02 I again select both the invoice
> and the Pre-payment and attempt to set it up so that the I get to
> keep the extra money.  On opening the dialog, in the Amount section,
> Payment = 0.0 and refund = 200, but I want to keep the 200. The
> customer is happy that I do this obviously.  Setting Refund to 0.0
> greys out entire Transfer Account tree, which was a little confusing
> as I thought I'd screwed up again, but clicking OK processes the
> money the way I want.  I get to keep the money!
> I assume you refer to "Auto pay on posting" in the Preferences dialog?
>   This only works when posting a new invoice when a Pre-payment is
> already present.  If the two invoices are already posted before the
> (over)payment then the automatic payment doesn't happen, as it used
> to.  I had to unpost then re-post invoice-02 for this to work. 
> Perhaps I mis-understood again.
That's a subtle change in behaviour indeed. It works as follows:
If you select any invoice in the payment dialog it will only evaluate those invoices for the 
payment. If you want the payment dialog to evaluate all open invoices (i.e. the old behaviour), 
you should ensure no invoice is selected at all.

It's been a couple of months since I have written this code and I can't remember exactly if I 
tested all variations with outstanding pre-payments as well. I *believe* the above should 
count for pre-payments as well. If you want full automatic assignment don't select any line in 
the payment dialog, only enter an amount.
> Thanks for clearing up my confusion Geert.  I should open a bug (or
> two) for updating the manual and the mouseover texts so this doesn't
> get forgotten about.
Please do, thank you.


More information about the gnucash-devel mailing list