2022-09-14 09:40:03 +02:00
|
|
|
import { business, finance } from '../index.js';
|
2017-11-09 01:46:45 +01:00
|
|
|
|
2018-06-09 15:11:37 +02:00
|
|
|
export type TInvoiceStatus = 'draft' | 'invoice' | 'paid' | 'refunded';
|
2016-11-16 18:27:41 +01:00
|
|
|
|
2017-11-09 01:46:45 +01:00
|
|
|
export interface IInvoiceItem {
|
2018-06-09 15:11:37 +02:00
|
|
|
name: string;
|
2022-01-08 04:56:55 +01:00
|
|
|
articleNumber?: string;
|
2018-06-09 15:11:37 +02:00
|
|
|
unitType: string;
|
2021-02-15 21:36:26 +00:00
|
|
|
unitQuantity: number;
|
|
|
|
unitNetPrice: number;
|
2018-06-09 15:11:37 +02:00
|
|
|
vatPercentage: number;
|
2021-02-15 15:29:58 +00:00
|
|
|
currency: 'EUR';
|
2017-11-09 01:46:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IInvoice {
|
2022-01-14 04:50:25 +01:00
|
|
|
id: string;
|
2020-01-19 10:19:38 +00:00
|
|
|
billedBy: business.IContact;
|
|
|
|
billedTo: business.IContact;
|
2018-06-09 15:11:37 +02:00
|
|
|
status: TInvoiceStatus;
|
|
|
|
items: IInvoiceItem[];
|
2022-01-08 04:56:55 +01:00
|
|
|
periodOfPerformance?: {
|
|
|
|
from: number;
|
|
|
|
to: number;
|
|
|
|
};
|
|
|
|
deliveryDate?: number;
|
2022-01-14 04:54:35 +01:00
|
|
|
dueInDays: number;
|
2022-01-14 05:59:05 +01:00
|
|
|
reverseCharge: boolean;
|
2021-02-18 19:46:55 +00:00
|
|
|
printResult?: {
|
|
|
|
pdfBufferString: string;
|
|
|
|
totalNet: number;
|
|
|
|
totalGross: number;
|
|
|
|
vatGroups: {
|
|
|
|
percentage: number;
|
|
|
|
items: IInvoiceItem[];
|
2022-04-28 12:18:26 +02:00
|
|
|
};
|
2021-02-18 19:46:55 +00:00
|
|
|
};
|
2022-09-14 09:40:03 +02:00
|
|
|
paymentOptions?: finance.IPaymentOptionInfo;
|
2017-06-10 12:29:54 +02:00
|
|
|
}
|