|
@@ -3714,8 +3714,9 @@ class BiAuditPowiazania {
|
|
|
|
|
|
|
|
if ($refTable = BiAuditRefTables::getRefTable('BI_audit_operational_raport_note', $row['REMOTE_TABLE'], false)) {
|
|
if ($refTable = BiAuditRefTables::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']}'";
|
|
$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']]['BI_audit_operational_raport_note'] = array_merge(['@attributes' => ['fid' => "BI_audit_operational_raport_note.{$notes['ID']}"]], $notes);
|
|
|
|
|
|
|
+ $notes = DB::getPDO()->fetchAll($query);
|
|
|
|
|
+ foreach ($notes as $note {
|
|
|
|
|
+ $item_result[$row['REMOTE_TABLE']]['BI_audit_operational_raport_note'] = array_merge(['@attributes' => ['fid' => "BI_audit_operational_raport_note.{$note['ID']}"]], $note);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|