More fields visible
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
548ae49c69
commit
ea365e5645
2 changed files with 9 additions and 6 deletions
|
@ -41,7 +41,7 @@ class TestLocationsFMCS extends Command
|
|||
$this->newLine();
|
||||
$this->info('Edit your locations to associate them with the correct company.');
|
||||
|
||||
$header = ['Type', 'Name', 'ID', 'Item Company', 'Company ID', 'Item Location', 'Location Company ID'];
|
||||
$header = ['ID', 'Type', 'Name', 'Checkout Type', 'Company ID', 'Item Company','Item Location', 'Location Company', 'Location Company ID'];
|
||||
sort($mismatched);
|
||||
|
||||
$this->table($header, $mismatched);
|
||||
|
|
|
@ -1556,14 +1556,14 @@ class Helper
|
|||
}
|
||||
|
||||
foreach($locations as $location) {
|
||||
// in case of an update of a single location use the newly requested company_id
|
||||
// in case of an update of a single location, use the newly requested company_id
|
||||
if ($new_company_id) {
|
||||
$location_company = $new_company_id;
|
||||
} else {
|
||||
$location_company = $location->company_id;
|
||||
}
|
||||
|
||||
// depending on the relationship, we must use different operations to retrieve the objects
|
||||
// Depending on the relationship, we must use different operations to retrieve the objects
|
||||
$keywords_relation = [
|
||||
'many' => [
|
||||
'accessories',
|
||||
|
@ -1594,14 +1594,17 @@ class Helper
|
|||
}
|
||||
|
||||
foreach ($items as $item) {
|
||||
|
||||
if ($item && $item->company_id != $location_company) {
|
||||
$mismatched[] = [
|
||||
class_basename(get_class($item)),
|
||||
$item->name,
|
||||
$item->id,
|
||||
$item->company->name ?? null,
|
||||
class_basename(get_class($item)),
|
||||
$item->name ?? $item->asset_tag ?? $item->serial ?? $item->username,
|
||||
str_replace('App\\Models\\', '', $item->assigned_type) ?? null,
|
||||
$item->company_id ?? null,
|
||||
$item->company->name ?? null,
|
||||
$item->location->name ?? null,
|
||||
$item->location->company->name ?? null,
|
||||
$location_company ?? null,
|
||||
];
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue