feat(cardex): implement cardex module with filters, templates, and service integration
This commit is contained in:
+36
-58
@@ -1,66 +1,44 @@
|
||||
import {
|
||||
IInventoryInfo,
|
||||
IInventoryMovement,
|
||||
IInventoryStockProduct,
|
||||
IInventoryTransferRequestItem,
|
||||
} from './types';
|
||||
import { ICardexInventorySummary, ICardexProductSummary } from './types';
|
||||
|
||||
export interface IInventorySummaryRawResponse {
|
||||
export interface ICardexRawResponse {
|
||||
id: number;
|
||||
name: string;
|
||||
location: string;
|
||||
isActive: boolean;
|
||||
isPointOfSale: boolean;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
deletedAt: Maybe<string>;
|
||||
}
|
||||
|
||||
export interface IInventorySummaryResponse extends IInventorySummaryRawResponse {}
|
||||
|
||||
export interface IInventoryDetailRawResponse extends IInventorySummaryRawResponse {
|
||||
availableProductTypes: number;
|
||||
availableProductCount: number;
|
||||
availableProductsCost: number;
|
||||
}
|
||||
|
||||
export interface IInventoryDetailResponse extends IInventoryDetailRawResponse {}
|
||||
|
||||
export interface IInventoryRequest {
|
||||
name: string;
|
||||
location: string;
|
||||
isActive: boolean;
|
||||
}
|
||||
|
||||
export interface IInventoryStockMovementRawResponse {
|
||||
receiptId: string;
|
||||
count: number;
|
||||
info: IInventoryInfo;
|
||||
movements: IInventoryMovement[];
|
||||
}
|
||||
|
||||
export interface IInventoryStockMovementResponse extends IInventoryStockMovementRawResponse {}
|
||||
|
||||
export interface IInventoryTransferRequest {
|
||||
code: string;
|
||||
description: string;
|
||||
fromInventoryId: number;
|
||||
toInventoryId: number;
|
||||
items: IInventoryTransferRequestItem[];
|
||||
}
|
||||
|
||||
export interface IInventoryStockRawResponse {
|
||||
type: string;
|
||||
quantity: number;
|
||||
fee: number;
|
||||
totalCost: number;
|
||||
referenceType: string;
|
||||
referenceId: string;
|
||||
createdAt: string;
|
||||
avgCost: number;
|
||||
product: IInventoryStockProduct;
|
||||
product: ICardexProductSummary;
|
||||
inventory: ICardexInventorySummary;
|
||||
supplier?: {
|
||||
id: number;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
};
|
||||
customer?: {
|
||||
id: number;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
};
|
||||
counterInventory?: ICardexInventorySummary;
|
||||
}
|
||||
|
||||
export interface IInventoryStockResponse extends IInventoryStockRawResponse {}
|
||||
|
||||
export interface IInventoryStockQuery {
|
||||
isAvailable?: boolean;
|
||||
export interface ICardexResponse extends ICardexRawResponse {
|
||||
supplier?: {
|
||||
id: number;
|
||||
name: string;
|
||||
};
|
||||
customer?: {
|
||||
id: number;
|
||||
name: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IInventoryProductCardexRawResponse extends IInventoryStockMovementRawResponse {}
|
||||
|
||||
export interface IInventoryProductCardexResponse extends IInventoryProductCardexRawResponse {}
|
||||
export interface ICardexRequestPayload {
|
||||
startDate?: string;
|
||||
endDate?: string;
|
||||
inventoryId?: number;
|
||||
productId?: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user