feat: add invoice builder with line detail, address, and person picker.

Enrich invoice line items and previews, migrate several CRM surfaces to Ant, and wire shared money/picker helpers.
This commit is contained in:
2026-11-30 14:34:47 +03:30
parent f1bcb232ee
commit 33c95d72a8
64 changed files with 5813 additions and 2737 deletions
+21 -2
View File
@@ -3262,13 +3262,29 @@ export interface InvoiceLineItemDto {
id: string;
productId: string | null;
name: string;
unit: string | null;
description: string | null;
quantity: number;
unitPrice: number;
discountAmount: number;
taxPercent: number;
currency: string;
position: number;
lineTotal: number;
}
export interface InvoiceLineItemInput {
productId?: string | null;
name: string;
unit?: string | null;
description?: string | null;
quantity: number;
unitPrice: number;
discountAmount?: number;
taxPercent?: number;
currency?: string;
}
export type ChequeStatus = "pending" | "cleared" | "bounced";
export type ChequeDirection = "in" | "out";
@@ -3368,6 +3384,7 @@ export interface InvoiceDto {
kind?: "invoice" | "credit";
currency: string;
notes: string | null;
address?: string | null;
discountAmount?: number;
taxPercent?: number;
issuedAt: string | null;
@@ -3409,6 +3426,7 @@ export interface CreateInvoiceRequest {
kind?: "invoice" | "credit";
currency?: string;
notes?: string;
address?: string;
discountAmount?: number;
taxPercent?: number;
issuedAt?: string | null;
@@ -3419,7 +3437,7 @@ export interface CreateInvoiceRequest {
quoteId?: string | null;
fromDealId?: string | null;
fromQuoteId?: string | null;
lineItems?: DealLineItemInput[];
lineItems?: InvoiceLineItemInput[];
installments?: InvoiceInstallmentInput[];
commissionPercent?: number | null;
commissionFixedAmount?: number | null;
@@ -3431,6 +3449,7 @@ export interface UpdateInvoiceRequest {
kind?: "invoice" | "credit";
currency?: string;
notes?: string | null;
address?: string | null;
discountAmount?: number;
taxPercent?: number;
issuedAt?: string | null;
@@ -3439,7 +3458,7 @@ export interface UpdateInvoiceRequest {
companyId?: string | null;
dealId?: string | null;
quoteId?: string | null;
lineItems?: DealLineItemInput[];
lineItems?: InvoiceLineItemInput[];
installments?: InvoiceInstallmentInput[];
commissionPercent?: number | null;
commissionFixedAmount?: number | null;