Record explicit workshop acceptance and preserve subsequent synthetic work without accepting receivables. Keep 080000/070000 unapplied, real workshop grants pending and operational issuance blocks intact. Exclude local credentials and real-data preservation reports.
12 lines
1.1 KiB
PHP
12 lines
1.1 KiB
PHP
<?php
|
|
require __DIR__.'/../vendor/autoload.php';
|
|
$app=require __DIR__.'/../bootstrap/app.php'; $app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
|
\App\Modules\Services\ServiceReceivables::guard();
|
|
$file='C:/laragon/data/sgf-tempo/secrets/browser-fixture.json';
|
|
$f=json_decode(file_get_contents($file),true,32,JSON_THROW_ON_ERROR);
|
|
if(\Illuminate\Support\Facades\DB::table('si_proposals')->exists() || \Illuminate\Support\Facades\DB::table('sr_records')->exists()) throw new RuntimeException('Test fixture must be empty; nothing deleted.');
|
|
$fixture=\Illuminate\Support\Facades\DB::transaction(fn()=>\Tests\Support\ReceivablesFixture::create($f+['manager'=>\App\Models\User::findOrFail($f['manager_id']),'reader'=>\App\Models\User::findOrFail($f['reader_id'])]));
|
|
$ids=array_intersect_key($fixture,array_flip(['client','service','source','draft','profile','temporal','calculation','series','rule','today','start','end','invoice']));
|
|
file_put_contents($file,json_encode($f+['receivables'=>$ids],JSON_THROW_ON_ERROR));
|
|
echo "Receivables fixture ready only in sgf_tempo_test: document 1000.00 MZN; no obligation, receipt or allocation pre-created.\n";
|