@extends('layouts.template.main') @section('content')
Danh sách bảng lương marketing
@if (session('success'))
{{ session('success') }}
@endif @if (auth()->user()->hasRole('admin') || auth()->user()->hasRole('hr'))
Quy trình tính lương
@endif @php $formatMoney = function ($value) { return is_null($value) ? '-' : number_format($value, 0); }; $formatPercent = function ($value) { return is_null($value) ? '-' : number_format($value, 2) . '%'; }; @endphp @foreach ($financials as $record) @endforeach
Nhân viên Tháng Chi phí Doanh thu Lãi Lãi % Tổng chi phí Tổng doanh thu Tổng lãi Lợi nhuận % COM Com
{{ optional($record->employee)->name ?? 'N/A' }} {{ $record->month }} {{ $formatMoney($record->cost) }} {{ $formatMoney($record->revenue) }} {{ $formatMoney($record->profit) }} {{ $formatPercent($record->profit_percent) }} {{ $formatMoney($record->total_cost) }} {{ $formatMoney($record->total_revenue) }} {{ $formatMoney($record->total_profit) }} {{ $formatMoney($record->net_profit) }} {{ $formatPercent($record->com_percent) }} {{ $formatMoney($record->com_amount) }}
@endsection