Payments to supplier are allocated to purchase invoices first

I’m not sure if this behaviour is as designed or it’s a bug, so I’m posting here in the hope of getting some clarification. It took me by surprise.

We have an employee who is providing consultancy services to us, so he invoices us as a supplier rather than being treated as an employee and going on the payroll. Let us call him Supplier A.

We incur an expense from another supplier, Supplier B, which Supplier A settles for us out of his pocket. I record this with a journal entry, crediting Supplier A’s Accounts payable and debiting Supplier B’s Accounts payable the same amount.

Supplier A then invoices us for his services, which have nothing to do with Supplier B or his payment to them.

We pay Supplier A the amount invoiced, allocating it to his Accounts payable without specifying the invoice in the payment screen. We still haven’t reimbursed him for the expense from Supplier B that he covered for us.

Both invoices (from Supplier B and Supplier A) now show as being paid in full.

image

I expected the payment to Supplier A to be allocated to the journal entry first (as it was done on an earlier date), and then for any remaining balance to be allocated to the purchase invoice. But it looks like the purchase invoice has higher priority. Drilling down on the Accounts payable for Supplier A does show the correct transactions and amounts:


…but my expectation was that the amount owing to Supplier A would have been shown against his invoice, as that is the most recent debit on his account.

Of course, if Supplier A was an employee or had a capital account, we could have recorded his payment to Supplier B as an expense claim, which would probably be a better way to handle it. I did consider implementing that, but then we need to check two accounts to see how much is owed to him. With my method above all his transactions are connected to a single account.

@lubos I have discovered possibly a bug or maybe something that needs to be fixed.

I created a Purchase Invoice for Supplier2.

I clicked on New Payment and intentionally changed the Payee to Supplier3. the line account automatically changed to the Supplier3 but the invoice selection was retained by Manager.

The Payment now shows Supplier3 as the *Payee* but the line description is switched back to Supplier2.

The purchase invoice now shows paid in full and the Suppliers tab does not show any transaction amount for Supplier3.

now my questions are,

  • shouldn’t Manager remove the purchase invoice selection on the line item when the Payee is changed?

  • if Manager allows another Payee for payment towards another accounts payable account, shouldn’t Manager show a payable figure against the Payee?