Small tweaks to table
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
34f8f50a4a
commit
548ae49c69
4 changed files with 11 additions and 5 deletions
|
@ -38,8 +38,10 @@ class TestLocationsFMCS extends Command
|
|||
|
||||
$mismatched = Helper::test_locations_fmcs(true, $location_id);
|
||||
$this->warn(trans_choice('admin/settings/message.location_scoping.mismatch', count($mismatched)));
|
||||
$this->newLine();
|
||||
$this->info('Edit your locations to associate them with the correct company.');
|
||||
|
||||
$header = ['Item Type', 'Item ID', 'Item Company ID', 'Location Company ID'];
|
||||
$header = ['Type', 'Name', 'ID', 'Item Company', 'Company ID', 'Item Location', 'Location Company ID'];
|
||||
sort($mismatched);
|
||||
|
||||
$this->table($header, $mismatched);
|
||||
|
|
|
@ -1597,9 +1597,12 @@ class Helper
|
|||
if ($item && $item->company_id != $location_company) {
|
||||
$mismatched[] = [
|
||||
class_basename(get_class($item)),
|
||||
$item->name,
|
||||
$item->id,
|
||||
$item->company_id,
|
||||
$location_company ?? 'null',
|
||||
$item->company->name ?? null,
|
||||
$item->company_id ?? null,
|
||||
$item->location->name ?? null,
|
||||
$location_company ?? null,
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
@ -327,7 +327,7 @@ class SettingsController extends Controller
|
|||
if ($old_locations_fmcs == '0' && $setting->scope_locations_fmcs == '1') {
|
||||
$mismatched = Helper::test_locations_fmcs(false);
|
||||
if (count($mismatched) != 0) {
|
||||
return redirect()->back()->withInput()->with('error', trans_choice('admin/settings/message.location_scoping.mismatch', count($mismatched)));
|
||||
return redirect()->back()->withInput()->with('error', trans_choice('admin/settings/message.location_scoping.mismatch', count($mismatched)).' '.trans('admin/settings/message.location_scoping.not_saved'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,8 @@ return [
|
|||
],
|
||||
|
||||
'location_scoping' => [
|
||||
'mismatch' => 'There is 1 item in the database that need your attention before you can enable location scoping. Your settings were not saved.| There are :count items in the database that need your attention before you can enable location scoping. Your settings were not saved.',
|
||||
'not_saved' => 'Your settings were not saved.',
|
||||
'mismatch' => 'There is 1 item in the database that need your attention before you can enable location scoping.|There are :count items in the database that need your attention before you can enable location scoping.',
|
||||
],
|
||||
|
||||
];
|
||||
|
|
Loading…
Add table
Reference in a new issue