Files
kulakpos_web/Modules/Business/resources/views/stocks/excel-csv.blade.php
eko54r 05fd3230b8
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 5m14s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
Build, Push and Deploy / deploy-staging (push) Successful in 41s
Build, Push and Deploy / deploy-production (push) Has been skipped
update marketing
2026-05-14 11:55:22 +07:00

67 lines
2.4 KiB
PHP

<table>
<thead>
<tr>
<th>{{ __('SL') }}.</th>
<th>{{ __('Product') }}</th>
<th>{{ __('Code') }}</th>
<th>{{ __('HSN Code') }}</th>
<th>{{ __('Category') }}</th>
@usercan('stocks.price')
<th>{{ __('Cost') }}</th>
@endusercan
<th>{{ __('Qty') }}</th>
<th>{{ __('Sale') }}</th>
<th>{{ __('Stock Value') }}</th>
</tr>
</thead>
<tbody>
@foreach ($products as $product)
@php
$total_stock = $product->stocks->sum('productStock');
$firstStock = $product->stocks->first();
$total_value = $product->stocks->sum(function ($stock) {
return $stock->productPurchasePrice * $stock->productStock;
});
@endphp
<tr>
<td>{{ $loop->index + 1 }}</td>
<td>{{ $product->productName }}</td>
<td>{{ $product->productCode }}</td>
<td>{{ $product->hsn_code }}</td>
<td>{{ $product->category->categoryName ?? '' }}</td>
@usercan('stocks.price')
<td>
{{ currency_format(optional($firstStock)->productPurchasePrice, currency: business_currency()) }}
</td>
@endusercan
<td class="{{ $total_stock <= $product->alert_qty ? 'text-danger' : 'text-success' }} text-start">
{{ $total_stock }}
</td>
<td class="text-center">
{{ currency_format(optional($firstStock)->productSalePrice, currency: business_currency()) }}
</td>
<td class="text-end">{{ currency_format($total_value, currency: business_currency()) }}</td>
</tr>
@endforeach
</tbody>
@if ($products->count() > 0)
<tr class="table-footer">
<td class="text-start">{{ __('Total') }}</td>
<td></td>
<td></td>
<td></td>
<td></td>
@usercan('stocks.price')
<td></td>
@endusercan
<td class="text-start">
{{ $total_stock_qty }}
</td>
<td></td>
<td class="text-end">
{{ currency_format($total_stock_value, currency: business_currency()) }}
</td>
</tr>
@endif
</table>