Show pageOld revisionsBacklinksExport to PDFFold/unfold allBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== pears.TempTimeSheetCancellation ====== <WRAP center round info> Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. </WRAP> ===== Description ===== Holds records of Timesheet Cancellations - works in conjunction with code in the TempTimesheetCancel and TempTimesheetComplete functions. ===== Columns ===== ^ Column ^ Type ^ Null ^ Default ^ Comment ^ | **TempTimeSheetCancellationID** | char(20) | NOT NULL | | | | OriginalTempTimesheetID | char(20) | NOT NULL | | | | PayCorrected | smallint | NOT NULL | 0 | | | ChargeCorrected | smallint | NOT NULL | 0 | | | ReplacementProvTimesheetSerialNumber | char(12) | NULL | | Only populated while replacement provisional timesheet exists - blanked afterwards | | ContraTempTimeSheetID | char(20) | NULL | | | | ReplacementTempTimeSheetID | char(20) | NULL | | | | WhenCancelled | timestamp | NOT NULL | current timestamp | | | WhoCancelled | char(20) | NULL | | | | WhenReplacementCompleted | timestamp | NULL | | | | WhoCompletedReplacement | char(20) | NULL | | | | Description | long varchar | NULL | | | | TimesheetCancelReasonID | char(20) | NULL | | | ===== Primary Key ===== * TempTimeSheetCancellationID ===== Foreign Keys ===== ^ Constraint ^ Columns ^ References ^ Delete/update action ^ | TimesheetCancelReason | TimesheetCancelReasonID | [[database:tables:pears_timesheetcancelreason|pears.TimesheetCancelReason (TimesheetCancelReasonID)]] | | ===== Referenced By ===== * No incoming foreign keys found. ===== Indexes ===== ^ Name ^ Type ^ Columns ^ Detail ^ | TempTSCanc_Orig | Index | OriginalTempTimesheetID | | | TempTSCanc_Contra | Index | ContraTempTimeSheetID | | | TempTSCanc_Repl | Index | ReplacementTempTimeSheetID | | ===== Triggers ===== * No triggers found. ===== Original SQL ===== <code sql> -- IQX database structure split by table -- Source: IQXDatabaseStructure - with comments.sql -- Table: "pears"."TempTimeSheetCancellation" -- Table comment: Holds records of Timesheet Cancellations - works in conjunction with code in the TempTimesheetCancel and TempTimesheetComplete functions. -- Statement count: 7 CREATE TABLE "pears"."TempTimeSheetCancellation" ( "TempTimeSheetCancellationID" char(20) NOT NULL ,"OriginalTempTimesheetID" char(20) NOT NULL ,"PayCorrected" smallint NOT NULL DEFAULT 0 ,"ChargeCorrected" smallint NOT NULL DEFAULT 0 ,"ReplacementProvTimesheetSerialNumber" char(12) NULL ,"ContraTempTimeSheetID" char(20) NULL ,"ReplacementTempTimeSheetID" char(20) NULL ,"WhenCancelled" timestamp NOT NULL DEFAULT current timestamp ,"WhoCancelled" char(20) NULL ,"WhenReplacementCompleted" timestamp NULL ,"WhoCompletedReplacement" char(20) NULL ,"Description" long varchar NULL ,"TimesheetCancelReasonID" char(20) NULL ,PRIMARY KEY ("TempTimeSheetCancellationID" ASC) ) go COMMENT ON COLUMN "pears"."TempTimeSheetCancellation"."ReplacementProvTimesheetSerialNumber" IS 'Only populated while replacement provisional timesheet exists - blanked afterwards' go COMMENT ON TABLE "pears"."TempTimeSheetCancellation" IS 'Holds records of Timesheet Cancellations - works in conjunction with code in the TempTimesheetCancel and TempTimesheetComplete functions.' go ALTER TABLE "pears"."TempTimeSheetCancellation" ADD FOREIGN KEY "TimesheetCancelReason" ("TimesheetCancelReasonID" ASC) REFERENCES "pears"."TimesheetCancelReason" ("TimesheetCancelReasonID") go CREATE INDEX "TempTSCanc_Orig" ON "pears"."TempTimeSheetCancellation" ( "OriginalTempTimesheetID" ) go CREATE INDEX "TempTSCanc_Contra" ON "pears"."TempTimeSheetCancellation" ( "ContraTempTimeSheetID" ) go CREATE INDEX "TempTSCanc_Repl" ON "pears"."TempTimeSheetCancellation" ( "ReplacementTempTimeSheetID" ) go </code> database/tables/pears_temptimesheetcancellation.txt Last modified: 2026/08/07 19:24by 127.0.0.1