Merge pull request #10901 from veenone/fix/invalid_consumable_date_in_user_view

Fixes #10898 (invalid consumable date time info in user view)
This commit is contained in:
snipe 2022-04-05 18:30:23 +01:00 committed by GitHub
commit 08588a2e6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -307,7 +307,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
*/
public function consumables()
{
return $this->belongsToMany(\App\Models\Consumable::class, 'consumables_users', 'assigned_to', 'consumable_id')->withPivot('id')->withTrashed();
return $this->belongsToMany(\App\Models\Consumable::class, 'consumables_users', 'assigned_to', 'consumable_id')->withPivot('id','created_at')->withTrashed();
}
/**

View file

@ -738,7 +738,7 @@
<td>
{!! Helper::formatCurrencyOutput($consumable->purchase_cost) !!}
</td>
<td>{{ $consumable->created_at }}</td>
<td>{{ $consumable->pivot->created_at }}</td>
</tr>
@endforeach
</tbody>