<?php
 namespace App\Reports\Sources\DocsList; class PopulateQuickColumns extends \App\Reports\Sources\PopulateAbstract { public function populate() :void { global $DBTRd_docTemplates, $DBTRd_docSeries, $DBTRd_autoProcessRules, $DBTRd_offices, $DBTRd_departments; $_LANG = \App\Loader_Lang::getInstance()->getGlobal(); $reportTable = $this->tableManager->getTableName(); $activeColumns = array_keys( $this->columnsManager->getStdColumns() ); $this->reportGenerationStatusUpdate('extractMainDataFromDb', 'updateDocumentDetails', 0); $docNames = []; foreach (\App\Config\IssueDocuments::getInstance()->getAll() as $docType=>$docDetails) { $docNames[$docType] = $docDetails['name']; } $reportCopyInfo = new \App\Reports\Db\ManageRecords\Update($reportTable, 'rep', $activeColumns); $reportCopyInfo->addCaseStructureColumn("doc_typeName", "doc_typeCode", $docNames); $reportCopyInfo->populate(); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $activeColumns); $reportCopyInfo->populateSimple($DBTRd_docTemplates, 'doc_templateName', 'doc_idTemplate', 'name'); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $activeColumns); $reportCopyInfo->populateSimple($DBTRd_docSeries, 'doc_seriesCode', 'doc_idSeries', 'code'); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $activeColumns); $reportCopyInfo->populateSimple($DBTRd_autoProcessRules, 'doc_autoProcessRuleName', 'doc_idAutoProcessRule', 'name'); $reportCopyInfo = new \App\Reports\Db\ManageRecords\Update($reportTable, 'rep', $activeColumns); $reportCopyInfo->addCaseStructureColumn("pivot_name", "pivot_code", (Array)$_LANG['documentPivotName']); $reportCopyInfo->populate(); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $activeColumns); $reportCopyInfo->populateSimple($DBTRd_offices, 'doc_addUserOffName', 'doc_addUserOffId', "name"); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $activeColumns); $reportCopyInfo->populateSimple($DBTRd_departments, 'doc_addUserDeptName', 'doc_addUserDeptId', "name"); } } 