<?php
 namespace App\Reports\Sources\BalancesList; class PopulateQuickColumns extends \App\Reports\Sources\PopulateAbstract { public function populate() :void { global $DBTRd_offices, $DBTRd_departments, $DBTRd_users; $_LANG = \App\Loader_Lang::getInstance()->getGlobal(); $reportTable = $this->tableManager->getTableName(); $activeColumns = array_keys( $this->columnsManager->getStdColumns() ); $this->reportGenerationStatusUpdate('extractMainDataFromDb', 'updateBalanceDetails', 0); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $activeColumns); $reportCopyInfo->populateSimple($DBTRd_offices, 'bal_officeName', 'bal_officeId', 'name'); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $activeColumns); $reportCopyInfo->populateSimple($DBTRd_departments, 'bal_deptName', 'bal_deptId', 'name'); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $activeColumns); $reportCopyInfo->populateSimple($DBTRd_users, 'bal_addUserName', 'bal_addUserId', "CONCAT(joinTable.lastName, ' ', joinTable.firstName)"); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $activeColumns); $reportCopyInfo->populateSimple($DBTRd_users, 'bal_confirmUserName', 'bal_confirmUserId', "CONCAT(joinTable.lastName, ' ', joinTable.firstName)"); $reportCopyInfo = new \App\Reports\Db\ManageRecords\Update($reportTable, 'rep', $activeColumns); $reportCopyInfo->addCaseStructureColumn("bal_typeName", "bal_typeCode", (Array)$_LANG['invoiceBalance']['type']); $reportCopyInfo->populate(); $reportCopyInfo = new \App\Reports\Db\ManageRecords\Update($reportTable, 'rep', $activeColumns); $reportCopyInfo->addCaseStructureColumn("bal_statusName", "bal_statusCode", (Array)$_LANG['invoiceBalance']['status']); $reportCopyInfo->populate(); } } 