@extends('layouts.master') @section('title', $title) @php $settings = \App\Models\Setting::pluck('value','name')->toArray(); /* ================= TOTAL CALCULATIONS ================= */ $totalBasic = $salary_details->sum('basic_salary'); $totalAllowance = $salary_details->sum('allowance'); $totalDeduction = $salary_details->sum('deductions'); $totalNet = $salary_details->sum(function ($d) { return $d->basic_salary + $d->allowance - $d->deductions; }); @endphp @section('content')
| Total Basic: {{ number_format($totalBasic,2) }} | Total Allowance: {{ number_format($totalAllowance,2) }} |
| Total Deductions: {{ number_format($totalDeduction,2) }} | Total Net: {{ number_format($totalNet,2) }} |
| Total Basic | {{ number_format($totalBasic,2) }} | Total Allowance | {{ number_format($totalAllowance,2) }} |
| Total Deductions | {{ number_format($totalDeduction,2) }} | Total Net | {{ number_format($totalNet,2) }} |
| # | Staff | Phone | Grade | Branch | Basic | Allowance | Deductions | Net |
|---|---|---|---|---|---|---|---|---|
| {{ $i++ }} | {{ $d->staff?->name }} | {{ $d->staff?->phone_number }} | {{ $d->staff?->gd?->name }} | {{ $d->staff?->branch?->name }} | {{ number_format($d->basic_salary,2) }} | {{ number_format($d->allowance,2) }} | {{ number_format($d->deductions,2) }} | {{ number_format($net,2) }} |