> ## Documentation Index
> Fetch the complete documentation index at: https://superofficeas-worktree-351-fix-webapi-escaped-anchors.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# invoice_entry table

> This table contain all invoices, connected to a message

## invoice\_entry Table (360)

This table contain all invoices, connected to a message

## Fields

| Name            | Description                                                                                                                             | Type                                   | Nullable |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- | :------: |
| id              | Primary key                                                                                                                             | PK                                     |    No    |
| message\_id     | The message.id this invoice entry is connected to.                                                                                      | FK [ej\_message](./ej-message.mdx)     |    No    |
| description     | A description of the invoice entry                                                                                                      | String(255)                            |    Yes   |
| type            | The type of this invoice entry                                                                                                          | FK [invoice\_type](./invoice-type.mdx) |    No    |
| quantity        | Number of units                                                                                                                         | Double                                 |    No    |
| price\_pr\_unit | Price per unit. This is copied from the invoice\_type when created so that changes to the price in the future does not affect this one. | Int                                    |    No    |
| discount        | Discount for this invoice entry                                                                                                         | Int                                    |    No    |
| date\_invoiced  | The date for the invoice entry                                                                                                          | DateTime                               |    No    |
| discount\_money | Discount for this invoice entry in money                                                                                                | Int                                    |    No    |
| ie\_sum         | The sum of the invoice entry                                                                                                            | Int                                    |    No    |

<img src="https://mintcdn.com/superofficeas-worktree-351-fix-webapi-escaped-anchors/lG_0VSOpA0nSl_9s/media/loc/en/database/tables/invoice_entry.png?fit=max&auto=format&n=lG_0VSOpA0nSl_9s&q=85&s=d2e50d6439cc8557120af0850f470c27" alt="invoice_entry table relationship diagram" width="714" height="59" data-path="media/loc/en/database/tables/invoice_entry.png" />

## Indexes

| Fields         | Types    | Description |
| -------------- | -------- | ----------- |
| message\_id    | FK       | Index       |
| type           | FK       | Index       |
| date\_invoiced | DateTime | Index       |

## Relationships

| Table                           | Description                                                                                  |
| ------------------------------- | -------------------------------------------------------------------------------------------- |
| [ej\_message](./ej-message)     | This table contains the messages listed under tickets.                                       |
| [invoice\_type](./invoice-type) | A invoiceable item category (a product or service) that provides default invoice line values |

## Replication Flags

* None

## Security Flags

* No access control via user's Role.
