mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
Merge branch 'hotfixes/order_number_numeric' into develop
This commit is contained in:
commit
b839741069
|
@ -628,15 +628,13 @@ class ReportsController extends Controller
|
||||||
$row[] = '';
|
$row[] = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e(Input::get('location')) == '1') {
|
if (e(Input::get('location')) == '1') {
|
||||||
$show_loc = '';
|
$show_loc = '';
|
||||||
if (( $asset->assigned_to > 0 ) && ( $asset->assigneduser->location_id !='' )) {
|
|
||||||
$location = Location::find($asset->assigneduser->location_id);
|
|
||||||
if ($location) {
|
if (($asset->assigned_to > 0) && ($asset->assigneduser) && ($asset->assigneduser->location)) {
|
||||||
$show_loc .= '"' .e($location->name). '"';
|
$show_loc .= '"' .e($asset->assigneduser->location->name). '"';
|
||||||
} else {
|
|
||||||
$show_loc .= 'User location '.$asset->assigneduser->location_id.' is invalid';
|
|
||||||
}
|
|
||||||
} elseif ($asset->rtd_location_id!='') {
|
} elseif ($asset->rtd_location_id!='') {
|
||||||
$location = Location::find($asset->rtd_location_id);
|
$location = Location::find($asset->rtd_location_id);
|
||||||
if ($location) {
|
if ($location) {
|
||||||
|
@ -649,19 +647,19 @@ class ReportsController extends Controller
|
||||||
$row[] = $show_loc;
|
$row[] = $show_loc;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (e(Input::get('assigned_to')) == '1') {
|
if (e(Input::get('assigned_to')) == '1') {
|
||||||
if ($asset->assigned_to > 0) {
|
if ($asset->assigneduser) {
|
||||||
$user = User::find($asset->assigned_to);
|
$row[] = '"' .e($asset->assigneduser->fullName()). '"';
|
||||||
$row[] = '"' .e($user->fullName()). '"';
|
|
||||||
} else {
|
} else {
|
||||||
$row[] = ''; // Empty string if unassigned
|
$row[] = ''; // Empty string if unassigned
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e(Input::get('username')) == '1') {
|
if (e(Input::get('username')) == '1') {
|
||||||
if ($asset->assigned_to > 0) {
|
if ($asset->assigneduser) {
|
||||||
$user = User::find($asset->assigned_to);
|
$row[] = '"' .e($asset->assigneduser->username). '"';
|
||||||
$row[] = '"' .e($user->username). '"';
|
|
||||||
} else {
|
} else {
|
||||||
$row[] = ''; // Empty string if unassigned
|
$row[] = ''; // Empty string if unassigned
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class FixOrderNumberInComponentsToString extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('components', function ($table) {
|
||||||
|
$table->string('order_number')->nullable()->default(null)->change();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('components', function ($table) {
|
||||||
|
$table->integer('order_number')->nullable()->default(null)->change();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue