Improve testing and some cleanup refactoring.
This commit is contained in:
@@ -31,13 +31,10 @@ public static class ApplyFeeHandler
|
||||
{
|
||||
var updatedSource = context.Source.ApplyPosting(cmd.Amount, EntryType.Debit);
|
||||
var updatedRevenue = context.Destination.ApplyPosting(cmd.Amount, EntryType.Credit);
|
||||
var serviceFee = 0.5m;
|
||||
|
||||
var lines = new List<JournalLine>
|
||||
{
|
||||
new(updatedSource.Id, cmd.Amount, EntryType.Debit),
|
||||
new(updatedRevenue.Id, cmd.Amount - serviceFee, EntryType.Credit),
|
||||
new(updatedRevenue.Id, serviceFee, EntryType.Credit)
|
||||
new(updatedSource.Id, cmd.Amount, EntryType.Debit), new(updatedRevenue.Id, cmd.Amount, EntryType.Credit)
|
||||
};
|
||||
|
||||
var journalEntry = BalancedJournal.Create(
|
||||
|
||||
Reference in New Issue
Block a user