ALTER TABLE R5ACTCHECKLISTS ADD COLUMN ACK_LINEARLOCATION NUMERIC(24,6) NULL;

CREATE TABLE R5SCHEDGROUPS (
    SCG_CODE NVARCHAR(30) NOT NULL,
    SCG_DESC NVARCHAR(80) NOT NULL,
    SCG_CLASS NVARCHAR(8),
    SCG_ORG    NVARCHAR(15) NOT NULL,
    SCG_CLASS_ORG    NVARCHAR(15),
    SCG_NOTUSED    NVARCHAR(1),
    SCG_PROFILEPICTURE    NVARCHAR(30),
    DMLTYPE    NCHAR (1) DEFAULT ('N'),
    PRIMARY KEY (SCG_CODE)
);

INSERT INTO R5SYSCOLUMNS VALUES('R5SCHEDGROUPS','SCG_CODE','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');

INSERT INTO R5LISTENTITY  (LET_DATAGRID, LET_SEQNO, LET_GROUPID, LET_DELINSUPD, LET_FILTER, LET_TABLENAME, LET_ORGKEY, LET_CONNECTEDMODE, LET_ALWAYSDOWNLOAD, LET_CATEGORY, LET_CLEARCONDITION) VALUES('WCSUPR_IPAD', 50, 0, 3, NULL, 'R5SCHEDGROUPS', 'SCG_ORG', '-', '-', NULL, NULL);

UPDATE r5configsettings
SET cfs_xmlconfig='{ "sections":[ { "name":"Work Order", "fields":[ { "id":"EVT_CODE", "lbl":"Work Order", "type":"CHAR", "def":"", "ro":"YES", "rq":"NO", "len":"30", "hid":"NO" }, { "id":"EVT_DESC", "lbl":"Description", "type":"CHAR", "def":"", "ro":"NO", "rq":"YES", "len":"80", "hid":"NO" }, { "id":"EVT_OBJECT", "lbl":"Equipment", "type":"LOV-2", "def":"", "ro":"NO", "rq":"YES", "len":"30", "hid":"NO" }, { "id":"OBJ_ALIAS", "lbl":"Equipment Alias", "type":"CHAR", "def":"", "ro":"YES", "rq":"NO", "len":"30", "hid":"YES" }, { "id":"EVT_STANDWORK", "lbl":"Standard WO", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"20", "hid":"NO" }, { "id":"EVT_JOBTYPE", "lbl":"Type", "type":"LOV-1", "def":"", "ro":"NO", "rq":"YES", "len":"8", "hid":"NO" }, { "id":"EVT_MRC", "lbl":"Department", "type":"LOV-1", "def":"", "ro":"NO", "rq":"YES", "len":"15", "hid":"NO" }, { "id":"EVT_STATUS", "lbl":"Status", "type":"PICKER", "def":"", "ro":"NO", "rq":"YES", "len":"8", "hid":"NO" }, { "id":"EVT_SAFETY", "lbl":"Safety", "type":"BOOL", "def":"", "ro":"NO", "rq":"NO", "len":"2", "hid":"NO" }, { "id":"EVT_WARRANTY", "lbl":"Warranty", "type":"BOOL", "def":"", "ro":"NO", "rq":"NO", "len":"2", "hid":"NO" }, { "id":"EVT_MULTIEQUIP", "lbl":"Multiple Equipment", "type":"BOOL", "def":"", "ro":"YES", "rq":"NO", "len":"2", "hid":"YES" } ] }, { "name":"Linear Reference Details", "hid":"YES", "ro":"YES", "mode":"CON", "fields":[ { "id":"EVT_FROMPOINT", "lbl":"From Point", "type":"LOV-3", "def":"", "ro":"NO", "rq":"NO", "len":"30", "hid":"NO" }, { "id":"EVT_FROMREFDESC", "lbl":"From Ref. Description", "type":"CHAR", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"NO" }, { "id":"EVT_FROMGEOREF", "lbl":"From Geographical Ref.", "type":"CHAR", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"NO" }, { "id":"EVT_TOPOINT", "lbl":"To Point", "type":"LOV-3", "def":"", "ro":"NO", "rq":"NO", "len":"30", "hid":"NO" }, { "id":"EVT_TOREFDESC", "lbl":"To Ref. Description", "type":"CHAR", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"NO" }, { "id":"EVT_TOGEOREF", "lbl":"To Geographical Ref.", "type":"CHAR", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"NO" }, { "id":"EVT_INSPECTIONDIRECTION", "lbl":"Inspection Direction", "type":"PICKER", "def":"", "ro":"NO", "rq":"NO", "len":"30", "hid":"NO" }, { "id":"EVT_FLOW", "lbl":"Flow", "type":"PICKER", "def":"", "ro":"NO", "rq":"NO", "len":"30", "hid":"NO" }, { "id":"EVT_RELATIONSHIP_TYPE", "lbl":"Relationship Type", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"30", "hid":"YES" }, { "id":"EVT_FROM_REFERENCE_POINT", "lbl":"From Reference Point", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"100", "hid":"YES" }, { "id":"EVT_FROM_OFFSET", "lbl":"From Offset", "type":"NUM", "def":"", "ro":"NO", "rq":"NO", "len":"24", "hid":"YES" }, { "id":"EVT_FROM_OFFSET_PERCENTAGE", "lbl":"From Offset %", "type":"NUM", "def":"", "ro":"NO", "rq":"NO", "len":"5", "hid":"YES" }, { "id":"EVT_FROM_OFFSET_DIRECTION", "lbl":"From Offset Direction", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"YES" }, { "id":"EVT_FROM_LR_REFERENCE", "lbl":"From Reference", "type":"CHAR", "def":"", "ro":"YES", "rq":"NO", "len":"80", "hid":"YES" }, { "id":"EVT_FROM_LR_OFFSET", "lbl":"From Ref. Offset", "type":"CHAR", "def":"", "ro":"YES", "rq":"NO", "len":"24", "hid":"YES" }, { "id":"EVT_FROM_LR_OFFSET_DIRECTION", "lbl":"From Ref. Offset Direction", "type":"CHAR", "def":"", "ro":"YES", "rq":"NO", "len":"80", "hid":"YES" }, { "id":"EVT_TO_REFERENCE_POINT", "lbl":"To Reference Point", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"100", "hid":"YES" }, { "id":"EVT_TO_OFFSET", "lbl":"To Offset", "type":"NUM", "def":"", "ro":"NO", "rq":"NO", "len":"24", "hid":"YES" }, { "id":"EVT_TO_OFFSET_PERCENTAGE", "lbl":"To Offset %", "type":"NUM", "def":"", "ro":"NO", "rq":"NO", "len":"5", "hid":"YES" }, { "id":"EVT_TO_OFFSET_DIRECTION", "lbl":"To Offset Direction", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"YES" }, { "id":"EVT_TO_LR_REFERENCE", "lbl":"To Reference", "type":"CHAR", "def":"", "ro":"YES", "rq":"NO", "len":"80", "hid":"YES" }, { "id":"EVT_TO_LR_OFFSET", "lbl":"To Ref. Offset", "type":"CHAR", "def":"", "ro":"YES", "rq":"NO", "len":"24", "hid":"YES" }, { "id":"EVT_TO_LR_OFFSET_DIRECTION", "lbl":"To Ref. Offset Direction", "type":"CHAR", "def":"", "ro":"YES", "rq":"NO", "len":"80", "hid":"YES" } ] }, { "name":"Scheduling", "fields":[ { "id":"EVT_ORIGIN", "lbl":"Reported By", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"15", "hid":"NO" }, { "id":"EVT_PERSON", "lbl":"Assigned To", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"15", "hid":"NO" }, { "id":"EVT_SCHEDGRP", "lbl":"Assigned By", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"30", "hid":"NO" },{ "id":"EVT_TARGET", "lbl":"Sched. Start Date", "type":"DATE", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"NO" }, { "id":"EVT_DUE", "lbl":"Sched. End Date", "type":"DATE", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"NO" }, { "id":"EVT_REPORTED", "lbl":"Date Reported", "type":"DATI", "def":"", "ro":"NO", "rq":"YES", "len":"80", "hid":"NO" }, { "id":"EVT_ENTEREDBY", "lbl":"Created By", "type":"CHAR", "def":"", "ro":"YES", "rq":"NO", "len":"80", "hid":"NO" }, { "id":"EVT_REQUESTSTART", "lbl":"Req. Start Date", "type":"DATE", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"YES" }, { "id":"EVT_REQUESTEND", "lbl":"Req. End Date", "type":"DATE", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"YES" }, { "id":"EVT_START", "lbl":"Start Date", "type":"DATI", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"YES" }, { "id":"EVT_COMPLETED", "lbl":"Date Completed", "type":"DATI", "def":"", "ro":"NO", "rq":"NO", "len":"15", "hid":"YES" } ] }, { "name":"Work Order Details", "fields":[ { "id":"EVT_LOCATION", "lbl":"Location", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"30", "hid":"NO" }, { "id":"EVT_CLASS", "lbl":"Class", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"8", "hid":"NO" }, { "id":"EVT_COSTCODE", "lbl":"Cost Code", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"30", "hid":"NO" }, { "id":"EVT_PRIORITY", "lbl":"Priority", "type":"PICKER", "def":"", "ro":"NO", "rq":"NO", "len":"8", "hid":"NO" }, { "id":"EVT_REQM", "lbl":"Problem Code", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"8", "hid":"NO" }, { "id":"EVT_PARENT", "lbl":"Parent WO", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"30", "hid":"NO" }, { "id":"EVT_OBJCRITICALITY", "lbl":"Criticality", "type":"CHAR", "def":"", "ro":"YES", "rq":"NO", "len":"8", "hid":"NO" }, { "id":"EVT_METUOM", "lbl":"Meter", "type":"CHAR", "def":"", "ro":"YES", "rq":"NO", "len":"30", "hid":"NO" } ] }, { "name":"Call Center Details", "rq":"YES", "fields":[ { "id":"EVT_SUPPLIER", "lbl":"Supplier", "type":"LOV-2", "def":"", "ro":"NO", "rq":"NO", "len":"15", "hid":"NO" }, { "id":"EVT_SUPPLIER_ORG", "lbl":"Supplier Org.", "type":"CHAR", "def":"", "ro":"YES", "rq":"NO", "len":"30", "hid":"YES" }, { "id":"EVT_SERVICECATEGORY", "lbl":"Service Category", "type":"LOV-2", "def":"", "ro":"NO", "rq":"NO", "len":"15", "hid":"NO" }, { "id":"EVT_SERVICECATEGORY_ORG", "lbl":"Service Category Org.", "type":"CHAR", "def":"", "ro":"YES", "rq":"NO", "len":"30", "hid":"YES" }, { "id":"EVT_SERVICEPROBLEM", "lbl":"Service Code", "type":"LOV-2", "def":"", "ro":"NO", "rq":"NO", "len":"15", "hid":"NO" }, { "id":"EVT_SERVICEPROBLEM_ORG", "lbl":"Service Code Org.", "type":"CHAR", "def":"", "ro":"YES", "rq":"NO", "len":"30", "hid":"YES" }, { "id":"EVT_TFPROMISEDATE", "lbl":"Temporary Fix Promise Date", "type":"DATI", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"NO" }, { "id":"EVT_PFPROMISEDATE", "lbl":"Permanent Fix Promise Date", "type":"DATI", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"NO" }, { "id":"EVT_TFDATECOMPLETED", "lbl":"Temporary Fix Date Completed", "type":"DATI", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"NO" } ] } ] }'
WHERE cfs_code='TCJOBR_IPAD' AND cfs_group = '*' AND cfs_user='*';

