mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
refactor(nestjs): landed cost
This commit is contained in:
@@ -10,8 +10,9 @@ import {
|
||||
} from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
import { ToNumber } from '@/common/decorators/Validators';
|
||||
import { LandedCostTransactionType } from '../types/BillLandedCosts.types';
|
||||
|
||||
class AllocateBillLandedCostItemDto {
|
||||
export class AllocateBillLandedCostItemDto {
|
||||
@IsInt()
|
||||
@ToNumber()
|
||||
entryId: number;
|
||||
@@ -26,7 +27,7 @@ export class AllocateBillLandedCostDto {
|
||||
transactionId: number;
|
||||
|
||||
@IsIn(['Expense', 'Bill'])
|
||||
transactionType: string;
|
||||
transactionType: LandedCostTransactionType;
|
||||
|
||||
@IsInt()
|
||||
transactionEntryId: number;
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import { IsDateString, IsEnum, IsIn, IsNotEmpty, IsOptional, IsString } from "class-validator";
|
||||
import { LandedCostTransactionType } from "../types/BillLandedCosts.types";
|
||||
|
||||
|
||||
export class LandedCostTransactionsQueryDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@IsIn(['Expense', 'Bill'])
|
||||
transactionType: LandedCostTransactionType;
|
||||
|
||||
@IsDateString()
|
||||
@IsOptional()
|
||||
date: string;
|
||||
}
|
||||
Reference in New Issue
Block a user