@extends('layouts.app') @section('title') {{__('Purchase report')}} @endsection @section('breadcrumb')

{{__('Reports')}}

@endsection @section('content')

{{__('Purchase report')}}

has('date')) value="{{request()->get('date')}}" @endif id="date" required>
@if(request()->has('date'))
{{__('Summary')}}

{{formated_price($total)}}

{{__('Total')}}

{{formated_price($paid)}}

{{__('Paid')}}

{{formated_price($due)}}

{{__('Due')}}
@foreach($purchases as $purchase) @endforeach
# {{__('Supplier')}} {{__('Branch')}} {{__('Date')}} {{__('Total')}} {{__('Paid')}} {{__('Due')}}
{{$purchase['id']}} {{$purchase['supplier']['name']}} {{$purchase['branch']['name']}} {{$purchase['date']}} {{formated_price($purchase['total'])}} {{formated_price($purchase['paid'])}} {{formated_price($purchase['due'])}}
@foreach($payments as $payment) @endforeach
# #{{__('Purchase')}} {{__('Supplier')}} {{__('Branch')}} {{__('Date')}} {{__('Amount')}} {{__('Payment method')}}
{{$payment['id']}} {{$payment['purchase_id']}} {{$payment['purchase']['supplier']['name']}} {{$payment['purchase']['branch']['name']}} {{date('Y-m-d',strtotime($payment['date']))}} {{formated_price($payment['amount'])}} {{$payment['payment_method']['name']}}
@endif
@if(request()->has('date')) @endif
@endsection @section('scripts') @endsection