Accesing names of payslip items

hi,

i am trying to build an extension for importing payslips from a file generated by the state payroll software.

i think i need to map the names of fields from this file, to whatever the user has setup as earnings and deductions items. but it seem i am unable to get the names of these through the api? anyone has any experience with this?

That’s true.

There’s already an idea for this using api2, but I suppose this idea could be extended to include api3 as well – which I suppose is what you mean by api since you are writing an Extension.

Can you tell me how to do it with api2?

I’m sorry, I meant to post a link to the idea post but I forgot to do so
:man_facepalming:

Anyway, here it is:

Also, since this idea relates to api2, this means that it still isn’t implemented.

What I used to do is to use the old api endpoint but now I simply removed that and opted for a fixed hardcoded hashtable in my code.

I too am awaiting the implementation of this idea.

I haven’t tried Payslip myself, and as far as I can see there isn’t a dedicated endpoint for Payslips.

But if what you’re planning to build is an extension, it might not be a bad idea to create one that converts your data into the BatchCreate format for Payslips.

I don’t see how can that help. Can you maybe clarify?

My workflow is to attach a TXT file generated from an external government software to be able to record the salaries paid. The problem I have is that the fields in this file have a long name coming from the law that defines them, but in accounting people are free to shorten them or make acronyms for convenience. For example a field can be named “Дополнителен придонес за задолжително здравствено осигурување за случај на повреда на работа и професионално заболување”, but in manager just shortened to “Дополнителен придонес ЗЗО“, or to something else for another user. So I need to be able to map the one to the other.

Hi @lubos do you have any suggestions about this?

Does anyone else have any ideas about this?

@novica I think you can do this by using previous api endpoint v1. where there are endpoints for PayslipEarningsItem, PayslipDeductionItem . give a try.