Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Verbetering van tags en controle op datum in *.md #86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Verbetering van tags en controle op datum in *.md #86
Changes from all commits
a4272b9dd25f981431d09c4694dd8d430c6887bb6d27d55875d640f7a3acaf325076cef5f8550d158cb5b7d8f9027dab61dd52619d76008012c0f8948128c60c9ec06a88dc056e6f446b99dee7e6ff034a2106a69ff5cc2File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
title: Connecting Payroll to Salary Administration author: Eric Zwaal date: 2025-01-21 tags: payroll component, journal entry
Introduction
Sometimes it is necessary to make it clear from which calculated payroll components a payroll journal entry is composed. Profit offers an analysis for this, but you can also do it yourself. Usually, it is a matter of retrieving the calculated payroll components, filtered by year, period, and employee. But if there are many employees, or if there is a piece of retroactive payment, it becomes more complicated. This article explains step-by-step how to do this in a way that also performs well.
What you need
1. Retrieve the main plan of the period
For this example, I have given the employee JUDITHS a severance payment of €10,000 retroactively in September, made payable in October 2024.
She had already left the company before and was therefore not included in the calculation for September.
The payment was made in October.
We therefore look up the PlanId for October via
SH_AUDIT_Plannen. Filter onEmployer=01 AND Year=2024 AND Period=10:https://12345.rest.afas.online/ProfitRestServices/connectors/SH_AUDIT_Plannen?skip=0&take=20&filterfieldids=Employer,Year,Period&filtervalues=01,2024,10&operatortypes=1,1,1
Result
{ "skip": 0, "take": 20, "rows": [ { "Employer": "01", "Year": 2024, "Period": 10, "PlanId": 839, "Different_payment_plan": null, "Count": 89 } ] }The main PlanId is therefore 839.
2. Retrieve the associated salary processing plans
Use
SH_AUDIT_Plannenagain. Filter onDifferent_payment_plan=839:https://12345.rest.afas.online/ProfitRestServices/connectors/SH_AUDIT_Plannen?skip=0&take=20&filterfieldids=Different_payment_plan&filtervalues=839&operatortypes=1
Result
Many more rows are returned (from January), but I keep the example concise.
{ "skip": 0, "take": 20, "rows": [ { "Employer": "01", "Year": 2024, "Period": 8, "PlanId": 935, "Different_payment_plan": 839, "Count": 0 }, { "Employer": "01", "Year": 2024, "Period": 9, "PlanId": 936, "Different_payment_plan": 839, "Count": 1 } ] }We therefore need to retrieve the employees from PlanId 839 (the main PlanId), 935, and 936.
3. Retrieve the employees
Use
SH_AUDIT_MdwPerPlan. Filter onPlanId=839 OR PlanId=935 OR PlanId=936:https://12345.rest.afas.online/ProfitRestServices/connectors/SH_AUDIT_MdwPerPlan?skip=0&take=75000&filterfieldids=PlanId;PlanId;PlanId&filtervalues=839;935;936&operatortypes=1;1;1
Result
I show only 6 rows for clarity. Employees are only present in PlanId 839 and 936.
JUDITHS is only present in PlanId 936. PlanId 936 also only contains JUDITHS.
{ "skip": 0, "take": 75000, "rows": [ { "PlanId": 839, "Employee": "PATRICKB" }, { "PlanId": 839, "Employee": "OSCARG" }, { "PlanId": 839, "Employee": "OLGAV" }, { "PlanId": 839, "Employee": "OLGAS" }, { "PlanId": 839, "Employee": "NIELSB" }, { "PlanId": 936, "Employee": "JUDITHS" } ] }From this list, use each employee once for the next step.
4. Retrieve the calculated payroll components
Use
SH_AUDIT_Transactions. Filter onplanIdPaid=839 AND employeeNumber=JUDITHS:https://12345.rest.afas.online/ProfitRestServices/connectors/SH_AUDIT_Transactions?skip=0&take=21000&filterfieldids=planIdPaid,employeeNumber&filtervalues=839,JUDITHS&operatortypes=1,1
Due to performance, make these calls per employee, so that not too many rows come in at once. You can make calls for multiple employees simultaneously. Maintain a maximum of 5 calls simultaneously.
Result
I show a limited result. You can see that there are no travel expenses (she did not work in September), but there is "Wage Tax from Previous Employment". With exactly the amount we expect, namely €10,000.
{ "skip": 0, "take": 21000, "rows": [ { "planIdPaid": 839, "planIdRelatesTo": 936, "employeeNumber": "JUDITHS", "code": 1174, "description": "Commuting expenses (non-taxable)", "value": 0, "contractNumber": 2 }, { "planIdPaid": 839, "planIdRelatesTo": 936, "employeeNumber": "JUDITHS", "code": 1225, "description": "Wage tax from previous employment", "value": 10000, "contractNumber": 2 }, { "planIdPaid": 839, "planIdRelatesTo": 936, "employeeNumber": "JUDITHS", "code": 1314, "description": "Wage tax", "value": 3697, "contractNumber": 2 } ] }Related articles
Retrieving a lot of data? Use skip and take.
Uh oh!
There was an error while loading. Please reload this page.