mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-09-05 06:41:02 +00:00
feat(payments): add payments:restore-legacy-links
Walks the transitional link table and re-applies preserved draft-invoice credit through the allocation service once an invoice leaves DRAFT, deleting each link as it is restored. Mismatched links are reported and never auto-applied. Supports --dry-run.
This commit is contained in:
@@ -7,6 +7,7 @@ use App\Adapters\Receivables\MoneyPaymentExchangeRateRecorder;
|
||||
use App\Adapters\Receivables\SalesInvoiceBalanceUpdater;
|
||||
use App\Adapters\Receivables\SalesPaymentNumberAssigner;
|
||||
use App\Domains\Receivables\Application\PaymentService;
|
||||
use App\Domains\Receivables\Console\RestoreLegacyPaymentLinks;
|
||||
use App\Domains\Receivables\Contracts\InvoiceBalanceUpdater;
|
||||
use App\Domains\Receivables\Contracts\PaymentEmailSender;
|
||||
use App\Domains\Receivables\Contracts\PaymentExchangeRateRecorder;
|
||||
@@ -32,6 +33,10 @@ class ReceivablesServiceProvider extends ServiceProvider
|
||||
|
||||
public function boot(): void
|
||||
{
|
||||
$this->commands([
|
||||
RestoreLegacyPaymentLinks::class,
|
||||
]);
|
||||
|
||||
Gate::policy(Payment::class, PaymentPolicy::class);
|
||||
Gate::policy(PaymentMethod::class, PaymentMethodPolicy::class);
|
||||
$abilities = [
|
||||
|
||||
Reference in New Issue
Block a user