Skip to content

Commit

Permalink
Merge branch 'refs/heads/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Nov 20, 2013
2 parents c251222 + 549c0a9 commit 11a6ee5
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 561 deletions.
110 changes: 0 additions & 110 deletions app/controllers/BlogController.php

This file was deleted.

177 changes: 0 additions & 177 deletions app/controllers/admin/BlogsController.php

This file was deleted.

22 changes: 0 additions & 22 deletions app/lang/en/admin/blogs/message.php

This file was deleted.

9 changes: 0 additions & 9 deletions app/lang/en/admin/blogs/table.php

This file was deleted.

24 changes: 24 additions & 0 deletions app/models/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,30 @@ public function adminuser()
return $this->belongsTo('User','id');
}

/**
* Get total assets
*/
public static function assetcount()
{
return DB::table('assets')

->where('physical', '=', '1')
->whereNull('deleted_at','and')
->count();
}

/**
* Get total assets not checked out
*/
public static function availassetcount()
{
return DB::table('assets')
->where('physical', '=', '1')
->where('assigned_to', '=', '0')
->whereNull('deleted_at','and')
->count();

}


}
25 changes: 25 additions & 0 deletions app/models/License.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,30 @@ public function adminuser()
return $this->belongsTo('User','id');
}

/**
* Get total licenses
*/
public static function assetcount()
{
return DB::table('assets')
->where('physical', '=', '0')
->whereNull('deleted_at','and')
->count();
}

/**
* Get total licenses not checked out
*/
public static function availassetcount()
{
return DB::table('assets')
->where('physical', '=', '0')
->where('assigned_to', '=', '0')
->whereNull('deleted_at','and')
->count();

}



}
Loading

0 comments on commit 11a6ee5

Please sign in to comment.