7 changed files with 60 additions and 9 deletions
-
10app/Http/Controllers/ProductsController.php
-
2resources/lang/id/product.php
-
2resources/views/layouts/app.blade.php
-
3resources/views/products/index.blade.php
-
37resources/views/products/price-list.blade.php
-
14resources/views/transactions/pdf.blade.php
-
1routes/web.php
@ -0,0 +1,37 @@ |
|||||
|
@extends('layouts.pdf') |
||||
|
|
||||
|
@section('title', trans('product.price_list') . ' (per ' . date('Y-m-d H:i') . ')') |
||||
|
|
||||
|
@section('content') |
||||
|
|
||||
|
<table style="width: 760px; border-collapse: collapse;"> |
||||
|
<tbody> |
||||
|
<tr> |
||||
|
<td colspan="4"> |
||||
|
<h2 class="text-center">{{ trans('product.price_list') }} - {{ config('store.name') }}</h2> |
||||
|
<p class="text-center strong">Per: {{ date('Y-m-d H:i') }}</p> |
||||
|
<br> |
||||
|
</td> |
||||
|
</tr> |
||||
|
@foreach($products->chunk(80) as $chuncked40Products) |
||||
|
<tr class="border-bottom" style="padding-bottom:20px"> |
||||
|
@foreach($chuncked40Products->chunk(40) as $chunckedProducts) |
||||
|
<td style="width:50%;padding: 5px"> |
||||
|
<table class="main-table"> |
||||
|
<tbody> |
||||
|
@foreach($chunckedProducts as $key => $product) |
||||
|
<tr> |
||||
|
<td>{{ $key + 1 }}) {{ $product->name }} ({{ $product->unit->name }})</td> |
||||
|
<td class="text-right" style="width:20%">{{ formatRp($product->cash_price) }}</td> |
||||
|
<td class="text-right" style="width:20%">{{ formatRp($product->credit_price) }}</td> |
||||
|
</tr> |
||||
|
@endforeach |
||||
|
</tbody> |
||||
|
</table> |
||||
|
</td> |
||||
|
@endforeach |
||||
|
</tr> |
||||
|
@endforeach |
||||
|
</tbody> |
||||
|
</table> |
||||
|
@endsection |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue