mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
61ced0b221
|
@ -106,7 +106,7 @@ class Asset extends Depreciable
|
||||||
'last_checkout' => 'nullable|date_format:Y-m-d H:i:s',
|
'last_checkout' => 'nullable|date_format:Y-m-d H:i:s',
|
||||||
'last_checkin' => 'nullable|date_format:Y-m-d H:i:s',
|
'last_checkin' => 'nullable|date_format:Y-m-d H:i:s',
|
||||||
'expected_checkin' => 'nullable|date',
|
'expected_checkin' => 'nullable|date',
|
||||||
'last_audit_date' => 'nullable',
|
'last_audit_date' => 'nullable|date_format:Y-m-d H:i:s',
|
||||||
// 'next_audit_date' => 'nullable|date|after:last_audit_date',
|
// 'next_audit_date' => 'nullable|date|after:last_audit_date',
|
||||||
'next_audit_date' => 'nullable|date',
|
'next_audit_date' => 'nullable|date',
|
||||||
'location_id' => 'nullable|exists:locations,id',
|
'location_id' => 'nullable|exists:locations,id',
|
||||||
|
@ -153,7 +153,7 @@ class Asset extends Depreciable
|
||||||
'expected_checkin',
|
'expected_checkin',
|
||||||
'byod',
|
'byod',
|
||||||
'asset_eol_date',
|
'asset_eol_date',
|
||||||
'eol_explicit',
|
'eol_explicit',
|
||||||
'last_audit_date',
|
'last_audit_date',
|
||||||
'next_audit_date',
|
'next_audit_date',
|
||||||
'asset_eol_date',
|
'asset_eol_date',
|
||||||
|
@ -165,21 +165,21 @@ class Asset extends Depreciable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that should be included when searching the model.
|
* The attributes that should be included when searching the model.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $searchableAttributes = [
|
protected $searchableAttributes = [
|
||||||
'name',
|
'name',
|
||||||
'asset_tag',
|
'asset_tag',
|
||||||
'serial',
|
'serial',
|
||||||
'order_number',
|
'order_number',
|
||||||
'purchase_cost',
|
'purchase_cost',
|
||||||
'notes',
|
'notes',
|
||||||
'created_at',
|
'created_at',
|
||||||
'updated_at',
|
'updated_at',
|
||||||
'purchase_date',
|
'purchase_date',
|
||||||
'expected_checkin',
|
'expected_checkin',
|
||||||
'next_audit_date',
|
'next_audit_date',
|
||||||
'last_audit_date',
|
'last_audit_date',
|
||||||
'last_checkin',
|
'last_checkin',
|
||||||
'last_checkout',
|
'last_checkout',
|
||||||
|
@ -188,7 +188,7 @@ class Asset extends Depreciable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The relations and their attributes that should be included when searching the model.
|
* The relations and their attributes that should be included when searching the model.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $searchableRelations = [
|
protected $searchableRelations = [
|
||||||
|
@ -301,7 +301,7 @@ class Asset extends Depreciable
|
||||||
|
|
||||||
// The asset status is not archived and is deployable
|
// The asset status is not archived and is deployable
|
||||||
if (($this->assetstatus) && ($this->assetstatus->archived == '0')
|
if (($this->assetstatus) && ($this->assetstatus->archived == '0')
|
||||||
&& ($this->assetstatus->deployable == '1'))
|
&& ($this->assetstatus->deployable == '1'))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -858,11 +858,11 @@ class Asset extends Depreciable
|
||||||
foreach ($assets as $asset) {
|
foreach ($assets as $asset) {
|
||||||
$results = preg_match("/\d+$/", $asset['asset_tag'], $matches);
|
$results = preg_match("/\d+$/", $asset['asset_tag'], $matches);
|
||||||
|
|
||||||
if ($results)
|
if ($results)
|
||||||
{
|
{
|
||||||
$number = $matches[0];
|
$number = $matches[0];
|
||||||
|
|
||||||
if ($number > $max)
|
if ($number > $max)
|
||||||
{
|
{
|
||||||
$max = $number;
|
$max = $number;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue