Skip to main content

register-travel-expense

This skill should be used when the task asks to "register a travel expense", "enregistrez une note de frais", "registrer reiseregning", "registrer ein reisereknung", "registrar despesas de viagem", "registre una nota de gastos", "Reisekostenabrechnung erstellen", or involves creating a travel expense report with costs like flights, taxi, per diem, hotel, or mileage for an employee.

Ir a la instalación

Datos de origen

Repositorio
JardarIversen/ainm-2026
Última actividad en el origen
22 de marzo de 2026 a las 12:32
Idioma detectado de SKILL.md
inglés
Estrellas
18
Forks
14

Opciones de instalación

De forma predeterminada está seleccionado el prompt que primero revisa el origen. Puedes cambiar a un comando directo o descargar una copia local.

Revisa los archivos de origen

Lee SKILL.md y los archivos complementarios que muestra SkillsMP antes de decidir si quieres instalarlo.

Mostrando SKILL.md

SKILL.md
Instrucciones de origen · Vista previa de solo lectura
name
register_travel_expense
tier
2
task
T13
description
This skill should be used when the task asks to "register a travel expense", "enregistrez une note de frais", "registrer reiseregning", "registrer ein reisereknung", "registrar despesas de viagem", "registre una nota de gastos", "Reisekostenabrechnung erstellen", or involves creating a travel expense report with costs like flights, taxi, per diem, hotel, or mileage for an employee.
# Register Travel Expense 8 calls. Correctness first — deliver, approve, AND create vouchers. ## Call 1: 3 parallel GETs ``` GET /employee?email=<email>&fields=id,firstName,lastName,email&count=5 GET /travelExpense/costCategory?fields=id,description&count=50 GET /travelExpense/paymentType?fields=id,description&count=10 ``` From costCategory response, match `description` exactly: - **"Fly"** — for flights - **"Taxi"** — for taxi - **"Reisekostnad, ikke oppgavepliktig"** — for per diem / daily allowance From paymentType response, use **"Privat utlegg"**. ## Call 2: POST travel expense with ALL costs inline Per diem amount = number of days × daily rate from the prompt (e.g. 4 days × 800 NOK = 3200 NOK). ```json POST /travelExpense { "employee": {"id": <employee_id>}, "title": "<trip title from prompt>", "travelDetails": { "departureDate": "<start date>", "departureTime": "08:00", "returnDate": "<end date>", "returnTime": "18:00", "departureFrom": "Oslo", "destination": "<destination from prompt>", "purpose": "<trip title>", "isDayTrip": false, "isForeignTravel": false }, "costs": [ { "costCategory": {"id": <fly_id>}, "date": "<departure date>", "amountNOKInclVAT": <flight_amount>, "amountCurrencyIncVat": <flight_amount>, "vatType": {"id": 0}, "currency": {"id": 1}, "paymentType": {"id": <privat_utlegg_id>} }, { "costCategory": {"id": <taxi_id>}, "date": "<departure date>", "amountNOKInclVAT": <taxi_amount>, "amountCurrencyIncVat": <taxi_amount>, "vatType": {"id": 0}, "currency": {"id": 1}, "paymentType": {"id": <privat_utlegg_id>} }, { "costCategory": {"id": <reisekostnad_id>}, "date": "<departure date>", "amountNOKInclVAT": <per_diem_total>, "amountCurrencyIncVat": <per_diem_total>, "vatType": {"id": 0}, "currency": {"id": 1}, "paymentType": {"id": <privat_utlegg_id>} } ] } ``` ## Call 3: Deliver + Approve + Create Vouchers (3 sequential PUTs) ``` PUT /travelExpense/:deliver?id=<travel_expense_id> ``` Then: ``` PUT /travelExpense/:approve?id=<travel_expense_id> ``` Then: ``` PUT /travelExpense/:createVouchers?id=<travel_expense_id>&date=<departure_date> ``` **Total: 8 calls (3 GETs + 1 POST + 3 PUTs), 4 write calls, 0 errors.** ## Gotchas - Per diem goes as regular cost with category **"Reisekostnad, ikke oppgavepliktig"** — NOT perDiemCompensations - Per diem amount = days × daily rate FROM THE PROMPT (e.g. "800 NOK" × 4 days = 3200) - Use `fields=id,description` on costCategory — never `fields=*` (truncation causes wrong IDs) - Never guess IDs — always match by `description` from the actual response - All 3 costs MUST be inline in the POST body — do NOT create costs separately - `departureFrom` and `purpose` are required — without them `:deliver` will fail - Must deliver THEN approve THEN createVouchers — in that order
Ver en GitHub