How to pay "Purchase Invoice" as Employee Expense

I have a Purchase invoice which an Employee has paid.

how do I book that correctly in ERPNext in a way that

  1. the PINV will be marked as paid
  2. a new liability against the Employee is created

hm, I can’t believe no one else had to deal with such a situation and may have figured out how to do it.

Anybody out there who may be able to help? It’s quite a road block to not being able to book such a transaction.

HI @vrms

as you know ERPNext dosent support it right now. if in your case, you have only few employees, who are paying on behalf of company, and they are doing it quite frequently, you can open a separate GL account for that employee and link it with Mode Of Payment for quick use.

Remember, it’s a workaround and it has nothing to do with employee but new GL account you can name it same like employee name.

Regards,
Adnan

Hey vrms. I have developed a feature, to be able to select Purchase Invoice in Expense Claim. I shall be making a pull request sometime.

But as a workaround you could also just make a Journal Entry like:

Supplier             100 Dr (against Purchase Invoice)
     Employee            100 Cr

thanks, I’ll look into that

good to hear that. thx @saifi0102. So, if someone like me would want to have that merged into v11 the work would be to have this regarded a bug fix rather then a new feature (in which case it would only go into the develop [v12] branch). Are you aware whether there exists any github issue on this matter?

Well. I don’t think you can get it merged in v11 since the maintainers only accept bug fixes and this is a feature. However I develop all my features for both v11 and v12 so you can still merge my branch when it’s ready

I’m afraid that isn’t workable. When I try to add a new Mode of Payment the only CoA accounts I can choose are Asset accounts, but the Employee Expenses Payable I use to create those liabilities against employees (which is what we need here) is of course a payable account. So the ‘Mode of payment’ route does not work out I’m apparently.


that’s (as per @saifi0102’s advice is how it works in detail


line      | Account                             | Party                    |  Dr/Cr   |
---------------------------------------------------------------------------------------
line 1    |  Payable account of PINV            | Supplier (against PINV)  |  Debit   |   
line 2    |  Payable account employee expenses  | Employee                 |  Credit  |  

thanks at you both for the input

Hello @saifi0102 , can you please advise how did you do the link between Expense Claim and Purchase Invoice? what type of data is fetched? how did the payment against the expense claim reflect in the purchase invoice to be marked as paid? also how did you handle the entire accounting part of it?

Regards,
Mohamad Salhani

  • If you follow my comments in this post you’ll get a better idea.
  • I made major customization to Expense Claim feature which cannot be part of official ERPNext repository
  • The idea is that expense claim has to post a GL Entry with it’s against_voucher as the Purchase Invoice you want to link it against.

at least linking an expense claim to a purchase invoice should be a feature for everyone (much needed as I would say). I would even go as far to say expense claim makes no sense whatsoever if you can not link it to a PINV. I mean the decision to book an expense against a PINV or not would be completely random just by that fact whether it was maybe paid by an Employee, or directly with company money.

The current status contradicts (or even sabotages) the basic mechanics of ERPNext which has invoices as a central building block. If you can not link an expense claim to a Purchase Invoice this contradicts the entire basic idea.

  1. Just for my understanding would you mind to specify which part of your customizations you mention you think would not be generic enough to be merged into the core?
  2. Would you consider to produce a PR for the parts of your changes that are mergable?
2 Likes
  1. It’s quite generic, however, it’s not separated in form of a branch and touches a lot of files in many spread-out commits so it’s not easy to bring that into the core
  2. Yes, however, if it is sponsored by someone or the foundation