Skip to content

Fix underpayment alerts on unpaid invoices#88

Open
charlie12520 wants to merge 1 commit into
n8bar:mainfrom
charlie12520:codex/fix-underpayment-empty-invoice
Open

Fix underpayment alerts on unpaid invoices#88
charlie12520 wants to merge 1 commit into
n8bar:mainfrom
charlie12520:codex/fix-underpayment-empty-invoice

Conversation

@charlie12520
Copy link
Copy Markdown

Summary

  • Short-circuit underpayment detection when an invoice has no active payment activity yet.
  • Keep outstanding-balance summary math unchanged so fresh invoices still show the unpaid amount.
  • Add coverage for fresh unpaid invoices and real partial-payment underpayments.

Fixes #72

Tests

  • php artisan test tests/Unit/InvoicePaymentSummaryTest.php (5 passed, 28 assertions)

Local note: I ran the test inside the Sail Docker Compose service. The repo files were not changed for environment setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Underpayment/outstanding-balance warnings fire on invoices with no payment activity

1 participant