@extends('layouts.report_pdf') @section('title') {{__('Expenses report')}}-{{date('Y-m-d')}} @endsection @section('content')
{{-- --}}
|
{{__('Expenses report')}} |
{{__('Date')}} : {{date('Y-m-d H:i')}} {{__('Date range')}} : {{date('Y-m-d H:i',strtotime($data['from']))}} - {{date('Y-m-d H:i',strtotime($data['to']))}} |
| {{__('Expenses')}} | ||||||
|---|---|---|---|---|---|---|
| # | {{__('Branch')}} | {{__('Category')}} | {{__('Date')}} | {{__('Payment method')}} | {{__('Note')}} | {{__('Amount')}} |
| {{$expense['id']}} | @if(isset($expense['branch'])) {{$expense['branch']['name_'.app()->getLocale()]}} @endif | @if(isset($expense['category'])) {{$expense['category']['name']}} @endif | {{date('Y-m-d H:i',strtotime($expense['date']))}} | @if(isset($expense['payment_method'])) {{$expense['payment_method']['name']}} @endif | {{$expense['notes']}} | {{format_money($expense['amount'])}} |
| {{__('Summary')}} | {{format_money($data['total'])}} | |||||
| {{__('Expense categories')}} | |
|---|---|
| {{__('Category')}} | {{__('Amount')}} |
| {{$expense_category['category_name']}} | {{format_money($expense_category['expense'])}} |
| {{__('Summary')}} | {{format_money(round($data['expense_categories']->sum('expense'),2))}} |
| {{__('Users')}} | |
|---|---|
| {{__('Name')}} | {{__('Expenses')}} |
| {{$user['name']}} | {{format_money($user['expense'])}} |
| {{__('Summary')}} | {{format_money(round($data['users']->sum('expense'),2))}} |
| {{__('Balance')}} | |
|---|---|
| {{__('Payment method')}} | {{__('Expenses')}} |
| {{$payment_method['name']}} | {{format_money($payment_method['expense'])}} |
| {{__('Summary')}} | {{format_money(collect($data['payment_methods'])->flatten()->sum('expense'))}} |
| {{__('Summary')}} | |
|---|---|
| {{__('Total')}} | {{format_money($data['total'])}} |