-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into TM-142-Breadcrumb-Links
- Loading branch information
Showing
50 changed files
with
511 additions
and
756 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -586,4 +586,4 @@ | |
"value": "[variables('workerAppServiceName')]" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/SFA.DAS.EAS.Employer_Financial.Database/StoredProcedures/CreateAccountTransfersV1.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
CREATE PROCEDURE [employer_financial].[CreateAccountTransfersV1] | ||
@transfers [employer_financial].[AccountTransferTable] READONLY | ||
AS | ||
INSERT INTO [employer_financial].[AccountTransfers] | ||
( | ||
SenderAccountId, | ||
SenderAccountName, | ||
ReceiverAccountId, | ||
ReceiverAccountName, | ||
ApprenticeshipId, | ||
CourseName, | ||
CourseLevel, | ||
PeriodEnd, | ||
Amount, | ||
Type, | ||
CreatedDate, | ||
RequiredPaymentId | ||
) | ||
Select | ||
tr.SenderAccountId, | ||
actSender.Name, | ||
tr.ReceiverAccountId, | ||
actReceiver.Name, | ||
tr.ApprenticeshipId, | ||
IsNull(Ir.CourseName, 'Unknown Course'), | ||
Ir.CourseLevel, | ||
tr.PeriodEnd, | ||
tr.Amount, | ||
tr.Type, GetDate(), | ||
tr.RequiredPaymentId | ||
FROM | ||
(SELECT | ||
p.AccountId, | ||
p.PeriodEnd, | ||
p.ApprenticeshipId, | ||
meta.ApprenticeshipCourseName as CourseName | ||
,meta.ApprenticeshipCourseLevel as CourseLevel | ||
,COUNT(DISTINCT Uln) as ApprenticeCount | ||
,SUM(p.Amount) as PaymentTotal | ||
FROM [employer_financial].[Payment] p | ||
INNER JOIN [employer_financial].[PaymentMetaData] meta ON p.PaymentMetaDataId = meta.Id | ||
Inner join @transfers tr on p.AccountId = tr.ReceiverAccountId and p.PeriodEnd = tr.PeriodEnd and p.ApprenticeshipId = tr.ApprenticeshipId | ||
GROUP BY meta.ApprenticeshipCourseName, meta.ApprenticeshipCourseLevel, p.AccountId, p.PeriodEnd, p.ApprenticeshipId) Ir | ||
Inner join @transfers tr on Ir.AccountId = tr.ReceiverAccountId and Ir.PeriodEnd = tr.PeriodEnd and Ir.ApprenticeshipId = tr.ApprenticeshipId | ||
Inner join [employer_financial].[Account] actSender on actSender.Id = tr.SenderAccountId | ||
Inner join [employer_financial].[Account] actReceiver on actReceiver.Id = tr.ReceiverAccountId |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
src/SFA.DAS.EAS.Employer_Financial.Database/Types/AccountTransferTable.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
CREATE TYPE [employer_financial].[AccountTransferTable] AS TABLE | ||
( | ||
SenderAccountId BIGINT NOT NULL, | ||
SenderAccountName NVARCHAR(100) NOT NULL, | ||
SenderAccountName NVARCHAR(100), | ||
ReceiverAccountId BIGINT NOT NULL, | ||
ReceiverAccountName NVARCHAR(100) NOT NULL, | ||
ReceiverAccountName NVARCHAR(100), | ||
ApprenticeshipId BIGINT NOT NULL, | ||
CourseName VARCHAR(MAX) NOT NULL, | ||
CourseName VARCHAR(MAX), | ||
CourseLevel INT, | ||
Amount DECIMAL(18,5) NOT NULL, | ||
PeriodEnd NVARCHAR(20) NOT NULL, | ||
Type NVARCHAR(50) NOT NULL, | ||
RequiredPaymentId UNIQUEIDENTIFIER NOT NULL | ||
RequiredPaymentId UNIQUEIDENTIFIER | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 0 additions & 68 deletions
68
...loyerAccounts.UnitTests/Queries/GetPostcodeAddressTests/WhenIGetAddressesFromAPostcode.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.