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
@@ -1,6 +1,14 @@
import { ApiProperty } from '@nestjs/swagger'
import { Type } from 'class-transformer'
import { IsArray, IsString, ValidateNested } from 'class-validator'
import {
IsArray,
IsEnum,
IsObject,
IsOptional,
IsString,
ValidateNested,
} from 'class-validator'
import { TaxSendStatus } from '../../dto/tax-switch.dto'
export class NamaTaxBodyItemDto {
@ApiProperty()
@@ -11,9 +19,9 @@ export class NamaTaxBodyItemDto {
@IsString()
vra: string
@ApiProperty()
@IsString()
sstt: string
// @ApiProperty()
// @IsString()
// sstt: string
@ApiProperty()
@IsString()
@@ -45,7 +53,7 @@ export class NamaTaxBodyItemDto {
}
export class NamaTaxHeaderDto {
@ApiProperty()
@ApiProperty({ required: true })
@IsString()
ins: string
@@ -53,41 +61,43 @@ export class NamaTaxHeaderDto {
@IsString()
inp: string
@ApiProperty()
@ApiProperty({ required: true })
@IsString()
inty: string
@ApiProperty()
@IsString()
unique_tax_code: string
// @ApiProperty({required: true})
// @IsString()
// unique_tax_code: string
@ApiProperty()
@ApiProperty({ required: true })
@IsString()
inno: string
@ApiProperty()
@ApiProperty({ required: true })
@IsString()
tins: string
@ApiProperty()
@ApiProperty({ required: true })
@IsString()
indatim: string
@ApiProperty()
@ApiProperty({ required: true })
@IsString()
name: string
@ApiProperty()
@ApiProperty({ required: true })
@IsString()
tob: string
@ApiProperty()
@IsOptional()
@IsString()
address: string
address?: string
@ApiProperty()
@IsOptional()
@IsString()
mobile: string
mobile?: string
@ApiProperty()
@IsString()
@@ -122,3 +132,63 @@ export class NamaTaxRequestDto {
@IsString()
fiscal_id: string
}
export class NamaTaxSendItemResponseDto {
@ApiProperty()
@IsString()
invoice_item_id: string
@ApiProperty({ enum: TaxSendStatus })
@IsEnum(TaxSendStatus)
status: TaxSendStatus
@ApiProperty({ required: false, nullable: true })
@IsOptional()
@IsString()
tax_id?: string | null
@ApiProperty({ required: false, nullable: true, type: Object })
@IsOptional()
@IsObject()
request_payload?: unknown
@ApiProperty({ required: false, nullable: true, type: Object })
@IsOptional()
@IsObject()
response_payload?: unknown
@ApiProperty({ required: false, nullable: true })
@IsOptional()
@IsString()
error_message?: string | null
@ApiProperty({ required: false, nullable: true })
@IsOptional()
@IsString()
sent_at?: string | null
@ApiProperty({ required: false, nullable: true })
@IsOptional()
@IsString()
received_at?: string | null
}
export class NamaTaxGetResponseDto {
@ApiProperty()
@IsString()
tax_id: string
@ApiProperty({ enum: TaxSendStatus })
@IsEnum(TaxSendStatus)
status: TaxSendStatus
@ApiProperty({ required: false, nullable: true, type: Object })
@IsOptional()
@IsObject()
response_payload?: unknown
@ApiProperty({ required: false, nullable: true })
@IsOptional()
@IsString()
received_at?: string | null
}