Based on @dezso and @ypercube comments, I think correct design is:
Table Companies:
CREATE TABLE [dbo].[Companies] (
[Id] INT NOT NULL,
[Code] NCHAR (10) NOT NULL,
[Name] NVARCHAR (MAX) NOT NULL,
CONSTRAINT [PK_Companies] PRIMARY KEY CLUSTERED ([Id] ASC)
);
Table FiscalYears:
CREATE TABLE [dbo].[FiscalYears] (
[Id] INT NOT NULL,
[CompanyId] INT NOT NULL,
[Name] NVARCHAR (MAX) NOT NULL,
[StartDate] DATE NOT NULL,
[FinishDate] DATE NOT NULL,
CONSTRAINT [PK_FiscalYears] PRIMARY KEY CLUSTERED ([Id] ASC),
CONSTRAINT [IX_FiscalYears] UNIQUE NONCLUSTERED ([Id] ASC, [CompanyId] ASC),
CONSTRAINT [FK_Companies_FiscalYears] FOREIGN KEY ([CompanyId]) REFERENCES [dbo].[Companies] ([Id])
);
Table Branches:
CREATE TABLE [dbo].[Branches] (
[Id] INT NOT NULL,
[CompanyId] INT NOT NULL,
[Code] NCHAR (10) NOT NULL,
[Name] NVARCHAR (MAX) NOT NULL,
CONSTRAINT [PK_Branches] PRIMARY KEY CLUSTERED ([Id] ASC),
CONSTRAINT [IX_Branches] UNIQUE NONCLUSTERED ([Id] ASC, [CompanyId] ASC),
CONSTRAINT [FK_Companies_Branchs] FOREIGN KEY ([CompanyId]) REFERENCES [dbo].[Companies] ([Id])
);
Table FiscalYearsBranchs:
CREATE TABLE [dbo].[FiscalYearsBranchs] (
[Id] INT NOT NULL,
[CompanyId] INT NOT NULL,
[FiscalYearId] INT NOT NULL,
[BranchId] INT NOT NULL,
CONSTRAINT [PK_FiscalYearsBranchs] PRIMARY KEY CLUSTERED ([Id] ASC),
CONSTRAINT [FK_FiscalYearsBranchs_FiscalYears] FOREIGN KEY ([FiscalYearId], [CompanyId]) REFERENCES [dbo].[FiscalYears] ([Id], [CompanyId]),
CONSTRAINT [FK_FiscalYearsBranchs_Branches] FOREIGN KEY ([BranchId], [CompanyId]) REFERENCES [dbo].[Branches] ([Id], [CompanyId])
);
Table Documents:
CREATE TABLE [dbo].[Documents] (
[Id] INT NOT NULL,
[FiscalYearsBranchesId] INT NOT NULL,
[No] INT NOT NULL,
[Date] DATE NOT NULL,
CONSTRAINT [PK_Documents] PRIMARY KEY CLUSTERED ([Id] ASC),
CONSTRAINT [FK_Documents_FiscalYearsBranchs] FOREIGN KEY ([FiscalYearsBranchesId]) REFERENCES [dbo].[FiscalYearsBranchs] ([Id])
);
Table Factors:
CREATE TABLE [dbo].[Factors] (
[Id] INT NOT NULL,
[FiscalYearsBranchesId] INT NOT NULL,
[No] INT NOT NULL,
[Date] DATE NOT NULL,
CONSTRAINT [PK_Factors] PRIMARY KEY CLUSTERED ([Id] ASC),
CONSTRAINT [FK_Factors_FiscalYearsBranchs] FOREIGN KEY ([FiscalYearsBranchesId]) REFERENCES [dbo].[FiscalYearsBranchs] ([Id])
);

CompanyID
in theFiscalYearsBranches
table - and modify the FKs accordingly - to avoid that issue. Check this question: dba.stackexchange.com/questions/49513/constrains-relationship/…