<?php
require dirname(__DIR__) . '/vendor/autoload.php';
$app = require_once dirname(__DIR__) . '/bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$kernel->bootstrap();

use App\Models\Account;

$accounts = Account::whereNotNull('report_section')->get();
echo "Accounts with report sections:\n";
foreach ($accounts as $a) {
    echo "- Code: {$a->code} | Name: {$a->name} | Section: {$a->report_section} | Category: {$a->category}\n";
}

$others = Account::whereIn('code', ['21211', '4300', '11221'])->get();
echo "\nSpecial accounts:\n";
foreach ($others as $a) {
    echo "- Code: {$a->code} | Name: {$a->name} | Section: " . ($a->report_section ?: 'NULL') . " | Category: {$a->category}\n";
}
