@extends('layouts.admin.master') @section('title', 'Purchase Item Wise Report') @section('vendor-style') @endsection @section('vendor-script') @endsection @section('content')
@if(count($errors) > 0) @endif @if($message = Session::get('success')) @endif
@csrf
@if(isset($sales) && count($sales) > 0)
@if(isset($reports['branch']) && !empty($reports['branch'])) Branch: {{ $reports['branch'] }} @endif
@if(isset($reports['product']) && !empty($reports['product'])) Product: {{ $reports['product'] }} @endif
Date: {{ $reports['dates'] }} Export To Excell
@foreach($sales as $sale) @endforeach
# Date Invoice No Customer GSTIN Product Qty Total
{{ $loop->iteration }} {{ $sale->purchase_date }} {{ $sale->invoice_no }} {{ $sale->vendor->name }} {{ $sale->vendor->gstin }} {{ $reports['product'] }} {{ $sale->purchaseDetails()->where('product_master_id', $product)->first()->quantity }} {{ $sale->grand_total }}
Total: {{ $sales->sum('grand_total') }}
@endif
@endsection