Table: dbo.Spreadsheet_Import_AR_Item
The purpose of this table is to map shipping items or sales tax items imported via the spreadsheet import process to shipping items or sales tax item already existing in the database.
Columns
Name | Type | Constraints | Description
spreadsheet_import_ar_item_KEY | int (4) | NOT NULL | Key which uniquely identify each row of the table.
client_KEY | int (4) | NOT NULL | Key of the client for which we are importing the spreadsheet data.
id | nvarchar (318) | NOT NULL | An external id which uniquely identifies a shipping item/sales tax item in the data source being imported. This id will be compared first to the ar item ID and then to the description when trying to find a match with an existing ar item in the database.
is_interim_data | bit (1) | NOT NULL | When the user cancels the import process,the data mapped till that point has to be saved and presented to the user when he starts the import next time.For such mapping data we set the value of this column to true.
ar_item_type_KEY | int (4) | NOT NULL | Type of the AR item which indicates whether the mapping row is for shipping item or for sales tax item.
ar_item_KEY | int (4) |  | ar_item_KEY of ACS AR_Item table to which the spreadsheet shipping item/sales tax item is mapped. Null value indicates that the spreadsheet value mapped to Do not import.

Primary key
Name | Columns | Description
PK_Spreadsheet_Import_AR_Item | spreadsheet_import_ar_item_KEY |
Unique constraints
Name | Columns | Description
UK_Spreadsheet_Import_AR_Item$client_KEY$id$ar_item_type_KEY | client_KEY, id, ar_item_type_KEY |

Foreign keys
Name | Columns | Referenced table | Description
FK_Spreadsheet_Import_AR_Item__AR_Item__ar_item_KEY | ar_item_KEY | AR_Item (ar_item_KEY) |
FK_Spreadsheet_Import_AR_Item__AR_Item_Type__ar_item_type_KEY | ar_item_type_KEY | AR_Item_Type (ar_item_type_KEY) |
FK_Spreadsheet_Import_AR_Item__Client__client_KEY | client_KEY | Client (client_KEY) |