Jelajahi Sumber

Dodanie taxpayer do wyniku generowania raportu

Mariusz Muszyński 8 tahun lalu
induk
melakukan
677e98a21f
1 mengubah file dengan 6 tambahan dan 1 penghapusan
  1. 6 1
      SE/se-lib/Route/UrlAction/BiAuditGenerate.php

+ 6 - 1
SE/se-lib/Route/UrlAction/BiAuditGenerate.php

@@ -1827,7 +1827,12 @@ class BiAuditPowiazania {
 
 				if ($refTable = $this->getRefTable('BI_audit_operational_raport_note', $row['REMOTE_TABLE'], false)) {
 					$query = "select `note`.* from `BI_audit_operational_raport_note` `note` join `{$refTable}` `ref` on `note`.`ID` = `ref`.`PRIMARY_KEY` where `ref`.`REMOTE_PRIMARY_KEY` = '{$row['REMOTE_ID']}'";
-					if ($notes = DB::getPDO()->fetchAll($query)) $item_result[$row['REMOTE_TABLE']]['operational_raport_note'] = $notes;
+					if ($notes = DB::getPDO()->fetchAll($query)) $item_result[$row['REMOTE_TABLE']]['BI_audit_operational_raport_note'] = $notes;
+				}
+
+				if ($refTable = $this->getRefTable($row['REMOTE_TABLE'], 'BI_audit_taxpayer', false)) {
+					$query = "select `taxpayer`.* from `{$refTable}` `ref` join `BI_audit_taxpayer` `taxpayer` on `ref`.`REMOTE_PRIMARY_KEY` = `taxpayer`.`ID` where `ref`.`PRIMARY_KEY` = '{$row['REMOTE_ID']}'";
+					if ($taxpayer = DB::getPDO()->fetchFirst($query)) $item_result[$row['REMOTE_TABLE']]['BI_audit_taxpayer'] = $taxpayer;
 				}
 
 				if ($rel) $item_result['relation_from'] = $this->relationName($rel);