Add a small internal warehouse and party balances when Tahesab is off.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-10 22:24:16 +03:30
co-authored by Cursor
parent 55432ff979
commit 212d02f664
19 changed files with 1449 additions and 6 deletions
+60
View File
@@ -783,6 +783,66 @@ export interface UpdateProductRequest {
isActive?: boolean;
}
export type StockMovementType =
| "opening"
| "purchase"
| "sale"
| "credit"
| "adjustment";
export interface InventoryStockRowDto {
productId: string;
name: string;
sku: string | null;
unit: string | null;
kind: "product" | "service";
stockQty: number;
currency: string;
unitPrice: number | null;
}
export interface StockMovementDto {
id: string;
productId: string;
productName: string;
type: StockMovementType;
quantity: number;
note: string | null;
invoiceId: string | null;
occurredAt: string;
}
export interface InventorySummaryDto {
enabled: boolean;
warehouseName: string | null;
products: InventoryStockRowDto[];
cashTotal: number;
receivablesTotal: number;
currency: string;
}
export interface CreateStockMovementRequest {
productId: string;
type: "purchase" | "adjustment";
quantity: number;
note?: string;
}
export interface PartyBalanceDto {
enabled: boolean;
personId: string;
openingAmount: number;
invoicedAmount: number;
paidAmount: number;
balance: number;
currency: string;
}
export interface UpdatePartyOpeningRequest {
amount: number;
note?: string;
}
export interface DealLineItemDto {
id: string;
productId: string | null;