| Sl. |
Barcode |
Brand |
Product Name |
Model |
Sale Price |
Total Quantity |
Cost Price |
Total Price |
@if (!empty($hasCategories))
@php
$serial = 0;
$iRow = 0;
$totalQty = 0;
$totalCostPrice = 0;
$totalTotalPrice = 0;
@endphp
@foreach ($hasCategories as $key => $hasCategory)
|
{{$hasCategories[$key]}}
|
@php
$invProducts = App\Models\inventory\productConfig\InvProduct::join('inv_opening_stock_details', 'inv_opening_stock_details.product_id', '=', 'inv_product.id')
->selectRaw("inv_product.id,inv_product.id,inv_product.group_id,inv_product.model_id,inv_product.category_id,inv_product.sub_category_id,inv_product.brand_id,inv_product.name,inv_product.barcode,inv_opening_stock_details.id as row_id,inv_opening_stock_details.opening_stock_id,inv_opening_stock_details.quantity,inv_opening_stock_details.cost_price,inv_opening_stock_details.total_price")
->where('inv_product.category_id', '=' , $key)->where('inv_opening_stock_details.branch_id', '=' , $data->branch_id)->get();
//dd($invProducts);
@endphp
@if (!empty($invProducts))
@foreach ($invProducts as $invProduct)
@php
$iRow++;
$openingBarcodeQuantity = 0;
$openingBarcodePrice = 0;
$openingTotalPrice = 0;
$openingBarcodeQuantity = ($invProduct->quantity) ? $invProduct->quantity : 0;
$openingBarcodePrice = $invProduct->cost_price;
$openingTotalPrice = $invProduct->total_price;
$totalQty += $openingBarcodeQuantity;
$totalCostPrice += $openingBarcodePrice;
$totalTotalPrice += $invProduct->total_price;
@endphp
| {{ ++$serial }} |
{{ $invProduct->barcode }} |
{{ $invProduct->inv_brand->name }} |
{{ $invProduct->name }} |
{{ $invProduct->inv_model->name }} |
{{ $invProduct->sales_price }} |
@if($isEditAccess == true)
@else
{{$openingBarcodeQuantity}}
@endif
|
{{ $openingBarcodePrice}} |
{{ $openingTotalPrice}} |
@endforeach
@endif
@endforeach
| Total |
{{ $totalQty}} |
{{ number_format($totalCostPrice,2)}} |
{{ number_format($totalTotalPrice,2)}} |
@endif
@if($totalQty > 0)
@include('gnr.tools.approvalConfig.approvalLogs')
@if($data->authStatus != 'approved' && $data->authStatus != 'rejected')
@include('inventory.tools.approvalSystem.invApprove')
@endif
@endif