accounts
Customer and supplier accounts with billing, financial, and contact information.
| Name | Type | Nullable | Default Value | Notes |
|---|---|---|---|---|
PKID | integer | Account ID | ||
fork forks.ID | integer | Fork ID (`null` for base module) | ||
ownergroup groups.ID | integer | Owner group ID (`null`=PUBLIC) | ||
creator | integer | Creator user ID (defaults to authenticated user on creation) | ||
assigneduser users.ID | integer | Assigned user ID | ||
creationdate | bigint | date_part('epoch', now()) | Creation date and time as a Unix timestamp (defaults to current date and time on creation) | |
lastmodified | bigint | date_part('epoch', now()) | Last modification date and time as a Unix timestamp (auto-reset on modification) | |
contact contacts.ID | integer | Contact ID | ||
visibility | smallint | 0 | Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED) | |
lastname | text | '' | Last name (surname or company name); is required if `firstname` is empty | |
firstname | text | '' | First name (given name); is required if `lastname` is empty | |
type | smallint | 0 | Account type (`0`=PROSPECT, `1`=CUSTOMER, `2`=SUPPLIER, `3`=CUSTOMERANDSUPPLIER, `4`=COMPETITOR, `5`=EMPLOYEE) | |
customernum | text | '' | Customer number; only for PROSPECT, CUSTOMERANDSUPPLIER, CUSTOMER or EMPLOYEE | |
suppliernum | text | '' | Supplier number; only for SUPPLIER or CUSTOMERANDSUPPLIER | |
taxid | text | '' | Tax ID (e.g. VATIN or SSN) | |
currency | character varying(3) | Currency code (ISO 4217) | ||
locked | smallint | 0 | Deny booking of billing or procurement transactions | |
excludetax | smallint | 0 | Exclude from taxation | |
description | text | '' | Detailed general description |
| Name | Unique | Nulls Distinct | Primary | Partial | Method | Keys |
|---|---|---|---|---|---|---|
| fk_accounts_assigneduser | gin | assigneduser | ||||
| fk_accounts_contact | btree | contact | ||||
| fk_accounts_fork | gin | fork | ||||
| fk_accounts_ownergroup | gin | ownergroup | ||||
| i_accounts_lastname_firstname | btree | lastname, firstname | ||||
| i_accounts_nofork | gin | fork | ||||
| i_accounts_noowner | gin | ownergroup | ||||
| pk_accounts | btree | ID | ||||
| s_accounts_customernum | gin | customernum | ||||
| s_accounts_firstname | gin | firstname | ||||
| s_accounts_lastname | gin | lastname | ||||
| s_accounts_suppliernum | gin | suppliernum |
| Name | Type |
|---|---|
| c_accounts_name | check |
| c_accounts_type | check |
| dc_accounts_currency | check |
| dc_accounts_customernum | check |
| dc_accounts_description | check |
| dc_accounts_firstname | check |
| dc_accounts_lastname | check |
| dc_accounts_suppliernum | check |
| dc_accounts_taxid | check |
| dc_accounts_type | check |
| dc_accounts_visibility | check |
| fk_accounts_assigneduser | foreign_key |
| fk_accounts_contact | foreign_key |
| fk_accounts_fork | foreign_key |
| fk_accounts_ownergroup | foreign_key |
| pk_accounts | primary_key |
Loading...