<?php
 refreshReportStatus('extractMainDataFromDb', 'updateDocumentDetails', 0); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $availableTableColumns); $reportCopyInfo->populateSimple($DBTRd_docSeries, 'doc_seriesCode', 'doc_seriesId', 'code'); $reportCopyInfo = new \App\Reports\Db\ManageRecords\Update($reportTable, 'rep', $availableTableColumns); $reportCopyInfo->addCaseStructureColumn("doc_typeName", "doc_typeCode", \App\Config\PaymentDocuments::getInstance()->getList()); $reportCopyInfo->populate(); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $availableTableColumns); $reportCopyInfo->populateSimple($DBTRd_users, 'doc_respUserName', 'doc_respUserId', "CONCAT(joinTable.lastName, ' ', joinTable.firstName)"); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $availableTableColumns); $reportCopyInfo->populateSimple($DBTRd_offices, 'doc_respOfficeName', 'doc_respOfficeId', 'name'); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $availableTableColumns); $reportCopyInfo->populateSimple($DBTRd_departments, 'doc_respDepartmentName', 'doc_respDepartmentId', 'name'); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $availableTableColumns); $reportCopyInfo->populateSimple($DBTRd_users, 'doc_addUserName', 'doc_addUserId', "CONCAT(joinTable.lastName, ' ', joinTable.firstName)"); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $availableTableColumns); $reportCopyInfo->populateSimple($DBTRd_users, 'doc_updateUserName', 'doc_updateUserId', "CONCAT(joinTable.lastName, ' ', joinTable.firstName)"); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $availableTableColumns); $reportCopyInfo->populateSimple($DBTRd_users, 'doc_blockUserName', 'doc_blockUserId', "CONCAT(joinTable.lastName, ' ', joinTable.firstName)"); $reportCopyInfo = new \App\Reports\Db\ManageRecords\Update($reportTable, 'rep', $availableTableColumns); $reportCopyInfo->addJoinTable($DBTRd_agencyBankAccounts, 'bankAcc', 'rep.doc_bankAccountId=bankAcc.id', 'LEFT'); $reportCopyInfo->addJoinTable($DBTRd_banks, 'bank', 'bankAcc.idBank=bank.id', 'LEFT'); $reportCopyInfo->setStructureColumns([ 'doc_bankAccount' => 'bankAcc.account', 'doc_bankId' => 'bankAcc.idBank', 'doc_bankName' => 'bank.nameStd', ]); $reportCopyInfo->populate(); refreshReportStatus('extractMainDataFromDb', 'updateImpDocumentDetails', 0); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $availableTableColumns); $reportCopyInfo->populateSimple($DBTRd_importedDocSystems, 'impDoc_externalSystemName', 'impDoc_externalSystemId', 'name'); $reportCopyInfo = new \App\Reports\Db\ManageRecords\Update($reportTable, 'rep', $availableTableColumns); $reportCopyInfo->addCaseStructureColumn("impDoc_processStatusName", "impDoc_processStatusCode", (Array)$_LANG['importedDocuments']['statusName']); $reportCopyInfo->populate(); refreshReportStatus('extractMainDataFromDb', 'updateInvoiceDetails', 0); $reportCopyInfo = new \App\Reports\Db\ManageRecords\Update($reportTable, 'rep', $availableTableColumns); $reportCopyInfo->addCaseStructureColumn("inv_statusOpName", "inv_statusOpCode", (Array)$_LANG['supplierInvoices']['statusOp']); $reportCopyInfo->populate(); $reportCopyInfo = new \App\Reports\Db\ManageRecords\Update($reportTable, 'rep', $availableTableColumns); $reportCopyInfo->addCaseStructureColumn("inv_statusFinName", "inv_statusFinCode", (Array)$_LANG['supplierInvoices']['statusFin']); $reportCopyInfo->populate(); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $availableTableColumns); $reportCopyInfo->populateSimple($DBTRd_users, 'inv_userName', 'inv_userId', "CONCAT(joinTable.lastName, ' ', joinTable.firstName)"); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $availableTableColumns); $reportCopyInfo->populateSimple($DBTRd_offices, 'inv_officeName', 'inv_officeId', 'name'); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $availableTableColumns); $reportCopyInfo->populateSimple($DBTRd_users, 'inv_addUserName', 'inv_addUserId', "CONCAT(joinTable.lastName, ' ', joinTable.firstName)"); $reportCopyInfo = new \App\Reports\Db\ManageRecords\UpdateSimple($reportTable, $availableTableColumns); $reportCopyInfo->populateSimple($DBTRd_users, 'inv_blockUserName', 'inv_blockUserId', "CONCAT(joinTable.lastName, ' ', joinTable.firstName)"); $reportCopyInfo = new \App\Reports\Db\ManageRecords\Update($reportTable, 'rep', $availableTableColumns); $reportCopyInfo->addJoinTable($DBTRd_suppliers, 'supp', 'rep.inv_supplierId=supp.id', 'INNER'); $reportCopyInfo->setStructureColumns([ 'inv_supplierName' => 'supp.alias', 'inv_supplierRegNo' => 'supp.regNo', 'inv_supplierFiscalCode' => 'supp.fiscalCode', ]); $reportCopyInfo->populate(); 