Interface KitsasBookInterface

Interface representing an accounting of the organization.

You get KitsasBookInterface from KitsasOfficeInterface.getBooks

interface KitsasBookInterface {
    getAccounts(): Promise<Account[]>;
    getBookId(): string;
    getConnection(): KitsasConnectionInterface;
    getDimensions(): Promise<Dimension[]>;
    getFiscalYears(): Promise<FiscalYear[]>;
    getProducts(): Promise<Product[]>;
    getSettings(): Promise<Record<string, string>>;
    saveInvoice(invoice: InvoiceDto, attachments: AttachmentDto[]): Promise<CreateInvoiceResponseDto>;
    saveTransactions(iban: string, startDate: Date, endDate: Date, entries: TransactionEntryDto[], original?: object, attachments?: AttachmentDto[]): Promise<CreateVoucherResponseDto>;
    saveVoucher(voucher: CreateVoucherDto, attachments: AttachmentDto[]): Promise<CreateVoucherResponseDto>;
}

Methods

  • Save transactions.

    Parameters

    • iban: string

      The IBAN of the bank account.

    • startDate: Date

      The start date of the transactions.

    • endDate: Date

      The end date of the transactions.

    • entries: TransactionEntryDto[]

      The transaction entries.

    • Optionaloriginal: object

      The original object.

    • Optionalattachments: AttachmentDto[]

      The attachments associated with the transactions.

    Returns Promise<CreateVoucherResponseDto>

    A promise that resolves to a CreateVoucherResponseDto object.