refactor: restructure purchase receipts module and related workflows
- Removed old DTOs for creating and updating purchase receipts. - Updated purchase receipts controller and service to use new DTOs and workflows. - Introduced transaction helper for managing database transactions. - Added new workflows for handling purchase receipt payments and supplier ledgers. - Implemented new logic for managing purchase receipt items and payments. - Enhanced error handling for payment processing in workflows. - Updated supplier ledger management to reflect changes in purchase receipts.
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
import { Type } from 'class-transformer'
|
||||
import { IsNotEmpty, IsNumber, Min } from 'class-validator'
|
||||
|
||||
export class CreatePurchaseReceiptItemDto {
|
||||
@Type(() => Number)
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
count: number
|
||||
|
||||
@Type(() => Number)
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
unitPrice: number
|
||||
|
||||
@Type(() => Number)
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
totalAmount: number
|
||||
|
||||
@Type(() => Number)
|
||||
@IsNotEmpty()
|
||||
productId: number
|
||||
|
||||
description?: string
|
||||
}
|
||||
Reference in New Issue
Block a user