Fix: No Notifications for checking out Consumables (#5898)

* Adds a method to consumables to check if a notification should be sent

Adds the checkin_email method to Consumables, this gets checked in notifications when checking out the consumable.

Without the method, no notifications get sent for checking out consumables.

* Fixes the checkin_email method on the License model

This should allow the License to also send checkout/checkin notifications again.
This commit is contained in:
Till Deeke 2018-07-20 22:22:49 +02:00 committed by snipe
parent 9677115055
commit b6e3715cd8
2 changed files with 5 additions and 1 deletions

View file

@ -156,6 +156,10 @@ class Consumable extends SnipeModel
return $this->belongsToMany('\App\Models\User', 'consumables_users', 'consumable_id', 'assigned_to')->count();
}
public function checkin_email()
{
return $this->category->checkin_email;
}
public function requireAcceptance()
{

View file

@ -228,7 +228,7 @@ class License extends Depreciable
public function checkin_email()
{
return $this->model->category->checkin_email;
return $this->category->checkin_email;
}
public function requireAcceptance()