Keeping track of amounts due generated by the Payroll module

Hi everyone:

May I have your input on the way I have set up the Payroll and help me to check if it is the right way to do it? I’m not confident that I have grasped the concepts here.

This is what I have achieved so far:

With the standard functionality of the Payroll module I’m able to produce the Journal that contains entries for the salary due, and extra lines to record the money that we have to pay to other “suppliers” (health providers, contributions and other things like that).

Our customization is quite simple: We have created a server script that before submitting the Journal created by the Payroll, modifies every line to set the type and the employee/supplier according to the account type (The purpose is to keep track of what is due. That’s why there are accounts defined as type Payables besides their expenses counterparts).

In that way, we can nicely use ERPNext standard reports to check what is due. Please see here where the Accounts Payable show the amount due to every supplier and also for the extra concepts to pay to the employee that are not part of the standard salary:

However it has two problems:

  1. To pay those amount dues I have used another Journal ( I was not able to use a standard Payment for that ). While it works because I’m mainly creating a record on the opposed debit/credit for the account, party, and amount due, it seems I have to later run the reconciliation tool, to match the payments, which is very time consuming. Is this the right way to do it, or a way to prevent that extra reconciliation (ie: doing it when entering the payment Journal)?

  2. The payment of the salary seems to not be tracked by the standard reports. It seems we can’t use an account of type Payable for the reason explained here:

The payroll payable account should not have any Account Type set. It shouldn’t even be marked as “Payable” just blank. This is because HR module doesn’t support grouping by party.

While I don’t understand what is “Grouping by party” it seems that is a restriction for the ERPNext standard reports to show in one place all the amount due for the company. Is this the expected behaviour on the Payroll module? or am I missing something?

I appreciate your help.

Thank you!

Hola Mauro, me gustaría que nos ayudaramos. Seria bueno poder ver como configuraste las formulas de cada componente salarial y como hiciste la estructura salarial. Podemos ponernos en contacto? soy de Medellin. Saludos.

1 Like

I think it’s best if you can balance your salary structure to put the amounts into the correct accounts via the built in Payroll entry. To track items per employee ther is a setting for that “Process Payroll Accounting Entry based on Employee”.

There’s some good info in this thread.

1 Like

Hey @volkswagner, that’s a great reference, thank you for that.

I think I have missed that very recent thread when I was searching in the web and in this forum. To me it is quite hard to know the relevant keywords used in other countries that may refer to the same concept in ours. In this case I noticed that Employer Contributions is the key term.

Back to the issue, I think I’m using the same approach described by @peterg here and that you tried there.

I have to implement an extra server script as here in Colombia, we need to track the specific organization the employee has chosen for every contributions. All it does it to set the Party in the payables (And in the expenses, which may not be something ERPNext expects, though) so when can use the standard reports of ERPNext to query the information.

My real issue here is that when paying those contributions, they are not reconciled. Then I must be missing something here.

Again, thank you @volkswagner for taking the time to respond and your references.

I’m not well-versed in compliance.

How many choices/suppliers are there per salary component?

Is it feasible to create a unique account for each vendor under a parent account for the deduction type?

One other thing that comes to mind is creating a custom doctype for employee details. If you have the suppliers with associated deduction type, you can create custom reports to summarize the details of the ledger accounts.

I can’t add anything about the payroll payable account type, but I can confirm mine is blank. I’m not sure if the setting below is supposed to help with the HR’s limitation on grouping.

What method are you using for payroll? Are you creating salary slips individually or are you creating them in bulk via the Payroll Entry doctype? Additionally, do you submit the Salary Slips via the Payroll Entry?

EDIT: I wish I read your github feature request before replying.

Modifying the accounting journal entries seems “scary” to me. This is the only reason for my suggestions to try other means.

I think your feature request makes perfect sense.

Can you post your script for modifying the Payrol Journal Entry?

It’s amazing to see all the different ways folks approach payroll structures. If this is working for you, that’s all that matters. I don’t think it would work where I am, though. My auditors would object to this way of structuring payroll.

Specifically, they would say that this journal entry represents a financial relationship with employees, not with suppliers. Paying employees does not itself create a debt to a third party. Instead, what’s actually happening here has to be one of two things: either (1) a withholding, or (2) a deduction for non-cash compensation (i.e., benefits).

In the case of a withholding (taxes and the like), this money would be deposited someplace in the employees name. The “party”, if any, should be the employee, not the place where the deposit is made.

In the case of a deduction for benefits, the purchase you’re making on behalf of your employees still requires an invoicing process. You can hold the deduction separately in a liability account in anticipation of the cost, but the debt to the supplier happens when the supplier bills you, not when pay your staff.

All that said, I don’t know specifically what’s happening here. I’m not an accountant, and I’m definitely not a Colombian accountant. The best advice we can give is to check with your regulators. If you can show us what the accounting entries are supposed to look like, we can help translate that into ERPNext/HRMS.

@peterg I don’t want to hijack this thread (hopefully still relevant).

I considered @MrMauro may want to use purchase invoice, but that seems to open another “can of worms”. Purchase Invoice will need to include Items from the Items table. Is it practical to add employee benefits to the Item table?

Yeah, definitely. I think that’s usually exactly what’s happening when employers purchase things on behalf of employees, I would think usually there’s an invoice generated from the supplier to the company. That’s when the payable debt accrues.

Withholding for taxes and the like would probably work differently, and I’m sure there’s a lot of locale-specific blurry middle ground as well.

As far as adding items to the invoice table goes, it can be as simple or as complicated as the implementation needs. I tend not to create Item types for non-stock purchases and just enter in whatever the invoice lists as free text.

@peterg how are you able to add items “via free text”? I’m not able to add sales invoice items that don’t exist in item list.

There are two fields in the Sales/Purchase Invoice Item child doctype, item (Link) and item_name (Data). So long as you type in something in item_name, you don’t need a linked item.

Thank you for pointing this out. It’s valuable information. I’ll be using it when necessary.

1 Like