# leave-requests

Handle leave requests without overlaps and keep each person's balance right

- **Space:** hr-and-people-public (https://github.com/Tech-Realm/space-hr-and-people-public/tree/main/leave-requests)
- **Level:** L2 (as the registry reports it)
- **Keys it needs (names only):** none
- **Tools:** python3, docker
- **Routes:** stdlib-reference, frappe-hr; checks: 2
- **Uses:** new (no recorded use yet)
- **Install:** `logicpacks pack use hr-and-people-public/leave-requests` or MCP `get_pack hr-and-people-public/leave-requests`
- **Files:** CHANGELOG.md, code/refflow.py, code/schema.json, outcome/EVIDENCE.md, outcome/checks.yaml, outcome/fixtures/scenario.json, outcome/results.json, pack.yaml, refs/refs.yaml, spec/SPEC.md, spec/source.md

## Purpose (spec/SPEC.md)

## Goal

Handle leave requests without overlaps and keep each person's balance right. Our reference flow (`code/refflow.py`, stdlib sqlite) proves the records, allowed moves, numbers and export; the same rules carry over to the self-hosted app.

## Steps

1. Request -> approved/rejected/cancelled; an approved leave can only be cancelled.
2. Overlapping requests for the same person are rejected (rejected/cancelled ones don't count).
3. Balance = yearly allowance - approved days (refflow `leave_balance`).
4. Export the month for payroll.

## Edge cases

- Half days: days = 0.5.
- Public holidays are not subtracted automatically; enter working days.

## Don'ts

- Don't put medical details in the request; 'sick' is enough.

## Check

`lp pack check hr-and-people/leave-requests` runs outcome/checks.yaml.



---

Canonical URL: https://logicpacks.io/packs/hr-and-people-public/leave-requests

Developed by TechRealm (techrealm.online), the software team. Operated by Al Jash Trading (Establishment), Abu Dhabi, since 1994, the legal entity that hosts and is responsible for the service. Economic licence CN-1030597, Abu Dhabi Registration Authority. Address: Office 5, Bani Yas West 4, Bani Yas, Abu Dhabi, UAE. Website: https://aljashtrading.com. Contact: hello@logicpacks.io, security@logicpacks.io, WhatsApp +1 713 632 2262 (https://wa.me/17136322262).

Machine-readable index: [/llms.txt](/llms.txt). Plain facts: [/about.md](/about.md). Safety: [/safety.md](/safety.md).
