Skip to main content

PayrollPayoutBatch

A set of payslips paid together (PAYOUT) or settled after the fact (HISTORICAL).

Tablepayroll_payout_batch
Tenant-scopedYes — extends TenantOwned
Columns14
Relationships3
Sourcebackend/src/main/java/com/motorph/payroll/model/PayrollPayoutBatch.java

Columns​

FieldTypeColumnNullNotes
payoutBatchIdIntegerpayout_batch_id—primary key, generated
batchNoStringbatch_no——
kindStringkind——
payoutMethodStringpayout_method——
payDateLocalDatepay_date——
referenceStringreferenceYes—
statusStringstatus——
totalAmountBigDecimaltotal_amount——
payslipCountIntegerpayslip_count——
createdByStringcreated_byYes—
createdAtLocalDateTimecreated_at——
voidedByStringvoided_byYes—
voidedAtLocalDateTimevoided_atYes—
voidReasonStringvoid_reasonYes—

Plus tenant_id, inherited from TenantOwned. Hibernate stamps it on insert and adds where tenant_id = ? to every query, so it is never written or read by application code.

Relationships​

FieldKindTargetJoin columnRequired
payroll@ManyToOnePayrollpayroll_idYes
paidFromAccount@ManyToOneAccountpaid_from_account_idYes
lines@OneToManyPayrollPayoutBatchLinemapped by batch—

Referenced by​

EntityFieldKind
PayrollPayoutBatchLinebatch@ManyToOne

Neighbourhood​

Repository​

PayrollPayoutBatchRepository​

Declared over PayrollPayoutBatch with id type Integer, with JpaSpecificationExecutor for dynamic filtering. Source: backend/src/main/java/com/motorph/payroll/repository/PayrollPayoutBatchRepository.java

MethodReturnsNotes
lockById(@Param("id") Integer id)Optional<PayrollPayoutBatch>explicit @Query
findAllByPayroll_PayrollIdOrderByPayoutBatchIdDesc(Integer payrollId)List<PayrollPayoutBatch>derived
existsByPayroll_PayrollIdAndStatus(Integer payrollId, String status)booleanderived
countByStatus()List<Object[]>explicit @Query
findLatestPayoutEvidence(@Param("kind") String kind, @Param("status") String status, @Param("runStatuses") Collection<String> runStatuses, Limit limit)List<PayoutEvidence>explicit @Query

Reached by​

These controllers hold — directly or through a service they depend on — a repository over PayrollPayoutBatch.

ControllerBase pathEndpointsModule
PayoutBatchController/api/payroll7Payroll
PayrollOnboardingController/api/onboarding/payroll1Payroll
PayrollRunReportsController/api/payroll/{payrollId}5Payroll

Generated page

This page is rebuilt from the source on every docs build by docs-site/scripts/gen-code-wiki.mjs. Editing it has no effect — change the code, or, if what you want to say is prose, write it in docs/.