@extends('layouts.app')
@section('title', 'سود و زیان مراکز هزینه')
@section('content')
Excel
سود و زیان هر مرکز
{{ $fromDate ? jdate($fromDate) : 'از ابتدا' }} تا {{ $toDate ? jdate($toDate) : 'امروز' }}
@if (count($result['rows']))
| مرکز هزینه |
درآمد |
هزینه |
سود / زیان |
@foreach ($result['rows'] as $row)
@php
$tone = $row['positive'] ? 'text-emerald-600' : ($row['negative'] ? 'text-rose-600' : 'text-slate-500');
@endphp
| {{ $row['center'] }} |
{{ $row['revenue'] }} |
{{ $row['expense'] }} |
{{ $row['profit'] }} |
@endforeach
| جمع |
{{ $result['totals']['revenue'] }} |
{{ $result['totals']['expense'] }} |
{{ $result['totals']['profit'] }} |
@else
@endif
مرکز هزینه از ردیف سند خوانده میشود؛ اسناد پیش از تعریف مراکز در ردیف «بدون مرکز» میآیند.
@foreach ($centers as $label)
{{ $label }}
@endforeach
@endsection