mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Merge pull request #14832 from snipe/fixes/added_consumables_to_inventory_email
Fixed #14812 - added consumables to individual inventory report
This commit is contained in:
commit
e19d2d6ec9
|
@ -43,7 +43,7 @@ class SendCurrentInventoryToUsers extends Command
|
|||
|
||||
$count = 0;
|
||||
foreach ($users as $user) {
|
||||
if (($user->assets->count() > 0) || ($user->accessories->count() > 0) || ($user->licenses->count() > 0)) {
|
||||
if (($user->assets->count() > 0) || ($user->accessories->count() > 0) || ($user->licenses->count() > 0) || ($user->consumables->count() > 0)) {
|
||||
$count++;
|
||||
$user->notify((new CurrentInventory($user)));
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ class CurrentInventory extends Notification
|
|||
'assets' => $this->user->assets,
|
||||
'accessories' => $this->user->accessories,
|
||||
'licenses' => $this->user->licenses,
|
||||
'consumables' => $this->user->consumables,
|
||||
])
|
||||
->subject(trans('mail.inventory_report'));
|
||||
|
||||
|
|
|
@ -56,6 +56,19 @@
|
|||
</table>
|
||||
@endif
|
||||
|
||||
@if ($consumables->count() > 0)
|
||||
## {{ $consumables->count() }} {{ trans('general.consumables') }}
|
||||
|
||||
<table width="100%">
|
||||
<tr><th align="left">{{ trans('mail.name') }} </th> <th></th> </tr>
|
||||
@foreach($consumables as $consumable)
|
||||
<tr>
|
||||
<td>{{ $consumable->name }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@endif
|
||||
|
||||
|
||||
@endcomponent
|
||||
|
||||
|
|
Loading…
Reference in a new issue