feat: add stock keeping unit management with create, update, and retrieval functionalities

- Implemented CreateStockKeepingUnitDto for creating stock keeping units.
- Added StockKeepingUnitsService for handling business logic related to stock keeping units.
- Created StockKeepingUnitsController to manage HTTP requests for stock keeping units.
- Developed UpdateStockKeepingUnitDto for updating existing stock keeping units.
- Introduced StockKeepingUnitsServiceFindAllResponseDto for response structure.
- Established stock keeping units module for encapsulation of related components.

feat: enhance sales invoice fiscal management with new endpoints

- Created SalesInvoicesFilterDto for filtering sales invoices.
- Implemented PosSalesInvoiceFiscalController for managing fiscal operations on sales invoices.
- Developed PosSalesInvoiceFiscalService to handle fiscal logic and interactions.
- Added methods for sending, retrying, and checking the status of fiscal invoices.
- Integrated error handling and response mapping for fiscal operations.
This commit is contained in:
2026-05-01 19:43:59 +03:30
parent a68a7f594d
commit ad470d2166
91 changed files with 8973 additions and 2469 deletions
@@ -17,10 +17,20 @@ export class GoodsService {
id: true,
name: true,
pricing_model: true,
unit_type: true,
image_url: true,
sku: true,
description: true,
sku: {
select: {
id: true,
name: true,
},
},
measure_unit: {
select: {
id: true,
name: true,
},
},
category: {
select: {
id: true,
@@ -62,7 +72,7 @@ export class GoodsService {
}
async create(data: CreateGuildGoodDto, file: Express.Multer.File) {
const { category_id, ...rest } = data
const { category_id, measure_unit_id, sku_id, ...rest } = data
const good = await this.prisma.$transaction(async tx => {
let image_url = ''
@@ -79,6 +89,16 @@ export class GoodsService {
...rest,
is_default_guild_good: true,
image_url,
sku: {
connect: {
id: sku_id,
},
},
measure_unit: {
connect: {
id: measure_unit_id,
},
},
category: {
connect: {
id: category_id,
@@ -93,7 +113,7 @@ export class GoodsService {
}
async update(id: string, data: UpdateGuildGoodDto, file: Express.Multer.File) {
const { category_id, ...rest } = data
const { category_id, measure_unit_id, sku_id, ...rest } = data
const good = await this.prisma.$transaction(async tx => {
let image_url = ''
@@ -120,6 +140,16 @@ export class GoodsService {
...rest,
is_default_guild_good: true,
image_url,
sku: {
connect: {
id: sku_id,
},
},
measure_unit: {
connect: {
id: measure_unit_id,
},
},
category: {
connect: {
id: category_id,