Skip to main content

Payroll Period Model

Summary

PayrollPeriod provides a unique tenant/month/year anchor for Payroll runs, but period-close behavior is not implemented by the confirmed service flow.

Audience

Backend and frontend developers, QA and DevOps engineers, support and security engineers, and solution architects.

Overview

PayrollPeriod provides a unique tenant/month/year anchor for Payroll runs, but period-close behavior is not implemented by the confirmed service flow.

Technical Detail

Identity and lookup

A period is identified by tenant, month, and year; infrastructure enforces uniqueness for that combination. Calculation looks up the period and creates an Open record when absent. Runs reference the period identity.

Dates and overlap

Start and end dates are derived from month/year during calculation rather than stored on PayrollPeriod. Month identity prevents overlapping duplicate monthly periods for a tenant.

Status behavior

The entity has status and optional close metadata, but no confirmed close operation mutates them. Frozen is a run state, not a confirmed period state. Period close governance therefore Requires confirmation.

Reprocessing and duplicates

Editable runs may be recalculated by replacing existing detail and calculation records. A frozen run blocks recalculation for that tenant and period. Multiple non-frozen run records are possible in the data model, while service lookup favors the most recently updated editable run.

Source References

  • microservices/src/payroll-service/Domain/PayrollEntities.cs
  • microservices/src/payroll-service/Application/PayrollCalculationService.cs
  • microservices/src/payroll-service/Infrastructure/PayrollDbContext.cs
  • microservices/src/payroll-service/Application/PayrollCompatService.cs

See Also

Keywords

  • Payroll Service
  • Payroll Period Model
  • Technical architecture

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-15
  • Review cycle: Quarterly