502c592f56
- 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.
58 lines
1.2 KiB
TypeScript
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;
|
|
}
|