diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php
index 2ebc6616fd..39630dc262 100644
--- a/app/controllers/admin/AssetsController.php
+++ b/app/controllers/admin/AssetsController.php
@@ -117,6 +117,7 @@ class AssetsController extends AdminController {
$asset->notes = e(Input::get('notes'));
$asset->asset_tag = e(Input::get('asset_tag'));
$asset->status_id = e(Input::get('status_id'));
+ $asset->warrantee_months = e(Input::get('warrantee_months'));
$asset->user_id = Sentry::getId();
$asset->physical = '1';
@@ -191,6 +192,7 @@ class AssetsController extends AdminController {
'asset_tag' => 'required|min:3',
'model_id' => 'required',
'serial' => 'required|min:3',
+ 'warrantee_months' => 'integer|min:1',
);
// Create a new validator instance from our validation rules
@@ -213,6 +215,7 @@ class AssetsController extends AdminController {
$asset->order_number = e(Input::get('order_number'));
$asset->asset_tag = e(Input::get('asset_tag'));
$asset->status_id = e(Input::get('status_id'));
+ $asset->warrantee_months = e(Input::get('warrantee_months'));
$asset->notes = e(Input::get('notes'));
$asset->physical = '1';
diff --git a/app/database/migrations/2013_11_25_101308_add_warrantee_to_assets_table.php b/app/database/migrations/2013_11_25_101308_add_warrantee_to_assets_table.php
new file mode 100644
index 0000000000..c99f091162
--- /dev/null
+++ b/app/database/migrations/2013_11_25_101308_add_warrantee_to_assets_table.php
@@ -0,0 +1,35 @@
+integer('warrantee_months')->nullable();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ //
+ Schema::table('assets', function($table)
+ {
+ $table->dropColumn('warrantee_months');
+ });
+ }
+
+}
\ No newline at end of file
diff --git a/app/models/Asset.php b/app/models/Asset.php
index 05657ab632..692159d27e 100644
--- a/app/models/Asset.php
+++ b/app/models/Asset.php
@@ -9,6 +9,7 @@ class Asset extends Elegant {
'asset_tag' => 'required|min:3|unique:assets',
'model_id' => 'required',
'serial' => 'required|min:3',
+ 'warrantee_months' => 'integer|min:1',
);
@@ -104,4 +105,15 @@ class Asset extends Elegant {
}
+ public function warrantee_expires()
+ {
+
+
+ $date = date_create($this->purchase_date);
+ date_add($date, date_interval_create_from_date_string($this->warrantee_months.' months'));
+ return date_format($date, 'Y-m-d');
+
+ }
+
+
}
diff --git a/app/views/backend/assets/edit.blade.php b/app/views/backend/assets/edit.blade.php
index 853565cf9a..544bb50e16 100755
--- a/app/views/backend/assets/edit.blade.php
+++ b/app/views/backend/assets/edit.blade.php
@@ -105,6 +105,15 @@
+
+
+
+
+ months
+ {{ $errors->first('warrantee_months', ':message') }}
+
+
+
diff --git a/app/views/backend/assets/view.blade.php b/app/views/backend/assets/view.blade.php
index cdd83df4a7..1fdd250e7d 100644
--- a/app/views/backend/assets/view.blade.php
+++ b/app/views/backend/assets/view.blade.php
@@ -98,6 +98,25 @@ View Asset {{ $asset->asset_tag }} ::
+
More Info:
+
+
+ @if ($asset->purchase_date)
+ - Purchase Date: {{ $asset->purchase_date }}
+ @endif
+ @if ($asset->purchase_cost)
+ - Purchase Cost: ${{ number_format($asset->purchase_cost) }}
+ @endif
+ @if ($asset->order_number)
+ - Order #: {{ $asset->order_number }}
+ @endif
+ @if ($asset->warrantee_months)
+ - Warrantee: {{ $asset->warrantee_months }} months
+ - Expires: {{ $asset->warrantee_expires() }}
+ @endif
+
+
+
@if ((isset($asset->assigned_to ) && ($asset->assigned_to > 0)))
Checked Out To:
diff --git a/app/views/backend/licenses/index.blade.php b/app/views/backend/licenses/index.blade.php
index 751a22ef33..02d8d1335f 100755
--- a/app/views/backend/licenses/index.blade.php
+++ b/app/views/backend/licenses/index.blade.php
@@ -26,10 +26,7 @@ Licenses ::
| @lang('admin/licenses/table.seats') |
@lang('admin/licenses/table.title') |
@lang('admin/licenses/table.serial') |
- @lang('admin/licenses/table.license_name') |
- @lang('admin/licenses/table.license_email') |
@lang('admin/licenses/table.assigned_to') |
- @lang('admin/licenses/table.checkout') |
@lang('table.actions') |
@@ -42,9 +39,8 @@ Licenses ::
{{ $license->seats }} |
{{ $license->name }} |
{{ $license->serial }} |
- {{ $license->license_name }} |
- {{ $license->license_email }} |
- |
+
+
|
@@ -61,19 +57,6 @@ Licenses ::
|
|
- |
- {{ $license->serial }} |
-
-
- {{ $license->license_name }} |
- {{ $license->license_email }} |
-
- @if ($licensedto->assigned_to)
-
- {{ $licensedto->user->fullName() }}
-
- @endif
- |
@if ($licensedto->assigned_to)
Checkin
@@ -81,8 +64,21 @@ Licenses ::
Checkout
@endif
|
+ {{ $license->serial }} |
+
+
+
+ @if ($licensedto->assigned_to)
+
+ {{ $licensedto->user->fullName() }}
+
+ @endif
|
+ |
+
+
+
@endforeach
@endif
diff --git a/app/views/backend/licenses/view.blade.php b/app/views/backend/licenses/view.blade.php
index 9bb513dd89..d6a776607a 100644
--- a/app/views/backend/licenses/view.blade.php
+++ b/app/views/backend/licenses/view.blade.php
@@ -154,6 +154,15 @@ View License {{ $license->name }} ::
@if ($license->purchase_date)
- Purchase Date: {{ $license->purchase_date }}
@endif
+ @if ($license->purchase_cost)
+ - Purchase Cost: ${{ number_format($license->purchase_cost) }}
+ @endif
+ @if ($license->order_number)
+ - Order #: {{ $license->order_number }}
+ @endif
+ @if ($license->seats)
+ - Seats: {{ $license->seats }}
+ @endif
diff --git a/public/assets/css/compiled/elements.css b/public/assets/css/compiled/elements.css
index 6cbb7d5327..f0c9302074 100644
--- a/public/assets/css/compiled/elements.css
+++ b/public/assets/css/compiled/elements.css
@@ -93,7 +93,7 @@
.btn-flat {
display: inline-block;
margin: 0;
- line-height: 15px;
+ line-height: 11px;
vertical-align: middle;
font-size: 12px;
text-shadow: none;