@extends('backend.layouts.master') @section('section-title', 'Product') @section('page-title', 'Product List') @if (check_permission('product.create')) @section('action-button') Add Product @endsection @endif @push('css') @endpush @section('content')
@php // $categories = App\Models\Category::get(); // $produc = App\Models\Product::get(); @endphp
Reset Print
@forelse($products as $data) @php $count_inv = App\Models\InvoiceItem::where('product_id', $data->id)->count(); $count_pur = App\Models\PurchaseItem::where('product_id', $data->id)->count(); $userBranchId = auth()->user()->branch_id; $filterBranchId = session('branch_filter_id', null); if ($userBranchId == 1) { if ($filterBranchId) { $branch_product = App\Models\BranchProduct::where('branch_id', $filterBranchId) ->where('product_id', $data->id)->get(); } else { $branch_product = App\Models\BranchProduct::where('product_id', $data->id)->get(); } } else { $branch_product = App\Models\BranchProduct::where('product_id', $data->id) ->where('branch_id', $userBranchId)->get(); } @endphp @php $userBranchId = auth()->user()->branch_id; $filterBranchId = session('branch_filter_id', null); $branchId = $filterBranchId ?? $userBranchId; $branch = $branchId ? App\Models\Branch::find($branchId) : null; $branchName = $branch?->name ?? get_setting('company_name'); if ($branch?->name == 'SELAI') { $tagline = 'Imagine. Create. Wear'; } else { $tagline = 'Test'; } $company = get_setting('company_name'); @endphp {{-- delete modal --}} @csrf @empty @endforelse
#SL Branch Name Size-Color Barcode Category Cost Price Action
{{ $loop->index + 1 }} @foreach ($branch_product as $branch) {{ $branch->branch?->name }} @endforeach {{ $data->name }} @if (count($data->product_variations) > 0) @endif {{ $data->barcode }} {{ $data->category?->name }} {{ $data->purchase_price }} {{ $data->selling_price }}
No Data Available
{{ $products->onEachSide(1)->links() }}
@push('js') @endpush