feat: update commission protobuf version; enhance weekly balance display with new member counts and carryover logic
Build and Deploy / build (push) Successful in 1m26s
Build and Deploy / build (push) Successful in 1m26s
This commit is contained in:
@@ -159,6 +159,9 @@ public class CommissionService
|
||||
if (weekDefinitionId.HasValue)
|
||||
{
|
||||
request.WeekDefinitionId = weekDefinitionId.Value;
|
||||
}else
|
||||
{
|
||||
request.WeekDefinitionId=7;
|
||||
}
|
||||
|
||||
var response = await _client.GetMyWeeklyBalancesAsync(request);
|
||||
@@ -175,8 +178,10 @@ public class CommissionService
|
||||
MinBalance = Math.Min(balance.LeftLegBalances, balance.RightLegBalances),
|
||||
BalanceCount = balance.TotalBalances,
|
||||
CalculatedCommission = balance.WeeklyPoolContribution,
|
||||
LeftCarryover = Math.Max(0, balance.LeftLegBalances - balance.RightLegBalances),
|
||||
RightCarryover = Math.Max(0, balance.RightLegBalances - balance.LeftLegBalances),
|
||||
LeftCarryover = balance.LeftLegCarryover,
|
||||
RightCarryover = balance.RightLegCarryover,
|
||||
LeftNewMembers = balance.LeftLegNewMembers,
|
||||
RightNewMembers = balance.RightLegNewMembers,
|
||||
StartDate = balance.CalculatedAt?.ToDateTime().AddDays(-7) ?? DateTime.Now.AddDays(-7),
|
||||
EndDate = balance.CalculatedAt?.ToDateTime() ?? DateTime.Now
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user