Extend bill date range to include 5 days after due date
Updated both auto-mapping and manual mapping logic to search for transactions from bill date to due date + 5 days. This accounts for auto-pay processing delays, weekends, and bank processing times when bills are auto-paid on the due date. This fixes the issue where electric bills and other auto-paid utilities were missing their matching transactions because the payment posted a few days after the due date. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -304,7 +304,7 @@
|
||||
<div class="form-text mb-2">
|
||||
@if (r.ReceiptDate.HasValue && r.DueDate.HasValue)
|
||||
{
|
||||
<span>Showing transactions between bill date (@r.ReceiptDate.Value.ToString("yyyy-MM-dd")) and due date (@r.DueDate.Value.ToString("yyyy-MM-dd")).</span>
|
||||
<span>Showing transactions between bill date (@r.ReceiptDate.Value.ToString("yyyy-MM-dd")) and 5 days after due date (@r.DueDate.Value.AddDays(5).ToString("yyyy-MM-dd")).</span>
|
||||
}
|
||||
else if (r.ReceiptDate.HasValue)
|
||||
{
|
||||
@@ -384,7 +384,7 @@
|
||||
No matching transactions found.
|
||||
@if (r.ReceiptDate.HasValue && r.DueDate.HasValue)
|
||||
{
|
||||
<span>Try searching between @r.ReceiptDate.Value.ToString("yyyy-MM-dd") and @r.DueDate.Value.ToString("yyyy-MM-dd").</span>
|
||||
<span>Try searching between @r.ReceiptDate.Value.ToString("yyyy-MM-dd") and @r.DueDate.Value.AddDays(5).ToString("yyyy-MM-dd").</span>
|
||||
}
|
||||
else if (r.ReceiptDate.HasValue)
|
||||
{
|
||||
|
||||
@@ -236,9 +236,10 @@ namespace MoneyMap.Pages
|
||||
// If receipt has a date, filter by date range
|
||||
if (receipt.ReceiptDate.HasValue && receipt.DueDate.HasValue)
|
||||
{
|
||||
// For bills with due dates: use range from bill date to due date
|
||||
// For bills with due dates: use range from bill date to due date + 5 days
|
||||
// (to account for auto-pay processing delays, weekends, etc.)
|
||||
var minDate = receipt.ReceiptDate.Value;
|
||||
var maxDate = receipt.DueDate.Value;
|
||||
var maxDate = receipt.DueDate.Value.AddDays(5);
|
||||
query = query.Where(t => t.Date >= minDate && t.Date <= maxDate);
|
||||
}
|
||||
else if (receipt.ReceiptDate.HasValue)
|
||||
|
||||
@@ -99,9 +99,10 @@ namespace MoneyMap.Services
|
||||
// Start with date range filter
|
||||
if (receipt.ReceiptDate.HasValue && receipt.DueDate.HasValue)
|
||||
{
|
||||
// For bills with due dates: use range from bill date to due date
|
||||
// For bills with due dates: use range from bill date to due date + 5 days
|
||||
// (to account for auto-pay processing delays, weekends, etc.)
|
||||
var minDate = receipt.ReceiptDate.Value;
|
||||
var maxDate = receipt.DueDate.Value;
|
||||
var maxDate = receipt.DueDate.Value.AddDays(5);
|
||||
query = query.Where(t => t.Date >= minDate && t.Date <= maxDate);
|
||||
}
|
||||
else if (receipt.ReceiptDate.HasValue)
|
||||
|
||||
Reference in New Issue
Block a user