mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Fixed #14812 - added consumables to individual inventory report
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
de7b8940fe
commit
871255f28c
|
@ -43,7 +43,7 @@ class SendCurrentInventoryToUsers extends Command
|
||||||
|
|
||||||
$count = 0;
|
$count = 0;
|
||||||
foreach ($users as $user) {
|
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++;
|
$count++;
|
||||||
$user->notify((new CurrentInventory($user)));
|
$user->notify((new CurrentInventory($user)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,7 @@ class CurrentInventory extends Notification
|
||||||
'assets' => $this->user->assets,
|
'assets' => $this->user->assets,
|
||||||
'accessories' => $this->user->accessories,
|
'accessories' => $this->user->accessories,
|
||||||
'licenses' => $this->user->licenses,
|
'licenses' => $this->user->licenses,
|
||||||
|
'consumables' => $this->user->consumables,
|
||||||
])
|
])
|
||||||
->subject(trans('mail.inventory_report'));
|
->subject(trans('mail.inventory_report'));
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,19 @@
|
||||||
</table>
|
</table>
|
||||||
@endif
|
@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
|
@endcomponent
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue