feat(cardex): implement cardex controller, service, and DTO for stock movements

feat(pos): add POS controller and service for order creation and stock retrieval
refactor(pos): enhance stock and product category retrieval with pagination and mapping
This commit is contained in:
2025-12-21 19:09:41 +03:30
parent d514267f58
commit c6a86719dd
42 changed files with 3769 additions and 119 deletions
@@ -47,7 +47,22 @@ export class PurchaseReceiptsService {
async findOne(id: number) {
const item = await this.prisma.purchaseReceipt.findUnique({
where: { id },
include: { supplier: true, inventory: true, items: true },
include: {
supplier: {
select: {
id: true,
firstName: true,
lastName: true,
},
},
inventory: {
select: {
id: true,
name: true,
},
},
items: true,
},
})
if (!item) return null
return ResponseMapper.single(item)