feat(billing): renewals, coupons, VAT numbering, billing cycles and invoice payment tracking
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
ea9a53f742
commit
25f23d541e
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Services\ServiceExpiryReconciler;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class ReconcileServiceExpiry extends Command
|
||||
{
|
||||
protected $signature = 'service:reconcile-expiry {--dry-run : Chỉ thống kê, không ghi dữ liệu}';
|
||||
protected $description = 'Đồng bộ module_vmware.next_due_date theo services.expires_at (nguồn hạn dùng duy nhất)';
|
||||
|
||||
public function handle(ServiceExpiryReconciler $reconciler): int
|
||||
{
|
||||
$dryRun = (bool) $this->option('dry-run');
|
||||
$stats = $reconciler->run($dryRun);
|
||||
|
||||
$this->info(sprintf(
|
||||
'service:reconcile-expiry%s | lệch module_vmware: %d | service thiếu expires_at được bù: %d | VM không gắn dịch vụ: %d',
|
||||
$dryRun ? ' (dry-run)' : '',
|
||||
$stats['synced_vmware'],
|
||||
$stats['backfilled_services'],
|
||||
$stats['orphan_vms'],
|
||||
));
|
||||
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user