chore: add manaual refer for ticket of super admin

This commit is contained in:
mahyargdz
2025-04-21 16:17:48 +03:30
parent e7d547f19b
commit 03d8c431fa
8 changed files with 86 additions and 34 deletions
@@ -36,7 +36,7 @@ export class Invoice extends BaseEntity {
tax: Decimal;
@Column({ type: "decimal", precision: 16, scale: 2, nullable: true, transformer: new DecimalTransformer() })
lateFee?: Decimal;
lateFee: Decimal | null;
//---------------------------------------------
@@ -44,7 +44,7 @@ export class Invoice extends BaseEntity {
items: InvoiceItem[];
@ManyToOne(() => Discount, (discount) => discount.invoices, { nullable: true, onDelete: "RESTRICT" })
discount?: Discount;
discount: Discount | null;
get isOverdue(): boolean {
return this.status === InvoiceStatus.PENDING && new Date() > this.dueDate;