Adam DaleyandClaude Sonnet 5 019f7d4231 Fix cron cleanup leaving order/invoice data inconsistent (#4180)
🐛 Fix cron cleanup leaving order/invoice data inconsistent

onAfterAdminCronRun() removed overdue unpaid invoices with a raw
SQL DELETE, bypassing rmInvoice(). This left client_order.unpaid_
invoice_id pointing at a deleted invoice, orphaned invoice_item
rows, and skipped releasing reserved stock/promo redemptions.

Add InvoiceRepository::findUnpaidOlderThan() and route the cron
cleanup through rmInvoice() for each matching invoice so related
orders, invoice items, and reserved resources stay consistent.

Fixes #4178


Claude-Session: https://claude.ai/code/session_01KdphsdrmmWYBi7mFZK94QQ

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-21 02:02:21 +02:00
2026-08-15 09:07:41 +00:00


FOSSBilling logo

Download button

CI Download Latest License CodeFactor Financial Contributors Crowdin Discord Stand With Ukraine Contributor Covenant

Note

FOSSBilling is under active development and currently considered beta. Expect rough edges and limited support.

FOSSBilling is a free, open-source billing and client management system. It helps online service businesses automate invoicing, payments, and client communication. While it’s popular with web hosting providers, it also works well for software licensing, digital downloads, and subscription services.

Features

  • Billing & Invoicing: automated invoices, reminders, and basic reporting.
  • Client Management: a central place for client data and communication.
  • Extensibility: extension-friendly architecture for integrations and custom features.
  • Payments: support for multiple gateways.
  • Translations: community-powered, multi-language interface.
  • Responsive UI: usable on desktop and mobile.
  • Security-focused: built with security best practices in mind.

Getting Started

Requirements

FOSSBilling runs on standard LAMP/LEMP stacks. For the latest system requirements (PHP version, extensions, database, etc.), see the official requirements.

Installation

Follow the step-by-step Getting Started guide.

Just exploring? Try the public demo.

Contributing

We welcome contributions from the community! We’re actively modernizing the codebase and there’s plenty to do.

If you prefer to start a conversation first, drop by the forum or say hello on Discord.

Star History

Star History Chart

Not a developer? Starring the repository helps others discover the project.

License

FOSSBilling is released under the Apache 2.0 license. See LICENSE for details.

Languages
PHP 77.6%
Twig 19.9%
TypeScript 2.1%
SCSS 0.2%