PurchaseReceiving
The PurchaseReceiving entity, mapped to the purchase_receiving table.
| Table | purchase_receiving |
| Tenant-scoped | Yes — extends TenantOwned |
| Columns | 6 |
| Relationships | 3 |
| Source | backend/src/main/java/com/motorph/payroll/model/PurchaseReceiving.java |
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
receivingId | Integer | receiving_id | — | primary key, generated |
referenceNo | String | reference_no | Yes | — |
receivedDate | LocalDate | received_date | — | — |
notes | String | notes | Yes | — |
status | String | status | — | — |
createdAt | LocalDateTime | created_at | — | — |
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
| Field | Kind | Target | Join column | Required |
|---|---|---|---|---|
supplier | @ManyToOne | Supplier | supplier_id | Yes |
receivedBy | @ManyToOne | User | received_by | — |
items | @OneToMany | PurchaseReceivingItem | mapped by receiving | — |
Referenced by
| Entity | Field | Kind |
|---|---|---|
| PurchaseReceivingItem | receiving | @ManyToOne |
Neighbourhood
Repository
PurchaseReceivingRepository
Declared over PurchaseReceiving with id type Integer, with JpaSpecificationExecutor for dynamic filtering. Source: backend/src/main/java/com/motorph/payroll/repository/PurchaseReceivingRepository.java
| Method | Returns | Notes |
|---|---|---|
findAllByOrderByCreatedAtDesc(Pageable pageable) | Page<PurchaseReceiving> | derived |
findAllBySupplier_SupplierId(Integer supplierId, Pageable pageable) | Page<PurchaseReceiving> | derived |
existsBySupplier_SupplierId(Integer supplierId) | boolean | derived |
Reached by
These controllers hold — directly or through a service they depend on — a repository over PurchaseReceiving.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| InventoryController | /api/inventory | 38 | Inventory & Portal |
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/.