mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-11 08:04:09 -08:00
Merge branch 'develop'
This commit is contained in:
commit
aedabb0920
|
@ -543,8 +543,8 @@ class ReportsController extends Controller
|
||||||
|
|
||||||
|
|
||||||
if (e(Input::get('assigned_to')) == '1') {
|
if (e(Input::get('assigned_to')) == '1') {
|
||||||
if ($asset->assignedTo) {
|
if ($asset->assignedto) {
|
||||||
$row[] = '"' .e($asset->assignedTo->present()->name()). '"';
|
$row[] = '"' .e($asset->assignedto->present()->name()). '"';
|
||||||
} else {
|
} else {
|
||||||
$row[] = ''; // Empty string if unassigned
|
$row[] = ''; // Empty string if unassigned
|
||||||
}
|
}
|
||||||
|
@ -553,7 +553,7 @@ class ReportsController extends Controller
|
||||||
if (e(Input::get('username')) == '1') {
|
if (e(Input::get('username')) == '1') {
|
||||||
// Only works if we're checked out to a user, not anything else.
|
// Only works if we're checked out to a user, not anything else.
|
||||||
if ($asset->checkedOutToUser()) {
|
if ($asset->checkedOutToUser()) {
|
||||||
$row[] = '"' .e($asset->assignedTo->username). '"';
|
$row[] = '"' .e($asset->assignedto->username). '"';
|
||||||
} else {
|
} else {
|
||||||
$row[] = ''; // Empty string if unassigned
|
$row[] = ''; // Empty string if unassigned
|
||||||
}
|
}
|
||||||
|
@ -562,7 +562,7 @@ class ReportsController extends Controller
|
||||||
if (e(Input::get('employee_num')) == '1') {
|
if (e(Input::get('employee_num')) == '1') {
|
||||||
// Only works if we're checked out to a user, not anything else.
|
// Only works if we're checked out to a user, not anything else.
|
||||||
if ($asset->checkedOutToUser()) {
|
if ($asset->checkedOutToUser()) {
|
||||||
$row[] = '"' .e($asset->assignedTo->employee_num). '"';
|
$row[] = '"' .e($asset->assignedto->employee_num). '"';
|
||||||
} else {
|
} else {
|
||||||
$row[] = ''; // Empty string if unassigned
|
$row[] = ''; // Empty string if unassigned
|
||||||
}
|
}
|
||||||
|
|
|
@ -478,7 +478,7 @@ EOT;
|
||||||
|
|
||||||
$updatedCSV = <<<'EOT'
|
$updatedCSV = <<<'EOT'
|
||||||
Item name,serial number,manufacturer,purchase date,purchase cost,purchase order,order number,Licensed To Name,Licensed to Email,expiration date,maintained,reassignable,seats,company,supplier,notes
|
Item name,serial number,manufacturer,purchase date,purchase cost,purchase order,order number,Licensed To Name,Licensed to Email,expiration date,maintained,reassignable,seats,company,supplier,notes
|
||||||
Argentum Malachite Athletes Foot Relief,7435753-467734,"Beer, Leannon and Lubowitz",05/15/2019,$1865.34,63 ar,18334,A Legend,Legendary@gov.uk,04/27/2016,yes,true,64,"Haag, Schmidt and Farrell","Hegmann, Mohr and Cremin",Sed ante. Vivamus tortor. Duis mattis egestas metus.
|
Argentum Malachite Athletes Foot Relief,1aa5b0eb-79c5-40b2-8943-5472a6893c3c,"Beer, Leannon and Lubowitz",05/15/2019,$1865.34,63 ar,18334,A Legend,Legendary@gov.uk,04/27/2016,yes,true,64,"Haag, Schmidt and Farrell","Hegmann, Mohr and Cremin",Sed ante. Vivamus tortor. Duis mattis egestas metus.
|
||||||
EOT;
|
EOT;
|
||||||
$importer = new LicenseImporter($updatedCSV);
|
$importer = new LicenseImporter($updatedCSV);
|
||||||
$importer->setUserId(1)
|
$importer->setUserId(1)
|
||||||
|
@ -501,7 +501,7 @@ EOT;
|
||||||
'purchase_cost' => 1865.34,
|
'purchase_cost' => 1865.34,
|
||||||
'purchase_order' => "63 ar",
|
'purchase_order' => "63 ar",
|
||||||
'reassignable' => 1,
|
'reassignable' => 1,
|
||||||
'serial' => '7435753-467734',
|
'serial' => '1aa5b0eb-79c5-40b2-8943-5472a6893c3c',
|
||||||
]);
|
]);
|
||||||
// License seats are soft deleted
|
// License seats are soft deleted
|
||||||
$this->tester->seeNumRecords(64, 'license_seats', ['deleted_at' => null]);
|
$this->tester->seeNumRecords(64, 'license_seats', ['deleted_at' => null]);
|
||||||
|
|
Loading…
Reference in a new issue