Files
SGF/scripts/sgf-stock-inactive-preservation.php
2026-11-11 09:00:17 +02:00

5 lines
780 B
PHP

<?php
$book='8085';require __DIR__.'/sgf-single-bootstrap.php';$pointer=json_decode(file_get_contents($s['root'].'/stock-inactive-installation-pointer.json'),true);$before=json_decode(file_get_contents($pointer['proof']),true);$checks=[];
foreach($before['native_baseline']as$table=>$hash){if(hash('sha256',$native->table($table)->orderBy('id')->get()->toJson())!==$hash)throw new LogicException('Changed selected table: '.$table);$checks[$table]='identical';}
file_put_contents($work.'/stock-inactive-preservation.json',json_encode(['passed'=>true,'checks'=>$checks,'journals'=>$native->table('gl_journals')->count(),'business_commands'=>0,'cache_cleared'=>false],JSON_PRETTY_PRINT));echo json_encode(['passed'=>true,'proof'=>$work.'/stock-inactive-preservation.json']).PHP_EOL;