What the HR module is
Until now, DWPlatform's HR was a directory. It knew that a person existed, which department they sat in, what their position was called, and what their extension number was. Everything else — the things HR departments actually spend their days on — happened somewhere else, usually in a spreadsheet.
This module adds the transactional half. It keeps the directory exactly as it was — chat, the phonebook and the org chart still read the same person record — and builds an employment file on top of it: hiring and termination, transfers and promotions, leave entitlement and balances, attendance, payroll with its statutory deductions, personnel documents with expiry tracking, and a compliance watch. All of it localised for Egyptian labour law, because a leave balance or a payslip is not a generic calculation — it is whatever the law says it is.
The employee file
One page per employee holding ten tabs of history — identity, employment, dependants, qualifications, documents, insurance, pay, loans, penalties and leave — plus every transfer and the end-of-service settlement.
Leave & attendance
Leave types with their own rules, per-employee balances (رصيد الأجازات) with every movement, daily attendance, overtime and absence — the inputs payroll needs before it can calculate anything.
Payroll
Monthly runs built from pay elements, with social insurance, salary tax, loan instalments (سلفة), penalties and absence applied under statutory ceilings — and a stored audit trace behind every figure.
Grades & structure
The grade and step ladder (الدرجات والأجور) that transfers, promotions and pay decisions attach to, so an assignment is a position on a scale and not a free-typed number.
Documents
Every personnel document — contract, national ID, insurance form, work permit — with issue and expiry dates, so an expiring ID becomes a warning weeks before it becomes a problem.
Compliance watch
Obligations and breaches the system detects itself — from a leave balance that has gone three years without settlement to an absence pattern approaching statutory thresholds.
The three-level employment model
Almost every mistake an HR system makes traces back to storing employment as a single flat row per employee: one hire date, one department, one salary, overwritten whenever something changes. That design cannot answer "what was true last March", cannot survive a re-hire, and quietly destroys the evidence a labour court would ask for. DWPlatform splits employment into three levels, and the split is the reason the rest of the module works.
permanentthe human beingThe directory record — name, national ID, contact details. It is created once and it never goes away, because it is shared with the rest of the platform: chat looks up a person here, so does the phonebook, so does the org chart, so does every people-picker in every module. A person exists whether or not they currently work for you, which is exactly what makes re-hiring, alumni records and historical payroll possible.
one hire → terminationa stintA single continuous spell of employment: hired on a date, terminated on a date (or still open). If somebody leaves and comes back three years later, they get a new period — the old one is never reopened. That is not a modelling preference, it is a legal fact: the closed period was settled. Gratuity was calculated and paid on the service that existed then, accumulated leave was cashed out under art. 125, and social-insurance form 6 was filed with the authority. Reopening it would silently rewrite figures that a former employee has already been paid and the state has already recorded.
effective-datedan assignmentWhat the employee actually was between two dates — department, job title, branch, grade, category, contract type. A transfer (نقل موظف) or a promotion does not edit the current row; it closes it on the day before the new effective date and opens the next one. The file therefore reads as a timeline, and the system can answer the only question that matters when money is involved: what was true on this date?
closed by the promotion
closed by the transfer
current assignment
One period, three records. Ask the file "what was this employee's department on 1 January 2026" and it answers Sales — not because someone remembered, but because the row that was open on that date says so.
Why effective dating earns its keep: two ordinary events break any system that overwrites. A mid-month promotion means one payroll month must be paid partly at the old grade and partly at the new one — impossible unless the month contains two assignment rows. And a late correction ("the transfer was actually effective the 1st, not the 15th") must change history without erasing what was believed at the time. Effective-dated rows handle both by construction; a single mutable row handles neither.
Two rules that reach across stints
If periods were fully independent, a re-hired employee would restart at zero on everything. Egyptian law says otherwise on two points, so the engine deliberately reaches back across closed periods for these — and only these.
Total service drives leave
Total service = every employment period with this employer, plus recorded prior external service. Once that total reaches ten years the annual leave entitlement steps up to 30 days, and it does so even though the current period may be six months old. The employee file shows both numbers side by side — إجمالي مدة الخدمة (total) and مدة الخدمة الحالية (current) — precisely because they are different quantities that answer different questions.
Probation happens once
Article 90 allows an employer to place a worker on probation once. So when a second period is opened for a person who already completed a period with this employer, the system refuses to set a probation end date. It is not a warning the user can dismiss — a second probation would be void anyway, and a void clause sitting in a contract field is worse than no clause, because payroll and termination logic would both act on it.
شؤون الموظفين — employee affairs
The first menu holds the four things you do to an employment: find the employee, open their file, move them, and end their service.
| Tab | Arabic | What it holds |
|---|---|---|
| Basic data | البيانات الأساسية | Identity, contacts, bank & IBAN, insurance and tax numbers |
| Employment | التوظيف | The periods and the effective-dated assignment rows inside them |
| Dependants | المعالون | Family members — relevant to allowances and to bereavement/childcare leave |
| Qualifications | المؤهلات | Degrees and certificates, with graduation year |
| Documents | المستندات | This employee's slice of the personnel-document register, with expiry |
| Insurance | التأمينات | The social-insurance profile: number, office, start date, insurable wage |
| Pay & entitlements | الأجور والاستحقاقات | The pay elements assigned to this employee and their values |
| Loans | السلف | Advances (سلفة), their instalment schedule and outstanding balance |
| Penalties | الجزاءات | Disciplinary penalties, each capped by law before it can be deducted |
| Leave | الإجازات | Entitlement, balance and every movement for this employee |
Ten tabs sounds like a lot until you notice that each one is a different kind of record with a different lifecycle. Flattening them into one long form is how HR systems end up with pages nobody can finish filling in.
التنظيم and الإجازات والحضور
Two menus that supply payroll with its raw material: the structure an assignment points at, and the leave and attendance facts that turn a monthly salary into an actual amount.
OVERTIME earning, and the absent days that feed the ABSENCE deduction. Everything else on the screen exists so a human can check those two numbers before a run is locked.الرواتب — payroll
Payroll is three screens: the runs that produce payslips, the elements a payslip is assembled from, and the social-affairs ledger of money owed in both directions.
BASIC is all four; allowances such as TRANSPORT, HOUSING and MEAL are taxable but not insurable, which is exactly the distinction that decides how much social insurance an employer owes. Kinds run earning → deduction → employer cost, and the order column fixes the sequence in which they are applied.
SI_EMPLOYER and EMERGENCY_FUND are typed as employer cost, not deduction — they cost the employer money but never reduce the employee's net pay, and the model refuses to blur the two.
التأمينات and الضرائب
Two screens that sit under the payroll menu and hold the state's half of the payslip: the social-insurance profile with its rate and band tables, and the salary-tax profile with its six ladders.
المستندات and المتابعة
The Egyptian compliance engine
This is the part that cannot be bought off the shelf. A generic HR system will happily accrue 21 leave days for a 30-day employee, deduct social insurance on a full 25,000 EGP salary, tax a high earner as if the brackets simply stacked, and take a whole month's wages to clear a loan. Each of those is a specific, expensive breach of Egyptian law. The engine below encodes the rules that stop it.
Leave entitlement — Law 14/2025, art. 124
Annual leave is not one number. It is a tier the employee climbs, and two of the steps are triggered by things other than time in the current job.
| Entitlement | Applies when | Why it is easy to get wrong |
|---|---|---|
| 15 days | First year of service | Often coded as a pro-rata of 21 instead of its own tier |
| 21 days | From the second year onward | — |
| 30 days | Total service reaches 10 years or the employee turns 50 | Both triggers are outside the current employment period — age is not service, and total service spans earlier stints |
| 45 days | Employees with a disability | A status on the person, not an event in the period |
| +7 days | Hazardous work | An addition on top of the tier, not a replacement for it |
Casual leave إجازة عارضة
7 days a year, at most 2 per occasion — and it comes out of the annual balance. Casual leave is not an extra week; it is a right to take annual leave without notice, capped so that it cannot be used to take a holiday in two-day slices. A system that treats it as a separate pot silently hands every employee 28 days.
Accumulation & cash-out
Three obligations that run together: accumulated leave must be settled in cash every three years; the employee must actually take at least 15 days a year, of which at least 6 consecutive; and any unused balance is cashed out on termination. The middle rule is the one nobody expects — leave is a health-and-safety provision, so hoarding it is itself the breach, which is why unhoused balances surface on the compliance screen rather than sitting quietly as an asset.
Social insurance — Law 148/2019
Contributions are a percentage of the wage — but not of the actual wage. The wage is first clamped into an insurable band, and both ends of that band rise 15% every January through 2028.
| Contribution | Rate | Paid by | Base |
|---|---|---|---|
| Social insurance | 11% | Employee | Clamped insurable wage |
| Social insurance | 18.75% | Employer | Clamped insurable wage |
| Martyrs' fund صندوق الشهداء | 0.05% | Employee | Gross |
| Emergency fund صندوق الطوارئ | 1% | Employer only | Gross — never deducted from the employee |
A 25,000 EGP salary in 2026
The 2026 insurable band runs from EGP 2,700 to EGP 16,700. A salary of 25,000 is above the ceiling, so the contribution is calculated on 16,700, not on 25,000:
| Actual monthly wage | 25,000.00 | what the employee is paid |
|---|---|---|
| Clamped to insurable ceiling | 16,700.00 | the base the law prescribes |
| Employee share @ 11% | 1,837.00 | 16,700 × 11% |
| Naïve (wrong) calculation @ 11% | 2,750.00 | 25,000 × 11% — over-deducts by 913.00 every month |
Getting this clamp wrong is the single most common error in Egyptian payroll software, and it is invisible until somebody senior is hired: at low salaries the clamp never binds, so the bug ships and then surfaces months later as a systematic over-deduction from exactly the employees most likely to notice.
Salary tax — six ladders, not one
Egypt is not a plain marginal system. In an ordinary progressive system every taxpayer walks up the same brackets and only the top slice of income is taxed at the top rate. Egypt withdraws the lower bands as income rises: cross a threshold and the 0% band disappears for you entirely, cross the next and the 10% band goes too. That is why the module ships six selectable ladders and picks one by annual income, rather than accumulating a single set of brackets.
| Annual band (EGP) | Rate |
|---|---|
| up to 40,000 | 0% |
| 40,001 – 55,000 | 10% |
| 55,001 – 70,000 | 15% |
| 70,001 – 200,000 | 20% |
| 200,001 – 400,000 | 22.5% |
| 400,001 – 1,200,000 | 25% |
| above 1,200,000 | 27.5% |
| Personal exemption | 20,000 |
The full ladder, as it applies to the lowest tier. The tier table below then says which parts of it you are allowed to use.
| Annual net income | Which ladder applies |
|---|---|
| up to 600,000 | Full ladder — the 0% band applies |
| over 600,000 | 0% band withdrawn — the ladder starts at 10% |
| over 700,000 | 0% and 10% withdrawn — starts at 15% |
| over 800,000 | 0%, 10% and 15% withdrawn — starts at 20% |
| over 900,000 | Starts at 22.5% |
| over 1,200,000 | The whole first 1.2m is taxed at 25%; the remainder at 27.5% |
State it plainly: a tax engine that simply accumulates marginal bands under-taxes everyone earning over EGP 600,000. It will look correct in every test built from an average salary, and it will be wrong for every executive — with the employer, not the employee, carrying the liability for under-withholding.
Deduction ceilings — how much can be taken from a wage
A payslip is not a bank statement: the law limits how much of a wage may be taken in a month, no matter what is owed.
| Ceiling | Limit | Article |
|---|---|---|
| Advances and debt recovery (سلفة) | at most 25% of the wage — 50% where the debt is alimony | art. 114 |
| A single disciplinary violation | at most 5 days' wage | art. 143 |
| All penalties within one month | at most 5 days' wage in total | art. 140 |
The engine defers, it does not forgive. When a month's instalments or penalties would breach a ceiling, the excess is carried to the following month — the debt is not written off, and the employee is not let off. What is illegal is taking it this month. That distinction is why the loans screen treats the remaining balance as authoritative rather than a fixed schedule of dates: the schedule stretches, the total does not move.
Absence thresholds
Unexplained absence has two statutory milestones, and the module watches both.
5 consecutive or 10 scattered days — a warning must be sent by registered letter.
10 consecutive or 20 scattered days — the absence may be treated as a resignation.
The case is raised on the compliance screen for a human to decide.
The system flags; it never auto-terminates. Crossing a threshold makes termination legally available, not automatic — the employee may be in hospital, the notice may not have been served, the days may have been mis-recorded. Ending somebody's employment is a decision a human must take and sign, so the engine's job stops at putting the case in front of one.
Statutory data is data, not constants
Every number above — the leave tiers, the 11% and 18.75%, the insurable band, all six tax ladders, the ceilings — lives in effective-dated reference tables, not in code. Two consequences follow, and both matter more than they sound.
- When the law changes — and the insurable band changes every January through 2028 by design — it is a data update, not a release. No redeploy, no code review, no regression risk in unrelated modules.
- Re-running or re-opening an old payroll uses the rates that were in force then. A 2025 payslip recalculated in 2027 still reads as a 2025 payslip — which is the only behaviour that survives an audit.
The payslip audit trace
A payslip that shows only its results is an assertion. A payslip that shows its working is evidence — and in a labour dispute, evidence is the entire point.
Every payslip the module produces stores its full working alongside its figures: which rate table was in force, what the wage was clamped to and against which band, which of the six tax ladders was selected and what each band contributed, and every ceiling that was applied along with the amount it deferred. The trace is written at calculation time and locked with the run.
What is stored
- The rate table version used, with its effective date
- The insurance clamp: actual wage, band floor and ceiling, resulting base
- The selected tax ladder and the amount taxed in every band
- Each ceiling applied, what it capped, and what it deferred forward
Why store it rather than recompute
Because recomputing answers a different question. Rerun the calculation two years later and you learn what today's engine, today's reference data and today's employee record produce — not what was actually withheld and remitted at the time. Only a stored trace can say this figure, on this date, for this reason. It is the labour-court record, and it is also the fastest way to answer the ordinary version of the same question: an employee asking why last month's net was lower than the month before.
Verified on the live system
Everything in this guide describes deployed software. These are the checks that were actually run against it, not a list of intentions.
- Tenant isolation, proven at the database. 240 SQL Server row-level-security predicates over 80 tables — every HR table is filtered by tenant in the engine itself, not in application code. Each tenant sees only its own rows; an unknown tenant sees nothing at all; a cross-tenant write is rejected by the engine rather than by a forgotten
WHEREclause. - Payroll reconciled to the piastre. A full run was compared against an independent hand-calculation — gross, the insurance clamp, the selected tax ladder, the deductions and the net — and matched exactly.
- The three art. 124 tiers reproduced. Real employees at different service lengths were checked to land on 15, 21 and 30 days respectively — including the 30-day case reached through total service rather than the current period.
- A leave request travelled the whole path. Submitted through the self-service UI by a real employee, it arrived in the approval engine and appeared at the manager's stage — the integration, not just the form.
Read this before a tenant runs real payroll
The payroll and end-of-service formulas require professional sign-off. Before any tenant runs live payroll, the calculations must be reviewed and signed off by a licensed Egyptian payroll accountant and a labour lawyer. This is not a formality: the executive regulations of Law 14/2025 carry operative detail that the statute itself does not, and published secondary sources conflict with one another — particularly on the bracket-elimination rule, which is exactly the area where an error is largest in money terms and least visible in testing. Treat the engine as a correct implementation of a reading of the law that a professional must confirm, not as legal advice.
Two companion guides finish the picture. Employee Self-Service covers the doorway every employee gets into their own record, and HR Requests & Approvals covers how a request travels from submission to applied effect.