From 1b7d513adfbff897b2c1bbecd6d5072b23f76525 Mon Sep 17 00:00:00 2001 From: Ahmed Bouhuolia Date: Thu, 5 Feb 2026 15:12:54 +0200 Subject: [PATCH] fix(server): balance sheet query validation schema --- .../modules/BalanceSheet/BalanceSheet.dto.ts | 6 +++--- .../modules/CashFlowStatement/CashFlowStatementQuery.dto.ts | 6 +++--- .../modules/ProfitLossSheet/ProfitLossSheetQuery.dto.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/server/src/modules/FinancialStatements/modules/BalanceSheet/BalanceSheet.dto.ts b/packages/server/src/modules/FinancialStatements/modules/BalanceSheet/BalanceSheet.dto.ts index 2e282f980..b63d65768 100644 --- a/packages/server/src/modules/FinancialStatements/modules/BalanceSheet/BalanceSheet.dto.ts +++ b/packages/server/src/modules/FinancialStatements/modules/BalanceSheet/BalanceSheet.dto.ts @@ -24,14 +24,14 @@ export class BalanceSheetQueryDto extends FinancialSheetBranchesQueryDto { displayColumnsType: 'total' | 'date_periods' = 'total'; @ApiProperty({ - enum: ['day', 'month', 'year'], + enum: ['day', 'month', 'year', 'quarter'], default: 'year', description: 'Time period for column display', }) @IsString() @IsOptional() - @IsEnum(['day', 'month', 'year']) - displayColumnsBy: 'day' | 'month' | 'year' = 'year'; + @IsEnum(['day', 'month', 'year', 'quarter']) + displayColumnsBy: 'day' | 'month' | 'year' | 'quarter' = 'year'; @ApiProperty({ description: 'Start date for the balance sheet period', diff --git a/packages/server/src/modules/FinancialStatements/modules/CashFlowStatement/CashFlowStatementQuery.dto.ts b/packages/server/src/modules/FinancialStatements/modules/CashFlowStatement/CashFlowStatementQuery.dto.ts index b4f07e670..51d4af8b4 100644 --- a/packages/server/src/modules/FinancialStatements/modules/CashFlowStatement/CashFlowStatementQuery.dto.ts +++ b/packages/server/src/modules/FinancialStatements/modules/CashFlowStatement/CashFlowStatementQuery.dto.ts @@ -34,13 +34,13 @@ export class CashFlowStatementQueryDto extends FinancialSheetBranchesQueryDto { @ApiProperty({ description: 'Display columns by time period', required: false, - enum: ['day', 'month', 'year'], + enum: ['day', 'month', 'year', 'quarter'], default: 'year', }) @IsString() @IsOptional() - @IsEnum(['day', 'month', 'year']) - displayColumnsBy: 'day' | 'month' | 'year' = 'year'; + @IsEnum(['day', 'month', 'year', 'quarter']) + displayColumnsBy: 'day' | 'month' | 'year' | 'quarter' = 'year'; @ApiProperty({ description: 'Type of column display', diff --git a/packages/server/src/modules/FinancialStatements/modules/ProfitLossSheet/ProfitLossSheetQuery.dto.ts b/packages/server/src/modules/FinancialStatements/modules/ProfitLossSheet/ProfitLossSheetQuery.dto.ts index e84acea94..60039912a 100644 --- a/packages/server/src/modules/FinancialStatements/modules/ProfitLossSheet/ProfitLossSheetQuery.dto.ts +++ b/packages/server/src/modules/FinancialStatements/modules/ProfitLossSheet/ProfitLossSheetQuery.dto.ts @@ -64,10 +64,10 @@ export class ProfitLossSheetQueryDto extends FinancialSheetBranchesQueryDto { displayColumnsType: 'total' | 'date_periods'; @IsString() - @IsEnum(['day', 'month', 'year']) + @IsEnum(['day', 'month', 'year', 'quarter']) @IsOptional() @ApiProperty({ description: 'How to display columns' }) - displayColumnsBy: 'day' | 'month' | 'year' = 'year'; + displayColumnsBy: 'day' | 'month' | 'year' | 'quarter' = 'year'; @Transform(({ value }) => parseBoolean(value, false)) @IsBoolean()