feat: update validation and exception handling, refactor controller routes, and enhance sales invoice item DTO
- Removed global validation pipe and added a new ValidationExceptionFilter for better error handling. - Refactored controller routes to use underscores instead of hyphens for consistency. - Updated CreateSalesInvoiceItemDto to include new fields: quantity, unit_type, and payload. - Modified CreateSalesInvoiceDto to enforce items as an array with a minimum size. - Added Enums module to provide gold karat values through a dedicated endpoint. - Introduced new columns in the database schema for sales invoice items and goods.
This commit is contained in:
@@ -27,3 +27,23 @@ export const PurchaseReceiptStatus = {
|
||||
} as const
|
||||
|
||||
export type PurchaseReceiptStatus = (typeof PurchaseReceiptStatus)[keyof typeof PurchaseReceiptStatus]
|
||||
|
||||
|
||||
export const SalesInvoiceType = {
|
||||
GOOD: 'GOOD',
|
||||
SERVICE: 'SERVICE'
|
||||
} as const
|
||||
|
||||
export type SalesInvoiceType = (typeof SalesInvoiceType)[keyof typeof SalesInvoiceType]
|
||||
|
||||
|
||||
export const UnitType = {
|
||||
COUNT: 'COUNT',
|
||||
GRAM: 'GRAM',
|
||||
KILOGRAM: 'KILOGRAM',
|
||||
LITER: 'LITER',
|
||||
METER: 'METER',
|
||||
HOUR: 'HOUR'
|
||||
} as const
|
||||
|
||||
export type UnitType = (typeof UnitType)[keyof typeof UnitType]
|
||||
|
||||
Reference in New Issue
Block a user