import type { Document, DocumentPatch, EntityRef } from '.'; import type { OptionalNullablePartial } from '../tools'; export type FinaceOperationMetaType = 'customerorder' | 'demand'; export interface FinaceOperationRef extends EntityRef { /** Связанная сумма из платежа */ linkedSum: number; } export type FinanceMetaType = 'paymentin' | 'cashin' | 'paymentout' | 'cashout'; export type FinanceFields = { /** Назначение платежа */ paymentPurpose?: string; /** Включая НДС */ vatSum: number; /** Оплаченные документы */ operations: FinaceOperationRef[]; }; export type Finance = Document & FinanceFields; export type FinancePatch = DocumentPatch & OptionalNullablePartial>;