Let cheques be received or paid without an invoice, and remind staff three days before due date.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-11 11:34:49 +03:30
co-authored by Cursor
parent 9a991fc1f1
commit 9beaed96e8
18 changed files with 982 additions and 61 deletions
+53 -1
View File
@@ -1,6 +1,58 @@
import { IsIn, IsOptional, IsString, MaxLength } from 'class-validator';
import {
IsIn,
IsNumber,
IsOptional,
IsString,
MaxLength,
Min,
MinLength,
} from 'class-validator';
import { Type } from 'class-transformer';
const CHEQUE_STATUSES = ['pending', 'cleared', 'bounced'] as const;
const CHEQUE_DIRECTIONS = ['in', 'out'] as const;
export class CreateChequeDto {
@IsString()
@MinLength(1)
personId!: string;
@Type(() => Number)
@IsNumber()
@Min(0.01)
amount!: number;
@IsOptional()
@IsString()
@MaxLength(8)
currency?: string;
@IsString()
@MinLength(1)
@MaxLength(80)
number!: string;
@IsString()
@MinLength(1)
@MaxLength(120)
bank!: string;
@IsString()
dueDate!: string;
@IsOptional()
@IsIn(CHEQUE_STATUSES)
status?: (typeof CHEQUE_STATUSES)[number];
@IsOptional()
@IsIn(CHEQUE_DIRECTIONS)
direction?: (typeof CHEQUE_DIRECTIONS)[number];
@IsOptional()
@IsString()
@MaxLength(2000)
notes?: string;
}
export class UpdateChequeDto {
@IsOptional()