accounts


Columns

Column Type Size Nulls Auto Default Children Parents Comments
ID int4 10 null
actionsteps.account fk_actionsteps_account N
addresses.account fk_addresses_account C
contracts.account fk_contracts_account N
dunning.account fk_dunning_account N
opportunities.account fk_opportunities_account N
payments.account fk_payments_account N
pricelists2accounts.account fk_pricelists2accounts_account C
suppliers.account fk_suppliers_account C
tickets.account fk_tickets_account N
transactions.account fk_transactions_account N

Account ID

ownergroup int4 10 null
groups.ID fk_accounts_ownergroup C

Owner group ID (null=PUBLIC)

creator int4 10 null
users.ID fk_accounts_creator N

Creator user ID (defaults to authenticated user on creation)

assigneduser int4 10 null
users.ID fk_accounts_assigneduser N

Assigned user ID

creationdate int8 19 date_part('epoch'::text, now())

Creation date and time as a Unix time stamp (defaults to current date and time on creation)

lastmodified int8 19 date_part('epoch'::text, now())

Last modification date and time as a Unix time stamp (auto-reset on modification)

contact int4 10 null
contacts.ID fk_accounts_contact N

Contact ID

visibility int2 5 0

Visibility (0=REGULAR, 1=ARCHIVED, 2=DELETED)

lastname text 2147483647 ''::text

Last name (surname or company name); is required if firstname is empty

firstname text 2147483647 ''::text

First name (given name); is required if lastname is empty

type int2 5 0

Account type (0=PROSPECT, 1=CUSTOMER, 2=SUPPLIER, 3=CUSTOMERANDSUPPLIER, 4=COMPETITOR, 5=EMPLOYEE)

customernum text 2147483647 ''::text

Customer number (only for PROSPECT, CUSTOMERANDSUPPLIER, CUSTOMER or EMPLOYEE)

suppliernum text 2147483647 ''::text

Supplier number (only for SUPPLIER or CUSTOMERANDSUPPLIER)

currency varchar 3 null

Currency code (ISO 4217) (Pattern: ^[A-Z]{3}$)

locked int2 5 0

Deny booking of billing or procurement transactions

excludetax int2 5 0

Exclude from taxation

description text 2147483647 ''::text

Detailed general description

Table contained 0 rows

Indexes

Constraint Name Type Sort Column(s)
pk_accounts Primary key Asc ID
fk_accounts_contact Performance Asc contact
i_accounts_lastname_firstname_ID Performance Asc/Asc/Asc lastname + firstname + ID
i_accounts_noowner Performance Asc ownergroup
i_accounts_owner Performance Asc/Asc ownergroup + assigneduser
s_accounts Performance Asc/Asc/Asc/Asc lastname + firstname + customernum + suppliernum

Relationships