mustRun(); $baseline=[];foreach(['stock_movements','stock_items','warehouses','gl_journals']as$table)$baseline[$table]=hash('sha256',$native->table($table)->orderBy('id')->get()->toJson()); $hashes=[];$copy=function($source,$file)use($s,$work,&$hashes){$target=$s['app'].'/'.$file;$backup=$work.'/before/'.$file;if(is_file($target)){if(!is_dir(dirname($backup)))mkdir(dirname($backup),0700,true);copy($target,$backup);}if(!is_dir(dirname($target)))mkdir(dirname($target),0700,true);copy($source,$target);$hashes[$file]=hash_file('sha256',$target);}; foreach($files as$file)$copy($repo.'/'.$file,$file);$c=require $s['app'].'/config/receipt_qa.php';$c['stock_inactive_enabled']=true;$config=$work.'/receipt_qa.php';file_put_contents($config,"true,'hashes'=>$hashes,'native_baseline'=>$baseline,'new_rights'=>0,'business_commands'=>0,'new_demo'=>false,'cache_cleared'=>false],JSON_PRETTY_PRINT));file_put_contents($s['root'].'/stock-inactive-installation-pointer.json',json_encode(['proof'=>$work.'/stock-inactive-installation.json']));echo json_encode(['passed'=>true,'proof'=>$work.'/stock-inactive-installation.json']).PHP_EOL;