Table: dbo.Transaction_Template_Schedule_Option
This table stores the options we support for scheduled transaction templates.
Columns
Name | Type | Constraints | Description
transaction_template_KEY | int (4) | NOT NULL | The primary key of this table, and the key of the transaction template parent
transaction_template_scheduled_recurrence_KEY | int (4) | NOT NULL | Denotes how often the application creates a transaction (e.g., at some daily interval, weekly, monthly).
transaction_template_recurrence_end_KEY | int (4) | NOT NULL | The value of the key indicates whether or not the application indefinitely creates transactions from the template. If transaction creation should not continue indefinitely, then the value of the key denotes how the application determines when to stop.
transaction_template_creation_day_KEY | int (4) |  | If we are creating transactions annually or at some monthly interval, then this key tells the application whether it should create a transaction (1) on a day denoted by a number, e.g., the 20th day of a month or, (2) on a day of the week, e.g., the last Friday of the month. Null, if we are not creating transactions monthly or annually.
transaction_template_calendar_day_KEY | int (4) |  | If a user wants a transaction created on a specific occurrence of a day of the week, then this key denotes which day of the week. E.g., if a user wants a transaction on the first Friday of the month, then this key denotes Friday. Null, if we are not creating transactions on a specific day of the week.
transaction_template_calendar_day_occurrence_KEY | int (4) |  | If a user wants a transaction created on a specific occurrence of a day of the week, then this key denotes which occurrence. E.g., if a user wants a transaction on the last Monday of the month, then this key denotes Last. Null, if we are not creating transactions on a specific day of the week.
create_in_month__month_information_KEY | int (4) |  | If a user wants a transaction created annually, then this key denotes the calendar month in which the application creates it. Null, if we are not creating transactions annually.
start_date | smalldatetime (4) | NOT NULL | The date at which scheduling begins.
prompt_before_creating_transaction | bit (1) | NOT NULL | If marked, the application will prompt the user before creating a transaction. At that point, the user chooses between allowing the application to create the transaction, or postponing transaction creation.
must_occur_on_weekday | bit (1) | NOT NULL | If marked, the application will create the transaction on Friday when the scheduled occurrence falls on Saturday, and on Monday when the scheduled occurrence falls on Sunday. This option must be false when the template is scheduled weekly.
create_days_in_advance | int (4) | NOT NULL | The application creates the transaction the specified number of days in advance of the scheduled date. E.g., if the value in this field is two, and the next transaction is scheduled to be created on 12/01/11, we will create a transaction on 11/28/11, and the transaction will have the date 12/01/11.
recurrence_end_total_amount | decimal (9, 2) | NOT NULL | If a user wants to stop generating transactions when the generated transactions total to a specific amount, then this is the amount. This must be zero if the user chooses to generate transactions indefinitely, or if it wants generation to stop at a specific number of transaction instances.
recurrence_end_amount_adjustment | decimal (9, 2) | NOT NULL | An optional user-entered adjustment to the recurrence end total amount. This must be zero if the user chooses to generate transactions indefinitely, or if it wants generation to stop at a specific number of transaction instances.
recurrence_end_total_number_of_instances | int (4) | NOT NULL | If a user wants to stop transaction generation after the application creates a specific number of transactions, then this is that number. This must be zero if the user chooses to generate transactions indefinitely, or if it wants generation to stop when the generated transaction sum to a specific amount.
recurrence_end_number_of_instances_adjustment | int (4) | NOT NULL | An optional user-entered adjustment to the recurrence end total number of instances. This must be zero if the user chooses to generate transactions indefinitely, or if it wants generation to stop when the generated transactions sum to a specific amount.
day_number | int (4) | NOT NULL | If transaction creation is scheduled for a specific day number of a month, then this is that day number. E.g., if a user wants a transaction on the 10th of every month, then this field contains the value 10. Otherwise, this field must be zero.
creation_interval | int (4) | NOT NULL | When a user want a transaction created every N days, weeks or months, this field has the value N. If the template is scheduled at a daily, weekly or monthly interval, then this field must be positive and in a range specified by a check constraint. If the template is not scheduled at a daily, weekly or monthly interval, then this field must be zero.
create_weekly_on_sunday | bit (1) | NOT NULL | If the template is scheduled weekly, then this field may be true or false. If true, then the application will create a transaction at some weekly interval, on Sunday. If the template is not scheduled weekly, this field must be false.
create_weekly_on_monday | bit (1) | NOT NULL | If the template is scheduled weekly, then this field may be true or false. If true, then the application will create a transaction at some weekly interval, on Monday. If the template is not scheduled weekly, this field must be false.
create_weekly_on_tuesday | bit (1) | NOT NULL | If the template is scheduled weekly, then this field may be true or false. If true, then the application will create a transaction at some weekly interval, on Tuesday. If the template is not scheduled weekly, this field must be false.
create_weekly_on_wednesday | bit (1) | NOT NULL | If the template is scheduled weekly, then this field may be true or false. If true, then the application will create a transaction at some weekly interval, on Wednesday. If the template is not scheduled weekly, this field must be false.
create_weekly_on_thursday | bit (1) | NOT NULL | If the template is scheduled weekly, then this field may be true or false. If true, then the application will create a transaction at some weekly interval, on Thursday. If the template is not scheduled weekly, this field must be false.
create_weekly_on_friday | bit (1) | NOT NULL | If the template is scheduled weekly, then this field may be true or false. If true, then the application will create a transaction at some weekly interval, on Friday. If the template is not scheduled weekly, this field must be false.
create_weekly_on_saturday | bit (1) | NOT NULL | If the template is scheduled weekly, then this field may be true or false. If true, then the application will create a transaction at some weekly interval, on Saturday. If the template is not scheduled weekly, this field must be false.
semimonthly_first_day_number | int (4) | NOT NULL | If a user wants two transactions created per month, this is the number of the first day. E.g., if a user wants one transaction on the 5th of the month, and another on the 15th of the month, then this field contains the value 5. If the template is not scheduled semimonthly, then this field must be zero.
semimonthly_second_day_number | int (4) | NOT NULL | If a user wants two transactions created per month, this is the number of the second day. E.g., if a user wants one transaction on the 5th of the month, and another on the 15th of the month, then this field contains the value 15. If the template is not scheduled semimonthly, then this field must be zero.

