Preserva B1 aceite de confirmacao interna sem validade fiscal

This commit is contained in:
2026-10-25 22:22:41 +02:00
parent ca13acb74e
commit 8fcd52c31d
26 changed files with 724 additions and 10 deletions
+10
View File
@@ -0,0 +1,10 @@
<?php
require __DIR__.'/../vendor/autoload.php';
$app = require __DIR__.'/../bootstrap/app.php';
$app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap();
if (! \App\Modules\Identity\Services\LocalDatabaseGuard::allows()) { throw new RuntimeException('Own local development database required.'); }
$counts = [];
foreach (['users','tenants','companies','units','permission_grants','a_clients','a_services','a_service_drafts','a_billing_drafts','b_internal_confirmations'] as $table) { $counts[$table] = \Illuminate\Support\Facades\DB::table($table)->count(); }
$grants = \Illuminate\Support\Facades\DB::table('permission_grants')->where('permission', \App\Modules\Services\InternalConfirmation::PERMISSION)->get(['user_id','tenant_id','company_id','unit_id','permission']);
echo json_encode(['database' => 'sgf_tempo_dev', 'role' => 'sgf_dev_app', 'counts' => $counts, 'b1_grants' => $grants], JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE).PHP_EOL;