3 lines
1.6 KiB
PHP
3 lines
1.6 KiB
PHP
<?php
|
|
$book='8085';require __DIR__.'/sgf-assets-proof-bootstrap.php';config(['multiline_invoices.enabled'=>true,'multiline_invoices.schema_sha256'=>hash_file('sha256',$repo.'/database/sql/multiline_invoices.sql'),'multiline_invoices.draft_schema_sha256'=>hash_file('sha256',$repo.'/database/sql/multiline_invoice_drafts.sql')]);config(['sales_ledger.synthetic_enabled'=>true,'cost_ledger.synthetic_enabled'=>true,'industrial_ledger.synthetic_enabled'=>true,'cost_ledger.correction_enabled'=>true,'industrial_ledger.correction_enabled'=>true,'cash_qa.enabled'=>true,'cash_qa.binding_sha256'=>hash_file('sha256',$s['root'].'/cash-binding.json')]);try{$out=$call('read_only','view',function($e){$method=new ReflectionMethod($e,'periodSnapshot');return$method->invoke($e,'QA-2026-INTEGRADO');});}catch(Throwable $e){echo json_encode(['error'=>get_class($e),'file'=>$e->getFile(),'line'=>$e->getLine(),'trace'=>array_map(fn($t)=>array_intersect_key($t,array_flip(['file','line','class','function'])),array_slice($e->getTrace(),0,9))]);exit(1);}file_put_contents($work.'/assets-current-period-private.json',json_encode($out));$pending=$out['pending']??$out['pending_facts']??null;$balanced=(string)$out['debit_minor']===(string)$out['credit_minor'];if($pending!==0||!$balanced)throw new LogicException('Current period not reconciled');file_put_contents($work.'/multiline-current-period.json',json_encode(['passed'=>true,'facts'=>$out['facts'],'pending'=>$pending,'balanced'=>$balanced,'read_only'=>true]));echo json_encode(['passed'=>true,'pending'=>$pending,'facts'=>$out['facts'],'balanced'=>$balanced,'proof'=>$work.'/multiline-current-period.json']).PHP_EOL;
|