UPDATE r5configsettings SET cfs_xmlconfig=
'{ "sections":[ { "name":"Activities", "fields":[ { "id":"ACT_ACT", "lbl":"Activity", "type":"NUM", "def":"", "ro":"NO", "rq":"YES", "len":"80", "hid":"NO" }, { "id":"ACT_NOTE", "lbl":"Note", "type":"CHAR", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"NO" }, { "id":"ACT_TRADE", "lbl":"Trade", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"15", "hid":"NO" }, { "id":"ACT_TASK", "lbl":"Task Plan", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"15", "hid":"NO" }, { "id":"ACT_PERSONS", "lbl":"People Required", "type":"NUM", "def":"", "ro":"NO", "rq":"NO", "len":"8", "hid":"NO" }, { "id":"ACT_EST", "lbl":"Estimated Hours", "type":"NUM", "decimals":"2", "def":"", "ro":"NO", "rq":"NO", "len":"20", "hid":"NO" }, { "id":"ACT_START", "lbl":"Start Date", "type":"DATE", "def":"", "ro":"NO", "rq":"YES", "len":"20", "hid":"NO" }, { "id":"ACT_END", "lbl":"End Date", "type":"DATE", "def":"", "ro":"NO", "rq":"YES", "len":"20", "hid":"NO" }, { "id":"ACT_MATLIST", "lbl":"Material List", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"NO" }, { "id":"ACT_COMPLETED", "lbl":"Completed", "type":"BOOL", "def":"", "ro":"NO", "rq":"NO", "len":"2", "hid":"NO" }, { "id":"ACT_DEFERMAINTENANCE", "lbl":"Deferred Maintenance", "type":"BOOL", "def":"", "ro":"NO", "rq":"NO", "len":"2", "hid":"NO" }, { "id":"ACT_WARRANTY", "lbl":"Warranty", "type":"BOOL", "def":"", "ro":"NO", "rq":"NO", "len":"2", "hid":"YES" }, { "id":"ACT_MANUFACT", "lbl":"Manufacturer", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"YES" }, { "id":"ACT_RPC", "lbl":"Reason For Repair", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"YES" }, { "id":"ACT_WAP", "lbl":"Work Accomplished", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"YES" }, { "id":"ACT_TPF", "lbl":"Technician Part Failure", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"YES" }, { "id":"ACT_SYSLEVEL_DISP", "lbl":"System Level", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"YES" }, { "id":"ACT_ASMLEVEL_DISP", "lbl":"Assembly Level", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"YES" }, { "id":"ACT_COMPLEVEL_DISP", "lbl":"Component Level", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"YES" }, { "id":"ACT_ASSIGNMENTSTATUS", "lbl":"Assignment Status", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"YES" } ] }, { "name":"Linear Reference Details", "hid":"YES", "ro":"YES", "mode":"CON", "fields":[ { "id":"ACT_FROMPOINT", "lbl":"From Point", "type":"LOV-3", "def":"", "ro":"NO", "rq":"NO", "len":"30", "hid":"NO" }, { "id":"ACT_FROMREFDESC", "lbl":"From Ref. Description", "type":"CHAR", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"NO" }, { "id":"ACT_FROMGEOREF", "lbl":"From Geographical Ref.", "type":"CHAR", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"NO" }, { "id":"ACT_TOPOINT", "lbl":"To Point", "type":"LOV-3", "def":"", "ro":"NO", "rq":"NO", "len":"30", "hid":"NO" }, { "id":"ACT_TOREFDESC", "lbl":"To Ref. Description", "type":"CHAR", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"NO" }, { "id":"ACT_TOGEOREF", "lbl":"To Geographical Ref.", "type":"CHAR", "def":"", "ro":"NO", "rq":"NO", "len":"80", "hid":"NO" } ] } ] }'
WHERE cfs_code='TCJACT_IPAD' AND cfs_group='*' AND cfs_user='*';

CREATE TABLE R5MOBILESTATUSAUTH (
MBE_CODE nvarchar(100) NOT NULL,
MBE_TABLE nvarchar(100) NOT NULL,
MBE_STATUS nvarchar(4) NOT NULL,
MBE_OLDSTATUS nvarchar(4) ,
MBE_QUEUEID integer not null,
DMLTYPE nchar(1) NULL DEFAULT ('N'), PRIMARY KEY (MBE_QUEUEID)
);

INSERT INTO R5SYSCOLUMNS VALUES('R5MOBILESTATUSAUTH','MBE_CODE','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');

ALTER TABLE R5ACTIVITIES ADD COLUMN ACT_DISPATCH_EXIST NVARCHAR (1) DEFAULT '-';
ALTER TABLE R5ACTIVITIES ADD COLUMN ACT_RE_DISPATCH NVARCHAR (1) DEFAULT NULL;

CREATE TABLE R5CAMPAIGNOBJECTS(
    CGO_CAMPAIGN    nvarchar(30) NOT NULL,
    CGO_CAMPAIGN_ORG    nvarchar(15) NOT NULL,
    CGO_OBJECT    nvarchar(30) NOT NULL,
    CGO_OBJECT_ORG    nvarchar(15) NOT NULL,
    CGO_STATUS    nvarchar(4),
    CGO_EVENT    nvarchar(30),
    CGO_MESSAGE    nvarchar(500),
    CGO_ERRORCODE    nvarchar(12),
    DMLTYPE nchar(1) NULL DEFAULT ('N'),
    PRIMARY KEY (CGO_CAMPAIGN,CGO_CAMPAIGN_ORG,CGO_OBJECT,CGO_OBJECT_ORG)
);

INSERT INTO R5SYSCOLUMNS VALUES('R5CAMPAIGNOBJECTS','CGO_CAMPAIGN','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');
INSERT INTO R5SYSCOLUMNS VALUES('R5CAMPAIGNOBJECTS','CGO_CAMPAIGN_ORG','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');
INSERT INTO R5SYSCOLUMNS VALUES('R5CAMPAIGNOBJECTS','CGO_OBJECT','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');
INSERT INTO R5SYSCOLUMNS VALUES('R5CAMPAIGNOBJECTS','CGO_OBJECT_ORG','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');

