Table: dbo.Quick_Books_Retrieved_Vendor
this table contains information on vendors retrieved from quickbooks for a given ACS client, where the vendors have not yet been imported into the permanent ACS tables for that client. For quickbooks online, the process of importing data has two steps. First, we retrieve the data from a quickbooks online company, and then we import the retrieved data into the permanent ACS tables. We need a means to store off the information after that first step has completed, but before that second step. This table provides the means for us to store information on vendors that have been retrieved from a quickbooks online company, but not yet imported into the permanent tables in ACS for the client. Once the import completes for one client, the records in this table for that one client will be removed.
Columns
Name | Type | Constraints | Description
quick_books_retrieved_vendor_KEY | int (4) | NOT NULL | the primary Key for this table.
client_KEY | int (4) | NOT NULL | the client key, to allow us to group retrieved vendors by ACS client.
is_active | bit (1) | NOT NULL | True if the vendor is active, and false if the vendor is not active, in quickbooks.
is_1099_vendor | bit (1) | NOT NULL | True if the vendor is a 1099 vendor, and false if the vendor is not a 1099 vendor, in quickbooks.
list_id | nvarchar (120) | NOT NULL | the id of the vendor. this is supposed to be a unique value, at least for the vendors of one quickbooks company.
tax_id | nvarchar (60) | NOT NULL | the tax identifier of the vendor.
company_name | nvarchar (100) | NOT NULL | the name of the company associated with this vendor. This could be a person or organization.
display_name | nvarchar (200) | NOT NULL | the name of the vendor, as displayed. This could be a person or organization.
first_name | nvarchar (50) | NOT NULL | the first name of the vendor.
middle_name | nvarchar (50) | NOT NULL | The middle name of the vendor.
last_name | nvarchar (50) | NOT NULL | The last name of the vendor.
address_line_one | nvarchar (1000) | NOT NULL | the first line of the vendor address.
address_line_two | nvarchar (1000) | NOT NULL | the second line of the vendor address.
address_city | nvarchar (510) | NOT NULL | the city of the vendor address.
address_state | nvarchar (510) | NOT NULL | the state of the vendor address.
address_postal_code | nvarchar (62) | NOT NULL | the zip code or other postal code of the vendor address.
primary_phone | nvarchar (42) | NOT NULL | the primary phone number of the vendor
alternate_phone | nvarchar (42) | NOT NULL | an alternate phone number for the vendor.
mobile_phone | nvarchar (42) | NOT NULL | a mobile phone number for the vendor.
fax_phone | nvarchar (42) | NOT NULL | a fax phone number for the vendor.
primary_email | nvarchar (200) | NOT NULL | the primary email address for the vendor.

Primary key
Name | Columns | Description
PK_Quick_Books_Retrieved_Vendor | quick_books_retrieved_vendor_KEY |
Unique constraints
Name | Columns | Description
UK_Quick_Books_Retrieved_Vendor$client_KEY$list_id | client_KEY, list_id |
UK_Quick_Books_Retrieved_Vendor$client_KEY$display_name | client_KEY, display_name |

Foreign keys
Name | Columns | Referenced table | Description
FK_Quick_Books_Retrieved_Vendor__Client__client_KEY | client_KEY | Client (client_KEY) |