Table: dbo.Scheduled_Payroll_Tracking_Detail
This table allows the processor(staff) to know which payrolls need to be processed and find the status of a particular client. It also includes the information needed for management reporting.
Columns
Name | Type | Constraints | Description
client_pay_schedule_detail_KEY | int (4) | NOT NULL | Primary key and a foreign key to Client Pay Schedule Detail table which signifies that the records in this table will be specific to Client Pay Schedule Detail.
primary_processor__staff_KEY | int (4) |  | Null -- Signifies that the Primary staff who processes this client are not getting tracked. Foreign key to staff table
backup_processor__staff_KEY | int (4) |  | Null -- Signifies that the Backup staff who might processes this client are not getting tracked. Foreign key to staff table
notes | nvarchar (480) |  | Null -- Signifies that we do not want to pass any information for the payroll we are processing.
is_do_not_pay | bit (1) | NOT NULL | If the payroll is coming under some category of Do Not Pay reasons. This column is independent of do_not_pay_reason_KEY column as far as DAL is concerned but a relation ship can be seen in the UI layer.
do_not_pay_reason_KEY | int (4) |  | Null -- No Reason given for Do Not Pay. Foreign key relationship with Do_Not_Pay_Reason table.
scheduled_payroll_change_initiator_KEY | int (4) |  | Null -- No one has initiated any changes to payroll tracking. Foreign key relationship with Scheduled_Payroll_Change_Initiator table.
date_completed | datetime (8, 3) |  | DateTime value at which payroll is marked as DNP.
prior__client_pay_schedule_status_KEY | int (4) | NOT NULL | Record the prior status of payroll before marking it as DNP.

Primary key
Name | Columns | Description
PK_Scheduled_Payroll_Tracking_Detail$client_pay_schedule_detail_KEY | client_pay_schedule_detail_KEY |

Foreign keys
Name | Columns | Referenced table | Description
FK_Scheduled_Payroll_Tracking_Detail__Client_Pay_Schedule_Detail__client_pay_schedule_detail_KEY | client_pay_schedule_detail_KEY | Client_Pay_Schedule_Detail (client_pay_schedule_detail_KEY) |
FK_Scheduled_Payroll_Tracking_Detail__Client_Pay_Schedule_Status__prior__client_pay_schedule_status_KEY | prior__client_pay_schedule_status_KEY | Client_Pay_Schedule_Status (client_pay_schedule_status_KEY) |
FK_Scheduled_Payroll_Tracking_Detail__Do_Not_Pay_Reason__do_not_pay_reason_KEY | do_not_pay_reason_KEY | Do_Not_Pay_Reason (do_not_pay_reason_KEY) |
FK_Scheduled_Payroll_Tracking_Detail__Scheduled_Payroll_Change_Initiator__scheduled_payroll_change_initiator_KEY | scheduled_payroll_change_initiator_KEY | Scheduled_Payroll_Change_Initiator (scheduled_payroll_change_initiator_KEY) |
FK_Scheduled_Payroll_Tracking_Detail__Staff__backup_processor__staff_KEY | backup_processor__staff_KEY | Staff (staff_KEY) |
FK_Scheduled_Payroll_Tracking_Detail__Staff__primary_processor__staff_KEY | primary_processor__staff_KEY | Staff (staff_KEY) |