INSERT INTO R5LISTENTITY  (LET_DATAGRID, LET_SEQNO, LET_GROUPID, LET_DELINSUPD, LET_FILTER, LET_TABLENAME, LET_ORGKEY, LET_CONNECTEDMODE, LET_ALWAYSDOWNLOAD, LET_CATEGORY, LET_CLEARCONDITION) VALUES('WCJCGO_IPAD', 140, 0, 3, 'WCJOBS', 'R5CAMPAIGNOBJECTS', NULL, '-', '-', NULL, NULL);

CREATE TABLE R5CAMPAIGNS (
    CAM_CODE         NVARCHAR (60),
    CAM_ORG           NVARCHAR (30),
    CAM_DESC          NVARCHAR (160),
    CAM_STATUS     NVARCHAR (8),
    CAM_RSTATUS NVARCHAR (8),
    CAM_TYPE          NVARCHAR (8),
    DMLTYPE NCHAR (1) DEFAULT ('N'),
    PRIMARY KEY (CAM_CODE,CAM_ORG)
);

INSERT INTO R5SYSCOLUMNS VALUES('R5CAMPAIGNS','CAM_CODE','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');
INSERT INTO R5SYSCOLUMNS VALUES('R5CAMPAIGNS','CAM_ORG','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');

INSERT INTO R5LISTENTITY  (LET_DATAGRID, LET_SEQNO, LET_GROUPID, LET_DELINSUPD, LET_FILTER, LET_TABLENAME, LET_ORGKEY, LET_CONNECTEDMODE, LET_ALWAYSDOWNLOAD, LET_CATEGORY, LET_CLEARCONDITION) VALUES('WCJCAM_IPAD', 141, 0, 3, 'WCJOBS', 'R5CAMPAIGNS', NULL, '-', '-', NULL, NULL);

ALTER TABLE R5EVENTS ADD COLUMN EVT_CAMPAIGN_SURVEY NVARCHAR(1) DEFAULT '-';
ALTER TABLE R5EVENTS ADD COLUMN EVT_CAMPAIGN NVARCHAR(30);
ALTER TABLE R5EVENTS ADD COLUMN EVT_CAMPAIGN_ORG NVARCHAR(15);
ALTER TABLE R5EVENTS ADD COLUMN EVT_CAMPAIGN_LINE NUMERIC(24,6);

CREATE TABLE R5EXTMENUS(
    EMN_CODE    nvarchar(30) NOT NULL,
    EMN_SEQUENCE    int,
    EMN_GROUP    nvarchar(12),
    EMN_FUNCTION    nvarchar(6),
    EMN_PARENT    nvarchar(30),
    EMN_TYPE    nvarchar(1),
    EMN_MEFLAG    nvarchar(1),
    EMN_HIDE    nvarchar(1),
    EMN_MOBILE    nvarchar(1),
    EMN_ICON    nvarchar(35),
    EMN_TEXT    nvarchar(80),
    DMLTYPE nchar(1) NULL DEFAULT ('N'),
    PRIMARY KEY (EMN_CODE)
);

INSERT INTO R5SYSCOLUMNS VALUES('R5EXTMENUS','EMN_CODE','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');

INSERT INTO R5LISTENTITY  (LET_DATAGRID, LET_SEQNO, LET_GROUPID, LET_DELINSUPD, LET_FILTER, LET_TABLENAME, LET_ORGKEY, LET_CONNECTEDMODE, LET_ALWAYSDOWNLOAD, LET_CATEGORY, LET_CLEARCONDITION) VALUES('BCBEMN_IPAD', 51, 0, 6, NULL, 'R5EXTMENUS', NULL, '-', '-', NULL, NULL);

ALTER TABLE R5TABPERMISSIONS ADD COLUMN TRP_INTERFACECODE NVARCHAR(6);

INSERT INTO R5LISTENTITY  (LET_DATAGRID, LET_SEQNO, LET_GROUPID, LET_DELINSUPD, LET_FILTER, LET_TABLENAME, LET_ORGKEY, LET_CONNECTEDMODE, LET_ALWAYSDOWNLOAD, LET_CATEGORY, LET_CLEARCONDITION) VALUES('BCBMMP_IPAD', 52, 0, 3, NULL, 'R5TABPERMISSIONS', NULL, '-', '-', NULL, NULL);

CREATE TABLE R5MAINISOLATIONMAINS(
    MIP_MAINID nvarchar(30) NOT NULL,
    MIP_GISOBJID numeric(38, 0) NULL,
    MIP_BLOCKID numeric(18, 0) NULL,
    DMLTYPE NCHAR ( 1 ) NULL DEFAULT ( 'N' ),
    PRIMARY KEY(MIP_MAINID)
);

INSERT INTO R5SYSCOLUMNS VALUES('R5MAINISOLATIONMAINS','MIP_MAINID','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');

INSERT INTO R5LISTENTITY  (LET_DATAGRID, LET_SEQNO, LET_GROUPID, LET_DELINSUPD, LET_FILTER, LET_TABLENAME, LET_ORGKEY, LET_CONNECTEDMODE, LET_ALWAYSDOWNLOAD, LET_CATEGORY, LET_CLEARCONDITION) VALUES('WCGMIP_IPAD', 252, 0, 6, 'WCGISO', 'R5MAINISOLATIONMAINS', NULL, '-', '-', NULL, NULL);

CREATE TABLE R5MAINISOLATIONVALVES(
    MIV_VALVEID nvarchar(30) NOT NULL,
    MIV_GISOBJID numeric(38, 0) NULL,
    MIV_BLOCKID1 numeric(18, 0) NULL,
    MIV_BLOCKID2 numeric(18, 0) NULL,
    DMLTYPE NCHAR ( 1 ) NULL DEFAULT ( 'N' ),
    PRIMARY KEY(MIV_VALVEID)
);

INSERT INTO R5SYSCOLUMNS VALUES('R5MAINISOLATIONVALVES','MIV_VALVEID','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');

INSERT INTO R5LISTENTITY  (LET_DATAGRID, LET_SEQNO, LET_GROUPID, LET_DELINSUPD, LET_FILTER, LET_TABLENAME, LET_ORGKEY, LET_CONNECTEDMODE, LET_ALWAYSDOWNLOAD, LET_CATEGORY, LET_CLEARCONDITION) VALUES('WCGMIV_IPAD', 253, 0, 6, 'WCGISO', 'R5MAINISOLATIONVALVES', NULL, '-', '-', NULL, NULL);

CREATE TABLE R5MAINISOLATIONBLOCKS(
    MIB_BLOCKID numeric(18, 0) NOT NULL,
    MIB_HYDRANTS numeric(9, 0) NULL,
    MIB_CUSTOMERS numeric(9, 0) NULL,
    MIB_VOLUME numeric(9, 0) NULL,
    DMLTYPE NCHAR ( 1 ) NULL DEFAULT ( 'N' ),
    PRIMARY KEY(MIB_BLOCKID)
);

INSERT INTO R5SYSCOLUMNS VALUES('R5MAINISOLATIONBLOCKS','MIB_BLOCKID','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');

INSERT INTO R5LISTENTITY  (LET_DATAGRID, LET_SEQNO, LET_GROUPID, LET_DELINSUPD, LET_FILTER, LET_TABLENAME, LET_ORGKEY, LET_CONNECTEDMODE, LET_ALWAYSDOWNLOAD, LET_CATEGORY, LET_CLEARCONDITION) VALUES('WCGMIB_IPAD', 254, 0, 6, 'WCGISO', 'R5MAINISOLATIONBLOCKS', NULL, '-', '-', NULL, NULL);

CREATE TABLE R5MAINISOLATIONDEPBLOCKS(
    MID_BLOCKID numeric(18, 0) NOT NULL,
    MID_DEPBLOCKID numeric(18, 0) NULL,
    DMLTYPE NCHAR ( 1 ) NULL DEFAULT ( 'N' ),
    PRIMARY KEY(MID_BLOCKID,MID_DEPBLOCKID)
);

INSERT INTO R5SYSCOLUMNS VALUES('R5MAINISOLATIONDEPBLOCKS','MID_BLOCKID','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');
INSERT INTO R5SYSCOLUMNS VALUES('R5MAINISOLATIONDEPBLOCKS','MID_DEPBLOCKID','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');

INSERT INTO R5LISTENTITY  (LET_DATAGRID, LET_SEQNO, LET_GROUPID, LET_DELINSUPD, LET_FILTER, LET_TABLENAME, LET_ORGKEY, LET_CONNECTEDMODE, LET_ALWAYSDOWNLOAD, LET_CATEGORY, LET_CLEARCONDITION) VALUES('WCGMID_IPAD', 255, 0, 6, 'WCGISO', 'R5MAINISOLATIONDEPBLOCKS', NULL, '-', '-', NULL, NULL);

