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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user