Fixes for check data

This commit is contained in:
David Bomba 2023-09-06 09:10:59 +10:00
parent 25739a912e
commit 50b6e14782

View File

@ -862,7 +862,7 @@ class CheckData extends Command
} }
$records = DB::table($table) $records = DB::table($table)
->join($tableName, "{$tableName}.id", '=', "{$table}.{$field}_id") ->join($tableName, "{$tableName}.id", '=', "{$table}.{$field}_id")
->where("{$table}.{$company_id}", '!=', "{$tableName}.company_id") ->whereRaw("{$table}.{$company_id} != {$tableName}.company_id")
->get(["{$table}.id"]); ->get(["{$table}.id"]);
if ($records->count()) { if ($records->count()) {