mirror of
https://github.com/serty2005/rmser.git
synced 2026-02-05 03:12:34 -06:00
пофиксил неправильный пересчет фасовок в накладной
This commit is contained in:
@@ -22,7 +22,7 @@ import type {
|
||||
AddContainerRequest,
|
||||
AddContainerResponse,
|
||||
DictionariesResponse,
|
||||
DraftSummary,
|
||||
UnifiedInvoice,
|
||||
ServerUser,
|
||||
UserRole
|
||||
} from './types';
|
||||
@@ -159,8 +159,11 @@ export const api = {
|
||||
return data.suppliers;
|
||||
},
|
||||
|
||||
getDrafts: async (): Promise<DraftSummary[]> => {
|
||||
const { data } = await apiClient.get<DraftSummary[]>('/drafts');
|
||||
// Обновленный метод получения списка накладных с фильтрацией
|
||||
getDrafts: async (from?: string, to?: string): Promise<UnifiedInvoice[]> => {
|
||||
const { data } = await apiClient.get<UnifiedInvoice[]>('/drafts', {
|
||||
params: { from, to }
|
||||
});
|
||||
return data;
|
||||
},
|
||||
|
||||
|
||||
@@ -233,4 +233,20 @@ export interface MainUnit {
|
||||
id: UUID;
|
||||
name: string; // "кг"
|
||||
code: string;
|
||||
}
|
||||
|
||||
export type InvoiceType = 'DRAFT' | 'SYNCED'; // Тип записи: Черновик или Синхронизировано из iiko
|
||||
|
||||
export interface UnifiedInvoice {
|
||||
id: UUID;
|
||||
type: InvoiceType; // Новый признак типа
|
||||
document_number: string; // Внутренний номер iiko или ID черновика
|
||||
incoming_number: string; // Входящий номер накладной от поставщика
|
||||
date_incoming: string;
|
||||
status: DraftStatus;
|
||||
items_count: number;
|
||||
total_sum: number;
|
||||
store_name?: string;
|
||||
created_at: string;
|
||||
is_app_created: boolean; // Создано ли через наше приложение
|
||||
}
|
||||
Reference in New Issue
Block a user