feat: add internal finance ledger for accounts, claims, and payroll
Keep booked income and expense separate from cash balances, with installments, recurring items, and reports. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5598,6 +5598,115 @@ export interface RoutineUserSettingsDto {
|
||||
summaryHour: number;
|
||||
}
|
||||
|
||||
/* ───────── دفتر مالی داخلی ───────── */
|
||||
|
||||
export type FinancialAccountType = "bank" | "cash" | "petty";
|
||||
export type FinancialDocKind = "income" | "expense";
|
||||
export type FinancialDocStatus = "open" | "partial" | "settled" | "void";
|
||||
export type FinancialPayMethod = "cash" | "card_to_card" | "pos" | "transfer" | "other";
|
||||
|
||||
export interface FinancialAccountDto {
|
||||
id: string;
|
||||
name: string;
|
||||
type: FinancialAccountType;
|
||||
bankName: string | null;
|
||||
accountRef: string | null;
|
||||
responsibleName: string | null;
|
||||
openingBalance: string;
|
||||
openingDate: string;
|
||||
notes: string | null;
|
||||
isActive: boolean;
|
||||
currency: string;
|
||||
balance: string;
|
||||
periodIn: string;
|
||||
periodOut: string;
|
||||
lastMovementAt: string | null;
|
||||
}
|
||||
|
||||
export interface FinancialCategoryDto {
|
||||
id: string;
|
||||
name: string;
|
||||
kind: FinancialDocKind;
|
||||
isActive: boolean;
|
||||
}
|
||||
|
||||
export interface FinancialDocumentDto {
|
||||
id: string;
|
||||
kind: FinancialDocKind;
|
||||
title: string;
|
||||
amount: string;
|
||||
settledAmount: string;
|
||||
remaining: string;
|
||||
bookedAt: string;
|
||||
dueAt: string | null;
|
||||
categoryId: string | null;
|
||||
categoryName: string | null;
|
||||
personId: string | null;
|
||||
partyName: string | null;
|
||||
accountId: string | null;
|
||||
accountName: string | null;
|
||||
method: string | null;
|
||||
status: FinancialDocStatus;
|
||||
reference: string | null;
|
||||
notes: string | null;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface FinancialMovementDto {
|
||||
id: string;
|
||||
accountId: string;
|
||||
direction: "in" | "out";
|
||||
amount: string;
|
||||
kind: string;
|
||||
kindLabel: string;
|
||||
transferGroupId: string | null;
|
||||
documentId: string | null;
|
||||
occurredAt: string;
|
||||
memo: string | null;
|
||||
reference: string | null;
|
||||
balanceAfter: string | null;
|
||||
}
|
||||
|
||||
export type FinancialInstallmentStatus = "open" | "partial" | "settled" | "overdue";
|
||||
|
||||
export interface FinancialInstallmentDto {
|
||||
id: string;
|
||||
position: number;
|
||||
dueDate: string;
|
||||
amount: string;
|
||||
paidAmount: string;
|
||||
remaining: string;
|
||||
status: FinancialInstallmentStatus;
|
||||
}
|
||||
|
||||
export interface FinancialReceivableDto {
|
||||
id: string;
|
||||
title: string;
|
||||
personId: string | null;
|
||||
partyName: string | null;
|
||||
totalAmount: string;
|
||||
paidAmount: string;
|
||||
remaining: string;
|
||||
status: "open" | "settled" | "void";
|
||||
notes: string | null;
|
||||
installments: FinancialInstallmentDto[];
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface TreasuryDashboardDto {
|
||||
bookedIncome: string;
|
||||
actualReceipts: string;
|
||||
bookedExpense: string;
|
||||
actualPayments: string;
|
||||
operatingProfit: string;
|
||||
receivables: string;
|
||||
payables: string;
|
||||
totalBalance: string;
|
||||
recent: FinancialDocumentDto[];
|
||||
upcomingInstallments: FinancialInstallmentDto[];
|
||||
upcomingPayables: FinancialDocumentDto[];
|
||||
}
|
||||
|
||||
/* ───────── باشگاه امتیازات (گیمیفیکیشن کارکنان) ───────── */
|
||||
|
||||
export * from "./gamification";
|
||||
|
||||
Reference in New Issue
Block a user