GNOME Bugzilla – Bug 724578
Problems clearing incompletely paid invoices
Last modified: 2018-06-29 23:26:43 UTC
Experienced with a git checkout b7b5128+: I had a little credit (36.50) originating from an overpaid invoice from last year with one of my vendors. Now the first invoice from this vendor arrived (69.00) and I have paid only the difference (32.50) by bank transfer. I then imported the bank transactions, and had a hard time assigning the transaction as a payment in such a way that the invoice was marked as "paid". What I did was: I selected the customer, and the associated account (that had a balance of 36.50). I was then presented a choice of three documents to pick from. The invoice over 69.00, and two pre-payments of 32.50 and 36.50 respectively. After several unsuccessful tries I selected the invoice and changed the sum of the payment from 32.50 to 69.00. The resulting transaction then contained an imbalance split of 36.50 that I deleted. All balances are now correct and the invoice is finally marked as paid. But is that really the intended way to handle such a case? --- Everything above quoted from a request to the mailing list. --- Would the recommended approach to the problem be - like Geert recommended in a related case - to always book the payments against an intermediate account? That would turn the issue into a documentation bug.
This has now been fixed in https://github.com/Gnucash/gnucash/commit/0c7c3356 There were a few problems with that Assign As Payment method. Your case can now be solved in several ways. Starting from your original situation: 36.50 overpaid and a new invoice of 69.00 arriving. What happens next depends on the preference "Autopay on posting". If this preference is enabled this will happen: - when you post your new invoice GnuCash will automatically assign a payment of 36.50 to this invoice. So the open balance is then 32.50 - when you import your bank transactions, there will be a transaction of 32.50 - you can use Assign as Payment on that transaction - in the Payment dialog, select your vendor - in the list of documents you only have to select the invoice (indicating a 32.50 unpaid balance) If this preference is not enabled, this will happen: - when you post your new invoice GnuCash will not assign any payment to it automatically. So the open balance is is 69.00 - when you import your bank transactions, there will be a transaction of 32.50 - you can use Assign as Payment on that transaction - in the Payment dialog, select your vendor - in the list of documents you will now see your invoice with a 69.00 balance and the pre-payment/overpayment of 36.50. Select both of them together and hit ok. In both cases your invoice should now properly be paid. These improvements will appear in GnuCash 2.6.2.
Created attachment 281329 [details] Test case "initial.gnucash"
I am on git-master 2869e941 and the problem does not seem to be fixed for me. Your three commits 0c7c3356, f0f3a8e8, and 8cc9f175 are included in my build. Starting from the attached "initial.gnucash" I do the following: A. 1. I check "Business -> Bills -> auto pay on posting" in my preferences. 2. I post the bill unchanged. 3. I go to the bank account, select the payment of 32.50 and "assign as payment". 4. I select the vendor, select the bill document (amount 36.50), leave the payment sum of 32.50 unchanged, and hit okay. 5. I select Menu->Business->Bills Due Reminder, and the bill shows up with an amount of 4.00. B. 1. I unpost the invoice, and unselect "Business -> Bills -> auto pay on posting" in my preferences. 2. I post the bill again unchanged. 3. I go to the bank account, select the payment of 32.50 and "assign as payment". 4. I select the vendor, select the both documents (the pre-payment with debit 32.50, and the bill with credit 69.00), leave the payment sum of 32.50 unchanged, and hit okay. 5. I select Menu->Business->Bills Due Reminder, and the bill shows up with an amount of 36.50. Did I misunderstand you or is your fix not sufficient?
Hi Guido, My apologies for the delayed reply. I have run your two example scenarios and I agree there is a bug still. (In reply to comment #3) > I am on git-master 2869e941 and the problem does not seem to be fixed for me. > Your three commits 0c7c3356, f0f3a8e8, and 8cc9f175 are included in my build. > > Starting from the attached "initial.gnucash" I do the following: > > A. > > 1. I check "Business -> Bills -> auto pay on posting" in my preferences. > 2. I post the bill unchanged. > 3. I go to the bank account, select the payment of 32.50 and "assign as > payment". > 4. I select the vendor, select the bill document (amount 36.50), leave the > payment sum of 32.50 unchanged, and hit okay. > 5. I select Menu->Business->Bills Due Reminder, and the bill shows up with an > amount of 4.00. > This scenario reveals the bug. With "auto pay on posting" enabled the bank payment of 32.50 was assigned to your invoice the moment you post it. There are two indicators for this when you chose "Assign as payment": 1. The bank payment of 32.50 was no longer in the list of selectable documents/payments as a pre-payment 2. The bill's amount due was already reduced to 36.50. But even in that case gnucash should have done the right thing. It did not so that's a bug. To avoid the bug and get your bill fully paid you could instead have: 1. post the bill (which in this case automatically assigne the pre-payment) 2. assign your opening balance as a payment... except you hit another bug here that equity accounts can't currently be selected for bill payments (bug 630638). The only way around this currently is to record your opening balance in an asset or liability account instead of equity and assign the payment from there. > B. > > 1. I unpost the invoice, and unselect "Business -> Bills -> auto pay on > posting" in my preferences. > 2. I post the bill again unchanged. > 3. I go to the bank account, select the payment of 32.50 and "assign as > payment". > 4. I select the vendor, select the both documents (the pre-payment with debit > 32.50, and the bill with credit 69.00), leave the payment sum of 32.50 > unchanged, and hit okay. > 5. I select Menu->Business->Bills Due Reminder, and the bill shows up with an > amount of 36.50. > So in this scenario you directly got to the point where only the opening balance still has to be assigned. The same problem as above exists in that you can't assign payments from an equity account. > Did I misunderstand you or is your fix not sufficient? My fix was not sufficient. The good news is that the bug which you hit in your first scenario has been fixed in the meantime and as of gnucash 2.6.4 you can safely assign payments in both scenarios. The issue that you can't assign payments from equity accounts still stands though. This is tracked separately in bug 630638. Which means this bug can remain as resolved.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=724578. Please update any external references or bookmarks.