Table: dbo.Vendor_Agent_Effective_Date
This table will essentialy hold duplicate information from the Vendor_Agent table, and will be used as temp table while areas of the code are changed for the Effective Date for Deposit Schedules project.
Columns
Name | Type | Constraints | Description
vendor_agent_effective_date_KEY | int (4) | NOT NULL | Primary key for this table.
vendor_KEY | int (4) | NOT NULL | Foreign key for this table that references a vendor.
vendor_agent_payment_schedule_KEY | int (4) |  | Payment schedule.
vendor_agent_effective_date_for_deposit_schedules | date (3) | NOT NULL | Date that determines when the pay schedule changes.
vendor_agent_due_date_adjustment_KEY | int (4) |  | Due date adjustment for for non-banking days
liability_amount | decimal (9, 2) |  | Liability amount used for amount due scheduling.
vendor_agent_liability_source_KEY | int (4) |  | Foreign key for this table that references a vendor agent liability source.
payment_day_of_period | int (4) | NOT NULL | Indicates the day of the period -- e.g., 5 for the fifth day of the month; defaults to first day of month
payment_day_offset | int (4) | NOT NULL | Indicates the number of days to add when calculating -- e.g., 3 for three business days after the calculated period end
payment_month_or_offset | int (4) |  | Indicates either month of the year or an offset, depending on the payment schedule

Primary key
Name | Columns | Description
PK_Vendor_Agent_Effective_Date | vendor_agent_effective_date_KEY |

Foreign keys
Name | Columns | Referenced table | Description
FK_Vendor_Agent_Effective_Date__Vendor__vendor_KEY | vendor_KEY | Vendor (vendor_KEY) |
FK_Vendor_Agent_Effective_Date__Vendor_Agent_Due_Date_Adjustment__vendor_agent_due_date_adjustment_KEY | vendor_agent_due_date_adjustment_KEY | Vendor_Agent_Due_Date_Adjustment (vendor_agent_due_date_adjustment_KEY) |
FK_Vendor_Agent_Effective_Date__Vendor_Agent_Payment_Schedule__vendor_agent_payment_schedule_KEY | vendor_agent_payment_schedule_KEY | Vendor_Agent_Payment_Schedule (vendor_agent_payment_schedule_KEY) |
FK_Vendor_Agent_Effective_Date__Vendor_Agent_Liability_Source__vendor_agent_liability_source_KEY | vendor_agent_liability_source_KEY | Vendor_Agent_Liability_Source (vendor_agent_liability_source_KEY) |