-
-
Notifications
You must be signed in to change notification settings - Fork 18
Basic Payroll
Eine Firma wird in der Payroll Engine mit folgenden Objekten abgebildet:

Die Mitarbeiter eines Mandanten sind in Divisions unterteilt, welche als Grundlage für den Lohlauf dienen. Mitarbeiter können mehreren Divisions zugeordnet sein und aus diesen den Lohn beziehen.
Um ein Unternhemen in der Payroll Engine einzurichten, muss der Backend Server der Payroll Engine gestartet sein.
Das Unternehmen kann auf drei Arten eingerichtet werden:
- Rest API Requests z.B. mit Postman
- API Development tool wie z.B. Postman
- Mit der Payroll Console und JSON Dateien
- Zugriff auf das Payroll Engine Exchange JSON Schema
- JSON Editor, z.B. Visual Studio Code
- Interaktiv mit der Web Applikation
- Der Web Application Server ist gestartet
Die folgenden Schritte beschreiben das Einrichten eines Firma:
| Step | JSON | Web Application | REST API | Notes |
|---|---|---|---|---|
| Set JSON schema | 02 |
Adjust this to your local path | ||
| Set creation date | 03 |
Set the object creation date | ||
| Add Tenant | 04-07 |
Tenants > Add | CreateTenant |
Tenant culture and payroll calendar |
| Add User | 08-15 |
Users > Add | CreateUser |
User language |
| Add Division | 16-21 |
Divisons > Add | CreateDivision |
Payrun is executed on the division |
| Add Employee | 22-31 |
Employees > Add | CreateEmployee |
Employee is associated to division(s) |
| Add Regulation | 32-34 |
Regulations > Add | CreateRegulation |
|
| Add Case | 35-38 |
Regulation > Cases > Add | CreateCase |
Case type: Employee |
| Add Case Field | 39-45 |
Regulation > Case Fields > Add | CreateCaseField |
Money value on calendar period |
| Add Wage Type | 48-54 |
Regulation > Wage Types > Add | CreateWageType |
Number is the payrun process order |
| Add Payroll Layer | 61-66 |
Payroll Layers > Add | CreatePayrollLayer |
Associated to the regulation |
| Add Payroll | 57-60 |
Payrolls > Add | CreatePayroll |
Associated to the division |
| Add Payrun | 69-73 |
Payruns > Add | CreatePayrun |
Associated to the payroll |
Beispiel Company Setup Payroll.json:
1{
2 "$schema": "PayrollEngine.Exchange.schema.json",
3 "createdObjectDate": "2023-01-01T00:00:00.0Z",
4 "tenants": [
5 {
6 "identifier": "WikiTenant",
7 "culture": "en-US",
8 "users": [
9 {
10 "identifier": "[email protected]",
11 "firstName": "Lucy",
12 "lastName": "Smith",
13 "language": "English"
14 }
15 ],
16 "divisions": [
17 {
18 "name": "WikiDivision",
19 "culture": "en-US"
20 }
21 ],
22 "employees": [
23 {
24 "identifier": "mario.nuñ[email protected]",
25 "firstName": "Mario",
26 "lastName": "Nuñez",
27 "divisions": [
28 "WikiDivision"
29 ]
30 }
31 ],
32 "regulations": [
33 {
34 "name": "WikiRegulation",
35 "cases": [
36 {
37 "name": "Salary",
38 "caseType": "Employee",
39 "fields": [
40 {
41 "name": "Salary",
42 "valueType": "Money",
43 "timeType": "CalendarPeriod"
44 }
45 ]
46 }
47 ],
48 "wageTypes": [
49 {
50 "wageTypeNumber": 100,
51 "name": "Salary",
52 "valueExpression": "CaseValue[\"Salary\"]"
53 }
54 ]
55 }
56 ],
57 "payrolls": [
58 {
59 "name": "WikiPayroll",
60 "divisionName": "WikiDivision",
61 "layers": [
62 {
63 "level": 1,
64 "regulationName": "WikiRegulation"
65 }
66 ]
67 }
68 ],
69 "payruns": [
70 {
71 "payrollName": "WikiPayroll",
72 "name": "WikiPayrun"
73 }
74 ]
75 }
76 ]
77}Die JSON Datei wird mit der Payroll Konsole mit dem PayrollImport Kommando zum Backend übermittelt:
PayrollConsole PayrollImport Payroll.json
Setup von Reports siehe TODO
Das Company Setup kann mit folgenden Schritten überprüft werden:
| Step | JSON | Notes |
|---|---|---|
| Set link to JSON schema | 02 |
Adjust this to your local path |
| Add Employee Case | 09-26 |
Simulate a salary change 5'000 starting Jan. 23 |
| Add Payrun Job | 29-42 |
Execute a payrun job for Jan. 23 |
| Test Payrun Results | 43-54 |
Test if Jan. 23 salary is equals 5'000 |
Beispiel Company Test Test.et.json:
1{
2 "$schema": "PayrollEngine.Exchange.schema.json",
3 "tenants": [
4 {
5 "identifier": "WikiTenant",
6 "payrolls": [
7 {
8 "name": "WikiPayroll",
9 "cases": [
10 {
11 "userIdentifier": "[email protected]",
12 "employeeIdentifier": "mario.nuñ[email protected]",
13 "divisionName": "WikiDivision",
14 "case": {
15 "caseName": "Salary",
16 "values": [
17 {
18 "caseFieldName": "Salary",
19 "value": "5000",
20 "start": "2023-01-01T00:00:00.0Z",
21 "created": "2022-11-04T00:00:00.0Z"
22 }
23 ]
24 }
25 }
26 ]
27 }
28 ],
29 "payrunJobInvocations": [
30 {
31 "name": "WikiPayrunJob.Jan23",
32 "payrunName": "WikiPayrun",
33 "userIdentifier": "[email protected]",
34 "employeeIdentifiers": [
35 "mario.nuñ[email protected]"
36 ],
37 "reason": "Test Payrun Jan 23",
38 "jobStatus": "Complete",
39 "periodStart": "2023-01-01T00:00:00.0Z",
40 "evaluationDate": "2023-02-01T00:00:00.0Z"
41 }
42 ],
43 "payrollResults": [
44 {
45 "payrunJobName": "WikiPayrunJob.Jan23",
46 "employeeIdentifier": "mario.nuñ[email protected]",
47 "wageTypeResults": [
48 {
49 "wageTypeNumber": 100,
50 "value": 5000
51 }
52 ]
53 }
54 ]
55 }
56 ]
57}Der PayrunEmployeeTest der Payroll Konsole erstellt für jeden Testlauf eine Kopie des Mitarbeiters:
PayrollConsole PayrunEmployeeTest Test.et.json
Neben dem PayrunEmployeeTest [*.et.json] unterstützt die Payroll Konsole weitere automatisierte Testverfahren:
-
PayrunTest: Testen den Lohnlauf mit einem temporären Mandanten [*.pt.json] -
CaseTest: Testen von Cases [*.ct.json] -
ReportTest: Testen von Reports [*.rt.json]
The next steps are:
- Build a Business Regulation
- Read the Payroll Engine Whitepaper
- Explore the Examples and Tests
🤝 Thank you for supporting this project with a donation.
⚡ This is a pre-relase version of the initial development, please read the restrictions.
- Payroll Engine