feat(portal): lead module, WHMCS sync report/contacts/mapping, service lifecycle email templates

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
baodev0
2026-10-21 16:55:19 +07:00
co-authored by Claude Sonnet 5.5
parent 3c7710f1de
commit a443ec3bf6
66 changed files with 2032 additions and 124 deletions
@@ -2,14 +2,22 @@
namespace App\Integrations\Whmcs\Extractors;
use App\Integrations\Whmcs\Support\SyncedLegacyIds;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\LazyCollection;
class InvoiceExtractor
{
public function extract(): LazyCollection
public function extract(bool $missingOnly = false): LazyCollection
{
return DB::connection('whmcs')->table('tblinvoices')->orderBy('id')->cursor();
$rows = DB::connection('whmcs')->table('tblinvoices')->orderBy('id')->cursor();
if (! $missingOnly) {
return $rows;
}
$synced = SyncedLegacyIds::of('invoices');
return $rows->reject(fn ($row) => isset($synced[$row->id]));
}
/**