﻿
----------------------------------------------- M.Negm 2024-11-28 -----------------------


INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1123,N'Voucher Receipt ',N'سند قبض  ',584,N'/GenerlLedger/VoucherReceipt',N'Index','fa fa-thumb-tack',N'get',13,1,1)
Go

INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1123,18)
Go

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(23167,N'  سند قبض ',N'Receipt Voucher',1123,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(23168,N'عرض   سند قبض ',N'View Receipt Voucher',1123,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(23169,N'إضافة سند قبض ',N'Add Receipt Voucher',1123,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(23170,N'تعديل سند قبض ',N'Edit Receipt Voucher',1123,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(23171,N'حذف سند قبض ',N'Delete Receipt Voucher',1123,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(23172,N'حفظ سند قبض ',N'Save Receipt Voucher',1123,2)
Go



INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1124,N' Operations ',N'عمليات  ',583,N'/',NULL,'fa fa-thumb-tack',NULL,6,1,1)
Go
INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1124,18)
Go


INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1125,N'Accounts',N'حسابات',1124,N'/',NULL,'fa fa-thumb-tack',NULL,1,1,1)
Go
INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1125,18)
Go
update SystemMenu set ParentID = 1125 where SystemMenuCode= 604
update SystemMenu set ParentID = 1125 where SystemMenuCode= 630

update SystemMenu set ParentID = 1125 where SystemMenuCode= 608
update SystemMenu set ParentID = 1125 where SystemMenuCode= 610

INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1126,N'Financial',N'نقدية ',1124,N'/',NULL,'fa fa-thumb-tack',NULL,2,1,1)
Go
INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1126,18)
GO

update SystemMenu set ParentID = 1126 where SystemMenuCode= 1123
GO


update SystemMenu set ParentID = 1125 where SystemMenuCode= 604
update SystemMenu set ParentID = 1125 where SystemMenuCode= 630
GO


update SystemMenu set ParentID = 1125 where SystemMenuCode= 608
update SystemMenu set ParentID = 1125 where SystemMenuCode= 610
GO



update SystemMenu set ParentID = 1126 where SystemMenuCode= 1123
GO

update SystemMenu set Sequence =11 WHERE SystemMenuCode = 360
GO
update SystemMenu set Sequence =9 WHERE SystemMenuCode = 1116
GO

--------------------------------------- End 2024-11-28 ----------------------- 
--------------------------------------- Ali 2024-12-01 ----------------------- 

 INSERT[dbo].[ConfigParameter]  ([ConfigKey], [Name], [Arabic_Name], [ConfigValue], [ConfigCategoryCode], [OrderNo], [ConfigType], [IsVisible], [ModifiedBy], [ModificationDate], [RequestTypeId],[ConfigDescription])
VALUES(N'WfOnlyEmployeeAddResignationRequest',N'Only Employee Can Add Resignation Request',N'تقديم الطلب الاستقالة قاصر على الموظف فقط',N'false',2,9,1,1,Null,Null,7,N'تقديم الطلب الاستقالة قاصر على الموظف فقط لا يمكن حتى للمدير تقديم الطلب')
Go
--------------------------------------- End 2024-12-01 ----------------------- 
 ----------------------------------------- AK 2024-12-02 --------------------
INSERT [dbo].[ConfigParameter] ([ConfigKey], [Name], [Arabic_Name], [ConfigValue], [ConfigCategoryCode], [OrderNo], [ConfigType], [IsVisible], [ModifiedBy], [ModificationDate], [RequestTypeId],ConfigDescription) 
VALUES (N'ACC_WorkingWithExpensesDue', N'Working with expenses due', N'العمل بالمصروفات المستحقة', N'true', 18, 1, 1, 1, NULL, NULL, NULL,N'العمل بالمصروفات المستحقة')
GO
--------------------------------------- AK 2024-12-02 ----------------------- 
--------------------------------------- Hammad 2024-12-02 ----------------------- 

