Skip to content

Commit

Permalink
#540 - Render properly expense templates without amount on checklist
Browse files Browse the repository at this point in the history
  • Loading branch information
maraf committed Jan 31, 2025
1 parent f8eda7a commit 8456863
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Money.Blazor.Host/Components/ExpenseCard.razor
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<DateValue Value="Model.When" />
</div>
<div class="col-8 col-md-3 text-md-end mb-2 mb-md-0 text-end">
<h3 class="@AmountCssClass">@Context.CurrencyFormatter?.Format(Model.Amount)</h3>
<h3 class="@AmountCssClass">@Context.CurrencyFormatter?.Format(Model.Amount, CurrencyFormatter.FormatZero.Placehoder)</h3>
</div>
<div class="col-auto col-md-2 mb-2 mb-md-0">
<CategoryTag Key="@Model.CategoryKey" />
Expand Down
2 changes: 1 addition & 1 deletion src/Money.Models.Builders/OutcomeBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ public async Task<Price> HandleAsync(GetMonthExpectedExpenseTotal query)
var checklist = await HandleAsync(new ListMonthExpenseChecklist(query.Month) { UserKey = query.UserKey });
foreach (var expected in checklist)
{
if (!expected.ExpenseKey.IsEmpty)
if (!expected.ExpenseKey.IsEmpty || expected.Amount == null)
continue;

result += priceConverter.ToDefault(query.UserKey, new PriceFixed(expected.Amount, expected.When));
Expand Down

0 comments on commit 8456863

Please sign in to comment.