Table: dbo.Customer
A client specific table that stores the setup information defining a customer.
Columns
NameTypeConstraintsDescription
customer_KEYint (4)NOT NULLPrimary key for this table.
client_KEYint (4)NOT NULLForeign key. A Reference to the client that has this customer.
customer_idnvarchar (22)NOT NULLThe user defined unique identifier of the customer.
customer_namenvarchar (100)NOT NULLThe name of the customer.
is_prospectbit (1)NOT NULLIndicates whether or not the customer is an actual customer or if the customer is a potential customer.
contact_KEYint (4)NOT NULLForeign key. The primary contact record for this customer.
ein_ssnnvarchar (22)NOT NULLThis field will hold the Fed Tax ID if the customer is a non-individual or it will hold the taxpayer SSN if the customer is an individual.
tax_exempt_numbernvarchar (32)NOT NULLThe customer tax exempt number.
date_inactivesmalldatetime (4)The date when the customer is made inactive. If null, the customer will be active.
inactive_reasonnvarchar (2000)NOT NULLThe reason explaining why the Customer has been marked as inactive.
ar__gl_account_KEYint (4)Foreign key. Links the customer to one of the client`s accounts receivable GL Accounts. If null, the client has no receivable account for the customer.
payment_term_KEYint (4)Foreign key. Links the customer to the related Payment term. If null, the client has no payment term for the customer.
finance_charge_definition_KEYint (4)Foreign key. Links the customer to one of the related client`s finance charge definitions. The finance charge definition calculates the fees on a customer`s overdue balance. If null, the customer will not have finance charges.
purchase_order_numbernvarchar (32)NOT NULLUsed as a default purchase order number for entering an AR transaction. Must not begin with a decimal or zero.
shipping__ar_item_KEYint (4)Foreign key. Links the customer to one of the related client`s accounts receivable shipping items. The shipping item contains the shipping charge information for the customer`s purchase. If null, the customer will not have shipping charges.
sales_tax__ar_item_KEYint (4)Foreign key. Links the customer to one of the related client`s accounts receivable sales tax items. The sales tax item contains the sales tax charge information for the customer`s purchase. If null, the customer will not have sales tax charges.
customer_messagenvarchar (2000)NOT NULLThe customer message. Used as a default for entering an AR transaction.
credit_limit_amountdecimal (9, 2)The maximum credit amount assigned to a customer. If null, there is no credit_limit_amount for the customer and the customer will not be able to receive a prompt indicating when the credit limit is reached.
enable_credit_limit_promptbit (1)NOT NULLDetermines whether or not to prompt the user when the customer credit_limit_amount is reached.
enable_credit_holdbit (1)NOT NULLIndicates whether or not there is a credit hold placed on the customer.
credit_hold_explanationnvarchar (60)NOT NULLExplains why a customer has a credit hold.
customer_notesnvarchar (480)NOT NULLStores any notes the client has on the customer.
customer_id_sortablenvarchar (96)NOT NULLA representation of the customer_id column that sorts in natural order. A trigger keeps this field synchronized with the content of customer_id.
Primary key
NameColumnsDescription
PK_Customercustomer_KEY
Unique constraints
NameColumnsDescription
UK_Customer$client_KEY$customer_idclient_KEY, customer_id
UK_Customer$contact_KEYcontact_KEY
Foreign keys
NameColumnsReferenced tableDescription
FK_Customer__AR_Item__sales_tax__ar_item_KEYsales_tax__ar_item_KEYAR_Item (ar_item_KEY)
FK_Customer__AR_Item__shipping__ar_item_KEYshipping__ar_item_KEYAR_Item (ar_item_KEY)
FK_Customer__Client__client_KEYclient_KEYClient (client_KEY)
FK_Customer__Contact__contact_KEYcontact_KEYContact (contact_KEY)
FK_Customer__Finance_Charge_Definition__finance_charge_definition_KEYfinance_charge_definition_KEYFinance_Charge_Definition (finance_charge_definition_KEY)
FK_Customer__GL_Account__ar__gl_account_KEYar__gl_account_KEYGL_Account (gl_account_KEY)
FK_Customer__Payment_Term__payment_term_KEYpayment_term_KEYPayment_Term (payment_term_KEY)
Incoming foreign keys
NameColumnsReferencing tableDescription
FK_AR_Transaction_Template_N_Customer__Customer__customer_KEYcustomer_KEYAR_Transaction_Template_N_Customer
FK_Spreadsheet_Import_Customer__Customer__customer_KEYcustomer_KEYSpreadsheet_Import_Customer
FK_AR_Transaction__Customer__customer_KEYcustomer_KEYAR_Transaction
FK_Print_Customer_Statement_Selection__Customer__customer_KEYcustomer_KEYPrint_Customer_Statement_Selection
FK_Apply_Customer_Payment_Transaction__Customer__customer_KEYcustomer_KEYApply_Customer_Payment_Transaction
FK_Custom_Value_Customer__Customer__customer_KEYcustomer_KEYCustom_Value_Customer
FK_AR_Payment__Customer__customer_KEYcustomer_KEYAR_Payment
FK_Manage_Customer_Payment__Customer__customer_KEYcustomer_KEYManage_Customer_Payment
FK_Customer_Historical_AR_Transaction__Customer__customer_KEYcustomer_KEYCustomer_Historical_AR_Transaction

Schema diagram