Skip to content

Add invoice revision handling for repriced orders#7

Merged
roncodes merged 2 commits intomainfrom
feature/ledger-invoice-revision-handling
Apr 24, 2026
Merged

Add invoice revision handling for repriced orders#7
roncodes merged 2 commits intomainfrom
feature/ledger-invoice-revision-handling

Conversation

@roncodes
Copy link
Copy Markdown
Member

Summary

  • make Ledger revision-aware when orders are repriced through a new purchase rate
  • always create a new invoice for the new pricing revision instead of skipping invoice generation when one already exists
  • update the FleetOps invoice tab to prefer the newest active invoice revision for an order

What Changed

  • replaced the previous one-invoice-per-order guard in the purchase-rate observer
  • voided prior draft invoices before creating the next invoice revision
  • preserved sent and paid invoices as historical accounting records
  • kept invoice creation sourced from the purchase rate event flow
  • updated the order invoice component to fetch recent invoices and select the newest non-void, non-cancelled revision first

Verification

  • php -l server/src/Observers/PurchaseRateObserver.php

Notes

  • this PR is intentionally focused on Ledger revision behavior only
  • style-only lint/prettier cleanup was intentionally left out of scope for this PR

@roncodes roncodes merged commit 952b92e into main Apr 24, 2026
7 checks passed
@roncodes roncodes deleted the feature/ledger-invoice-revision-handling branch April 24, 2026 03:55
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