Default implementation of the invoice number service.

Implements

Constructors

Methods

  • Generates a new invoice number.

    Parameters

    • recipientId: string

      The id of the recipient of the invoice.

    • invoiceAddress: InvoiceAddress

      The address data of the recipient of the invoice.

    • transaction: undefined | Transaction

      An optional transaction from outside to make sure any changes only apply when the transaction is committed.

    • OptionalnameAbbreviation: string

      An optional name abbreviation if you don't want to generate one.

    Returns Promise<string>

    A promise of the new invoice number.

  • Generates a temporary invoice number with the prefix "TEMP". This does not increase the number of invoices which can be helpful if you create an invoice that might not be sent out.

    Parameters

    • recipientId: string

      The id of the recipient of the invoice.

    • invoiceAddress: InvoiceAddress

      The address data of the customer.

    • OptionalnameAbbreviation: string

      An optional name abbreviation if you don't want to generate one.

    Returns Promise<string>

    A promise of the new temporary invoice number.