This commit is contained in:
Philipp Kunz 2025-03-20 13:06:42 +00:00
parent 024b7feb09
commit 75b720a98d

View File

@ -22,29 +22,29 @@ import { BaseValidator } from './formats/base.validator.js';
*/ */
export class XInvoice implements plugins.tsclass.business.ILetter { export class XInvoice implements plugins.tsclass.business.ILetter {
// ILetter interface properties // ILetter interface properties
public versionInfo: { type: string; version: string } = { public versionInfo: plugins.tsclass.business.ILetter['versionInfo'] = {
type: 'draft', type: 'draft',
version: '1.0.0' version: '1.0.0'
}; };
public type: string = 'invoice'; public type: plugins.tsclass.business.ILetter['type'] = 'invoice';
public date: number = Date.now(); public date = Date.now();
public subject: string = ''; public subject: plugins.tsclass.business.ILetter['subject'] = '';
public from: plugins.tsclass.business.IContact; public from: plugins.tsclass.business.TContact;
public to: plugins.tsclass.business.IContact; public to: plugins.tsclass.business.TContact;
public content: { public content: {
invoiceData: plugins.tsclass.finance.IInvoice; invoiceData: plugins.tsclass.finance.IInvoice;
textData: null; textData: null;
timesheetData: null; timesheetData: null;
contractData: null; contractData: null;
}; };
public needsCoverSheet: boolean = false; public needsCoverSheet: plugins.tsclass.business.ILetter['needsCoverSheet'] = false;
public objectActions: any[] = []; public objectActions: plugins.tsclass.business.ILetter['objectActions'] = [];
public pdf: Uint8Array | null = null; public pdf: plugins.tsclass.business.ILetter['pdf'] = null;
public incidenceId: null = null; public incidenceId: plugins.tsclass.business.ILetter['incidenceId'] = null;
public language: string | null = null; public language: plugins.tsclass.business.ILetter['language'] = null;
public legalContact: any | null = null; public legalContact: plugins.tsclass.business.ILetter['legalContact'] = null;
public logoUrl: string | null = null; public logoUrl: plugins.tsclass.business.ILetter['logoUrl'] = null;
public pdfAttachments: any | null = null; public pdfAttachments: plugins.tsclass.business.ILetter['pdfAttachments'] = null;
public accentColor: string | null = null; public accentColor: string | null = null;
// XInvoice specific properties // XInvoice specific properties
@ -92,7 +92,7 @@ export class XInvoice implements plugins.tsclass.business.ILetter {
/** /**
* Creates an empty IContact object * Creates an empty IContact object
*/ */
private createEmptyContact(): plugins.tsclass.business.IContact { private createEmptyContact(): plugins.tsclass.business.TContact {
return { return {
name: '', name: '',
type: 'company', type: 'company',