CREATE TABLE [dbo].[NotificationRecieverDetail](
	[RecieverDetailCode] [int] IDENTITY(1,1) NOT NULL,
	[NotificationTemplateTypeCode] [int] NOT NULL,
	[NotificationUserTypeCode] [int] NOT NULL,
	[SpecifiedEmails] [nvarchar](1024) NULL,
	[RecieverType] [int] NOT NULL,
	[MDT] [datetime] NULL,
 CONSTRAINT [PK_EmailRecieverDetail] PRIMARY KEY CLUSTERED 
(
	[RecieverDetailCode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[NotificationRecieverDetail]  WITH CHECK ADD  CONSTRAINT [FK_EmailRecieverDetail_EmailTemplateType] FOREIGN KEY([NotificationTemplateTypeCode])
REFERENCES [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode])
GO

ALTER TABLE [dbo].[NotificationRecieverDetail] CHECK CONSTRAINT [FK_EmailRecieverDetail_EmailTemplateType]
GO

ALTER TABLE [dbo].[NotificationRecieverDetail]  WITH CHECK ADD  CONSTRAINT [FK_NotificationRecieverDetail_NotificationTemplateType] FOREIGN KEY([NotificationTemplateTypeCode])
REFERENCES [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode])
GO

ALTER TABLE [dbo].[NotificationRecieverDetail] CHECK CONSTRAINT [FK_NotificationRecieverDetail_NotificationTemplateType]
GO

ALTER TABLE [dbo].[NotificationRecieverDetail]  WITH CHECK ADD  CONSTRAINT [FK_NotificationRecieverDetail_NotificationUserType] FOREIGN KEY([NotificationUserTypeCode])
REFERENCES [dbo].[NotificationUserType] ([NotificationUserTypeCode])
GO

ALTER TABLE [dbo].[NotificationRecieverDetail] CHECK CONSTRAINT [FK_NotificationRecieverDetail_NotificationUserType]
GO
--------------------------------------- End 2024-12-02 ----------------------- 
----------------------------------------- AK 2024-12-03 --------------------
DELETE ConfigParameter WHERE ConfigKey in ('ACC_MonthOfBeginningYear','ACC_OperatingYear','ACC_VendorsMainAccountsChartCode','ACC_CustomersMainAccountsChartCode')
GO
Update ConfigParameter SET OrderNo=0 WHERE  ConfigKey='ACC_AutoPosting'
GO
Update ConfigParameter SET ConfigCategoryCode=2 WHERE  ConfigKey='FixVacationUnitNoAndFiles'
GO
--------------------------------------- AK 2024-12-03 ----------------------- 

--------------------------------------- mostafa 2024-12-03 ----------------------- 
 INSERT[dbo].[ConfigParameter]  ([ConfigKey], [Name], [Arabic_Name], [ConfigValue], [ConfigCategoryCode], [OrderNo], [ConfigType], [IsVisible], [ModifiedBy], [ModificationDate], [RequestTypeId],[ConfigDescription])
VALUES(N'HideGeneralInformationData',N'Hide General Information Data',N'إخفاء البيانات شخصية',N'false',1,59,1,1,Null,Null,Null,N'إخفاء البيانات شخصية')
Go
INSERT [dbo].[LabelsName] ([LabelKey], [Name], [Arabic_Name]) VALUES (N'MonthlySalary', N'Monthly Salary', N'الراتب الشهري')
GO
INSERT INTO SecurityPrivilege (ID, DescriptionAR, DescriptionEN, SystemMenuCode,PrivilegeType) VALUES (3996,N'عرض  الراتب الشهري',N'View Monthly Salary', 3,2);
GO
INSERT INTO SecurityUserDetail (SecurityUserID, PrivilegeID, CreationDate, CreatedBy)
SELECT SecurityUserID, 3996, CreationDate, CreatedBy
FROM SecurityUserDetail
WHERE PrivilegeID = 1034;
GO
INSERT INTO SecurityGroupDetail (SecurityGroupID, PrivilegeID, CreationDate, CreatedBy)
SELECT SecurityGroupID, 3996, CreationDate, CreatedBy
FROM SecurityGroupDetail
WHERE PrivilegeID = 1034;
GO
--------------------------------------- end 2024-12-03 ----------------------- 
----------------------------------------- AK 2024-12-05 --------------------
Update ConfigParameter SET OrderNo=4, ConfigKey='ACC_AutoPostingExpensesDue'  WHERE  ConfigKey='ACC_AutoPosting'
GO
--------------------------------------- AK 2024-12-05 ----------------------- 
--------------------------------------- Ali 2024-12-05 ----------------------- 

INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1630,NULL, N'RecruitJob',N'RecruitJob',N'SaveFieldsDisplayOnline',N'POST')
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1984,1630,5134, NULL)
Go
--------------------------------------- End 2024-12-05 ----------------------- 