INSERT INTO r5configsettings (cfs_code, cfs_group, cfs_user, cfs_comptype, cfs_config, cfs_updated, cfs_desk, cfs_xmlconfig)
VALUES ('TCJBOE_IPAD', '*', '*', 'U', 1, date('now'), 1,
'{"sections":[{ "name":"Book Labor", "fields":[ {"id":"BOO_WO_ACT", "lbl":"WO-Activity", "type":"LOV-2", "def":"", "ro":"NO", "rq":"NO", "len":"20", "hid":"NO" }, {"id":"BOO_EQUIP","lbl":"Equipment","type":"LOV-1","def":"","ro":"NO","rq":"NO","len":"20","hid":"YES"}, {"id":"BOO_RELATED_WO","lbl":"Related Work Order","type":"CHAR","def":"","ro":"YES","rq":"NO","len":"20","hid":"YES"},{"id":"BOO_OCTYPE", "lbl":"Type of Hours", "type":"LOV-1", "def":"", "ro":"NO", "rq":"YES", "len":"20", "hid":"NO" }, {"id":"BOO_PERSON", "lbl":"Employee", "type":"LOV-5", "def":"", "ro":"NO", "rq":"YES", "len":"20", "hid":"NO" }, {"id":"BOO_MRC", "lbl":"Department", "type":"LOV-1", "def":"", "ro":"NO", "rq":"YES", "len":"20", "hid":"NO" }, {"id":"BOO_TRADE", "lbl":"Trade", "type":"LOV-1", "def":"", "ro":"NO", "rq":"YES", "len":"200", "hid":"NO" }, {"id":"BOO_DATE", "lbl":"Start Date", "type":"DATE", "def":"", "ro":"NO", "rq":"YES", "len":"20", "hid":"NO" }, {"id":"BOO_STARTTIME", "lbl":"Start Time", "type":"COMBOBOX", "def":"", "ro":"NO", "rq":"NO", "len":"20", "hid":"NO" }, {"id":"BOO_ENDTIME", "lbl":"End Time", "type":"COMBOBOX", "def":"", "ro":"NO", "rq":"NO", "len":"20", "hid":"NO" }, {"id":"BOO_HOURS", "lbl":"Hours", "type":"COMBOBOX", "def":"", "ro":"NO", "rq":"YES", "len":"20", "hid":"NO" }] }]}' );

CREATE TABLE R5BOOKEDHOURS_BAK
AS SELECT * FROM R5BOOKEDHOURS;

DROP TABLE R5BOOKEDHOURS;

CREATE TABLE R5BOOKEDHOURS (
    BOO_EVENT NVARCHAR (30),
    BOO_ACT NUMERIC (8),
    BOO_ACD NVARCHAR (30) NOT NULL,
    BOO_ROUTEPARENT NVARCHAR (30),
    BOO_DATE DATETIME,
    BOO_OCTYPE NVARCHAR (4),
    BOO_PERSON NVARCHAR (15),
    BOO_ON NUMERIC (5),
    BOO_OFF NUMERIC (5),
    BOO_HOURS NUMERIC (24, 6),
    BOO_MRC NVARCHAR (15),
    BOO_TRADE NVARCHAR (15),
    BOO_CORRECTION NCHAR (1),
    BOO_COST NUMERIC (24, 6),
    BOO_RATE NUMERIC (24, 6),
    BOO_USERTAG INTEGER DEFAULT (0),
    BOO_SPLITHOURS NVARCHAR (1),
    BOO_ORIGHOURS NUMERIC (24, 6),
    DMLTYPE NCHAR (1) DEFAULT ('N'),
    BOO_MISC NVARCHAR (1),
    BOO_CODE NVARCHAR (30),
    BOO_UDFCHAR01 NVARCHAR (80),
    BOO_UDFCHAR02 NVARCHAR (80),
    BOO_UDFCHAR03 NVARCHAR (80),
    BOO_UDFCHAR04 NVARCHAR (80),
    BOO_UDFCHAR05 NVARCHAR (80),
    BOO_UDFCHAR06 NVARCHAR (80),
    BOO_UDFCHAR07 NVARCHAR (80),
    BOO_UDFCHAR08 NVARCHAR (80),
    BOO_UDFCHAR09 NVARCHAR (80),
    BOO_UDFCHAR10 NVARCHAR (80),
    BOO_UDFCHAR11 NVARCHAR (80),
    BOO_UDFCHAR12 NVARCHAR (80),
    BOO_UDFCHAR13 NVARCHAR (80),
    BOO_UDFCHAR14 NVARCHAR (80),
    BOO_UDFCHAR15 NVARCHAR (80),
    BOO_UDFCHAR16 NVARCHAR (80),
    BOO_UDFCHAR17 NVARCHAR (80),
    BOO_UDFCHAR18 NVARHCAR (80),
    BOO_UDFCHAR19 NVARCHAR (80),
    BOO_UDFCHAR20 NVARCHAR (80),
    BOO_UDFCHAR21 NVARCHAR (80),
    BOO_UDFCHAR22 NVARCHAR (80),
    BOO_UDFCHAR23 NVARCHAR (80),
    BOO_UDFCHAR24 NVARCHAR (80),
    BOO_UDFCHAR25 NVARCHAR (80),
    BOO_UDFCHAR26 NVARCHAR (80),
    BOO_UDFCHAR27 NVARCHAR (80),
    BOO_UDFCHAR28 NVARCHAR (80),
    BOO_UDFCHAR29 NVARCHAR (80),
    BOO_UDFCHAR30 NVARCHAR (80),
    BOO_UDFNUM01 NUMERIC (24, 6),
    BOO_UDFNUM02 NUMERIC (24, 6),
    BOO_UDFNUM03 NUMERIC (24, 6),
    BOO_UDFNUM04 NUMERIC (24, 6),
    BOO_UDFNUM05 NUMERIC (24, 6),
    BOO_UDFDATE01 DATETIME,
    BOO_UDFDATE02 DATETIME,
    BOO_UDFDATE03 DATETIME,
    BOO_UDFDATE04 DATETIME,
    BOO_UDFDATE05 DATETIME,
    BOO_UDFCHKBOX01 NVARCHAR (1),
    BOO_UDFCHKBOX02 NVARCHAR (1),
    BOO_UDFCHKBOX03 NVARCHAR (1),
    BOO_UDFCHKBOX04 NVARCHAR (1),
    BOO_UDFCHKBOX05 NVARCHAR (1),
    BOO_CURRENTCREW NVARCHAR (15),
    BOO_CURRENTCREW_ORG NVARCHAR (15),
    BOO_CREW NVARCHAR (15),
    BOO_CREW_ORG NVARCHAR (15),
    PRIMARY KEY (BOO_ACD)
);
 
INSERT INTO R5BOOKEDHOURS
(   BOO_EVENT,
    BOO_ACT,
    BOO_ACD,
    BOO_DATE,
    BOO_OCTYPE,
    BOO_PERSON,
    BOO_ON,
    BOO_OFF,
    BOO_HOURS,
    BOO_MRC,
    BOO_TRADE,
    BOO_CORRECTION,
    BOO_COST,
    BOO_RATE,
    BOO_USERTAG,
    BOO_SPLITHOURS,
    BOO_ORIGHOURS,
    DMLTYPE,
    BOO_MISC,
    BOO_CODE,
    BOO_UDFCHAR01,
    BOO_UDFCHAR02,
    BOO_UDFCHAR03,
    BOO_UDFCHAR04,
    BOO_UDFCHAR05,
    BOO_UDFCHAR06,
    BOO_UDFCHAR07,
    BOO_UDFCHAR08,
    BOO_UDFCHAR09,
    BOO_UDFCHAR10,
    BOO_UDFCHAR11,
    BOO_UDFCHAR12,
    BOO_UDFCHAR13,
    BOO_UDFCHAR14,
    BOO_UDFCHAR15,
    BOO_UDFCHAR16,
    BOO_UDFCHAR17,
    BOO_UDFCHAR18,
    BOO_UDFCHAR19,
    BOO_UDFCHAR20,
    BOO_UDFCHAR21,
    BOO_UDFCHAR22,
    BOO_UDFCHAR23,
    BOO_UDFCHAR24,
    BOO_UDFCHAR25,
    BOO_UDFCHAR26,
    BOO_UDFCHAR27,
    BOO_UDFCHAR28,
    BOO_UDFCHAR29,
    BOO_UDFCHAR30,
    BOO_UDFNUM01,
    BOO_UDFNUM02,
    BOO_UDFNUM03,
    BOO_UDFNUM04,
    BOO_UDFNUM05,
    BOO_UDFDATE01,
    BOO_UDFDATE02,
    BOO_UDFDATE03,
    BOO_UDFDATE04,
    BOO_UDFDATE05,
    BOO_UDFCHKBOX01,
    BOO_UDFCHKBOX02,
    BOO_UDFCHKBOX03,
    BOO_UDFCHKBOX04,
    BOO_UDFCHKBOX05
)
SELECT
    BOO_EVENT,
    BOO_ACT,
    BOO_ACD,
    BOO_DATE,
    BOO_OCTYPE,
    BOO_PERSON,
    BOO_ON,
    BOO_OFF,
    BOO_HOURS,
    BOO_MRC,
    BOO_TRADE,
    BOO_CORRECTION,
    BOO_COST,
    BOO_RATE,
    BOO_USERTAG,
    BOO_SPLITHOURS,
    BOO_ORIGHOURS,
    DMLTYPE,
    BOO_MISC,
    BOO_CODE,
    BOO_UDFCHAR01,
    BOO_UDFCHAR02,
    BOO_UDFCHAR03,
    BOO_UDFCHAR04,
    BOO_UDFCHAR05,
    BOO_UDFCHAR06,
    BOO_UDFCHAR07,
    BOO_UDFCHAR08,
    BOO_UDFCHAR09,
    BOO_UDFCHAR10,
    BOO_UDFCHAR11,
    BOO_UDFCHAR12,
    BOO_UDFCHAR13,
    BOO_UDFCHAR14,
    BOO_UDFCHAR15,
    BOO_UDFCHAR16,
    BOO_UDFCHAR17,
    BOO_UDFCHAR18,
    BOO_UDFCHAR19,
    BOO_UDFCHAR20,
    BOO_UDFCHAR21,
    BOO_UDFCHAR22,
    BOO_UDFCHAR23,
    BOO_UDFCHAR24,
    BOO_UDFCHAR25,
    BOO_UDFCHAR26,
    BOO_UDFCHAR27,
    BOO_UDFCHAR28,
    BOO_UDFCHAR29,
    BOO_UDFCHAR30,
    BOO_UDFNUM01,
    BOO_UDFNUM02,
    BOO_UDFNUM03,
    BOO_UDFNUM04,
    BOO_UDFNUM05,
    BOO_UDFDATE01,
    BOO_UDFDATE02,
    BOO_UDFDATE03,
    BOO_UDFDATE04,
    BOO_UDFDATE05,
    BOO_UDFCHKBOX01,
    BOO_UDFCHKBOX02,
    BOO_UDFCHKBOX03,
    BOO_UDFCHKBOX04,
    BOO_UDFCHKBOX05
