mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 20:26:42 +00:00
First draft for printable location content sheets (references #341)
This commit is contained in:
56
views/locationcontentsheet.blade.php
Normal file
56
views/locationcontentsheet.blade.php
Normal file
@@ -0,0 +1,56 @@
|
||||
@extends('layout.default')
|
||||
|
||||
@section('title', $__t('Location Content Sheet'))
|
||||
|
||||
@push('pageStyles')
|
||||
<style>
|
||||
@media print
|
||||
{
|
||||
.page {
|
||||
page-break-after: always !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<h1 class="d-print-none">
|
||||
<a class="btn btn-outline-dark responsive-button" href="javascript:window.print();">
|
||||
<i class="fas fa-print"></i> {{ $__t('Print') }}
|
||||
</a>
|
||||
</h1>
|
||||
|
||||
@foreach($locations as $location)
|
||||
<div class="page">
|
||||
<h1>{{ $location->name }}</h1>
|
||||
@php $currentStockEntriesForLocation = FindAllObjectsInArrayByPropertyValue($currentStockLocationContent, 'location_id', $location->id); @endphp
|
||||
<div class="row w-50">
|
||||
<div class="col">
|
||||
<table class="table table-sm table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ $__t('Product') }}</th>
|
||||
<th>{{ $__t('Amount') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($currentStockEntriesForLocation as $currentStockEntry)
|
||||
<tr>
|
||||
<td>
|
||||
{{ FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name }}
|
||||
</td>
|
||||
<td>
|
||||
<span>{{ $currentStockEntry->amount }}</span> <span id="product-{{ $currentStockEntry->product_id }}-qu-name">{{ $__n($currentStockEntry->amount, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name_plural) }}</span>
|
||||
<span class="small font-italic">@if($currentStockEntry->amount_opened > 0){{ $__t('%s opened', $currentStockEntry->amount_opened) }}@endif</span>
|
||||
</td>
|
||||
<td class="fit-content">____________________</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@stop
|
Reference in New Issue
Block a user