API · v1 · estable
CODEMETA OSDeveloper Center
ES
Abrir la consola
Entidad · performance_records

Performance Record Schema

ID del esquema
performance_record
Colección
performance_records
Permisos
  • Leerperformance_record_view
  • Crearperformance_record_create
  • Modificarperformance_record_edit
  • Eliminarperformance_record_delete

Campos

Performance Record Schema

performance_records4 permisos

Schema for validating Leistungsnachweis entities

documentLanguagestringopcional

Language the document (PDF) is rendered in. Decided when the document is created (explicit → customer language → tenant default → de) and never re-derived. Missing = de.

deenesfrnlnull
admite null
partyIduuidobligatorio

Customer party UUID

contractIduuidopcional

Associated contract UUID

admite null
projectIduuidopcional

Project this record was generated for (per-project standalone billing run). Null/absent for collective and per-ticket runs and for legacy records.

solo lecturaadmite null
ticketIduuidopcional

ADR 0963 — ticket this record was generated for (per-ticket standalone billing run). Null/absent for collective and per-project runs and for records created before ADR 0963 (those count as a collective record when the weclapp commission is chosen).

solo lecturaadmite null
performanceRecordNumberstringopcional

Auto-generated sequence number

máx. 1000 caracteressolo lecturaadmite null
performanceRecordDatedateopcional

Date of the performance record

admite null
servicePeriodFromdateobligatorio

Service period start date

servicePeriodTodateobligatorio

Service period end date

statusstringobligatorio

Lifecycle status. CLOSED_WITHOUT_INVOICE (ADR 0929, ADR 1065) = a record that was deliberately settled without an invoice (any net value, with a mandatory reason); its time records stay RECORDED. Set and lifted only via POST /performance-records/:id/close-without-invoice and …/reopen.

OPENRECORDEDDOCUMENT_CREATEDCLOSED_WITHOUT_INVOICECANCELLED
Valor por defecto: "OPEN"
closedWithoutInvoiceAtdatetimeopcional

ADR 1065 — when the record was closed without an invoice. Cleared on reopen. Missing on records closed before ADR 1065 (the UI falls back to the history).

solo lecturaadmite null
closedWithoutInvoiceBystringopcional

ADR 1065 — internal user id (users._id) who closed the record without invoice.

solo lecturaadmite null
closedWithoutInvoiceReasonstringopcional

ADR 1065 — mandatory reason given when closing without invoice.

máx. 1000 caracteressolo lecturaadmite null
reopenedAtdatetimeopcional

ADR 1065 — when a close-without-invoice was last lifted.

solo lecturaadmite null
reopenedBystringopcional

ADR 1065 — internal user id (users._id) who last reopened the record.

solo lecturaadmite null
reopenedReasonstringopcional

ADR 1065 — mandatory reason given when reopening.

máx. 1000 caracteressolo lecturaadmite null
kindstringopcional

ADR 0914 — billing stream this record was generated for. EMERGENCY = a Notdienst-Leistungsnachweis holding only emergency-service bookings (isEmergencyService) of a customer whose emergency billing is SEPARATE. Missing on documents created before ADR 0914 (= STANDARD).

STANDARDEMERGENCY
Valor por defecto: "STANDARD"solo lectura
titlestringopcional

Title / summary

máx. 200 caracteresadmite null
notestringopcional

Internal note

máx. 2000 caracteresadmite null
timeRecordIdsuuid[]opcional

Linked time record UUIDs

Valor por defecto: []
expenseIdsuuid[]opcional

Linked expense UUIDs

Valor por defecto: []
tripIdsuuid[]opcional

Linked trip UUIDs

Valor por defecto: []
materialBucketIdsuuid[]opcional

Material buckets selected during a per-project billing preview. Materialised as invoice positions when the invoice is generated (default for opts.materialBucketIds).

Valor por defecto: []solo lectura
positionIdsuuid[]opcional

Flat-rate project positions (ADR 0310/0406) billed in this per-project run. Their FLAT_RATE line items are part of the snapshot; the invoice stamps project_position.invoiceId from this list.

Valor por defecto: []
billingComponentsobjectopcional

Snapshot of the component selection of a per-project billing run (display/audit). Null/absent for collective and legacy runs.

admite null
timebooleanopcional
flatRatebooleanopcional
expensesbooleanopcional
materialbooleanopcional
totalMinutesintegeropcional

Total tracked minutes

≥ 0Valor por defecto: 0
totalBillableMinutesintegeropcional

Total billable minutes (after rounding and inclusive deduction)

≥ 0Valor por defecto: 0
totalBillingUnitsintegeropcional

Total billing units (Arbeitseinheiten) derived from billable minutes and billingUnitMinutes

≥ 0Valor por defecto: 0
totalAmountstringopcional

Total net amount in EUR as decimal string. Mirrors netAmount; kept for backward compatibility.

Patrónadmite null
itemsobject[]opcional

Snapshot of calculated line items (services + trips). Frozen at PR creation, reused 1:1 when generating the invoice — no recalculation.

Valor por defecto: []
positionintegeropcional
≥ 1
descriptionstringobligatorio
máx. 500 caracteres
unitstringopcional
máx. 20 caracteresadmite null
quantitynumberobligatorio
≥ 0
unitPricestringobligatorio

Decimal string, e.g. "125.00"

vatRatestringopcional

VAT rate as percent string

