Files

27 lines
742 B
PHP
Raw Permalink Normal View History

<?php
namespace App\Console\Commands;
use App\Services\GoldCreditService;
use Illuminate\Console\Command;
class ProcessGoldCreditOverdue extends Command
{
protected $signature = 'gold-credit:process-overdue';
protected $description = 'SMS هشدار سررسید اقساط اعتبار طلایی و اعمال جریمه روزانه پس از مهلت';
public function handle(GoldCreditService $service): int
{
$result = $service->processOverdueInstallments();
$this->info(sprintf(
'warnings=%d penalties=%d reminders=%d',
$result['warnings'] ?? 0,
$result['penalties'] ?? 0,
$result['reminders'] ?? 0
));
return self::SUCCESS;
}
}