FROM R5BOOKEDHOURS_BAK;

DROP TABLE R5BOOKEDHOURS_BAK;

DELETE FROM r5syscolumns WHERE table_name = 'R5BOOKEDHOURS' and column_name in ('BOO_ACT', 'BOO_EVENT');

ALTER TABLE R5WORKSAFETY ADD COLUMN KSF_RESPONSIBILITY NVARCHAR(8) NULL;

CREATE TABLE R5EVENTACCOMPLISHMENTS(
   EAC_PK                nvarchar(30)   NULL,
   EAC_EVENT             nvarchar(30)   NULL,
   EAC_ACT               numeric(8)      NULL,
   EAC_TYPE              nvarchar(8)    NULL,
   EAC_DATEWORKED        datetime        NULL,
   EAC_SYSLEVEL          nvarchar(30)   NULL,
   EAC_ASMLEVEL          nvarchar(30)   NULL,
   EAC_COMPLEVEL         nvarchar(30)   NULL,
   EAC_VMRS_DESC         nvarchar(80)   NULL,
   EAC_SYMPTOM           nvarchar(8)    NULL,
   EAC_PROBLEM           nvarchar(8)    NULL,
   EAC_FAILURE           nvarchar(8)    NULL,
   EAC_CAUSE             nvarchar(8)    NULL,
   EAC_ACTION            nvarchar(8)    NULL,
   EAC_ACTION_DESC       nvarchar(80)   NULL,
   EAC_QUANTITY          numeric(24,6)   NULL,
   EAC_UOM               nvarchar(30)   NULL,
   EAC_NOTE              nvarchar(256)  NULL,
   EAC_CREW              nvarchar(15)   NULL,
   EAC_CREW_ORG          nvarchar(15)   NULL,
   EAC_PERSON            nvarchar(15)   NULL,
   EAC_NONCONFORMITY     nvarchar(30)   NULL,
   EAC_OBSERVATION       nvarchar(30)   NULL,
   EAC_OBSERVATIONNUM    nvarchar(30)   NULL,
   EAC_CREATEDBY         nvarchar(255)  NULL,
   EAC_CREATED           datetime        NULL,
   EAC_UPDATEDBY         nvarchar(255)  NULL,
   EAC_UPDATED           datetime        NULL,
   EAC_UDFCHAR01         nvarchar(80)   NULL,
   EAC_UDFCHAR02         nvarchar(80)   NULL,
   EAC_UDFCHAR03         nvarchar(80)   NULL,
   EAC_UDFCHAR04         nvarchar(80)   NULL,
   EAC_UDFCHAR05         nvarchar(80)   NULL,
   EAC_UDFCHAR06         nvarchar(80)   NULL,
   EAC_UDFCHAR07         nvarchar(80)   NULL,
   EAC_UDFCHAR08         nvarchar(80)   NULL,
   EAC_UDFCHAR09         nvarchar(80)   NULL,
   EAC_UDFCHAR10         nvarchar(80)   NULL,
   EAC_UDFCHAR11         nvarchar(80)   NULL,
   EAC_UDFCHAR12         nvarchar(80)   NULL,
   EAC_UDFCHAR13         nvarchar(80)   NULL,
   EAC_UDFCHAR14         nvarchar(80)   NULL,
   EAC_UDFCHAR15         nvarchar(80)   NULL,
   EAC_UDFCHAR16         nvarchar(80)   NULL,
   EAC_UDFCHAR17         nvarchar(80)   NULL,
   EAC_UDFCHAR18         nvarchar(80)   NULL,
   EAC_UDFCHAR19         nvarchar(80)   NULL,
   EAC_UDFCHAR20         nvarchar(80)   NULL,
   EAC_UDFCHAR21         nvarchar(80)   NULL,
   EAC_UDFCHAR22         nvarchar(80)   NULL,
   EAC_UDFCHAR23         nvarchar(80)   NULL,
   EAC_UDFCHAR24         nvarchar(80)   NULL,
   EAC_UDFCHAR25         nvarchar(80)   NULL,
   EAC_UDFCHAR26         nvarchar(80)   NULL,
   EAC_UDFCHAR27         nvarchar(80)   NULL,
   EAC_UDFCHAR28         nvarchar(80)   NULL,
   EAC_UDFCHAR29         nvarchar(80)   NULL,
   EAC_UDFCHAR30         nvarchar(80)   NULL,
   EAC_UDFNUM01          numeric(24,6)   NULL,
   EAC_UDFNUM02          numeric(24,6)   NULL,
   EAC_UDFNUM03          numeric(24,6)   NULL,
   EAC_UDFNUM04          numeric(24,6)   NULL,
   EAC_UDFNUM05          numeric(24,6)   NULL,
   EAC_UDFDATE01         datetime        NULL,
   EAC_UDFDATE02         datetime        NULL,
   EAC_UDFDATE03         datetime        NULL,
   EAC_UDFDATE04         datetime        NULL,
   EAC_UDFDATE05         datetime        NULL,
   EAC_UDFCHKBOX01       nvarchar(1)    NULL  DEFAULT '-',
   EAC_UDFCHKBOX02       nvarchar(1)    NULL  DEFAULT '-',
   EAC_UDFCHKBOX03       nvarchar(1)    NULL  DEFAULT '-',
   EAC_UDFCHKBOX04       nvarchar(1)    NULL  DEFAULT '-',
   EAC_UDFCHKBOX05       nvarchar(1)    NULL  DEFAULT '-',
   DMLTYPE nchar(1) NULL DEFAULT ('N'),
   PRIMARY KEY (EAC_PK)
);

INSERT INTO R5SYSCOLUMNS VALUES('R5EVENTACCOMPLISHMENTS','EAC_PK','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');

INSERT INTO R5LISTENTITY  (LET_DATAGRID, LET_SEQNO, LET_GROUPID, LET_DELINSUPD, LET_FILTER, LET_TABLENAME, LET_ORGKEY, LET_CONNECTEDMODE, LET_ALWAYSDOWNLOAD, LET_CATEGORY, LET_CLEARCONDITION) VALUES('WCJEAC_IPAD', 142, 0, 3, 'WCJOBS', 'R5EVENTACCOMPLISHMENTS', NULL, '-', '-', NULL, NULL);

UPDATE r5configsettings
SET cfs_xmlconfig = '{ "sections": [{ "name": "Notebook", "fields": [{ "id": "MNB_CODE", "lbl": "Notebook", "type": "CHAR", "def": "", "ro": "YES", "rq": "NO", "len": "30", "hid": "YES" }, { "id": "MNB_CREATEDBY", "lbl": "Created By", "type": "CHAR", "def": "", "ro": "YES", "rq": "NO", "len": "80", "hid": "YES" }, { "id": "MNB_CREATEDBY_NAME", "lbl": "Created By Name", "type": "CHAR", "def": "", "ro": "YES", "rq": "NO", "len": "30", "hid": "YES" }, { "id": "MNB_MOBILECREATED", "lbl": "Date/Time Created", "type": "DATI", "def": "", "ro": "YES", "rq": "NO", "len": "80", "hid": "YES" }, { "id": "MNB_ORG", "lbl": "Organization", "type": "LOV-1", "def": "", "ro": "YES", "rq": "YES", "len": "30", "hid": "NO" }, { "id": "MNB_PRIVATE", "lbl": "Private", "type": "BOOL", "def": "", "ro": "NO", "rq": "NO", "len": "2", "hid": "NO" }, { "id": "MNB_NOTE", "lbl": "Note", "type": "MEMO-1", "def": "", "ro": "NO", "rq": "YES", "len": "256", "hid": "NO" }, { "id": "MNB_EMAILS", "lbl": "Emails", "type": "LOV-1", "def": "", "ro": "NO", "rq": "NO", "len": "30", "hid": "NO" }, { "id": "MNB_NONEMPLOYEEEMAILS", "lbl": "Non-Employee Emails", "type": "LOV-4", "def": "", "ro": "NO", "rq": "NO", "len": "200", "hid": "NO" }, { "id": "MNB_REFERENCES", "lbl": "References", "type": "LOV-1", "def": "", "ro": "NO", "rq": "NO", "len": "30", "hid": "NO" }] }, { "name": "Defect Details", "fields": [{ "id": "MNB_DEFECT", "lbl": "Defect", "type": "BOOL", "def": "", "ro": "NO", "rq": "NO", "len": "2", "hid": "NO" }, { "id": "MNB_OBJECT", "lbl": "Equipment", "type": "LOV-2", "def": "", "ro": "NO", "rq": "NO", "len": "30", "hid": "NO" }, { "id": "MNB_OBJECT_ORG", "lbl": "Equipment Org.", "type": "CHAR", "def": "", "ro": "YES", "rq": "NO", "len": "80", "hid": "YES" }, { "id": "MNB_NCFSEVERITY", "lbl": "Nonconformity Severity", "type": "LOV-1", "def": "", "ro": "NO", "rq": "NO", "len": "30", "hid": "NO" }, { "id": "MNB_NCTTYPE", "lbl": "Nonconformity Type", "type": "LOV-2", "def": "", "ro": "NO", "rq": "NO", "len": "30", "hid": "NO" }, { "id": "MNB_NCTTYPE_ORG", "lbl": "Nonconformity Type Org.", "type": "CHAR", "def": "", "ro": "YES", "rq": "NO", "len": "80", "hid": "YES" }, { "id": "MNB_NCFCLASS", "lbl": "Nonconformity Class", "type": "LOV-1", "def": "", "ro": "NO", "rq": "NO", "len": "30", "hid": "NO" }, { "id": "MNB_NCFCLASS_ORG", "lbl": "Nonconformity Class Org.", "type": "CHAR", "def": "", "ro": "YES", "rq": "NO", "len": "80", "hid": "YES" }, { "id": "MNB_CLASS", "lbl": "Notebook Class", "type": "LOV-1", "def": "", "ro": "NO", "rq": "NO", "len": "30", "hid": "NO" }, { "id": "MNB_CLASS_ORG", "lbl": "Notebook Class Org.", "type": "CHAR", "def": "", "ro": "YES", "rq": "NO", "len": "80", "hid": "YES" }] }, { "name": "Physical Location", "fields": [{ "id": "MNB_LEVEL1", "lbl": "Level 1", "type": "LOV-2", "def": "", "ro": "NO", "rq": "NO", "len": "30", "hid": "NO" }, { "id": "MNB_LEVEL2", "lbl": "Level 2", "type": "LOV-2", "def": "", "ro": "NO", "rq": "NO", "len": "30", "hid": "NO" }, { "id": "MNB_LEVEL3A", "lbl": "Level 3A", "type": "LOV-2", "def": "", "ro": "NO", "rq": "NO", "len": "30", "hid": "YES" }, { "id": "MNB_LEVEL3", "lbl": "Level 3", "type": "LOV-2", "def": "", "ro": "NO", "rq": "NO", "len": "30", "hid": "NO" }, { "id": "MNB_LEVEL4", "lbl": "Level 4", "type": "LOV-2", "def": "", "ro": "NO", "rq": "NO", "len": "30", "hid": "NO" }, { "id": "MNB_STATIONING_MAJOR", "lbl": "Stationing (major)", "type": "INT", "def": "", "ro": "NO", "rq": "NO", "len": "30", "hid": "NO" }, { "id": "MNB_STATIONING_MINOR", "lbl": "Stationing (minor)", "type": "INT", "def": "", "ro": "NO", "rq": "NO", "len": "30", "hid": "NO" }, { "id": "MNB_DETAILED_LOCATION", "lbl": "Detailed Location", "type": "CHAR", "def": "", "ro": "NO", "rq": "NO", "len": "80", "hid": "NO" }] }, { "name": "Attachments", "sectype": "ATTACHMENTS", "fields": [] }] }'
WHERE cfs_code='TCMNBK_IPAD' AND cfs_group='*' AND cfs_user='*';

ALTER TABLE R5CREWS ADD COLUMN CRW_EXPIRATIONDATE DATETIME;

UPDATE r5configsettings
SET cfs_xmlconfig = '{"sections":[{ "name":"Book Labor", "fields":[ {"id":"BOO_ACT", "lbl":"Activity", "type":"LOV-1", "def":"", "ro":"YES", "rq":"NO", "len":"20", "hid":"NO" }, {"id":"BOO_EQUIP","lbl":"Equipment","type":"LOV-1","def":"","ro":"NO","rq":"NO","len":"20","hid":"YES"}, {"id":"BOO_RELATED_WO","lbl":"Related Work Order","type":"CHAR","def":"","ro":"YES","rq":"NO","len":"20","hid":"YES"},{"id":"BOO_OCTYPE", "lbl":"Type of Hours", "type":"LOV-1", "def":"", "ro":"NO", "rq":"YES", "len":"20", "hid":"NO" }, {"id":"BOO_PERSON", "lbl":"Employee", "type":"LOV-1", "def":"", "ro":"NO", "rq":"YES", "len":"20", "hid":"NO" }, {"id":"BOO_CURRENTCREW", "lbl":"Current Crew", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"20", "hid":"NO" }, {"id":"BOO_CURRENTCREW_ORG","lbl":"Current Crew Org","type":"CHAR","def":"","ro":"YES","rq":"NO","len":"20","hid":"YES"},{"id":"BOO_MRC", "lbl":"Department", "type":"LOV-1", "def":"", "ro":"NO", "rq":"YES", "len":"20", "hid":"NO" }, {"id":"BOO_TRADE", "lbl":"Trade", "type":"LOV-1", "def":"", "ro":"NO", "rq":"YES", "len":"200", "hid":"NO" }, {"id":"BOO_DATE", "lbl":"Start Date", "type":"DATE", "def":"", "ro":"NO", "rq":"YES", "len":"20", "hid":"NO" }, {"id":"BOO_STARTTIME", "lbl":"Start Time", "type":"COMBOBOX", "def":"", "ro":"NO", "rq":"NO", "len":"20", "hid":"NO" }, {"id":"BOO_ENDTIME", "lbl":"End Time", "type":"COMBOBOX", "def":"", "ro":"NO", "rq":"NO", "len":"20", "hid":"NO" }, {"id":"BOO_HOURS", "lbl":"Hours", "type":"COMBOBOX", "def":"", "ro":"NO", "rq":"YES", "len":"20", "hid":"NO" }, {"id":"BOO_CORRECTION", "lbl":"Correction", "type":"BOOL", "def":"", "ro":"NO", "rq":"NO", "len":"2", "hid":"NO" }] }]}'
WHERE cfs_code='TCJBOO_IPAD' AND cfs_group ='*' AND cfs_user='*';

INSERT INTO r5configsettings (cfs_code, cfs_group, cfs_user, cfs_comptype, cfs_config, cfs_updated, cfs_desk, cfs_xmlconfig)
VALUES ('TCJBOC_IPAD','*','*','U',1,date('now'),1,
'{"sections":[{ "name":"Book Labor", "fields":[ {"id":"BOO_ACT", "lbl":"Activity", "type":"LOV-1", "def":"", "ro":"YES", "rq":"NO", "len":"20", "hid":"NO" }, {"id":"BOO_EQUIP","lbl":"Equipment","type":"LOV-1","def":"","ro":"NO","rq":"NO","len":"20","hid":"YES"}, {"id":"BOO_RELATED_WO","lbl":"Related Work Order","type":"CHAR","def":"","ro":"YES","rq":"NO","len":"20","hid":"YES"},{"id":"BOO_OCTYPE", "lbl":"Type of Hours", "type":"LOV-1", "def":"", "ro":"NO", "rq":"YES", "len":"20", "hid":"NO" }, {"id":"BOO_CREW", "lbl":"Crew", "type":"LOV-1", "def":"", "ro":"NO", "rq":"YES", "len":"20", "hid":"NO" },{"id":"BOO_PERSON", "lbl":"Employees", "type":"LOV-5", "def":"", "ro":"NO", "rq":"YES", "len":"20", "hid":"NO" }, {"id":"BOO_MRC", "lbl":"Department", "type":"LOV-1", "def":"", "ro":"NO", "rq":"YES", "len":"20", "hid":"NO" }, {"id":"BOO_TRADE", "lbl":"Trade", "type":"LOV-1", "def":"", "ro":"NO", "rq":"YES", "len":"200", "hid":"NO" }, {"id":"BOO_DATE", "lbl":"Start Date", "type":"DATE", "def":"", "ro":"NO", "rq":"YES", "len":"20", "hid":"NO" }, {"id":"BOO_STARTTIME", "lbl":"Start Time", "type":"COMBOBOX", "def":"", "ro":"NO", "rq":"NO", "len":"20", "hid":"NO" }, {"id":"BOO_ENDTIME", "lbl":"End Time", "type":"COMBOBOX", "def":"", "ro":"NO", "rq":"NO", "len":"20", "hid":"NO" }, {"id":"BOO_HOURS", "lbl":"Hours", "type":"COMBOBOX", "def":"", "ro":"NO", "rq":"YES", "len":"20", "hid":"NO" },{"id":"BOO_CORRECTION", "lbl":"Correction", "type":"BOOL", "def":"", "ro":"NO", "rq":"NO", "len":"2", "hid":"NO" }] }]}'
);
 
CREATE TABLE R5FLEETBOOKLABOR(
    FLB_EVENT    nvarchar(30),
    FLB_ACT    int,
    FLB_PERSON    nvarchar(15),
    FLB_OCTYPE    nvarchar(4),
    FLB_OCRTYPE    nvarchar(4),
    FLB_PASSWORDREQUIRED    nvarchar(1),
    FLB_STARTDATE    datetime,
    FLB_ENDDATE    datetime,
    FLB_AUTOBOOK    nvarchar(1),
    FLB_SHIFTSCHEDULESESSION    numeric(24,6),
    FLB_MECHANICWORKBENCH    nvarchar(1) default '-',
    FLB_TRADE    nvarchar(15),
    FLB_ACSCODE    nvarchar(30),
    DMLTYPE nchar(1) NULL DEFAULT ('N'),
    PRIMARY KEY (FLB_EVENT,FLB_ACT,FLB_PERSON,FLB_SHIFTSCHEDULESESSION,FLB_MECHANICWORKBENCH)
);

INSERT INTO R5SYSCOLUMNS VALUES('R5FLEETBOOKLABOR','FLB_EVENT','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');
INSERT INTO R5SYSCOLUMNS VALUES('R5FLEETBOOKLABOR','FLB_ACT','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');
INSERT INTO R5SYSCOLUMNS VALUES('R5FLEETBOOKLABOR','FLB_PERSON','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');
INSERT INTO R5SYSCOLUMNS VALUES('R5FLEETBOOKLABOR','FLB_SHIFTSCHEDULESESSION','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');
INSERT INTO R5SYSCOLUMNS VALUES('R5FLEETBOOKLABOR','FLB_MECHANICWORKBENCH','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');

INSERT INTO R5LISTENTITY  (LET_DATAGRID, LET_SEQNO, LET_GROUPID, LET_DELINSUPD, LET_FILTER, LET_TABLENAME, LET_ORGKEY, LET_CONNECTEDMODE, LET_ALWAYSDOWNLOAD, LET_CATEGORY, LET_CLEARCONDITION) VALUES('WCFLBS_IPAD', 95, 0, 6, 'WCJOBS', 'R5FLEETBOOKLABOR', NULL, '-', '-', 'EVNT', NULL);

CREATE TABLE R5SYMPTOMS(
    SYM_CODE    nvarchar(8)  NOT NULL,
    SYM_DESC    nvarchar(80)  NULL,
    SYM_GEN    nvarchar(1)  NULL,
    SYM_PARTFAILURE    nvarchar(1)  NULL,
    SYM_NOTUSED    nvarchar(1)  NULL,
    SYM_ENABLEWORKORDERS    nvarchar(1)  NULL,
    SYM_GROUP    nvarchar(80)  NULL,
    DMLTYPE nchar(1) NULL DEFAULT ('N'),
    PRIMARY KEY (SYM_CODE)
);

INSERT INTO R5SYSCOLUMNS VALUES('R5SYMPTOMS','SYM_CODE','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');

INSERT INTO R5LISTENTITY  (LET_DATAGRID, LET_SEQNO, LET_GROUPID, LET_DELINSUPD, LET_FILTER, LET_TABLENAME, LET_ORGKEY, LET_CONNECTEDMODE, LET_ALWAYSDOWNLOAD, LET_CATEGORY, LET_CLEARCONDITION) VALUES('OCSYCO_IPAD', 85, 0, 3, NULL, 'R5SYMPTOMS', NULL, '-', '-', NULL, NULL);

CREATE TABLE R5SYMPTOMCLASSES(
    SYC_CLASS    nvarchar(8)  NOT NULL,
    SYC_CLASS_ORG    nvarchar(15)  NOT NULL,
    SYC_SYMPTOM    nvarchar(8)  NOT NULL,
    DMLTYPE nchar(1) NULL DEFAULT ('N'),
    PRIMARY KEY (SYC_CLASS, SYC_CLASS_ORG, SYC_SYMPTOM)
);

INSERT INTO R5SYSCOLUMNS VALUES('R5SYMPTOMCLASSES','SYC_CLASS','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');
INSERT INTO R5SYSCOLUMNS VALUES('R5SYMPTOMCLASSES','SYC_CLASS_ORG','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');
INSERT INTO R5SYSCOLUMNS VALUES('R5SYMPTOMCLASSES','SYC_SYMPTOM','+',NULL,NULL,NULL,NULL,NULL,NULL,'N');

INSERT INTO R5LISTENTITY  (LET_DATAGRID, LET_SEQNO, LET_GROUPID, LET_DELINSUPD, LET_FILTER, LET_TABLENAME, LET_ORGKEY, LET_CONNECTEDMODE, LET_ALWAYSDOWNLOAD, LET_CATEGORY, LET_CLEARCONDITION) VALUES('OCSYCC_IPAD', 86, 0, 3, NULL, 'R5SYMPTOMCLASSES', 'SYC_CLASS_ORG', '-', '-', NULL, NULL);

INSERT INTO r5configsettings (cfs_code, cfs_group, cfs_user, cfs_comptype, cfs_config, cfs_updated, cfs_desk, cfs_xmlconfig) VALUES
('TCJEAC_IPAD', '*', '*', 'U', 1, date('now'), 1,
'{"sections":[{"name":"Accomplishments","fields":[{"id":"EAC_PK","lbl":"Accomplishment PK","type":"CHAR","def":"","ro":"NO","rq":"NO","len":"30","hid":"YES"},{"id":"EAC_ACT","lbl":"Activity","type":"LOV-1","def":"","ro":"NO","rq":"YES","len":"20","hid":"NO"},{"id":"EAC_DATEWORKED","lbl":"Date Worked","type":"DATE","def":"","ro":"NO","rq":"YES","len":"30","hid":"NO"},{"id":"EAC_TYPE","lbl":" Type","type":"LOV-1","def":"","ro":"NO","rq":"YES","len":"20","hid":"NO"},{"id":"EAC_SYSLEVEL","lbl":"System Level","type":"LOV-1","def":"","ro":"NO","rq":"NO","len":"30","hid":"NO"},{"id":"EAC_ASMLEVEL","lbl":"Assembly Level","type":"LOV-1","def":"","ro":"NO","rq":"NO","len":"30","hid":"NO"},{"id":"EAC_COMPLEVEL","lbl":"Component Level","type":"LOV-1","def":"","ro":"NO","rq":"NO","len":"30","hid":"NO"},{"id":"EAC_VMRS_DESC","lbl":"EMRS Description","type":"CHAR","def":"","ro":"YES","rq":"NO","len":"80","hid":"NO"},{"id":"EAC_SYMPTOM","lbl":"Symptom","type":"LOV-1","def":"","ro":"NO","rq":"NO","len":"20","hid":"YES"},{"id":"EAC_PROBLEM","lbl":"Problem Code","type":"LOV-1","def":"","ro":"NO","rq":"NO","len":"20","hid":"YES"},{"id":"EAC_FAILURE","lbl":"Failure Code","type":"LOV-1","def":"","ro":"NO","rq":"NO","len":"20","hid":"YES"},{"id":"EAC_CAUSE","lbl":"Cause Code","type":"LOV-1","def":"","ro":"NO","rq":"NO","len":"20","hid":"YES"},{"id":"EAC_ACTION","lbl":"Action","type":"LOV-2","def":"","ro":"NO","rq":"NO","len":"20","hid":"NO"},{"id":"EAC_QUANTITY","lbl":"Quantity","type":"NUM","def":"","ro":"NO","rq":"NO","len":"25","hid":"NO"},{"id":"EAC_UOM","lbl":"UOM","type":"LOV-1","def":"","ro":"NO","rq":"NO","len":"30","hid":"NO"},{"id":"EAC_NOTE","lbl":"NOTE","type":"CHAR","def":"","ro":"NO","rq":"NO","len":"256","hid":"YES"},{"id":"EAC_CREW","lbl":"Crew","type":"LOV-2","def":"","ro":"NO","rq":"NO","len":"20","hid":"NO"},{"id":"EAC_CREW_ORG","lbl":"Crew Org.","type":"CHAR","def":"","ro":"YES","rq":"NO","len":"80","hid":"NO"},{"id":"EAC_PERSON","lbl":"Employee","type":"LOV-2","def":"","ro":"NO","rq":"NO","len":"20","hid":"NO"},{"id":"EAC_NONCONFORMITY","lbl":"Nonconformity","type":"LOV-1","def":"","ro":"NO","rq":"NO","len":"30","hid":"YES"},{"id":"EAC_OBSERVATION","lbl":"Observation","type":"LOV-1","def":"","ro":"NO","rq":"NO","len":"30","hid":"YES"},{"id":"EAC_CREATEDBY","lbl":"Created By","type":"CHAR","def":"","ro":"NO","rq":"NO","len":"255","hid":"YES"},{"id":"EAC_CREATED","lbl":"Date Created","type":"DATE","def":"","ro":"NO","rq":"NO","len":"60","hid":"YES"},{"id":"EAC_UPDATEDBY","lbl":"Updated By","type":"CHAR","def":"","ro":"NO","rq":"NO","len":"255","hid":"YES"},{"id":"EAC_UPDATED","lbl":"Date Updated","type":"DATE","def":"","ro":"NO","rq":"NO","len":"60","hid":"YES"}]}]}'
);

