Interface ILineOperationService

Represents a service that provides operations for manipulating invoice lines.

Hierarchy

Implemented by

Properties

db: Dexie
moduleName: string

Methods

  • Adds an item to an invoice line. If the item already exists in the invoice, the quantity is increased, otherwise a new line is created.

    Parameters

    • invoice: IInvoice

      The invoice to add the item to.

    • customer: ICustomer

      The customer associated with the invoice.

    • appConfig: IAppConfig

      The app configuration.

    • item: IItem

      The item to add to the invoice line.

    • Optional modifiers: IInvoiceCoreLine[]

      An array of modifiers to apply to the item.

    • Optional options: LineOptions

      Additional options for the line.

    Returns IInvoice

    The updated invoice.

  • Increases the quantity of an item in an invoice line.

    Parameters

    • invoice: IInvoice

      The invoice to increase the item quantity in.

    • line: IInvoiceLine

      The invoice line to increase the item quantity in.

    • quantity: number

      The quantity of the item to increase.

    Returns IInvoice

    The updated invoice.

  • Retrieves multiple entities with optional pagination and filtering.

    Parameters

    • params: any

      [UNUSED PARAMETER, KEPT FOR POSSIBLE FUTURE USE] Filtering parameters.

    • options: {
          page?: number;
          pageSize?: number;
      }

      Query options including pagination.

      • Optional page?: number
      • Optional pageSize?: number

    Returns Promise<{
        count: number;
        list: IInvoice[];
        page: number;
        pageSize: number;
    }>

    An object containing the retrieved entities and total count.

  • Decreases the quantity of an item in an invoice line.

    Parameters

    • invoice: IInvoice

      The invoice to decrease the item quantity in.

    • line: IInvoiceLine

      The invoice line to decrease the item quantity in.

    • quantity: number

      The quantity of the item to decrease.

    Returns IInvoice

    The updated invoice.

Generated using TypeDoc