Table: dbo.AR_Item
This table stores setup information for AR items.
Columns
NameTypeConstraintsDescription
ar_item_KEYint (4)NOT NULLPrimary key for this table.
client_KEYint (4)NOT NULLkey to the client.
ar_item_idnvarchar (22)NOT NULLThe id for the ar_item.
descriptionnvarchar (2000)NOT NULLThe description for the ar_item.
ar_item_type_KEYint (4)NOT NULLThe ar_item type.
inactive_datesmalldatetime (4)If set this is the date the ar_item becomes inactive.
sales_pricedecimal (9, 4)NOT NULLThe sales price of the ar_item.
sales__gl_account_KEYint (4)The sales gl account.
purchase_costdecimal (9, 4)NOT NULLThe purchase cost of the ar_item.
cost__gl_account_KEYint (4)The purchase cost of sales gl account.
inventory__gl_account_KEYint (4)The inventory gl account.
ar_item_tax_status_KEYint (4)NOT NULLThe tax status.
taxing_authority_KEYint (4)Key to the taxing authority table which stores the sales tax description we are interested in.
tax__gl_account_KEYint (4)The tax gl account.
additional_charge_percentagedecimal (5, 4)NOT NULLThe percentage of additional charge.
additional_charge_amountdecimal (9, 4)NOT NULLthe amount of additional charge.
additional_charge__gl_account_KEYint (4)The additional charge gl account.
eligible_for_discountbit (1)NOT NULLThe eligibility for discount on the item.
discount__gl_account_KEYint (4)Used by the filter system which expects separate fields for each gl account. Not splitting these out would result in getting both kinds of accounts when only one kind was desired.
other_charge__gl_account_KEYint (4)Used by the filter system which expects separate fields for each gl account. Not splitting these out would result in getting both kinds of accounts when only one kind was desired.
active_status_KEYint (4)NOT NULLNew column to fetch the status based on the inactive date. Note: not a true FK since 'Active_Status' doesn't exist. Allowed values are 1 (active) and 2 (inactive).
ar_item_id_sortablevarchar (48)NOT NULLThe sortable id for the ar_item.
additional_charge__payment_term_discount_method_KEYtinyint (1)NOT NULLThe selected method determines if this ar_item uses a percentage or an amount.
Primary key
NameColumnsDescription
PK_AR_Itemar_item_KEY
Unique constraints
NameColumnsDescription
UK_AR_Item$ar_item_id$client_KEYar_item_id, client_KEY
Foreign keys
NameColumnsReferenced tableDescription
FK_AR_Item__Payment_Term_Discount_Method__additional_charge__payment_term_discount_method_KEYadditional_charge__payment_term_discount_method_KEYPayment_Term_Discount_Method (payment_term_discount_method_KEY)
FK_AR_Item__AR_Item_Tax_Status__ar_item_tax_status_KEYar_item_tax_status_KEYAR_Item_Tax_Status (ar_item_tax_status_KEY)
FK_AR_Item__AR_Item_Type__ar_item_type_KEYar_item_type_KEYAR_Item_Type (ar_item_type_KEY)
FK_AR_Item__Client__client_KEYclient_KEYClient (client_KEY)
FK_AR_Item__GL_Account__additional_charge__gl_account_KEYadditional_charge__gl_account_KEYGL_Account (gl_account_KEY)
FK_AR_Item__GL_Account__cost__gl_account_KEYcost__gl_account_KEYGL_Account (gl_account_KEY)
FK_AR_Item__GL_Account__discount__gl_account_KEYdiscount__gl_account_KEYGL_Account (gl_account_KEY)
FK_AR_Item__GL_Account__inventory__gl_account_KEYinventory__gl_account_KEYGL_Account (gl_account_KEY)
FK_AR_Item__GL_Account__other_charge__gl_account_KEYother_charge__gl_account_KEYGL_Account (gl_account_KEY)
FK_AR_Item__GL_Account__sales__gl_account_KEYsales__gl_account_KEYGL_Account (gl_account_KEY)
FK_AR_Item__GL_Account__tax__gl_account_KEYtax__gl_account_KEYGL_Account (gl_account_KEY)
FK_AR_Item__Taxing_Authority__taxing_authority_KEYtaxing_authority_KEYTaxing_Authority (taxing_authority_KEY)
Incoming foreign keys
NameColumnsReferencing tableDescription
FK_AR_Item_Group__AR_Item__group__ar_item_KEYgroup__ar_item_KEYAR_Item_Group
FK_AR_Item_Group__AR_Item__member__ar_item_KEYmember__ar_item_KEYAR_Item_Group
FK_AR_Transaction_Template_Item__AR_Item__ar_item_KEYar_item_KEYAR_Transaction_Template_Item
FK_Spreadsheet_Import_AR_Item__AR_Item__ar_item_KEYar_item_KEYSpreadsheet_Import_AR_Item
FK_Customer__AR_Item__sales_tax__ar_item_KEYsales_tax__ar_item_KEYCustomer
FK_Customer__AR_Item__shipping__ar_item_KEYshipping__ar_item_KEYCustomer
FK_AR_Transaction_Item_N_AR_Item__AR_Item__ar_item_KEYar_item_KEYAR_Transaction_Item_N_AR_Item

Schema diagram