2025-12-09 20:17:00 +03:30
|
|
|
import { Maybe } from '@/core';
|
|
|
|
|
|
2025-12-30 21:03:39 +03:30
|
|
|
export interface IPurchaseReceiptRawResponse {
|
2025-12-09 20:17:00 +03:30
|
|
|
id: number;
|
|
|
|
|
totalAmount: number;
|
|
|
|
|
inventoryId: number;
|
|
|
|
|
supplierId: number;
|
|
|
|
|
code: string;
|
|
|
|
|
items: IPurchaseItemResponse[];
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
deletedAt?: string;
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-30 21:03:39 +03:30
|
|
|
export interface IPurchaseReceiptResponse extends IPurchaseReceiptRawResponse {}
|
2025-12-09 20:17:00 +03:30
|
|
|
|
|
|
|
|
export interface IPurchaseItemRawResponse {
|
|
|
|
|
id: number;
|
|
|
|
|
count: number;
|
2026-01-04 13:45:45 +03:30
|
|
|
unitPrice: number;
|
2025-12-09 20:17:00 +03:30
|
|
|
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;
|
2026-01-04 13:45:45 +03:30
|
|
|
unitPrice: number;
|
2025-12-09 20:17:00 +03:30
|
|
|
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;
|
2026-01-04 13:45:45 +03:30
|
|
|
unitPrice: number;
|
2025-12-09 20:17:00 +03:30
|
|
|
total: number;
|
|
|
|
|
description?: string;
|
|
|
|
|
}
|