From d70aa42cc9297e476c75fe14ef86b5e929c2fc0b Mon Sep 17 00:00:00 2001 From: jbirdkerr Date: Fri, 11 Sep 2015 21:48:05 -0500 Subject: [PATCH 1/3] Update checkin-asset.blade.php --- app/views/emails/checkin-asset.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/emails/checkin-asset.blade.php b/app/views/emails/checkin-asset.blade.php index 07b3f01e5c..6b228d8257 100644 --- a/app/views/emails/checkin-asset.blade.php +++ b/app/views/emails/checkin-asset.blade.php @@ -4,7 +4,7 @@

Hello {{{ $first_name }}},

-

The following item has been checkin. +

The following item has been checked in: From fcec12f3b23ca1fec87902448bf94598aec57ea7 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 14 Sep 2015 15:48:42 -0700 Subject: [PATCH 2/3] Allow asset-level EOL to override model level if given --- app/controllers/admin/AssetsController.php | 2 +- app/models/Asset.php | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index 525f73aa82..81f69c87a0 100755 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -967,7 +967,7 @@ class AssetsController extends AdminController public function getDatatable($status = null) { - $assets = Asset::with('model','assigneduser','assigneduser.userloc','assetstatus','defaultLoc','assetlog','model','model.category')->Hardware()->select(array('id', 'name','model_id','assigned_to','asset_tag','serial','status_id','purchase_date','deleted_at','rtd_location_id','notes','order_number','mac_address')); + $assets = Asset::with('model','assigneduser','assigneduser.userloc','assetstatus','defaultLoc','assetlog','model','model.category')->Hardware()->select(array('id', 'name','model_id','assigned_to','asset_tag','serial','status_id','purchase_date','deleted_at','rtd_location_id','notes','order_number','mac_address','warranty_months')); switch ($status) { diff --git a/app/models/Asset.php b/app/models/Asset.php index 4702bf3333..e3af7c8feb 100755 --- a/app/models/Asset.php +++ b/app/models/Asset.php @@ -359,7 +359,14 @@ if (( $this->purchase_date ) && ( $this->model )) { $date = date_create( $this->purchase_date ); - date_add( $date, date_interval_create_from_date_string( $this->model->eol . ' months' ) ); + + // Use the asset-level EOL if one is given + if (($this->warranty_months) && ($this->warranty_months!='0')) { + date_add( $date, date_interval_create_from_date_string( $this->warranty_months . ' months' )); + // If a warranty month period wasn't specified on the asset level, use the model + } else { + date_add( $date, date_interval_create_from_date_string( $this->model->eol . ' months' )); + } return date_format( $date, 'Y-m-d' ); } From 3da5c15249474ce7447f5d0ddfc423b9a94921bd Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 14 Sep 2015 15:48:49 -0700 Subject: [PATCH 3/3] Bumped version --- app/config/version.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/config/version.php b/app/config/version.php index 0254380fb5..1997e1465c 100644 --- a/app/config/version.php +++ b/app/config/version.php @@ -1,5 +1,5 @@ 'v2.0-95', - 'hash_version' => 'v2.0-95-ge05baf1', + 'app_version' => 'v2.0-101', + 'hash_version' => 'v2.0-101-g2c54c93', ); \ No newline at end of file