UPDATE r5configsettings
SET cfs_xmlconfig = '{"sections":[{ "name":"Inspection", "fields":[ {"id":"EPO_OBJECT", "lbl":"Equipment", "type":"LOV-1", "def":"", "ro":"NO", "rq":"YES", "len":"30", "hid":"NO" }, {"id":"EPO_ASPECT", "lbl":"Aspect", "type":"LOV-1", "def":"", "ro":"NO", "rq":"YES", "len":"4", "hid":"NO" }, {"id":"EPO_POINTTYPE", "lbl":"Point Type", "type":"CHAR", "def":"", "ro":"YES", "rq":"NO", "len":"30", "hid":"NO" }, {"id":"EPO_POINT", "lbl":"Point", "type":"LOV-2", "def":"", "ro":"YES", "rq":"NO", "len":"3", "hid":"NO" }, {"id":"EPO_VALUE", "lbl":"Value", "type":"NUM", "def":"", "ro":"NO", "rq":"NO", "len":"24", "hid":"NO" }, {"id":"EPO_UOM", "lbl":"UOM", "type":"LOV-1", "def":"", "ro":"YES", "rq":"NO", "len":"15", "hid":"NO" }, {"id":"EPO_METHOD", "lbl":"Method", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"20", "hid":"NO" }, {"id":"EPO_FINDING", "lbl":"Finding", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"4", "hid":"NO" }, {"id":"EPO_RESULT_DESC", "lbl":"Result", "type":"PICKER", "def":"", "ro":"NO", "rq":"YES", "len":"20", "hid":"NO" }, {"id":"EPO_DATE", "lbl":"Date", "type":"DATI", "def":"", "ro":"NO", "rq":"YES", "len":"20", "hid":"NO" }, {"id":"EPO_COMPLETED", "lbl":"Completed", "type":"BOOL", "def":"", "ro":"NO", "rq":"NO", "len":"20", "hid":"NO" }, {"id":"EPO_LOCATION", "lbl":"Location", "type":"CHAR", "def":"", "ro":"NO", "rq":"NO", "len":"70", "hid":"NO" }, {"id":"EPO_COMMENT", "lbl":"Note", "type":"CHAR", "def":"", "ro":"NO", "rq":"NO", "len":"70", "hid":"NO" }, {"id":"EPO_INSPECTOR", "lbl":"Inspector", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"15", "hid":"NO" }, {"id":"EPO_STWO", "lbl":"Standard WO", "type":"LOV-1", "def":"", "ro":"NO", "rq":"NO", "len":"20", "hid":"NO" }, {"id":"EPO_CREATE", "lbl":"New WO Required", "type":"BOOL", "def":"", "ro":"NO", "rq":"NO", "len":"20", "hid":"NO" }] },{"name":"Linear Reference Details", "hid" : "YES", "ro" : "YES", "mode" : "CON", "fields":[{"id":"EPO_FROMPOINT","lbl":"From Point","type":"LOV-3","def":"","ro":"NO","rq":"NO","len":"30","hid":"NO"},{"id":"EPO_FROMREFDESC","lbl":"From Ref. Description","type":"CHAR","def":"","ro":"NO","rq":"NO","len":"80","hid":"NO"},{"id":"EPO_FROMGEOREF","lbl":"From Geographical Ref.","type":"CHAR","def":"","ro":"NO","rq":"NO","len":"80","hid":"NO"},{"id":"EPO_TOPOINT","lbl":"To Point","type":"LOV-3","def":"","ro":"NO","rq":"NO","len":"30","hid":"NO"},{"id":"EPO_TOREFDESC","lbl":"To Ref. Description","type":"CHAR","def":"","ro":"NO","rq":"NO","len":"80","hid":"NO"},{"id":"EPO_TOGEOREF","lbl":"To Geographical Ref.","type":"CHAR","def":"","ro":"NO","rq":"NO","len":"80","hid":"NO"}]}]}'
WHERE cfs_code = 'TCJEPO_IPAD' AND cfs_group = '*' AND cfs_user='*';

UPDATE r5listentity SET let_filter = NULL WHERE let_datagrid IN ('ICFINC', 'ICFIND');

UPDATE r5listentity SET let_updated = NULL WHERE let_updated = '01/01/1900';

UPDATE R5APPSETTINGS SET AST_VALUE = '11600' WHERE AST_NAME='DBVERSION';

DELETE FROM r5mobiletexts WHERE mot_number > 1663;
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1664 , 'Point Revision', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1665 , 'Edit LOTO', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1666 , 'Signature not required for this activity.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1667 , 'No signature allowed due to security privileges.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1668 , 'No signature allowed due to responsibility privileges.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1669 , 'Signature optional. Waiting for the checklist to be completed.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1670 , 'Signature required. Waiting for the checklist to be completed.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1671 , 'Signature optional. Waiting for the performed by signature(s).', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1672 , 'Signature required. Waiting for the performed by signature(s).', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1673 , 'Cannot complete the work order with regulatory checklist items still pending.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1674 , 'New Value must be between prior and subsequent readings.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1675 , 'A repairable spare work order cannot have a work request status.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1676 , 'WO-Activity', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1677 , 'Batch Book Labor', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1678 , 'Search Batch Book Labor', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1679 , 'Multiple Employees', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1680 , 'The work order activity was dispatched to 1 or more crews/employees prior to completion. Do you want to dispatch them to this work order activity again?', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1681 , 'No Batch Book Labor Found', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1682 , 'Unable to book labor past midnight.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1683 , 'The current Campaign status does not allow additions, modifications, or deletions to this page.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1684 , 'Survey WO could not be cleared because the selected record has been evaluated.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1685 , 'Survey Equipment', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1686 , 'There are no records to display.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1687 , 'You must select a record before performing this action.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1689 , 'Failed', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1691 , 'Clear Survey WO', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1692 , 'Survey Line Status', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1693 , 'Edit Operator CheckList', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1694 , 'There is not sufficient data in the Main Isolation tables to determine a solution. Contact the system administrator.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1695 , 'Unable to determine valve(s) to be closed to isolate the selected main based on available information in the Main Isolation tables.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1696 , 'Unable to determine additional mains that would be impacted by a valve closure based on available information in the Main Isolation tables.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1697 , 'Could not determine summary information based on available information in the Main Isolation tables.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1698 , 'Operate', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1699 , 'Isolate', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1700 , 'Isolate Main', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1701 , 'Valve required for Isolation', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1702 , 'Valve inoperable', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1703 , 'Valve operated (Closed successfully)', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1704 , 'Selected Main', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1705 , 'Affected Main', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1706 , 'The Main Isolation tables are not available. Confirm that the Download Main Isolation Tables option has been selected in the Sync Config and perform a sync.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1707 , 'Summary', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1708 , 'Extend', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1709 , 'Main Isolation', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1710 , 'Current Crew', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1711 , 'Crew', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1712 , 'Add Book Labor by Crew', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1713 , 'Book Labor by Crew', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1714 , 'At least one employee for the crew must be selected.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1715 , 'Employees', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1716 , 'Current Crew Org', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1717 , 'Crew has no active employees for the specified start date.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1718 , 'Would you like to delete the basemap data as well?', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1719 , ':PARAM1 :PARAM2 cannot be withdrawn because the commission date occurs in the future.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1720 , 'This transaction cannot be deleted because a later transaction depends on it.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1721 , 'The system identified a conflict in started activities. The system cannot automatically post labor at this time. Correct the problem and manually post labor record.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1722 , 'Work :PARAM1 Activity :PARAM2 has been stopped. However, the system could not automatically post the labor record because total booked hours exceed 24. Labor record must be manually posted.', 'EN');
INSERT INTO r5mobiletexts (mot_number, mot_text, mot_lang) VALUES (1723 , 'View Activity', 'EN');
