What this tool does. You give it the monthly payroll workbook. It gives you back two reports. Report_1 shows what each person earned, line by line. Report_2 shows where every dirham is booked: which account code, which employee, which contract. Read this guide once and you will know how to prepare the input and how to read the output.
Part 1. The four input sheets
The workbook you upload must contain these four sheets, with these exact names. Keep the column layout the same every month. The number of rows can change freely.
| Sheet | One row means | The tool reads |
|---|---|---|
| Payroll | One person on one site for the month. A row with a blank Contract NR means days that belong to no site, normally the weekly off days. | Branch, Employee Id, Name, Designation, Location, Contract NR, the day columns, the earnings columns. |
| Other Direct Cost(employee) | One person and their monthly lump sums: 4121 Leave Salary, 4131 EOSB, 4211 Medical, 4513 Uniform, 4531 Visa, 4532 Training, 4564 Transport, 4631 Travel, 4632 Accommodation, Others 1 to 3. | Employee Id plus the twelve amounts. A TOTAL line at the bottom is recognised and skipped. |
| Other Direct Cost (Branch) | One branch and its shared pools: Others-4, Others-5, Others-6. | Branch code plus the three amounts. |
| Other Direct Costs (Contract) | A benefit amount granted to one person on one specific contract. | Employee Id, the amount, Contract NR. Must match the payroll exactly. |
Part 2. The weekly off split
Off days belong to no single site, but their cost is real. So the tool spreads each blank-contract row across that same person's worked contracts, in proportion to each contract's total days. All day types count: worked, Ramadan, leave. And every figure in the off-day row is spread, each day type and each pay component.
| Payroll line | Contract NR | Days | Earnings |
|---|---|---|---|
| Project A | PROJ-A | 13 | 1,300 |
| Project B | PROJ-B | 13 | 1,300 |
| Weekly off | blank | 4 | 400 |
| After the split | Days | Earnings |
|---|---|---|
| Project A | 13 + 2 = 15 | 1,300 + 200 = 1,500 |
| Project B | 13 + 2 = 15 | 1,300 + 200 = 1,500 |
Part 3. Report_1, the earnings detail
One output row for every contracted payroll line, after the split. Designation, location and contract stay exactly as entered. Total Days is the sum of all day types. Total Earnings is the sum of all pay components. Nothing is merged. This is your audit trail.
Part 4. Report_2, the cost allocation
Report_1 grouped to one row per employee and contract. Earnings land in three ledger buckets:
| Bucket | What goes in | Guard, Project A |
|---|---|---|
| 4103 | Extra overtime + weekly off overtime pay | 100 |
| 4108 | Ramadan overtime (both kinds) + public holiday overtime pay | 50 |
| 4101 | Everything else: basic, allowances, leave pay, benefits. Computed as Total Earnings minus 4103 minus 4108. | 1,350 |
| Always true: the three add back to Total Earnings | 1,500 |
Part 5. How shared costs find their row
| Cost | Rule | Guard's numbers |
|---|---|---|
| Per-employee lumps (4121 ... Others-3) |
Split across that person's contracts by total days, measured after the weekly off split. | Medical 300 AED, 15 days each side: 150 + 150 |
| Branch pools (Others-4/5/6) |
Split across every employee-contract row in the branch by day share. | Pool 10,000 over 1,000 branch days. His 15-day row: 150 |
| Contract benefits (4101- Benefits) |
No allocation. Copied to the exact employee and contract it names. | 190 granted on Project A lands on Project A. Project B shows 0. |
Part 6. The safety net
After generating, the tool re-checks every employee: total days and total earnings must still equal the source payroll, to within 0.01. Money is moved, never created, never lost.
This entire application is one self-contained file. For production use on a desktop with no internet connection:
SecuritasAllocator.html and instructionsThe offline copy is byte-identical to this page. In both cases your payroll file is processed only inside your browser's memory. Nothing is uploaded, nothing is stored on any server, and there is no database. Closing the tab erases everything.