@extends('layouts.app') @section('stitle', 'Report') @section('title', 'Purchasing Report') @section('content')
{{--@if(session()->get('title') == "success") @elseif (session()->get('title') == "error") @elseif($errors->any()) @endif--}} {{-- @if ($errors->any())--}} {{-- @foreach ($errors->all() as $error)--}} {{--
{{ $error }}
--}} {{-- @endforeach--}} {{-- @endif--}}

{{__('messages.CreateReport')}}

@if($data->isNotEmpty())
{{-- --}} @foreach($data as $task) {{-- --}} @endforeach
{{__('messages.BusinessName')}}{{__('messages.REFERENCE')}} {{__('messages.Supplier')}} {{__('messages.BRANCH')}} {{__('messages.COST')}} {{__('messages.VAT')}} {{__('messages.TotalAmount')}} ({{Auth::user()->business->currency->symbol}}) {{__('messages.TYPE')}} {{__('messages.STATUS')}} {{__('messages.CreatedBy')}} {{__('messages.created_at')}}
{{$task->business->business_name}}{{ $task->reference }} {{ $task->suppliers->name }} {{ $task->branch->name }} {{ $task->cost }} {{ $task->tax }} {{ $task->total_amount }} {{ $task->purchaseType->name }} {{ $task->status }} {{ $task->user->name}} {{ $task->created_at}}
Total {{ $data->sum('cost') }} {{ $data->sum('tax') }} {{ $data->sum('total_amount') }}
@else
No Data Found! Adjust the date & filters in the report to get more specific results.
@endif
@endsection @push('my_scripts') @endpush