import { business, finance } from '../index.js'; import type { TCurrency } from './currency.js'; export type TInvoiceStatus = 'draft' | 'invoice' | 'paid' | 'refunded'; export interface IInvoiceItem { position: number; name: string; articleNumber?: string; unitType: string; unitQuantity: number; unitNetPrice: number; vatPercentage: number; } export interface IInvoice { id: string; billedBy: business.IContact; billedTo: business.IContact; type: 'creditnote' | 'debitnote'; status: TInvoiceStatus; items: IInvoiceItem[]; periodOfPerformance?: { from: number; to: number; }; deliveryDate?: number; dueInDays: number; reverseCharge: boolean; printResult?: { pdfBufferString: string; totalNet: number; totalGross: number; vatGroups: { percentage: number; items: IInvoiceItem[]; }; }; notes: string[]; paymentOptions?: finance.IPaymentOptionInfo; currency: TCurrency; }