Primary key
Name | Columns | Description
PK_Transaction_Template_Schedule_Option$transaction_template_KEY | transaction_template_KEY |

Foreign keys
Name | Columns | Referenced table | Description
FK_Transaction_Template_Schedule_Option__Month_Information__create_in_month__month_information_KEY | create_in_month__month_information_KEY | Month_Information (month_information_KEY) |
FK_Transaction_Template_Schedule_Option__Transaction_Template__transaction_template_KEY | transaction_template_KEY | Transaction_Template (transaction_template_KEY) |
FK_Transaction_Template_Schedule_Option__Transaction_Template_Calendar_Day__transaction_template_calendar_day_KEY | transaction_template_calendar_day_KEY | Transaction_Template_Calendar_Day (transaction_template_calendar_day_KEY) |
FK_Transaction_Template_Schedule_Option__Transaction_Template_Calendar_Day_Occurrence__transaction_template_calendar_day_occurre | transaction_template_calendar_day_occurrence_KEY | Transaction_Template_Calendar_Day_Occurrence (transaction_template_calendar_day_occurrence_KEY) |
FK_Transaction_Template_Schedule_Option__Transaction_Template_Creation_Day__transaction_template_creation_day_KEY | transaction_template_creation_day_KEY | Transaction_Template_Creation_Day (transaction_template_creation_day_KEY) |
FK_Transaction_Template_Schedule_Option__Transaction_Template_Recurrence_End__transaction_template_recurrence_end_KEY | transaction_template_recurrence_end_KEY | Transaction_Template_Recurrence_End (transaction_template_recurrence_end_KEY) |
FK_Transaction_Template_Schedule_Option__Transaction_Template_Scheduled_Recurrence__transaction_template_scheduled_recurrence_KE | transaction_template_scheduled_recurrence_KEY | Transaction_Template_Scheduled_Recurrence (transaction_template_scheduled_recurrence_KEY) |