Table: dbo.Client_Billing
Columns
NameTypeConstraintsDescription
client_billing_KEYint (4)NOT NULLPrimary key for this table; the client-level billing options
client_KEYint (4)NOT NULLForeign key; key of the associated client
exclude_agent_transactionsbit (1)NOT NULLFlag to exclude agent transactions from generating billing transactions
bill_to_other_clientbit (1)NOT NULLFlag to bill another client for this clients transactions
bill_to_other_client__client_KEYint (4)Foreign key; key of the billing client
prepayment_amountdecimal (9, 2)NOT NULLAmount of prepayment received from the client
prepayment_received_datesmalldatetime (4)Date prepayment was received from the client
prepayment_applied_datesmalldatetime (4)Date prepayment was applied to an invoice
discount_typeint (4)NOT NULLType of discount the value field contains (0=Percentage, 1=Amount)
discount_valuedecimal (9, 4)NOT NULLDiscount value to be applied to clients invoice
discount_begin_datesmalldatetime (4)Date the discount become effective
discount_end_datesmalldatetime (4)Date the discount ends
discount_descriptionnvarchar (480)NOT NULLDiscount description to use on the invoice
fees__gl_account_KEYint (4)Key to the gl_account for billing fees.
delivery__gl_account_KEYint (4)Key to the gl_account for billing delivery.
discount__gl_account_KEYint (4)Key to the gl_account for billing discounts.
create_fees_as_finalbit (1)NOT NULLFlag; if true, then clients fees are finalized at the time they are created.
exclude_form_fees_from_create_as_finalbit (1)NOT NULLWhether or not form fees should be excluded from create fees as final.
Primary key
NameColumnsDescription
PK_Client_Billingclient_billing_KEY
Unique constraints
NameColumnsDescription
UK_Client_Billing$client_KEYclient_KEY
Foreign keys
NameColumnsReferenced tableDescription
FK_Client_Billing__Client__bill_to_other_client__client_KEYbill_to_other_client__client_KEYClient (client_KEY)
FK_Client_Billing__Client__client_KEYclient_KEYClient (client_KEY)
FK_Client_Billing__GL_Account__delivery__gl_account_KEYdelivery__gl_account_KEYGL_Account (gl_account_KEY)
FK_Client_Billing__GL_Account__discount__gl_account_KEYdiscount__gl_account_KEYGL_Account (gl_account_KEY)
FK_Client_Billing__GL_Account__fees__gl_account_KEYfees__gl_account_KEYGL_Account (gl_account_KEY)
Incoming foreign keys
NameColumnsReferencing tableDescription
FK_BS_Client_Billing__Client__bill_to_other_clientclient_billing_KEYBS_Client_Billing__Client__bill_to_other_client

Schema diagram