Opcode for adding project - 5500


Basically projects are creating based on sgProjectCode value in query, if sgProjectCode is not null, it will turn bIsProject to true in tblMasterContracts. 


For creating child projects, we need to pass idMasterContract value as fkidParent in tblInterfaceContracts


Query used for parent project:


insert into tblInterfaceContracts (inOperationCode, cdResult, cdJobType, sgContractno, sgCommonName, cdContractStatus, cdSchedulingStatus, 

fkidClient, fkidTemplate, fkidBusinessUnit, fkidRegion, fkidSupervisor, fkidHouseType, sgProjectCode)

values(5500, 'READY', 'C', 'BLD7000', 'BLD7000', 'A', 'N', 39304, 29, 0, 0, 0, 25, 'ABC')


Query used for child project:


insert into tblInterfaceContracts (inOperationCode, cdResult, cdJobType, sgContractno, sgCommonName, cdContractStatus, cdSchedulingStatus, 

fkidClient, fkidTemplate, fkidBusinessUnit, fkidRegion, fkidSupervisor, fkidHouseType, fkidParent, sgProjectCode)

values(5500, 'READY', 'P', 'BLD7000-03', 'BLD7000-03', 'A', 'N', 39304, 29, 0, 0, 0, 25,38464,'ABC' )