Skip to content

Remove automatic is_comped detection from invoice handler#332

Merged
simonhamp merged 2 commits intomainfrom
remove-auto-is-comped
Apr 2, 2026
Merged

Remove automatic is_comped detection from invoice handler#332
simonhamp merged 2 commits intomainfrom
remove-auto-is-comped

Conversation

@simonhamp
Copy link
Copy Markdown
Member

@simonhamp simonhamp commented Apr 2, 2026

Summary

  • Removed automatic is_comped flag detection in HandleInvoicePaidJob that was setting subscriptions as comped when the invoice total was zero
  • The comped status should only be set intentionally via admin tools (subscriptions:mark-comped command, Filament admin panel, GrantProduct command)
  • Renamed updateSubscriptionCompedStatus() to updateSubscriptionPricePaid() to reflect its actual purpose
  • Added test verifying is_comped is not auto-set on zero-total invoices

Test plan

  • Existing HandleInvoicePaidJobTest tests pass
  • Verify zero-total subscription invoices no longer flip is_comped to true
  • Verify price_paid is still correctly recorded from invoice totals

🤖 Generated with Claude Code

simonhamp and others added 2 commits April 2, 2026 18:35
Stop auto-setting is_comped based on invoice total being zero.
The comped status should only be set intentionally via admin tools.
Renamed method to updateSubscriptionPricePaid to reflect its purpose.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Check subscription active() status instead of just existence,
so canceled/ended subscriptions correctly show "No active subscription".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@simonhamp simonhamp marked this pull request as ready for review April 2, 2026 17:51
@simonhamp simonhamp merged commit e974a06 into main Apr 2, 2026
2 checks passed
@simonhamp simonhamp deleted the remove-auto-is-comped branch April 2, 2026 17:51
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.

1 participant