-------------------------------- Hammad 2020-02-09 -----------------------

INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage]) 
VALUES (242, N'Branch License Setup', N'إعداد ترخيص عمل الفرع', 4, N'/BranchLicenseSetup', N'Index', NULL, N'get', 13, 1, 1)
Go

INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (1193, N'إعداد ترخيص الفرع', N'Branch License Setup', 242, 1)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (1194, N'عرض إعداد ترخيص الفرع', N'View Branch License Setup', 242, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (1195, N'حفظ إعداد ترخيص الفرع', N'Save Branch License Setup', 242, 2)
Go

INSERT [dbo].[SystemMenuModule] ([SystemMenuCode], [AppModuleCode]) VALUES ( 242, 6)
Go

-------------------------------- End 2020-02-09 -----------------------
------------------------------- A.Khaled 2020-02-13 --------------------------    
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (12059, N'سحب بيانات الموازنة العددية', N'Collect budget data from payroll', 204, 2)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (160, N'Budget', N'BudgetHead', N'AddBudgetNumericBudgets', 0, N'post', 12059)
------------------------------- End 2020-02-13 --------------------------

------------------------------- Ali 2020-02-16 --------------------------    
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(339,N'Employees Privilege',N'صلاحيات الموظفين',161,N'/Appraisal/EmployeesPrivilege',N'Index','',N'get',13,1,1)
Go

INSERT[dbo].[SystemMenuModule]([SystemMenuCode], [AppModuleCode]) VALUES(339,8)
Go

INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (10056, N' صلاحيات الموظفين', N'Employees Privilege', 339, 1)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (10057, N'عرض صلاحيات الموظفين', N'View Employees Privilege', 339, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (10058, N'حفظ صلاحيات الموظفين', N'Save Employees Privilege', 339, 2)
Go
------------------------------- End 2020-02-16 -------------------------- 
------------------------------- A.Khaled 2020-02-17 --------------------------    
UPDATE [dbo].[SystemMenu] SET [Arabic_Name]=N'أنواع التكلفة الفعلية' WHERE [SystemMenuCode]=236
UPDATE [dbo].[SystemMenu] SET [Sequence]=7 WHERE [SystemMenuCode]=216
UPDATE [dbo].[SystemMenu] SET [Sequence]=8 WHERE [SystemMenuCode]=231
GO

INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES (340, N'Expected Employees', N'الموظفين المتوقعين', 203, N'/Budget/BudgetExpectedEmployees', N'Index', NULL, N'get', 6, 0, 1)
GO

SET IDENTITY_INSERT [dbo].[SystemMenuModule] ON 
INSERT [dbo].[SystemMenuModule] ([SystemMenuModuleCode], [SystemMenuCode], [AppModuleCode]) VALUES (11532, 340, 6)
SET IDENTITY_INSERT [dbo].[SystemMenuModule] OFF
GO

INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (12060, N'الموظفين المتوقعين', N'Expected Employees', 340, 1)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (161, N'Budget', N'BudgetExpectedEmployees', N'Index', 0, N'get', 12060)
GO
------------------------------- End 2020-02-17 --------------------------  
-------------------------------Sayed 2020-02-17--------------------------
 update SecurityPrivilege set [SystemMenuCode]=84 where ID=3125
 GO
 ------------------------------- End 2020-02-17 --------------------------  
 -------------------------------Ali 2020-02-18--------------------------
 INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (10059, N'نسخ أنواع التقييم', N'Copy evaluation types', 189, 2)
  -------------------------------End 2020-02-18--------------------------
  ------------------------------- A.Khaled 2020-02-19 --------------------------    
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (12061, N'عرض الموظفين المتوقعين', N'View Expected Employees', 340, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (12062, N'إضافة الموظفين المتوقعين', N'Add Expected Employees', 340, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (12063, N'تعديل الموظفين المتوقعين', N'Edit Expected Employees', 340, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (12064, N'حفظ الموظفين المتوقعين', N'Save Expected Employees', 340, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (12065, N'حذف الموظفين المتوقعين', N'Delete Expected Employees', 340, 2)
GO

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (162, N'Budget', N'BudgetExpectedEmployees', N'BudgetExpectedEmployeeDetails_Read', 0, N'post', 12061)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (163, N'Budget', N'BudgetExpectedEmployees', N'Save', 1, N'get', 12062)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (164, N'Budget', N'BudgetExpectedEmployees', N'Save', 2, N'get', 12063)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (165, N'Budget', N'BudgetExpectedEmployees', N'Save', 0, N'post', 12064)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (166, N'Budget', N'BudgetExpectedEmployees', N'Delete', 0, N'post', 12065)
GO
------------------------------- End 2020-02-19 -------------------------- 
-------------------------------Sayed 2020-02-19--------------------------
 INSERT[dbo].[ConfigParameter]  ([ConfigKey], [Name], [Arabic_Name], [ConfigValue], [ConfigCategoryCode], [OrderNo], [ConfigType], [IsVisible], [ModifiedBy], [ModificationDate], [RequestTypeId])
VALUES(N'WFReportOverTimeIsSymphony',N'? Report Over Time Is Symphony',N'تقرير الوقت الاضافي خاص بسيمفوني ؟',N'false',2,12,1,1,Null,Null,3)
Go


ALTER proc [dbo].[WF_GetOverTimeRequestByEmployee] 
(
	@UserId int =null ,
	@MainType tinyint =null ,
	@FromDate datetime =null ,
	@ToDate datetime =null,
	@EmployeeId int =null,
	@SectionCode nvarchar(50),
	@DepartmentApproval tinyint=null ,
	@DeptAccepted tinyint=null ,
	@DeptRefused tinyint=null ,
	@DeptPending tinyint=null ,
   @OverTimeFromDate datetime =null ,
	@OverTimeToDate datetime =null
)
AS
  Declare @ReportIsSymphony bit 
select @ReportIsSymphony=CONVERT(bit, ConfigValue) from ConfigParameter where ConfigKey='WFReportOverTimeIsSymphony'
  
  if (@ReportIsSymphony=0)        
  begin           

SELECT  [EmployeeId]
    
      ,round((sum([MinutesCount])/60),2) as HoursCount
    
	  ,Employees.Name  as EmployeeNameEN
	  ,Employees.Arabic_Name  as EmployeeNameAR
	,Sections.Name  as SectionEnName
	  ,Sections.Arabic_Name  as SectionArName
	  	 	
    	,round(sum(Cost),2) as Cost
	
		,round((sum(MinutesCountAfterFactor)/60),2) as   HoursAfterFactor
		
  FROM WF_OverTimeRequest 
  inner join Employees on WF_OverTimeRequest.EmployeeId=Employees.EmployeeCode
  LEFT OUTER JOIN  WF_OvertimeType on WF_OverTimeRequest.OvertimeTypeCode=WF_OvertimeType.OvertimeTypeCode
  inner join Sections on Sections.SectionCode=Employees.SectionCode
  inner join WF_RequestStatus on WF_OverTimeRequest.DepartmentApproval=WF_RequestStatus.RequestStatusId



 where 

      EmployeeId = COALESCE(@EmployeeId, EmployeeId)
	 AND (@FromDate IS NULL OR RecordAddDate >= @FromDate)
      AND (@ToDate IS NULL OR RecordAddDate <= @ToDate )
	     AND (@OverTimeFromDate IS NULL OR RequestDate >= @OverTimeFromDate)
      AND (@OverTimeToDate IS NULL OR RequestDate <= @OverTimeToDate )
     and   Employees.SectionCode = COALESCE(@SectionCode, Employees.SectionCode)
	 
       And( DepartmentApproval=  @DeptPending
	   or DepartmentApproval= @DeptAccepted
       or  DepartmentApproval= @DeptRefused)

	      group by EmployeeId,Employees.Name,Employees.Arabic_Name ,Sections.Name ,Sections.Arabic_Name 

end
else
--OverTime Symphony
begin
SELECT  [EmployeeId]
    
      ,round((sum([MinutesCount])/60),2) as HoursCount
    
	  ,Employees.Name  as EmployeeNameEN
	  ,Employees.Arabic_Name  as EmployeeNameAR
	,Sections.Name  as SectionEnName
	  ,Sections.Arabic_Name  as SectionArName
	  	 	
    	,round(sum(Cost),2) as Cost
	
		,round((sum(MinutesCountAfterFactor)/60),2) as   HoursAfterFactor
		
  FROM WF_OverTimeSymphonyRequest as WF_OverTimeRequest 
  inner join Employees on WF_OverTimeRequest.EmployeeId=Employees.EmployeeCode
  LEFT OUTER JOIN  WF_OvertimeType on WF_OverTimeRequest.OvertimeTypeCode=WF_OvertimeType.OvertimeTypeCode
  inner join Sections on Sections.SectionCode=Employees.SectionCode
  inner join WF_RequestStatus on WF_OverTimeRequest.DepartmentApproval=WF_RequestStatus.RequestStatusId



 where 

      EmployeeId = COALESCE(@EmployeeId, EmployeeId)
	 AND (@FromDate IS NULL OR RecordAddDate >= @FromDate)
      AND (@ToDate IS NULL OR RecordAddDate <= @ToDate )
	     AND (@OverTimeFromDate IS NULL OR RequestDate >= @OverTimeFromDate)
      AND (@OverTimeToDate IS NULL OR RequestDate <= @OverTimeToDate )
     and   Employees.SectionCode = COALESCE(@SectionCode, Employees.SectionCode)
	 
       And( DepartmentApproval=  @DeptPending
	   or DepartmentApproval= @DeptAccepted
       or  DepartmentApproval= @DeptRefused)

	      group by EmployeeId,Employees.Name,Employees.Arabic_Name ,Sections.Name ,Sections.Arabic_Name 
end
GO


ALTER proc [dbo].[WF_GetOverTimeRequest] 
(
	@UserId int =null ,
	@MainType tinyint =null ,
	@FromDate datetime =null ,
	@ToDate datetime =null,
	@EmployeeId int =null,
	@SectionCode nvarchar(50),
	@DepartmentApproval tinyint=null ,
	@DeptAccepted tinyint=null ,
	@DeptRefused tinyint=null ,
	@DeptPending tinyint=null ,
	  @OverTimeFromDate datetime =null ,
	@OverTimeToDate datetime =null
)
AS
Declare @ReportIsSymphony bit 
select @ReportIsSymphony=CONVERT(bit, ConfigValue) from ConfigParameter where ConfigKey='WFReportOverTimeIsSymphony'
  
  if (@ReportIsSymphony=0)        
  begin
SELECT  WF_OverTimeRequest.OverTimeRequestId     ,[EmployeeId]
      ,[DepartmentApproval]
      ,[RequestDate] 
      ,[HRApproval]
      ,[RecordAddDate]
      ,[RequestReason]
      ,[MainType]
      ,round((MinutesCount/60),2)  as   MinutesCount
      ,WF_OverTimeRequest.[Closed]
      ,[MainType]
      ,dbo.MinutesToDuration(MinutesCount) as HoursMinutes
	  ,Employees.Name  as EmployeeNameEN
	  ,Employees.Arabic_Name  as EmployeeNameAR
      ,WF_RequestStatus.RequestStatusName  as DepartmentApprovalNameAR
	  ,WF_RequestStatus.RequestStatusNameEn  as DepartmentApprovalNameEN
	  ,Sections.Name  as SectionEnName
	  ,Sections.Arabic_Name  as SectionArName
	  ,WF_OverTimeRequestSignature.UserId
	  ,SecurityUser.EmployeeCode
	  ,(case when [DepartmentApproval]=0 then  empDeptPending.Arabic_Name else '' end) as UserPendingNameAr
	  ,(case when [DepartmentApproval]=0 then empDeptPending.Name else '' end) as UserPendingNameEN,
	  TimeFrom,	TimeTo,
	  	WF_OvertimeType.Name as OvertimeTypeNameEN ,
	  	WF_OvertimeType.Arabic_Name as OvertimeTypeNameAr ,
    	dbo.MinutesToDuration(MinutesCountAfterFactor) as   MinutesCountAfterFactor
		 ,round(Cost,2) as Cost
	  ,empDeptRefused.Arabic_Name as UserRefusedNameAr
	  ,empDeptRefused.Name as UserRefusedNameEN
		,round((MinutesCountAfterFactor/60),2)  as   TotalMinutesAfterFactor
		
  FROM WF_OverTimeRequest 
  inner join Employees on WF_OverTimeRequest.EmployeeId=Employees.EmployeeCode
  LEFT OUTER JOIN  WF_OvertimeType on WF_OverTimeRequest.OvertimeTypeCode=WF_OvertimeType.OvertimeTypeCode
  inner join Sections on Sections.SectionCode=Employees.SectionCode
  inner join WF_RequestStatus on WF_OverTimeRequest.DepartmentApproval=WF_RequestStatus.RequestStatusId
  LEFT OUTER JOIN WF_OverTimeRequestSignature on WF_OverTimeRequest.OverTimeRequestId=WF_OverTimeRequestSignature.OverTimeRequestId and WF_OverTimeRequestSignature.Turn=0 and WF_OverTimeRequestSignature.Approved=0
  LEFT OUTER JOIN SecurityUser on SecurityUser.SecurityUserCode=WF_OverTimeRequestSignature.UserId
  LEFT OUTER JOIN Employees as empDeptPending on empDeptPending.EmployeeCode =SecurityUser.EmployeeCode

  LEFT OUTER JOIN WF_OverTimeRequestSignature as SignatureRefuse on WF_OverTimeRequest.OverTimeRequestId=SignatureRefuse.OverTimeRequestId and SignatureRefuse.Turn=1 and SignatureRefuse.Approved=2
  LEFT OUTER JOIN SecurityUser  as UserRefused on UserRefused.SecurityUserCode=SignatureRefuse.UserId
  LEFT OUTER JOIN Employees as empDeptRefused on empDeptRefused.EmployeeCode =UserRefused.EmployeeCode
 
 where 

      EmployeeId = COALESCE(@EmployeeId, EmployeeId)
       And  MainType = COALESCE(@MainType, MainType)
	 AND (@FromDate IS NULL OR RecordAddDate >= @FromDate)
      AND (@ToDate IS NULL OR RecordAddDate <= @ToDate )
	   AND (@OverTimeFromDate IS NULL OR RequestDate >= @OverTimeFromDate)
      AND (@OverTimeToDate IS NULL OR RequestDate <= @OverTimeToDate )
     and   Employees.SectionCode = COALESCE(@SectionCode, Employees.SectionCode)
	 
       And( DepartmentApproval=  @DeptPending
	   or DepartmentApproval= @DeptAccepted
       or  DepartmentApproval= @DeptRefused)

end
else
--OverTime Symphony
begin
SELECT  WF_OverTimeRequest.OverTimeRequestId     ,[EmployeeId]
      ,[DepartmentApproval]
      ,[RequestDate] 
      ,[HRApproval]
      ,[RecordAddDate]
      ,[RequestReason]
      ,[MainType]
      ,round((MinutesCount/60),2)  as   MinutesCount
      ,WF_OverTimeRequest.[Closed]
      ,[MainType]
      ,dbo.MinutesToDuration(MinutesCount) as HoursMinutes
	  ,Employees.Name  as EmployeeNameEN
	  ,Employees.Arabic_Name  as EmployeeNameAR
      ,WF_RequestStatus.RequestStatusName  as DepartmentApprovalNameAR
	  ,WF_RequestStatus.RequestStatusNameEn  as DepartmentApprovalNameEN
	  ,Sections.Name  as SectionEnName
	  ,Sections.Arabic_Name  as SectionArName
	  ,WF_OverTimeRequestSignature.UserId
	  ,SecurityUser.EmployeeCode
	  ,(case when [DepartmentApproval]=0 then  empDeptPending.Arabic_Name else '' end) as UserPendingNameAr
	  ,(case when [DepartmentApproval]=0 then empDeptPending.Name else '' end) as UserPendingNameEN,
	  TimeFrom,	TimeTo,
	  	WF_OvertimeType.Name as OvertimeTypeNameEN ,
	  	WF_OvertimeType.Arabic_Name as OvertimeTypeNameAr ,
    	dbo.MinutesToDuration(MinutesCountAfterFactor) as   MinutesCountAfterFactor
		 ,round(Cost,2) as Cost
	  ,empDeptRefused.Arabic_Name as UserRefusedNameAr
	  ,empDeptRefused.Name as UserRefusedNameEN
		,round((MinutesCountAfterFactor/60),2)  as   TotalMinutesAfterFactor
		
  FROM  WF_OverTimeSymphonyRequest as WF_OverTimeRequest 
  inner join Employees on WF_OverTimeRequest.EmployeeId=Employees.EmployeeCode
  LEFT OUTER JOIN  WF_OvertimeType on WF_OverTimeRequest.OvertimeTypeCode=WF_OvertimeType.OvertimeTypeCode
  inner join Sections on Sections.SectionCode=Employees.SectionCode
  inner join WF_RequestStatus on WF_OverTimeRequest.DepartmentApproval=WF_RequestStatus.RequestStatusId
  LEFT OUTER JOIN WF_OverTimeSymphonyRequestSignature as WF_OverTimeRequestSignature on WF_OverTimeRequest.OverTimeRequestId=WF_OverTimeRequestSignature.OverTimeRequestId and WF_OverTimeRequestSignature.Turn=0 and WF_OverTimeRequestSignature.Approved=0
  LEFT OUTER JOIN SecurityUser on SecurityUser.SecurityUserCode=WF_OverTimeRequestSignature.UserId
  LEFT OUTER JOIN Employees as empDeptPending on empDeptPending.EmployeeCode =SecurityUser.EmployeeCode

  LEFT OUTER JOIN WF_OverTimeSymphonyRequestSignature as SignatureRefuse on WF_OverTimeRequest.OverTimeRequestId=SignatureRefuse.OverTimeRequestId and SignatureRefuse.Turn=1 and SignatureRefuse.Approved=2
  LEFT OUTER JOIN SecurityUser  as UserRefused on UserRefused.SecurityUserCode=SignatureRefuse.UserId
  LEFT OUTER JOIN Employees as empDeptRefused on empDeptRefused.EmployeeCode =UserRefused.EmployeeCode
 
 where 

      EmployeeId = COALESCE(@EmployeeId, EmployeeId)
       And  MainType = COALESCE(@MainType, MainType)
	 AND (@FromDate IS NULL OR RecordAddDate >= @FromDate)
      AND (@ToDate IS NULL OR RecordAddDate <= @ToDate )
	   AND (@OverTimeFromDate IS NULL OR RequestDate >= @OverTimeFromDate)
      AND (@OverTimeToDate IS NULL OR RequestDate <= @OverTimeToDate )
     and   Employees.SectionCode = COALESCE(@SectionCode, Employees.SectionCode)
	 
       And( DepartmentApproval=  @DeptPending
	   or DepartmentApproval= @DeptAccepted
       or  DepartmentApproval= @DeptRefused)
end	 
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(3491,N'اختيار كل الطلبات',N'Choose All Requests',141,2)
Go
alter table [dbo].[WF_PermissionRequest]
add [AttachementFilePath] nvarchar(250)
Go

-------------------------------End 2020-02-19-----------------------------
-------------------------------Hammad 2020-02-20--------------------------
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
 VALUES (243, N'Employee Evaluation Comment', N'ملاحظات تقيم الموظفين ', 161, N'/Appraisal/EvaluationComment', N'Index', NULL, N'get', 14, 1, 1)
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage]) 
VALUES (244, N'My Evaluation', N'تقيمى', 161, N'/Appraisal/MyEvaluation', N'Index', NULL, N'get', 15, 1, 1)
Go

INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (10060, N' ملاحظات تقيم الموظفين', N'Employee Evaluation Comment', 243, 1)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (10061, N'عرض ملاحظات تقيم الموظفين ', N'View Employee Evaluation Comment', 243, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (10062, N'حفظ ملاحظات تقيم الموظفين ', N'Save Employee Evaluation Comment', 243, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (10063, N' تقيمى ', N'My Evaluation', 244, 1)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (10064, N'عرض تقيمى ', N'View My Evaluation', 244, 2)
Go

INSERT [dbo].[SystemMenuModule] ( [SystemMenuCode], [AppModuleCode]) VALUES ( 243, 8)
INSERT [dbo].[SystemMenuModule] ( [SystemMenuCode], [AppModuleCode]) VALUES ( 244, 8)
Go

-------------------------------End 2020-02-20---------------------------

-------------------------------Ali 2020-02-20---------------------------
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3492, N'اختيار كل الطلبات', N'Choose All Requests', 92, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3493, N'اختيار كل الطلبات', N'Choose All Requests', 37, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3494, N'اختيار كل الطلبات', N'Choose All Requests', 65, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3495, N'اختيار كل الطلبات', N'Choose All Requests', 85, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3496, N'اختيار كل الطلبات', N'Choose All Requests', 70, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3497, N'اختيار كل الطلبات', N'Choose All Requests', 83, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3498, N'اختيار كل الطلبات', N'Choose All Requests', 81, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3499, N'اختيار كل الطلبات', N'Choose All Requests', 72, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3500, N'اختيار كل الطلبات', N'Choose All Requests', 90, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3501, N'اختيار كل الطلبات', N'Choose All Requests', 114, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3502, N'اختيار كل الطلبات', N'Choose All Requests', 126, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3503, N'اختيار كل الطلبات', N'Choose All Requests', 145, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3504, N'اختيار كل الطلبات', N'Choose All Requests', 139, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3505, N'اختيار كل الطلبات', N'Choose All Requests', 147, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3506, N'اختيار كل الطلبات', N'Choose All Requests', 148, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3507, N'اختيار كل الطلبات', N'Choose All Requests', 174, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3508, N'اختيار كل الطلبات', N'Choose All Requests', 221, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3509, N'اختيار كل الطلبات', N'Choose All Requests', 331, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3510, N'اختيار كل الطلبات', N'Choose All Requests', 227, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3511, N'اختيار كل الطلبات', N'Choose All Requests', 336, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3512, N'اختيار كل الطلبات', N'Choose All Requests', 238, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3513, N'اختيار كل الطلبات', N'Choose All Requests', 240, 2)
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (3514, N'اختيار كل الطلبات', N'Choose All Requests', 198, 2)
GO

ALTER TABLE [WF_NewHireRequest]
ALTER COLUMN CurrentAddress nvarchar(250)  NULL;
ALTER TABLE [WF_NewHireRequest]
ALTER COLUMN IDAddress nvarchar(250)  NULL;
Go


ALTER TABLE dbo.WF_CompensationAllowanceTypes ADD
	IsVisable bit NOT NULL DEFAULT (0)
GO
-------------------------------End 2020-02-20---------------------------