Files
psp_panel/src/app/modules/purchases/models/io.d.ts
T
ahasani 502c592f56 feat: rename 'fee' to 'unitPrice' across purchase components and models
- Updated form component to use 'unitPrice' instead of 'fee'.
- Adjusted product charge row form fields and templates to reflect the new naming.
- Modified receipt template and related components to utilize 'unitPrice'.
- Changed models and interfaces to replace 'fee' with 'unitPrice'.
- Updated supplier invoice and statistics components to align with the new naming convention.
- Added new API routes for dashboard and statistics modules.
2026-01-04 13:45:45 +03:30

58 lines
1.2 KiB
TypeScript

import { Maybe } from '@/core';
export interface IPurchaseReceiptRawResponse {
id: number;
totalAmount: number;
inventoryId: number;
supplierId: number;
code: string;
items: IPurchaseItemResponse[];
createdAt: string;
updatedAt: string;
deletedAt?: string;
}
export interface IPurchaseReceiptResponse extends IPurchaseReceiptRawResponse {}
export interface IPurchaseItemRawResponse {
id: number;
count: number;
unitPrice: number;
total: number;
productId: number;
}
export interface IPurchaseRequest {
totalAmount: number;
inventoryId: number;
supplierId: number;
code?: string;
description?: string;
items: IPurchaseItemRequest[];
}
export interface IPurchaseItemRequest {
productId: number;
count: number;
unitPrice: number;
total: number;
}
export interface IPurchaseForm {
inventory: Maybe<IInventoryResponse>;
supplier: Maybe<ISupplierResponse>;
code: string;
isSettled: boolean;
buyAt: Date | string;
description: string;
totalAmount: number;
products: IPurchaseItemForm[];
}
export interface IPurchaseItemForm {
product: Maybe<IProductResponse>;
count: number;
unitPrice: number;
total: number;
description?: string;
}