Valor por defecto: "19"
netAmountstringopcional

Computed: quantity * unitPrice

admite null
articleIduuidopcional
admite null
articleNumberstringopcional
admite null
itemTypestringopcional
SERVICETRAVEL_DISTANCETRAVEL_TIMETRAVEL_OTHERFLAT_RATETICKETMATERIALEXPENSE
admite null
expenseIduuidopcional

Source expense UUID (EXPENSE lines of a per-project billing run)

admite null
positionIduuidopcional

Source project_position UUID (FLAT_RATE lines of a per-project billing run)

admite null
contractIdstringopcional
Valor por defecto: nulladmite null
contractItemIdstringopcional
Valor por defecto: nulladmite null
pricedAtstringopcional

ADR 0415 — date (YYYY-MM-DD) at which the base rate of this line was resolved: the service date (default) or the billing-run date (pricingDateBasis=BILLING_DATE). Only set on lines built from a single time record.

Valor por defecto: nulladmite null
rateSourcestringopcional

ADR 0415 — provenance of the applied hourly rate. `position` = price of the sold order line (ADR 1056). `record` = rate frozen at booking time with unknown origin (legacy). Only set on lines built from a single time record.

positioncontractparty_overrideparty_discountarticleservice_typerecordnull
Valor por defecto: nulladmite null
nonBillableServicebooleanopcional

ADR 0873 §7 — travel line of a non-billable booking: the 0.00 is the result, not noise. The weclapp zero-value travel filter lets marked lines through. Only set on travel lines.

timeRecordIdstringopcional

Source time record of a service or travel line.

admite null
timeRecordNumberstringopcional

Leistungsnummer (L-YYYY-NNNNN) of the source time record.

admite null
ticketIdstringopcional

Ticket the line belongs to — only for bookings with referenceType TICKET (travel lines inherit it from their booking).

solo lecturaadmite null
groupLabelstringopcional

ADR 0909 — heading of the position group this line belongs to ("Ticket #… // …" or "Helpdesk ohne Ticketzuweisung"). Rendered once at generation time when grouping by ticket is active; missing = ungrouped document. Pushed to weclapp as item.groupName (maxLength 1000 there).

máx. 1000 caracteresadmite null
coveredTimeRecordIdsstring[]opcional

ADR 0909 — subset of timeRecordIds that is linked but not priced (contract-covered INCLUDED/CONTINGENT, ADR 0563; covered by a flat-rate position, ADR 0416). These bookings have no line item; the PDF lists them in a separate "already settled" section. Missing on records created before ADR 0909 — those keep the legacy PDF table.

omittedNonBillableTimeRecordIdsstring[]opcional

ADR 1274 — subset of timeRecordIds that is non-billable (billableType NONE) and was deliberately left off this record because the tenant set billingSettings.omitNonBillableFromInvoice. Linked and closed like every other booking, but no line item, no section, not in totalMinutes. Missing or empty = nothing was omitted.

billingAddressIdstringopcional

Separately billed customer site (party.addresses[]._id with separateBilling) this record was generated for. Only bookings of that site are on it; the invoice is addressed to the site. Null/absent = the customer itself.

admite null
groupPositionsByTicketbooleanopcional

ADR 0909 — snapshot of the effective "group positions by ticket" setting (customer override → tenant default) at generation time. Items then carry groupLabel. Missing on documents created before ADR 0909 (= ungrouped).

Valor por defecto: false
vatRatestringopcional

Default VAT rate applied to the items snapshot (percent string)

Patrónadmite null
netAmountstringopcional

Sum of item netAmounts in EUR as decimal string

Patrónadmite null
vatAmountstringopcional

Total VAT in EUR as decimal string

Patrónadmite null
grossAmountstringopcional

Gross total (net + VAT) in EUR as decimal string

Patrónadmite null
invoiceIduuidopcional

Linked invoice UUID (when converted to invoice)

admite null
openTicketNotesobject[]opcional

ADR 0146 — snapshot of tickets that were still open when this Leistungsnachweis was generated but were unlocked via `ticket.billingOverride`. Frozen at PR creation so the invoice PDF can render a neutral "Hinweise"-section ("Ticket … wird weiterhin bearbeitet") without re-querying ticket state at print time. Internal `reason` is intentionally NOT included — it stays on the ticket.

Valor por defecto: []admite null
ticketIduuidobligatorio
solo lectura
ticketNumberstringobligatorio
máx. 50 caracteres
titlestringopcional
máx. 500 caracteresadmite null
releaseSourcestringopcional

ADR 1209 — internal: what released the open ticket (per-ticket override, customer rule, tenant rule). Missing on snapshots before ADR 1209 = TICKET.

TICKETCUSTOMERTENANTnull
admite null

Endpoints estándar

Este recurso sigue el contrato CRUD genérico de la plataforma. Lea las convenciones sobre paginación, idempotencia, bloqueo optimista y auditoría. Los endpoints principales:

  • GET /api/v1/performance_records — Lista, paginada y filtrable
  • GET /api/v1/performance_records/<id> — Una entidad
  • POST /api/v1/performance_records — Crear
  • PATCH /api/v1/performance_records/<id> — Actualización parcial
  • DELETE /api/v1/performance_records/<id> — Eliminación lógica
  • GET /api/v1/performance_records/<id>/timeline — Auditoría y actividades

Búsqueda