contracts


Details

Status codes

Status Activity ID Color
Draft DRAFT 0 green
Awaiting approval DRAFT 1 orange
Approved OPEN 2 green
Dismissed CANCELLED 3 red
Active OPEN 4 green
Inactive OPEN 5 orange
Expired CLOSED 6 black
Cancelled CANCELLED 7 red
Closed CLOSED 8 black

Columns

Column Type Size Nulls Auto Default Children Parents Comments
ID int4 10 null
transactions.contract fk_transactions_contract N

Contract ID

ownergroup int4 10 null
groups.ID fk_contracts_ownergroup C

Owner group ID (null=PUBLIC)

creator int4 10 null
users.ID fk_contracts_creator N

Creator user ID (defaults to authenticated user on creation)

assigneduser int4 10 null
users.ID fk_contracts_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)

account int4 10 null
accounts.ID fk_contracts_account N

Account ID

visibility int2 5 0

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

name text 2147483647 null

Name

contractnum text 2147483647 ''::text

Contract number

datefrom int8 19 null

Start date as a Unix time stamp; must be less than or equal to dateto

dateto int8 19 null

End date as a Unix time stamp; must be greater than or equal to datefrom

datecancel int8 19 null

Cancellation date as a Unix time stamp

status int2 5 0

Status (0=DRAFT, 1=AWAITINGAPPROVAL, 2=APPROVED, 3=DISMISSED, 4=ACTIVE, 5=INACTIVE, 6=EXPIRED, 7=CANCELLED, 8=CLOSED)

currency varchar 3 null

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

exchangerate float8 17,17 1

Exchange rate as a multiple of one monetary unit of the fixed system currency

billingcycle int2 5 null

Billing cycle in months

lastbilling int8 19 null

Last billing date and time as a Unix time stamp

description text 2147483647 ''::text

Detailed general description

billingitems json 2147483647 null
autobilling json 2147483647 null
procurementitems json 2147483647 null

Table contained 0 rows

Indexes

Constraint Name Type Sort Column(s)
pk_contracts Primary key Asc ID
fk_contracts_account Performance Asc account
i_contracts_autobilling Performance Asc status
i_contracts_noowner Performance Asc ownergroup
i_contracts_owner Performance Asc/Asc ownergroup + assigneduser
s_contracts Performance Asc/Asc name + contractnum

Relationships